texlive[41775] Master: parnotes (26jul16)

commits+karl at tug.org commits+karl at tug.org
Sun Jul 31 01:12:23 CEST 2016

Revision: 41775
Author:   karl
Date:     2016-07-31 01:12:23 +0200 (Sun, 31 Jul 2016)
Log Message:
parnotes (26jul16)

Modified Paths:

Added Paths:

Removed Paths:

Deleted: trunk/Master/texmf-dist/doc/latex/parnotes/README
--- trunk/Master/texmf-dist/doc/latex/parnotes/README	2016-07-30 23:11:21 UTC (rev 41774)
+++ trunk/Master/texmf-dist/doc/latex/parnotes/README	2016-07-30 23:12:23 UTC (rev 41775)
@@ -1,16 +0,0 @@
-The parnotes package adds a new note type, \parnote. Parnotes are set as
-normal, running paragraphs and may be placed two ways: (1) Automatically,
-at the end of the paragraph (2) Manually, using the \parnotes command.
-To place notes automatically after every paragraph, use the autopn
-    \begin{autopn}
-    Text\parnote{parnote}
-    Text
-    \end{autopn}
-If environments are used within autopn, another autopn environment must be
-nested within them. To place notes elsewhere, use the \parnotes command.
-This is revision 1, last modified 01/03/12
-See parnotes.sty for copyright and contact details.

Deleted: trunk/Master/texmf-dist/doc/latex/parnotes/README.TEXLIVE
--- trunk/Master/texmf-dist/doc/latex/parnotes/README.TEXLIVE	2016-07-30 23:11:21 UTC (rev 41774)
+++ trunk/Master/texmf-dist/doc/latex/parnotes/README.TEXLIVE	2016-07-30 23:12:23 UTC (rev 41775)
@@ -1,7 +0,0 @@
-The following files have been removed in the TeX Live installation of
-the current package, typically due to duplication, lack of space, or
-missing source code.  You can find these files on CTAN at
-	http://mirror.ctan.org/macros/latex/contrib/parnotes
-If questions or concerns, email tex-live at tug.org.
-	PNmanual.pdf

Added: trunk/Master/texmf-dist/doc/latex/parnotes/README.md
--- trunk/Master/texmf-dist/doc/latex/parnotes/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/parnotes/README.md	2016-07-30 23:12:23 UTC (rev 41775)
@@ -0,0 +1,32 @@
+The parnotes package adds a new note type, `\parnote`. Parnotes are set as normal, running paragraphs and may be placed two ways: (1) automatically, at the end of the paragraph, or (2) manually, using the `\parnotes` command.
+To place parnotes automatically after every paragraph, use the `autopn` environment:
+    \begin{autopn}
+    Text\parnote{parnote}
+    Text
+    \end{autopn}
+If environments are used within `autopn`, another `autopn` environment must be nested within them. To place notes elsewhere, use the `\parnotes` command.
+For more details, read the project documentation in `parnotes.pdf`.
+Bugs and Source
+The development repository and the bug tracker for this package are hosted at https://github.com/chelh/LaTeX-parnotes
+Copyright (c) 2016 Chelsea Hughes
+This work is distributed under the LaTeX Project Public License, version 1.3 or later, available at http://www.latex-project.org/lppl.txt
+I currently maintain this project (comprising `parnotes.sty`, `parnotes.tex`, `README.md`, and the derived file `parnotes.pdf`) and will receive error reports at the project GitHub page (see **Bugs and Source** above).
+This package was started due to a question at the TeX Stack Exchange: http://tex.stackexchange.com/questions/34746/
+Thanks to Stack Exchange users Ahmed Musa, Bruno Le Floch, and David Carlisle.

Property changes on: trunk/Master/texmf-dist/doc/latex/parnotes/README.md
Added: svn:eol-style
## -0,0 +1 ##
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/parnotes/parnotes.pdf
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/parnotes/parnotes.pdf
--- trunk/Master/texmf-dist/doc/latex/parnotes/parnotes.pdf	2016-07-30 23:11:21 UTC (rev 41774)
+++ trunk/Master/texmf-dist/doc/latex/parnotes/parnotes.pdf	2016-07-30 23:12:23 UTC (rev 41775)

