Support for block annotations. Option to use endnotes in PDF.
[librarian.git] / src / librarian / pdf / wl.cls
index c46a0ec..62b23e1 100644 (file)
 \newif\ifshowfootnotes \showfootnotestrue
 \DeclareOption{nofootnotes}{\showfootnotesfalse}
 
+\newif\ifendnotes \endnotesfalse
+\DeclareOption{endnotes}{\endnotestrue}
+
 \newif\ifshowthemes \showthemestrue
 \DeclareOption{nothemes}{\showthemesfalse}
 
 
 \usepackage{wrapfig}
 
+
+\ifendnotes
+  \usepackage{enotez}
+  \setenotez{list-name=Przypisy}
+  \setenotez{backref=true}
+\fi
+
+
 \usepackage[overload]{textcase}
 \usepackage{scalefnt}
 \usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex]{hyperref}
@@ -753,10 +764,17 @@ Letters={Uppercase}
 }
 
 \ifshowfootnotes
-  \newcommand{\pa}[1]{\NoCaseChange{\footnote{#1 [przypis autorski]}}}
-  \newcommand{\pe}[1]{\NoCaseChange{\footnote{#1 [przypis edytorski]}}}
-  \newcommand{\pr}[1]{\NoCaseChange{\footnote{#1 [przypis redakcyjny]}}}
-  \newcommand{\pt}[1]{\NoCaseChange{\footnote{#1 [przypis tłumacza]}}}
+  \ifendnotes
+    \newcommand{\pa}[1]{\NoCaseChange{\endnote{#1 [przypis autorski]}}}
+    \newcommand{\pe}[1]{\NoCaseChange{\endnote{#1 [przypis edytorski]}}}
+    \newcommand{\pr}[1]{\NoCaseChange{\endnote{#1 [przypis redakcyjny]}}}
+    \newcommand{\pt}[1]{\NoCaseChange{\endnote{#1 [przypis tłumacza]}}}
+  \else
+    \newcommand{\pa}[1]{\NoCaseChange{\footnote{#1 [przypis autorski]}}}
+    \newcommand{\pe}[1]{\NoCaseChange{\footnote{#1 [przypis edytorski]}}}
+    \newcommand{\pr}[1]{\NoCaseChange{\footnote{#1 [przypis redakcyjny]}}}
+    \newcommand{\pt}[1]{\NoCaseChange{\footnote{#1 [przypis tłumacza]}}}
+  \fi
 \else
   \newcommand{\pa}[1]{}
   \newcommand{\pe}[1]{}