texlive[63160] Master/texmf-dist: postnotes (27apr22)

commits+karl at tug.org commits+karl at tug.org
Wed Apr 27 21:39:01 CEST 2022


Revision: 63160
          http://tug.org/svn/texlive?view=revision&revision=63160
Author:   karl
Date:     2022-04-27 21:39:01 +0200 (Wed, 27 Apr 2022)
Log Message:
-----------
postnotes (27apr22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/postnotes/postnotes-code.pdf
    trunk/Master/texmf-dist/doc/latex/postnotes/postnotes.pdf
    trunk/Master/texmf-dist/doc/latex/postnotes/postnotes.tex
    trunk/Master/texmf-dist/source/latex/postnotes/postnotes.dtx
    trunk/Master/texmf-dist/tex/latex/postnotes/postnotes.sty

Modified: trunk/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md	2022-04-27 19:38:45 UTC (rev 63159)
+++ trunk/Master/texmf-dist/doc/latex/postnotes/CHANGELOG.md	2022-04-27 19:39:01 UTC (rev 63160)
@@ -1,7 +1,15 @@
 # Changelog
 
-## [Unreleased](https://github.com/gusbrs/postnotes/compare/v0.1.1...HEAD)
+## [Unreleased](https://github.com/gusbrs/postnotes/compare/v0.1.2...HEAD)
 
+## [v0.1.2](https://github.com/gusbrs/postnotes/compare/v0.1.1...v0.1.2) (2022-04-27)
+
+### Added
+- `\postnotesectionx`, a version of `\postnotesection` which expands the
+  content in place.
+- French localization (see issue
+  [#1](https://github.com/gusbrs/postnotes/issues/1)).
+
 ## [v0.1.1](https://github.com/gusbrs/postnotes/compare/v0.1.0...v0.1.1) (2022-04-21)
 
 ### Fixed

Modified: trunk/Master/texmf-dist/doc/latex/postnotes/postnotes-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/postnotes/postnotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/postnotes/postnotes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/postnotes/postnotes.tex	2022-04-27 19:38:45 UTC (rev 63159)
+++ trunk/Master/texmf-dist/doc/latex/postnotes/postnotes.tex	2022-04-27 19:39:01 UTC (rev 63160)
@@ -278,7 +278,10 @@
 where it occurs, at the point the notes are printed by \cs{printpostnotes}.
 For more details and some examples, see \zcref{sec:notes-sections}.  Its
 \meta{options} are presented in \zcref{sec:options},
-\zcref[ref=title,noname]{sec:section-options}.
+\zcref[ref=title,noname]{sec:section-options}.  A \cs{postnotesectionx} is
+also provided which expands \meta{text} in place (\texttt{x}-type expansion)
+before storing it (differently from \cs{postnotesection} which stores
+\meta{text} with ``no manipulation'').
 
 \begin{function}{\printpostnotes}
   \begin{syntax}
@@ -525,33 +528,35 @@
 expanded in place, but rather stored with ``no manipulation'' to be typeset
 later at \cs{printpostnotes}.  For this reason, some contextual information is
 stored at the place \cs{postnotesection} is called, and made available at the
-point it's content gets expanded by means of some variables.  When the content
-of a notes section gets typeset, \cs{pnthechapter} contains the value of
-\cs{thechapter} where \cs{postnotesection} was originally called.  Similarly,
-\cs{pnthesection} contains the value of \cs{thesection}.
-\cs{pnthechapternextnote} and \cs{pnthesectionnextnote} are meant to support
-the automation of the notes subdivision by using hooks to sectioning commands,
-which is a quite natural way to do this.  However, since it may be problematic
-to hook \emph{after} sectioning commands -- \cs{section}, for example, figures
-prominently in the documentation of \pkg{ltcmdhooks} as a case of ``look
-ahead'' command for which the \texttt{after} hook is not supported -- we will
-typically want to hook \emph{before} them.  But, at this point the values of
-the \texttt{chapter} or \texttt{section} counters have not yet been stepped,
-therefore \cs{thechapter} and \cs{thesection} do not correspond to what we
-would like to refer to.  For this reason, \cs{pnthechapternextnote} contains
-the value of \cs{thechapter} at the point the ``next note'' is placed (a
-\cs{postnote}, that is), the first in the chapter, and already inside it, thus
-with an expected value of the \texttt{chapter} counter.  Similarly,
-\cs{pnthesectionnextnote} contains the value of \cs{thesection} for the ``next
-note''.  Of course, the ``next note'' variables are \emph{proxies}, but they
-are meant to support the automation of the subdivision of the notes through
-the use of \texttt{before} hooks to the document's sectioning commands, in
-which case the subdivision of the notes will correspond to the document's
-structure and, given empty notes sections are skipped, the values will be the
-ones we are interested in.  But more complex use cases may require something
-different.  Either way, it is up to the user to judge whether the \emph{proxy}
-is a good one for their use case, the variables just do what they say, and
-contain the values of interest for the ``next note''.
+point it's content gets expanded by means of some variables (you can use
+\cs{postnotesectionx} instead, in which case these variables are of little
+use).  When the content of a notes section gets typeset, \cs{pnthechapter}
+contains the value of \cs{thechapter} where \cs{postnotesection} was
+originally called.  Similarly, \cs{pnthesection} contains the value of
+\cs{thesection}.  \cs{pnthechapternextnote} and \cs{pnthesectionnextnote} are
+meant to support the automation of the notes subdivision by using hooks to
+sectioning commands, which is a quite natural way to do this.  However, since
+it may be problematic to hook \emph{after} sectioning commands --
+\cs{section}, for example, figures prominently in the documentation of
+\pkg{ltcmdhooks} as a case of ``look ahead'' command for which the
+\texttt{after} hook is not supported -- we will typically want to hook
+\emph{before} them.  But, at this point the values of the \texttt{chapter} or
+\texttt{section} counters have not yet been stepped, therefore \cs{thechapter}
+and \cs{thesection} do not correspond to what we would like to refer to.  For
+this reason, \cs{pnthechapternextnote} contains the value of \cs{thechapter}
+at the point the ``next note'' is placed (a \cs{postnote}, that is), the first
+in the chapter, and already inside it, thus with an expected value of the
+\texttt{chapter} counter.  Similarly, \cs{pnthesectionnextnote} contains the
+value of \cs{thesection} for the ``next note''.  Of course, the ``next note''
+variables are \emph{proxies}, but they are meant to support the automation of
+the subdivision of the notes through the use of \texttt{before} hooks to the
+document's sectioning commands, in which case the subdivision of the notes
+will correspond to the document's structure and, given empty notes sections
+are skipped, the values will be the ones we are interested in.  But more
+complex use cases may require something different.  Either way, it is up to
+the user to judge whether the \emph{proxy} is a good one for their use case,
+the variables just do what they say, and contain the values of interest for
+the ``next note''.
 
 This is meant to be simple.  Some examples might make things more concrete.
 At its most basic, \cs{postnotesection} can just be set manually:
@@ -820,9 +825,9 @@
 
 These strings will automatically adjust to the document language, set either
 by \pkg{babel} or by \pkg{polyglossia}, \emph{if} the language is supported by
-\pkg{postnotes}.  Currently supported are English and Portuguese, and their
-variants.  Either way, you can always change these variables to the values of
-your preference.  If you are not using either \pkg{babel} or
+\pkg{postnotes}.  Currently supported are English, French, Portuguese, and
+their variants.  Either way, you can always change these variables to the
+values of your preference.  If you are not using either \pkg{babel} or
 \pkg{polyglossia}, you can do so directly, for example, with:
 \begin{pnsnippet}
 \renewcommand*{\pntitle}{My title}
@@ -953,6 +958,10 @@
   and Moritz Wemheuer.
   % 2022-04-05: https://tex.stackexchange.com/q/597359#comment1594585_597389
 
+The package's language support have been provided or improved thanks to:
+  `\texttt{Pika78}' (French).
+  % 2022-04-25: https://github.com/gusbrs/postnotes/issues/1#issuecomment-1108634938
+
 If I have inadvertently left anyone off the list I apologize, and please let
 me know, so that I can correct the oversight.
 

Modified: trunk/Master/texmf-dist/source/latex/postnotes/postnotes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/postnotes/postnotes.dtx	2022-04-27 19:38:45 UTC (rev 63159)
+++ trunk/Master/texmf-dist/source/latex/postnotes/postnotes.dtx	2022-04-27 19:39:01 UTC (rev 63160)
@@ -147,7 +147,7 @@
 %
 %
 %    \begin{macrocode}
-\ProvidesExplPackage {postnotes} {2022-04-21} {0.1.1}
+\ProvidesExplPackage {postnotes} {2022-04-27} {0.1.2}
   {Endnotes for LaTeX}
 %    \end{macrocode}
 %
@@ -1064,14 +1064,21 @@
 %
 % \section{\cs{postnotesection}}
 %
-% \begin{macro}[int]{\postnotesection}
-%   Provide \cs{postnotesection}.
+% \begin{macro}[int]
+%   {
+%     \postnotesection ,
+%     \postnotesectionx ,
+%   }
+%   Provide \cs{postnotesection} and \cs{postnotesectionx}.
 %   \begin{syntax}
 %     \cs{postnotesection}\oarg{options}\marg{section content}
+%     \cs{postnotesectionx}\oarg{options}\marg{section content}
 %   \end{syntax}
 %    \begin{macrocode}
 \NewDocumentCommand \postnotesection { O { } +m }
   { \@@_section:nn {#1} {#2} }
+\NewDocumentCommand \postnotesectionx { O { } +m }
+  { \@@_section:nx {#1} {#2} }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1093,6 +1100,7 @@
     \@@_store_section:nn { \l_@@_note_id_tl } {#2}
     \group_end:
   }
+\cs_generate_variant:Nn \@@_section:nn { nx }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1458,9 +1466,9 @@
 % must have been stored with the \cs{l_@@_maybe_multi_bool} set to
 % \texttt{true}, which is then saved in the \texttt{multibool} property.  One
 % implication of this procedure is that, if there are any new notes marked as
-% \texttt{multibool}, (at least) three rounds of compilation will be needed,
-% since the labels of the printed notes will be written only on the second run
-% and the document will thus require a third one to stabilize.
+% \texttt{multibool}, three rounds of compilation will be needed, since the
+% labels of the printed notes will be written only on the second run and the
+% document will thus require a third one to stabilize.
 %
 % \begin{macro}{\@@_verify_multipass:N}
 %   \begin{syntax}
@@ -1940,10 +1948,10 @@
 % From the user's perspective, one-line captions will just work.  For two-line
 % captions, there are two alternatives: i) decrement the counter by 1
 % \texttt{\textbackslash{}addtocounter\{postnote\}\{-1\}} before the caption,
-% then call \cs{postnote} inside the caption; or ii) call
-% \texttt{\textbackslash{}postnote[nomark]\{\textbackslash{}label\{mynote\}...\}}
-% right before the caption, then use
-% \texttt{\textbackslash{}postnoteref\{mynote\}} inside the caption.
+% then call \cs{postnote} inside the caption; or ii) right before the caption,
+% call
+% \texttt{\textbackslash{}postnote[nomark]\{\textbackslash{}label\{mynote\}...\}},
+% then use \texttt{\textbackslash{}postnoteref\{mynote\}} inside the caption.
 %
 %    \begin{macrocode}
 \AddToHook { postnotes/note/begin } [ postnotes ]
@@ -2577,7 +2585,28 @@
 %    \end{macrocode}
 %
 %
+% \subsection*{French}
+%
+% French localization validated by \texttt{Pika78} at \githubissue{1}.
+%
 %    \begin{macrocode}
+\@@_define_language:nn { french }
+  {
+    \tl_set:Nn \pntitle     { Notes }
+    \tl_set:Nn \pnhdnotes   { Notes }
+    \tl_set:Nn \pnhdtopage  { de~la~page }
+    \tl_set:Nn \pnhdtopages { des~pages }
+  }
+\@@_set_babel_language:nn { french }   { french }
+\@@_set_babel_language:nn { acadian }  { french }
+\@@_set_babel_language:nn { canadien } { french }
+\@@_set_babel_language:nn { francais } { french }
+\@@_set_babel_language:nn { frenchb }  { french }
+\@@_set_polyglossia_language:nn { french } { french }
+%    \end{macrocode}
+%
+%
+%    \begin{macrocode}
 %</package>
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/tex/latex/postnotes/postnotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/postnotes/postnotes.sty	2022-04-27 19:38:45 UTC (rev 63159)
+++ trunk/Master/texmf-dist/tex/latex/postnotes/postnotes.sty	2022-04-27 19:39:01 UTC (rev 63160)
@@ -53,7 +53,7 @@
       }%
     \endinput
   }%
-\ProvidesExplPackage {postnotes} {2022-04-21} {0.1.1}
+\ProvidesExplPackage {postnotes} {2022-04-27} {0.1.2}
   {Endnotes for LaTeX}
 \cs_new:Npn \__postnotes_data_name:n #1
   { g__postnotes_ #1 _data_prop }
@@ -491,6 +491,8 @@
   }
 \NewDocumentCommand \postnotesection { O { } +m }
   { \__postnotes_section:nn {#1} {#2} }
+\NewDocumentCommand \postnotesectionx { O { } +m }
+  { \__postnotes_section:nx {#1} {#2} }
 \int_new:N \g__postnotes_sectid_int
 \cs_new_protected:Npn \__postnotes_section:nn #1#2
   {
@@ -503,6 +505,7 @@
     \__postnotes_store_section:nn { \l__postnotes_note_id_tl } {#2}
     \group_end:
   }
+\cs_generate_variant:Nn \__postnotes_section:nn { nx }
 \tl_new:N \g__postnotes_section_name_tl
 \keys_define:nn { postnotes/section }
   {
@@ -1207,6 +1210,19 @@
 \__postnotes_set_babel_language:nn { portuges }   { portuguese }
 \__postnotes_set_babel_language:nn { brazil }     { portuguese }
 \__postnotes_set_polyglossia_language:nn { portuguese } { portuguese }
+\__postnotes_define_language:nn { french }
+  {
+    \tl_set:Nn \pntitle     { Notes }
+    \tl_set:Nn \pnhdnotes   { Notes }
+    \tl_set:Nn \pnhdtopage  { de~la~page }
+    \tl_set:Nn \pnhdtopages { des~pages }
+  }
+\__postnotes_set_babel_language:nn { french }   { french }
+\__postnotes_set_babel_language:nn { acadian }  { french }
+\__postnotes_set_babel_language:nn { canadien } { french }
+\__postnotes_set_babel_language:nn { francais } { french }
+\__postnotes_set_babel_language:nn { frenchb }  { french }
+\__postnotes_set_polyglossia_language:nn { french } { french }
 %% 
 %%
 %% End of file `postnotes.sty'.



More information about the tex-live-commits mailing list.