summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex/letgut/letgut.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-02-29 21:22:09 +0000
committerKarl Berry <karl@freefriends.org>2024-02-29 21:22:09 +0000
commit06ca1af010cb0c0e20571cc06ff18270bb277048 (patch)
tree39d93dd3a13deb63f285c26059b86a5fa8b40380 /Master/texmf-dist/tex/lualatex/letgut/letgut.cls
parentf8f5b31ebca03bf4ba6d169427987eae1225e1ac (diff)
letgut (29feb24)
git-svn-id: svn://tug.org/texlive/trunk@70257 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/letgut/letgut.cls')
-rw-r--r--Master/texmf-dist/tex/lualatex/letgut/letgut.cls130
1 files changed, 67 insertions, 63 deletions
diff --git a/Master/texmf-dist/tex/lualatex/letgut/letgut.cls b/Master/texmf-dist/tex/lualatex/letgut/letgut.cls
index 391f10ec404..cb0ec69d9e8 100644
--- a/Master/texmf-dist/tex/lualatex/letgut/letgut.cls
+++ b/Master/texmf-dist/tex/lualatex/letgut/letgut.cls
@@ -48,8 +48,8 @@
}
\ExplSyntaxOff
\ProvidesExplClass{letgut}
-{2023-05-21}
-{0.9.7}
+{2024-02-29}
+{0.9.8}
{
Class for the newsletter “The GUTenberg Letter”
}
@@ -318,7 +318,6 @@
\seq_new:N \l__letgut_first_last_names_items_seq
\seq_new:N \g__letgut_included_files_seq
\seq_new:N \g__letgut_added_bib_resources_seq
-\RequirePackage{l3keys2e}
\int_new:N \g__letgut_date_month_int
\int_new:N \g__letgut_date_year_int
@@ -549,17 +548,17 @@
\Huge
% \color_fill:n {black!10}
\color{black!10}
-\hbox_set:Nn \l_tmpa_box {
+\hbox_set:Nn \l__letgut_tmpa_box {
\fontsize{0.25\paperwidth}{0.3\paperwidth}
\selectfont
\c__letgut_draftwatermark_text_tl
}
-\hbox_set:Nn \l_tmpb_box {
+\hbox_set:Nn \l__letgut_tmpb_box {
\hbox_overlap_center:n {
- \box_use:N \l_tmpa_box
+ \box_use:N \l__letgut_tmpa_box
}
}
-\box_rotate:Nn \l_tmpb_box {
+\box_rotate:Nn \l__letgut_tmpb_box {
\fp_eval:n {
atand (
\dim_to_fp:n {\paperheight}
@@ -568,7 +567,7 @@
)
}
}
-\box_use:N \l_tmpb_box
+\box_use:N \l__letgut_tmpb_box
}
}
}
@@ -579,7 +578,7 @@
\pagecolor[rgb]{\c__letgut_default_pagecolor_screen_clist}
\clist_set_eq:NN \g__letgut_pagecolor_clist
\c__letgut_default_pagecolor_screen_clist
-\keys_define:nn { letgut }
+\DeclareKeys[ letgut ]
{
, for-readers .bool_gset:N = \g__letgut_for_readers_bool
, for-readers .initial:n = { true }
@@ -641,7 +640,7 @@
}
}
}
-\ProcessKeysOptions { letgut }
+\ProcessKeyOptions[ letgut ]
\AddToHook{begindocument/before}{
\bool_lazy_and:nnTF {\g__letgut_for_readers_bool} {!\g__letgut_paper_bool}
{
@@ -755,7 +754,9 @@
\tl_if_empty:NTF {#1}{
\phantomsection\addcontentsline{toc}{title}{#2}
}{
- \phantomsection\addcontentsline{toc}{title}{#1}
+ \tl_if_empty:NF {#2}{
+ \phantomsection\addcontentsline{toc}{title}{#1}
+ }
}
}
\NewTColorBox{announcement}{ O{} m }
@@ -767,7 +768,8 @@
overlay~ unbroken~ and~ first ={
\node[color=\l__letgut_toc_color_announce_tl]~ at~ ([yshift=8pt]title.south)
{\pgfornament[width=0.4\linewidth]{88}};
- \node[color=white,anchor=north~ west]~ at~ (frame.north~ west) {\huge\bfseries\aldineright{}};
+ \node[color=white,anchor=north~ west]~ at~ (frame.north~ west)
+ {\huge\bfseries\aldineright{}};
},
#1,
coltitle=\l__letgut_toc_color_announce_tl,
@@ -1238,17 +1240,17 @@
}
\cs_new_protected:Npn \__letgut_titlecase_name:n #1
{
- \seq_set_split:Nnn \l_tmpa_seq { - } {#1}
- \seq_set_map_x:NNn \l_tmpb_seq \l_tmpa_seq {
+ \seq_set_split:Nnn \l__letgut_tmpa_seq { - } {#1}
+ \seq_set_map_x:NNn \l__letgut_tmpb_seq \l__letgut_tmpa_seq {
\text_titlecase_first:n{ \text_lowercase:n {##1} }
}
- \tl_set:Nx \l_tmpa_tl {\seq_use:Nn \l_tmpb_seq {-}}
- \seq_clear:N \l_tmpa_seq
- \seq_set_split:NnV \l_tmpa_seq { ~ } { \l_tmpa_tl }
- \seq_set_map_x:NNn \l_tmpb_seq \l_tmpa_seq {
+ \tl_set:Nx \l__letgut_tmpa_tl {\seq_use:Nn \l__letgut_tmpb_seq {-}}
+ \seq_clear:N \l__letgut_tmpa_seq
+ \seq_set_split:NnV \l__letgut_tmpa_seq { ~ } { \l__letgut_tmpa_tl }
+ \seq_set_map_x:NNn \l__letgut_tmpb_seq \l__letgut_tmpa_seq {
\text_titlecase_first:n{##1}
}
- \seq_use:Nn \l_tmpb_seq {~}
+ \seq_use:Nn \l__letgut_tmpb_seq {~}
}
\cs_new_protected:Nn \__letgut_person_last_name:n
{
@@ -1272,20 +1274,20 @@
\cs_new_protected:Npn \__letgut_process_list:nn #1 #2
{
\seq_clear:N \l__letgut_items_seq
- \seq_set_split:Nnn \l_tmpa_seq {~and~} {#2}
+ \seq_set_split:Nnn \l__letgut_tmpa_seq {~and~} {#2}
\IfBooleanT{#1}{
- \seq_sort:Nn \l_tmpa_seq
+ \seq_sort:Nn \l__letgut_tmpa_seq
{
\str_compare:nNnTF { ##1 } > { ##2 }
{ \sort_return_swapped: }
{ \sort_return_same: }
}
}
- \seq_map_inline:Nn \l_tmpa_seq {
- \seq_set_from_clist:Nn \l_tmpb_seq {##1}
- \seq_pop_left:NN \l_tmpb_seq \l_letgut_last_name_tl
- \seq_pop_left:NN \l_tmpb_seq \l_letgut_first_name_tl
- \seq_pop_left:NN \l_tmpb_seq \l_letgut_title_tl
+ \seq_map_inline:Nn \l__letgut_tmpa_seq {
+ \seq_set_from_clist:Nn \l__letgut_tmpb_seq {##1}
+ \seq_pop_left:NN \l__letgut_tmpb_seq \l_letgut_last_name_tl
+ \seq_pop_left:NN \l__letgut_tmpb_seq \l_letgut_first_name_tl
+ \seq_pop_left:NN \l__letgut_tmpb_seq \l_letgut_title_tl
\seq_put_right:Nx \l__letgut_items_seq {
\quark_if_no_value:NTF \l_letgut_first_name_tl {
\__letgut_person_last_name:n {
@@ -1377,13 +1379,13 @@
}
\cs_new_protected:Nn \__letgut_software:nn
{
-\seq_set_split:Nnn \l_tmpa_seq { ~ } { #2 }
- \seq_set_map:NNn \l_tmpb_seq \l_tmpa_seq {{\l__letgut_softwares_font_switch_tl ##1}}
+\seq_set_split:Nnn \l__letgut_tmpa_seq { ~ } { #2 }
+ \seq_set_map:NNn \l__letgut_tmpb_seq \l__letgut_tmpa_seq {{\l__letgut_softwares_font_switch_tl ##1}}
\tl_if_empty:nTF {#1}
{
- \seq_use:Nn \l_tmpb_seq { ~ }
+ \seq_use:Nn \l__letgut_tmpb_seq { ~ }
}{
- \href{#1}{ \seq_use:Nn \l_tmpb_seq { ~ } }
+ \href{#1}{ \seq_use:Nn \l__letgut_tmpb_seq { ~ } }
}
}
\cs_new_protected:Nn \__letgut_file:n
@@ -1486,14 +1488,14 @@
\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 }}}
+ \tl_set:Nx \l__letgut_tmpa_tl {\tl_head:n { #1 }}
+ \tl_set:Nn \l__letgut_tmpb_tl { #1 }
+ \tl_case:NnF \l__letgut_tmpa_tl {
+ {\c__letgut_plus_tl} {\int_eval:n {\g__letgut_number_int\l__letgut_tmpa_tl\tl_range:Nnn \l__letgut_tmpb_tl { 2 } { -1 }}}
+ {\c__letgut_minus_tl} {\int_eval:n {\g__letgut_number_int\l__letgut_tmpa_tl\tl_range:Nnn \l__letgut_tmpb_tl { 2 } { -1 }}}
{\c__letgut_dot_tl} {\int_use:N \g__letgut_number_int}
}
- {\l_tmpb_tl}
+ {\l__letgut_tmpb_tl}
}
}
\NewDocumentCommand { \lettrenumber } { s O{} } {
@@ -1814,11 +1816,11 @@ title .value_required:n = true,
}{
\clist_map_inline:Nn \Gin@extensions {
\file_if_exist:nT{\g__letgut_bookreview_frontcover_tl##1}{
- \bool_set_true:N \l_tmpa_bool
+ \bool_set_true:N \l__letgut_tmpa_bool
\clist_map_break:
}
}
- \bool_if:NTF \l_tmpa_bool {
+ \bool_if:NTF \l__letgut_tmpa_bool {
\marginpar{
\hspace*{\c__letgut_bookreview_frontcover_margin_sep_dim}
% \raggedleft
@@ -1939,6 +1941,7 @@ title .value_required:n = true,
}
\cs_new_protected:Npn \__letgut_input_article:nn #1 #2
{
+ \FloatBarrier
\lstset{ style=__letgut_reset_listings_styles }
\acresetall%
\input{#2}%
@@ -1978,7 +1981,7 @@ title .value_required:n = true,
\__letgut_input_article:nn { #1 } { #2 }
}
\NewCommandCopy {\__letgut_orig_includegraphics} {\includegraphics}
-\clist_set:Nx \l_tmpa_clist {\Gin@extensions}
+\clist_set:Nx \l__letgut_tmpa_clist {\Gin@extensions}
\cs_new_protected:Npn \__letgut_includegraphics:nnn #1 #2 #3
{
\file_if_exist:nTF {#3} {
@@ -1998,8 +2001,8 @@ title .value_required:n = true,
}
\__letgut_orig_includegraphics[#2]{#3}
}{
- \bool_gset_false:N \g_tmpa_bool
- \clist_map_inline:Nn \l_tmpa_clist {%
+ \bool_gset_false:N \g__letgut_tmpa_bool
+ \clist_map_inline:Nn \l__letgut_tmpa_clist {%
\file_if_exist:nTF {#3##1} {
\clist_map_break:n {
\bool_if:NT \g__letgut_included_files_attached_bool {
@@ -2014,14 +2017,14 @@ title .value_required:n = true,
}
}
\__letgut_orig_includegraphics[#2]{#3}
- \bool_gset_true:N \g_tmpa_bool
+ \bool_gset_true:N \g__letgut_tmpa_bool
}
}
}
- \bool_if:NF \g_tmpa_bool {
+ \bool_if:NF \g__letgut_tmpa_bool {
\@latex@error{File~ `#3'~ not~ found}%
{I~ could~ not~ locate~ the~ file~ with~ any~ of~ these~ extensions:^^J%
- \clist_use:Nn \l_tmpa_clist { ~ }^^J\@ehc}%
+ \clist_use:Nn \l__letgut_tmpa_clist { ~ }^^J\@ehc}%
}
}
}
@@ -2199,9 +2202,9 @@ literate=*%
}
\cs_new_protected:Nn \__letgut_on_callout_page:nn
{
- \tl_set:Nn \l_tmpa_int {\getpagerefnumber{#1}}
- \tl_set:Nn \l_tmpb_int {\thepage}
- \int_compare:nNnF {\l_tmpa_int} = {\l_tmpb_int}
+ \tl_set:Nn \l__letgut_tmpa_int {\getpagerefnumber{#1}}
+ \tl_set:Nn \l__letgut_tmpb_int {\thepage}
+ \int_compare:nNnF {\l__letgut_tmpa_int} = {\l__letgut_tmpb_int}
{#2}
}
\tl_set:Nn \l__letgut_reference_text_tl {
@@ -2245,17 +2248,17 @@ sidebyside@true/.code={%
\pgfkeysalso{floatplacement=ht}%
\pgfkeysalso{float}%
\pgfkeysalso{label={\g__letgut_label_ltx_example_str}}%
- \tl_set:Nx \l_tmpa_tl {
+ \tl_set:Nx \l__letgut_tmpa_tl {
\getpagerefnumber {
\g__letgut_callout_label_ltx_example_str
}
}
- \tl_set:Nx \l_tmpb_tl {
+ \tl_set:Nx \l__letgut_tmpb_tl {
\getpagerefnumber {
\g__letgut_label_ltx_example_str
}
}
- \tl_if_eq:NNF \l_tmpa_tl \l_tmpb_tl
+ \tl_if_eq:NNF \l__letgut_tmpa_tl \l__letgut_tmpb_tl
{
\l__letgut_reference_text_tl
\tl_set:Nn \l__letgut_reference_text_tl {
@@ -2337,17 +2340,17 @@ overlay={
\int_use:N \g__letgut_ltx_example_int
}
\label{\g__letgut_callout_label_ltx_example_str}
- \tl_set:Nx \l_tmpa_tl {
+ \tl_set:Nx \l__letgut_tmpa_tl {
\getpagerefnumber {
\g__letgut_callout_label_ltx_example_str
}
}
- \tl_set:Nx \l_tmpb_tl {
+ \tl_set:Nx \l__letgut_tmpb_tl {
\getpagerefnumber {
\g__letgut_label_ltx_example_str
}
}
- \tl_if_eq:NNF \l_tmpa_tl \l_tmpb_tl
+ \tl_if_eq:NNF \l__letgut_tmpa_tl \l__letgut_tmpb_tl
{
\skip_set_eq:NN \intextsep \c__letgut_reduced_intextsep_skip
}
@@ -2368,25 +2371,25 @@ overlay={
style=__letgut_reset_listings_styles,%
}
\tl_if_empty:nTF {#1} {
- \tl_set:Nx \l_tmpa_tl {
+ \tl_set:Nx \l__letgut_tmpa_tl {
alsolanguage={#2}
}
\exp_args:NV \__letgut_tcbset:n
{
- \l_tmpa_tl
+ \l__letgut_tmpa_tl
}
}{
- \seq_set_from_clist:Nn \l_tmpa_seq {#1}
- \seq_set_map_x:NNn \l_tmpb_seq \l_tmpa_seq {
+ \seq_set_from_clist:Nn \l__letgut_tmpa_seq {#1}
+ \seq_set_map_x:NNn \l__letgut_tmpb_seq \l__letgut_tmpa_seq {
alsolanguage={[##1]#2}
}
- \tl_set:Nx \l_tmpa_tl
+ \tl_set:Nx \l__letgut_tmpa_tl
{
- \seq_use:Nn \l_tmpb_seq {,}
+ \seq_use:Nn \l__letgut_tmpb_seq {,}
}
\exp_args:NV \__letgut_tcbset:n
{
- \l_tmpa_tl
+ \l__letgut_tmpa_tl
}
}
}
@@ -2513,7 +2516,7 @@ overlay={
}
\cs_new_protected:Npn \__letgut_terminal:nnnn #1 #2 #3 #4
{
- \bool_set_false:N \l_tmpa_bool
+ \bool_set_false:N \l__letgut_tmpa_bool
\tl_if_empty:nF {#3}{
\tcbset{tempfile=\jobname-stdin.tex}
\exp_args:Nx \scantokens
@@ -2534,7 +2537,7 @@ overlay={
}
\tl_if_empty:nTF {#3}{
\tl_if_empty:nTF {#4}{
- \bool_set_true:N \l_tmpa_bool
+ \bool_set_true:N \l__letgut_tmpa_bool
}{
\tcbset{colback=__letgut_background_terminal_stdout}
}
@@ -2550,7 +2553,7 @@ overlay={
}
}
}
- \bool_if:NF \l_tmpa_bool {
+ \bool_if:NF \l__letgut_tmpa_bool {
\begin{tcolorbox}[terminal={#1},#2]
\lstset{aboveskip=0pt}
\tl_if_empty:nF {#3}{
@@ -2597,6 +2600,7 @@ overlay={
^^^^215b% for ⅛
^^^^2122% for ™
^^^^2019% for ’
+ ^^^^0153% for œ
^^00%
}
\lst@RestoreCatcodes