summaryrefslogtreecommitdiff
path: root/macros/luatex/latex/letgut/source/letgut.org
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/latex/letgut/source/letgut.org')
-rw-r--r--macros/luatex/latex/letgut/source/letgut.org523
1 files changed, 428 insertions, 95 deletions
diff --git a/macros/luatex/latex/letgut/source/letgut.org b/macros/luatex/latex/letgut/source/letgut.org
index 2a8e9bbcc2..dd76cbe8d7 100644
--- a/macros/luatex/latex/letgut/source/letgut.org
+++ b/macros/luatex/latex/letgut/source/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')