Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tabs in LaTeX Verbatim Mode

153 views
Skip to first unread message

Petr Prikryl

unread,
May 21, 1998, 3:00:00 AM5/21/98
to

dios del sol (t...@soda.CSUA.Berkeley.EDU) wrote:
>I wish to present computer code using verbose mode. However, the
>LaTeX source contains tabs in the portion containing the computer
>source code. When I compile, they are recognized as spaces and do not
>align or indent properly.

>Is there a fix? LaTeX command? Can Emacs or another program replcace
>tabs with the correct number of spaces?

You are looking for moreverb package which implements \verbatimtab
command for including the file in verbatim mode and also 'verbatimtab'
environment. It supports also line numberin of the listing.

P.

--
Petr Prikryl (pri...@dcse.fee.vutbr.cz) http://www.fee.vutbr.cz/~prikryl/
TU of Brno, Dept. of Computer Sci. & Engineering; tel. +420-(0)5-7275 218

David Carlisle

unread,
May 21, 1998, 3:00:00 AM5/21/98
to dios del sol

t...@soda.CSUA.Berkeley.EDU (dios del sol) writes:

> I wish to present computer code using verbose mode. However, the
> LaTeX source contains tabs in the portion containing the computer
> source code. When I compile, they are recognized as spaces and do not
> align or indent properly.
>
> Is there a fix? LaTeX command? Can Emacs or another program replcace
> tabs with the correct number of spaces?

tabs are evil. If you are on unix you can use the expand program to get
rid of them. The answer to Can Emacs is always yes. In this case
M-x untabify
as a last resort you can use the extended versions of verbatim in the
verbatim and moreverb packages, one of which will preserve tabs.

David

Louis Vosloo

unread,
May 21, 1998, 3:00:00 AM5/21/98
to

dios del sol wrote:
>
> I wish to present computer code using verbose mode. However, the
> LaTeX source contains tabs in the portion containing the computer
> source code. When I compile, they are recognized as spaces and do not
> align or indent properly.
>
> Is there a fix? LaTeX command? Can Emacs or another program replcace
> tabs with the correct number of spaces?

Some TeX Systems :-) allow you to specify that you are using
tab stops at columns that are multiples of some number (8 or 4
typically) and then translate tabs to the appropriate number of
spaces. Or you can detabify in Emacs...

--
Y&Y, Inc., Tuttle's Livery, 45 Walden Street, Concord, MA 01742 USA
(800) 742-4059 (North America), (978) 371-3286 Fax: (978) 371-2004
Sales: mailto:sa...@YandY.com Support: mailto:sup...@YandY.com
World Wide Web: http://www.YandY.com

Alan Shutko

unread,
May 21, 1998, 3:00:00 AM5/21/98
to

>>>>> "D" == dios del sol <t...@soda.CSUA.Berkeley.EDU> writes:

D> Can Emacs or another program
D> replcace tabs with the correct number of spaces?

M-x untabify

--
Alan Shutko <a...@acm.org> - By consent of the corrupted
Department chairmen never die, they just lose their faculties.

Rebecca and Rowland

unread,
May 23, 1998, 3:00:00 AM5/23/98
to

David Carlisle <dav...@nag.co.uk> wrote:

[snip]

> tabs are evil. If you are on unix you can use the expand program to get
> rid of them. The answer to Can Emacs is always yes.

What? It really *can* do the ironing? Wonderful! What's the command?

Rowland.

--
Remove the animal for my email address: reb...@astrid.dog.u-net.com
Sorry - the spam got to me. PGP pub key A680B89D
UK biker? Join MAG and help keep bureaucracy at bay
http://dredd.meng.ucl.ac.uk/www/mag/mag.html

Daniel Luecking

unread,
May 24, 1998, 3:00:00 AM5/24/98
to

real-addr...@rhu.barb.foobar (Rebecca and Rowland) writes:

>David Carlisle <dav...@nag.co.uk> wrote:

>[snip]

>> tabs are evil. If you are on unix you can use the expand program to get
>> rid of them. The answer to Can Emacs is always yes.

>What? It really *can* do the ironing? Wonderful! What's the command?

C-X housework-do-ironing

However you need housework.el, which has a few bugs, and therefore has
been withdrawn until they can be fixed. Followups to
comp.editor.emacs.housework
:-)

--
Dan Luecking Dept. of Mathematical Sciences
luec...@comp.uark.edu University of Arkansas
http://comp.uark.edu/~luecking/ Fayetteville, AR 72101

0 new messages