27.12.2014 Views

nostarch.pdf.

nostarch.pdf.

nostarch.pdf.

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

hyperref expects the starred parts and chapters to have only one argument—<br />

but we have two!<br />

725 \AtBeginDocument{%<br />

726 \def\@schapter[#1]#2{%<br />

727 \H@old@schapter[#1]{#2}%<br />

728 \@nschapterpreamble}%<br />

729 \def\@spart[#1]#2{%<br />

730 \H@old@spart[#1]{#2}%<br />

731 \Hy@GlobalStepCount\Hy@linkcounter<br />

732 \xdef\@currentHref{part*.\the\Hy@linkcounter}%<br />

733 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}}}%<br />

We change the preamble for bibliography and index:<br />

734 \def\@nschapterpreamble{%<br />

735 \begingroup<br />

736 \let\@mkboth\@gobbletwo<br />

737 \Hy@GlobalStepCount\Hy@linkcounter<br />

738 \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%<br />

739 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%<br />

740 \endgroup}<br />

We can add information about the file to the <strong>pdf</strong> metadata as well:<br />

741 \let\ns@old@maketitle\maketitle<br />

742 \def\maketitle{%<br />

743 \hypersetup{<strong>pdf</strong>author=\@author, <strong>pdf</strong>title=\@title}%<br />

744 \ns@old@maketitle}<br />

745 〈/nshyper〉<br />

3.21 MakeIndex Style File<br />

These lines will produce some warnings when running Makeindex as they try to<br />

cover two different versions of the program:<br />

746 〈∗ist〉<br />

747 lethead_prefix "\\indexgroup{"<br />

748 lethead_suffix "}\\nopagebreak\n"<br />

749 lethead_flag 1<br />

750 heading_prefix "\\indexgroup{"<br />

751 heading_suffix "}\\nopagebreak\n"<br />

752 headings_flag 1<br />

753 〈/ist〉<br />

32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!