summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-07-12 22:23:39 +0000
committerKarl Berry <karl@freefriends.org>2014-07-12 22:23:39 +0000
commit805c1e3d89602317d7836d0876986ae090b0a403 (patch)
tree410eba652be1aae6dfd082be0de38b53484ae76b /Master
parent5d9940c6941c28a159b8a7d961a53307dc43de95 (diff)
sepfootnotes (12jul14)
git-svn-id: svn://tug.org/texlive/trunk@34580 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/sepfootnotes/README8
-rw-r--r--Master/texmf-dist/doc/latex/sepfootnotes/sepfootnotes.pdfbin200186 -> 217297 bytes
-rw-r--r--Master/texmf-dist/doc/latex/sepfootnotes/sepfootnotes.tex40
-rw-r--r--Master/texmf-dist/tex/latex/sepfootnotes/sepfootnotes.sty84
4 files changed, 105 insertions, 27 deletions
diff --git a/Master/texmf-dist/doc/latex/sepfootnotes/README b/Master/texmf-dist/doc/latex/sepfootnotes/README
index 3a372fbea75..21a9a5e0b8a 100644
--- a/Master/texmf-dist/doc/latex/sepfootnotes/README
+++ b/Master/texmf-dist/doc/latex/sepfootnotes/README
@@ -1,9 +1,9 @@
Package: sepfootnotes
Description: Support footnotes and endnotes from separate files
-This package supports footnotes and endnotes from separate files.
-Basically, it provides \sepfootnotecontent and \sepfootnote:
-the former defines the content of a note; the latter typesets that note.
+This package supports footnotes and endnotes from separate files. This is
+achieved with commands \sepfootnotecontent and \sepfootnote; the former defines
+the content of a note, while the latter typesets that note.
2013/01/17 v0.2
* utf8 Support keys with UTF-8 characters
@@ -30,7 +30,7 @@ Usage:
*See sepfootnotes.pdf
--------------------------------------------------------------------------------
-Copyright (C) 2013 Eduardo C. Lourenço de Lima
+Copyright (C) 2013, 2014 Eduardo C. Lourenço de Lima
This material is subject to the LaTeX Project Public License. See
http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
diff --git a/Master/texmf-dist/doc/latex/sepfootnotes/sepfootnotes.pdf b/Master/texmf-dist/doc/latex/sepfootnotes/sepfootnotes.pdf
index 2f3d4975ca2..185c6467931 100644
--- a/Master/texmf-dist/doc/latex/sepfootnotes/sepfootnotes.pdf
+++ b/Master/texmf-dist/doc/latex/sepfootnotes/sepfootnotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/sepfootnotes/sepfootnotes.tex b/Master/texmf-dist/doc/latex/sepfootnotes/sepfootnotes.tex
index 27bd129a4a2..5944c2f4149 100644
--- a/Master/texmf-dist/doc/latex/sepfootnotes/sepfootnotes.tex
+++ b/Master/texmf-dist/doc/latex/sepfootnotes/sepfootnotes.tex
@@ -1,4 +1,4 @@
-% Copyright (C) 2013 Eduardo C. Lourenço de Lima
+% Copyright (C) 2013, 2014 Eduardo C. Lourenço de Lima
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -44,21 +44,16 @@
{\begin{center}\begin{minipage}[t]{0.5\linewidth}}
{\end{minipage}\end{center}}
\newcommand\TODO{\texttt{Todo:}}
-\newcommand\fileversion{0.2}
-\newcommand\filedate{January 17, 2013}
+\newcommand\fileversion{0.3a}
+\newcommand\filedate{March 23, 2014}
\begin{document}
\title{The \textsf{\color{myblue} sepfootnotes} package,\thanks{This document corresponds to \textsf{sepfootnotes}~\fileversion, dated~\filedate.
-I am grateful to Michael Sellhoff for his valuable feedback on \texttt{sepfootnotes}.}\\{or a footnote to Plato}}
+I am grateful to Michael Sellhoff and Sam Foster for their valuable feedback on \texttt{sepfootnotes}, and to Dan Luecking for the basic idea implemented in this package.}\\{or a footnote to Plato}}
\author{Eduardo C. Louren\c{c}o de Lima \\ \texttt{elourenco@phi.pro.br}}
-\date{\filedate}
\maketitle
- \begin{abstract}\noindent
- The |sepfootnotes| package supports footnotes and endnotes from separate files.
- Basically, it provides |\sepfootnotecontent| and |\sepfootnote|: the former
- defines the content of a note; the latter typesets that note.
- \end{abstract}
+ \begin{abstract}\noindent This package supports footnotes and endnotes from separate files. This is achieved with commands |\sepfootnotecontent| and |\sepfootnote|; the former defines the content of a note, while the latter typesets that note.\end{abstract}
\section*{Introduction}
@@ -96,6 +91,7 @@ I am grateful to Michael Sellhoff for his valuable feedback on \texttt{sepfootno
\item |\|\meta{prefix}|notemark| \marg{key}
\item |\|\meta{prefix}|notetext| \marg{key}
\item |\print|\meta{prefix}|note| \marg{key}\medskip
+\item |\|\meta{prefix}|quicknote| \marg{content}
\end{synopsis}
\subsection*{Endnote-specific}
@@ -191,15 +187,21 @@ Typeset a note identified by \meta{key}.\bigskip
\item |\|\meta{prefix}|notemark| \marg{key}
-Typeset just the mark identified by \meta{key} without the corresponding note.\bigskip
+Typeset just the mark identified by \meta{key} without the corresponding note.\medskip
\item |\|\meta{prefix}|notetext| \marg{key}
-Typeset just the note identified by \meta{key} without the corresponding mark.\bigskip
+Typeset just the note identified by \meta{key} without the corresponding mark.\medskip
-\item |\print|\meta{prefix}|content| \marg{key}
+\item |\print|\meta{prefix}|note| \marg{key}
-Just print the \meta{content} identified by \meta{key}.
+Just print the \meta{content} identified by \meta{key}.\medskip
+
+\item |\|\meta{prefix}|quicknote| \marg{content}
+
+Typeset a note with \meta{content} without a key.
+This is similar to standard |\footnote| \marg{content},
+and may be useful for short notes, such as ``Idem.''
\end{synopsis}
\end{Description}
@@ -268,6 +270,14 @@ Default:\footnote{Adapted from the \texttt{endnotes} package.}
\end{Description}
+\section {Package options}
+
+\begin{list}{}{}
+\item[|warn|] Print warning messages. (Default.)
+\item[|error|] Print warning messages, halt, and wait for user input.
+\item[|quiet|] Suppress warning and error messages.
+\end{list}
+
\section{Examples}
% -------------------------------- Examples -----------------------------------
@@ -355,7 +365,7 @@ This was first brought up by the great Plato.\xnote{Plato}
\item document.tex:
\begin{verbatim}
-\begin{document}
+\documentclass{article}
\usepackage{sepfootnotes}
\newfootnotes{a}
\newendnotes{x}
diff --git a/Master/texmf-dist/tex/latex/sepfootnotes/sepfootnotes.sty b/Master/texmf-dist/tex/latex/sepfootnotes/sepfootnotes.sty
index 31e8be64fd4..445c0f5cd81 100644
--- a/Master/texmf-dist/tex/latex/sepfootnotes/sepfootnotes.sty
+++ b/Master/texmf-dist/tex/latex/sepfootnotes/sepfootnotes.sty
@@ -1,4 +1,4 @@
-%% Copyright (C) 2013 Eduardo C. Lourenço de Lima
+%% Copyright (C) 2013, 2014 Eduardo C. Lourenço de Lima
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -11,10 +11,32 @@
%% version 2005/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[1996/06/01]
-\ProvidesPackage{sepfootnotes}[2013/01/17 v0.2 Footnotes in separate file]
+\ProvidesPackage{sepfootnotes}[2014/02/23 v0.3a Footnotes in separate file]
\newcommand\sep@packagename{sepfootnotes}
+\DeclareOption {quiet} {\sep@opt@quiettrue}
+\DeclareOption {warn} {\sep@opt@warntrue}
+\DeclareOption {error} {\sep@opt@errortrue}
+
+\newif \ifsep@opt@quiet
+\newif \ifsep@opt@warn
+\newif \ifsep@opt@error
+
+\sep@opt@warntrue
+
+\ProcessOptions
+
+\ifsep@opt@quiet
+ \sep@opt@warnfalse
+ \sep@opt@errorfalse
+\fi
+
+\ifsep@opt@error
+ \sep@opt@warnfalse
+\fi
+
+
% ********************************* Public ************************************
% ==================== shared by footnotes and endnotes =======================
@@ -24,7 +46,9 @@
\expandafter\newcommand\csname #1note\endcsname [1] {\csname #1notemark\endcsname{##1}\csname #1notetext\endcsname{##1}}%
\expandafter\newcommand\csname #1notecontent\endcsname [2] {\sep@namedef {#1} {##1} {##2}}%
\expandafter\newcommand\csname print#1note\endcsname [1] {\sep@nameuse {#1} {##1}}%
- \expandafter\newcommand\csname the#1mark\endcsname {\csname the#1note\endcsname}}%
+ \expandafter\newcommand\csname the#1mark\endcsname {\csname the#1note\endcsname}\relax
+ \expandafter\newcommand\csname #1quicknote\endcsname [1] {\sep@namereplace {#1} {sepfootnotes@tmp@quick} {##1}\csname #1note\endcsname{sepfootnotes@tmp@quick}}\relax
+}
% -------------------------------- footnotes ----------------------------------
@@ -59,23 +83,66 @@
\expandafter\newcommand\csname make#1mark\endcsname {\hbox{\normalfont\csname the#1mark\endcsname.\ }}%
\expandafter\newcommand\csname #1noteformat\endcsname {\noindent\rightskip\z@ \leftskip\z@ \leavevmode\llap{\csname make#1mark\endcsname}}%
\expandafter\newcommand\csname do#1note\endcsname [2] {\sep@refsetcounter{#1note}{##1}\par\csname #1noteformat\endcsname\csname print#1note\endcsname{##2}\par}%
- \expandafter\newcommand\csname #1notesize\endcsname {\footnotesize}
+ \expandafter\newcommand\csname #1notesize\endcsname {\footnotesize}%
\newenvironment {#1notes} {\csname #1notesize\endcsname\setlength\parskip\footnotesep} {}}
+% ------------------------------ commentnotes --------------------------------
+
+\newcommand\newcommentnotes [1]
+{\newfootnotes*{#1}\relax
+ \expandafter\renewcommand\csname #1note\endcsname [1] {\csname #1notemark\endcsname{##1}\csname #1notetext\endcsname{##1}}\relax
+ \expandafter\renewcommand\csname the#1mark\endcsname {\begingroup\csname #1notesize\endcsname\roman{#1note}\endgroup}\relax
+ \expandafter\newcommand\csname #1notesize\endcsname {\tiny}\relax
+ \expandafter\renewcommand\csname #1notetext\endcsname [1] {\-\marginpar[{\csname #1margintext\endcsname{##1}{left}}]{\setstretch{\csname #1stretch\endcsname}\csname #1margintext\endcsname {##1} {right}\relax}}\relax
+ \expandafter\newcommand\csname #1margintext\endcsname [2] {\csname #1notesize\endcsname\expandafter\raggedright\csname the#1marginmark\endcsname{#1}\csname print#1note\endcsname{##1}}\relax
+ \expandafter\newcommand\csname the#1marginmark\endcsname [1] {\textsuperscript{\csname the#1mark\endcsname}}\relax
+ \expandafter\newcommand\csname #1stretch\endcsname {0.5}\relax
+}
+
+\newcommand\newsymbolcommentnotes [2] [page]
+{\newcommentnotes {#2}\relax
+ \@addtoreset {#2note} {#1}\relax
+ \expandafter\renewcommand\csname the#2mark\endcsname {\fnsymbol {#2note}}}
+
% ********************************* Private ***********************************
% ---------------------------------- files ------------------------------------
\newcommand\sep@filename [1] {\jobname.ent-#1}
\newcommand\sep@openout [1] {\expandafter \newwrite\csname sep@fileout#1\endcsname\immediate\expandafter\openout\csname sep@fileout#1\endcsname=\sep@filename#1\relax}
-\newcommand\sep@write [2] {\immediate \write\csname sep@fileout#1\endcsname {#2}}%
+\newcommand\sep@write [2] {\immediate \write\csname sep@fileout#1\endcsname {#2}}
\newcommand\sep@close [1] {\immediate\expandafter\closeout\csname sep@fileout#1\endcsname\relax}
% ---------------------------------- table ------------------------------------
-\newcommand\sep@nameuse [2] {\@ifundefined{sepfootnotes@text@#1@#2} {} {\@nameuse{sepfootnotes@text@#1@#2}}}
-\newcommand\sep@namedef [3] {\@ifundefined{sepfootnotes@text@#1@#2} {\@namedef{sepfootnotes@text@#1@#2}{#3}} {\PackageError {\sep@packagename} {`#2' is already in use} {The key `#2' already identifies a note content.\MessageBreak Solution: Use another key.}}}
+\newcommand\sep@nameuse [2]
+{\@ifundefined{sepfootnotes@text@#1@#2}
+ {\ifsep@opt@error
+ \PackageError {\sep@packagename} {`#2' has not been assigned a content}
+ {`#2' has not been assigned a content.\MessageBreak
+ Solution: Define `#2'\MessageBreak
+ Try: \@backslashchar #1notecontent{#2}{<content>}}\relax
+ \fi
+ \ifsep@opt@warn
+ \PackageWarning {\sep@packagename} {`#2' has not been assigned a content}\relax
+ \fi}
+ {\@nameuse{sepfootnotes@text@#1@#2}}}
+
+\newcommand\sep@namedef [3]
+{\@ifundefined{sepfootnotes@text@#1@#2}
+ {\@namedef{sepfootnotes@text@#1@#2}{#3}}
+ {\ifsep@opt@error
+ \PackageError {\sep@packagename} {`#2' is already in use}
+ {`#2' is already in use.\MessageBreak
+ Solution: Use another key.\MessageBreak
+ Try: \@backslashchar #1notecontent{<key>}{<content>}}\relax
+ \fi
+ \ifsep@opt@warn
+ \PackageWarning {\sep@packagename} {`#2' is already in use}
+ \fi}}
+
+\newcommand\sep@namereplace [3] {\@namedef{sepfootnotes@text@#1@#2}{#3}}
% ---------------------------------- marks ------------------------------------
@@ -84,7 +151,8 @@
% ---------------------- cross-references and counters ------------------------
-\newcommand\sep@refsetcounter [2] {\setcounter{#1}{#2}\protected@edef\@currentlabel{\csname p@#1\endcsname\csname the#1\endcsname}}
+\newcommand\sep@refsetcounter [2] {\setcounter{#1}{#2}\protected@edef\@currentlabel{\csname p@#1\endcsname\csname the#1\endcsname}}
+\newcommand\sep@refstepcounter [1] {\stepcounter {#1}\protected@edef\@currentlabel{\csname p@#1\endcsname\csname the#1\endcsname}}
% ********************************* Default ***********************************