diff options
author | Karl Berry <karl@freefriends.org> | 2022-10-04 19:56:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-10-04 19:56:48 +0000 |
commit | c6f718451f35986fa822e0b82133b5b2a2a573ec (patch) | |
tree | 09048a17b2ba72523be562be352a99c84557adfa | |
parent | e474c34586e7bcfbec69ae432af6e0eb14069fa0 (diff) |
letgut (4oct22)
git-svn-id: svn://tug.org/texlive/trunk@64618 c570f23f-e606-0410-a88d-b1316a301751
16 files changed, 852 insertions, 276 deletions
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 Binary files differindex 89b12697a9a..b232420d44a 100644 --- a/Master/texmf-dist/doc/lualatex/letgut/letgut-banner-code.pdf +++ b/Master/texmf-dist/doc/lualatex/letgut/letgut-banner-code.pdf 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 Binary files differindex ccb1faeda0c..1e8e46f2410 100644 --- a/Master/texmf-dist/doc/lualatex/letgut/letgut-code.pdf +++ b/Master/texmf-dist/doc/lualatex/letgut/letgut-code.pdf 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,10 +2077,107 @@ 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 { \emph{#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 Binary files differindex e722117da87..23f2bf4091c 100644 --- a/Master/texmf-dist/doc/lualatex/letgut/letgut.pdf +++ b/Master/texmf-dist/doc/lualatex/letgut/letgut.pdf 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 diff --git a/Master/texmf-dist/source/lualatex/letgut/letgut.org b/Master/texmf-dist/source/lualatex/letgut/letgut.org index 2a8e9bbcc26..dd76cbe8d78 100644 --- a/Master/texmf-dist/source/lualatex/letgut/letgut.org +++ b/Master/texmf-dist/source/lualatex/letgut/letgut.org @@ -24,6 +24,9 @@ #+export_file_name: ../../../doc/lualatex/letgut/letgut-code * Ctanomat file :noexport: +:PROPERTIES: +:CUSTOM_ID: Ctanomatfile-2uoc55h0jlj0 +:END: We create here a ~ctanomat~ description file in order to simplify the upload of new versions of the class on CTAN. @@ -51,7 +54,7 @@ new versions of the class on CTAN. % This field contains the version of the package. % The value is optional. % The value is restricted to 32 characters. - \version{0.9.3 2022-09-02} + \version{0.9.4 2022-10-03} % ------------------------------------------------------------------------- % This field contains the name of the author(s). % The value is optional. @@ -128,11 +131,15 @@ new versions of the class on CTAN. % The value is optional. % The value is restricted to 8192 characters. \begin{announcement} - ## [0.9.3] - 2022-09-02 + ## [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 - - Local conf. file doesn't require anymore to start with \ExplSyntaxOff in some instances. - - Documentation improved. + - Documentation completed and improved. \end{announcement} % ------------------------------------------------------------------------- % This field contains the one-liner for the package. @@ -188,6 +195,9 @@ new versions of the class on CTAN. #+end_src * Changelog file :noexport: +:PROPERTIES: +:CUSTOM_ID: Changelogfile-2buc55h0jlj0 +:END: #+begin_src markdown :tangle ../../../doc/lualatex/letgut/CHANGELOG.md # Changelog @@ -199,6 +209,16 @@ new versions of the class on CTAN. ## [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 @@ -245,6 +265,9 @@ new versions of the class on CTAN. #+end_src * Readme file :noexport: +:PROPERTIES: +:CUSTOM_ID: Readmefile-8xuc55h0jlj0 +:END: #+begin_src markdown :tangle ../../../doc/lualatex/letgut/README.md letgut - Support for the newsletter “La Lettre GUTenberg” @@ -257,7 +280,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 ----------- @@ -266,6 +289,9 @@ https://framagit.org/gutenberg/letgut. #+end_src * How to :noexport: +:PROPERTIES: +:CUSTOM_ID: Howto-565g55h0jlj0 +:END: We explain in a \file*{HOWTO.md} file how to: @@ -315,6 +341,9 @@ the corresponding `.tex` file (which doesn't derive from an Org Mode file). #+end_src * Identification +:PROPERTIES: +:CUSTOM_ID: Identification-mn5g55h0jlj0 +:END: #+begin_src latex % This is file `letgut.cls', @@ -346,6 +375,9 @@ the corresponding `.tex` file (which doesn't derive from an Org Mode file). #+end_src * Debugging +:PROPERTIES: +:CUSTOM_ID: Debugging-846g55h0jlj0 +:END: #+begin_src latex % \RequirePackage[ @@ -356,6 +388,9 @@ the corresponding `.tex` file (which doesn't derive from an Org Mode file). #+end_src * Implementation +:PROPERTIES: +:CUSTOM_ID: Implementation-vy6g55h0jlj0 +:END: These document classes can only be used with \LaTeXe, so we make sure that an appropriate message is displayed when another \TeX{} @@ -387,14 +422,17 @@ Now, we can announce the class name and its version: #+begin_src latex \ProvidesExplClass{letgut} - {2022-03-17} - {0.9} + {2022-10-03} + {0.9.4} { Class for the newsletter “The GUTenberg Letter” } #+end_src ** Messages +:PROPERTIES: +:CUSTOM_ID: ImplementationMessages-xg7g55h0jlj0 +:END: We specify the messages come from a class, which is letgut (see \url{https://github.com/latex3/latex3/issues/887}). @@ -454,6 +492,9 @@ Some messages are declared for future use. #+end_src ** Engine checking +:PROPERTIES: +:CUSTOM_ID: ImplementationEnginechecking-lz7g55h0jlj0 +:END: #+begin_src latex \sys_if_engine_luatex:F { @@ -462,8 +503,14 @@ Some messages are declared for future use. #+end_src ** Declarations +:PROPERTIES: +:CUSTOM_ID: ImplementationDeclarations-3j8g55h0jlj0 +:END: *** Booleans +:PROPERTIES: +:CUSTOM_ID: ImplementationDeclarationsBooleans-s09g55h0jlj0 +:END: - For testing the emptyness of the title. #+begin_src latex @@ -483,6 +530,9 @@ Some messages are declared for future use. #+end_src *** Dimensions +:PROPERTIES: +:CUSTOM_ID: ImplementationDeclarationsDimensions-gj9g55h0jlj0 +:END: - Geometry of the document #+begin_src latex @@ -565,6 +615,9 @@ Some messages are declared for future use. #+end_src *** Skips (lengths with rubber components) +:PROPERTIES: +:CUSTOM_ID: ImplementationDeclarationsSkipslengthswithrubbercomponents-a4ag55h0jlj0 +:END: The following skips, borrowed from the standard classes, are specified in ~ex~ unit, which depends on the font used and hence have to be specified @@ -663,11 +716,17 @@ We close the ~\AddToHook{begindocument/before}~ argument. *** Integers +:PROPERTIES: +:CUSTOM_ID: ImplementationDeclarationsIntegers-7pag55h0jlj0 +:END: #+begin_src latex \int_new:N \g__letgut_ltx_example_int #+end_src *** Strings +:PROPERTIES: +:CUSTOM_ID: ImplementationDeclarationsStrings-t7bg55h0jlj0 +:END: #+begin_src latex \str_new:N \g__letgut_label_ltx_example_str @@ -681,85 +740,94 @@ We close the ~\AddToHook{begindocument/before}~ argument. #+end_src *** Token lists +:PROPERTIES: +:CUSTOM_ID: ImplementationDeclarationsTokenlists-grbg55h0jlj0 +:END: **** Constant ones +:PROPERTIES: +:CUSTOM_ID: ImplementationDeclarationsTokenlistsConstantones-obcg55h0jlj0 +:END: #+begin_src latex - \tl_const:Nn \c__letgut_online_issn_tl { - 2742-6149~ (version~ numérique) - } - \tl_const:Nn \c__letgut_paper_issn_tl { - 1257–2217~ (version~ papier) - } - \tl_const:Nn \c__letgut_cahier_tl { \emph{ Cahier } } - \tl_const:Nn \c__letgut_cahiers_tl { - \c__letgut_cahier_tl \emph{ s } - } - \tl_const:Nn \c__letgut_gnu_linux_tl { \software{GNU/Linux} } - \tl_const:Nn \c__letgut_macOS_tl { \software{macOS} } - \tl_const:Nn \c__letgut_windows_tl { \software{Windows} } - \tl_const:Nn \c__letgut_package_tl { package } - \tl_const:Nn \c__letgut_class_tl { classe } - \tl_const:Nn \c__letgut_file_tl { fichier } - \tl_const:Nn \c__letgut_software_tl { logiciel } - \tl_const:Nn \c__letgut_tugboat_tl { \emph{ TUGboat } } - \tl_const:Nn \c__letgut_tex_live_tl { - \hologo{ TeX }\nobreakspace Live - } - \tl_const:Nn \c__letgut_banner_file_tl { bandeau } - \tl_const:Nn \c__letgut_editorial_file_tl { editorial } - \tl_const:Nn \c__letgut_informations_gutenberg_file_tl { - informations-gut - } - \tl_const:Nn \c__letgut_acronyms_file_tl { letgut-acronyms } - \tl_const:Nn \c__letgut_local_config_file_tl { localconf } - \tl_const:Nn \c__letgut_lstlanguage_file_tl { letgut-lstlang.sty } - \tl_const:Nn \c__letgut_contents_name_tl { Sommaire } - \tl_const:Nn \c__letgut_draftwatermark_text_tl { - \textnormal{Brouillon} - } - \tl_const:Nn \c__letgut_membership_reminder_tl { - {\LARGE - \bfseries - Avez-vous~ pensé~ à~ régler~ votre~ cotisation~ ? - % \the\year~ ? - \par - \medskip - } - Si~ vous~ avez~ oublié,~ ce~ n'est~ ni~ trop~ tard~ - ni~ difficile~ : - \par - \url{https://www.gutenberg-asso.fr/?Adherer-en-ligne} - \bool_if:NT \g__letgut_informations_bool { - \file_if_exist:nT - {./\c__letgut_informations_gutenberg_file_tl}{ - \par - Voir~ aussi~ page~ \pageref{letgut_label_adhesions}. - } - } - } - \tl_const:Nn \c__letgut_missing_editorial_tl { - Ne~ pas~ omettre~ l'éditorial~ !\\(à~ faire~ figurer~ - dans~ un~ \file*{\c__letgut_editorial_file_tl.tex}~ - dans~ le~ dossier~ courant) - } - \tl_const:Nn \c__letgut_missing_infomations_tl { - Ne~ pas~ omettre~ les~ informations~ sur~ - \c__letgut_gutenberg_tl{}~ !\\(dans~ un~ - \file*{\c__letgut_informations_gutenberg_file_tl.tex}~ - situé~ soit~ dans~ le~ dossier~ courant, soit~ dans~ le~ - dossier~ parent) - } - \tl_const:Nn \c__letgut_default_alert_box_color_tl { - gray9 - } - \tl_const:Nn \c__letgut_default_allcolors_links_color_tl - { - teal!60!black - } + \tl_const:Nn \c__letgut_online_issn_tl { + 2742-6149~ (version~ numérique) + } + \tl_const:Nn \c__letgut_paper_issn_tl { + 1257–2217~ (version~ papier) + } + \tl_const:Nn \c__letgut_cahier_tl { \emph{ Cahier } } + \tl_const:Nn \c__letgut_cahiers_tl { + \c__letgut_cahier_tl \emph{ s } + } + \tl_const:Nn \c__letgut_gnu_linux_tl { \software{GNU/Linux} } + \tl_const:Nn \c__letgut_macOS_tl { \software{macOS} } + \tl_const:Nn \c__letgut_windows_tl { \software{Windows} } + \tl_const:Nn \c__letgut_package_tl { package } + \tl_const:Nn \c__letgut_class_tl { classe } + \tl_const:Nn \c__letgut_file_tl { fichier } + \tl_const:Nn \c__letgut_software_tl { logiciel } + \tl_const:Nn \c__letgut_tugboat_tl { \emph{ TUGboat } } + \tl_const:Nn \c__letgut_tex_live_tl { + \hologo{ TeX }\nobreakspace Live + } + \tl_const:Nn \c__letgut_banner_file_tl { bandeau } + \tl_const:Nn \c__letgut_editorial_file_tl { editorial } + \tl_const:Nn \c__letgut_informations_gutenberg_file_tl { + informations-gut + } + \tl_const:Nn \c__letgut_acronyms_file_tl { letgut-acronyms } + \tl_const:Nn \c__letgut_local_config_file_tl { localconf } + \tl_const:Nn \c__letgut_lstlanguage_file_tl { letgut-lstlang.sty } + \tl_const:Nn \c__letgut_contents_name_tl { Sommaire } + \tl_const:Nn \c__letgut_draftwatermark_text_tl { + \textnormal{Brouillon} + } + \tl_const:Nn \c__letgut_membership_reminder_tl { + {\LARGE + \bfseries + Avez-vous~ pensé~ à~ régler~ votre~ cotisation~ ? + % \the\year~ ? + \par + \medskip + } + Si~ vous~ avez~ oublié,~ ce~ n'est~ ni~ trop~ tard~ + ni~ difficile~ : + \par + \url{https://www.gutenberg-asso.fr/?Adherer-en-ligne} + \bool_if:NT \g__letgut_informations_bool { + \file_if_exist:nT + {./\c__letgut_informations_gutenberg_file_tl}{ + \par + Voir~ aussi~ page~ \pageref{letgut_label_adhesions}. + } + } + } + \tl_const:Nn \c__letgut_missing_editorial_tl { + Ne~ pas~ omettre~ l'éditorial~ !\\(à~ faire~ figurer~ + dans~ un~ \file*{\c__letgut_editorial_file_tl.tex}~ + dans~ le~ dossier~ courant) + } + \tl_const:Nn \c__letgut_missing_infomations_tl { + Ne~ pas~ omettre~ les~ informations~ sur~ + \c__letgut_gutenberg_tl{}~ !\\(dans~ un~ + \file*{\c__letgut_informations_gutenberg_file_tl.tex}~ + situé~ soit~ dans~ le~ dossier~ courant, soit~ dans~ le~ + dossier~ parent) + } + \tl_const:Nn \c__letgut_default_alert_box_color_tl { + gray9 + } + \tl_const:Nn \c__letgut_default_allcolors_links_color_tl + { + teal!60!black + } #+end_src **** Variables ones +:PROPERTIES: +:CUSTOM_ID: ImplementationDeclarationsTokenlistsVariablesones-pxcg55h0jlj0 +:END: #+begin_src latex \tl_new:N \g__letgut_mark_tl @@ -772,6 +840,9 @@ We close the ~\AddToHook{begindocument/before}~ argument. #+end_src *** Comma separated lists +:PROPERTIES: +:CUSTOM_ID: ImplementationDeclarationsCommaseparatedlists-vhdg55h0jlj0 +:END: #+begin_src latex \clist_new:N \g__letgut_pagecolor_clist @@ -782,12 +853,18 @@ We close the ~\AddToHook{begindocument/before}~ argument. #+end_src *** Sequences +:PROPERTIES: +:CUSTOM_ID: ImplementationDeclarationsSequences-m2eg55h0jlj0 +:END: #+begin_src latex \seq_new:N \l__letgut_first_last_names_items_seq #+end_src ** Class options +:PROPERTIES: +:CUSTOM_ID: ImplementationClassoptions-4meg55h0jlj0 +:END: In order to provide class options, we load the \package{l3keys2e} which provides \LaTeXe{} option processing using \LaTeX3 keys: @@ -802,6 +879,9 @@ We define the 2 load time options for the target audience: - ~for-authors~, (only) the author(s) of an article of the “Lettre”. ** Date handling +:PROPERTIES: +:CUSTOM_ID: ImplementationDatehandling-c5fg55h0jlj0 +:END: #+begin_src latex \int_new:N \g__letgut_date_month_int @@ -909,6 +989,9 @@ We define the 2 load time options for the target audience: #+end_src ** Class and package loading +:PROPERTIES: +:CUSTOM_ID: ImplementationClassandpackageloading-aqfg55h0jlj0 +:END: The \letgutcls{} is based on the ~article~ class. It is by default two sided because of the alternating headers, and will by typeset with ~11pt~ as global @@ -1087,6 +1170,9 @@ We close the ~\AddToHook{begindocument/before}~ argument. #+end_src ** Settings for the loaded packages +:PROPERTIES: +:CUSTOM_ID: ImplementationSettingsfortheloadedpackages-cdgg55h0jlj0 +:END: - We switch to the French typographic conventions for \package{siunitx}. #+begin_src latex @@ -1302,6 +1388,9 @@ We close the ~\AddToHook{begindocument/before}~ argument. #+end_src ** Page color default settings +:PROPERTIES: +:CUSTOM_ID: ImplementationPagecolordefaultsettings-c1hg55h0jlj0 +:END: By default, the page color will be the one linked to the ~screen~ option. @@ -1312,6 +1401,9 @@ We close the ~\AddToHook{begindocument/before}~ argument. #+end_src ** Options +:PROPERTIES: +:CUSTOM_ID: ImplementationOptions-imhg55h0jlj0 +:END: We now define the options of the class: @@ -1389,6 +1481,9 @@ We now define the options of the class: #+end_src ** Headers +:PROPERTIES: +:CUSTOM_ID: ImplementationHeaders-78ig55h0jlj0 +:END: We now define the headers. @@ -1421,6 +1516,9 @@ We now define the headers. #+end_src ** Marginal notes +:PROPERTIES: +:CUSTOM_ID: ImplementationMarginalnotes-1uig55h0jlj0 +:END: We want the marginal notes to be in the left margin. #+begin_src latex @@ -1428,6 +1526,9 @@ We now define the headers. #+end_src ** Table of contents +:PROPERTIES: +:CUSTOM_ID: ImplementationTableofcontents-rhjg55h0jlj0 +:END: The table of contents is customized: @@ -1475,6 +1576,9 @@ We now define the headers. #+end_src ** COMMENT Alerts +:PROPERTIES: +:CUSTOM_ID: ImplementationAlerts-o4kg55h0jlj0 +:END: We create a box to display alerts. @@ -1492,6 +1596,9 @@ We now define the headers. #+end_src ** Geometry of the document +:PROPERTIES: +:CUSTOM_ID: ImplementationGeometryofthedocument-mqkg55h0jlj0 +:END: #+begin_src latex \geometry{ @@ -1509,6 +1616,9 @@ We now define the headers. #+end_src ** Alert box +:PROPERTIES: +:CUSTOM_ID: ImplementationAlertbox-rblg55h0jlj0 +:END: #+begin_src latex \cs_new_protected:Nn \__letgut_alert_box:nn @@ -1538,6 +1648,9 @@ We now define the headers. #+end_src ** “Title” and marks +:PROPERTIES: +:CUSTOM_ID: ImplementationTitleandmarks-5ylg55h0jlj0 +:END: We redefine ~\@title~ in order to make it empty. Hence we can later test if the ~\title~ has been populated by the user (thanks to ~\title~) and, if so, @@ -1590,6 +1703,9 @@ $>0$. #+end_src ** First page handling +:PROPERTIES: +:CUSTOM_ID: ImplementationFirstpagehandling-nmmg55h0jlj0 +:END: The first page is special as it should automatically contain certain elements: - the banner, @@ -1849,6 +1965,9 @@ Membership reminder. #+end_src ** Last page handling +:PROPERTIES: +:CUSTOM_ID: ImplementationLastpagehandling-jbng55h0jlj0 +:END: The last page is special: it should automatically contain some informations about \gutenberg. @@ -1903,8 +2022,14 @@ the author(s) of the “Lettre”. #+end_src ** Sections, subsections, etc. +:PROPERTIES: +:CUSTOM_ID: ImplementationSectionssubsectionsetc-vzng55h0jlj0 +:END: *** Numbering +:PROPERTIES: +:CUSTOM_ID: ImplementationSectionssubsectionsetcNumbering-lmog55h0jlj0 +:END: We want all the sections to be unnumbered. #+begin_src latex @@ -1912,6 +2037,9 @@ the author(s) of the “Lettre”. #+end_src *** Format +:PROPERTIES: +:CUSTOM_ID: ImplementationSectionssubsectionsetcFormat-tapg55h0jlj0 +:END: - We create the new level ~\title~ for the titles of the articles. They are displayed uppercased. @@ -2050,8 +2178,14 @@ the author(s) of the “Lettre”. #+end_src ** Document commands +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommands-s1qg55h0jlj0 +:END: *** Setup +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommandsSetup-roqg55h0jlj0 +:END: We define the command that lets us specify the newsletter setup. @@ -2062,6 +2196,9 @@ We define the command that lets us specify the newsletter setup. #+end_src *** For the rubric dedicated to new stuffs appeared on \acs{ctan} +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommandsFortherubricdedicatedtonewstuffsappearedonacsctan-jerg55h0jlj0 +:END: - 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 @@ -2110,6 +2247,9 @@ We define the command that lets us specify the newsletter setup. #+end_src *** Persons and authors +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommandsPersonsandauthors-h5sg55h0jlj0 +:END: For both persons and authors, the argument of: - a single individual is given as: @@ -2215,6 +2355,9 @@ For both persons and authors, the argument of: #+end_src *** Horizontal rule +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommandsHorizontalrule-8vsg55h0jlj0 +:END: #+begin_src latex \NewDocumentCommand {\separator} { } { @@ -2226,6 +2369,9 @@ For both persons and authors, the argument of: #+end_src *** Alert boxes +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommandsAlertboxes-ijtg55h0jlj0 +:END: #+begin_src latex \colorlet {letgut_default_alert_box_color} { @@ -2239,6 +2385,9 @@ For both persons and authors, the argument of: #+end_src *** Typesetting of packages, classes, files and softwares. +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommandsTypesettingofpackagesclassesfilesandsoftwares-09ug55h0jlj0 +:END: The ~\c__letgut_httpsprefix_tl~ comes from: @@ -2322,6 +2471,13 @@ https://github.com/latex3/hyperref/issues/188#issuecomment-826302843. #+end_src *** Names, expressions, etc. +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommandsNamesexpressionsetc-11vg55h0jlj0 +:END: + +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_src latex \NewExpandableDocumentCommand { \gutenberg } { } { @@ -2330,12 +2486,12 @@ https://github.com/latex3/hyperref/issues/188#issuecomment-826302843. \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 } @@ -2383,7 +2539,100 @@ https://github.com/latex3/hyperref/issues/188#issuecomment-826302843. } #+end_src +We define the command ~\lettrenumber~ that displays the number of +some \lettre{} issue: + +- preceeded by “\no” if used starred, +- by default the current one, +- possibly shifted w.r.t. the current one, depending on the first token of the + optional argument: + - if it is not ~.~, ~+~ nor ~-~: this argument (pretty useless: it is easier + to directly type the desired number), + - if it is ~.~: the current number of the \lettre (pretty useless: it is + easier to just not use the optional argument), + - if it is ~+~ or ~-~ followed by a number: the current number of the \lettre, + shifted by what is specified. + +#+begin_src latex + \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_src + +The “\lettre” and “\lettregut” expressions are treated separately since they are +subject to variations, depending how they are used. The corresponding commands +~\lettre~ and ~\lettregut~ used without star nor optional argument typeset +resp. “\lettre” and “\lettregut”: + +- immediately followed by “\no” if used starred, +- followed by some strings, depending on the first token of their optional + argument: + - if it is not ~.~, ~+~ nor ~-~: this argument, + - if it is ~.~: the current number of the \lettre, + - if it is ~+~ or ~-~ followed by a number: the current number of the \lettre, + shifted by what is specified. + +#+begin_src latex + \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_src + +The ~\lettre~ and ~\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 https://tex.stackexchange.com/q/427557/18401). + *** Foreign locutions +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommandsForeignlocutions-1svg55h0jlj0 +:END: #+begin_src latex \cs_new_protected:Npn \__letgut_emphasis:n #1 @@ -2398,7 +2647,29 @@ https://github.com/latex3/hyperref/issues/188#issuecomment-826302843. } #+end_src +*** Unicode code points +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommandsUnicodecodes-30lksfa0nlj0 +:END: + +#+begin_src latex + \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_src + *** Bookmarks handling +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommandsBookmarkshandling-zbxg55h0jlj0 +:END: We disabling some commands when their arguments have to go to bookmarks. @@ -2449,6 +2720,9 @@ We disabling some commands when their arguments have to go to bookmarks. #+end_src *** Acronyms +:PROPERTIES: +:CUSTOM_ID: ImplementationDocumentcommandsAcronyms-93yg55h0jlj0 +:END: The following command let us define acronyms. The arguments are as follows: - ~#1~: optional argument that let us override the default settings of this @@ -2688,6 +2962,9 @@ is printed when used for the first time with ~\ac~). #+end_src ** Bibliography +:PROPERTIES: +:CUSTOM_ID: ImplementationBibliography-ruyg55h0jlj0 +:END: We want the ~\citeauthor~ command to display, not only the last, but the full name of the authors. @@ -2703,6 +2980,9 @@ full name of the authors. #+end_src ** Book reviews +:PROPERTIES: +:CUSTOM_ID: ImplementationBookreviews-ekzg55h0jlj0 +:END: #+begin_src latex \tl_new:N \g__letgut_bookreview_frontcover_tl @@ -2787,6 +3067,9 @@ extensions of the ~graphicx~ package. #+end_src ** Keyboard keys +:PROPERTIES: +:CUSTOM_ID: ImplementationKeyboardkeys-qa0h55h0jlj0 +:END: We make use of the Linux Biolinum Keyboard font and extend somehow the ~\LKey~ provided by the \package*{biolinum} in order to more easily write keyboard keys @@ -2837,6 +3120,9 @@ for usual characters on French keyboards. #+end_src ** Miscellanous +:PROPERTIES: +:CUSTOM_ID: ImplementationMiscellanous-r11h55h0jlj0 +:END: - We specify the possible hyphenations of \enquote{\gutenberg}. #+begin_src latex @@ -2844,6 +3130,9 @@ for usual characters on French keyboards. #+end_src *** ISSN +:PROPERTIES: +:CUSTOM_ID: ImplementationMiscellanousISSN-cr1h55h0jlj0 +:END: #+begin_src latex \cs_new_protected:Npn \__letgut_issn: @@ -2860,6 +3149,9 @@ for usual characters on French keyboards. #+end_src *** Non selectable text +:PROPERTIES: +:CUSTOM_ID: ImplementationMiscellanousNonselectabletext-wh2h55h0jlj0 +:END: 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 @@ -2872,6 +3164,9 @@ watermarks. #+end_src *** Typesetting of code, etc. +:PROPERTIES: +:CUSTOM_ID: ImplementationMiscellanousTypesettingofcodeetc-f83h55h0jlj0 +:END: We provide a ~\meta~ macro that (poorly) mimics the one of the \package*{doc}. It is added at the very end of the preamble since other @@ -2898,6 +3193,9 @@ watermarks. #+end_src ** Listings +:PROPERTIES: +:CUSTOM_ID: ImplementationListings-514h55h0jlj0 +:END: We define a style for all the listings which resets all the \TeX{} control sequences and keywords, and fix some defaults. @@ -2980,6 +3278,9 @@ following characteristics: #+end_src *** LaTeX listings and examples +:PROPERTIES: +:CUSTOM_ID: ImplementationListingsLaTeXlistingsandexamples-xt4h55h0jlj0 +:END: We define the colors for the syntax highlighting of LaTeX listings. @@ -3405,6 +3706,9 @@ the `lstlang0.sty` or ~letgut-lstlang.sty~ files. #+end_src *** Terminal listings +:PROPERTIES: +:CUSTOM_ID: ImplementationListingsTerminallistings-fq5h55h0jlj0 +:END: We define a command dedicated to terminal stdin and stdout. @@ -3638,6 +3942,9 @@ We define some colors used in the terminal listings. #+end_src *** Unicode characters with positions above 256 +:PROPERTIES: +:CUSTOM_ID: ImplementationListingsUnicodecharacterswithpositionsabove256-4l6h55h0jlj0 +:END: Unicode characters with positions above 256 causes troubles in listings. Here is a workaround for some of them (see @@ -3663,6 +3970,9 @@ https://tex.stackexchange.com/a/25396). #+end_src ** Local config file +:PROPERTIES: +:CUSTOM_ID: ImplementationLocalconfigfile-me7h55h0jlj0 +:END: Each issue of the Lettre requires certain local configurations: configuration dedicated to the issue in question, particular packages used in the articles, @@ -3675,16 +3985,18 @@ at its beginning. #+begin_src latex \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_src -We don't want the book review entry types to be listed in the bibliography -(they appears only thanks to the ~bookreview~ environment). + We don't want the book review entry types to be listed in the bibliography + (they appears only thanks to the ~bookreview~ environment). #+begin_src latex - \ExecuteBibliographyOptions[bookreview]{skipbib,skiplab} + \ExecuteBibliographyOptions[bookreview]{skipbib,skiplab} #+end_src #+begin_src latex @@ -3692,6 +4004,9 @@ We don't want the book review entry types to be listed in the bibliography #+end_src * (biblatex) Data model +:PROPERTIES: +:CUSTOM_ID: biblatexDatamodel-vx7h55h0jlj0 +:END: We give the (\package{biblatex}) data model that enriches the default one for several purposes: @@ -3699,7 +4014,7 @@ several purposes: - the books advertisements. #+begin_src latex :tangle ../../../tex/lualatex/letgut/letgut.lbx :exports both -\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}, @@ -3713,7 +4028,7 @@ several purposes: create the corresponding new entry). #+begin_src latex :tangle ../../../tex/lualatex/letgut/letgut.dbx :exports both - \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}% @@ -3768,7 +4083,7 @@ several purposes: We provide a specific ~biblatex~ citation style . #+begin_src latex :tangle ../../../tex/lualatex/letgut/letgut.cbx :exports both - \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_src @@ -3798,8 +4113,14 @@ well... #+end_src * Provided files +:PROPERTIES: +:CUSTOM_ID: Providedfiles-g09h55h0jlj0 +:END: ** Example file of an issue of the newsletter +:PROPERTIES: +:CUSTOM_ID: ProvidedfilesExamplefileofanissueofthenewsletter-ak9h55h0jlj0 +:END: #+begin_src latex :tangle ../../../doc/lualatex/letgut/lettre-example.tex :exports both % Hey, Emacs! This is a -*- mode: latex -*- file! @@ -3892,6 +4213,9 @@ well... #+end_src ** Example of an editorial +:PROPERTIES: +:CUSTOM_ID: ProvidedfilesExampleofaneditorial-06ah55h0jlj0 +:END: #+begin_src latex :tangle ../../../doc/lualatex/letgut/editorial.tex :exports both Ceci est un intéressant éditorial de la \lettregut{} @@ -3911,6 +4235,9 @@ well... #+end_src ** Informations about \gutenberg +:PROPERTIES: +:CUSTOM_ID: ProvidedfilesInformationsabout\gutenberg-hqah55h0jlj0 +:END: #+begin_src latex :tangle ../../../tex/lualatex/letgut/informations-gut.tex :exports both % Hey, Emacs! This is a -*- mode: latex -*- file! @@ -3945,7 +4272,7 @@ well... \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} % @@ -4070,6 +4397,9 @@ well... #+end_src ** Acronyms +:PROPERTIES: +:CUSTOM_ID: ProvidedfilesAcronyms-8cbh55h0jlj0 +:END: #+begin_src latex :tangle ../../../tex/lualatex/letgut/letgut-acronyms.tex :exports both % Hey, Emacs! This is a -*- mode: latex -*- file! @@ -4366,6 +4696,9 @@ well... #+end_src ** Language driver file +:PROPERTIES: +:CUSTOM_ID: ProvidedfilesLanguagedriverfile-4cch55h0jlj0 +:END: #+begin_src latex :tangle ../../../tex/lualatex/letgut/letgut-lstlang.sty :exports both % \lst@definelanguage[...]{TeX}{% @@ -4409,7 +4742,7 @@ well... 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/tex/lualatex/letgut/informations-gut.tex b/Master/texmf-dist/tex/lualatex/letgut/informations-gut.tex index 7accd963cd0..e7249c8a237 100644 --- a/Master/texmf-dist/tex/lualatex/letgut/informations-gut.tex +++ b/Master/texmf-dist/tex/lualatex/letgut/informations-gut.tex @@ -30,7 +30,7 @@ \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} % diff --git a/Master/texmf-dist/tex/lualatex/letgut/letgut-lstlang.sty b/Master/texmf-dist/tex/lualatex/letgut/letgut-lstlang.sty index 3be85ba45ce..412849c9724 100644 --- a/Master/texmf-dist/tex/lualatex/letgut/letgut-lstlang.sty +++ b/Master/texmf-dist/tex/lualatex/letgut/letgut-lstlang.sty @@ -39,7 +39,7 @@ 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/tex/lualatex/letgut/letgut.cbx b/Master/texmf-dist/tex/lualatex/letgut/letgut.cbx index 6e12efa6559..852f60e2a55 100644 --- a/Master/texmf-dist/tex/lualatex/letgut/letgut.cbx +++ b/Master/texmf-dist/tex/lualatex/letgut/letgut.cbx @@ -1,4 +1,4 @@ -\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} \DeclareFieldFormat[bookreview]{title}{\textbf{\emph{#1}}} \renewbibmacro*{title}{% diff --git a/Master/texmf-dist/tex/lualatex/letgut/letgut.cls b/Master/texmf-dist/tex/lualatex/letgut/letgut.cls index bae4ae10681..319dfc2badd 100644 --- a/Master/texmf-dist/tex/lualatex/letgut/letgut.cls +++ b/Master/texmf-dist/tex/lualatex/letgut/letgut.cls @@ -44,8 +44,8 @@ } \ExplSyntaxOff \ProvidesExplClass{letgut} -{2022-03-17} -{0.9} +{2022-10-03} +{0.9.4} { Class for the newsletter “The GUTenberg Letter” } @@ -1210,12 +1210,12 @@ \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 } @@ -1261,6 +1261,58 @@ \NewExpandableDocumentCommand { \windows } { } { \c__letgut_windows_tl } +\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 } +} +\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 } { } + } +} \cs_new_protected:Npn \__letgut_emphasis:n #1 { \emph{#1} @@ -1271,6 +1323,17 @@ \NewDocumentCommand { \latinloc } { m } { \__letgut_emphasis:n {#1} } +\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} +} \AddToHook{begindocument/end}{ \pdfstringdefDisableCommands{ \RenewExpandableDocumentCommand\person { m }{#1} @@ -2157,8 +2220,10 @@ overlay={ } \lst@RestoreCatcodes \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 } \ExecuteBibliographyOptions[bookreview]{skipbib,skiplab} \endinput diff --git a/Master/texmf-dist/tex/lualatex/letgut/letgut.dbx b/Master/texmf-dist/tex/lualatex/letgut/letgut.dbx index 1d060a2bdb6..e2844f9c9ad 100644 --- a/Master/texmf-dist/tex/lualatex/letgut/letgut.dbx +++ b/Master/texmf-dist/tex/lualatex/letgut/letgut.dbx @@ -1,4 +1,4 @@ -\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}% diff --git a/Master/texmf-dist/tex/lualatex/letgut/letgut.lbx b/Master/texmf-dist/tex/lualatex/letgut/letgut.lbx index cdc94245f33..911ebde868e 100644 --- a/Master/texmf-dist/tex/lualatex/letgut/letgut.lbx +++ b/Master/texmf-dist/tex/lualatex/letgut/letgut.lbx @@ -1,4 +1,4 @@ -\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}, |