diff options
author | Norbert Preining <norbert@preining.info> | 2021-12-08 03:02:13 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-12-08 03:02:13 +0000 |
commit | 0bfca40c9f89076ad634464a530fcc3e55d1d4e1 (patch) | |
tree | 7114d7d6b3ef883e247cfa80d6d36d0938b7c4f0 /macros/latex | |
parent | 6336c19969656f3ee5f0b0fed00aaf64369a40e7 (diff) |
CTAN sync 202112080302
Diffstat (limited to 'macros/latex')
30 files changed, 951 insertions, 313 deletions
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/README.md b/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/README.md index 6851759db6..3586a78da9 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/README.md +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/README.md @@ -1,4 +1,4 @@ -# Focus v2.9.0 +# Focus v3.0.0 A presentation theme for LaTeX Beamer that aims at a clean and minimalist design, so to minimize distractions and put the focus directly on the content. @@ -69,11 +69,17 @@ can be customized with: \footlineinfo{Custom footline text} ``` +For both footline styles the total frame number (shown by default) can be suppressed with: +```latex +\usetheme[totalframenumbering=no]{focus} +``` + The footline may also be disabled globally by typing: ```latex \usetheme[numbering=none]{focus} ``` + Customize fonts --------------- Focus is using the [Fira fonts](https://bboxtype.com/typefaces/FiraSans/) by default. @@ -102,7 +108,8 @@ Focus was initially created and designed by [Pasquale Africa](https://github.com The following people deserve appreciation and acknowledgment for improving the template with additions and modifications (in alphabetical order): -- Sebastian Friedl -- Benjamin Goldman +- [max](https://github.com/imntl) +- [MonsieurPi](https://github.com/MonsieurPi) +- [SFr682k](https://github.com/SFr682k) A more detailed contribution list is found [here](https://github.com/elauksap/focus-beamertheme/graphs/contributors). diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerouterthemefocus.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerouterthemefocus.sty index 9031ac0ca3..0f09243977 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerouterthemefocus.sty +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerouterthemefocus.sty @@ -68,6 +68,9 @@ \newlength{\focus@pbar@leftoffset} \newlength{\focus@pbar@rightoffset} +% Comparision token for totalframenumbering. +\def\no{no} + \defbeamertemplate*{footline}{progressbar}{% % If not appendix. \ifnum\mainend<0% From package appendixnumberbeamer. @@ -75,8 +78,13 @@ \settowidth{\focus@pbar@leftoffset}{1}% \addtolength{\focus@pbar@leftoffset}{1.5em}% % - \settowidth{\focus@pbar@rightoffset}{\inserttotalframenumber}% - \addtolength{\focus@pbar@rightoffset}{1.5em}% + \ifx\beamer@focus@totalframenumbering\no% + \settowidth{\focus@pbar@rightoffset}{}% + \addtolength{\focus@pbar@rightoffset}{0.5em}% + \else% + \settowidth{\focus@pbar@rightoffset}{\inserttotalframenumber}% + \addtolength{\focus@pbar@rightoffset}{1.5em}% + \fi% % % If not title page. \ifnum\value{realframenumber}>0% @@ -91,8 +99,11 @@ \fill[footline.bg] (\the\focus@pbar@leftoffset,0) rectangle ++(\focus@pbar@progress pt,\the\focus@pbar@height) ++(0,{-0.5*\the\focus@pbar@height}) node[anchor=east, text=footline.fg] {\strut\insertframenumber}; - \fill[footline.bg] (\paperwidth,0) rectangle ++(-\the\focus@pbar@rightoffset,\the\focus@pbar@height) - ++(0,{-0.5*\the\focus@pbar@height}) node[anchor=west, text=footline.fg] {\strut\inserttotalframenumber}; + \ifx\beamer@focus@totalframenumbering\no% + \else% + \fill[footline.bg] (\paperwidth,0) rectangle ++(-\the\focus@pbar@rightoffset,\the\focus@pbar@height) + ++(0,{-0.5*\the\focus@pbar@height}) node[anchor=west, text=footline.fg] {\strut\inserttotalframenumber}; + \fi% \end{tikzpicture}% \else% \begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex] @@ -100,8 +111,12 @@ \fill[footline.bg] (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height); \node[anchor=east, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\insertframenumber}; - \node[footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut/}; - \node[anchor=west, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\inserttotalframenumber}; + + \ifx\beamer@focus@totalframenumbering\no% + \else% + \node[footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut/}; + \node[anchor=west, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\inserttotalframenumber}; + \fi% \end{tikzpicture}% \fi% \fi% @@ -118,8 +133,13 @@ \settowidth{\focus@pbar@leftoffset}{1}% \addtolength{\focus@pbar@leftoffset}{1.5em}% % - \settowidth{\focus@pbar@rightoffset}{\inserttotalframenumber}% - \addtolength{\focus@pbar@rightoffset}{1.5em}% + \ifx\beamer@focus@totalframenumbering\no% + \settowidth{\focus@pbar@rightoffset}{}% + \addtolength{\focus@pbar@rightoffset}{0.5em}% + \else% + \settowidth{\focus@pbar@rightoffset}{\inserttotalframenumber}% + \addtolength{\focus@pbar@rightoffset}{1.5em}% + \fi% % % If not title page. \ifnum\value{realframenumber}>0% @@ -127,14 +147,18 @@ \clip (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height); \fill[footline.bg] (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height); - \ifx\focus@footlineinfo\empty - \else + \ifx\focus@footlineinfo\empty% + \else% \node[anchor=west, footline.fg] at ({\the\focus@pbar@leftoffset},{0.5*\focus@pbar@height}) {\focus@footlineinfo}; - \fi + \fi% \node[anchor=east, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\insertframenumber}; - \node[footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut/}; - \node[anchor=west, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\inserttotalframenumber}; + + \ifx\beamer@focus@totalframenumbering\no% + \else% + \node[footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut/}; + \node[anchor=west, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\inserttotalframenumber}; + \fi% \end{tikzpicture}% \fi% \fi% @@ -145,12 +169,19 @@ \DeclareOptionBeamer{numbering}{\def\beamer@focus@numbering{#1}} \ExecuteOptionsBeamer{numbering=progressbar} + +\DeclareOptionBeamer{totalframenumbering}{\def\beamer@focus@totalframenumbering{#1}} +\ExecuteOptionsBeamer{totalframenumbering=yes} + \ProcessOptionsBeamer \def\beamer@focus@numberingprogressbar{progressbar} \def\beamer@focus@numberingfullbar{fullbar} \def\beamer@focus@numberingnone{none} +\def\beamer@focus@totalframenumberingyes{yes} +\def\beamer@focus@totalframenumberingno{no} + % BACKGROUND CANVAS TEMPLATES. ------------------------------------------------- \defbeamertemplate*{background canvas}{focus}{% diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerthemefocus.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerthemefocus.sty index 37509b17d9..70effd6386 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerthemefocus.sty +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-focus/beamerthemefocus.sty @@ -19,7 +19,7 @@ % along with beamerthemefocus. If not, see <http://www.gnu.org/licenses/>. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamerthemefocus}[2021/07/19 v2.9.0 Focus Beamer theme] +\ProvidesPackage{beamerthemefocus}[2021/12/07 v3.0.0 Focus Beamer theme] \mode<presentation> @@ -29,6 +29,10 @@ \PassOptionsToPackage{numbering=#1}{beamerouterthemefocus} } +\DeclareOptionBeamer{totalframenumbering}{% + \PassOptionsToPackage{totalframenumbering=#1}{beamerouterthemefocus} +} + \newif\if@focus@loadfirafonts \@focus@loadfirafontstrue diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee-alphabetic.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee-alphabetic.pdf Binary files differindex 6ba29200cc..a833b32d26 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee-alphabetic.pdf +++ b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee-alphabetic.pdf diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee-alphabetic.tex b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee-alphabetic.tex index 8b6572b70e..142cfe3d76 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee-alphabetic.tex +++ b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee-alphabetic.tex @@ -24,8 +24,8 @@ \href{mailto:joseph.wright@morningstar2.co.uk} {\texttt{joseph.wright@morningstar2.co.uk}}}} \title{The \pkg{ieee-alphabetic} bibliography style for \pkg{biblatex}% - \footnote{This file describes v1.3e, last revised 2021/03/25.}} -\date{Released 2021/03/25} + \footnote{This file describes v1.3f, last revised 2021/12/06.}} +\date{Released 2021/12/06} \providecommand*{\pkg}[1]{\textsf{#1}} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee.pdf Binary files differindex 50d8653a03..c5f85504c6 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee.pdf +++ b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee.pdf diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee.tex b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee.tex index 884af775cd..734250debf 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee.tex +++ b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/biblatex-ieee.tex @@ -24,8 +24,8 @@ \href{mailto:joseph.wright@morningstar2.co.uk} {\texttt{joseph.wright@morningstar2.co.uk}}}} \title{The \pkg{ieee} bibliography style for \pkg{biblatex}% - \footnote{This file describes v1.3e, last revised 2021/03/25.}} -\date{Released 2021/03/25} + \footnote{This file describes v1.3f, last revised 2021/12/06.}} +\date{Released 2021/12/06} \providecommand*{\opt}[1]{\texttt{#1}} \providecommand*{\pkg}[1]{\textsf{#1}} @@ -72,6 +72,9 @@ immediately before \printbibliography \end{verbatim} +Control of the exact information in dates is best achieved by using the +\cs{AtEveryCite} command with appropriate data manipulation. + Also include in the bundle is a style using alphabetic labels, but otherwise following the guidelines of the \textsc{ieee}. This style should be loaded using @@ -143,6 +146,9 @@ be sent by e-mail to \changes{v1.3b}{2020/02/26}{Add quotes to website titles} \changes{v1.3d}{2020/12/17}{Adjust \texttt{online} type} \changes{v1.3e}{2021/03/25}{Adjust truncation of names list} +\changes{v1.3f}{2021/03/30}{Use \texttt{false} as the default for \texttt{dashed} setting} +\changes{v1.3f}{2021/04/12}{Fix brackets in \cs{supercite}} +\changes{v1.3f}{2021/12/01}{Adjust printing of series for books} \PrintChanges diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee-alphabetic.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee-alphabetic.bbx index ec11ab8dd0..ff82f97f55 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee-alphabetic.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee-alphabetic.bbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{ieee-alphabetic.bbx}[2021/03/25 v1.3e biblatex bibliography style] +\ProvidesFile{ieee-alphabetic.bbx}[2021/12/06 v1.3f biblatex bibliography style] \RequireBibliographyStyle{ieee} @@ -27,7 +27,7 @@ {\list {\printtext[labelalphawidth]{% \printfield{labelprefix}% - \printfield{labelalpha}% + \printfield{labelalpha}% \printfield{extraalpha}}} {\setlength{\labelwidth}{\labelalphawidth}% \setlength{\leftmargin}{\labelwidth}% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee-alphabetic.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee-alphabetic.cbx index 931fba463a..302517b02e 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee-alphabetic.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee-alphabetic.cbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{ieee-alphabetic.cbx}[2021/03/25 v1.3e biblatex citation style] +\ProvidesFile{ieee-alphabetic.cbx}[2021/12/06 v1.3f biblatex citation style] \RequireCitationStyle{alphabetic} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee.bbx index 6b42a71dba..77a8b6794d 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee.bbx @@ -8,11 +8,13 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{ieee.bbx}[2021/03/25 v1.3e biblatex bibliography style] +\ProvidesFile{ieee.bbx}[2021/12/06 v1.3f biblatex bibliography style] % Load the standard style to avoid copy-pasting unnecessary material \RequireBibliographyStyle{numeric-comp} +\newbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}} + % An option that carries through from author-year styles \DeclareBibliographyOption[boolean]{dashed}[true]{% \ifstrequal{#1}{true} @@ -26,7 +28,8 @@ minnames = 1, maxcitenames = 2, maxbibnames = 6, - sorting = none + sorting = none, + dashed = false, } \uspunctuation @@ -43,7 +46,7 @@ \mkpageprefix[bookpagination][\mkpagegrouped]{#1}% } \DeclareFieldFormat{sentencecase}{\bbx@colon@search{\MakeSentenceCase*}{#1}} -\DeclareFieldFormat[book,inbook,incollection,inproceedings]{series} +\DeclareFieldFormat[incollection,inproceedings]{series} {\bibstring{jourser}\addnbspace#1} \DeclareFieldFormat[online,report]{title}{\mkbibquote{#1\isdot}} \DeclareFieldFormat{url}{\bibstring{url}\addcolon\space\url{#1}} @@ -84,7 +87,6 @@ % Support for dashed author name replacement \InitializeBibliographyStyle{\global\undef\bbx@lasthash} -\newbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}} % Bibliography macros \renewbibmacro*{author}{% @@ -283,6 +285,16 @@ \printfield{pages}% } +\newbibmacro*{series+number(book)}{% + \iffieldundef{series}{} + {% + \setunit{\addspace}% + \printtext[parens]{% + \printfield{series}% + \setunit*{\addspace}% + \printfield{number}% + \newunit}}} + \renewbibmacro*{title}{% \ifboolexpr{ test {\iffieldundef{title}} @@ -494,7 +506,7 @@ \usebibmacro{author/editor+others/translator+others}% \setunit{\labelnamepunct}\newblock \usebibmacro{maintitle+title}% - \newunit + \usebibmacro{series+number(book)}% \printlist{language}% \newunit\newblock \printfield{edition}% @@ -505,7 +517,6 @@ \newunit\newblock \printfield{volumes}% \newunit\newblock - \usebibmacro{series+number}% \setunit{\adddot\addspace}% \newblock \usebibmacro{publisher+location+date}% @@ -548,7 +559,7 @@ \usebibmacro{in:}% \usebibmacro{bybookauthor}% \usebibmacro{maintitle+booktitle}% - \newunit\newblock + \usebibmacro{series+number(book)}% \usebibmacro{byeditor+others}% \newunit\newblock \printfield{edition}% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee.cbx index df2e02fc9d..877d645053 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-ieee/ieee.cbx @@ -8,7 +8,7 @@ %% --------------------------------------------------------------- %% -\ProvidesFile{ieee.cbx}[2021/03/25 v1.3e biblatex citation style] +\ProvidesFile{ieee.cbx}[2021/12/06 v1.3f biblatex citation style] \RequireCitationStyle{numeric-comp} @@ -33,6 +33,24 @@ \bibclosebracket } +\DeclareCiteCommand{\supercite}[\mkbibsuperscript] + {\usebibmacro{cite:init}% + \bibopenbracket + \let\multicitedelim=\supercitedelim + \let\multicitesubentrydelim=\supercitesubentrydelim + \let\multiciterangedelim=\superciterangedelim + \let\multicitesubentryrangedelim=\supercitesubentryrangedelim + \iffieldundef{prenote} + {} + {\BibliographyWarning{Ignoring prenote argument}}% + \iffieldundef{postnote} + {} + {\BibliographyWarning{Ignoring postnote argument}}} + {\usebibmacro{citeindex}% + \usebibmacro{cite:comp}} + {} + {\usebibmacro{cite:dump}% + \bibclosebracket} % The second step is to replace \multicitedelim and % \multicitesubentrydelim with a version wrapped in diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index b14146b58f..e2a2605b37 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -15,7 +15,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/12/06}{1.41H} +\ProvidesExplClass{easybook}{2021/12/06}{1.41I} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -99,7 +99,7 @@ { \eb_set_family:nnn { \CJKsfdefault } {#2} {#1} } \cs_new_protected:Npn \eb_setCJKmonofont:nn #1#2 { \eb_set_family:nnn { \CJKttdefault } {#2} {#1} } -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { main,sans,mono,CJKmain,CJKsans,CJKmono } { \exp_args:Nc \RenewDocumentCommand { set#1font }{O{}mO{}} @@ -321,7 +321,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/12/06}{1.41H} +\ProvidesExplPackage{easybase}{2021/12/06}{1.41I} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -336,7 +336,7 @@ \cs_set_protected:Npn \ctex_define:nn #1 { \keys_define:nn { ctex/#1 } } -\cs_new_protected:Npn \eb_clist_map_inline:nn #1#2 +\cs_new_protected:Npn \eb_seq_map_inline:nn #1#2 { \seq_set_from_clist:Nn \l_tmpa_seq {#1} \seq_map_inline:Nn \l_tmpa_seq {#2} @@ -349,7 +349,7 @@ } \cs_new_protected:Npn \eb_patch_cmd:wnn #1#2#3 { - \eb_clist_map_inline:nn {#1} + \eb_seq_map_inline:nn {#1} { \ctex_patch_cmd_once:NnnnTF ##1 { } {#2} {#3} { } { \ctex_patch_failure:N ##1 } @@ -367,7 +367,7 @@ } \cs_new_protected:Npn \eb_at_begin_environment:nn #1#2 { - \eb_clist_map_inline:nn {#1} + \eb_seq_map_inline:nn {#1} { \AtBeginEnvironment{##1}{#2} } } \cs_new_protected:Npn \eb_match_load_package:n #1 @@ -401,7 +401,7 @@ \RenewDocumentCommand{\usepackage}{O{}m} { \PassOptionsToPackage{#1}{#2} - \eb_clist_map_inline:nn {#2} + \eb_seq_map_inline:nn {#2} { \eb_if_package_loaded:nF {##1} { \eb@usepackage@save{##1} } @@ -469,7 +469,7 @@ \bool_new:N \l__eb_chap_counter_withpart_bool \tl_new:N \l__eb_foot_counter_parent_choice_tl -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { style,subfont,spread, refset,bibset,thmset, @@ -482,7 +482,7 @@ \keys_define:nn { } { ctex/link .inherit:n = ctex/refset } \ctex_define:n { link .meta:nn = { ctex/link } {#1} } \cs_set_eq:NN \link \refset -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { style,subfont,spread,bibset,thmset,hdrset,tocset } { \msg_new:nnn { easybase } { abandon-#1 } @@ -543,7 +543,7 @@ if~you~continue~compiling. \\\\ Please~update~your~macro~package~from~CTAN. } -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { { expl3 } { 2020/10/27 }, { xparse } { 2020/10/27 }, @@ -647,7 +647,7 @@ \booltrue{@mainmatter} \pagenumbering{arabic} } -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { chapter,section,subsection } { \exp_args:Nc \NewDocumentCommand { eb@mark@#1@label@layout } @@ -773,6 +773,18 @@ { \ding{\int_eval:n { 191 + #1 }} } \cs_new:Npn \eb_fnmate_counter_pisans_neg:N #1 { \ding{\int_eval:n { 201 + #1 }} } +\cs_new_protected:Npn \DefineFntSymbols #1#2#3 + { + \cs_set_protected:cpn { eb@use@fnt@symbol@#1 } + { + \cs_set:Npn \eb_int_to_symbols:n ####1 + { \int_to_symbols:nnn {####1} {#2} {#3} } + } + } +\cs_new_protected:Npn \setfntsymbol #1 + { \use:c { eb@use@fnt@symbol@#1 } } +\DefineFntSymbols{empty}{1}{} +\setfntsymbol{empty} \cs_new:Npn \eb_int_format_trans:NN #1 { \str_case:nn {#1} @@ -783,6 +795,7 @@ { I } { \int_to_Roman:n } { i } { \int_to_roman:n } { c } { \exp_args:NV \zhnumber } + { s } { \eb_int_to_symbols:n } } } \cs_new_protected:Npn \eb_fnmate_normal_label_set:nn #1#2 @@ -809,8 +822,8 @@ \cs_new_protected:Npn \eb_fnmate_short_label_set:nn #1#2 { \tl_set:Nn \l__eb_fnmate_short_tokens_tl {#1} - \eb_clist_map_inline:nn - { A,a,1,I,i,c } + \eb_seq_map_inline:nn + { A,a,1,I,i,c,s } { \tl_if_in:nnT {#1} {##1} { @@ -1231,7 +1244,7 @@ } \seq_map_function:NN \c__ctex_headings_seq \eb_toc_assign_keys:n -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { figure,table,lstlisting } { \ctex_define:n @@ -1240,7 +1253,7 @@ #1/tocline .cs_set:cp = { eb@toc@label@#1 } ##1, } } -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { tocformat,tocformat+,tocformat~+, tocindent,tocrule,tocline,tocafter,between @@ -1255,7 +1268,7 @@ } } } -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { tocafter,tocindent,tocrule } { \ctex_define:nn { tocset } @@ -1289,6 +1302,8 @@ hang .bool_set:N = \eb@titletoc@hang@fix@bool, hang .default:n = true, hang .initial:n = false, + pnumwd .code:n = \contentsmargin{#1}, + pnumwd .initial:n = 1.55em, unknown .code:n = \eb_msg_abandon_option:n { tocset } } \NewDocumentCommand{\tocrule}{st-O{0.7pc}D(){1.2}mO{}} @@ -1448,7 +1463,7 @@ \addcontentsline{tec}{#1}{\use:c { CTEX@#1@tocline }{#1}{#2}} \group_end: } -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { chapter,section,subsection } { \exp_args:Nc \NewDocumentCommand { bi#1 }{sO{##3}mm} @@ -1495,7 +1510,7 @@ connect-all .initial:n = { . }, unknown .code:n = \eb_msg_abandon_option:n { style } } -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { figure,table,lstlisting,equation } { \cs_set:cpn { the#1 } @@ -1616,7 +1631,7 @@ \exp_args:Nc \DeclareDocumentCommand { listof#1s }{st+o} {\eb_toc_list_parse:nnnnn {##1} {##2} {##3} {#1} {#2}} } -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { { figure } { lof }, { table } { lot }, @@ -1671,7 +1686,7 @@ binmuber .initial:n = \arabic{chapter} } \cs_new_protected:Npn \eb_counter_zero:n #1 - { \eb_clist_map_inline:nn {#1} { \setcounter{##1}{0} } } + { \eb_seq_map_inline:nn {#1} { \setcounter{##1}{0} } } \RenewDocumentCommand{\appendix} {O{Appendix\space}D(){\Alph{chapter}}} { @@ -1820,7 +1835,7 @@ }{} \cs_new_protected:Npn \eb_enumitem_label_set:nn #1#2 { \SetEnumitemValue{label}{#1}{\color{ctex@emph}#2} } -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { { bullet } { \textbullet }, { endash } { \normalfont\bfseries\textendash }, @@ -2243,7 +2258,7 @@ }, } } -\eb_clist_map_inline:nn +\eb_seq_map_inline:nn { { linkcolor } { link }, { color } { theme } @@ -2299,7 +2314,7 @@ \cs_new_protected:Npn \eb_link_toc_put:n #1 { \eb_put_hyperref:n { linktoc = #1 } - \eb_clist_map_inline:nn { page,none } + \eb_seq_map_inline:nn { page,none } { \tl_if_eq:NnT \l_keys_value_tl {##1} { @@ -2402,7 +2417,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/06}{1.41H} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/06}{1.41I} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \setexercise #1 diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf Binary files differindex f38d3de8a9..aed29d91ad 100644 --- a/macros/latex/contrib/easybook/easybook.pdf +++ b/macros/latex/contrib/easybook/easybook.pdf diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index d92ea609a2..f2796f7684 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -20,7 +20,7 @@ name = easybook, color-scheme = blue, title = EASYBOOK 使用手册, - version = v1.41H, + version = v1.41I, date = 2021/12/06, authors = 瞿毅, info = 排版简体中文学位论文和书籍, @@ -417,7 +417,11 @@ \keychoice{footwith}{part,chapter,page}\Default{chapter} 使脚注跟随编号的计数器,默认跟随章,当开启新的一章时脚注编号从 1 开始。 \keyval-{rulewidth}{刚性长度}\Default{0.6pt} - 统一调整页眉、定理盒子以及代码框等线条的粗细。 + 统一调整页眉、定理盒子以及代码等边框线条的粗细。需要单独设置代码和定理盒子边框线条的粗细时可用它们的宏包自带命令: + \begin{ctexexam} + \lstset{framerule = 0.5pt} + \tcbset{boxrule = 0.5pt} + \end{ctexexam} \keybool{uppercase}\Default{true} 使用 \cs*{rightmark} 及 \cs*{leftmark} 标题标记命令获取标题内容时英文是否大写。 \kvsplit{brackets}{左括号,右括号}\Default{\Carg{(\black{,})}} @@ -741,11 +745,21 @@ \keychoice{fnmark-num}{plain,pifont,pifont*,pisans,pisans*,short num}\Default{plain} 脚注正文标记编号的类型,默认为原生样式 \code{plain},还可以改为 \code{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括 1-10。 - 短编号的形式与列表环境类似,不过增加了一个中文数字格式参数 \code{c}。原生样式 \code{plain} 等同于单独使用数字 \code{1} 参数。这个选项可以用在正文中改变其后脚注编号类型。 + 短编号的形式与列表环境类似,不过增加了中文数字 \code{c} 和符号 \code{s} 格式参数。原生样式 \code{plain} 等同于单独使用数字 \code{1} 参数。这个选项可以用在正文中改变其后脚注编号类型。 \begin{ctexexam} \hdrset{fnmark-num = 1} % 等于编号类型plain \hdrset{fnmark-num = (a)} \end{ctexexam} + \begin{commands}\noitemsep + \command{DefineFntSymbols}[\marg{符号表名}\marg{符号数量}\marg{符号列表}]\default{} + \command{setfntsymbol}[\marg{符号表名}] + 这两个命令用于在脚注短编号标记为 \code{s} 自定义符号型时设置符号列表。\cs{DefineFntSymbols} 命令用于设置符号列表,\cs{setfntsymbol} 命令用于选择已定义符号列表。默认的脚注符号列表是空的,定义新列表时应注意 \meta{符号列表} 的写法和命令顺序: + \begin{ctexexam} + \DefineFntSymbols{myfnsymb}{2}{{1}{*}{2}{@}} + \setfntsymbol{myfnsymb} + \hdrset{fnmark-num = s} + \end{ctexexam} + \end{commands} \keychoice{fntext-num}{plain,pifont,pifont*,pisans,pisans*,short num}\Default{plain} 脚注内容标记编号的类型,用法与 \option{fnmark-num} 一样,所以脚注内容与正文标记编号类型\textbf{可以不同}。 \keychoice{fnmate-num}{plain,pifont,pifont*,pisans,pisans*,short num}\Default{plain} @@ -835,7 +849,9 @@ \keyval-{between}{目录代码钩子} 目录标题与内容间的钩子,一般插入负的垂直距离代码,用于抵消目录首行额外的垂直间距。一级路径此选项对应文档主目录的钩子,二级路径为 \module*{figure}、\module*{table} 和 \module*{lstlisting},或者用位于 \module*{list} 路径的此选项统一设置相应类型目录的钩子。 \keybool{dotalign}\Default{true} - 引导线选项 \option{dotalign} 可以使目录引导线右端对齐并与页码保持一定间隙,否则会与页码连接。 + 引导线选项 \option{dotalign} 可以使目录引导线右端对齐并与页码保持一定间距,否则会与页码相连。 + \keyval-{pnumwd}{刚性长度}\Default{1.55em} + 目录条目页码的宽度。开启 \option{dotalign} 选项时宽度越大引导线与页码的距离就越大。 \keyval-{tocafter-all}{距离命令}\Default{\cs*{hspace}\Carg{1em}} 统一设置所有级别在目录中标签与标题间的代码。 \keyval-{tocindent-all}{刚性长度} @@ -860,7 +876,7 @@ \environment*{tabularx}[\marg{长度}\marg{列格式}]\default{} \environment*{tabular}[\marg{列格式}]\default{} \environment{tblr}[\marg{键值列表}] - \pkg*{tabularray} 是一个较新且强大的表格宏包,不依赖其它表格宏包所以同时使用不会产生冲突。不仅提供 \pkg*{tabularx}、\pkg*{multirow} 和 \pkg*{booktabs} 等宏包的功能,还实现了用键值列表方式简便地设置表格样式。具体用法可见宏包的说明文档,下面演示一个 \env{tblr} 表格的用法: + \pkg*{tabularray} 是一个强大且全面的表格宏包,不依赖其它表格宏包所以同时使用不会产生冲突。不仅提供了各种传统表格宏包的功能,还实现了用键值列表方式简便地设置表格样式。具体用法可见宏包的说明文档,下面演示一个 \env{tblr} 表格的用法: \begin{ctexexam} \begin{tblr} { diff --git a/macros/latex/contrib/zref-check/CHANGELOG.md b/macros/latex/contrib/zref-check/CHANGELOG.md index 7ce9594a63..ba18c24d59 100644 --- a/macros/latex/contrib/zref-check/CHANGELOG.md +++ b/macros/latex/contrib/zref-check/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog -## [Unreleased](https://github.com/gusbrs/zref-check/compare/v0.2.1...HEAD) +## [Unreleased](https://github.com/gusbrs/zref-check/compare/v0.2.2...HEAD) + +## [v0.2.2](https://github.com/gusbrs/zref-check/compare/v0.2.1...v0.2.2) (2021-12-07) + +### Changed +- Option values `msglevel=obeydraft`, `msglevel=obeyfinal`, + `onpage=obeydraft`, and `onpage=obeyfinal` have been respectively renamed to + `msglevel=infoifdraft`, `msglevel=warniffinal`, `onpage=labelseqifdraft`, + and `onpage=msgiffinal`. Previous values have been deprecated. +- Spare setting end label for `\zctarget` with empty text argument. ## [v0.2.1](https://github.com/gusbrs/zref-check/compare/v0.2.0...v0.2.1) (2021-09-16) diff --git a/macros/latex/contrib/zref-check/MANIFEST.md b/macros/latex/contrib/zref-check/MANIFEST.md new file mode 100644 index 0000000000..3da3e90910 --- /dev/null +++ b/macros/latex/contrib/zref-check/MANIFEST.md @@ -0,0 +1,286 @@ +# Manifest for zref-check + +This file is a listing of all files considered to be part of this package. +It is automatically generated with `l3build manifest`. + + +## Repository manifest + +The following groups list the files included in the development repository of the package. +Files listed with a ‘†’ marker are included in the TDS but not CTAN files, and files listed +with ‘‡’ are included in both. + +### Source files + +These are source files for a number of purposes, including the `unpack` process which +generates the installation files of the package. Additional files included here will also +be installed for processing such as testing. + +* zref-check.dtx ‡ +* zref-check.ins ‡ + +### Typeset documentation source files + +These files are typeset using LaTeX to produce the PDF documentation for the package. + +* zref-check-code.tex ‡ +* zref-check.tex ‡ + +### Text files + +Plain text files included as documentation or metadata. + +* CHANGELOG.md ‡ +* MANIFEST.md ‡ +* README.md ‡ +* readme-ctan.md +* DEPENDS.txt ‡ + +### Derived files + +The files created by ‘unpacking’ the package sources. This typically includes +`.sty` and `.cls` files created from DocStrip `.dtx` files. + +* zref-check.sty † + +### Typeset documents + +The output files (PDF, essentially) from typesetting the various source, demo, +etc., package files. + +* zref-check-code.pdf ‡ +* zref-check.pdf ‡ + +### Test files + +These files form the test suite for the package. `.lvt` or `.lte` files are the individual +unit tests, and `.tlg` are the stored output for ensuring changes to the package produce +the same output. These output files are sometimes shared and sometime specific for +different engines (pdfTeX, XeTeX, LuaTeX, etc.). + +* zc-babel01.lvt +* zc-babel02.lvt +* zc-babel03.lvt +* zc-babel04.lvt +* zc-check-above01.lvt +* zc-check-after01.lvt +* zc-check-before01.lvt +* zc-check-below01.lvt +* zc-check-chapsafter01.lvt +* zc-check-chapsbefore01.lvt +* zc-check-close01.lvt +* zc-check-facing01.lvt +* zc-check-facing02.lvt +* zc-check-facing03.lvt +* zc-check-far01.lvt +* zc-check-multi01.lvt +* zc-check-nextchap01.lvt +* zc-check-nextpage01.lvt +* zc-check-nextpage02.lvt +* zc-check-nextsec01.lvt +* zc-check-pagegap01.lvt +* zc-check-pagesafter01.lvt +* zc-check-pagesafter02.lvt +* zc-check-pagesbefore01.lvt +* zc-check-pagesbefore02.lvt +* zc-check-ppafter01.lvt +* zc-check-ppafter02.lvt +* zc-check-ppbefore01.lvt +* zc-check-ppbefore02.lvt +* zc-check-prevchap01.lvt +* zc-check-prevpage01.lvt +* zc-check-prevpage02.lvt +* zc-check-prevsec01.lvt +* zc-check-secsafter01.lvt +* zc-check-secsbefore01.lvt +* zc-check-thischap01.lvt +* zc-check-thispage01.lvt +* zc-check-thispage02.lvt +* zc-check-thissec01.lvt +* zc-opt-closerange01.lvt +* zc-opt-closerange02.lvt +* zc-opt-hyperref01.lvt +* zc-opt-hyperref02.lvt +* zc-opt-hyperref03.lvt +* zc-opt-hyperref04.lvt +* zc-opt-hyperref05.lvt +* zc-opt-ignore01.lvt +* zc-opt-ignore02.lvt +* zc-opt-labelcmd01.lvt +* zc-opt-labelcmd02.lvt +* zc-opt-labelcmd03.lvt +* zc-opt-msglevel01.lvt +* zc-opt-msglevel02.lvt +* zc-opt-msglevel03.lvt +* zc-opt-msglevel04.lvt +* zc-opt-msglevel05.lvt +* zc-opt-msglevel06.lvt +* zc-opt-msglevel07.lvt +* zc-opt-msglevel08.lvt +* zc-opt-msglevel09.lvt +* zc-opt-msglevel10.lvt +* zc-opt-onpage01.lvt +* zc-opt-onpage02.lvt +* zc-opt-onpage03.lvt +* zc-opt-onpage04.lvt +* zc-opt-onpage05.lvt +* zc-opt-onpage06.lvt +* zc-opt-onpage07.lvt +* zc-opt-onpage08.lvt +* zc-opt-onpage09.lvt +* zc-babel01.luatex.tlg +* zc-babel01.luatexdev.tlg +* zc-babel01.tlg +* zc-babel01.xetex.tlg +* zc-babel01.xetexdev.tlg +* zc-babel02.luatex.tlg +* zc-babel02.luatexdev.tlg +* zc-babel02.tlg +* zc-babel02.xetex.tlg +* zc-babel02.xetexdev.tlg +* zc-babel03.luatex.tlg +* zc-babel03.luatexdev.tlg +* zc-babel03.tlg +* zc-babel03.xetex.tlg +* zc-babel03.xetexdev.tlg +* zc-babel04.luatex.tlg +* zc-babel04.luatexdev.tlg +* zc-babel04.tlg +* zc-babel04.xetex.tlg +* zc-babel04.xetexdev.tlg +* zc-check-above01.tlg +* zc-check-after01.tlg +* zc-check-before01.tlg +* zc-check-below01.tlg +* zc-check-chapsafter01.tlg +* zc-check-chapsbefore01.tlg +* zc-check-close01.tlg +* zc-check-facing01.tlg +* zc-check-facing02.tlg +* zc-check-facing03.tlg +* zc-check-far01.tlg +* zc-check-multi01.tlg +* zc-check-nextchap01.tlg +* zc-check-nextpage01.tlg +* zc-check-nextpage02.tlg +* zc-check-nextsec01.tlg +* zc-check-pagegap01.tlg +* zc-check-pagesafter01.tlg +* zc-check-pagesafter02.tlg +* zc-check-pagesbefore01.tlg +* zc-check-pagesbefore02.tlg +* zc-check-ppafter01.tlg +* zc-check-ppafter02.tlg +* zc-check-ppbefore01.tlg +* zc-check-ppbefore02.tlg +* zc-check-prevchap01.tlg +* zc-check-prevpage01.tlg +* zc-check-prevpage02.tlg +* zc-check-prevsec01.tlg +* zc-check-secsafter01.tlg +* zc-check-secsbefore01.tlg +* zc-check-thischap01.tlg +* zc-check-thispage01.tlg +* zc-check-thispage02.tlg +* zc-check-thissec01.tlg +* zc-opt-closerange01.tlg +* zc-opt-closerange02.tlg +* zc-opt-hyperref01.luatex.tlg +* zc-opt-hyperref01.luatexdev.tlg +* zc-opt-hyperref01.tlg +* zc-opt-hyperref01.xetex.tlg +* zc-opt-hyperref01.xetexdev.tlg +* zc-opt-hyperref02.luatex.tlg +* zc-opt-hyperref02.luatexdev.tlg +* zc-opt-hyperref02.tlg +* zc-opt-hyperref02.xetex.tlg +* zc-opt-hyperref02.xetexdev.tlg +* zc-opt-hyperref03.luatex.tlg +* zc-opt-hyperref03.luatexdev.tlg +* zc-opt-hyperref03.tlg +* zc-opt-hyperref03.xetex.tlg +* zc-opt-hyperref03.xetexdev.tlg +* zc-opt-hyperref04.luatex.tlg +* zc-opt-hyperref04.luatexdev.tlg +* zc-opt-hyperref04.tlg +* zc-opt-hyperref04.xetex.tlg +* zc-opt-hyperref04.xetexdev.tlg +* zc-opt-hyperref05.luatex.tlg +* zc-opt-hyperref05.luatexdev.tlg +* zc-opt-hyperref05.tlg +* zc-opt-hyperref05.xetex.tlg +* zc-opt-hyperref05.xetexdev.tlg +* zc-opt-ignore01.tlg +* zc-opt-ignore02.tlg +* zc-opt-labelcmd01.tlg +* zc-opt-labelcmd02.tlg +* zc-opt-labelcmd03.tlg +* zc-opt-msglevel01.tlg +* zc-opt-msglevel02.tlg +* zc-opt-msglevel03.tlg +* zc-opt-msglevel04.tlg +* zc-opt-msglevel05.tlg +* zc-opt-msglevel06.tlg +* zc-opt-msglevel07.tlg +* zc-opt-msglevel08.tlg +* zc-opt-msglevel09.tlg +* zc-opt-msglevel10.tlg +* zc-opt-onpage01.tlg +* zc-opt-onpage02.tlg +* zc-opt-onpage03.tlg +* zc-opt-onpage04.tlg +* zc-opt-onpage05.tlg +* zc-opt-onpage06.tlg +* zc-opt-onpage07.tlg +* zc-opt-onpage08.tlg +* zc-opt-onpage09.tlg + + +## TDS manifest + +The following groups list the files included in the TeX Directory Structure used to install +the package into a TeX distribution. + +### Source files (TDS) + +All files included in the `zref-check/source` directory. + +* zref-check.dtx +* zref-check.ins + +### TeX files (TDS) + +All files included in the `zref-check/tex` directory. + +* zref-check.sty + +### Doc files (TDS) + +All files included in the `zref-check/doc` directory. + +* CHANGELOG.md +* DEPENDS.txt +* MANIFEST.md +* README.md +* zref-check-code.pdf +* zref-check-code.tex +* zref-check.pdf +* zref-check.tex + + +## CTAN manifest + +The following group lists the files included in the CTAN package. + +### CTAN files + +* CHANGELOG.md +* DEPENDS.txt +* MANIFEST.md +* README.md +* zref-check-code.pdf +* zref-check-code.tex +* zref-check.dtx +* zref-check.ins +* zref-check.pdf +* zref-check.tex diff --git a/macros/latex/contrib/zref-check/zref-check-code.pdf b/macros/latex/contrib/zref-check/zref-check-code.pdf Binary files differindex f2af1c0794..684e53eabf 100644 --- a/macros/latex/contrib/zref-check/zref-check-code.pdf +++ b/macros/latex/contrib/zref-check/zref-check-code.pdf diff --git a/macros/latex/contrib/zref-check/zref-check-code.tex b/macros/latex/contrib/zref-check/zref-check-code.tex index d9ee1c58d0..eb649833cd 100644 --- a/macros/latex/contrib/zref-check/zref-check-code.tex +++ b/macros/latex/contrib/zref-check/zref-check-code.tex @@ -24,9 +24,7 @@ % zref-check.ins, % zref-check.tex, % zref-check-code.tex, -% and the derived files zref-check.sty and -% zref-check.pdf, -% zref-check-code.pdf. +% and the files listed in MANIFEST.md. % % The released version of this package is available from CTAN. % @@ -66,7 +64,7 @@ \title{% The \pkg{zref-check} package implementation% - \thanks{This file describes \fileversion, last revised \filedate.}% + \thanks{This file describes \fileversion, released \filedate.}% } \author{% diff --git a/macros/latex/contrib/zref-check/zref-check.dtx b/macros/latex/contrib/zref-check/zref-check.dtx index 584cf1b316..fb4e93c857 100644 --- a/macros/latex/contrib/zref-check/zref-check.dtx +++ b/macros/latex/contrib/zref-check/zref-check.dtx @@ -24,9 +24,7 @@ % zref-check.ins, % zref-check.tex, % zref-check-code.tex, -% and the derived files zref-check.sty and -% zref-check.pdf, -% zref-check-code.pdf. +% and the files listed in MANIFEST.md. % % The released version of this package is available from CTAN. % @@ -306,7 +304,7 @@ % Section~\ref{sec:user-interface}) in the preamble. Most options can also be % used with local effects, through the optional argument of \cs{zcheck}. % -% \DescribeOption{hyperref} +% \DescribeOption{hyperref} % % Controls the use of \pkg{hyperref} by \pkg{zref-check} and takes values % \opt{auto}, \opt{true}, \opt{false}. The default value, \opt{auto}, makes % \pkg{zref-check} use \pkg{hyperref} if it is loaded, meaning \cs{zcheck} can @@ -319,47 +317,47 @@ % hyperlinking by means of its starred version. % % -% \DescribeOption{msglevel} +% \DescribeOption{msglevel} % % Sets the level of messages issued by \cs{zcheck} failed checks and takes -% values \opt{warn}, \opt{info}, \opt{none}, \opt{obeydraft}, \opt{obeyfinal}. -% The default value, \opt{warn}, issues messages both to the terminal and to -% the log file, \opt{info} issues messages to the log file only, \opt{none} -% suppresses all messages. \opt{obeydraft} corresponds to \opt{info} if -% option \opt{draft} is passed to \cs{documentclass}, and to \opt{warn} -% otherwise. \opt{obeyfinal} corresponds to \opt{warn} if option \opt{final} -% is (explicitly) passed to \cs{documentclass} and \opt{info} otherwise. -% \opt{ignore} is provided as convenience alias for \opt{msglevel=none} for -% local use only. This option only affects the messages issued by the checks -% in \cs{zcheck}, not other messages or warnings of the package. In -% particular, it does not affect warnings issued for undefined labels, which -% just use \cs{zref@refused} and thus are the same as standard \LaTeX{} ones -% for this purpose. -% -% -% \DescribeOption{onpage} +% values \opt{warn}, \opt{info}, \opt{none}, \opt{infoifdraft}, +% \opt{warniffinal}. The default value, \opt{warn}, issues messages both to +% the terminal and to the log file, \opt{info} issues messages to the log file +% only, \opt{none} suppresses all messages. \opt{infoifdraft} corresponds to +% \opt{info} if option \opt{draft} is passed to \cs{documentclass}, and to +% \opt{warn} otherwise. \opt{warniffinal} corresponds to \opt{warn} if option +% \opt{final} is (explicitly) passed to \cs{documentclass} and \opt{info} +% otherwise. \opt{ignore} is provided as convenience alias for +% \opt{msglevel=none} for local use only. This option only affects the +% messages issued by the checks in \cs{zcheck}, not other messages or warnings +% of the package. In particular, it does not affect warnings issued for +% undefined labels, which just use \cs{zref@refused} and thus are the same as +% standard \LaTeX{} ones for this purpose. +% +% +% \DescribeOption{onpage} % % Allows to control the messaging style for ``within page checks'', and takes -% values \opt{labelseq}, \opt{msg}, \opt{obeydraft}, \opt{obeyfinal}. The -% default, \opt{labelseq}, uses the labels' shipout sequence, as retrieved +% values \opt{labelseq}, \opt{msg}, \opt{labelseqifdraft}, \opt{msgiffinal}. +% The default, \opt{labelseq}, uses the labels' shipout sequence, as retrieved % from the \file{.aux} file, to infer relative position within the page. % \opt{msg} also uses the same method for checking relative position, but % issues a (different) message \emph{even if the check passes}, to provide a % simple workflow for robust checking of ``false negatives'', considering the % label sequence is not fool proof (for details and workflow recommendations, % see Section~\ref{sec:within-page-checks}). \opt{msg} also issues its -% messages at the same level defined in \opt{msglevel}. \opt{obeydraft} +% messages at the same level defined in \opt{msglevel}. \opt{labelseqifdraft} % corresponds to \opt{labelseq} if option \opt{draft} is passed to -% \cs{documentclass} and to \opt{msg} otherwise. \opt{obeyfinal} corresponds +% \cs{documentclass} and to \opt{msg} otherwise. \opt{msgiffinal} corresponds % to \opt{msg} if option \opt{final} is (explicitly) passed to % \cs{documentclass}, and to \opt{labelseq} otherwise. % % -% \DescribeOption{closerange} +% \DescribeOption{closerange} % % Defines the width of the range of pages, relative to the reference, that are % considered ``close'' by the \opt{close} check. Takes a positive integer as % value, with default 5. % % -% \DescribeOption{labelcmd} +% \DescribeOption{labelcmd} % % Defines the command used to set the user labels in \cs{zctarget} and % \texttt{zcregion}. Takes a control sequence \emph{name} as value, and the % default sets labels with the minimal required properties, those of the @@ -486,12 +484,12 @@ % false positives (getting a warning when it was not due), but with false % negatives (not getting a warning when it was due). Hence, setting % \opt{onpage} to \opt{msg} at a final typesetting stage (or just set it to -% \opt{obeydraft} or \opt{obeyfinal} if that's part of your workflow) provides -% a way to easily identify all cases of such checks (failing or passing), and -% double-check them. In case the test is passing though, the message is -% different from that of a failing check, to quickly convey why you are -% getting the message. This option can also be set at the local level, if the -% page in question is known to be problematic, or just atypical. +% \opt{labelseqifdraft} or \opt{msgiffinal} if that's part of your workflow) +% provides a way to easily identify all cases of such checks (failing or +% passing), and double-check them. In case the test is passing though, the +% message is different from that of a failing check, to quickly convey why you +% are getting the message. This option can also be set at the local level, if +% the page in question is known to be problematic, or just atypical. % % % \subsection{Sectioning checks} @@ -563,7 +561,7 @@ % % Identify the package. % \begin{macrocode} -\ProvidesExplPackage {zref-check} {2021-09-16} {0.2.1} +\ProvidesExplPackage {zref-check} {2021-12-07} {0.2.2} {Flexible cross-references with contextual checks based on zref} % \end{macrocode} % @@ -582,10 +580,9 @@ % Provide absolute counters for section and chapter, and respective % \pkg{zref} properties, so that we can make checks about relation of % chapters/sections regardless of internal counters, since we don't get -% those for the unnumbered (starred) ones. About the proper place to make -% the hooks for this purpose, see -% \url{https://tex.stackexchange.com/q/605533/105447} (thanks Ulrike -% Fischer). +% those for the unnumbered (starred) ones. Thanks Ulrike Fischer for +% suggestions at TeX.SX about the proper place to make the hooks for this +% purpose. % \begin{macrocode} \int_new:N \g_@@_abschap_int \int_new:N \g_@@_abssec_int @@ -681,7 +678,7 @@ \msg_new:nnn { zref-check } { hyperref-preamble-only } { Option~'hyperref'~only~available~in~the~preamble. \iow_newline: - Use~the~starred~version~of~'\noexpand\zcheck'~instead. + Use~the~starred~version~of~'\iow_char:N\\zcheck'~instead. } \msg_new:nnn { zref-check } { missing-hyperref } { Missing~'hyperref'~package. \iow_newline: Setting~'hyperref=false'. } @@ -702,6 +699,11 @@ Control~sequence~named~'#1'~used~in~option~'labelcmd'~is~not~defined.~ Using~default~value. } +\msg_new:nnn { zref-check } { option-deprecated } + { + Option~'#1'~has~been~deprecated.\iow_newline: + Use~'#2'~as~a~replacement. + } % \end{macrocode} % % @@ -829,18 +831,30 @@ { \tl_set:Nn \l_@@_msglevel_tl { info } } , msglevel / none .code:n = { \tl_set:Nn \l_@@_msglevel_tl { none } } , - msglevel / obeydraft .code:n = + msglevel / infoifdraft .code:n = { \ifdraft { \tl_set:Nn \l_@@_msglevel_tl { info } } { \tl_set:Nn \l_@@_msglevel_tl { warning } } } , - msglevel / obeyfinal .code:n = + msglevel / warniffinal .code:n = { \ifoptionfinal { \tl_set:Nn \l_@@_msglevel_tl { warning } } { \tl_set:Nn \l_@@_msglevel_tl { info } } } , + msglevel / obeydraft .code:n = + { + % NOTE Option value deprecated in 2021-12-07 for v0.2.2. + \msg_warning:nnnn { zref-check }{ option-deprecated } + { msglevel=obeydraft } { msglevel=infoifdraft } + } , + msglevel / obeyfinal .code:n = + { + % NOTE Option value deprecated in 2021-12-07 for v0.2.2. + \msg_warning:nnnn { zref-check }{ option-deprecated } + { msglevel=obeyfinal } { msglevel=warniffinal } + } , msglevel .value_required:n = true , msglevel .initial:n = warn , % \end{macrocode} @@ -879,18 +893,30 @@ { \bool_set_true:N \l_@@_msgonpage_bool } , - onpage / obeydraft .code:n = + onpage / labelseqifdraft .code:n = { \ifdraft { \bool_set_false:N \l_@@_msgonpage_bool } { \bool_set_true:N \l_@@_msgonpage_bool } } , - onpage / obeyfinal .code:n = + onpage / msgiffinal .code:n = { \ifoptionfinal { \bool_set_true:N \l_@@_msgonpage_bool } { \bool_set_false:N \l_@@_msgonpage_bool } } , + onpage / obeydraft .code:n = + { + % NOTE Option value deprecated in 2021-12-07 for v0.2.2. + \msg_warning:nnnn { zref-check }{ option-deprecated } + { onpage=obeydraft } { onpage=labelseqifdraft } + } , + onpage / obeyfinal .code:n = + { + % NOTE Option value deprecated in 2021-12-07 for v0.2.2. + \msg_warning:nnnn { zref-check }{ option-deprecated } + { onpage=obeyfinal } { onpage=msgiffinal } + } , onpage .value_required:n = true , onpage .initial:n = labelseq } @@ -1500,8 +1526,11 @@ \refstepcounter { zrefcheck } \zref@wrapper@babel \@@_target_label:n {#1} #2 - \zref@wrapper@babel - \zref@labelbylist { \@@_end_lblfmt:n {#1} } { zrefcheck-end } + \tl_if_empty:nF {#2} + { + \zref@wrapper@babel + \zref@labelbylist { \@@_end_lblfmt:n {#1} } { zrefcheck-end } + } \group_end: } % \end{macrocode} diff --git a/macros/latex/contrib/zref-check/zref-check.ins b/macros/latex/contrib/zref-check/zref-check.ins index 4a18782a2d..6d3a14b1cc 100644 --- a/macros/latex/contrib/zref-check/zref-check.ins +++ b/macros/latex/contrib/zref-check/zref-check.ins @@ -24,9 +24,7 @@ % zref-check.ins, % zref-check.tex, % zref-check-code.tex, -% and the derived files zref-check.sty and -% zref-check.pdf, -% zref-check-code.pdf. +% and the files listed in MANIFEST.md. % % The released version of this package is available from CTAN. % @@ -72,9 +70,7 @@ This work consists of the files zref-check.dtx, zref-check.ins, zref-check.tex, zref-check-code.tex, - and the derived files zref-check.sty and - zref-check.pdf, - zref-check-code.pdf. + and the files listed in MANIFEST.md. The released version of this package is available from CTAN. diff --git a/macros/latex/contrib/zref-check/zref-check.pdf b/macros/latex/contrib/zref-check/zref-check.pdf Binary files differindex 2197eda816..f475161f4c 100644 --- a/macros/latex/contrib/zref-check/zref-check.pdf +++ b/macros/latex/contrib/zref-check/zref-check.pdf diff --git a/macros/latex/contrib/zref-check/zref-check.tex b/macros/latex/contrib/zref-check/zref-check.tex index 0edf9557f8..6f22318782 100644 --- a/macros/latex/contrib/zref-check/zref-check.tex +++ b/macros/latex/contrib/zref-check/zref-check.tex @@ -24,9 +24,7 @@ % zref-check.ins, % zref-check.tex, % zref-check-code.tex, -% and the derived files zref-check.sty and -% zref-check.pdf, -% zref-check-code.pdf. +% and the files listed in MANIFEST.md. % % The released version of this package is available from CTAN. % @@ -55,7 +53,7 @@ \title{% The \pkg{zref-check} package% - \thanks{This file describes \fileversion, last revised \filedate.}% + \thanks{This file describes \fileversion, released \filedate.}% } \author{% diff --git a/macros/latex/contrib/zref-clever/CHANGELOG.md b/macros/latex/contrib/zref-clever/CHANGELOG.md index dc8ce5a3eb..e190d38d68 100644 --- a/macros/latex/contrib/zref-clever/CHANGELOG.md +++ b/macros/latex/contrib/zref-clever/CHANGELOG.md @@ -1,8 +1,16 @@ # Changelog -## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.1.0-alpha...HEAD) +## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.1.1-alpha...HEAD) -## [v0.1.0-alpha] +## [v0.1.1-alpha](https://github.com/gusbrs/zref-clever/compare/v0.1.0-alpha...v0.1.1-alpha) (2021-12-07) + +### Changed +- Improvements to the French dictionary (see issue + [#1](https://github.com/gusbrs/zref-clever/issues/1)). +- Dropped the `subappendix` reference type. +- Improvements to documentation. + +## [v0.1.0-alpha](https://github.com/gusbrs/zref-clever/releases/tag/v0.1.0-alpha) (2021-00-24) ### Added - Initial release. diff --git a/macros/latex/contrib/zref-clever/MANIFEST.md b/macros/latex/contrib/zref-clever/MANIFEST.md index 98f72887da..e40fb05bf0 100644 --- a/macros/latex/contrib/zref-clever/MANIFEST.md +++ b/macros/latex/contrib/zref-clever/MANIFEST.md @@ -1,7 +1,7 @@ # Manifest for zref-clever This file is a listing of all files considered to be part of this package. -It is automatically generated with `texlua build.lua manifest`. +It is automatically generated with `l3build manifest`. ## Repository manifest @@ -125,174 +125,282 @@ different engines (pdfTeX, XeTeX, LuaTeX, etc.). * zc-workaround-breqn01.lvt * zc-zcref-options01.lvt * zc-LanguageSetup01.luatex.tlg +* zc-LanguageSetup01.luatexdev.tlg * zc-LanguageSetup01.tlg * zc-LanguageSetup01.xetex.tlg +* zc-LanguageSetup01.xetexdev.tlg * zc-RefTypeSetup01.luatex.tlg +* zc-RefTypeSetup01.luatexdev.tlg * zc-RefTypeSetup01.tlg * zc-RefTypeSetup01.xetex.tlg +* zc-RefTypeSetup01.xetexdev.tlg * zc-class-article01.luatex.tlg +* zc-class-article01.luatexdev.tlg * zc-class-article01.tlg * zc-class-article01.xetex.tlg +* zc-class-article01.xetexdev.tlg * zc-class-book01.luatex.tlg +* zc-class-book01.luatexdev.tlg * zc-class-book01.tlg * zc-class-book01.xetex.tlg +* zc-class-book01.xetexdev.tlg * zc-class-memoir01.luatex.tlg +* zc-class-memoir01.luatexdev.tlg * zc-class-memoir01.tlg * zc-class-memoir01.xetex.tlg +* zc-class-memoir01.xetexdev.tlg * zc-class-report01.luatex.tlg +* zc-class-report01.luatexdev.tlg * zc-class-report01.tlg * zc-class-report01.xetex.tlg +* zc-class-report01.xetexdev.tlg * zc-class-scrartcl01.luatex.tlg +* zc-class-scrartcl01.luatexdev.tlg * zc-class-scrartcl01.tlg * zc-class-scrartcl01.xetex.tlg +* zc-class-scrartcl01.xetexdev.tlg * zc-class-scrbook01.luatex.tlg +* zc-class-scrbook01.luatexdev.tlg * zc-class-scrbook01.tlg * zc-class-scrbook01.xetex.tlg +* zc-class-scrbook01.xetexdev.tlg * zc-class-scrreprt01.luatex.tlg +* zc-class-scrreprt01.luatexdev.tlg * zc-class-scrreprt01.tlg * zc-class-scrreprt01.xetex.tlg +* zc-class-scrreprt01.xetexdev.tlg * zc-compat-amsmath01.luatex.tlg +* zc-compat-amsmath01.luatexdev.tlg * zc-compat-amsmath01.tlg * zc-compat-amsmath01.xetex.tlg +* zc-compat-amsmath01.xetexdev.tlg * zc-compat-appendices01.luatex.tlg +* zc-compat-appendices01.luatexdev.tlg * zc-compat-appendices01.tlg * zc-compat-appendices01.xetex.tlg +* zc-compat-appendices01.xetexdev.tlg * zc-compat-appendix01.luatex.tlg +* zc-compat-appendix01.luatexdev.tlg * zc-compat-appendix01.tlg * zc-compat-appendix01.xetex.tlg +* zc-compat-appendix01.xetexdev.tlg * zc-compat-breqn01.luatex.tlg +* zc-compat-breqn01.luatexdev.tlg * zc-compat-breqn01.tlg * zc-compat-breqn01.xetex.tlg +* zc-compat-breqn01.xetexdev.tlg * zc-compat-enumitem01.luatex.tlg +* zc-compat-enumitem01.luatexdev.tlg * zc-compat-enumitem01.tlg * zc-compat-enumitem01.xetex.tlg +* zc-compat-enumitem01.xetexdev.tlg * zc-compat-koma-script01.luatex.tlg +* zc-compat-koma-script01.luatexdev.tlg * zc-compat-koma-script01.tlg * zc-compat-koma-script01.xetex.tlg +* zc-compat-koma-script01.xetexdev.tlg * zc-compat-listings01.luatex.tlg +* zc-compat-listings01.luatexdev.tlg * zc-compat-listings01.tlg * zc-compat-listings01.xetex.tlg +* zc-compat-listings01.xetexdev.tlg * zc-compat-memoir01.luatex.tlg +* zc-compat-memoir01.luatexdev.tlg * zc-compat-memoir01.tlg * zc-compat-memoir01.xetex.tlg +* zc-compat-memoir01.xetexdev.tlg * zc-compat-subcaption01.luatex.tlg +* zc-compat-subcaption01.luatexdev.tlg * zc-compat-subcaption01.tlg * zc-compat-subcaption01.xetex.tlg +* zc-compat-subcaption01.xetexdev.tlg * zc-compat-subfig01.luatex.tlg +* zc-compat-subfig01.luatexdev.tlg * zc-compat-subfig01.tlg * zc-compat-subfig01.xetex.tlg +* zc-compat-subfig01.xetexdev.tlg * zc-dictionaries01.tlg * zc-dictionaries02.luatex.tlg +* zc-dictionaries02.luatexdev.tlg * zc-dictionaries02.tlg * zc-dictionaries02.xetex.tlg +* zc-dictionaries02.xetexdev.tlg * zc-howto-amsmath01.luatex.tlg +* zc-howto-amsmath01.luatexdev.tlg * zc-howto-amsmath01.tlg * zc-howto-amsmath01.xetex.tlg +* zc-howto-amsmath01.xetexdev.tlg * zc-howto-enumitem01.luatex.tlg +* zc-howto-enumitem01.luatexdev.tlg * zc-howto-enumitem01.tlg * zc-howto-enumitem01.xetex.tlg +* zc-howto-enumitem01.xetexdev.tlg * zc-howto-listings01.luatex.tlg +* zc-howto-listings01.luatexdev.tlg * zc-howto-listings01.tlg * zc-howto-listings01.xetex.tlg +* zc-howto-listings01.xetexdev.tlg * zc-howto-newfloat01.luatex.tlg +* zc-howto-newfloat01.luatexdev.tlg * zc-howto-newfloat01.tlg * zc-howto-newfloat01.xetex.tlg +* zc-howto-newfloat01.xetexdev.tlg * zc-howto-newfloat02.luatex.tlg +* zc-howto-newfloat02.luatexdev.tlg * zc-howto-newfloat02.tlg * zc-howto-newfloat02.xetex.tlg +* zc-howto-newfloat02.xetexdev.tlg * zc-howto-newfloat03.luatex.tlg +* zc-howto-newfloat03.luatexdev.tlg * zc-howto-newfloat03.tlg * zc-howto-newfloat03.xetex.tlg +* zc-howto-newfloat03.xetexdev.tlg * zc-howto-newfloat04.luatex.tlg +* zc-howto-newfloat04.luatexdev.tlg * zc-howto-newfloat04.tlg * zc-howto-newfloat04.xetex.tlg +* zc-howto-newfloat04.xetexdev.tlg * zc-howto-newfloat05.luatex.tlg +* zc-howto-newfloat05.luatexdev.tlg * zc-howto-newfloat05.tlg * zc-howto-newfloat05.xetex.tlg +* zc-howto-newfloat05.xetexdev.tlg * zc-howto-newtheorem01.luatex.tlg +* zc-howto-newtheorem01.luatexdev.tlg * zc-howto-newtheorem01.tlg * zc-howto-newtheorem01.xetex.tlg +* zc-howto-newtheorem01.xetexdev.tlg * zc-howto-newtheorem02.luatex.tlg +* zc-howto-newtheorem02.luatexdev.tlg * zc-howto-newtheorem02.tlg * zc-howto-newtheorem02.xetex.tlg +* zc-howto-newtheorem02.xetexdev.tlg * zc-howto-newtheorem03.luatex.tlg +* zc-howto-newtheorem03.luatexdev.tlg * zc-howto-newtheorem03.tlg * zc-howto-newtheorem03.xetex.tlg +* zc-howto-newtheorem03.xetexdev.tlg * zc-howto-newtheorem04.luatex.tlg +* zc-howto-newtheorem04.luatexdev.tlg * zc-howto-newtheorem04.tlg * zc-howto-newtheorem04.xetex.tlg +* zc-howto-newtheorem04.xetexdev.tlg * zc-howto-zref-xr01.luatex.tlg +* zc-howto-zref-xr01.luatexdev.tlg * zc-howto-zref-xr01.tlg * zc-howto-zref-xr01.xetex.tlg +* zc-howto-zref-xr01.xetexdev.tlg * zc-label-options01.luatex.tlg +* zc-label-options01.luatexdev.tlg * zc-label-options01.tlg * zc-languages01.tlg * zc-opt-check01.luatex.tlg +* zc-opt-check01.luatexdev.tlg * zc-opt-check01.tlg * zc-opt-d01.tlg * zc-opt-g01.tlg * zc-opt-hyperref01.luatex.tlg +* zc-opt-hyperref01.luatexdev.tlg * zc-opt-hyperref01.tlg * zc-opt-hyperref01.xetex.tlg +* zc-opt-hyperref01.xetexdev.tlg * zc-opt-hyperref02.luatex.tlg +* zc-opt-hyperref02.luatexdev.tlg * zc-opt-hyperref02.tlg * zc-opt-hyperref02.xetex.tlg +* zc-opt-hyperref02.xetexdev.tlg * zc-opt-hyperref03.luatex.tlg +* zc-opt-hyperref03.luatexdev.tlg * zc-opt-hyperref03.tlg * zc-opt-hyperref03.xetex.tlg +* zc-opt-hyperref03.xetexdev.tlg * zc-opt-hyperref04.luatex.tlg +* zc-opt-hyperref04.luatexdev.tlg * zc-opt-hyperref04.tlg * zc-opt-hyperref04.xetex.tlg +* zc-opt-hyperref04.xetexdev.tlg * zc-opt-hyperref05.luatex.tlg +* zc-opt-hyperref05.luatexdev.tlg * zc-opt-hyperref05.tlg * zc-opt-hyperref05.xetex.tlg +* zc-opt-hyperref05.xetexdev.tlg * zc-opt-lang01.luatex.tlg +* zc-opt-lang01.luatexdev.tlg * zc-opt-lang01.tlg * zc-opt-lang01.xetex.tlg +* zc-opt-lang01.xetexdev.tlg * zc-opt-lang02.luatex.tlg +* zc-opt-lang02.luatexdev.tlg * zc-opt-lang02.tlg * zc-opt-lang02.xetex.tlg +* zc-opt-lang02.xetexdev.tlg * zc-opt-lang03.luatex.tlg +* zc-opt-lang03.luatexdev.tlg * zc-opt-lang03.tlg * zc-opt-lang03.xetex.tlg +* zc-opt-lang03.xetexdev.tlg * zc-opt-lang04.luatex.tlg +* zc-opt-lang04.luatexdev.tlg * zc-opt-lang04.tlg * zc-opt-lang04.xetex.tlg +* zc-opt-lang04.xetexdev.tlg * zc-opt-lang05.luatex.tlg +* zc-opt-lang05.luatexdev.tlg * zc-opt-lang05.tlg * zc-opt-lang05.xetex.tlg +* zc-opt-lang05.xetexdev.tlg * zc-opt-lang06.luatex.tlg +* zc-opt-lang06.luatexdev.tlg * zc-opt-lang06.tlg * zc-opt-lang06.xetex.tlg +* zc-opt-lang06.xetexdev.tlg * zc-opt-nocompat01.luatex.tlg +* zc-opt-nocompat01.luatexdev.tlg * zc-opt-nocompat01.tlg * zc-opt-nocompat01.xetex.tlg +* zc-opt-nocompat01.xetexdev.tlg * zc-opt-nocompat02.luatex.tlg +* zc-opt-nocompat02.luatexdev.tlg * zc-opt-nocompat02.tlg * zc-opt-nocompat02.xetex.tlg +* zc-opt-nocompat02.xetexdev.tlg * zc-opt-nocompat03.luatex.tlg +* zc-opt-nocompat03.luatexdev.tlg * zc-opt-nocompat03.tlg * zc-opt-nocompat03.xetex.tlg +* zc-opt-nocompat03.xetexdev.tlg * zc-opt-ref01.tlg * zc-opt-ref02.luatex.tlg +* zc-opt-ref02.luatexdev.tlg * zc-opt-ref02.tlg * zc-opt-ref02.xetex.tlg +* zc-opt-ref02.xetexdev.tlg * zc-opt-titleref01.luatex.tlg +* zc-opt-titleref01.luatexdev.tlg * zc-opt-titleref01.tlg * zc-opt-titleref01.xetex.tlg +* zc-opt-titleref01.xetexdev.tlg * zc-precedence-rules01.luatex.tlg +* zc-precedence-rules01.luatexdev.tlg * zc-precedence-rules01.tlg * zc-precedence-rules01.xetex.tlg +* zc-precedence-rules01.xetexdev.tlg * zc-sort01.tlg * zc-typeset01.luatex.tlg +* zc-typeset01.luatexdev.tlg * zc-typeset01.tlg * zc-typeset01.xetex.tlg +* zc-typeset01.xetexdev.tlg * zc-workaround-breqn01.luatex.tlg +* zc-workaround-breqn01.luatexdev.tlg * zc-workaround-breqn01.tlg * zc-workaround-breqn01.xetex.tlg +* zc-workaround-breqn01.xetexdev.tlg * zc-zcref-options01.luatex.tlg +* zc-zcref-options01.luatexdev.tlg * zc-zcref-options01.tlg * zc-zcref-options01.xetex.tlg +* zc-zcref-options01.xetexdev.tlg ## TDS manifest diff --git a/macros/latex/contrib/zref-clever/zref-clever-code.pdf b/macros/latex/contrib/zref-clever/zref-clever-code.pdf Binary files differindex b8105bc9e2..f8d0003a96 100644 --- a/macros/latex/contrib/zref-clever/zref-clever-code.pdf +++ b/macros/latex/contrib/zref-clever/zref-clever-code.pdf diff --git a/macros/latex/contrib/zref-clever/zref-clever-code.tex b/macros/latex/contrib/zref-clever/zref-clever-code.tex index a258484ccc..a4ebabd625 100644 --- a/macros/latex/contrib/zref-clever/zref-clever-code.tex +++ b/macros/latex/contrib/zref-clever/zref-clever-code.tex @@ -24,7 +24,7 @@ % zref-clever.ins, % zref-clever.tex, % zref-clever-code.tex, -% and the derived files listed in MANIFEST.md. +% and the files listed in MANIFEST.md. % % The released version of this package is available from CTAN. % diff --git a/macros/latex/contrib/zref-clever/zref-clever.dtx b/macros/latex/contrib/zref-clever/zref-clever.dtx index 024aa50a99..ac9d81f44e 100644 --- a/macros/latex/contrib/zref-clever/zref-clever.dtx +++ b/macros/latex/contrib/zref-clever/zref-clever.dtx @@ -24,7 +24,7 @@ % zref-clever.ins, % zref-clever.tex, % zref-clever-code.tex, -% and the derived files listed in MANIFEST.md. +% and the files listed in MANIFEST.md. % % The released version of this package is available from CTAN. % @@ -60,41 +60,54 @@ % \DoNotIndex{\c@,\cl@,\c@enumN,\p@} % \DoNotIndex{\the} % +% \NewDocumentCommand\githubissue{m}{^^A +% issue~\href{https://github.com/gusbrs/zref-clever/issues/#1}{\##1}} +% +% ^^A Currently just for keeping semantic markup on this. +% \NewDocumentCommand\contributor{m}{#1} % % \NewDocumentCommand\opt{m}{\texttt{#1}} % -% \pdfstringdefDisableCommands{% +% \pdfstringdefDisableCommands{^^A % \def\opt#1{#1} % } % % ^^A Have the Index at 'section' level rather than 'part'. Otherwise it is % ^^A just the same definition from 'l3doc.cls'. -% \IndexPrologue{% +% \IndexPrologue{^^A % \section*{Index} % \markboth{Index}{Index} % \addcontentsline{toc}{section}{Index} % The italic numbers denote the pages where the corresponding entry is % described, numbers underlined point to the definition, all others indicate -% the places where it is used.% +% the places where it is used.^^A % } % % % \GetFileInfo{zref-clever.sty} % -% \title{% -% The \pkg{zref-clever} package implementation% -% \thanks{This file describes \fileversion, released \filedate.}% +% \title{^^A +% The \pkg{zref-clever} package^^A +% \thanks{This file describes \fileversion, released \filedate.}^^A +% \texorpdfstring{\\{}\medskip{}}{ - }^^A +% Code documentation^^A +% \texorpdfstring{\medskip{}}{}^^A % } % -% \author{% -% Gustavo Barros% -% \thanks{\url{https://github.com/gusbrs/zref-clever}}% +% \author{^^A +% Gustavo Barros^^A +% \thanks{\url{https://github.com/gusbrs/zref-clever}}^^A % } % % \date{\filedate} % % \maketitle % +% \begin{center} +% \textbf{EXPERIMENTAL} +% \end{center} +% +% % \tableofcontents % % @@ -120,14 +133,14 @@ % release). Finally, a couple of changes came with the 2021-11-15 kernel % release, which are important here. First, a fix was made to the new hook % management system (\pkg{ltcmdhooks}), with implications to the hook we add -% to \cs{appendix} (see \url{https://tex.stackexchange.com/q/617905} and -% \url{https://github.com/latex3/latex2e/pull/699}, thanks Phelype Oleinik). -% Second, the support for \cs{@currentcounter} has been improved, including -% \cs{footnote} and \pkg{amsmath} (see -% \url{https://github.com/latex3/latex2e/issues/687}, thanks Frank Mittelbach -% and Ulrike Fischer). Hence, since we would not be able to go much backwards -% without special handling anyway, we make the cut at the 2021-11-15 kernel -% release. +% to \cs{appendix} (by \contributor{Phelype Oleinik} at +% \url{https://tex.stackexchange.com/q/617905} and +% \url{https://github.com/latex3/latex2e/pull/699}). Second, the support for +% \cs{@currentcounter} has been improved, including \cs{footnote} and +% \pkg{amsmath} (by \contributor{Frank Mittelbach} and \contributor{Ulrike +% Fischer} at \url{https://github.com/latex3/latex2e/issues/687}). Hence, +% since we would not be able to go much backwards without special handling +% anyway, we make the cut at the 2021-11-15 kernel release. % % \begin{macrocode} \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} @@ -146,7 +159,7 @@ % % Identify the package. % \begin{macrocode} -\ProvidesExplPackage {zref-clever} {2021-11-24} {0.1.0-alpha} +\ProvidesExplPackage {zref-clever} {2021-12-07} {0.1.1-alpha} {Clever LaTeX cross-references based on zref} % \end{macrocode} % @@ -200,9 +213,9 @@ % \emph{more reliable} than \cs{@currentcounter}, \texttt{thecounter} is meant % to be kept as an \emph{option} (\opt{ref} option), in case there's need to % use \pkg{zref-clever} together with \cs{labelformat}. Based on the -% definition of \cs{@currentlabel} done inside \cs{refstepcounter} in `texdoc -% source2e', section `ltxref.dtx'. We just drop the \cs[no-index]{p@...} -% prefix. +% definition of \cs{@currentlabel} done inside \cs{refstepcounter} in +% \texttt{texdoc source2e}, section \texttt{ltxref.dtx}. We just drop the +% \cs[no-index]{p@...} prefix. % % \begin{macrocode} \zref@newprop { thecounter } @@ -360,9 +373,9 @@ % call. I'll stay with the \texttt{e} variant, since conceptually it is what % I want (\texttt{x} itself is not expandable), and this package is anyway not % compatible with older kernels for which the performance penalty of the -% \texttt{e} expansion would ensue (see also -% \url{https://tex.stackexchange.com/q/611370/#comment1529282_611385}, thanks -% Enrico Gregorio, aka `egreg'). +% \texttt{e} expansion would ensue (helpful comment by \contributor{Enrico +% Gregorio}, aka `egreg' at +% \url{https://tex.stackexchange.com/q/611370/#comment1529282_611385}). % \begin{macrocode} \cs_generate_variant:Nn \@@_get_enclosing_counters_value:n { e } % \end{macrocode} @@ -1560,9 +1573,9 @@ % existence of the property itself, as far as \pkg{zref} is concerned. This % because typesetting relies on the check \cs{zref@ifrefcontainsprop}, which % \emph{presumes} the property is defined and silently expands the \emph{true} -% branch if it is not (see \url{https://github.com/ho-tex/zref/issues/13}, -% thanks Ulrike Fischer). Therefore, before adding anything to -% \cs{l_@@_ref_property_tl}, check if first here with +% branch if it is not (insightful comments by \contributor{Ulrike Fischer} at +% \url{https://github.com/ho-tex/zref/issues/13}). Therefore, before adding +% anything to \cs{l_@@_ref_property_tl}, check if first here with % \cs{zref@ifpropundefined}: close it at the door. % % @@ -2018,10 +2031,11 @@ % polluting the markup too much given that, for languages that need it, it may % get to be used frequently. % -% Thanks \texttt{@samcarter} and Alan Munn for useful comments about -% declension on the TeX.SX chat. Also, Florent Rougon's efforts in this area, -% with the \pkg{xcref} package (\url{https://github.com/frougon/xcref}), have -% been an insightful source to frame the problem in general terms. +% \contributor{\texttt{@samcarter}} and \contributor{Alan Munn} provided +% useful comments about declension on the TeX.SX chat. Also, +% \contributor{Florent Rougon}'s efforts in this area, with the \pkg{xcref} +% package (\url{https://github.com/frougon/xcref}), have been an insightful +% source to frame the problem in general terms. % % \begin{macrocode} \tl_new:N \l_@@_ref_decl_case_tl @@ -2137,7 +2151,8 @@ % \url{https://tex.stackexchange.com/a/489570}). It can be set in \cs{zcref} % and, for global settings, with \cs{zcsetup}. Note that, technically, the % ``raw'' options are already available as \cs{@raw@opt@\meta{package}.sty} -% (see \url{https://tex.stackexchange.com/a/618439}, thanks David Carlisle). +% (helpful comment by \contributor{David Carlisle} at +% \url{https://tex.stackexchange.com/a/618439}). % % \begin{macrocode} \tl_new:N \l_@@_ref_typeset_font_tl @@ -2258,6 +2273,26 @@ } % \end{macrocode} % +% One interesting comment I received (by \contributor{Denis Bitouzé}, at +% \githubissue{1}) about the most appropriate type for \texttt{paragraph} and +% \texttt{subparagraph} counters was that the reader of the document does not +% care whether that particular document structure element has been introduced +% by \cs{paragraph} or, e.g.\ by the \cs{subsubsection} command. This is a +% difference the author knows, as they're using \LaTeX{}, but to the reader +% the difference between them is not really relevant, and it may be just +% confusing to refer to them by different names. In this case the type for +% \texttt{paragraph} and \texttt{subparagraph} should just be +% \texttt{section}. I don't have a strong opinion about this, and the matter +% was not pursued further. Besides, I presume not many people would set +% \texttt{secnumdepth} so high to start with. But, for the time being, I left +% the \texttt{paragraph} type for them, since there is actually a visual +% difference to the reader between the \cs{subsubsection} and \cs{paragraph} +% in the standard classes: up to the former, the sectioning commands break a +% line before the following text, while, from the later on, the sectioning +% commands and the following text are part of the same line. So, +% \cs{paragraph} is actually different from ``just a shorter way to write +% \cs{subsubsubsection}''. +% % % \subsubsection*{\opt{counterresetters} option} % @@ -2577,9 +2612,10 @@ % value'' (\texttt{key}). This distinction is captured internally by the % lower-level key parsing, but must be made explicit at \cs{keys_set:nn} by % means of the \texttt{.default:V} property of the key in \cs{keys_define:nn}. -% For the technique and some discussion about it, see -% \url{https://tex.stackexchange.com/q/614690} (thanks Jonathan P.\ Spratte, -% aka `Skillmon', and Phelype Oleinik) and +% For the technique, by \contributor{Jonathan P.\ Spratte}, aka `Skillmon', +% and some discussion about it, including further insights by +% \contributor{Phelype Oleinik}, see +% \url{https://tex.stackexchange.com/q/614690} and % \url{https://github.com/latex3/latex3/pull/988}. % % \begin{macrocode} @@ -3490,20 +3526,21 @@ % One further thing to discuss here -- to keep this ``on record'' -- is % inhibition of compression for individual labels. It is not difficult to % handle it at the infrastructure side, what gets sloppy is the user facing -% syntax to signal such inhibition. For some possible alternatives for this -% (and good ones at that) see \url{https://tex.stackexchange.com/q/611370} -% (thanks Enrico Gregorio, Phelype Oleinik, and Steven B.\ Segletes). Yet -% another alternative would be an option receiving the label(s) not to be -% compressed, this would be a repetition, but would keep the syntax clean. -% All in all, probably the best is simply not to allow individual inhibition -% of compression. We can already control compression of each \cs{zcref} call -% with existing options, this should be enough. I don't think the small extra -% flexibility individual label control for this would grant is worth the -% syntax disruption it would entail. Anyway, it would be easy to deal with -% this in case the need arose, by just adding another condition (coming from -% whatever the chosen syntax was) when we check for -% \cs{@@_labels_in_sequence:nn} in \cs{@@_typeset_refs_not_last_of_type:}. -% But I remain unconvinced of the pertinence of doing so. +% syntax to signal such inhibition. For some possible alternatives for this, +% suggested by \contributor{Enrico Gregorio}, \contributor{Phelype Oleinik}, +% and \contributor{Steven B.\ Segletes} (and good ones at that) see +% \url{https://tex.stackexchange.com/q/611370}. Yet another alternative would +% be an option receiving the label(s) not to be compressed, this would be a +% repetition, but would keep the syntax clean. All in all, probably the best +% is simply not to allow individual inhibition of compression. We can already +% control compression of each \cs{zcref} call with existing options, this +% should be enough. I don't think the small extra flexibility individual +% label control for this would grant is worth the syntax disruption it would +% entail. Anyway, it would be easy to deal with this in case the need arose, +% by just adding another condition (coming from whatever the chosen syntax +% was) when we check for \cs{@@_labels_in_sequence:nn} in +% \cs{@@_typeset_refs_not_last_of_type:}. But I remain unconvinced of the +% pertinence of doing so. % % % \subsection*{Variables} @@ -4991,9 +5028,10 @@ % the command being hooked at contains a double hash mark (\texttt{\#\#}) the % patch to add the hook, if it needs to be done with the \cs{scantokens} % method, may fail noisily (see \url{https://tex.stackexchange.com/q/617905}, -% thanks Phelype Oleinik). The 2021-11-15 kernel release already handle this -% gracefully (see \url{https://github.com/latex3/latex2e/pull/699}, thanks -% Phelype Oleinik). +% with a detailed explanation and possible workaround by \contributor{Phelype +% Oleinik}). The 2021-11-15 kernel release already handles this gracefully, +% thanks to fix by \contributor{Phelype Oleinik} at +% \url{https://github.com/latex3/latex2e/pull/699}. % % % \subsection{\opt{appendices}} @@ -5716,8 +5754,17 @@ % % \section{Dictionaries} % +% Initial values for the English, German, French, Portuguese, and Spanish, +% dictionaries have been provided by the author. Translations available for +% document elements' names in other packages have been an useful reference for +% the purpose, namely: \pkg{babel}, \pkg{cleveref}, \pkg{translator}, and +% \pkg{translations}. +% +% % \subsection{English} % +% English dictionary has been initially provided by the author. +% % \begin{macrocode} %<*package> \zcDeclareLanguage { english } @@ -5786,12 +5833,6 @@ type = appendix , Name-pl = Appendices , name-pl = appendices , -type = subappendix , - Name-sg = Appendix , - name-sg = appendix , - Name-pl = Appendices , - name-pl = appendices , - type = page , Name-sg = Page , name-sg = page , @@ -5946,6 +5987,8 @@ type = solution , % % \subsection{German} % +% German dictionary has been initially provided by the author. +% % \begin{macrocode} %<*package> \zcDeclareLanguage @@ -6065,21 +6108,6 @@ type = appendix , Name-sg = Anhangs , Name-pl = Anhänge , -type = subappendix , - gender = m , - case = N , - Name-sg = Anhang , - Name-pl = Anhänge , - case = A , - Name-sg = Anhang , - Name-pl = Anhänge , - case = D , - Name-sg = Anhang , - Name-pl = Anhängen , - case = G , - Name-sg = Anhangs , - Name-pl = Anhänge , - type = page , gender = f , case = N , @@ -6430,6 +6458,14 @@ type = solution , % % \subsection{French} % +% French dictionary has been initially provided by the author, and has been +% improved thanks to Denis Bitouzé (\githubissue{1}) and participants of the +% Groupe francophone des Utilisateurs de \TeX{} (GUTenberg) (at +% \url{https://groups.google.com/g/gut_fr/c/rNLm6weGcyg}) and the +% \texttt{fr.comp.text.tex} (at +% \url{https://groups.google.com/g/fr.comp.text.tex/c/Fa11Tf6MFFs}) mailing +% lists. +% % \begin{macrocode} %<*package> \zcDeclareLanguage [ gender = { f , m } ] { french } @@ -6497,20 +6533,13 @@ type = appendix , Name-pl = Annexes , name-pl = annexes , -type = subappendix , - gender = f , - Name-sg = Annexe , - name-sg = annexe , - Name-pl = Annexes , - name-pl = annexes , - type = page , gender = f , Name-sg = Page , name-sg = page , Name-pl = Pages , name-pl = pages , - rangesep = {\textendash} , + rangesep = {-} , type = line , gender = f , @@ -6641,11 +6670,11 @@ type = algorithm , name-pl = algorithmes , type = listing , - gender = f , - Name-sg = Liste , - name-sg = liste , - Name-pl = Listes , - name-pl = listes , + gender = m , + Name-sg = Listing , + name-sg = listing , + Name-pl = Listings , + name-pl = listings , type = exercise , gender = m , @@ -6670,6 +6699,11 @@ type = solution , % % \subsection{Portuguese} % +% Portuguese dictionary provided by the author, who's a native speaker of +% (Brazilian) Portuguese. I do expect this to be sufficiently general, but if +% Portuguese speakers from other places feel the need for a Portuguese +% variant, please let me know. +% % \begin{macrocode} %<*package> \zcDeclareLanguage [ gender = { f , m } ] { portuguese } @@ -6740,13 +6774,6 @@ type = appendix , Name-pl = Apêndices , name-pl = apêndices , -type = subappendix , - gender = m , - Name-sg = Apêndice , - name-sg = apêndice , - Name-pl = Apêndices , - name-pl = apêndices , - type = page , gender = f , Name-sg = Página , @@ -6923,6 +6950,8 @@ type = solution , % % \subsection{Spanish} % +% Spanish dictionary has been initially provided by the author. +% % \begin{macrocode} %<*package> \zcDeclareLanguage [ gender = { f , m } ] { spanish } @@ -6986,13 +7015,6 @@ type = appendix , Name-pl = Apéndices , name-pl = apéndices , -type = subappendix , - gender = m , - Name-sg = Apéndice , - name-sg = apéndice , - Name-pl = Apéndices , - name-pl = apéndices , - type = page , gender = f , Name-sg = Página , diff --git a/macros/latex/contrib/zref-clever/zref-clever.ins b/macros/latex/contrib/zref-clever/zref-clever.ins index 71259f4751..46d9982dc4 100644 --- a/macros/latex/contrib/zref-clever/zref-clever.ins +++ b/macros/latex/contrib/zref-clever/zref-clever.ins @@ -24,7 +24,7 @@ % zref-clever.ins, % zref-clever.tex, % zref-clever-code.tex, -% and the derived files listed in MANIFEST.md. +% and the files listed in MANIFEST.md. % % The released version of this package is available from CTAN. % @@ -70,7 +70,7 @@ This work consists of the files zref-clever.dtx, zref-clever.ins, zref-clever.tex, zref-clever-code.tex, -and the derived files listed in MANIFEST.md. + and the files listed in MANIFEST.md. The released version of this package is available from CTAN. diff --git a/macros/latex/contrib/zref-clever/zref-clever.pdf b/macros/latex/contrib/zref-clever/zref-clever.pdf Binary files differindex 1b0c6f93f9..84f9a28b55 100644 --- a/macros/latex/contrib/zref-clever/zref-clever.pdf +++ b/macros/latex/contrib/zref-clever/zref-clever.pdf diff --git a/macros/latex/contrib/zref-clever/zref-clever.tex b/macros/latex/contrib/zref-clever/zref-clever.tex index c2fa9f19b2..4da3b2453d 100644 --- a/macros/latex/contrib/zref-clever/zref-clever.tex +++ b/macros/latex/contrib/zref-clever/zref-clever.tex @@ -24,7 +24,7 @@ % zref-clever.ins, % zref-clever.tex, % zref-clever-code.tex, -% and the derived files listed in MANIFEST.md. +% and the files listed in MANIFEST.md. % % The released version of this package is available from CTAN. % @@ -56,6 +56,8 @@ \usepackage{listings} \usepackage{microtype} +% TEMP work-around for https://github.com/schlcht/microtype/issues/4 +\microtypesetup{nopatch=item} \hypersetup{hidelinks} @@ -120,12 +122,14 @@ \newcounter{zchowto} \lstnewenvironment{zchowto}[1][]{% \renewcommand{\lstlistingname}{How-to}% + \renewcommand*\theHlstlisting{ht.\thelstlisting}% \lstset{#1}% \setcounter{lstlisting}{\value{zchowto}}% }{} \newcounter{zcworkaround} \lstnewenvironment{zcworkaround}[1][]{% \renewcommand{\lstlistingname}{Work-around}% + \renewcommand*\theHlstlisting{wa.\thelstlisting}% \lstset{#1}% \setcounter{lstlisting}{\value{zcworkaround}}% }{} @@ -163,6 +167,9 @@ \title{% The \pkg{zref-clever} package% \thanks{This file describes \fileversion, released \filedate.}% + \texorpdfstring{\\{}\medskip{}}{ - }% + User manual% + \texorpdfstring{\medskip{}}{}% } \author{% @@ -174,7 +181,11 @@ \maketitle -\begin{abstract} +\begin{center} + {\bfseries \abstractname\vspace{-.5em}\vspace{0pt}} +\end{center} + +\begin{quotation} \pkg{zref-clever} provides an user interface for making \LaTeX{} cross-references which automates some of their typical features, thus easing their input in the document and improving the consistency of typeset @@ -183,17 +194,22 @@ compressed into ranges when due. The reference format is highly and easily customizable, both globally and locally. \pkg{zref-clever} is based on \pkg{zref}'s extensible referencing system. -\end{abstract} +\end{quotation} + +\bigskip{} \begin{center} - \small \textbf{EXPERIMENTAL} Please read \zcref{sec:warning} carefully. \end{center} +\clearpage{} + \tableofcontents +\clearpage{} + \section{Introduction} Cross-referencing is an area which lends itself quite naturally to automation. @@ -237,12 +253,11 @@ carried over to \pkg{zref}, neither by the \pkg{zref} itself nor by other packages. \pkg{zref-clever} tries to cover this gap, by bringing a number of existing -features available for the standard referencing system to \pkg{zref}, and -hopefully making \pkg{zref} more accessible, and interesting, to the average -user. And the package's name makes it clear that the core of the envisaged -feature set is that of \pkg{cleveref}, even though the attempt was less one of -replicating functionality per se than that of having it as a successful point -of reference, from where we could then try to tap into \pkg{zref}'s potential. +features available for the standard referencing system to \pkg{zref}. And the +package's name makes it clear that the core of the envisaged feature set is +that of \pkg{cleveref}, even though the attempt was less one of replicating +functionality per se than that of having it as a successful point of +reference, from where we could then try to tap into \pkg{zref}'s potential. Indeed, although there is a significant intersection, the features of \pkg{zref-clever} are neither a superset nor a subset of those of \pkg{cleveref}. There are things either of them can do that the other can't. @@ -254,16 +269,16 @@ local options. Considering that \pkg{zref} itself offers the \pkg{zref-titleref} module, and that the integration with \pkg{zref-check} allows \pkg{zref-clever} to make -context sensitive references, akin to those of \pkg{varioref}, a significant -part of the most prominent automation features available to the standard -referencing system is thus brought to \pkg{zref}, working under a single -consistent underlying infrastructure and user interface. Alas, there are -limitations, of course (see \zcref{sec:limitations}). Still, all in all, -hopefully \pkg{zref-clever} can be the missing piece for \pkg{zref} to fulfill -the promise insinuated by the ``z'' in its name, and be your ``last ref''. +context sensitive references, a significant part of the most prominent +automation features available to the standard referencing system is thus +brought to \pkg{zref}, working under a single consistent underlying +infrastructure and user interface. There are some limitations, of course (see +\zcref{sec:limitations}), and it may be your cup of tea or not. Still, all in +all, hopefully \pkg{zref-clever} can make \pkg{zref} more accessible, and +interesting, to the average user. -\subsection{Warning} +\section{Warning} \zlabel{sec:warning} This package is in its early days, and should be considered experimental. By @@ -289,7 +304,7 @@ As usual: \end{zcexample} -\subsection{Dependencies} +\section{Dependencies} \pkg{zref-clever} requires \pkg{zref}, and \LaTeX{} kernel 2021-11-15, or newer. It also needs \pkg{l3keys2e} and \pkg{ifdraft}. Some packages are @@ -341,9 +356,9 @@ effects if ungrouped, e.g.\ in the preamble. \cs{zcRefTypeSetup}\marg{type}\marg{options} \end{syntax} \end{function} -Sets type-specific reference format options (see \zcref{sec:ref-format-opts}). -Just as for \cs{zcsetup}, the settings performed by \cs{zcRefTypeSetup} are -local, within the current group. +Sets type-specific reference format options (see +\zcref{sec:reference-format}). Just as for \cs{zcsetup}, the settings +performed by \cs{zcRefTypeSetup} are local, within the current group. \bigskip{} @@ -355,12 +370,20 @@ of arguments by it and/or processing by \pkg{l3keys}, particularly with regard to brace-stripping and space-trimming. Furthermore, \pkg{zref-clever} loads \pkg{zref}'s \pkg{zref-user} module by -default. So you also have its user commands available out of the box, notably -\cs{zlabel}, but also \cs{zref} and \cs{zpageref} themselves. +default. So you also have its user commands available out of the box, +including \cs{zref} and \cs{zpageref}, but notably: +\begin{function}{\zlabel} + \begin{syntax} + \cs{zlabel}\marg{label} + \end{syntax} +\end{function} +Sets \meta{label} for referencing with \cs{zref} and, thus, also \cs{zcref}. +\cs{zlabel} is provided by \pkg{zref-user} and is the counterpart of +\cs{label} for \pkg{zref}'s referencing system. -\subsection{Options} +\section{Options} \zlabel{sec:options} \pkg{zref-clever} is highly configurable, offering a lot of flexibility in @@ -376,7 +399,7 @@ as a whole; and ``reference format options'', which control the detail of reference formatting, including type-specific and language-specific settings. This section covers the first group (for the second one, see -\zcref{sec:ref-format-opts}). General options can be set globally either as +\zcref{sec:reference-format}). General options can be set globally either as package options at load-time (see \zcref{sec:loading-package}) or by means of \cs{zcsetup} in the preamble (see \zcref{sec:user-interface}). They can also be set locally with \cs{zcsetup} along the document or through the optional @@ -570,7 +593,7 @@ equivalent to \texttt{nameinlink=true}. \DescribeOption{preposinlink} % The \opt{preposinlink} option controls whether the \opt{refpre} and -\opt{refpos} reference format options (see \zcref{sec:ref-format-opts}) are +\opt{refpos} reference format options (see \zcref{sec:reference-format}) are included in the reference hyperlink or not. It is a boolean option. The package's default is \texttt{preposinlink=false}, and the option given without a value is equivalent to \texttt{preposinlink=true}. @@ -578,7 +601,7 @@ a value is equivalent to \texttt{preposinlink=true}. \DescribeOption{lang} % The \opt{lang} option controls the language used by \cs{zcref} when looking for language-specific reference format options (see -\zcref{sec:ref-format-opts}). The default value, \texttt{current}, uses the +\zcref{sec:reference-format}). The default value, \texttt{current}, uses the current language, as defined by \pkg{babel} or \pkg{polyglossia} (or \texttt{english} if none of them is loaded). Value \texttt{main} uses the main document language, as defined by \pkg{babel} or \pkg{polyglossia} (or @@ -620,8 +643,8 @@ is equivalent to \texttt{nudge=true} and the package's default is a comma separated list of elements, and recognizes values \texttt{multitype}, \texttt{comptosing}, \texttt{gender}, and \texttt{all}. The \texttt{multitype} nudge warns when the reference is composed by multiple type -blocks (see \zcref{sec:ref-format-opts}). The \texttt{comptosing} nudge let's -you know when multiple labels of the same type have been compressed to a +blocks (see \zcref{sec:reference-format}). The \texttt{comptosing} nudge +let's you know when multiple labels of the same type have been compressed to a singular type name form. It can be combined with the \opt{sg} option, which is the way to tell \cs{zcref} you know it's a singular and so not to nudge if a compression to singular occurs, but to nudge if the contrary occurs, that @@ -640,7 +663,7 @@ the ``nudging'' feature. \DescribeOption{font} % The \opt{font} option can receive font styling commands to change the appearance of the whole reference list (see also the \opt{namefont} and -\opt{reffont} reference format options in \zcref{sec:ref-format-opts}). It +\opt{reffont} reference format options in \zcref{sec:reference-format}). It does not affect the content of the \opt{note}, however. The option is intended exclusively for commands that only change font attributes: style, family, shape, weight, size, color, etc. Anything else, particularly commands @@ -656,7 +679,7 @@ The \opt{titleref} option receives no value and, when given, loads \DescribeOption{note} % The \opt{note} option receives as value some text to be typeset at the end of the whole reference list. It is separated from it by \opt{notesep} (see -\zcref{sec:ref-format-opts}). +\zcref{sec:reference-format}). \DescribeOption{check} % Provides integration of \pkg{zref-clever} with the \pkg{zref-check} package. @@ -667,7 +690,7 @@ both checks and \cs{zcheck}'s options. And the checks are performed for each label in \marg{labels} received as argument by \cs{zcref}. See the User manual of \pkg{zref-check} for details. The checks done by the \opt{check} option in \cs{zcref} comprise the complete reference, including the \opt{note} -(see \zcref{sec:ref-format-opts}). If \pkg{zref-check} was not loaded in the +(see \zcref{sec:reference-format}). If \pkg{zref-check} was not loaded in the preamble, at begin document the option is made no-op and issues a warning. \DescribeOption{countertype} % @@ -763,10 +786,8 @@ available modules and details about each of them, see \opt{nocompat} without a value (or an empty one). This is a preamble only option. -\section{Reference format} -\zlabel{sec:reference-format} -\subsection{Reference types} +\section{Reference types} \zlabel{sec:reference-types} A ``reference type'' is the basic \pkg{zref-clever} setup unit for specifying @@ -834,7 +855,7 @@ the \cs{appendix}. One more observation about ``reference types'' is due here. A \emph{type} is not really ``defined'' in the sense a variable or a function is. It is more of a ``string'' which \pkg{zref-clever} uses to look for a whole set of -type-specific reference format options (see \zcref{sec:ref-format-opts}). +type-specific reference format options (see \zcref{sec:reference-format}). Each of these options individually may be ``set'' or not, ``defined'' or not. And, depending on the setup and the relevant precedence rules for this, some of them may be required and some not. In practice, \pkg{zref-clever} uses the @@ -842,8 +863,8 @@ of them may be required and some not. In practice, \pkg{zref-clever} uses the compilation warning when it cannot find a suitable value. -\subsection{Reference format options} -\zlabel{sec:ref-format-opts} +\section{Reference format} +\zlabel{sec:reference-format} Formatting how the reference is to be typeset is, quite naturally, a big part of the user interface of \pkg{zref-clever}. In this area, we tried to balance @@ -1070,7 +1091,7 @@ of these language packages, or to a language specified directly by the user. This is primarily relevant for reference format options, particularly reference type \emph{names} (though not only, since most reference format options can have language-specific values, or ``translations'', see -\zcref{sec:ref-format-opts}). But other features of the package also cater +\zcref{sec:reference-format}). But other features of the package also cater for language specific needs. As far as language selection is concerned, if the language is declared and @@ -1211,7 +1232,7 @@ the user. \cs{zcDeclareLanguageAlias} is preamble only. \end{syntax} \end{function} Sets language-specific reference format options for \meta{language} (see -\zcref{sec:ref-format-opts}), be they type-specific or not. \meta{language} +\zcref{sec:reference-format}), be they type-specific or not. \meta{language} must be already known to \pkg{zref-clever}. Besides reference format options, \cs{zcLanguageSetup} knows three other keys: \opt{type}, \opt{case}, and \opt{gender}. The first two work like a ``switch'' affecting the options @@ -1226,7 +1247,7 @@ For \opt{case} this means the default declension case, which is the first element of the list provided to the \opt{declension} option in \cs{zcDeclareLanguage}. For \opt{type} this means ``default translations'', which are language-specific but not type-specific option values (see -\zcref{sec:ref-format-opts}). An empty valued \texttt{type=} key can also +\zcref{sec:reference-format}). An empty valued \texttt{type=} key can also ``unset'' the type. The \opt{gender} key sets the gender of the current \texttt{type} (provided the value it receives is one of the declared genders for \meta{language}). \cs{zcLanguageSetup} is preamble only. @@ -1384,49 +1405,68 @@ set around a cross-reference ``task'' we'd like to perform with \subsection{Context sensitive references} \zctask{Make cross-references which are sensitive to the relative position - between the reference and the label being referred to, à la \pkg{varioref}.} - -\pkg{varioref}'s \cs{vref} provides for varied references for three different -basic cases: when the reference and the label are on the same page, it -typesets a plain reference; when the reference and the label are in contiguous -pages (next, previous, or facing), it typesets the reference and a fixed -string corresponding to the relative position; when the reference and the -label are in different non-contiguous pages, it typesets a regular reference -and a page reference. The same end result, but with a different user -interface concept can be achieved through \pkg{zref-clever}'s integration with -\pkg{zref-check}. For this, the later must be loaded, which can be most -conveniently done with the \opt{check} option in the preamble. With that in -place, the different cases could be covered by the following examples: + between the reference and the label being referred to.} +It is frequently useful to make a reference to both a document element and its +page. For example: +\begin{zcexample} +\zcref{fig:1} on \zcpageref{fig:1} +\end{zcexample} + +However, while this works well when the object and the reference are somewhat +distant, we may want to adjust this to something different when the label and +the reference are close to each other. If both are on the same page, we may +want to drop the \cs{zcpageref}, or replace it with ``above'' or ``below''. +And, if both are on contiguous pages, then something like ``on the following +page'' or ``on the preceding page'' may be preferred. Since we don't usually +know the relative position of the reference to the label, particularly for +floats, making these kinds of adjustments manually is an uphill battle, and +error prone, in the absence of some support for it. + +\pkg{zref-clever}'s integration with \pkg{zref-check} offers some assistance +in making these kinds of references, by providing checks for the relation +between the reference and the label. For example, you may use: \begin{zcexample} -\zcref[check=thispage]{fig:1} \zcref[check=nextpage,note={on the following page}]{fig:1} -\zcref[check=prevpage,note={on the preceding page}]{fig:1} -\zcref[check=facing,note={on the facing page}]{fig:1} +\end{zcexample} +and if \texttt{fig:1} is not on the next page relative to the reference, a +compilation warning can be issued by \pkg{zref-check} (according to the +package's options), so that the problem can be easily identified and +corrected. Evidently, this does not fully automate the typeset results, but +it does automate the checking that the reference context is the intended one. + +And to make use of this feature, one does not need to rely on compiling the +document, make one such reference according to the current state of things, +and then adjusting them over and over, as the document gets edited. This +feature is best used within a certain workflow, which starts by making a +standard reference, but adding the \texttt{pagegap} check to it: +\begin{zcexample} \zcref[check=pagegap]{fig:1} on \zcpageref{fig:1} \end{zcexample} -And, similarly for the cases of \cs{vpageref}: - +During the initial editing of the document, this reference will be formally +correct, even if less than ideal in certain cases. At a certain point, when +you choose to give finishing touches to your document, then you can cater for +\pkg{zref-check}'s warnings (the package has options to control them, for +example, enabling warnings only when the \opt{draft} option is not in use). +The \texttt{pagegap} check will pass if there's one or more pages between the +reference and the label, in which case, that reference is already what we +want. However, if the referenced object lies in the previous page, the same +page, or the next page, the \texttt{pagegap} check will issue a warning. Thus +telling us if there's an opportunity, or need, to adjust the context +information of the reference. Then we can go with one of the below, according +to the situation: \begin{zcexample} -\zcref[noref,check=thispage,note={on this page}]{fig:1} -\zcref[noref,check=nextpage,note={on the following page}]{fig:1} -\zcref[noref,check=prevpage,note={on the preceding page}]{fig:1} -\zcref[noref,check=facing,note={on the facing page}]{fig:1} -\zcref[noref,check=pagegap]{fig:1} on \zcpageref{fig:1} +\zcref[check=thispage]{fig:1} +\zcref[check=above,note={above}]{fig:1} +\zcref[check=below,note={below}]{fig:1} +\zcref[check=nextpage,note={on the following page}]{fig:1} +\zcref[check=prevpage,note={on the preceding page}]{fig:1} +\zcref[check=facing,note={on the facing page}]{fig:1} \end{zcexample} -Since \cs{zcref} can receive multiple labels, and make ranges out of them, it -is not difficult to extend these examples to the functionality of -\cs{vrefrange} and \cs{vpagerefrange}. - -Evidently, this does not fully automate the typeset results, but it does -automate the checking that the reference context is the intended one. If the -relation between the reference and the label does not correspond to the -specified one, a compilation warning is issued (according to the options given -to \pkg{zref-check}), so that the problem can be easily identified and -corrected. See \pkg{zref-check}'s documentation for details, and further -available checks. +See \pkg{zref-check}'s documentation for details, and further available +checks. \subsection{\cs{newtheorem}} @@ -1783,10 +1823,7 @@ be the following. \end{document} \end{zchowto} -\section{Compatibility} -\zlabel{sec:compatibility} - -\subsection{Limitations} +\section{Limitations} \zlabel{sec:limitations} Being based on \pkg{zref} entails one quite sizable advantage for @@ -1852,7 +1889,7 @@ whether \pkg{zref-clever} is able to provide some specific support when a reasonable way to do so is within reach. -\subsection{Compatibility modules} +\section{Compatibility modules} \zlabel{sec:comp-modules} This section gives a description of each compatibility module provided by @@ -2043,7 +2080,7 @@ This module just sets appropriate \opt{countertype} and \opt{counterresetby} for the \texttt{subfigure} and \texttt{subtable} counters. -\subsection{Work-arounds} +\section{Work-arounds} \marginpar{\raggedleft\raisebox{-1.5ex}{\dbend}}As should be clear by now, the use of \pkg{zref}'s \cs{zlabel} and thus of \pkg{zref-clever} may occasionally @@ -2142,9 +2179,48 @@ be in their absence. Besides these more general acknowledgments, a number of people have contributed to \pkg{zref-clever}, whether they are aware of it or not. Suggestions, ideas, solutions to problems, bug reports or even encouragement -were generously provided by: Ulrike Fischer, Frank Mittelbach, Phelype -Oleinik, Jonathan P.\ Spratte, Enrico Gregorio, Steven B.\ Segletes, -\texttt{@samcarter}, Alan Munn, Florent Rougon, and David Carlisle. +were generously provided by (in chronological order): + Ulrike Fischer, + % 2021-07-03: It's Ulrike's fault :-) : https://tex.stackexchange.com/questions/603514/#comment1513982_603514 + % 2021-08-20: https://tex.stackexchange.com/q/611424/105447 (comments) + % 2021-09-06: https://github.com/ho-tex/zref/issues/13 + % 2021-10-26: https://github.com/latex3/latex2e/issues/687 + Phelype Oleinik, + % 2021-08-20: https://tex.stackexchange.com/q/611370 (comments) + % 2021-09-09: https://tex.stackexchange.com/a/614704 + % 2021-10-06: https://tex.stackexchange.com/a/617998 + % 2021-10-21: https://github.com/latex3/latex2e/pull/699 + Enrico Gregorio, + % 2021-08-20: https://tex.stackexchange.com/a/611385 + % 2021-08-20: https://tex.stackexchange.com/q/611370/#comment1529282_611385 + Steven B.\ Segletes, + % 2021-08-20: https://tex.stackexchange.com/a/611373 + Jonathan P.\ Spratte, + % 2021-09-09: https://tex.stackexchange.com/a/614719 + % 2021-09-09: https://github.com/latex3/latex3/pull/988 + David Carlisle, + % 2021-10-10: https://tex.stackexchange.com/questions/618434/#comment1544401_618439 + Frank Mittelbach, + % 2021-10-14: https://github.com/latex3/latex2e/issues/687 + \texttt{@samcarter}, + % 2021-10-14: https://chat.stackexchange.com/transcript/message/59361777#59361777 + % 2021-10-21: https://chat.stackexchange.com/transcript/message/59418309#59418309 + Alan Munn, + % 2021-10-14: https://chat.stackexchange.com/transcript/message/59364073#59364073 + % 2021-10-21: https://chat.stackexchange.com/transcript/message/59418189#59418189 + Florent Rougon, + % https://github.com/frougon/xcref has been an useful reference for + % declension support. + Denis Bitouzé, + % 2021-11-25: https://github.com/gusbrs/zref-clever/issues/1 + Marcel Krüger, + % 2021-11-26: https://github.com/latex3/l3build/issues/215 + and Jürgen Spitzmüller. + % 2021-11-28: https://github.com/gusbrs/zref-clever/issues/2 + +The package's dictionaries have been provided or improved thanks to: + Denis Bitouzé (French). + % 2021-11-25: https://github.com/gusbrs/zref-clever/issues/1 If I have inadvertently left anyone off the list I apologize, and please let me know, so that I can correct the oversight. |