From c6f718451f35986fa822e0b82133b5b2a2a573ec Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 4 Oct 2022 19:56:48 +0000 Subject: letgut (4oct22) git-svn-id: svn://tug.org/texlive/trunk@64618 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/lualatex/letgut/CHANGELOG.md | 10 + Master/texmf-dist/doc/lualatex/letgut/README.md | 2 +- .../doc/lualatex/letgut/letgut-banner-code.pdf | Bin 154184 -> 154201 bytes .../doc/lualatex/letgut/letgut-banner-code.tex | 2 +- .../texmf-dist/doc/lualatex/letgut/letgut-code.pdf | Bin 690506 -> 702257 bytes .../texmf-dist/doc/lualatex/letgut/letgut-code.tex | 336 ++++++++++++--------- Master/texmf-dist/doc/lualatex/letgut/letgut.pdf | Bin 366699 -> 379438 bytes Master/texmf-dist/doc/lualatex/letgut/letgut.tex | 136 +++++++-- .../texmf-dist/doc/lualatex/letgut/localconf.tex | 24 +- 9 files changed, 344 insertions(+), 166 deletions(-) (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/lualatex/letgut/CHANGELOG.md b/Master/texmf-dist/doc/lualatex/letgut/CHANGELOG.md index 349dde36594..199e34455b4 100644 --- a/Master/texmf-dist/doc/lualatex/letgut/CHANGELOG.md +++ b/Master/texmf-dist/doc/lualatex/letgut/CHANGELOG.md @@ -7,6 +7,16 @@ Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.9.4] - 2022-10-03 + +### Added +- Command `\lettrenumber` that displays various Lettre numbers related to the one of the current issue. +- Options of `\lettre` and `\lettregut` that add various Lettre numbers related to the one of the current issue. +- Command `\Ucode` for points and names of Unicode characters. + +### Changed +- Documentation improved. + ## [0.9.3] - 2022-09-02 ### Changed diff --git a/Master/texmf-dist/doc/lualatex/letgut/README.md b/Master/texmf-dist/doc/lualatex/letgut/README.md index c37e4694241..e38b789e5e2 100644 --- a/Master/texmf-dist/doc/lualatex/letgut/README.md +++ b/Master/texmf-dist/doc/lualatex/letgut/README.md @@ -8,7 +8,7 @@ to the newsletter “La Lettre GUTenberg” of GUTenberg, the French TeX User Gr Release ------- -2022-09-02 v0.9.3 +2022-10-03 v0.9.4 Development ----------- diff --git a/Master/texmf-dist/doc/lualatex/letgut/letgut-banner-code.pdf b/Master/texmf-dist/doc/lualatex/letgut/letgut-banner-code.pdf index 89b12697a9a..b232420d44a 100644 Binary files a/Master/texmf-dist/doc/lualatex/letgut/letgut-banner-code.pdf and b/Master/texmf-dist/doc/lualatex/letgut/letgut-banner-code.pdf differ diff --git a/Master/texmf-dist/doc/lualatex/letgut/letgut-banner-code.tex b/Master/texmf-dist/doc/lualatex/letgut/letgut-banner-code.tex index 092b3254709..7f9347fdcf7 100644 --- a/Master/texmf-dist/doc/lualatex/letgut/letgut-banner-code.tex +++ b/Master/texmf-dist/doc/lualatex/letgut/letgut-banner-code.tex @@ -1,4 +1,4 @@ -% Created 2022-09-02 ven. 09:19 +% Created 2022-10-03 lun. 22:57 % Intended LaTeX compiler: lualatex \documentclass{letgut} \setmainfont{KpRoman} diff --git a/Master/texmf-dist/doc/lualatex/letgut/letgut-code.pdf b/Master/texmf-dist/doc/lualatex/letgut/letgut-code.pdf index ccb1faeda0c..1e8e46f2410 100644 Binary files a/Master/texmf-dist/doc/lualatex/letgut/letgut-code.pdf and b/Master/texmf-dist/doc/lualatex/letgut/letgut-code.pdf differ diff --git a/Master/texmf-dist/doc/lualatex/letgut/letgut-code.tex b/Master/texmf-dist/doc/lualatex/letgut/letgut-code.tex index 5cc97ca7858..11832131e89 100644 --- a/Master/texmf-dist/doc/lualatex/letgut/letgut-code.tex +++ b/Master/texmf-dist/doc/lualatex/letgut/letgut-code.tex @@ -1,4 +1,4 @@ -% Created 2022-09-02 ven. 09:19 +% Created 2022-10-03 lun. 22:57 % Intended LaTeX compiler: lualatex \documentclass{letgut} \setmainfont{KpRoman} @@ -14,8 +14,7 @@ \section{Identification} -\label{sec:org4c9ba67} - +\label{Identification-mn5g55h0jlj0} \begin{lstlisting} % This is file `letgut.cls', % generated with the Emacs Org-babel utility. @@ -46,8 +45,7 @@ \end{lstlisting} \section{Debugging} -\label{sec:org09b0cd2} - +\label{Debugging-846g55h0jlj0} \begin{lstlisting} % \RequirePackage[ % , check-declarations @@ -57,8 +55,7 @@ \end{lstlisting} \section{Implementation} -\label{sec:org59fbe1b} - +\label{Implementation-vy6g55h0jlj0} These document classes can only be used with \LaTeXe, so we make sure that an appropriate message is displayed when another \TeX{} format is used. @@ -89,16 +86,15 @@ Now, we can announce the class name and its version: \begin{lstlisting} \ProvidesExplClass{letgut} -{2022-03-17} -{0.9} +{2022-10-03} +{0.9.4} { Class for the newsletter “The GUTenberg Letter” } \end{lstlisting} \subsection{Messages} -\label{sec:org447090b} - +\label{ImplementationMessages-xg7g55h0jlj0} We specify the messages come from a class, which is letgut (see \url{https://github.com/latex3/latex3/issues/887}). @@ -157,8 +153,7 @@ Some messages are declared for future use. \end{lstlisting} \subsection{Engine checking} -\label{sec:org5711d86} - +\label{ImplementationEnginechecking-lz7g55h0jlj0} \begin{lstlisting} \sys_if_engine_luatex:F { \msg_fatal:nn{letgut}{Wrong~engine} @@ -166,11 +161,9 @@ Some messages are declared for future use. \end{lstlisting} \subsection{Declarations} -\label{sec:orga63e6a8} - +\label{ImplementationDeclarations-3j8g55h0jlj0} \subsubsection{Booleans} -\label{sec:orge5b5c6b} - +\label{ImplementationDeclarationsBooleans-s09g55h0jlj0} \begin{itemize} \item For testing the emptyness of the title. \begin{lstlisting} @@ -191,8 +184,7 @@ Some messages are declared for future use. \end{itemize} \subsubsection{Dimensions} -\label{sec:org61842b5} - +\label{ImplementationDeclarationsDimensions-gj9g55h0jlj0} \begin{itemize} \item Geometry of the document \begin{lstlisting} @@ -278,8 +270,7 @@ Some messages are declared for future use. \end{lstlisting} \subsubsection{Skips (lengths with rubber components)} -\label{sec:orgbda0ae2} - +\label{ImplementationDeclarationsSkipslengthswithrubbercomponents-a4ag55h0jlj0} The following skips, borrowed from the standard classes, are specified in \lstinline+ex+ unit, which depends on the font used and hence have to be specified after the class has been loaded; in fact, we postpone this at the end of the @@ -379,14 +370,13 @@ We close the \lstinline+\AddToHook{begindocument/before}+ argument. \subsubsection{Integers} -\label{sec:orgb3e9382} +\label{ImplementationDeclarationsIntegers-7pag55h0jlj0} \begin{lstlisting} \int_new:N \g__letgut_ltx_example_int \end{lstlisting} \subsubsection{Strings} -\label{sec:orgdd18dd8} - +\label{ImplementationDeclarationsStrings-t7bg55h0jlj0} \begin{lstlisting} \str_new:N \g__letgut_label_ltx_example_str \str_new:N \g__letgut_callout_label_ltx_example_str @@ -399,12 +389,10 @@ We close the \lstinline+\AddToHook{begindocument/before}+ argument. \end{lstlisting} \subsubsection{Token lists} -\label{sec:orgaf6d8ec} - +\label{ImplementationDeclarationsTokenlists-grbg55h0jlj0} \begin{enumerate} \item Constant ones -\label{sec:orgb1ea800} - +\label{ImplementationDeclarationsTokenlistsConstantones-obcg55h0jlj0} \begin{lstlisting} \tl_const:Nn \c__letgut_online_issn_tl { 2742-6149~ (version~ numérique) @@ -481,8 +469,7 @@ We close the \lstinline+\AddToHook{begindocument/before}+ argument. \end{lstlisting} \item Variables ones -\label{sec:org4c5e60d} - +\label{ImplementationDeclarationsTokenlistsVariablesones-pxcg55h0jlj0} \begin{lstlisting} \tl_new:N \g__letgut_mark_tl \tl_new:N \g__letgut_title_tl @@ -495,8 +482,7 @@ We close the \lstinline+\AddToHook{begindocument/before}+ argument. \end{enumerate} \subsubsection{Comma separated lists} -\label{sec:org158b7a3} - +\label{ImplementationDeclarationsCommaseparatedlists-vhdg55h0jlj0} \begin{lstlisting} \clist_new:N \g__letgut_pagecolor_clist \clist_const:Nn \c__letgut_default_pagecolor_screen_clist @@ -506,15 +492,13 @@ We close the \lstinline+\AddToHook{begindocument/before}+ argument. \end{lstlisting} \subsubsection{Sequences} -\label{sec:orgaa04440} - +\label{ImplementationDeclarationsSequences-m2eg55h0jlj0} \begin{lstlisting} \seq_new:N \l__letgut_first_last_names_items_seq \end{lstlisting} \subsection{Class options} -\label{sec:orgef3017c} - +\label{ImplementationClassoptions-4meg55h0jlj0} In order to provide class options, we load the \package{l3keys2e} which provides \LaTeXe{} option processing using \LaTeX3 keys: @@ -530,8 +514,7 @@ We define the 2 load time options for the target audience: \end{itemize} \subsection{Date handling} -\label{sec:org464c4b7} - +\label{ImplementationDatehandling-c5fg55h0jlj0} \begin{lstlisting} \int_new:N \g__letgut_date_month_int \int_new:N \g__letgut_date_year_int @@ -632,8 +615,7 @@ We define the 2 load time options for the target audience: \end{lstlisting} \subsection{Class and package loading} -\label{sec:orgbefd239} - +\label{ImplementationClassandpackageloading-aqfg55h0jlj0} The \letgutcls{} is based on the \lstinline+article+ class. It is by default two sided because of the alternating headers, and will by typeset with \lstinline+11pt+ as global font size. @@ -817,8 +799,7 @@ We close the \lstinline+\AddToHook{begindocument/before}+ argument. \end{lstlisting} \subsection{Settings for the loaded packages} -\label{sec:org5c102e6} - +\label{ImplementationSettingsfortheloadedpackages-cdgg55h0jlj0} \begin{itemize} \item We switch to the French typographic conventions for \package{siunitx}. \begin{lstlisting} @@ -1024,8 +1005,7 @@ We close the \lstinline+\AddToHook{begindocument/before}+ argument. \end{lstlisting} \subsection{Page color default settings} -\label{sec:orgbdbe3de} - +\label{ImplementationPagecolordefaultsettings-c1hg55h0jlj0} By default, the page color will be the one linked to the \lstinline+screen+ option. \begin{lstlisting} @@ -1035,8 +1015,7 @@ By default, the page color will be the one linked to the \lstinline+screen+ opti \end{lstlisting} \subsection{Options} -\label{sec:orgc4ef889} - +\label{ImplementationOptions-imhg55h0jlj0} We now define the options of the class: \begin{itemize} @@ -1115,8 +1094,7 @@ subparagraphs) detailed or not. \end{lstlisting} \subsection{Headers} -\label{sec:org0244c68} - +\label{ImplementationHeaders-78ig55h0jlj0} We now define the headers. \begin{itemize} @@ -1150,7 +1128,7 @@ in the header is made a little bit bigger. \end{itemize} \subsection{Marginal notes} -\label{sec:org56c8ec1} +\label{ImplementationMarginalnotes-1uig55h0jlj0} We want the marginal notes to be in the left margin. \begin{lstlisting} @@ -1158,8 +1136,7 @@ We want the marginal notes to be in the left margin. \end{lstlisting} \subsection{Table of contents} -\label{sec:org861e968} - +\label{ImplementationTableofcontents-rhjg55h0jlj0} The table of contents is customized: \begin{itemize} @@ -1208,8 +1185,7 @@ The table of contents is customized: \end{lstlisting} \subsection{Geometry of the document} -\label{sec:org282c9ab} - +\label{ImplementationGeometryofthedocument-mqkg55h0jlj0} \begin{lstlisting} \geometry{ asymmetric, @@ -1226,8 +1202,7 @@ The table of contents is customized: \end{lstlisting} \subsection{Alert box} -\label{sec:org1d5f02b} - +\label{ImplementationAlertbox-rblg55h0jlj0} \begin{lstlisting} \cs_new_protected:Nn \__letgut_alert_box:nn { @@ -1253,8 +1228,7 @@ The table of contents is customized: \end{lstlisting} \subsection{“Title” and marks} -\label{sec:org7f25fee} - +\label{ImplementationTitleandmarks-5ylg55h0jlj0} We redefine \lstinline+\@title+ in order to make it empty. Hence we can later test if the \lstinline+\title+ has been populated by the user (thanks to \lstinline+\title+) and, if so, we will (automatically) display on the first page and headers the provided @@ -1302,8 +1276,7 @@ The number is added only if it is \end{lstlisting} \subsection{First page handling} -\label{sec:org30496fe} - +\label{ImplementationFirstpagehandling-nmmg55h0jlj0} The first page is special as it should automatically contain certain elements: \begin{itemize} \item the banner, @@ -1562,8 +1535,7 @@ Membership reminder. \end{lstlisting} \subsection{Last page handling} -\label{sec:org4d6bc37} - +\label{ImplementationLastpagehandling-jbng55h0jlj0} The last page is special: it should automatically contain some informations about \gutenberg. @@ -1617,10 +1589,9 @@ the author(s) of the “Lettre”. \end{lstlisting} \subsection{Sections, subsections, etc.} -\label{sec:org4d2fa9d} - +\label{ImplementationSectionssubsectionsetc-vzng55h0jlj0} \subsubsection{Numbering} -\label{sec:orge3d86f9} +\label{ImplementationSectionssubsectionsetcNumbering-lmog55h0jlj0} We want all the sections to be unnumbered. \begin{lstlisting} @@ -1628,8 +1599,7 @@ We want all the sections to be unnumbered. \end{lstlisting} \subsubsection{Format} -\label{sec:org36330f3} - +\label{ImplementationSectionssubsectionsetcFormat-tapg55h0jlj0} \begin{itemize} \item We create the new level \lstinline+\title+ for the titles of the articles. They are displayed uppercased. @@ -1763,11 +1733,9 @@ rest is borrowed from the standard classes). \end{itemize} \subsection{Document commands} -\label{sec:orga7db03b} - +\label{ImplementationDocumentcommands-s1qg55h0jlj0} \subsubsection{Setup} -\label{sec:org35e852f} - +\label{ImplementationDocumentcommandsSetup-roqg55h0jlj0} We define the command that lets us specify the newsletter setup. \begin{lstlisting} @@ -1777,8 +1745,7 @@ We define the command that lets us specify the newsletter setup. \end{lstlisting} \subsubsection{For the rubric dedicated to new stuffs appeared on \acs{ctan}} -\label{sec:orga18e077} - +\label{ImplementationDocumentcommandsFortherubricdedicatedtonewstuffsappearedonacsctan-jerg55h0jlj0} \begin{itemize} \item We create a new type of list, dedicated to the new stuffs (classes, packages, etc.) on CTAN and similar to a description list (except the label provided in @@ -1829,8 +1796,7 @@ items are correct. \end{itemize} \subsubsection{Persons and authors} -\label{sec:org73bd77f} - +\label{ImplementationDocumentcommandsPersonsandauthors-h5sg55h0jlj0} For both persons and authors, the argument of: \begin{itemize} \item a single individual is given as: @@ -1939,8 +1905,7 @@ is splitted as a comma separated list. \end{lstlisting} \subsubsection{Horizontal rule} -\label{sec:orgc866c8e} - +\label{ImplementationDocumentcommandsHorizontalrule-8vsg55h0jlj0} \begin{lstlisting} \NewDocumentCommand {\separator} { } { \par @@ -1951,8 +1916,7 @@ is splitted as a comma separated list. \end{lstlisting} \subsubsection{Alert boxes} -\label{sec:org7e6600e} - +\label{ImplementationDocumentcommandsAlertboxes-ijtg55h0jlj0} \begin{lstlisting} \colorlet {letgut_default_alert_box_color} { \c__letgut_default_alert_box_color_tl @@ -1965,8 +1929,7 @@ is splitted as a comma separated list. \end{lstlisting} \subsubsection{Typesetting of packages, classes, files and softwares.} -\label{sec:orgaf32b00} - +\label{ImplementationDocumentcommandsTypesettingofpackagesclassesfilesandsoftwares-09ug55h0jlj0} The \lstinline+\c__letgut_httpsprefix_tl+ comes from: \url{https://github.com/latex3/hyperref/issues/188\#issuecomment-826302843}. @@ -2049,7 +2012,10 @@ We define the font switches dediacted to each of packages and classes \end{lstlisting} \subsubsection{Names, expressions, etc.} -\label{sec:org45141b1} +\label{ImplementationDocumentcommandsNamesexpressionsetc-11vg55h0jlj0} +We define here some commands for names and expressions that are likely to be +frequently used. The more the users will resort to these commands, the less +will be inconsistently typesetted these names and expressions. \begin{lstlisting} \NewExpandableDocumentCommand { \gutenberg } { } { @@ -2058,12 +2024,12 @@ We define the font switches dediacted to each of packages and classes \NewExpandableDocumentCommand { \gut } { } { \c__letgut_gutenberg_tl } -\NewExpandableDocumentCommand { \lettre } { } { - \c__letgut_Lettre_tl - } - \NewExpandableDocumentCommand { \lettregut } { } { - \lettre \c_space_tl \gutenberg - } +% \NewExpandableDocumentCommand { \lettre } { } { +% \c__letgut_Lettre_tl +% } +% \NewExpandableDocumentCommand { \lettregut } { } { +% \lettre \c_space_tl \gutenberg +% } \NewExpandableDocumentCommand { \Cahier } { } { \c__letgut_cahier_tl } @@ -2111,9 +2077,106 @@ We define the font switches dediacted to each of packages and classes } \end{lstlisting} -\subsubsection{Foreign locutions} -\label{sec:org32f4b23} +We define the command \lstinline+\lettrenumber+ that displays the number of +some \lettre{} issue: + +\begin{itemize} +\item preceeded by “\no” if used starred, +\item by default the current one, +\item possibly shifted w.r.t. the current one, depending on the first token of the +optional argument: +\begin{itemize} +\item if it is not \lstinline+.+, \lstinline+++ nor \lstinline+-+: this argument (pretty useless: it is easier +to directly type the desired number), +\item if it is \lstinline+.+: the current number of the \lettre (pretty useless: it is +easier to just not use the optional argument), +\item if it is \lstinline+++ or \lstinline+-+ followed by a number: the current number of the \lettre, +shifted by what is specified. +\end{itemize} +\end{itemize} +\begin{lstlisting} +\cs_new_protected:Npn \__letgut_get_lettre_number:n #1 +{ + \tl_if_empty:nTF {#1}{ + \int_use:N \g__letgut_number_int + }{ + \tl_set:Nx \l_tmpa_tl {\tl_head:n { #1 }} + \tl_set:Nn \l_tmpb_tl { #1 } + \tl_case:NnF \l_tmpa_tl { + {\c__letgut_plus_tl} {\int_eval:n {\g__letgut_number_int\l_tmpa_tl\tl_range:Nnn \l_tmpb_tl { 2 } { -1 }}} + {\c__letgut_minus_tl} {\int_eval:n {\g__letgut_number_int\l_tmpa_tl\tl_range:Nnn \l_tmpb_tl { 2 } { -1 }}} + {\c__letgut_dot_tl} {\int_use:N \g__letgut_number_int} + } + {\l_tmpb_tl} + } +} +\NewDocumentCommand { \lettrenumber } { s O{} } { + \IfBooleanT{#1}{ + \no + } + \__letgut_get_lettre_number:n { #2 } +} +\end{lstlisting} + +The “\lettre” and “\lettregut” expressions are treated separately since they are +subject to variations, depending how they are used. The corresponding commands +\lstinline+\lettre+ and \lstinline+\lettregut+ used without star nor optional argument typeset +resp. “\lettre” and “\lettregut”: + +\begin{itemize} +\item immediately followed by “\no” if used starred, +\item followed by some strings, depending on the first token of their optional +argument: +\begin{itemize} +\item if it is not \lstinline+.+, \lstinline+++ nor \lstinline+-+: this argument, +\item if it is \lstinline+.+: the current number of the \lettre, +\item if it is \lstinline+++ or \lstinline+-+ followed by a number: the current number of the \lettre, +shifted by what is specified. +\end{itemize} +\end{itemize} + +\begin{lstlisting} +\tl_const:Nn \c__letgut_plus_tl { + } +\tl_const:Nn \c__letgut_minus_tl { - } +\tl_const:Nn \c__letgut_dot_tl { . } +\cs_new_protected:Npn \__letgut_lettre:nnn #1 #2 #3 +{ + \c__letgut_Lettre_tl #2 + \tl_if_empty:nF {#1} + { + #3 + \c_space_tl + \__letgut_get_lettre_number:n {#1} + } +} +\NewDocumentCommand { \lettre } { s O{} } { + \IfBooleanTF{#1}{ + \__letgut_lettre:nnn { #2 } { } { + \tl_if_empty:nF {#2}{ + \c_space_tl\no + } + } + }{ + \__letgut_lettre:nnn { #2 } { } { } + } +} +\NewDocumentCommand { \lettregut } { s O{} } { + \IfBooleanTF{#1}{ + \__letgut_lettre:nnn { #2 } { \c_space_tl \c__letgut_gutenberg_tl } { \c_space_tl\no } + }{ + \__letgut_lettre:nnn { #2 } { \c_space_tl \c__letgut_gutenberg_tl } { } + } +} +\end{lstlisting} + +The \lstinline+\lettre+ and \lstinline+\lettregut+ can be used in titles, sections, etc. (involving +bookmarks) but, because their last argument isn't a mandatory one, they would +have an inconsistent behavior if used with their star or their optional +argument (see \url{https://tex.stackexchange.com/q/427557/18401}). + +\subsubsection{Foreign locutions} +\label{ImplementationDocumentcommandsForeignlocutions-1svg55h0jlj0} \begin{lstlisting} \cs_new_protected:Npn \__letgut_emphasis:n #1 { @@ -2127,9 +2190,24 @@ We define the font switches dediacted to each of packages and classes } \end{lstlisting} -\subsubsection{Bookmarks handling} -\label{sec:org2ee5370} +\subsubsection{Unicode code points} +\label{ImplementationDocumentcommandsUnicodecodes-30lksfa0nlj0} +\begin{lstlisting} +\cs_new_protected:Npn \__letgut_unicode_code:nn #1 #2 +{ + U+\bgroup\addfontfeature{Numbers={Lining,Proportional}}#2\egroup + \tl_if_empty:nF {#1}{ + \c_space_tl + ({\addfontfeature{RawFeature={smcp,c2sc}}#1}) + } +} +\NewDocumentCommand { \Ucode } { O{} m } { + \__letgut_unicode_code:nn {#1}{#2} +} +\end{lstlisting} +\subsubsection{Bookmarks handling} +\label{ImplementationDocumentcommandsBookmarkshandling-zbxg55h0jlj0} We disabling some commands when their arguments have to go to bookmarks. \begin{lstlisting} @@ -2179,8 +2257,7 @@ We disabling some commands when their arguments have to go to bookmarks. \end{lstlisting} \subsubsection{Acronyms} -\label{sec:orgd329484} - +\label{ImplementationDocumentcommandsAcronyms-93yg55h0jlj0} The following command let us define acronyms. The arguments are as follows: \begin{itemize} \item \lstinline+#1+: optional argument that let us override the default settings of this @@ -2421,8 +2498,7 @@ is printed when used for the first time with \lstinline+\ac+). \end{lstlisting} \subsection{Bibliography} -\label{sec:orgc523238} - +\label{ImplementationBibliography-ruyg55h0jlj0} We want the \lstinline+\citeauthor+ command to display, not only the last, but the full name of the authors. @@ -2437,8 +2513,7 @@ full name of the authors. \end{lstlisting} \subsection{Book reviews} -\label{sec:org2fd9b20} - +\label{ImplementationBookreviews-ekzg55h0jlj0} \begin{lstlisting} \tl_new:N \g__letgut_bookreview_frontcover_tl \tl_new:N \g__letgut_bookreview_bibkey_tl @@ -2522,8 +2597,7 @@ extensions of the \lstinline+graphicx+ package. \end{lstlisting} \subsection{Keyboard keys} -\label{sec:org4c4b60b} - +\label{ImplementationKeyboardkeys-qa0h55h0jlj0} We make use of the Linux Biolinum Keyboard font and extend somehow the \lstinline+\LKey+ provided by the \package*{biolinum} in order to more easily write keyboard keys for usual characters on French keyboards. @@ -2573,8 +2647,7 @@ for usual characters on French keyboards. \end{lstlisting} \subsection{Miscellanous} -\label{sec:org562c2a3} - +\label{ImplementationMiscellanous-r11h55h0jlj0} \begin{itemize} \item We specify the possible hyphenations of \enquote{\gutenberg}. \end{itemize} @@ -2583,8 +2656,7 @@ for usual characters on French keyboards. \end{lstlisting} \subsubsection{ISSN} -\label{sec:org61c4abd} - +\label{ImplementationMiscellanousISSN-cr1h55h0jlj0} \begin{lstlisting} \cs_new_protected:Npn \__letgut_issn: { @@ -2600,8 +2672,7 @@ for usual characters on French keyboards. \end{lstlisting} \subsubsection{Non selectable text} -\label{sec:org00f0870} - +\label{ImplementationMiscellanousNonselectabletext-wh2h55h0jlj0} We create a control sequence that makes its argument not selectable in the PDF. This will be used notably for the line numbers of the listings and the watermarks. @@ -2613,8 +2684,7 @@ watermarks. \end{lstlisting} \subsubsection{Typesetting of code, etc.} -\label{sec:org371597a} - +\label{ImplementationMiscellanousTypesettingofcodeetc-f83h55h0jlj0} We provide a \lstinline+\meta+ macro that (poorly) mimics the one of the \package*{doc}. It is added at the very end of the preamble since other package that provide another definition of this macro may have been loaded @@ -2640,8 +2710,7 @@ package that provide another definition of this macro may have been loaded \end{lstlisting} \subsection{Listings} -\label{sec:orgf79a2c2} - +\label{ImplementationListings-514h55h0jlj0} We define a style for all the listings which resets all the \TeX{} control sequences and keywords, and fix some defaults. @@ -2725,8 +2794,7 @@ with the ones of the current file. \end{lstlisting} \subsubsection{\LaTeX{} listings and examples} -\label{sec:orga99a9b5} - +\label{ImplementationListingsLaTeXlistingsandexamples-xt4h55h0jlj0} We define the colors for the syntax highlighting of \LaTeX{} listings. \begin{lstlisting} @@ -3155,8 +3223,7 @@ time a new one is asked. \end{lstlisting} \subsubsection{Terminal listings} -\label{sec:org14731c9} - +\label{ImplementationListingsTerminallistings-fq5h55h0jlj0} We define a command dedicated to terminal stdin and stdout. \begin{lstlisting} @@ -3389,8 +3456,7 @@ We close the \lstinline+\AddToHook{begindocument/before}+ argument. \end{lstlisting} \subsubsection{Unicode characters with positions above 256} -\label{sec:org4b9a54d} - +\label{ImplementationListingsUnicodecharacterswithpositionsabove256-4l6h55h0jlj0} Unicode characters with positions above 256 causes troubles in listings. Here is a workaround for some of them (see \url{https://tex.stackexchange.com/a/25396}). @@ -3415,8 +3481,7 @@ listings. Here is a workaround for some of them (see \end{lstlisting} \subsection{Local config file} -\label{sec:orgcc0dfe6} - +\label{ImplementationLocalconfigfile-me7h55h0jlj0} Each issue of the Lettre requires certain local configurations: configuration dedicated to the issue in question, particular packages used in the articles, specific configurations of the \package*{listings}, etc. In order to not clutter @@ -3428,8 +3493,10 @@ at its beginning. \begin{lstlisting} \file_if_exist:nT {./\c__letgut_local_config_file_tl}{ - \use:n { \ExplSyntaxOff \file_input:n {./\c__letgut_local_config_file_tl} } - \ExplSyntaxOn + \@pushfilename + \xdef\@currname{\c__letgut_local_config_file_tl} + \file_input:n {./\c__letgut_local_config_file_tl} + \@popfilename } \end{lstlisting} @@ -3445,8 +3512,7 @@ We don't want the book review entry types to be listed in the bibliography \end{lstlisting} \section{(biblatex) Data model} -\label{sec:org7f2c4f3} - +\label{biblatexDatamodel-vx7h55h0jlj0} We give the (\package{biblatex}) data model that enriches the default one for several purposes: \begin{itemize} @@ -3455,7 +3521,7 @@ several purposes: \end{itemize} \begin{lstlisting} -\ProvidesFile{letgut.lbx}[2022-09-02 v0.9.3 letgut localization] +\ProvidesFile{letgut.lbx}[2022-10-03 v0.9.4 letgut localization] \InheritBibliographyExtras{french} \DeclareBibliographyStrings{ inherit = {french}, @@ -3469,7 +3535,7 @@ We create the new bibliography driver \lstinline+bookreview+ (that seems to create the corresponding new entry). \begin{lstlisting} -\ProvidesFile{letgut.dbx}[2022-09-02 v0.9.3 letgut data model macros] +\ProvidesFile{letgut.dbx}[2022-10-03 v0.9.4 letgut data model macros] \DeclareBibliographyDriver{bookreview}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -3524,7 +3590,7 @@ create the corresponding new entry). We provide a specific \lstinline+biblatex+ citation style . \begin{lstlisting} -\ProvidesFile{letgut.cbx}[2022-09-02 v0.9.3 letgut base citation style] +\ProvidesFile{letgut.cbx}[2022-10-03 v0.9.4 letgut base citation style] \RequireCitationStyle{numeric} \end{lstlisting} @@ -3554,11 +3620,9 @@ well\ldots{} \end{lstlisting} \section{Provided files} -\label{sec:org8352527} - +\label{Providedfiles-g09h55h0jlj0} \subsection{Example file of an issue of the newsletter} -\label{sec:orgcce26ed} - +\label{ProvidedfilesExamplefileofanissueofthenewsletter-ak9h55h0jlj0} \begin{lstlisting} % Hey, Emacs! This is a -*- mode: latex -*- file! @@ -3650,8 +3714,7 @@ well\ldots{} \end{lstlisting} \subsection{Example of an editorial} -\label{sec:org1dc0753} - +\label{ProvidedfilesExampleofaneditorial-06ah55h0jlj0} \begin{lstlisting} Ceci est un intéressant éditorial de la \lettregut{} dans lequel on peut causer de l'\ag{} et du \ca{} @@ -3670,8 +3733,7 @@ de l'association. Il peut aussi y être question du \ctan. \end{lstlisting} \subsection{Informations about \gutenberg} -\label{sec:org7df48b2} - +\label{ProvidedfilesInformationsabout\gutenberg-hqah55h0jlj0} \begin{lstlisting} % Hey, Emacs! This is a -*- mode: latex -*- file! @@ -3705,7 +3767,7 @@ de l'association. Il peut aussi y être question du \ctan. \item[le site \hologo{TeX}nique de questions et réponses :] \url{https://texnique.fr/} \item[la foire aux questions :] - \url{https://faq.gutenberg.eu.org} + \url{https://faq.gutenberg-asso.fr/} \end{description} \end{description} % @@ -3830,8 +3892,7 @@ Les règlements peuvent s'effectuer par : \end{lstlisting} \subsection{Acronyms} -\label{sec:orgd354b5f} - +\label{ProvidedfilesAcronyms-8cbh55h0jlj0} \begin{lstlisting} % Hey, Emacs! This is a -*- mode: latex -*- file! @@ -4127,8 +4188,7 @@ Les règlements peuvent s'effectuer par : \end{lstlisting} \subsection{Language driver file} -\label{sec:orgc985cc3} - +\label{ProvidedfilesLanguagedriverfile-4cch55h0jlj0} \begin{lstlisting} % \lst@definelanguage[...]{TeX}{% % % Control sequences names @@ -4171,7 +4231,7 @@ Les règlements peuvent s'effectuer par : package,package*,class,class*,software,software*,file,file*,% foreignloc,latinloc,gutenberg,gut,lettre,lettregut,Cahier,% Cahiers,letgut,letgutcls,knuth,lamport,tugboat,item*,letgutacro,% - separator,alertbox,terminal,inputarticle,% + separator,alertbox,terminal,inputarticle,lettrenumber,% },% % Keywords of class 1 : keywords that contain other characters (since % of the same class as the ones specified as 'otherkeywords') diff --git a/Master/texmf-dist/doc/lualatex/letgut/letgut.pdf b/Master/texmf-dist/doc/lualatex/letgut/letgut.pdf index e722117da87..23f2bf4091c 100644 Binary files a/Master/texmf-dist/doc/lualatex/letgut/letgut.pdf and b/Master/texmf-dist/doc/lualatex/letgut/letgut.pdf differ diff --git a/Master/texmf-dist/doc/lualatex/letgut/letgut.tex b/Master/texmf-dist/doc/lualatex/letgut/letgut.tex index 5069d572376..91006a60ea8 100644 --- a/Master/texmf-dist/doc/lualatex/letgut/letgut.tex +++ b/Master/texmf-dist/doc/lualatex/letgut/letgut.tex @@ -67,7 +67,7 @@ } \author{Association GUTenberg} \date{% - Version 0.9.3 en date du \today% + Version 0.9.4 en date du \today% \texorpdfstring{% \\ \url{https://framagit.org/gutenberg/letgut}% @@ -359,8 +359,8 @@ Les options de la \letgutcls{} peuvent être spécifiées de deux façons : D'autres options peuvent être passées à la \letgutcls{}. Il est ainsi possible de faire usage de langues du \package*{babel}, autres que le français et l'anglais déjà chargées par \letgut{}, en les stipulant en option de -\docAuxCommand{documentclass} et en les employant selon la syntaxe du -\package*{babel}. +\docAuxCommand{documentclass} et en les employant selon la syntaxe de ce +package. \section{Titre et titres courants} \label{sec:titre} @@ -540,7 +540,8 @@ Les articles de la \lettre{} sont émaillés de concepts (packages ou classes récurrente. Aussi des commandes spécifiques sont-elles prévues de façon à en faciliter la saisie et à en homogénéiser la mise en forme. -\subsection{Packages et classes, logiciels, fichiers, locutions étrangères} +\subsection{Packages et classes, logiciels, fichiers, locutions étrangères, + points de code Unicode} \label{sec:classes-packages-et} \begin{docCommands} @@ -647,6 +648,16 @@ Attention aux \foreignloc{load-time options} ! Mais... \latinloc{errare humanum est}. \end{ltx-code-result} +\begin{docCommand}{Ucode}{\oarg{nom}\marg{point de code}} + Cette commande est conçue pour afficher le \meta{point de code} et + éventuellement le \meta{nom} d'un caractère Unicode sous la forme + \enquote{U+\meta{point de code} (\meta{\textsc{nom}})}. +\end{docCommand} + +\begin{ltx-code-result}[title addon=Point de code d'un caractère Unicode,listing options app={deletekeywords={[3]{options}}}] +Unicode a prévu le caractère \Ucode[symbole numéro]{2116}. +\end{ltx-code-result} + \subsection{Termes et expressions} \label{sec:termes} @@ -654,8 +665,8 @@ Mais... \latinloc{errare humanum est}. { { doc name = gutenberg }, { doc name = gut }, - { doc name = lettre }, - { doc name = lettregut }, + % { doc name = lettre }, + % { doc name = lettregut }, { doc name = cahier }, { doc name = cahiers }, { doc name = cahiergut }, @@ -678,23 +689,23 @@ Mais... \latinloc{errare humanum est}. \centering \begin{tabular}{ll} \toprule - \refCom{gutenberg} & \gutenberg \\ - \refCom{gut} & \gut \\ - \refCom{lettre} & \lettre \\ - \refCom{lettregut} & \lettregut \\ - \refCom{cahier} & \cahier \\ - \refCom{cahiergut} & \cahiergut \\ - \refCom{cahiers} & \cahiers \\ - \refCom{cahiersgut} & \cahiersgut \\ \midrule - \refCom{letgut} & \letgut \\ - \refCom{letgutcls} & \letgutcls \\ \midrule - \refCom{knuth} & \knuth \\ - \refCom{lamport} & \lamport \\ - \refCom{tl} & \tl \\ - \refCom{tugboat} & \tugboat \\ \midrule - \refCom{linux} & \linux \\ - \refCom{macos} & \macos \\ - \refCom{windows} & \windows \\ \bottomrule + \refCom{gutenberg} & \gutenberg \\ + \refCom{gut} & \gut \\ + % \refCom{lettre} & \lettre \\ + % \refCom{lettregut} & \lettregut \\ + \refCom{cahier} & \cahier \\ + \refCom{cahiergut} & \cahiergut \\ + \refCom{cahiers} & \cahiers \\ + \refCom{cahiersgut} & \cahiersgut \\ \midrule + \refCom{letgut} & \letgut \\ + \refCom{letgutcls} & \letgutcls \\ \midrule + \refCom{knuth} & \knuth \\ + \refCom{lamport} & \lamport \\ + \refCom{tl} & \tl \\ + \refCom{tugboat} & \tugboat \\ \midrule + \refCom{linux} & \linux \\ + \refCom{macos} & \macos \\ + \refCom{windows} & \windows \\ \bottomrule \end{tabular} \caption{Effet des commandes de raccourcis} \label{tab:raccourcis} @@ -717,6 +728,83 @@ de \docAuxCommand{section}% (préfixe pas en grandes capitales). \end{dbwarning} +\begin{docCommands}[ + doc new=2022-10-03, + doc name=lettrenumber, + doc parameter = \oarg{entier relatif signé} + ] + { + { }, + { doc name=lettrenumber* }, + } + \index{configuration}% + Cette commande affiche le numéro de la \lettre{} : + \begin{description} + \item[en cours] si l'argument optionnel n'est pas employé ; + \item[décalé de celui en cours] de l'\meta{entier relatif + signé}\footnote{\label{entier-signe}C.-à-d. un \enquote{plus} ou un + \enquote{moins} (\lstinline|+| ou \lstinline|-|) suivi d'un nombre + entier.} spécifié sinon. + \end{description} + En version étoilée, la chaîne \enquote{\no{}} précède ce numéro. +\end{docCommands} + +\ExplSyntaxOn +\int_gset:Nn \g__letgut_number_int {46} +\ExplSyntaxOff + +\begin{ltx-code-result}[title addon=emploi de la commande \refCom{lettrenumber},listing options app={deletekeywords={[6]{cours,lettre}}}] +Si le numéro de la \lettre{} en cours est 46, celui de la \lettre +\begin{enumerate} +\item en cours est \lettrenumber ; +\item en cours est le \lettrenumber* ; +\item suivante est \lettrenumber[+1] ; +\item précédente est le \lettrenumber*[-1]. +\end{enumerate} +\end{ltx-code-result} + +\begin{docCommands}[] + { + { doc name = lettre }, + { doc name = lettre, doc new=2022-10-03, doc parameter = \oarg{argument optionnel} }, + { doc name = lettre*, doc new=2022-10-03, doc parameter = \oarg{argument optionnel} }, + { doc name = lettregut }, + { doc name = lettregut, doc new=2022-10-03, doc parameter = \oarg{argument optionnel} }, + { doc name = lettregut*, doc new=2022-10-03, doc parameter = \oarg{argument optionnel} }, + } + % + Ces commandes affichent les chaînes de caractères respectivement + \enquote{\lettre} et \enquote{\lettregut}, le cas échéant suivies du numéro + de la \lettre{} : + \begin{description} + \item[en cours] si l'\meta{argument optionnel} est un point (⅛.⅛) ; + \item[décalé de celui en cours] de ce qui est spécifié si l'\meta{argument optionnel} est un + entier relatif signé\footref{entier-signe} ; + \item[spécifié] si l'\meta{argument optionnel} est autre. + \end{description} + En version étoilée, la chaîne \enquote{\no{}} précède le numéro (seulement si + l'\meta{argument optionnel} est employé). +\end{docCommands} + +\begin{ltx-code-result}[title addon=emplois des commandes \refCom{lettre} et \refCom{lettregut},listing options app={deletekeywords={[6]{cours,lettre}}}] +Si le numéro de la \lettre{} en cours est 46, on a : +\begin{enumerate} +\item \lettre +\item \lettre[.] +\item \lettre[+10] +\item \lettre[-10] +\item \lettre[43] +\item \lettre[coucou] +\item \lettre*[.] +\item \lettre*[+10] +\item \lettre*[-10] +\item \lettre*[43] +\item \lettre* +\end{enumerate} +On fait usage de ces commandes +dans la \lettregut*[.]. +\end{ltx-code-result} + \subsection{Touches de clavier} \label{sec:touches-de-clavier} @@ -1741,7 +1829,7 @@ listing options app={deletekeywords={[4]{ \item commandes ; \item environnements ; \item clés ; - \item valeurs de clé ; + \item valeurs de clé. \end{itemize} }% % \renewcommand{\indexname}{Index des commandes} diff --git a/Master/texmf-dist/doc/lualatex/letgut/localconf.tex b/Master/texmf-dist/doc/lualatex/letgut/localconf.tex index 32eab1c21eb..af0c9ecd5ee 100644 --- a/Master/texmf-dist/doc/lualatex/letgut/localconf.tex +++ b/Master/texmf-dist/doc/lualatex/letgut/localconf.tex @@ -4,6 +4,8 @@ % Pour l'index \usepackage[imakeidx]{xindex} \makeindex +\indexsetup{level=\title,toclevel=title,firstpagestyle=fancy} + % Commande sans laquelle les numéros de pages de l'index ne seraient pas des % hyperliens \DeclareHookRule{env/document/begin}{xindex}{before}{hyperref} @@ -61,11 +63,22 @@ keywords~ bold=false }% +% Redéfinition de commande pour que les mentions des nouveautés et mises à jour +% ne dépassent pas dans la marge +\renewcommand{\tcbdocmarginnote}[2][]{% + \marginnote{% + \begin{tcolorbox}[enhanced~ jigsaw,size=fbox,boxrule=1pt,leftrule=0pt,rightrule=0pt, + arc=0pt,outer~ arc=1pt,boxsep=1pt,top=1pt,bottom=1pt, + nobeforeafter,width=\c__letgut_hoffset_dim-\marginparsep, + colframe=red!50!white,colback=red!25!yellow!5!white,fontupper=\scriptsize, + if~ odd~ page~ or~ oneside={flushright~ upper}{flushleft~ upper}, + doc@marginnote,#1]#2\end{tcolorbox}}} + \renewcommand*{\tcbdocnew}[1]{ \scriptsize\sffamily\textcolor{green!50!black}{\bfseries -Nouv. :} #1} +Nouv. :~} #1} \renewcommand*{\tcbdocupdated}[1]{\scriptsize\sffamily\textcolor{blue!75!black}{\bfseries -\textsc{m.-à-j.} :} #1} +\textsc{m.-à-j.} :~} #1} % \NewDocumentCommand \valinit { o } @@ -133,6 +146,13 @@ Nouv. :} #1} % \ExplSyntaxOff +% Nous voulons que les notes marginales soient toujours dans la marge de +% gauche : +\makeatletter +\patchcmd{\@mn@@@marginnote}{\begingroup}{\begingroup\@twosidefalse}{}{\fail} +\reversemarginpar +\makeatother + %%% Local Variables: %%% mode: latex -- cgit v1.2.3