docs/bib-ref1

annotate pb/hyperendnotes.sty @ 70:d5d894baa3ed

pb: Added the latex version for Perspektive Bibliothek This content was created between 2014-04-12 and 2014-05-12.
author markus schnalke <meillo@marmaro.de>
date Mon, 20 Oct 2014 07:43:31 +0200
parents
children
rev   line source
meillo@70 1 %%% hyperendnotes.sty
meillo@70 2 \makeatletter
meillo@70 3 \newif\ifenotelinks
meillo@70 4 \newcounter{Hendnote}
meillo@70 5 % Redefining portions of endnotes-package:
meillo@70 6 \let\savedhref\href
meillo@70 7 \let\savedurl\url
meillo@70 8 \def\endnotemark{%
meillo@70 9 \@ifnextchar[\@xendnotemark{%
meillo@70 10 \stepcounter{endnote}%
meillo@70 11 \protected@xdef\@theenmark{\theendnote}%
meillo@70 12 \protected@xdef\@theenvalue{\number\c@endnote}%
meillo@70 13 \@endnotemark
meillo@70 14 }%
meillo@70 15 }%
meillo@70 16 \def\@xendnotemark[#1]{%
meillo@70 17 \begingroup\c@endnote#1\relax
meillo@70 18 \unrestored@protected@xdef\@theenmark{\theendnote}%
meillo@70 19 \unrestored@protected@xdef\@theenvalue{\number\c@endnote}%
meillo@70 20 \endgroup
meillo@70 21 \@endnotemark
meillo@70 22 }%
meillo@70 23 \def\endnotetext{%
meillo@70 24 \@ifnextchar[\@xendnotenext{%
meillo@70 25 \protected@xdef\@theenmark{\theendnote}%
meillo@70 26 \protected@xdef\@theenvalue{\number\c@endnote}%
meillo@70 27 \@endnotetext
meillo@70 28 }%
meillo@70 29 }%
meillo@70 30 \def\@xendnotenext[#1]{%
meillo@70 31 \begingroup
meillo@70 32 \c@endnote=#1\relax
meillo@70 33 \unrestored@protected@xdef\@theenmark{\theendnote}%
meillo@70 34 \unrestored@protected@xdef\@theenvalue{\number\c@endnote}%
meillo@70 35 \endgroup
meillo@70 36 \@endnotetext
meillo@70 37 }%
meillo@70 38 \def\endnote{%
meillo@70 39 \@ifnextchar[\@xendnote{%
meillo@70 40 \stepcounter{endnote}%
meillo@70 41 \protected@xdef\@theenmark{\theendnote}%
meillo@70 42 \protected@xdef\@theenvalue{\number\c@endnote}%
meillo@70 43 \@endnotemark\@endnotetext
meillo@70 44 }%
meillo@70 45 }%
meillo@70 46 \def\@xendnote[#1]{%
meillo@70 47 \begingroup
meillo@70 48 \c@endnote=#1\relax
meillo@70 49 \unrestored@protected@xdef\@theenmark{\theendnote}%
meillo@70 50 \unrestored@protected@xdef\@theenvalue{\number\c@endnote}%
meillo@70 51 \show\@theenvalue
meillo@70 52 \endgroup
meillo@70 53 \@endnotemark\@endnotetext
meillo@70 54 }%
meillo@70 55 \def\@endnotemark{%
meillo@70 56 \leavevmode
meillo@70 57 \ifhmode
meillo@70 58 \edef\@x@sf{\the\spacefactor}\nobreak
meillo@70 59 \fi
meillo@70 60 \ifenotelinks
meillo@70 61 \expandafter\@firstofone
meillo@70 62 \else
meillo@70 63 \expandafter\@gobble
meillo@70 64 \fi
meillo@70 65 {%
meillo@70 66 \Hy@raisedlink{%
meillo@70 67 \hyper@@anchor{Hendnotepage.\@theenvalue}{\empty}%
meillo@70 68 }%
meillo@70 69 }%
meillo@70 70 \hyper@linkstart{link}{Hendnote.\@theenvalue}%
meillo@70 71 \makeenmark
meillo@70 72 \hyper@linkend
meillo@70 73 \ifhmode
meillo@70 74 \spacefactor\@x@sf
meillo@70 75 \fi
meillo@70 76 \relax
meillo@70 77 }%
meillo@70 78 \long\def\@endnotetext#1{%
meillo@70 79 \if@enotesopen
meillo@70 80 \else
meillo@70 81 \@openenotes
meillo@70 82 \fi
meillo@70 83 \immediate\write\@enotes{%
meillo@70 84 \@doanenote{\@theenmark}{\@theenvalue}%
meillo@70 85 }%
meillo@70 86 \begingroup
meillo@70 87 \def\next{#1}%
meillo@70 88 \newlinechar='40
meillo@70 89 \immediate\write\@enotes{\meaning\next}%
meillo@70 90 \endgroup
meillo@70 91 \immediate\write\@enotes{%
meillo@70 92 \@endanenote
meillo@70 93 }%
meillo@70 94 }%
meillo@70 95 \def\theendnotes{%
meillo@70 96 \immediate\closeout\@enotes
meillo@70 97 \global\@enotesopenfalse
meillo@70 98 \begingroup
meillo@70 99 \makeatletter
meillo@70 100 \edef\@tempa{`\string>}%
meillo@70 101 \ifnum\catcode\@tempa=12
meillo@70 102 \let\@ResetGT\relax
meillo@70 103 \else
meillo@70 104 \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}%
meillo@70 105 \@makeother\>%
meillo@70 106 \fi
meillo@70 107 \def\@doanenote##1##2##3>{%
meillo@70 108 \def\@theenmark{##1}%
meillo@70 109 \def\@theenvalue{##2}%
meillo@70 110 \par
meillo@70 111 \smallskip %<-small vertical gap between endnotes
meillo@70 112 \begingroup
meillo@70 113 \def\href{\expandafter\savedhref}%
meillo@70 114 \def\url{\expandafter\savedurl}%
meillo@70 115 \@ResetGT
meillo@70 116 \edef\@currentlabel{\csname p@endnote\endcsname\@theenmark}%
meillo@70 117 \enoteformat
meillo@70 118 }%
meillo@70 119 \def\@endanenote{%
meillo@70 120 \par\endgroup
meillo@70 121 }%
meillo@70 122 % Redefine, how numbers are formatted in the endnotes-section:
meillo@70 123 \renewcommand*\@makeenmark{%
meillo@70 124 \hbox{\normalfont\@theenmark~}%
meillo@70 125 }%
meillo@70 126 % header of endnotes-section
meillo@70 127 \enoteheading
meillo@70 128 % font-size of endnotes
meillo@70 129 \enotesize
meillo@70 130 \input{\jobname.ent}%
meillo@70 131 \endgroup
meillo@70 132 }%
meillo@70 133 \def\enoteformat{%
meillo@70 134 \rightskip\z@
meillo@70 135 %\leftskip1.8em
meillo@70 136 \noindent
meillo@70 137 \hangindent .0
meillo@70 138 \parindent
meillo@70 139 \leavevmode\llap{%
meillo@70 140 \setcounter{Hendnote}{\@theenvalue}%
meillo@70 141 \addtocounter{Hendnote}{-1}%
meillo@70 142 \refstepcounter{Hendnote}%
meillo@70 143 \ifenotelinks
meillo@70 144 \expandafter\@secondoftwo
meillo@70 145 \else
meillo@70 146 \expandafter\@firstoftwo
meillo@70 147 \fi
meillo@70 148 {\@firstofone}%
meillo@70 149 {\hyperlink{Hendnotepage.\@theenvalue}}%
meillo@70 150 {\makeenmark}%
meillo@70 151 }%
meillo@70 152 }%
meillo@70 153 % stop redefining portions of endnotes-package:
meillo@70 154 \makeatother
meillo@70 155 % Toggle switch in order to turn on/off back-links in the
meillo@70 156 % endnote-section:
meillo@70 157 \enotelinkstrue
meillo@70 158 %\enotelinksfalse