Property changes on: trunk/Master/texmf-dist/doc/latex/parnotes/parnotes.pdf
Added: svn:mime-type
## -0,0 +1 ##
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/parnotes/parnotes.tex
--- trunk/Master/texmf-dist/doc/latex/parnotes/parnotes.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/parnotes/parnotes.tex	2016-07-30 23:12:23 UTC (rev 41775)
@@ -0,0 +1,358 @@
+	SizeFeatures = {
+		{Size =     -8.41, OpticalSize = 8, Numbers = Lining},
+		{Size = 8.41-13.1, OpticalSize = 11},
+		{Size = 13.1-20.0, OpticalSize = 19},
+		{Size = 20.0-,     OpticalSize = 72}},
+	Numbers = {OldStyle,Monospaced}}
+	BoldFont = {Minion Pro Semibold}]{Minion Pro}
+\setsansfont[Scale=MatchLowercase, BoldFont = {Myriad Pro Semibold}]{Myriad Pro}
+    \BeginAccSupp{method=plain,ActualText={}}#1\EndAccSupp{}}
+    \BeginAccSupp{method=plain,ActualText={}}%
+    \aftergroup\aftersquelchstyle}
+    \fancyhf{}%
+    \fancyfoot[C]{\squelch{\thepage}}%
+    \renewcommand{\headrulewidth}{0pt}%
+    \renewcommand{\footrulewidth}{0pt}%
+\title{The \textsf{parnotes} package\parnote{This is rev.~2, last modified 7/26/2016.}}
+\author{Chelsea Hughes\parnote{See \texttt{parnotes.sty} for copyright and contact details.}}
+\date{July 26, 2016}
+\renewcommand{\parnotefmt}[1]{\centerline{\colorbox{black!10}{\parbox{0.82\textwidth}{\footnotesize\sffamily\noindent #1}}}}
+The \textsf{parnotes} package adds a new note type, \verb+\parnote+. Parnotes are set as normal, running paragraphs and may be placed two ways:
+\item Automatically, at the end of the paragraph
+\item Manually, using the \verb+\parnotes+ command
+This package was inspired by a question on the \TeX\ Stack Exchange\parnote{``Placing footnotes or endnotes at the end of the current paragraph'' at
+\url{http://tex.stackexchange.com/questions/34746}} that asked for notes
+which are placeable immediately after the paragraph in which they are mentioned, to avoid
+the interruption posed by footnotes.
+Load parnotes normally:
+\medskip\noindent The package options are described in section 2.1.
+\medskip\noindent Place a parnote mark and assign it note $\langle$\textit{text}$\rangle$. This mark is placeable within headings but will not appear in the table of contents.
+\medskip\noindent As above, but use $\langle$\textit{mark}$\rangle$ instead of the standard auto-incrementing parnote mark.
+\medskip\noindent Parnotes within an \texttt{autopn} environment are set automatically at the end of every paragraph. This behavior does not carry into nested environments. To set parnotes inside another environment, nest \texttt{autopn} within it or use \verb+\parnotes+.
+\medskip\noindent Place all parnotes immediately. Use it after every paragraph for \texttt{autopn}-like behavior outside \texttt{autopn} (or where \texttt{autopn} doesn’t apply).
+\medskip\noindent Reset the parnote number. This maps to \verb+\setcounter{parnotemark}{1}+.
+\medskip\noindent Reset the parnote number and also delete any pending parnotes.
+\medskip\noindent Refer to previous parnote mark $\langle$\textit{label}$\rangle$. Use the standard \LaTeX\ macro \verb+\label+ within a parnote to assign it a label. You may also use the standard \LaTeX\ reference macros \verb+\ref+ and \verb+\pageref+.
+Configure \textsf{parnotes} using package options, or manually using format macros.
+\subsection{Package options}
+The following options are provided:
+\texttt{restart}\hspace{0.75in}\=Reset the parnote number each time parnotes are placed.\\
+\texttt{roman}\>Use lowercase Roman numerals instead of Arabic numerals for\\
+\>parnote marks. Specify this if you mix parnotes with footnotes.\\
+\texttt{breakwithin}\>Place a line break after every parnote.\\
+\texttt{indentafter}\>Allow indentation in the paragraph following a parnote.\\
+\texttt{narrower}\>Give parnotes an increased margin, like block quotes.\\
+\texttt{nomultiple}\>Disable special behavior for multiple consecutive parnotes.\\[1ex]
+The following options change the font used within parnotes:\\[1ex]
+\texttt{notesrm}\>Roman. Default.\\
+\subsection{Format macros}
+Five internal macros control formatting for parnotes and parnote marks:
+\medskip\noindent Parnote text is set using \verb+\parnotefmt+, and parnote marks using \verb+\parnotecusmarkfmt+.
+When the optional argument of \verb+\parnote+ is \emph{not} used, \verb+\theparnotemark+ is used to get
+the parnote mark for formatting.
+At least \verb+\parnotevskip+ vertical space appears before and after the parnote text. The macro
+\verb+\parnoteintercmd+ is executed between all consecutive parnotes.
+\textsf{parnotes} rev.~1 had a different macro, \verb+\parnotemarkfmt+, to control parnote marks.
+Unfortunately, the definition of this macro is incompatible with the new feature in rev.~2 allowing for manually-specified parnote marks,
+so it had to be split into two macros \verb+\parnotecusmarkfmt+ and \verb+\theparnotemark+. This is a breaking change.
+Table~1 shows these macros' default values. Note that the package options \texttt{narrower},
+\texttt{notesrm}, \texttt{notesit}, and \texttt{notessf} modify \verb+\parnotefmt+.
+The option \texttt{roman} modifies \verb+\theparnotemark+.
+The option \texttt{breakwithin} changes \verb+\parnoteintercmd+ into a line break.
+\caption{Default values for format macros.}
+Macro & Default value \\
+\verb+\parnotefmt+ & \verb+\footnotesize\rmfamily\noindent #1+ \\
+\verb+\theparnotemark+ & \verb+\arabic{parnotemark}+ \\
+\verb+\parnotevskip+ & \verb+\medskipamount+ \\
+\verb+\parnoteintercmd+ & \verb+\hspace{1em plus 0.3em minus 0.2em}+ \\
+\verb+\parnotecusmarkfmt+ & \verb+\textsuperscript{#1}+ \\
+Redefine these macros using \verb+\renewcommand+ to fine-tune \textsf{parnotes}'s formatting. For
+example, to set parnotes in a sans-serif font, load \textsf{parnotes} as follows:
+\renewcommand{\parnotefmt}[1]{\footnotesize\sffamily\noindent #1}
+This is the same as specifying the \texttt{notessf} package option.
+To have parnotes set as \textit{completely normal text}, but one size smaller than their surroundings (using \verb+\smaller+ from \textsf{relsize}):
+\renewcommand{\parnotefmt}[1]{\smaller #1}
+Or to set parnotes in a block set off by rules, with each parnote separated by a bullet:
+    \noindent\rule{\linewidth}{1pt}\\
+    \noindent #1\par
+    \noindent\rule{\linewidth}{1pt}
+Note that since \verb+\parnotefmt+ is redefined, adding the package option \texttt{narrower} to this example will not work;
+instead, \verb+\narrower+ must be placed manually within the new definition for \verb+\parnotefmt+.
+\noindent\textbf{Revision 2, released on Jul 26, 2016}
+\item \textbf{Breaking change:} You can no longer redefine \verb+\parnotemarkfmt+. Use \verb+\theparnotemark+ and \verb+\parnotecusmarkfmt+ instead. See section~2.2 for details.
+\item Bug fix: \verb+\parnotefmt+ no longer changes the font to \verb+\rmfamily+ by default.
+\item \verb+\parnote+ now behaves more like \verb+\footnote+:
+	\begin{itemize}
+	\item It respects \verb+\spacefactor+
+	\item It no longer inserts \verb+\unskip+
+	\end{itemize}
+\item The parnote mark counter may be reset using standard LaTeX macros, e.g., \verb+\setcounter{parnotemark}{5}+
+\item \verb+\label+ now works within parnote text; \verb+\ref+ returns the parnote label, \verb+\pageref+ returns the page where the note \emph{text} is set, and \verb+\parnoteref+ returns the parnote label formatted as a mark.
+\item Implemented the system for separators between multiple footnotes from \textsf{footmisc} and \textsf{manyfoot} and added package option \texttt{nomultiple} to disable.
+\item Internal: The package now uses a single counter (\verb+\c at parnotemark+) for marks.
+\noindent\textbf{Revision 1, released on Jan 3, 2012}
+\item Initial release.
+The following pages show a typeset example using \textsf{parnotes}, including interactions with lists,
+headings, and environments (here, multicolumn text from the \textsf{multicol} package).
+\usepackage{multicol} % for demonstration
+\usepackage{lipsum} % for demonstration
+Since this is in an environment, \texttt{autopn} must be nested within
+it.\parnote{If \texttt{autopn} \emph{weren't} nested, I could've used
+\texttt{\textbackslash parnotes} here to set parnotes manually.}
+\section{On parnotes\parnote{Parnote marks will display in a heading,
+but not within the table of contents. In \texttt{autopn}, parnotes will
+display right after the heading.}}
+This is a paragraph with a parnote\parnote{See? And it's long enough
+to push the \emph{next} parnote nearer the end of the line.}. Actually,
+it has two.\parnote{By default, parnotes are set in a continuous
+paragraph with 1~em of space between each note.} This sentence ends
+the paragraph, but it doesn't have a parnote.
+This is a normal paragraph. Note that it isn't indented since the
+parnotes make it obvious where the paragraph boundaries are. To change
+this behavior, use the \texttt{indentafter} option.
+This paragraph's indentation isn't changed.
+Here's an environment with a nested \texttt{autopn}:
+Since parnotes are set within the normal paragraph flow, they interact
+well with environments\parnote{Like this multicolumn environment from
+\textsf{multicols} -- it will break columns and pages along with
+the normal text within the environment.}.
+This is just filler text without any parnotes.
+Here's an environment without a nested \texttt{autopn}:
+Without a nested \texttt{autopn}, any parnotes\parnote{Like this one.}
+will be set after the end of the next paragraph \emph{outside} this
+environment. If \texttt{\textbackslash parnotes} is called just before
+the environment ends, then the parnotes will be set within that
+environment. This is useful for, say, multi-paragraph quotes.
+This environment always specifies that it ends a paragraph, so
+parnotes will always be set after it if needed. In some other
+circumstances, \texttt{autopn} may not ``see'' that there's a
+paragraph break after the environment, so
+\texttt{\textbackslash parnotes} will have to be called after the
+environment ends.
+Here's an extra-long parnote\parnote{\lipsum[1]}, to show that parnotes
+can break pages. In fact, \TeX\ should prefer to break the page within
+the parnotes rather than between this text and the start of the
+In some circumstances, it's best to forego \texttt{autopn} altogether
+-- for example, if parnotes\parnote{Like this one.} should only be
+set after several paragraphs. Then just call
+\texttt{\textbackslash parnotes} wherever the parnotes should be set.
+The same applies if parnotes are to be placed only at the end of a
+section, or at a ``scene break.''
+The only limiting factor is that \texttt{\textbackslash parnotes} must
+be executed after the parnotes it refers to. Here's a table with notes
+in an adjacent minipage:\\[0.5in]
+\hline a & b\parnote{Note 1} \\ \hline c\parnote{Note 2} & d \\ \hline
+% locally redefining format macros so the notes are on separate
+% lines, with no vertical space
+Now for a list:
+\item This item has no parnote.
+\item This one does\parnote{See? But notice that
+\texttt{\textbackslash narrower} doesn't work in lists, so
+this is set flush with the list's margin}.
+\item This one has a parnote\parnote{Would I ever lie to you?} in its
+first paragraph\dots
+But not in its second.
+New features in \textsf{parnotes} rev.~2: Multiple parnote marks%
+\parnote{Parnote 1}\parnote{Parnote 2}.
+Manually-specified marks\parnote[aaa]{Parnote with special mark%
+\label{pn:special}} and references (see~\ref{pn:special},
+p.~\pageref{pn:special}), allowing you to re-use parnote marks%

Property changes on: trunk/Master/texmf-dist/doc/latex/parnotes/parnotes.tex
Added: svn:eol-style
## -0,0 +1 ##
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/parnotes/parnotes.sty
--- trunk/Master/texmf-dist/tex/latex/parnotes/parnotes.sty	2016-07-30 23:11:21 UTC (rev 41774)
+++ trunk/Master/texmf-dist/tex/latex/parnotes/parnotes.sty	2016-07-30 23:12:23 UTC (rev 41775)
@@ -1,45 +1,47 @@
 % The parnotes package
 % Notes after every paragraph, or elsewhere
-% Copyright 2012, Michael Hughes
+% Copyright (c) 2016 Chelsea Hughes
 % This work is distributed under the LaTeX Project Public License,
-%  version 1.3 or later, available at
+% version 1.3 or later, available at
 %     http://www.latex-project.org/lppl.txt
-% I currently maintain this project and will receive error reports at
-%     mcrh <at> uw <dot> edu
+% I currently maintain this project (comprising parnotes.sty, parnotes.tex,
+% README.md, and the derived file parnotes.pdf) and will receive error reports at
+%     https://github.com/chelh/LaTeX-parnotes
 % This package was started due to a question at the TeX Stack Exchange:
 %     http://tex.stackexchange.com/questions/34746/
-% Thanks to Stack Exchange users Ahmed Musa and Bruno Le Floch
+% Thanks to Stack Exchange users Ahmed Musa, Bruno Le Floch, and David Carlisle.
-\ProvidesPackage{parnotes}[2012/01/03 rev. 1 Notes after every paragraph, or elsewhere]
+\ProvidesPackage{parnotes}[2016/07/26 rev. 2 Notes after every paragraph, or elsewhere]
 % These are the user-modifiable format commands
-% Format for parnotes - \PN at notes@shape is \rmfamily by default
+% Format for parnotes - \PN at notes@shape is blank (\relax) by default
                 \PN at notes@shape\PN at narrower@optional\noindent #1}
-% Format for parnote marks - \PN at mark@set is \arabic by default
-\providecommand{\parnotemarkfmt}[1]{\textsuperscript{\PN at mark@set{#1}}}
+% Number format (arabic, roman, etc.) for the parnote mark counter
 % Minimum vertical space before and after parnotes
 % Full command used between parnotes
+\providecommand{\parnoteintercmd}{\hspace{1em plus 0.3em minus 0.2em}}
+% Basic formatting for parnote marks
 % Internal variables below this line
 % This holds all the parnote text
 \global\def\PN at text{}
-% Counter for parnote marks left by \parnote
-\global\newcount\c at PN@t
-% Counter for parnote marks *within* parnotes
-\global\newcount\c at PN@n
+% Counter for parnote marks
 % autopn environment name
 \def\@PN at autopn{autopn}
 % True if currently setting parnotes
@@ -51,15 +53,11 @@
 % Optionally reset the counter within \parnotes
 \let\PN at reset@optional\relax
-\DeclareOption{restart}{\def\PN at reset@optional{%
-    \global\c at PN@t=\z@
-    \global\c at PN@n=\z@
+\DeclareOption{restart}{\def\PN at reset@optional{\parnotereset}}
 % Parnote marks are arabic by default, but an option changes them to roman
-\let\PN at mark@set\arabic
-\DeclareOption{roman}{\let\PN at mark@set\roman}
 % breakwithin just changes \parnoteintercmd
 % And indentafter just clears \PN at disable@indent
@@ -69,10 +67,12 @@
 \let\PN at narrower@optional\relax
 \DeclareOption{narrower}{\let\PN at narrower@optional\narrower}
+% Allow the user to disable separators between multiple parnote marks
+\DeclareOption{nomultiple}{\def\FN at mf@prepare{\relax}\def\FN at mf@check{\relax}}
 % Font-changing options
-\let\PN at notes@shape\rmfamily
+\let\PN at notes@shape\relax
 \DeclareOption{notesrm}{\let\PN at notes@shape\rmfamily}
 \DeclareOption{notessf}{\let\PN at notes@shape\sffamily}
 \DeclareOption{notesit}{\let\PN at notes@shape\itshape}
@@ -79,56 +79,152 @@
 % Finally process the options
-\long\def\PN at parnote@real#1{%
-    % Advance the counter used in TEXT immediately
-    \global\advance\c at PN@t\@ne
-    %
-    % Then add the command's argument to a macro to be called at the end
-    % of the paragraph (or wherever \parnotes gets called)
-    %
-    \g at addto@macro\PN at text{%
-        % Advance the counter used in the parnotes as the parnotes are set
-        \global\advance\c at PN@n\@ne
-        \parnotemarkfmt{PN at n}\nolinebreak\thinspace#1%
-        %
-        % This way, if the in-text counter equals the in-note counter, we
-        % know that we're at the final parnote for this batch and
-        % \parnoteintercmd shouldn't be executed
-        %
-            \unless\ifnum\c at PN@n=\c at PN@t
-                \parnoteintercmd
-            \fi
-        }%
-    \unskip\parnotemarkfmt{PN at t}%
+% Provide a null implementation of \phantomsection in case hyperref
+% isn't loaded
+% Later, we'll check to see if this command was redefined
-% \parnote calls \PN at parnote@real if in typesetting mode, but does nothing
-% elsewhere (i.e., in the table of contents) - this is based on the stable
-% option of the footmisc package
+% A wrapper for \PN at parnote@real. Takes an optional (manually-specified)
+% mark and mandatory note text, and transforms them into the two mandatory
+% arguments (mark and note text) for \PN at parnote@real. If no mark is
+% specified, it will increment the counter parnotemark and pass its FULLY
+% EXPANDED text value to \PN at parnote@real. That's two cases:
+% 1: \parnote[MARK]{TEXT} -> \PN at parnote@real{MARK}{TEXT}
+% 2: \parnote{TEXT}       -> \PN at parnote@real{EXPANDED COUNTER}{TEXT}
+% \parnote supports behavior like the stable option of the package
+% footmisc, by Robin Fairbairns: If encountered in the Table of Contents,
+% it will do nothing and expand nothing. That adds two more cases:
+% 3: \parnote[MARK]{TEXT} -> {}
+% 4: \parnote{TEXT}       -> {}
+    % Crash if the user has defined \parnotemarkfmt, as this is
+    % no longer supported
+    \PackageError{parnotes}{%
+        Cannot use custom definition of \protect\parnotemarkfmt\MessageBreak
+        in parnotes rev. 2 or later. Use
+        \protect\theparnotemark\MessageBreak
+        and \protect\parnotecusmarkfmt\space instead%
+    }{%
+        You've used an option that is no longer supported.
+        Downgrade back\MessageBreak
+        to parnotes rev. 1, or redefine \protect\theparnotemark\space
+        and \protect\parnotecusmarkfmt\MessageBreak
+        instead of \protect\parnotemarkfmt. See section
+        2.2 of the parnotes manual for\MessageBreak
+        details.
+    }%
+% This incorporates changes suggested by David Carlisle
+\relax\ifx\@footnotetext\TX at trial@ftn\else
     \ifx\protect\@typeset at protect
-        \expandafter\PN at parnote@real
+        \expandafter\expandafter\expandafter\PN at check@args
-        \expandafter\@gobble
+        \expandafter\expandafter\expandafter\@gobble
+\def\PN at check@args{%
+        \@ifnextchar [
+                \PN at parnote@twoargs% Case 1
+                \PN at parnote@onearg% Case 2
+\DeclareRobustCommand\PN at gobble@opt{%
+    \@ifnextchar [
+        \PN at gobble@opt@@% Case 3
+        \@gobble% Case 4
+\def\PN at parnote@twoargs[#1]#2{\PN at parnote@real{#1}{#2}}
+\def\PN at parnote@onearg#1{%
+    % Fully expand the new counter value, as text
+    \begingroup\edef\@x{\endgroup\noexpand\PN at parnote@real%
+                        {\theparnotemark}}\@x{#1}%
+    \global\advance\c at parnotemark\@ne
+\def\PN at gobble@opt@@[#1]#2{}
+% Collects tokens into \PN at text, to be set when \parnotes is called.
+% Everything added to \PN at text is expanded first. Takes two MANDATORY
+% arguments, a mark and some note text.
+\long\def\PN at parnote@real#1#2{%
+    \parnotemark{#1}%
+    % Unless this is the first parnote in \PN at text, add a separator first
+    \unless\ifx\PN at text\@empty\g at addto@macro\PN at text{\parnoteintercmd}\fi
+    % Redefine \@currentlabel to the parnote label, so \label works
+    \g at addto@macro\PN at text{\phantomsection\def\@currentlabel{#1}}%
+    \g at addto@macro\PN at text{\parnotemark{#1}\nolinebreak\thinspace#2}%
+\long\def\PN at parnote@compat#1{%
+    \parnotemarkfmt{parnotemark}
+    \unless\ifx\PN at text\@empty\g at addto@macro\PN at text{\parnoteintercmd}\fi
+    \g at addto@macro\PN at text{\phantomsection\def\@currentlabel{\arabic{parnotemark}}}%
+    \g at addto@macro\PN at text{\parnotemarkfmt{parnotemark}\nolinebreak\thinspace#1}%
+% Definitions to get multiple consecutive parnotes/footnotes working, as
+% in footmisc and manyfoot; this is cribbed directly from footmisc
+\providecommand\FN at mf@prepare{%
+    \kern-\multiplefootnotemarker
+    \kern\multiplefootnotemarker\relax
+\providecommand\FN at mf@check{%
+    \ifdim\lastkern=\multiplefootnotemarker\relax
+        \edef\@x at sf{\the\spacefactor}%
+        \unkern
+        \textsuperscript{\multfootsep}%
+        \spacefactor\@x at sf\relax
+    \fi
+% Sets the parnote mark (included as a MANDATORY argument)
+    \leavevmode
+    \ifhmode
+        % Save the spacefactor, like \footnote
+        \edef\@x at sf{\the\spacefactor}%
+        \FN at mf@check
+        \nobreak
+    \fi
+    \parnotecusmarkfmt{#1}%
+    \FN at mf@prepare
+    \ifhmode\spacefactor\@x at sf\fi
+    \relax
+% Calls \PN at parnotes@real, if there are parnotes to set.
+    \unless\ifx\PN at text\@empty
+        \expandafter\PN at parnotes@real
+    \fi
 \def\PN at parnotes@real{%
     % We call \par later, so this avoids recursion with \PN at parnotes@auto
     \PN at inparnotestrue
-    %
-    % Get into vmode if we aren't already
-    %
-    \unless\ifvmode
-        \par
-    \fi
+    \unless\ifvmode\par\fi
     % Avoid page breaks between a paragraph and its parnotes
-    % \parnotefmt goes in a separate group to avoid having formatting
-    % commands and local redefinitions of \parnotemarkfmt contaminate the
-    % following paragraphs
     {\parnotefmt{\PN at text}\par}%
     \global\def\PN at text{}%
@@ -153,15 +249,6 @@
 {\PN at parnotes@auto} % At the environment's end, set any notes we've missed
-% If a user calls \parnotes, check that there are parnotes to set
-    \unless\ifx\PN at text\@empty
-        \expandafter\PN at parnotes@real
-    \fi
 % If autopn calls parnotes, check for nested environments, and that this
 % isn't a call to \par from within \PN at parnotes@real, AND that there are
 % parnotes to set
@@ -177,9 +264,19 @@
-% Reset both mark counters to 0
+% Set parnote counter to 1
-    \global\c at PN@t=\z@
-    \global\c at PN@n=\z@
+% A variant also clears \PN at text
+    \gdef\PN at text{}%
+    \parnotereset
+% A wrapper around \ref to provide formatted parnote references
+% Set parnote mark counter to 1 initially

Modified: trunk/Master/tlpkg/libexec/ctan2tds
--- trunk/Master/tlpkg/libexec/ctan2tds	2016-07-30 23:11:21 UTC (rev 41774)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2016-07-30 23:12:23 UTC (rev 41775)
@@ -2914,7 +2914,6 @@
  'latexmk'	 => '(sweave_|tex4ht-)latexmkrc',	# case-folding clash
  'numericplots'  => '.*\.m',                            # matlab
  'oinuit'        => 'cmssbxo10.tfm',                    # should not be here
- 'parnotes'      => 'PNmanual.pdf',                     # no source
  'pas-cours'     => '\.pdf$',                           # no source
  'pas-tableur'   => '\.pdf$',                           # no source
  'piechartmp'    => 'piechartmp.pdf',                   # no source

More information about the tex-live-commits mailing list