l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2005 Dec 05 10:55

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Chapters and links within pdf files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Chapters and links within pdf files

On Mon 05 Dec 05,  8:32 AM, Ken Bloom <kbloom@gmail.com> said:
> Peter Jay Salzman wrote:
> >
> > Along with amsmath, geometry, and fancyvrb, I think hyperref is in my top
> > list of groovy latex packages now.  Thanks!
> ooh! fancyvrb looks cool! (getting my code examples into verbatim mode
> with a single character, and many other features)
> --Ken

Oh, yeah.  Fancyvrb is one of those packages that every time you read a
section of the documentation, you find another feature which makes you
wonder how you could've lived without.

One of my favorite custom designed environments:

{numbers=left, fontsize=\relsize{-2}, frame=single, commandchars=\\\{\}}

   \textit{...previous code....}

   int i = 9999;
   while (i--) \{\label{topOfLoop}
      printf("i is \%d\Backslash{n}", i);
      ... lots of code ...

   \textit{...future code....}\label{until:9}

   The top of the loop is line~\ref{topOfLoop}

Basically, this environment:

   * places line numbers on the left
   * formats the code in a fontsize 2 lower than the current fontsize
      (really nice for long listings)
   * puts a thin single border around the entire code listing
   * allows me to \label certain lines.   very nice so you can add/delete
      lines from the code, and your reference remain valid.

The only drawback to "commandchars" (which allows labelling lines) is that
you need to escape '\' and '}' and '{'.  But this package is REALLY nice
when when you want create slides for a talk on programming.


ps- \relsize requires the relsize package.
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.