docs/bib-ref1

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/pb/hyperendnotes.sty	Mon Oct 20 07:43:31 2014 +0200
     1.3 @@ -0,0 +1,158 @@
     1.4 +%%% hyperendnotes.sty
     1.5 +\makeatletter
     1.6 +\newif\ifenotelinks
     1.7 +\newcounter{Hendnote}
     1.8 +% Redefining portions of endnotes-package:
     1.9 +\let\savedhref\href
    1.10 +\let\savedurl\url
    1.11 +\def\endnotemark{%
    1.12 +\@ifnextchar[\@xendnotemark{%
    1.13 +\stepcounter{endnote}%
    1.14 +\protected@xdef\@theenmark{\theendnote}%
    1.15 +\protected@xdef\@theenvalue{\number\c@endnote}%
    1.16 +\@endnotemark
    1.17 +}%
    1.18 +}%
    1.19 +\def\@xendnotemark[#1]{%
    1.20 +\begingroup\c@endnote#1\relax
    1.21 +\unrestored@protected@xdef\@theenmark{\theendnote}%
    1.22 +\unrestored@protected@xdef\@theenvalue{\number\c@endnote}%
    1.23 +\endgroup
    1.24 +\@endnotemark
    1.25 +}%
    1.26 +\def\endnotetext{%
    1.27 +\@ifnextchar[\@xendnotenext{%
    1.28 +\protected@xdef\@theenmark{\theendnote}%
    1.29 +\protected@xdef\@theenvalue{\number\c@endnote}%
    1.30 +\@endnotetext
    1.31 +}%
    1.32 +}%
    1.33 +\def\@xendnotenext[#1]{%
    1.34 +\begingroup
    1.35 +\c@endnote=#1\relax
    1.36 +\unrestored@protected@xdef\@theenmark{\theendnote}%
    1.37 +\unrestored@protected@xdef\@theenvalue{\number\c@endnote}%
    1.38 +\endgroup
    1.39 +\@endnotetext
    1.40 +}%
    1.41 +\def\endnote{%
    1.42 +\@ifnextchar[\@xendnote{%
    1.43 +\stepcounter{endnote}%
    1.44 +\protected@xdef\@theenmark{\theendnote}%
    1.45 +\protected@xdef\@theenvalue{\number\c@endnote}%
    1.46 +\@endnotemark\@endnotetext
    1.47 +}%
    1.48 +}%
    1.49 +\def\@xendnote[#1]{%
    1.50 +\begingroup
    1.51 +\c@endnote=#1\relax
    1.52 +\unrestored@protected@xdef\@theenmark{\theendnote}%
    1.53 +\unrestored@protected@xdef\@theenvalue{\number\c@endnote}%
    1.54 +\show\@theenvalue
    1.55 +\endgroup
    1.56 +\@endnotemark\@endnotetext
    1.57 +}%
    1.58 +\def\@endnotemark{%
    1.59 +\leavevmode
    1.60 +\ifhmode
    1.61 +\edef\@x@sf{\the\spacefactor}\nobreak
    1.62 +\fi
    1.63 +\ifenotelinks
    1.64 +\expandafter\@firstofone
    1.65 +\else
    1.66 +\expandafter\@gobble
    1.67 +\fi
    1.68 +{%
    1.69 +\Hy@raisedlink{%
    1.70 +\hyper@@anchor{Hendnotepage.\@theenvalue}{\empty}%
    1.71 +}%
    1.72 +}%
    1.73 +\hyper@linkstart{link}{Hendnote.\@theenvalue}%
    1.74 +\makeenmark
    1.75 +\hyper@linkend
    1.76 +\ifhmode
    1.77 +\spacefactor\@x@sf
    1.78 +\fi
    1.79 +\relax
    1.80 +}%
    1.81 +\long\def\@endnotetext#1{%
    1.82 +\if@enotesopen
    1.83 +\else
    1.84 +\@openenotes
    1.85 +\fi
    1.86 +\immediate\write\@enotes{%
    1.87 +\@doanenote{\@theenmark}{\@theenvalue}%
    1.88 +}%
    1.89 +\begingroup
    1.90 +\def\next{#1}%
    1.91 +\newlinechar='40
    1.92 +\immediate\write\@enotes{\meaning\next}%
    1.93 +\endgroup
    1.94 +\immediate\write\@enotes{%
    1.95 +\@endanenote
    1.96 +}%
    1.97 +}%
    1.98 +\def\theendnotes{%
    1.99 +\immediate\closeout\@enotes
   1.100 +\global\@enotesopenfalse
   1.101 +\begingroup
   1.102 +\makeatletter
   1.103 +\edef\@tempa{`\string>}%
   1.104 +\ifnum\catcode\@tempa=12
   1.105 +\let\@ResetGT\relax
   1.106 +\else
   1.107 +\edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}%
   1.108 +\@makeother\>%
   1.109 +\fi
   1.110 +\def\@doanenote##1##2##3>{%
   1.111 +\def\@theenmark{##1}%
   1.112 +\def\@theenvalue{##2}%
   1.113 +\par
   1.114 +\smallskip %<-small vertical gap between endnotes
   1.115 +\begingroup
   1.116 +\def\href{\expandafter\savedhref}%
   1.117 +\def\url{\expandafter\savedurl}%
   1.118 +\@ResetGT
   1.119 +\edef\@currentlabel{\csname p@endnote\endcsname\@theenmark}%
   1.120 +\enoteformat
   1.121 +}%
   1.122 +\def\@endanenote{%
   1.123 +\par\endgroup
   1.124 +}%
   1.125 +% Redefine, how numbers are formatted in the endnotes-section:
   1.126 +\renewcommand*\@makeenmark{%
   1.127 +\hbox{\normalfont\@theenmark~}%
   1.128 +}%
   1.129 +% header of endnotes-section
   1.130 +\enoteheading
   1.131 +% font-size of endnotes
   1.132 +\enotesize
   1.133 +\input{\jobname.ent}%
   1.134 +\endgroup
   1.135 +}%
   1.136 +\def\enoteformat{%
   1.137 +\rightskip\z@
   1.138 +%\leftskip1.8em
   1.139 +\noindent
   1.140 +\hangindent .0
   1.141 +\parindent
   1.142 +\leavevmode\llap{%
   1.143 +\setcounter{Hendnote}{\@theenvalue}%
   1.144 +\addtocounter{Hendnote}{-1}%
   1.145 +\refstepcounter{Hendnote}%
   1.146 +\ifenotelinks
   1.147 +\expandafter\@secondoftwo
   1.148 +\else
   1.149 +\expandafter\@firstoftwo
   1.150 +\fi
   1.151 +{\@firstofone}%
   1.152 +{\hyperlink{Hendnotepage.\@theenvalue}}%
   1.153 +{\makeenmark}%
   1.154 +}%
   1.155 +}%
   1.156 +% stop redefining portions of endnotes-package:
   1.157 +\makeatother
   1.158 +% Toggle switch in order to turn on/off back-links in the
   1.159 +% endnote-section:
   1.160 +\enotelinkstrue
   1.161 +%\enotelinksfalse
   1.162 \ No newline at end of file