From bc8c0d7f7bf2c4d067111b808f7c898d241039ee Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 27 Aug 2024 03:03:02 +0000 Subject: CTAN sync 202408270302 --- macros/latex/contrib/acmart/Makefile | 26 +- macros/latex/contrib/acmart/README | 3 + macros/latex/contrib/acmart/acmart.dtx | 180 ++-- macros/latex/contrib/acmart/acmart.ins | 1 + macros/latex/contrib/acmart/acmart.pdf | Bin 949483 -> 943219 bytes macros/latex/contrib/acmart/acmguide.pdf | Bin 439879 -> 441394 bytes .../latex/contrib/acmart/samples/sample-acmcp.pdf | Bin 214844 -> 214844 bytes .../contrib/acmart/samples/sample-acmengage.pdf | Bin 399476 -> 399476 bytes .../contrib/acmart/samples/sample-acmlarge.pdf | Bin 613884 -> 613884 bytes .../acmart/samples/sample-acmsmall-biblatex.pdf | Bin 636571 -> 636571 bytes .../acmart/samples/sample-acmsmall-conf.pdf | Bin 1059143 -> 1059177 bytes .../acmart/samples/sample-acmsmall-submission.pdf | Bin 626360 -> 626360 bytes .../acmart/samples/sample-acmsmall-tagged.pdf | Bin 0 -> 480489 bytes .../contrib/acmart/samples/sample-acmsmall.pdf | Bin 623848 -> 623848 bytes .../contrib/acmart/samples/sample-acmtog-conf.pdf | Bin 571812 -> 571812 bytes .../latex/contrib/acmart/samples/sample-acmtog.pdf | Bin 571575 -> 571575 bytes .../contrib/acmart/samples/sample-manuscript.pdf | Bin 625334 -> 625334 bytes .../acmart/samples/sample-sigconf-authordraft.pdf | Bin 1051244 -> 1051239 bytes .../acmart/samples/sample-sigconf-biblatex.pdf | Bin 624415 -> 624415 bytes .../contrib/acmart/samples/sample-sigconf-i13n.pdf | Bin 1062362 -> 1062362 bytes .../contrib/acmart/samples/sample-sigconf.pdf | Bin 1047421 -> 1047421 bytes .../contrib/acmart/samples/sample-sigplan.pdf | Bin 1053423 -> 1053423 bytes macros/latex/contrib/acmart/samples/samples.dtx | 20 +- macros/latex/contrib/acmart/samples/samples.ins | 1 + .../biblatex-contrib/biblatex-oxref/Makefile | 4 +- .../biblatex-contrib/biblatex-oxref/README.md | 5 +- .../biblatex-contrib/biblatex-oxref/oxalph-doc.pdf | Bin 465495 -> 465824 bytes .../biblatex-oxref/oxnotes-doc.pdf | Bin 473027 -> 473527 bytes .../biblatex-contrib/biblatex-oxref/oxnum-doc.pdf | Bin 469483 -> 470053 bytes .../biblatex-contrib/biblatex-oxref/oxref.dtx | 1023 +++++++++++++++----- .../biblatex-contrib/biblatex-oxref/oxref.pdf | Bin 597953 -> 637441 bytes .../biblatex-contrib/biblatex-oxref/oxyear-doc.pdf | Bin 469617 -> 469903 bytes .../contrib/customenvs/doc/customenvs-doc-en.pdf | Bin 199070 -> 210026 bytes .../contrib/customenvs/doc/customenvs-doc-en.tex | 35 +- .../contrib/customenvs/doc/customenvs-doc-fr.pdf | Bin 1503490 -> 1475123 bytes .../contrib/customenvs/doc/customenvs-doc-fr.tex | 98 +- .../contrib/customenvs/doc/envtexo_exemples.pdf | Bin 177853 -> 148026 bytes .../contrib/customenvs/doc/envtexo_exemples.tex | 12 +- macros/latex/contrib/customenvs/tex/customenvs.sty | 254 ++++- macros/luatex/latex/domaincoloring/Changes | 4 + .../domaincoloring/doc/domaincoloring-doc.bib | 11 + .../domaincoloring/doc/domaincoloring-doc.pdf | Bin 6845040 -> 12831690 bytes .../domaincoloring/doc/domaincoloring-doc.tex | 63 +- .../luatex/latex/domaincoloring/doc/titleImg.pdf | Bin 335225 -> 334858 bytes .../latex/domaincoloring/latex/domaincoloring.sty | 50 +- .../lua/domaincoloring-functions.lua | 12 +- .../latex/domaincoloring/lua/domaincoloring.lua | 86 +- 47 files changed, 1468 insertions(+), 420 deletions(-) create mode 100644 macros/latex/contrib/acmart/samples/sample-acmsmall-tagged.pdf (limited to 'macros') diff --git a/macros/latex/contrib/acmart/Makefile b/macros/latex/contrib/acmart/Makefile index 545e505ed5..c81d355446 100644 --- a/macros/latex/contrib/acmart/Makefile +++ b/macros/latex/contrib/acmart/Makefile @@ -14,6 +14,7 @@ DEV=-dev # To switch dev on PDF = $(PACKAGE).pdf acmguide.pdf BIBLATEXFILES= $(wildcard *.bbx) $(wildcard *.cbx) $(wildcard *.dbx) $(wildcard *.lbx) + SAMPLEBIBLATEXFILES=$(patsubst %,samples/%,$(BIBLATEXFILES)) ACMCPSAMPLES= \ @@ -21,7 +22,7 @@ ACMCPSAMPLES= \ samples/sample-acmcp-Invited.pdf \ samples/sample-acmcp-Position.pdf \ samples/sample-acmcp-Research.pdf \ - samples/sample-acmcp-Review.pdf \ + samples/sample-acmcp-Review.pdf all: ${PDF} ALLSAMPLES @@ -46,6 +47,9 @@ acmguide.pdf: $(PACKAGE).dtx $(PACKAGE).cls %.cls: %.ins %.dtx pdflatex $< +%-tagged.cls: %.ins %.dtx + pdflatex $< + ALLSAMPLES: $(SAMPLEBIBLATEXFILES) cd samples; pdflatex samples.ins; cd .. @@ -59,6 +63,7 @@ samples/%: % samples/$(PACKAGE).cls: $(PACKAGE).cls +samples/$(PACKAGE)-tagged.cls: $(PACKAGE)-tagged.cls samples/ACM-Reference-Format.bst: ACM-Reference-Format.bst samples/abbrev.bib: ACM-Reference-Format.bst @@ -116,7 +121,18 @@ samples/sample-sigconf-lualatex.pdf: samples/sample-lualatex.tex samples/$(PA samples/sample-acmcp.pdf: samples/acm-jdslogo.png -.PRECIOUS: $(PACKAGE).cfg $(PACKAGE).cls + +samples/sample-acmsmall-tagged.pdf: samples/sample-acmsmall-tagged.tex samples/$(PACKAGE)-tagged.cls samples/ACM-Reference-Format.bst + cd $(dir $@) && lualatex-dev $(notdir $<) + - cd $(dir $@) && bibtex $(notdir $(basename $<)) + cd $(dir $@) && lualatex-dev $(notdir $<) + cd $(dir $@) && lualatex-dev $(notdir $<) + while ( grep -q '^LaTeX Warning: Label(s) may have changed' $(basename $<).log) \ + do cd $(dir $@) && lualatex-dev $(notdir $<); done + + + +.PRECIOUS: $(PACKAGE).cfg $(PACKAGE).cls $(PACKAGE)-tagged.cls docclean: $(RM) *.log *.aux \ @@ -124,7 +140,9 @@ docclean: *.ilg *.ind *.out *.lof \ *.lot *.bbl *.blg *.gls *.cut *.hd \ *.dvi *.ps *.thm *.tgz *.zip *.rpi \ - samples/$(PACKAGE).cls samples/ACM-Reference-Format.bst \ + samples/$(PACKAGE).cls \ + samples/$(PACKAGE)-tagged.cls \ + samples/ACM-Reference-Format.bst \ samples/*.log samples/*.aux samples/*.out \ samples/*.bbl samples/*.blg samples/*.cut \ samples/acm-jdslogo.png \ @@ -132,7 +150,7 @@ docclean: clean: docclean - $(RM) $(PACKAGE).cls \ + $(RM) $(PACKAGE).cls $(PACKAGE)-tagged.cls \ samples/*.tex distclean: clean diff --git a/macros/latex/contrib/acmart/README b/macros/latex/contrib/acmart/README index 7d79e34935..b46a735447 100644 --- a/macros/latex/contrib/acmart/README +++ b/macros/latex/contrib/acmart/README @@ -12,6 +12,9 @@ The production version is the one on CTAN and ACM sites. Changes +Version 2.09. Experimental tagging code is now in the main branch. + Creative Commons license is now allowed for all materials. + Version 2.08. Section titles are in lowercase now. Documentation updates. diff --git a/macros/latex/contrib/acmart/acmart.dtx b/macros/latex/contrib/acmart/acmart.dtx index 0ff7a902b7..26e19fdcc6 100644 --- a/macros/latex/contrib/acmart/acmart.dtx +++ b/macros/latex/contrib/acmart/acmart.dtx @@ -998,13 +998,7 @@ % by IW3C2, when some authors are approved Google employees.\\ % \texttt{cc} & Creative Commons license. If this key is set, % \textsl{doclicense} images are used to typeset the license. See -% also \cs{setcctype} command. Note that at present this license -% can be used only either for \texttt{acmengage} format, or for -% \texttt{nonacm} publications, or for the authors that meet any -% of the following requirements: (a)~part of the ACM Open Program; -% (b)~publishing in a Gold Open Access publication; -% (c)~paying the Open Access APC; -% (d)~part of the Google publishing agreement.\\ +% also \cs{setcctype} command. \\ % \texttt{acmcopyright} & The authors transfer the copyright to the % ACM. This choice is no longer available for the % non-commissioned authors and will trigger a warning.\\ @@ -2239,6 +2233,24 @@ % \item |figure*|: \cs{fulltextwidth}. % \end{enumerate} % +%\subsection{Experiments with tagging} +%\label{sec:ug_tagged} +% +% ACM is firmly committed to produce fully tagged PDFs compliant with +% the accessibility standards. We use the developmental version of +% tagging code by \LaTeX3 team, see the details at +% \url{https://www.latex-project.org/publications/indexbytopic/pdf/} +% and \url{https://tug.org/twg/accessibility/overview.html}. +% +% At present this work is highly experimental. You may try the +% experiments by (1)~using the class |acmart-tagged| in the document +% class line, and (2)~adding the command +% \cs{DocumentMetadata}\oarg{options} in the preamble, see the file +% \path{sample-acmsmall-tagged.tex}. If you do this, please \emph{do +% not ask ACM for support}. On the other hand, bug reports at +% \url{https://github.com/borisveytsman/acmart/issues} will be +% appreciated. +% % % % \StopEventually{ @@ -2263,8 +2275,9 @@ %<*gobble> \ProvidesFile{acmart.dtx} % -%\ProvidesClass{acmart} -[2024/05/27 v2.08 Typesetting articles for the Association for Computing Machinery] +%\ProvidesClass{acmart} +%\ProvidesClass{acmart-tagged} +[2024/08/25 v2.09 Typesetting articles for the Association for Computing Machinery] % \end{macrocode} % % \changes{v1.00}{2016/04/14}{First released version} @@ -2401,7 +2414,8 @@ \end{document} % %<*class> -\def\@classname{acmart} +%\def\@classname{acmart} +%\def\@classname{acmart-tagged} % \end{macrocode} % % @@ -2442,13 +2456,13 @@ % \changes{1.87}{2022/08/13}{New format: acmcp} % The possible formats % \begin{macrocode} -\define@choicekey*+{acmart.cls}{format}[\ACM@format\ACM@format@nr]{% +\define@choicekey*+{\@classname.cls}{format}[\ACM@format\ACM@format@nr]{% manuscript, acmsmall, acmlarge, acmtog, sigconf, siggraph, sigplan, sigchi, sigchi-a, acmengage, acmcp}[manuscript]{}{% \ClassError{\@classname}{The option format must be manuscript, acmsmall, acmlarge, acmtog, sigconf, siggraph, sigplan, sigchi or sigchi-a}} -\def\@DeclareACMFormat#1{\DeclareOptionX{#1}{\setkeys{acmart.cls}{format=#1}}} +\def\@DeclareACMFormat#1{\DeclareOptionX{#1}{\setkeys{\@classname.cls}{format=#1}}} \@DeclareACMFormat{manuscript} \@DeclareACMFormat{acmsmall} \@DeclareACMFormat{acmlarge} @@ -2468,7 +2482,7 @@ % \begin{macro}{\if@ACM@screen} % Whether we use screen mode % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{screen}[true]{% +\define@boolkey+{\@classname.cls}[@ACM@]{screen}[true]{% \if@ACM@screen \PackageInfo{\@classname}{Using screen mode}% \else @@ -2483,7 +2497,7 @@ % \begin{macro}{\if@ACM@urlbreakonhyphens} % \changes{1.60}{2019/04/22}{introduced macro} % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{urlbreakonhyphens}[true]{% +\define@boolkey+{\@classname.cls}[@ACM@]{urlbreakonhyphens}[true]{% \if@ACM@urlbreakonhyphens \PackageInfo{\@classname}{Using breaking urls on hyphens}% \else @@ -2499,7 +2513,7 @@ % \changes{v1.46}{2017/08/29}{Modified description} % Whether we define theorem-like environments. % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{acmthm}[true]{% +\define@boolkey+{\@classname.cls}[@ACM@]{acmthm}[true]{% \if@ACM@acmthm \PackageInfo{\@classname}{Requiring acmthm}% \else @@ -2516,7 +2530,7 @@ % \changes{v1.48}{2017/09/09}{Review mode now switches on folios} % Whether we use review mode % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{review}[true]{% +\define@boolkey+{\@classname.cls}[@ACM@]{review}[true]{% \if@ACM@review \PackageInfo{\@classname}{Using review mode}% \AtBeginDocument{\@ACM@printfoliostrue}% @@ -2533,7 +2547,7 @@ % \changes{v1.03}{2016/04/22}{Added macro} % Whether we use author's-version mode % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{authorversion}[true]{% +\define@boolkey+{\@classname.cls}[@ACM@]{authorversion}[true]{% \if@ACM@authorversion \PackageInfo{\@classname}{Using authorversion mode}% \else @@ -2550,7 +2564,7 @@ % Special option for non-ACM publications % using the ACM typesetting options. % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{nonacm}[true]{% +\define@boolkey+{\@classname.cls}[@ACM@]{nonacm}[true]{% \if@ACM@nonacm \PackageInfo{\@classname}{Using nonacm mode}% \AtBeginDocument{\@ACM@printacmreffalse}% @@ -2570,7 +2584,7 @@ % \changes{v1.57}{2018/12/16}{Added macro} % Whether to balance the last page % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{balance}[true]{}{% +\define@boolkey+{\@classname.cls}[@ACM@]{balance}[true]{}{% \PackageError{\@classname}{The option balance can be either true or false}} \ExecuteOptionsX{balance} @@ -2583,7 +2597,7 @@ % \changes{v1.76}{2021/03/16}{Added macro} % Whether to balance the last page % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{pbalance}[true]{}{% +\define@boolkey+{\@classname.cls}[@ACM@]{pbalance}[true]{}{% \PackageError{\@classname}{The option pbalance can be either true or false}} \ExecuteOptionsX{pbalance=false} @@ -2601,7 +2615,7 @@ % \begin{macro}{\if@ACM@natbib} % Whether we use |natbib| mode % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{natbib}[true]{% +\define@boolkey+{\@classname.cls}[@ACM@]{natbib}[true]{% \if@ACM@natbib \PackageInfo{\@classname}{Explicitly selecting natbib mode}% \else @@ -2617,7 +2631,7 @@ % \begin{macro}{\if@ACM@anonymous} % Whether we use anonymous mode % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{anonymous}[true]{% +\define@boolkey+{\@classname.cls}[@ACM@]{anonymous}[true]{% \if@ACM@anonymous \PackageInfo{\@classname}{Using anonymous mode}% \else @@ -2634,7 +2648,7 @@ % \changes{v1.33}{2017/03/10}{Added macro (Michael D.~Adams)} % Whether we use timestamp mode % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{timestamp}[true]{% +\define@boolkey+{\@classname.cls}[@ACM@]{timestamp}[true]{% \if@ACM@timestamp \PackageInfo{\@classname}{Using timestamp mode}% \else @@ -2652,7 +2666,7 @@ % \changes{v1.36}{2017/05/13}{Corrected typo, thanks to bargteil} % Whether we use author-draft mode % \begin{macrocode} -\define@boolkey+{acmart.cls}[@ACM@]{authordraft}[true]{% +\define@boolkey+{\@classname.cls}[@ACM@]{authordraft}[true]{% \if@ACM@authordraft \PackageInfo{\@classname}{Using authordraft mode}% \@ACM@timestamptrue @@ -2788,13 +2802,13 @@ \ClassWarning{\@classname}{% The format siggraph is now obsolete.\MessageBreak I am switching to sigconf.} - \setkeys{acmart.cls}{format=sigconf} + \setkeys{\@classname.cls}{format=sigconf} \fi \ifnum\ACM@format@nr=7\relax % sigchi \ClassWarning{\@classname}{% The format sigchi is now obsolete.\MessageBreak I am switching to sigconf.} - \setkeys{acmart.cls}{format=sigconf} + \setkeys{\@classname.cls}{format=sigconf} \fi \ifnum\ACM@format@nr=8\relax % sigchi \ClassWarning{\@classname}{% @@ -2861,6 +2875,42 @@ % \changes{v1.38}{2017/05/13}{Increase default font size for SIGPLAN} % \changes{v1.87}{2022/08/27}{Set font sizes for |acmengage| and |acmcp|} % +%<*tagged> +% \changes{v2.09}{2022/08/25}{Saved the old definitions (Ulrike's +% code} +% Before we load the base class we want to save the original +% definitions of sectioning commands since |acmart| redefines them, +% and we need the vanilla versions. +% \begin{macro}{\@startsection@kernel} +% \changes{v2.00}{2023/11/19}{Added macro} +% \begin{macrocode} +\let\@startsection@kernel\@startsection +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@xsect@kernel} +% \changes{v2.00}{2023/11/19}{Added macro} +% \begin{macrocode} +\let\@xsect@kernel\@xsect +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@sect@kernel} +% \changes{v2.00}{2023/11/19}{Added macro} +% \begin{macrocode} +\let\@sect@kernel\@sect +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@ssect@kernel} +% \changes{v2.00}{2023/11/19}{Added macro} +% \begin{macrocode} +\let\@ssect@kernel\@ssect +% \end{macrocode} +% \end{macro} +% +% +% % % At this point we either have \cs{ACM@fontsize} or use defaults % \begin{macrocode} @@ -3258,6 +3308,14 @@ % We need to do this early since we want |hyperref| to have a chance % to redefine them again: % \begin{macrocode} +% +%<*tagged> +\let\@startsection\@startsection@kernel +\let\@sect\@sect@kernel +\let\@ssect\@ssect@kernel +\let\@xsect\@xsect@kernel +% +%<*class&!tagged> \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi \par @@ -3337,7 +3395,6 @@ \fi}% \fi \ignorespaces} -\def\@seccntformat#1{\csname the#1\endcsname\quad} \def\@ssect#1#2#3#4#5{% \@tempskipa #3\relax \ifdim \@tempskipa>\z@ @@ -3350,11 +3407,14 @@ \def\@svsechd{#4{\hskip #1\relax #5}}% \fi \@xsect{#3}} +% +%<*class> +\def\@seccntformat#1{\csname the#1\endcsname\quad} % \end{macrocode} % % \end{macro} % -% \begin{macro}{\@startsection} +% \begin{macro}{\@starttoc} % \changes{v1.31}{2017/03/04}{Redefined macro} % \changes{v1.43}{2017/07/09}{Added \cs{makeatletter}} % The |amsart| package redefines \cs{startsection}. Here we redefine @@ -3365,7 +3425,9 @@ \par\removelastskip\vskip\z@skip \@startsection{section}\@M\z@{\linespacing\@plus\linespacing}% {.5\linespacing}{\centering\contentsnamefont}{#2}% +%\@starttoc@cfgpoint@before{#1}%NEW<<<<<<<<<< (name will change) \@input{\jobname.#1}% +%\@starttoc@cfgpoint@after{#1}%NEW<<<<<<<<<<<< (name will change) \if@filesw \@xp\newwrite\csname tf@#1\endcsname \immediate\@xp\openout\csname tf@#1\endcsname \jobname.#1\relax @@ -5974,29 +6036,9 @@ % % \begin{macro}{\@ACM@copyright@check@cc} % \changes{v1.87}{2022/07/30}{Added macro} -% At present cC licenses can be used only for acmengage format or for -% non-acm stuff. This macro checks whether the CC license is -% applicable and generates an error if not. % \changes{v2.00}{2023/10/22}{Moved to warning} -% \begin{macrocode} -\def\@ACM@copyright@check@cc{% - \if@ACM@nonacm - \ClassInfo{\@classname}{Using CC license with a non-acm - material}% - \else - \if@ACM@engage - \ClassInfo{\@classname}{Using CC license with ACM Enage - material}% - \else - \ClassWarning{\@classname}{% - Sorry, Creative Commons licenses are\MessageBreak - currently not used with ACM publications\MessageBreak - typeset by the authors}{Please use nonacm - option or ACM Engage class to enable CC licenses}% - \fi - \fi} -% \end{macrocode} -% +% \changes{v2.09}{2024/08/25}{Deleted macro} +% This macro is no longer needed due to the change in ACM policy. % \end{macro} % % \begin{macro}{\@copyrightpermission} @@ -6007,8 +6049,8 @@ % \changes{v1.85}{2022/05/08}{Added CC licenses} % \changes{v1.87}{2022/07/30}{CC licenses now are allowed only for % non-acm or ACM engage publications} -% \changes{v2.00}{2023/10/24}{Rewrote wording} -% \changes{v2.00}{2023/10/24}{Rewrote wording} +% \changes{v2.09}{2024/08/25}{Deleted checking whether CC licenses are +% allowed} % The canned permission block. % \begin{macrocode} \def\@copyrightpermission{% @@ -6139,7 +6181,6 @@ disseminate the work on their personal and corporate Web sites with the appropriate attribution. \or % CC - \@ACM@copyright@check@cc \IfEq{\ACM@cc@type}{zero}{% \def\ACM@CC@Url{https://creativecommons.org/publicdomain/zero/1.0/legalcode}}{% \edef\ACM@CC@Url{https://creativecommons.org/licenses/\ACM@cc@type/\ACM@cc@version/legalcode}}% @@ -6471,7 +6512,7 @@ pdfsubject={\@concepts}, pdfkeywords={\@keywords}, pdfcreator={LaTeX with acmart - \csname ver@acmart.cls\endcsname\space + \csname ver@\@classname.cls\endcsname\space and hyperref \csname ver@hyperref.sty\endcsname}}% \andify\authors @@ -7588,6 +7629,18 @@ % % \end{macro} % +%<*tagged> +% We stop tagging inside maketitle for now. Ulrike's code again. +% \begin{macrocode} +\ExplSyntaxOn +\AddToHook{cmd/maketitle/before} + {\tagstructbegin{tag=Title}\tagmcbegin{} \tag_stop:} +\AddToHook{cmd/maketitle/after} + {\tag_start:\tagmcend\tagstructend } +\ExplSyntaxOff +% \end{macrocode} +% +% %\subsection{Headers and Footers} %\label{sec:head_foot} % @@ -8129,28 +8182,33 @@ % \changes{v1.69}{2020/02/02}{No dots for unindented paragraphs} % Sectioning is different for different levels % \begin{macrocode} -\renewcommand\section{\@startsection{section}{1}{\z@}% +\renewcommand\section{\def\@toclevel{1}% + \@startsection{section}{1}{\z@}% {-.75\baselineskip \@plus -2\p@ \@minus -.2\p@}% {.25\baselineskip}% {\ACM@NRadjust\@secfont}} -\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% +\renewcommand\subsection{\def\@toclevel{2}% + \@startsection{subsection}{2}{\z@}% {-.75\baselineskip \@plus -2\p@ \@minus -.2\p@}% {.25\baselineskip}% {\ACM@NRadjust\@subsecfont}} -\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% +\renewcommand\subsubsection{\def\@toclevel{3}% + \@startsection{subsubsection}{3}{\z@}% {-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}% {-3.5\p@}% {\ACM@NRadjust{\@subsubsecfont\@adddotafter}}} -\renewcommand\paragraph{\@startsection{paragraph}{4}{\parindent}% +\renewcommand\paragraph{\def\@toclevel{4}% + \@startsection{paragraph}{4}{\parindent}% {-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}% {-3.5\p@}% {\ACM@NRadjust{\@parfont\@adddotafter}}} -\newcommand\noindentparagraph{\@startsection{paragraph}{4}{\z@}% +\newcommand\noindentparagraph{\def\@toclevel{4}% + \@startsection{paragraph}{4}{\z@}% {-.5\baselineskip \@plus -2\p@ \@minus -.2\p@}% {-3.5\p@}% {\ACM@NRadjust{\@parfont}}} - -\renewcommand\part{\@startsection{part}{9}{\z@}% +\renewcommand\part{\def\@toclevel{9}% + \@startsection{part}{9}{\z@}% {-10\p@ \@plus -4\p@ \@minus -2\p@}% {4\p@}% {\ACM@NRadjust\@parfont}} diff --git a/macros/latex/contrib/acmart/acmart.ins b/macros/latex/contrib/acmart/acmart.ins index d17dc066fd..95c1596220 100644 --- a/macros/latex/contrib/acmart/acmart.ins +++ b/macros/latex/contrib/acmart/acmart.ins @@ -13,6 +13,7 @@ \generate{% \file{acmart.cls}{\from{acmart.dtx}{class}} + \file{acmart-tagged.cls}{\from{acmart.dtx}{class,tagged}} } \obeyspaces diff --git a/macros/latex/contrib/acmart/acmart.pdf b/macros/latex/contrib/acmart/acmart.pdf index 9a91d07bf7..1bcb0df6ad 100644 Binary files a/macros/latex/contrib/acmart/acmart.pdf and b/macros/latex/contrib/acmart/acmart.pdf differ diff --git a/macros/latex/contrib/acmart/acmguide.pdf b/macros/latex/contrib/acmart/acmguide.pdf index 927dd7c750..5e90dfb3a5 100644 Binary files a/macros/latex/contrib/acmart/acmguide.pdf and b/macros/latex/contrib/acmart/acmguide.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmcp.pdf b/macros/latex/contrib/acmart/samples/sample-acmcp.pdf index c57d1898d1..47892feee6 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmcp.pdf and b/macros/latex/contrib/acmart/samples/sample-acmcp.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmengage.pdf b/macros/latex/contrib/acmart/samples/sample-acmengage.pdf index 366843b28e..d4cd824cf2 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmengage.pdf and b/macros/latex/contrib/acmart/samples/sample-acmengage.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf index 25a90ec394..65c836673e 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf and b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf index d644e32874..4fe535b32c 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf index 6e1488235e..17cb0fe359 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf index e0471c8a27..81006c5a71 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-tagged.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-tagged.pdf new file mode 100644 index 0000000000..87bd3e53d1 Binary files /dev/null and b/macros/latex/contrib/acmart/samples/sample-acmsmall-tagged.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf index 17c719abda..fa3a710f0f 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf b/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf index 71e87b73b1..3518df9fdd 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf and b/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf index 1e39a159d3..681d94fbc7 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf and b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf index 301caf80cb..2b02e5a7ab 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf and b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf index a465c8463e..be82dbf5ab 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf and b/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf index b4052f9363..e2548408a0 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf and b/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf index dc0e0fe12e..f89bc4b108 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf and b/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf index ab5954e602..dd0252c1d5 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf and b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf index 534e00da12..6f0cccd362 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf and b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf differ diff --git a/macros/latex/contrib/acmart/samples/samples.dtx b/macros/latex/contrib/acmart/samples/samples.dtx index 37e7a0abfd..b2d75d2a83 100644 --- a/macros/latex/contrib/acmart/samples/samples.dtx +++ b/macros/latex/contrib/acmart/samples/samples.dtx @@ -14,7 +14,19 @@ %TC:envir comment 0 0 %TCMACROS %% -%% +% +%<*tagged> +%% The tagged file should start with the metadata commands. +%% We also need currently use lualatex-dev for compilation! +\ifx\HCode\Undef +\DocumentMetadata{ + pdfversion=2.0,pdfstandard=ua-2, + testphase={phase-III,firstaid,math,title}} +\else +\DocumentMetadata{} +\fi +% +%<*all> %% The first command in your LaTeX source must be the \documentclass %% command. %% @@ -27,7 +39,8 @@ %% %% %\documentclass[manuscript,screen,review]{acmart} -%\documentclass[acmsmall]{acmart} +%\documentclass[acmsmall]{acmart} +%\documentclass[acmsmall]{acmart} %\documentclass[acmsmall,natbib=false]{acmart} %\documentclass[acmsmall,screen,review]{acmart} %\documentclass[acmlarge]{acmart} @@ -41,7 +54,7 @@ %\documentclass[sigconf, language=french, %language=german, language=spanish, language=english]{acmart} %\documentclass[acmcp]{acmart} - +%\documentclass[acmsmall]{acmart-tagged} %% %% \BibTeX command to typeset BibTeX logo in the docs \AtBeginDocument{% @@ -58,7 +71,6 @@ \copyrightyear{2018} \acmYear{2018} \acmDOI{XXXXXXX.XXXXXXX} - % %<*proceedings> %% These commands are for a PROCEEDINGS abstract or paper. diff --git a/macros/latex/contrib/acmart/samples/samples.ins b/macros/latex/contrib/acmart/samples/samples.ins index 2636f5899b..a525d48b55 100644 --- a/macros/latex/contrib/acmart/samples/samples.ins +++ b/macros/latex/contrib/acmart/samples/samples.ins @@ -24,5 +24,6 @@ \file{sample-acmtog-conf.tex}{\from{samples.dtx}{all,journal,proceedings,bibtex,acmtog-conf}} \file{sample-acmcp.tex}{\from{samples.dtx}{all,journal,acmcp}} \file{sample-acmengage.tex}{\from{acmengage.dtx}{acmengage}} + \file{sample-acmsmall-tagged.tex}{\from{samples.dtx}{all,journal,acmsmall,tagged}} } diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/Makefile b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/Makefile index c51927feb8..c3e48e3484 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/Makefile +++ b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/Makefile @@ -3,8 +3,8 @@ PFX = biblatex- STY1 = oxnotes STYS = oxnotes oxyear oxnum oxalph VARS = ibid note inote trad1 trad2 trad3 -LANGS = american british english spanish -LANGX = spanish +LANGS = american british english spanish polish +LANGX = spanish polish TESTS = $(STYS) $(foreach sty, $(STYS), $(LANGX:%=%-$(sty))) AUX = aux,bbl,bcf,blg,doc,fdb_latexmk,fls,glo,gls,hd,idx,ilg,ind,listing,log,nav,out,run.xml,snm,synctex.gz,toc,vrb SHELL = bash diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/README.md b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/README.md index c8b147bc81..a6d358af66 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/README.md +++ b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/README.md @@ -46,7 +46,7 @@ UNIX-like systems: oxnotes-trad1.cbx, oxnotes-trad2.cbx, oxnotes-trad3.cbx, oxyear.cbx, oxnum.cbx, oxalph.cbx - american-oxref.lbx, british-oxref.lbx, english-oxref.lbx, - spanish-oxref.lbx + spanish-oxref.lbx, polish.lbx - oxnotes.dbx, oxnotes-ibid.dbx, oxnotes-note.dbx, oxnotes-inote.dbx, oxnotes-trad1.dbx, oxnotes-trad2.dbx, oxnotes-trad3.dbx, oxyear.dbx, oxnum.dbx, oxalph.dbx @@ -89,7 +89,8 @@ first two steps. american-oxref.lbx, british-oxref.lbx, english-oxref.lbx, - spanish-oxref.lbx + spanish-oxref.lbx, + polish-oxref.lbx, oxalph.bbx, oxalph.cbx, oxalph.dbx, diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxalph-doc.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxalph-doc.pdf index 0ce372ce9b..464db54ffe 100644 Binary files a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxalph-doc.pdf and b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxalph-doc.pdf differ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnotes-doc.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnotes-doc.pdf index 649083bbef..4ce50328b3 100644 Binary files a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnotes-doc.pdf and b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnotes-doc.pdf differ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnum-doc.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnum-doc.pdf index 7c8b8360de..cde0ea096b 100644 Binary files a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnum-doc.pdf and b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxnum-doc.pdf differ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.dtx b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.dtx index 8c8c94d432..18bf56b898 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.dtx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.dtx @@ -1,6 +1,6 @@ % \iffalse %<*internal|bbx|cbx|dbx|lbx|doc> -\def\Version{2023/11/23 v3.2} +\def\Version{2024/08/26 v3.3} % %<*internal> \iffalse @@ -87,6 +87,10 @@ \ProvidesFile{spanish-oxref.lbx} [\Version\space Spanish conventions required by the biblatex-oxref styles] % +%<*lbx&pl> +\ProvidesFile{polish-oxref.lbx} + [\Version\space Polish conventions required by the biblatex-oxref styles] +% %<*doc&n> \ProvidesFile{oxnotes-doc.tex} [\Version\space Footnote-based biblatex style inspired by the Oxford Guide to Style] @@ -220,6 +224,7 @@ Copyright (C) 2016–2023 Alex Ball \file{british-\jobname.lbx}{\from{\jobname.dtx}{lbx,gb}} \file{english-\jobname.lbx}{\from{\jobname.dtx}{lbx,en}} \file{spanish-\jobname.lbx}{\from{\jobname.dtx}{lbx,es}} + \file{polish-\jobname.lbx}{\from{\jobname.dtx}{lbx,pl}} \file{oxnotes-doc.tex}{\from{\jobname.dtx}{doc,n}} \file{oxnum-doc.tex}{\from{\jobname.dtx}{doc,m}} \file{oxalph-doc.tex}{\from{\jobname.dtx}{doc,a}} @@ -659,18 +664,24 @@ Copyright (C) 2016–2023 Alex Ball \newcounter{elementcount} \newcommand{\commaorandlist}[1]{% + % Counting up \renewcommand*{\do}[1]{\stepcounter{elementcount}}% \dolistloop{#1}% \ifnumgreater{\value{elementcount}}{2}{% - \def\finaland{, and }% + \def\thisfinaland{,\space and\space}% }{% - \def\finaland{ and }% + \def\thisfinaland{\space and\space}% }% + % Counting back down \renewcommand*{\do}[1]{% - \ifnumequal{\value{elementcount}}{1}{% - ##1% + \ifnumgreater{\value{elementcount}}{2}{% antipenultimate or earlier + ##1,\space }{% - \ifnumequal{\value{elementcount}}{2}{#1\finaland}{##1, }% + \ifnumequal{\value{elementcount}}{2}{% penultimate + ##1\thisfinaland + }{% last + ##1% + }% }% \addtocounter{elementcount}{-1}% }% @@ -678,6 +689,7 @@ Copyright (C) 2016–2023 Alex Ball \author{Alex Ball} \listadd\thetranslators{Bruno Maltras} +\listadd\thetranslators{Sebastian Wasiuta} \date{\printdateTeX{\filedate}} \begin{document} \thispagestyle{empty} @@ -799,7 +811,7 @@ UNIX-like systems: oxnotes-trad1.cbx, oxnotes-trad2.cbx, oxnotes-trad3.cbx, oxyear.cbx, oxnum.cbx, oxalph.cbx - american-oxref.lbx, british-oxref.lbx, english-oxref.lbx, - spanish-oxref.lbx + spanish-oxref.lbx, polish.lbx - oxnotes.dbx, oxnotes-ibid.dbx, oxnotes-note.dbx, oxnotes-inote.dbx, oxnotes-trad1.dbx, oxnotes-trad2.dbx, oxnotes-trad3.dbx, oxyear.dbx, oxnum.dbx, oxalph.dbx @@ -842,7 +854,8 @@ first two steps. american-oxref.lbx, british-oxref.lbx, english-oxref.lbx, - spanish-oxref.lbx + spanish-oxref.lbx, + polish-oxref.lbx, oxalph.bbx, oxalph.cbx, oxalph.dbx, @@ -1663,9 +1676,12 @@ This can be set globally or on a per-type or per-entry basis. \section{Works in foreign languages} -If you used a foreign language work, you might want to recommend a good translation. +If you used a work in a different language from the one in which you are currently writing, +you might want to recommend a good translation into the latter language. -\tip{Add the translation in \code{related}, and set \code{relatedtype} to \code{translationas}.} +\tip{Add the translation in \code{related}, and set \code{relatedtype} to \code{translationas}. + The localized bibstring reflects the current localization language: + \enquote{English translation}, \enquote{traducido espa\~nol}, and so on.} \begin{bibexbox} % @@ -1691,7 +1707,8 @@ If you used a foreign language work, you might want to recommend a good translat \end{Verbatim} \end{bibexbox} -\tip{To specify the translator up front, set the \code{relatedtype} to \code{bytranslator} instead.} +\tip{To specify the translator up front, or to recommend a translation into a third language, + set the \code{relatedtype} to \code{bytranslator} instead.} \begin{bibexbox} % @@ -7770,6 +7787,7 @@ rather than \pkg[biblatex]{oxref}.} \newcommand*{\uscasetitlepunct}{\addcomma\space} \renewcommand*{\relateddelim}{\addsemicolon\space} \DeclareDelimFormat{revsdnamedelim}{\addcomma} +\DeclareDelimFormat[pair]{revsdnamedelim}{} \DeclareDelimFormat{authortypedelim}{\addspace} \DeclareDelimFormat{editortypedelim}{\addspace} \DeclareDelimFormat{translatortypedelim}{\addspace} @@ -7846,7 +7864,7 @@ rather than \pkg[biblatex]{oxref}.} and test {\ifdefvoid{#2}}% }{}{% - \printdelim{revsdnamedelim}}% + \printdelim{revsdnamepunct}}% \ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\bibnamedelimd\mkbibnametitle{#5}\isdot}{}}% \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}% }{% @@ -7861,7 +7879,7 @@ rather than \pkg[biblatex]{oxref}.} and test {\ifdefvoid{#3}}% }{}{% - \printdelim{revsdnamedelim}}% + \printdelim{revsdnamepunct}}% \ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\bibnamedelimd\mkbibnametitle{#5}\isdot}{}}% \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}% \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}} @@ -7871,9 +7889,22 @@ rather than \pkg[biblatex]{oxref}.} % the bibliography, but in natural order in citations. We implement this, along % with the case changing option, in the following name format. We also add a % second hash for checking if names (e.g.\@ |author| and |authoraddon|) are the -% same. +% same. We only need |name:revsdelim| on the first item, and only if it will be +% followed by something else. % % \begin{macrocode} +\renewbibmacro*{name:revsdelim}{% + \ifboolexpr{ + ( + test {\ifnumequal{\value{liststop}}{1}} + and + test \ifmorenames + ) + or + test {\ifnumequal{\value{liststop}}{2}} + } + {\printdelim{revsdnamedelim}} + {}} \def\blx@ox@lasthash{} \DeclareNameFormat{bib-family-given/cite-given-family}{% \iffieldannotation{inferred}{\ifnumequal{\value{listcount}}{1}{\bibopenbracket}{}}{}% @@ -7918,13 +7949,22 @@ rather than \pkg[biblatex]{oxref}.} \renewcommand*{\mkbibnametitle}[1]{##1}% }{}% \ifboolexpe{% - test {\ifnumgreater{\value{listcount}}{1}} - or ( + test {\ifnumequal{\value{listcount}}{\@ne}} + and + ( + test {\ifnumless{\value{listcount}}{\value{liststop}}} + or + test {\ifnumgreater{\value{listtotal}}{\value{maxnames}}} + or + test {\ifandothers{\currentname}} + ) + and not + ( test {\ifdefvoid\namepartgiven} and test {\ifdefvoid\namepartprefix} ) - }{}{\usebibmacro{name:revsdelim}}% + }{\usebibmacro{name:revsdelim}}{}% }{% % \end{macrocode} % @@ -7967,6 +8007,10 @@ rather than \pkg[biblatex]{oxref}.} \savefield{hash}{\blx@ox@lasthash}% }% \ifitemannotation{inferred}{\bibclosebracket}{}% + \ifitemannotation{variant}{% + \global\settoggle{blx@ox@variantname}{true}% + }{% + \global\settoggle{blx@ox@variantname}{false}}% \usebibmacro{name:andothers}% \iffieldannotation{inferred}{% \ifboolexpr{ @@ -8012,7 +8056,9 @@ rather than \pkg[biblatex]{oxref}.} \usebibmacro{name:andothers}} % \end{macrocode} % -% We do likewise for the regular |family-given| format. +% We do likewise for the regular |family-given| format. Also, we only want to +% use the |name:revsdelim| on the last name in the list if it will be followed +% by \enquote{et al.}. % % \begin{macrocode} \DeclareNameFormat{family-given}{% @@ -8035,13 +8081,20 @@ rather than \pkg[biblatex]{oxref}.} }{% \global\settoggle{blx@ox@variantname}{false}}% \ifboolexpe{% - test {\ifnumgreater{\value{listcount}}{1}} - or ( + ( + test {\ifnumless{\value{listcount}}{\value{liststop}}} + or + test {\ifnumgreater{\value{listtotal}}{\value{maxnames}}} + or + test {\ifandothers{\currentname}} + ) + and not + ( test {\ifdefvoid\namepartgiven} and test {\ifdefvoid\namepartprefix} ) - }{}{\usebibmacro{name:revsdelim}}% + }{\usebibmacro{name:revsdelim}}{}% \usebibmacro{name:andothers}} % \end{macrocode} % @@ -8068,21 +8121,46 @@ rather than \pkg[biblatex]{oxref}.} \DeclareFieldFormat{namevariant}{\mkbibparens{\bibstring{equals}\space #1}} % \end{macrocode} % -% We provide an alternative method that uses new name fields |authoraddon| and -% |editoraddon|. To do this, we define a bibmacro that reimplements the loopcode -% logic of \cs{printnames}, but operates on two name lists simultaneously; we use -% saveboxes to extract the hashes, and only print the alternative name if it has -% a different hash. The same technique is used by \textsf{oxyear} below to pair -% up names with the short form used in references, so this bibmacro is written -% to handle both cases. +% We have two use cases for a bibmacro that reimplements the loopcode logic of +% \cs{printnames}, but operates on two name lists simultaneously. One is to +% support the new name fields |authoraddon| and |editoraddon|; the other is to +% pair up names with the short form used in references, as required by +% \textsf{oxyear} below. +% +% We need to do this in a way that doesn't break the patterns used for +% configuring and adapting the punctuation that delimits the list items, so the +% |namepair:delim| macro does the same as |name:delim| but instead of reading +% the current counters, takes two extra arguments (in addition to the current name): +% the number of the current name pair and the total number of name pairs. +% The regular |finallistdelim| delimiter format looks up the value of the +% |liststop| counter, so we need to give it the right value. +% +% \begin{macrocode} +\newbibmacro*{namepair:delim}[3]{% + \ifnumgreater{#2}{\@ne}{% + \ifnumless{#2}{#3}{% + \printdelim{multinamedelim}% + }{% + \ifnumgreater{#3}{\c@maxnames}{% + \c@liststop\c@minnames + }{% + \c@liststop#3}% + \lbx@finalnamedelim{#1}}% + }{}} +% \end{macrocode} % % The |namepairs| bibmacro takes two arguments: the data fields holding the main -% name and alternative name respectively. +% name and alternative name respectively. When rendering the names, we use +% saveboxes to extract the hashes, and only print the alternative name if it has +% a different hash. In this case, we also switch to the \enquote{pair} +% delimiter context, where the |revsdnamedelim| (if any) is suppressed. % % \begin{macrocode} +\DeclareFieldFormat{expanded}{\mkbibparens{#1}} \newcounter{namepairs} \newsavebox{\blx@ox@namebox} \newsavebox{\blx@ox@altnamebox} +\newtoggle{blx@ox@thispairvariant}% \newbibmacro*{namepairs}[2]{% \setcounter{namepairs}{0}% \savebibmacro{name:andothers}% @@ -8106,21 +8184,19 @@ rather than \pkg[biblatex]{oxref}.} ) }{% \stepcounter{namepairs}% - \ifnumgreater{\value{namepairs}}{1}{% - \ifnumequal{\value{#1}}{2}{% - \setunit*{\addspace\bibstring{and}\addspace}% - }{% - \ifnumequal{\value{namepairs}}{\value{#1}}{% - \setunit*{\addcomma\space\bibstring{and}\addspace}% - }{% - \setunit*{\addcomma\space}% - }% - }% - }{}% \savebox{\blx@ox@namebox}{% \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}% }% \let\blx@ox@firsthash=\blx@ox@lasthash + \savebox{\blx@ox@altnamebox}{% + \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}% + }% + \let\blx@ox@secondhash=\blx@ox@lasthash + \iftoggle{blx@ox@variantname}{% + \toggletrue{blx@ox@thispairvariant}% + }{% + \togglefalse{blx@ox@thispairvariant}% + }% % \end{macrocode} % % This is the part intended for |authoraddon| and |editoraddon|. Note that it @@ -8128,20 +8204,28 @@ rather than \pkg[biblatex]{oxref}.} % % \begin{macrocode} \IfEndWith{#2}{addon}{% - \savebox{\blx@ox@altnamebox}{% - \printnames[by#1][\value{namepairs}-\value{namepairs}]{#2}% - }% - \let\blx@ox@secondhash=\blx@ox@lasthash + \usebibmacro{namepair:delim}% + {\unhbox\blx@ox@namebox}{\value{namepairs}}{\value{#1}}% \ifdefstrequal{\blx@ox@firsthash}{\blx@ox@secondhash}{% - \unhbox\blx@ox@namebox + \hbox{}\unhbox\blx@ox@namebox }{% - \unhbox\blx@ox@namebox\addspace - \iftoggle{blx@ox@variantname}{% + \iftoggle{blx@ox@thispairvariant}{% \ifbibliography{% - \printtext[namevariant]{\printnames[#1][\value{namepairs}-\value{namepairs}]{#2}}% - }{}% + \delimcontext{pair}% + \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}% + \setunit{\addspace}% + \printtext[namevariant]{% + \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}}% + }{% + \hbox{}\unhbox\blx@ox@namebox + }% }{% - \printtext[nameaddon]{\unhbox\blx@ox@altnamebox}% + \delimcontext{pair}% + \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}% + \setunit{\addspace}% + \printtext[nameaddon]{% + \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}% + }% }% }% % \end{macrocode} @@ -8152,15 +8236,19 @@ rather than \pkg[biblatex]{oxref}.} % % \begin{macrocode} }{% - \savebox{\blx@ox@altnamebox}{% - \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}% - }% - \let\blx@ox@secondhash=\blx@ox@lasthash \ifdefstrequal{\blx@ox@firsthash}{\blx@ox@secondhash}{% - \unhbox\blx@ox@namebox + \usebibmacro{namepair:delim}% + {\unhbox\blx@ox@namebox}{\value{namepairs}}{\value{#1}}% + \hbox{}\unhbox\blx@ox@namebox }{% - \unhbox\blx@ox@altnamebox - \addspace\mkbibparens{\unhbox\blx@ox@namebox}% + \usebibmacro{namepair:delim}% + {\unhbox\blx@ox@altnamebox}{\value{namepairs}}{\value{#1}}% + \delimcontext{pair}% + \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}% + \setunit{\addspace}% + \printtext[expanded]{% + \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}% + }% }% }% }% @@ -8725,7 +8813,7 @@ rather than \pkg[biblatex]{oxref}.} \DeclareFieldFormat{pages}{% \iffieldundef{bookpagination}% {\mkcomprange{#1}}% - {\mkcomprange[{\mkpageprefix[bookpagination]}]{#1}}% + {\mkpageprefix[bookpagination][\mkcomprange]{#1}}% } % \end{macrocode} % @@ -8735,7 +8823,7 @@ rather than \pkg[biblatex]{oxref}.} \DeclareFieldFormat{postnote}{% \iffieldundef{pagination}% {\mkcomprange{#1}}% - {\mkcomprange[{\mkpageprefix}]{#1}}% + {\mkpageprefix[pagination][\mkcomprange]{#1}}% } % \end{macrocode} @@ -9299,6 +9387,7 @@ rather than \pkg[biblatex]{oxref}.} % considered on request. % % \begin{macrocode} +\newcommand*{\mkvolroman}[1]{\Rn{#1}} \DeclareFieldFormat[book,mvbook,bookinbook,inbook,suppbook,% collection,mvcollection,incollection,suppcollection,% proceedings,mvproceedings,inproceedings,% @@ -9306,11 +9395,11 @@ reference,mvreference,inreference]{volume}{% \IfSubStr{#1}{-}{% \StrCount{#1}{-}[\blx@ox@dashnum]% \StrBefore{#1}{-}[\blx@ox@volnum]% - \expandafter\ifinteger\blx@ox@volnum{\Rn{\blx@ox@volnum}}{\blx@ox@volnum}\bibrangedash + \expandafter\ifinteger\blx@ox@volnum{\mkvolroman{\blx@ox@volnum}}{\blx@ox@volnum}\bibrangedash \StrBehind[\blx@ox@dashnum]{#1}{-}[\blx@ox@volnum]% - \expandafter\ifinteger\blx@ox@volnum{\Rn{\blx@ox@volnum}}{\blx@ox@volnum}% + \expandafter\ifinteger\blx@ox@volnum{\mkvolroman{\blx@ox@volnum}}{\blx@ox@volnum}% }{% - \ifinteger{#1}{\Rn{#1}}{#1}}} + \ifinteger{#1}{\mkvolroman{#1}}{#1}}} % \end{macrocode} % % Where a multi-volume work is more like a series, the volume number and @@ -9377,6 +9466,37 @@ reference,mvreference,inreference]{volume}{% {Valid values are 'in' and 'out'.}}}} % \end{macrocode} % +% If there are the same number of locations and publishers, and there are more +% than one pair, we print them pairwaise rather than in two separate lists. In +% order to do this while retaining the normal mechanisms for punctuating the +% list, we need a |listpair:delim| macro similar to |namepair:delim| (above) +% that uses the generic list punctuation. Again, the three arguments are the +% item being printed, the number of the current item pair and the total number +% of item pairs. +% +% \begin{macrocode} +\newbibmacro*{listpair:delim}[3]{% + \ifnumgreater{#2}{\@ne}{% + \ifnumless{#2}{#3}{% + \printdelim{multilistdelim}% + }{% + \c@liststop#3% + \lbx@finallistdelim{#1}}% + }{}} +% \end{macrocode} +% +% We use this as the basis of a list format that will be applied to the location +% element of a location--publisher pair. +% +% \begin{macrocode} +\newcounter{locpubpairs} +\DeclareListFormat{locpub}{% + \usebibmacro{listpair:delim}% + {#1}{\value{locpubpairs}}{\value{location}}% + #1\isdot +} +% \end{macrocode} +% % When citing both the first and a later edition, the first one comes % first, and the later one comes after a semicolon. As per standard % \pkg{biblatex}, the elements of a single edition are separated by commas @@ -9385,7 +9505,7 @@ reference,mvreference,inreference]{volume}{% % origpublisher is also specified. % % \begin{macrocode} -\newcounter{locpubpairs} +\newsavebox{\blx@ox@locbox} \newbibmacro*{edition+publisher+location+date}{% \printlist{origlocation}% \iflistundef{origpublisher}% @@ -9406,10 +9526,11 @@ reference,mvreference,inreference]{volume}{% \setunit*{\addcomma\space}% % \end{macrocode} % -% If there are the same number of locations and publishers, and there -% are more than one pair, we print them pairwaise rather than in two +% As mentioned, if there are the same number of locations and publishers, and +% there are more than one pair, we print them pairwaise rather than in two % separate lists. This uses the same principle as the |namepairs| bibmacro, -% but does not have the list truncation apparatus. +% but does not have the list truncation apparatus. This time we use a savebox +% just for efficiency. % % \begin{macrocode} \ifboolexpr{% @@ -9424,19 +9545,8 @@ reference,mvreference,inreference]{volume}{% test {\ifnumcomp{\value{locpubpairs}}{<}{\value{publisher}}} }{% \stepcounter{locpubpairs}% - \ifnumcomp{\value{locpubpairs}}{>}{1}{% - \ifnumequal{\value{publisher}}{2}{% - \setunit*{\addspace\bibstring{and}\addspace}% - }{% - \ifnumequal{\value{locpubpairs}}{\value{publisher}}{% - \setunit*{\addcomma\space\bibstring{and}\addspace}% - }{% - \setunit*{\addcomma\space}% - }% - }% - }{}% - \printlist[][\value{locpubpairs}-\value{locpubpairs}]{location}% - \setunit*{\addcolon\space}% + \printlist[locpub][\value{locpubpairs}-\value{locpubpairs}]{location}% + \setunit{\addcolon\space}% \printlist[][\value{locpubpairs}-\value{locpubpairs}]{publisher}% }% \restorebibmacro{list:andothers}% @@ -11383,7 +11493,11 @@ reference,mvreference,inreference]{volume}{% \setcounter{blx@tmpcnt}{\value{listcount}}% \addtocounter{blx@tmpcnt}{1}% \ifnumequal{\value{blx@tmpcnt}}{\value{listtotal}}{% - #1\space\bibstring{and}\addspace + \ifnumgreater{\value{listtotal}}{2}{% + #1\finalandcomma\space\bibstring{and}\addspace + }{% + #1\space\bibstring{and}\addspace + } }{% #1\addcomma\space}}}% @@ -14256,11 +14370,6 @@ reference,mvreference,inreference]{volume}{% % \code{authoraddon} has not been provided. % % \begin{macrocode} -\xpatchbibmacro{namepairs}{% - \printnames[by#1]% -}{% - \printnames[#1]% -}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch namepairs}} \xpatchbibmacro{author+altauthor}{% \printnames{author}% }{% @@ -15085,7 +15194,7 @@ reference,mvreference,inreference]{volume}{% \InheritBibliographyExtras{english} \DeclareBibliographyExtras{% \def\finalandcomma{\addcomma}% - \def\blx@ox@langbibstring#1#2{#1\addspace\bibstring{#2}}% + \def\blx@ox@langbibstring#1#2{#1\setunit*{\addspace}\bibstring{#2}}% } \UndeclareBibliographyExtras{% \def\blx@ox@langbibstring#1#2{\bibstring{#2}}% @@ -15296,11 +15405,11 @@ reference,mvreference,inreference]{volume}{% byreviser = {{revised by}{rev\adddot}}, byreviewer = {{reviewed by}{rev\adddot}}, bycollaborator = {{in collaboration with}{in collab\adddotspace with}}, - bytranslator = {{translated \lbx@lfromlang\ by}{trans\adddot\ \lbx@sfromlang}}, + bytranslator = {{translated by}{trans\adddot}}, bycommentator = {{commented by}{comm\adddot}}, byannotator = {{annotated by}{annot\adddot}}, - byeditortr = {{edited and translated \lbx@lfromlang\ by}% - {ed\adddotspace and trans\adddot\ \lbx@sfromlang}}, + byeditortr = {{edited and translated by}% + {ed\adddotspace and trans\adddot}}, byeditorco = {{edited and commented by}% {ed\adddotspace and comm\adddot}}, byeditoran = {{edited and annotated by}% @@ -15311,16 +15420,16 @@ reference,mvreference,inreference]{volume}{% {ed.\adddotspace with foreword}}, byeditoraf = {{edited, with an afterword, by}% {ed.\adddotspace with afterword}}, - byeditortrco = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented by}% - {ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}}, - byeditortran = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated by}% - {ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}}, - byeditortrin = {{edited and translated \lbx@lfromlang, with an introduction, by}% - {with introduction, ed\adddotspace and trans\adddot\ \lbx@sfromlang}}, - byeditortrfo = {{edited and translated \lbx@lfromlang, with a foreword, by}% - {with foreword, ed\adddotspace and trans\adddot\ \lbx@sfromlang}}, - byeditortraf = {{edited and translated \lbx@lfromlang, with an afterword, by}% - {with afterword, ed\adddotspace and trans\adddot\ \lbx@sfromlang}}, + byeditortrco = {{edited, translated\finalandcomma\ and commented by}% + {ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}}, + byeditortran = {{edited, translated\finalandcomma\ and annotated by}% + {ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}}, + byeditortrin = {{edited and translated, with an introduction, by}% + {with introduction, ed\adddotspace and trans\adddot}}, + byeditortrfo = {{edited and translated, with a foreword, by}% + {with foreword, ed\adddotspace and trans\adddot}}, + byeditortraf = {{edited and translated, with an afterword, by}% + {with afterword, ed\adddotspace and trans\adddot}}, byeditorcoin = {{edited and commented, with an introduction, by}% {with introduction, ed\adddotspace and comm\adddot}}, byeditorcofo = {{edited and commented, with a foreword, by}% @@ -15333,47 +15442,46 @@ reference,mvreference,inreference]{volume}{% {with foreword, ed\adddotspace and annot\adddot}}, byeditoranaf = {{edited and annotated, with an afterword, by}% {with afterword, ed\adddotspace and annot\adddot}}, - byeditortrcoin = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented, with an introduction, by}% - {with introduction, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}}, - byeditortrcofo = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented, with a foreword, by}% - {with foreword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}}, - byeditortrcoaf = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented, with an afterword, by}% - {with afterword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}}, - byeditortranin = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated, with an introduction, by}% - {with introduction, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}}, - byeditortranfo = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated, with a foreword, by}% - {with foreword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}}, - byeditortranaf = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated, with an afterword, by}% - {with afterword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}}, - bytranslatorco = {{translated \lbx@lfromlang\ and commented by}% - {trans\adddot\ \lbx@sfromlang\ and comm\adddot}}, - bytranslatoran = {{translated \lbx@lfromlang\ and annotated by}% - {trans\adddot\ \lbx@sfromlang\ and annot\adddot}}, - bytranslatorin = {{translated \lbx@lfromlang, with an introduction, by}% - {trans\adddot\ \lbx@sfromlang\ with introduction}}, - bytranslatorfo = {{translated \lbx@lfromlang, with a foreword, by}% - {trans\adddot\ \lbx@sfromlang\ with foreword}}, - bytranslatoraf = {{translated \lbx@lfromlang, with an afterword, by}% - {trans\adddot\ \lbx@sfromlang\ with afterword}}, - bytranslatorcoin = {{translated \lbx@lfromlang\ and commented, with an introduction, by}% - {with introduction, trans\adddot\ \lbx@sfromlang\ and comm\adddot}}, - bytranslatorcofo = {{translated \lbx@lfromlang\ and commented, with a foreword, by}% - {with foreword, trans\adddot\ \lbx@sfromlang\ and comm\adddot}}, - bytranslatorcoaf = {{translated \lbx@lfromlang\ and commented, with an afterword, by}% - {with afterword, trans\adddot\ \lbx@sfromlang\ and comm\adddot}}, - bytranslatoranin = {{translated \lbx@lfromlang\ and annotated, with an introduction, by}% - {with introduction, trans\adddot\ \lbx@sfromlang\ and annot\adddot}}, - bytranslatoranfo = {{translated \lbx@lfromlang\ and annotated, with a foreword, by}% - {with foreword, trans\adddot\ \lbx@sfromlang\ and annot\adddot}}, - bytranslatoranaf = {{translated \lbx@lfromlang\ and annotated, with an afterword, by}% - {with afterword, trans\adddot\ \lbx@sfromlang\ and annot\adddot}}, + byeditortrcoin = {{edited, translated\finalandcomma\ and commented, with an introduction, by}% + {with introduction, ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}}, + byeditortrcofo = {{edited, translated\finalandcomma\ and commented, with a foreword, by}% + {with foreword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}}, + byeditortrcoaf = {{edited, translated\finalandcomma\ and commented, with an afterword, by}% + {with afterword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}}, + byeditortranin = {{edited, translated\finalandcomma\ and annotated, with an introduction, by}% + {with introduction, ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}}, + byeditortranfo = {{edited, translated\finalandcomma\ and annotated, with a foreword, by}% + {with foreword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}}, + byeditortranaf = {{edited, translated\finalandcomma\ and annotated, with an afterword, by}% + {with afterword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}}, + bytranslatorco = {{translated and commented by}% + {trans\adddotspace and comm\adddot}}, + bytranslatoran = {{translated and annotated by}% + {trans\adddotspace and annot\adddot}}, + bytranslatorin = {{translated, with an introduction, by}% + {trans\adddotspace with introduction}}, + bytranslatorfo = {{translated, with a foreword, by}% + {trans\adddotspace with foreword}}, + bytranslatoraf = {{translated, with an afterword, by}% + {trans\adddotspace with afterword}}, + bytranslatorcoin = {{translated and commented, with an introduction, by}% + {with introduction, trans\adddotspace and comm\adddot}}, + bytranslatorcofo = {{translated and commented, with a foreword, by}% + {with foreword, trans\adddotspace and comm\adddot}}, + bytranslatorcoaf = {{translated and commented, with an afterword, by}% + {with afterword, trans\adddotspace and comm\adddot}}, + bytranslatoranin = {{translated and annotated, with an introduction, by}% + {with introduction, trans\adddotspace and annot\adddot}}, + bytranslatoranfo = {{translated and annotated, with a foreword, by}% + {with foreword, trans\adddotspace and annot\adddot}}, + bytranslatoranaf = {{translated and annotated, with an afterword, by}% + {with afterword, trans\adddotspace and annot\adddot}}, % \end{macrocode} % % The roles expressed as objects and terms for supplementary material % are not abbreviated. % % \begin{macrocode} - withintroduction = {{with an introduction by}{with an introduction by}}, withcommentator = {{with a commentary by}{with a commentary by}}, withannotator = {{with annotations by}{with annotations by}}, withintroduction = {{with an introduction by}{with an introduction by}}, @@ -15428,8 +15536,10 @@ reference,mvreference,inreference]{volume}{% % Languages are abbreviated. % % \begin{macrocode} - langamerican = {{English}{Eng\adddot}}, - langbrazilian = {{Brazilian}{Braz\adddot}}, + langamerican = {{American English}{Amer\adddotspace Eng\adddot}}, + langbasque = {{Basque}{Basq\adddot}}, + langbrazilian = {{Brazilian Portuguese}{Braz\adddotspace Port\adddot}}, + langbulgarian = {{Bulgarian}{Bulg\adddot}}, langcatalan = {{Catalan}{Catal\adddot}}, langcroatian = {{Croatian}{Croat\adddot}}, langczech = {{Czech}{Czech}}, @@ -15439,17 +15549,28 @@ reference,mvreference,inreference]{volume}{% langestonian = {{Estonian}{Eston\adddot}}, langfinnish = {{Finnish}{Finn\adddot}}, langfrench = {{French}{Fr\adddot}}, + langgalician = {{Galician}{Galic\adddot}}, langgerman = {{German}{Ger\adddot}}, langgreek = {{Greek}{Gr\adddot}}, + langhungarian = {{Hungarian}{Hung\adddot}}, langitalian = {{Italian}{It\adddot}}, + langjapanese = {{Japanese}{Jap\adddot}}, langlatin = {{Latin}{Lat\adddot}}, + langlatvian = {{Latvian}{Latv\adddot}}, + langlithuanian = {{Lithuanian}{Lith\adddot}}, + langmarathi = {{Marathi}{Mar\adddot}}, langnorwegian = {{Norwegian}{Norw\adddot}}, langpolish = {{Polish}{Pol\adddot}}, langportuguese = {{Portuguese}{Port\adddot}}, + langromanian = {{Romanian}{Rom\adddot}}, langrussian = {{Russian}{Russ\adddot}}, + langserbian = {{Serbian}{Serb\adddot}}, + langslovak = {{Slovak}{Slovak}}, langslovene = {{Slovene}{Slov\adddot}}, langspanish = {{Spanish}{Sp\adddot}}, langswedish = {{Swedish}{Swed\adddot}}, + langturkish = {{Turkish}{Turk\adddot}}, + langukrainian = {{Ukrainian}{Ukr\adddot}}, } % \end{macrocode} % @@ -15742,11 +15863,11 @@ reference,mvreference,inreference]{volume}{% byfounder = {{fundado por}{fund\adddotspace}}, bycontinuator = {{continuado por}{cont\adddotspace}}, bycollaborator = {{colaboraci\'on de}{col\adddotspace de}}, - bytranslator = {{traducido \lbx@lfromlang\ por}{trad\adddotspace \lbx@sfromlang}}, + bytranslator = {{traducido por}{trad\adddotspace}}, bycommentator = {{comentado por}{com\adddotspace}}, byannotator = {{anotado por}{anot\adddotspace}}, - byeditortr = {{editado y traducido \lbx@lfromlang\ por}% - {ed\adddotspace y trad\adddotspace \lbx@sfromlang}}, + byeditortr = {{editado y traducido por}% + {ed\adddotspace y trad\adddotspace}}, byeditorco = {{editado y comentado por}% {ed\adddotspace y com\adddotspace }}, byeditoran = {{edici\'on y notas de}% @@ -15757,16 +15878,16 @@ reference,mvreference,inreference]{volume}{% {ed\adddotspace y pr\'ol\adddotspace}}, byeditoraf = {{edici\'on y ep\'ilogo de}% {ed\adddotspace y ep\'il\adddotspace}}, - byeditortrco = {{editado, traducido \lbx@lfromlang\ y comentado por}% - {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang\ y com\adddotspace}}, - byeditortran = {{edici\'on, traducci\'on \lbx@lfromlang\ y notas de}% - {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang\ y not\adddotspace}}, - byeditortrin = {{edici\'on, traducci\'on \lbx@lfromlang\ e introducci\'on de}% - {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang\ e intr\adddotspace}}, - byeditortrfo = {{edici\'on, traducci\'on \lbx@lfromlang\ y pr\'ologo de}% - {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang\ y pr\'ol\adddotspace}}, - byeditortraf = {{editado, traducido \lbx@lfromlang\ y epilogado}% - {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang\ y ep\'il\adddotspace}}, + byeditortrco = {{editado, traducido y comentado por}% + {ed.,\addabbrvspace trad\adddotspace y com\adddotspace}}, + byeditortran = {{edici\'on, traducci\'on y notas de}% + {ed.,\addabbrvspace trad\adddotspace y not\adddotspace}}, + byeditortrin = {{edici\'on, traducci\'on e introducci\'on de}% + {ed.,\addabbrvspace trad\adddotspace e intr\adddotspace}}, + byeditortrfo = {{edici\'on, traducci\'on y pr\'ologo de}% + {ed.,\addabbrvspace trad\adddotspace y pr\'ol\adddotspace}}, + byeditortraf = {{editado, traducido y epilogado}% + {ed.,\addabbrvspace trad\adddotspace y ep\'il\adddotspace}}, byeditorcoin = {{editado, comentado e introducido}% {ed.,\addabbrvspace com\adddotspace e intr\adddotspace}}, byeditorcofo = {{edici\'on, comentarios y pr\'ologo de}% @@ -15779,40 +15900,40 @@ reference,mvreference,inreference]{volume}{% {ed.,\addabbrvspace anot\adddotspace y pr\'ol\adddotspace}}, byeditoranaf = {{edici\'on, notas y ep\'ilogo de}% {ed.,\addabbrvspace anot\adddotspace y ep\'il\adddotspace}}, - byeditortrcoin = {{edici\'on, traducci\'on \lbx@lfromlang, comentarios e introducci\'on de}% - {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, com\adddotspace e intr\adddotspace}}, - byeditortrcofo = {{edici\'on, traducci\'on \lbx@lfromlang, comentarios y pr\'ologo de}% - {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, com\adddotspace y pr\'ol\adddotspace}}, - byeditortrcoaf = {{edici\'on, traducci\'on \lbx@lfromlang, comentarios y ep\'ilogo de}% - {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, com\adddotspace y ep\'il\adddotspace}}, - byeditortranin = {{edici\'on, traducci\'on \lbx@lfromlang, notas e introducci\'on de}% - {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, anot\adddotspace e intr\adddotspace}}, - byeditortranfo = {{edici\'on, traducci\'on \lbx@lfromlang, notas y pr\'ologo de}% - {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, anot\adddotspace y pr\'ol\adddotspace}}, - byeditortranaf = {{edici\'on, traducci\'on \lbx@lfromlang, notas y ep\'ilogo de}% - {ed.,\addabbrvspace trad\adddotspace \lbx@sfromlang, anot\adddotspace y ep\'il\adddotspace}}, - bytranslatorco = {{traducci\'on \lbx@lfromlang\ y comentarios de}% - {trad\adddotspace \lbx@sfromlang\ y com\adddotspace}}, - bytranslatoran = {{traducci\'on \lbx@lfromlang\ y notas de}% - {trad\adddotspace \lbx@sfromlang\ y not\adddotspace}}, - bytranslatorin = {{traducci\'on \lbx@lfromlang\ e introducci\'on de}% - {trad\adddotspace \lbx@sfromlang\ e introd\adddotspace}}, - bytranslatorfo = {{traducci\'on \lbx@lfromlang\ y pr\'ologo de}% - {trad\adddotspace \lbx@sfromlang\ y pr\'ol\adddotspace}}, - bytranslatoraf = {{traducci\'on \lbx@lfromlang\ y ep\'ilogo de}% - {trad\adddotspace \lbx@sfromlang\ y ep\'il\adddotspace}}, - bytranslatorcoin = {{traducci\'on \lbx@lfromlang, comentarios e introducci\'on de}% - {trad\adddotspace \lbx@sfromlang, com\adddotspace e intr\adddotspace}}, - bytranslatorcofo = {{traducci\'on \lbx@lfromlang, comentarios y pr\'ologo de}% - {trad\adddotspace \lbx@sfromlang, com\adddotspace y pr\'ol\adddotspace}}, - bytranslatorcoaf = {{traducci\'on \lbx@lfromlang, comentarios y ep\'ilogo de}% - {trad\adddotspace \lbx@sfromlang, com\adddotspace y ep\'il\adddotspace}}, - bytranslatoranin = {{traducci\'on \lbx@lfromlang, notas e introducci\'on de}% - {trad\adddotspace \lbx@sfromlang, anot\adddotspace e intr\adddotspace}}, - bytranslatoranfo = {{traducci\'on \lbx@lfromlang, notas y pr\'ologo}% - {trad\adddotspace \lbx@sfromlang, anot\adddotspace y pr\'ol\adddotspace}}, - bytranslatoranaf = {{traducci\'on \lbx@lfromlang, notas y ep\'ilogo}% - {trad\adddotspace \lbx@sfromlang, anot\adddotspace y ep\'il\adddotspace}}, + byeditortrcoin = {{edici\'on, traducci\'on, comentarios e introducci\'on de}% + {ed.,\addabbrvspace trad.,\addabbrvspace com\adddotspace e intr\adddotspace}}, + byeditortrcofo = {{edici\'on, traducci\'on, comentarios y pr\'ologo de}% + {ed.,\addabbrvspace trad.,\addabbrvspace com\adddotspace y pr\'ol\adddotspace}}, + byeditortrcoaf = {{edici\'on, traducci\'on, comentarios y ep\'ilogo de}% + {ed.,\addabbrvspace trad.,\addabbrvspace com\adddotspace y ep\'il\adddotspace}}, + byeditortranin = {{edici\'on, traducci\'on, notas e introducci\'on de}% + {ed.,\addabbrvspace trad.,\addabbrvspace anot\adddotspace e intr\adddotspace}}, + byeditortranfo = {{edici\'on, traducci\'on, notas y pr\'ologo de}% + {ed.,\addabbrvspace trad.,\addabbrvspace anot\adddotspace y pr\'ol\adddotspace}}, + byeditortranaf = {{edici\'on, traducci\'on, notas y ep\'ilogo de}% + {ed.,\addabbrvspace trad.,\addabbrvspace anot\adddotspace y ep\'il\adddotspace}}, + bytranslatorco = {{traducci\'on y comentarios de}% + {trad\adddotspace y com\adddotspace}}, + bytranslatoran = {{traducci\'on y notas de}% + {trad\adddotspace y not\adddotspace}}, + bytranslatorin = {{traducci\'on e introducci\'on de}% + {trad\adddotspace e introd\adddotspace}}, + bytranslatorfo = {{traducci\'on y pr\'ologo de}% + {trad\adddotspace y pr\'ol\adddotspace}}, + bytranslatoraf = {{traducci\'on y ep\'ilogo de}% + {trad\adddotspace y ep\'il\adddotspace}}, + bytranslatorcoin = {{traducci\'on, comentarios e introducci\'on de}% + {trad.,\addabbrvspace com\adddotspace e intr\adddotspace}}, + bytranslatorcofo = {{traducci\'on, comentarios y pr\'ologo de}% + {trad.,\addabbrvspace com\adddotspace y pr\'ol\adddotspace}}, + bytranslatorcoaf = {{traducci\'on, comentarios y ep\'ilogo de}% + {trad.,\addabbrvspace com\adddotspace y ep\'il\adddotspace}}, + bytranslatoranin = {{traducci\'on, notas e introducci\'on de}% + {trad.,\addabbrvspace anot\adddotspace e intr\adddotspace}}, + bytranslatoranfo = {{traducci\'on, notas y pr\'ologo}% + {trad.,\addabbrvspace anot\adddotspace y pr\'ol\adddotspace}}, + bytranslatoranaf = {{traducci\'on, notas y ep\'ilogo}% + {trad.,\addabbrvspace anot\adddotspace y ep\'il\adddotspace}}, % \end{macrocode} % % The roles expressed as objects and terms for supplementary material @@ -15848,6 +15969,14 @@ reference,mvreference,inreference]{volume}{% % for shorthands and \enquote{at} to cite a page within a range. % % \begin{macrocode} + idem = {{idem}{id\adddot}}, + idemsm = {{idem}{id\adddot}}, + idemsf = {{eadem}{ead\adddot}}, + idemsn = {{idem}{id\adddot}}, + idempm = {{eidem}{eid\adddot}}, + idempf = {{eaedem}{eaed\adddot}}, + idempn = {{eadem}{ead\adddot}}, + idempp = {{eidem}{eid\adddot}}, citedas = {{en adelante}{en adelante}}, thiscite = {{en}{en}}, % \end{macrocode} @@ -15855,50 +15984,510 @@ reference,mvreference,inreference]{volume}{% % Languages are abbreviated. % % \begin{macrocode} - langamerican = {{ingl\'es americano}{ing\adddotspace amer\adddotspace}}, - langbrazilian = {{brasile\~no}{por\adddotspace bras\adddotspace}}, - langbulgarian = {{b\'ulgaro}{bul\adddotspace}}, - langcatalan = {{catal\'an}{cat\adddotspace}}, - langcroatian = {{croata}{hrv\adddotspace}}, - langczech = {{checo}{ces\adddotspace}}, - langdanish = {{dan\'es}{dan\adddotspace}}, - langdutch = {{neerland\'es}{nld\adddotspace}}, - langenglish = {{ingl\'es}{ing\adddotspace}}, - langestonian = {{estonio}{est\adddotspace}}, - langfinnish = {{fin\'es}{fin\adddotspace}}, - langfrench = {{franc\'es}{fra\adddotspace}}, - langgalician = {{gallego}{glg\adddotspace}}, - langgerman = {{alem\'an}{ale\adddotspace}}, - langgreek = {{griego}{gr\adddotspace}}, - langhungarian = {{h\'ungaro}{hun\adddotspace}}, - langitalian = {{italiano}{ita\adddotspace}}, - langjapanese = {{japon\'es}{jap\adddotspace}}, - langlatin = {{lat\'in}{lat\adddotspace}}, - langlatvian = {{lituano}{lit\adddotspace}}, - langnorwegian = {{noruego}{nor\adddotspace}}, - langpolish = {{polaco}{pol\adddotspace}}, - langportuguese = {{portugu\'es}{port\adddotspace}}, - langrussian = {{ruso}{rus\adddotspace}}, - langserbian = {{serbio}{srp\adddotspace}}, - langslovak = {{eslovaco}{slk\adddotspace}}, - langslovene = {{esloveno}{slv\adddotspace}}, - langspanish = {{espa\~nol}{esp\adddotspace}}, + langamerican = {{ingl\'es americano}{ing\adddotspace amer\adddot}}, + langbasque = {{vasco}{vasc\adddot}}, + langbrazilian = {{portugu\'es brasile\~no}{por\adddotspace bras\adddot}}, + langbulgarian = {{b\'ulgaro}{bul\adddot}}, + langcatalan = {{catal\'an}{cat\adddot}}, + langcroatian = {{croata}{hrv\adddot}}, + langczech = {{checo}{ces\adddot}}, + langdanish = {{dan\'es}{dan\adddot}}, + langdutch = {{neerland\'es}{nld\adddot}}, + langenglish = {{ingl\'es}{ing\adddot}}, + langestonian = {{estonio}{est\adddot}}, + langfinnish = {{fin\'es}{fin\adddot}}, + langfrench = {{franc\'es}{fra\adddot}}, + langgalician = {{gallego}{glg\adddot}}, + langgerman = {{alem\'an}{ale\adddot}}, + langgreek = {{griego}{gr\adddot}}, + langhungarian = {{h\'ungaro}{hun\adddot}}, + langitalian = {{italiano}{ita\adddot}}, + langjapanese = {{japon\'es}{jap\adddot}}, + langlatin = {{lat\'in}{lat\adddot}}, + langlatvian = {{let\'on}{let\adddot}}, + langlithuanian = {{lituano}{lit\adddot}}, + langmarathi = {{marathi}{mar\adddot}}, + langnorwegian = {{noruego}{nor\adddot}}, + langpolish = {{polaco}{pol\adddot}}, + langportuguese = {{portugu\'es}{port\adddot}}, + langrussian = {{ruso}{rus\adddot}}, + langserbian = {{serbio}{srp\adddot}}, + langslovak = {{eslovaco}{slk\adddot}}, + langslovene = {{esloveno}{slv\adddot}}, + langspanish = {{espa\~nol}{esp\adddot}}, langswedish = {{sueco}{sueco}}, - langukrainian = {{ucraniano}{ucr\adddotspace}}, + langturkish = {{turco}{turco}}, + langukrainian = {{ucraniano}{ucr\adddot}}, } % \end{macrocode} % % \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % +%<*pl> +% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \section{Polish: polish-oxref.lbx} +% +% \setcounter{FancyVerbLine}{19} +% +% Thanks to Sebastian Wasiuta for contributing these translations and extras. +% +% We load the standard language-specific punctuation and date formatting. +% +% \begin{macrocode} +\InheritBibliographyExtras{polish} +% \end{macrocode} +% +% Here are some additional specific settings we need. +% +% There is no comma after forenames in the inverted position. +% +% \begin{macrocode} +\DeclareBibliographyExtras{% + \DeclareDelimFormat{revsdnamedelim}{}% +% \end{macrocode} +% +% We need to use the right case for month names in treaty execution dates. +% +% \begin{macrocode} + \savecommand\makebbx@dateii + \def\makebbx@dateii#1#2#3{% + \blx@imc@stripzeros{#3}~\lbx@pl@mkbibmonth{#2}% + \space + #1}% +% \end{macrocode} +% +% Volume numbers are expressed in uppercase Roman numerals. +% +% \begin{macrocode} + \savecommand\mkvolroman + \renewcommand*{\mkvolroman}[1]{\RN{#1}}% +% \end{macrocode} +% +% There is no compression of years. +% +% \begin{macrocode} + \savecommand\blx@ox@compyear + \renewcommand*{\blx@ox@compyear}[2]{#2}% +% \end{macrocode} +% +% There is no compression of pagination ranges. +% +% \begin{macrocode} + \savefieldformat{pages}% + \DeclareFieldFormat{pages}{% + \iffieldundef{bookpagination}% + {\mknormrange{#1}}% + {\mkpageprefix[bookpagination][\mknormrange]{#1}}% + }% + \savefieldformat{postnote}% + \DeclareFieldFormat{postnote}{% + \iffieldundef{pagination}% + {\mknormrange{#1}}% + {\mkpageprefix[pagination][\mknormrange]{#1}}% + }% +% \end{macrocode} +% +% We flip the word order when specifying the edition. +% +% \begin{macrocode} + \savefieldformat{edition}% + \DeclareFieldFormat{edition}{% + \ifinteger{#1} + {\bibstring{edition}~\mkbibordedition{#1}} + {\ifbibstring{#1}{\bibstring{#1}}{#1\isdot}}}% +} +% \end{macrocode} +% +% Lastly we add code to undo these changes before switching to another language. +% +% \begin{macrocode} +\UndeclareBibliographyExtras{% + \DeclareDelimFormat{revsdnamedelim}{\addcomma}% + \restorecommand\makebbx@dateii + \restorecommand\mkvolroman + \restorecommand\blx@ox@compyear + \restorefieldformat{pages}% + \restorefieldformat{postnote}% + \restorefieldformat{edition}% +} +% \end{macrocode} +% +% We load the standard set of localization strings, then add our +% adjustments. +% +% \begin{macrocode} +\DeclareBibliographyStrings{% + inherit = {polish}, +% \end{macrocode} +% +% These are new strings defined by \pkg[biblatex]{oxref}: +% +% \begin{itemize} +% \item Roles expressed as functions +% \end{itemize} +% +% \begin{macrocode} + director = {{re\.{z}yser}{re\.{z}\adddot}}, + directors = {{re\.{z}yserzy}{re\.{z}\adddot}}, + performer = {{wykonawca}{wyk\adddot}}, + performers = {{wykonawcy}{wyk\adddot}}, + reader = {{czytelnik}{czytelnik}}, + readers = {{czytelnicy}{czytelnicy}}, + conductor = {{dyrygent}{dyr\adddot}}, + conductors = {{dyrygenci}{dyr\adddot}}, + serieseditor = {{redaktor serii}{red\adddotspace serii}}, + serieseditors = {{redaktor serii}{red\adddotspace serii}}, + holder = {{w\l a\'{s}ciciel}{w\l a\'{s}ciciel}}, + holders = {{w\l a\'{s}ciciele}{w\l a\'{s}ciciele}}, + editorcm = {{redaktor i~kompilator}{red\adddotspace i~kompilator}}, + editorcms = {{redaktorzy i~kompilatorzy}{red\adddotspace i~kompilatorzy}}, +% \end{macrocode} +% +% \begin{itemize} +% \item Roles expressed as actions +% \end{itemize} +% +% \begin{macrocode} + byperformer = {{wykonawca}{wyk\adddot}}, + bydirector = {{re\.{z}yseria}{re\.{z}\adddot}}, + byreader = {{czyta}{czyta}}, + byconductor = {{kieruje}{kier\adddot}}, + byserieseditor = {{redakcja}{red\adddot}}, + byholder = {{w~posiadaniu}{w~posiadaniu}}, + byeditorcm = {{redakcja i~opracowanie}{red\adddotspace i~oprac\adddot}}, +% \end{macrocode} +% +% \begin{itemize} +% \item Publication details +% \end{itemize} +% +% \begin{macrocode} + facsimile = {{wydanie faksymile}{wyd\adddotspace faksymile}}, + revised = {{wydanie poprawione}{wyd\adddotspace popr\adddot}}, + revisedenlarged = {{wydanie poprawione i~rozszerzone}{wyd\adddotspace popr\addotspace i~rozszerz\adddot}}, + revisedreprint = {{przedruk poprawiony}{przedr\adddotspace popr\adddot}}, + suppto = {{dodatek do}{dod\adddotspace do}}, + equals = {{=}{=}}, + original = {{oryginalny}{oryg\adddot}}, + amendedby = {{zmienione przez}{zmien\adddotspace przez}}, +% \end{macrocode} +% +% \begin{itemize} +% \item Publication state +% \end{itemize} +% +% \begin{macrocode} + inpressin = {{z\l o\.{z}one do}{z\l o\.{z}one do}}, +% \end{macrocode} +% +% \begin{itemize} +% \item Pagination +% \end{itemize} +% +% \begin{macrocode} + book = {{ksi\k{e}ga}{ks\adddot}}, + books = {{ksi\k{e}gi}{ks\adddot}}, + canto = {{pie\'{s}\'{n}}{pie\'{s}\'{n}}}, + cantos = {{pie\'{s}ni}{pie\'{s}ni}}, + stanza = {{zwrotka}{zwr\adddot}}, + stanzas = {{zwrotki}{zwr\adddot}}, + act = {{akt}{a\adddot}}, + acts = {{akty}{aa\adddot}}, + scene = {{scena}{sc\adddot}}, + scenes = {{sceny}{sc\adddot}}, + folio = {{karta}{k\adddot}}, + folios = {{karty}{kk\adddot}}, + article = {{artyku\l }{art\adddot}}, + articles = {{artyku\l y}{art\adddot}}, + clause = {{klauzula}{klauz\adddot}}, + clauses = {{klauzule}{klauz\adddot}}, + regulation = {{rozporz\k{a}dzenie}{rozp\adddot}}, + regulations = {{rozporz\k{a}dzenia}{rozp\adddot}}, + rule = {{przepis}{przep\adddot}}, + rules = {{przepisy}{przep\adddot}}, + booktotal = {{ksi\k{e}ga}{ks\adddot}}, + booktotals = {{ksi\k{e}gi}{ks\adddot}}, + cantototal = {{pie\'{s}\'{n}}{pie\'{s}\'{n}}}, + cantototals = {{pie\'{s}ni}{pie\'{s}ni}}, + stanzatotal = {{zwrotka}{zwr\adddot}}, + stanzatotals = {{zwrotki}{zwr\adddot}}, + acttotal = {{akt}{a\adddot}}, + acttotals = {{akty}{aa\adddot}}, + scenetotal = {{scena}{sc\adddot}}, + scenetotals = {{sceny}{sc\adddot}}, + foliototal = {{karta}{k\adddot}}, + foliototals = {{karty}{kk\adddot}}, + articletotal = {{artyku\l }{art\adddot}}, + articletotals = {{artyku\l y}{art\adddot}}, + clausetotal = {{klauzula}{klauz\adddot}}, + clausetotals = {{klauzule}{klauz\adddot}}, + regulationtotal = {{rozporz\k{a}dzenie}{rozp\adddot}}, + regulationtotals = {{rozporz\k{a}dzenia}{rozp\adddot}}, + ruletotal = {{przepis}{przep\adddot}}, + ruletotals = {{przepisy}{przep\adddot}}, +% \end{macrocode} +% +% \begin{itemize} +% \item Types +% \end{itemize} +% +% \begin{macrocode} + facebook = {{wpis na Facebooku}{wpis na Facebooku}}, + tweet = {{wpis na Twitterze}{wpis na Twitterze}}, + podcast = {{podcast}{podcast}}, + clip = {{wideo}{wideo}}, + webcast = {{webcast}{webcast}}, + poster = {{plakat}{plakat}}, +% \end{macrocode} +% +% \begin{itemize} +% \item Miscellaneous +% \end{itemize} +% +% \begin{macrocode} + nolocation = {{bez miejsca}{b\adddot m\adddot}}, + modified = {{ostatnio zmodyfikowany}{ostatnio zmodyf\adddot}}, + recorded = {{nagrane}{nagr\adddot}}, + uploaded = {{za\l adowane}{za\l ad\adddot}}, + filed = {{wniesione}{wniesione}}, + issued = {{wydany}{wyd\adddot}}, +% \end{macrocode} +% +% \begin{itemize} +% \item Labels +% \end{itemize} +% +% \begin{macrocode} + anon = {{Anonim}{Anon\adddot}}, + pseudo = {{Pseudo-}{Ps\adddot-}}, + urldown = {{pobrane}{pobrane}}, +% \end{macrocode} +% +% \begin{itemize} +% \item Country names, patents, and patent requests, +% \end{itemize} +% +% \begin{macrocode} + countryjp = {{Japonia}{JP}}, + patentjp = {{japo\'{n}ski patent}{jap\adddotspace pat\adddot}}, + patreqjp = {{japo\'{n}ski wniosek patentowy}{jap\adddotspace wniosek pat\adddot}}, +% \end{macrocode} +% +% \begin{itemize} +% \item These are borrowed from other styles. +% \end{itemize} +% +% \begin{macrocode} + 1column = {{jedna kolumna}{1\addnbspace kol\adddot}}, + 2column = {{dwie kolumny}{2\addnbspace kol\adddot}}, + inflayer = {{warstwa ni\.{z}sza}{warstwa ni\.{z}sza}}, + suplayer = {{warstwa wy\.{z}sza}{warstwa wy\.{z}sza}}, + paper = {{gazeta}{gazeta}}, + papyrus = {{papirus}{papirus}}, + parchment = {{pergamin}{pergamin}}, + eucase = {{sprawa}{sprawa}}, + eujoinedcases = {{po\l \k{a}czone sprawy}{po\l \k{a}czone sprawy}}, + commissiondecision = {{decyzja komisji}{decyzja komisji}}, + application = {{wniosek}{wniosek}}, + order = {{polecenie}{polecenie}}, + bill = {{rachunek}{rachunek}}, + draft = {{projekt}{proj\adddot}}, + opened = {{przed\l o\.{z}one do podpisu}{przed\l\adddotspace do podp\adddot}}, + signed = {{podpisane}{podpisane}}, + adopted = {{przyj\k{e}te}{przyj\k{e}te}}, + inforce = {{wesz\l o w~\.{z}ycie}{wesz\l o w~\.{z}ycie}}, +% \end{macrocode} +% +% The rest of these strings are overrides for the standard ones. +% +% \begin{macrocode} + byeditor = {{redakcja}{red\adddot}}, + bycompiler = {{opracowanie}{oprac\adddot}}, + byfounder = {{za\l o\.{z}one przez}{za\l o\.{z}\adddotspace przez}}, + bycontinuator = {{kontynuowane przez}{kont\adddotspace przez}}, + byredactor = {{redakcja}{red\adddot}}, + byreviser = {{poprawki}{popr\adddot}}, + byreviewer = {{recenzja}{rec\adddot}}, + bycollaborator = {{we wsp\'{o}\l pracy z}{we wsp\'{o}\l pr\adddotspace z}}, + bytranslator = {{t\l umaczenie}{t\l um\adddot}}, + bycommentator = {{komentarz}{kom\adddot}}, + byannotator = {{obja\'{s}nienia}{obja\'{s}n\adddot}}, + byeditortr = {{redakcja i~t\l umaczenie}% + {red\adddotspace i~t\l um\adddot}}, + byeditorco = {{redakcja i~komentarz}% + {red\adddotspace i~kom\adddot}}, + byeditoran = {{redakcja i~obja\'{s}nienia}% + {red\adddotspace i~obja\'{s}n\adddot}}, + byeditorin = {{redakcja i~wst\k{e}p}% + {red\adddotspace i~wst\k{e}p}}, + byeditorfo = {{redakcja i~przedmowa}% + {red\adddotspace i~przedm\adddot}}, + byeditoraf = {{redakcja i~pos\l owie}% + {red\adddotspace i~pos\l \adddot}}, + byeditortrco = {{redakcja, t\l umaczenie i~komentarz}% + {red.,\addabbrvspace t\l um.,\addabbrvspace kom\adddot}}, + byeditortran = {{redakcja, t\l umaczenie i~obja\'{s}nienia}% + {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n\adddot}}, + byeditortrin = {{redakcja, t\l umaczenie, wst\k{e}p}% + {red.,\addabbrvspace t\l um.,\addabbrvspace wst\k{e}p}}, + byeditortrfo = {{redakcja, t\l umaczenie, przedmowa}% + {red.,\addabbrvspace t\l um.,\addabbrvspace przedm\adddot}}, + byeditortraf = {{redakcja, t\l umaczenie, pos\l \adddot}% + {red.,\addabbrvspace t\l um.,\addabbrvspace pos\l \adddot}}, + byeditorcoin = {{redakcja, komentarz, wst\k{e}p}% + {red.,\addabbrvspace kom.,\addabbrvspace wst\k{e}p}}, + byeditorcofo = {{redakcja, komentarz i~przedmowa}% + {red.,\addabbrvspace kom.,\addabbrvspace przedm\adddot}}, + byeditorcoaf = {{redakcja, komentarz, pos\l owie}% + {red.,\addabbrvspace kom.,\addabbrvspace pos\l \adddot}}, + byeditoranin = {{redakcja, obja\'{s}nienia, wst\k{e}p}% + {red.,\addabbrvspace obja\'{s}n.,\addabbrvspace wst\k{e}p}}, + byeditoranfo = {{redakcja, obja\'{s}nienia, przedmowa}% + {red.,\addabbrvspace obja\'{s}n.,\addabbrvspace przedm\adddot}}, + byeditoranaf = {{redakcja, obja\'{s}nienia, pos\l owie}% + {red.,\addabbrvspace obja\'{s}n.,\addabbrvspace pos\l \adddot}}, + byeditortrcoin = {{redakcja, t\l umaczenie, komentarz, wst\k{e}p}% + {red.,\addabbrvspace t\l um.,\addabbrvspace kom.,\addabbrvspace wst\k{e}p}}, + byeditortrcofo = {{redakcja, t\l umaczenie, komentarz, przedmowa}% + {red.,\addabbrvspace t\l um.,\addabbrvspace kom.,\addabbrvspace przedm\adddot}}, + byeditortrcoaf = {{redakcja, t\l umaczenie, komentarz, pos\l owie}% + {red.,\addabbrvspace t\l um.,\addabbrvspace kom.,\addabbrvspace pos\l \adddot}}, + byeditortranin = {{redakcja, t\l umaczenie, obja\'{s}nienia, wst\k{e}p}% + {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace wst\k{e}p}}, + byeditortranfo = {{redakcja, t\l umaczenie, obja\'{s}nienia, przedmowa}% + {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace przedm\adddot}}, + byeditortranaf = {{redakcja, t\l umaczenie, obja\'{s}nienia, pos\l owie}% + {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace pos\l \adddot}}, + bytranslatorco = {{t\l umaczenie i~komentarz}% + {t\l um\adddotspace i~kom\adddot}}, + bytranslatoran = {{t\l umaczenie i~obja\'{s}nienia}% + {t\l um\adddotspace i~obja\'{s}n\adddot}}, + bytranslatorin = {{t\l umaczenie i~wst\k{e}p}% + {t\l um.,\addabbrvspace wst\k{e}p}}, + bytranslatorfo = {{t\l umaczenie i~przedmowa}% + {t\l um.,\addabbrvspace przedm\adddot}}, + bytranslatoraf = {{t\l umaczenie i~pos\l owie}% + {t\l um.,\addabbrvspace pos\l \adddot}}, + bytranslatorcoin = {{t\l umaczenie, komentarz i~wst\k{e}p}% + {t\l um.,\addabbrvspace kom.,\addabbrvspace wst\k{e}p}}, + bytranslatorcofo = {{t\l umaczenie, komentarz i~przedmowa}% + {t\l um.,\addabbrvspace kom.,\addabbrvspace przedm\adddot}}, + bytranslatorcoaf = {{t\l umaczenie, komentarz i~pos\l owie}% + {t\l um.,\addabbrvspace kom.,\addabbrvspace pos\l \adddot}}, + bytranslatoranin = {{t\l umaczenie, obja\'{s}nienia i~wst\k{e}p}% + {t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace wst\k{e}p}}, + bytranslatoranfo = {{t\l umaczenie, obja\'{s}nienia i~przedmowa}% + {t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace przedm\adddot}}, + bytranslatoranaf = {{t\l umaczenie, obja\'{s}nienia i~pos\l owie}% + {t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace pos\l \adddot}}, +% \end{macrocode} +% +% The roles expressed as objects and terms for supplementary material +% are not abbreviated. +% +% \begin{macrocode} + withcommentator = {{komentarz}{komentarz}}, + withannotator = {{obja\'{s}nienia}{obja\'{s}nienia}}, + withintroduction = {{wst\k{e}p}{wst\k{e}p}}, + withforeword = {{przedmowa}{przedmowa}}, + withafterword = {{pos\l owie}{pos\l owie}}, + introduction = {{wst\k{e}p}{wst\k{e}p}}, +% \end{macrocode} +% +% The translations and abbreviations for some publication details are different. +% +% \begin{macrocode} + newseries = {{nowa seria}{nowa seria}}, + oldseries = {{dawna seria}{dawna seria}}, + edition = {{wydanie}{wyd\adddot}}, + reviewof = {{recenzja}{rec\adddot}}, + reprintfrom = {{przedruk z}{przedr\adddotspace z}}, + translationas = {{t\l umaczenie polskie}{t\l um\adddotspace pol\adddotspace}}, + origpubin = {{pierwodruk w}{pierwodr\adddotspace w}}, +% \end{macrocode} +% +% We use a different translation for \enquote{paragraph}. +% +% \begin{macrocode} + paragraph = {{ust\k{e}p}{ust\adddot}}, + paragraphs = {{ust\k{e}py}{ust\adddot}}, +% \end{macrocode} +% +% \emph{New Hart's Rules} uses \enquote{accessed} for URL dates. +% +% \begin{macrocode} + urlseen = {{dost\k{e}p}{dost\k{e}p}}, +% \end{macrocode} +% +% Scholarly citation terms are abbreviated. Oxford style is to use \enquote{henceforth} +% for shorthands and \enquote{at} to cite a page within a range. +% +% \begin{macrocode} + idem = {{idem}{id\adddot}}, + idemsm = {{idem}{id\adddot}}, + idemsf = {{eadem}{ead\adddot}}, + idemsn = {{idem}{id\adddot}}, + idempm = {{eidem}{eid\adddot}}, + idempf = {{eaedem}{eaed\adddot}}, + idempn = {{eadem}{ead\adddot}}, + idempp = {{eidem}{eid\adddot}}, + citedas = {{dalej}{dalej}}, + thiscite = {{na}{na}}, +% \end{macrocode} +% +% Languages are abbreviated. +% +% \begin{macrocode} + langamerican = {{ameryka\'{n}ski angielski}{amer\adddotspace ang\adddot}}, + langbasque = {{baskijski}{bask\adddot}}, + langbrazilian = {{brazylijski portugalski}{braz\adddot port\adddot}}, + langbulgarian = {{bu\l garski}{bu\l g\adddot}}, + langcatalan = {{katalo\'{n}ski}{katal\adddot}}, + langcroatian = {{chorwacki}{chorw\adddot}}, + langczech = {{czeski}{czeski}}, + langdanish = {{du\'{n}ski}{du\'{n}\adddot}}, + langdutch = {{holenderski}{holend\adddot}}, + langenglish = {{angielski}{ang\adddot}}, + langestonian = {{esto\'{n}ski}{est\adddot}}, + langfinnish = {{fi\'{n}ski}{fi\'{n}\adddot}}, + langfrench = {{francuski}{fr\adddot}}, + langgalician = {{galicyjski}{galic\adddot}}, + langgerman = {{niemiecki}{niem\adddot}}, + langgreek = {{grecki}{gr\adddot}}, + langhungarian = {{w\k{e}gierski}{w\k{e}g\adddot}}, + langitalian = {{w\l oski}{w\l \adddot}}, + langjapanese = {{japo\'{n}ski}{jap\adddot}}, + langlatin = {{\l aci\'{n}ski}{\l ac\adddot}}, + langlatvian = {{\l otewski}{\l ot\adddot}}, + langlithuanian = {{litewski}{lit\adddot}}, + langmarathi = {{marathi}{mar\adddot}}, + langnorwegian = {{norweski}{norw\adddot}}, + langpolish = {{polski}{pol\adddot}}, + langportuguese = {{portugalski}{port\adddot}}, + langromanian = {{rumu\'{n}ski}{rum\adddot}}, + langrussian = {{rosyjski}{ros\adddot}}, + langserbian = {{serbski}{serb\adddot}}, + langslovak = {{s\l owacki}{s\l c\adddot}}, + langslovene = {{s\l owe\'{n}ski}{s\l owe\'{n}\adddot}}, + langspanish = {{hiszpa\'{n}ski}{hiszp\adddot}}, + langswedish = {{szwedzki}{szw\adddot}}, + langturkish = {{turecki}{tur\adddot}}, + langukrainian = {{ukrai\'{n}ski}{ukr\adddot}}, +} +% \end{macrocode} +% +% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \section{Other languages} % -% Currently \pkg[biblatex]{oxref} only supports English (British and American) -% and Spanish explicitly, but if there is demand more languages may be added. If -% you would like to contribute support for your language, a list of the -% non-standard bibliography strings requiring definition may be found in -% section~\ref{sec:setup}. +% Currently \pkg[biblatex]{oxref} only supports English (British and American), +% Spanish, and Polish explicitly, +% but if there is demand more languages may be added. If you would like to +% contribute support for your language, a list of the non-standard bibliography +% strings requiring definition may be found in section~\ref{sec:setup}. % % \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.pdf index 08147694cc..5834fb1590 100644 Binary files a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.pdf and b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.pdf differ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxyear-doc.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxyear-doc.pdf index 89a6515237..61c1abb84e 100644 Binary files a/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxyear-doc.pdf and b/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxyear-doc.pdf differ diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf index adbd84e2f6..cc05bf618a 100644 Binary files a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf and b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf differ diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex index 9d38bb03ee..6c09fb0f57 100644 --- a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex +++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex @@ -34,8 +34,8 @@ \usepackage[margin=1.5cm]{geometry} \setlength{\parindent}{0pt} -\def\TPversion{0.1.9} -\def\TPdate{20/08/2024} +\def\TPversion{0.2.0} +\def\TPdate{26/08/2024} \usepackage{tcolorbox} \sethlcolor{lightgray!25} \NewDocumentCommand\MontreCode{ m }{% @@ -111,6 +111,8 @@ \section{History} +\verb|v0.1.9|~:~~~~Skills with stars (\textsf{fontawesome5} or \TikZ) + \verb|v0.1.9|~:~~~~Title banner \verb|v0.1.8|~:~~~~Score banner @@ -633,5 +635,34 @@ Available \MontreCode{keys} are : It's possible to redefine \MontreCode{\textbackslash part} (for example). +\pagebreak + +\section{Various commands} + +\subsection{Difficulty levels with stars (fontawesome5)} + +\begin{codehigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25] +\DiffLevelStars[max level (3)]{level} +\end{codehigh} + +\begin{demohigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25] +\DiffLevelStars{0}\par +\DiffLevelStars{2.5}\par +\textcolor{teal}{\LARGE\DiffLevelStars[5]{4}}\par +\DiffLevelStars[5]{1.5}\par +\end{demohigh} + +\subsection{Difficulty levels with stars (tikz)} + +\begin{codehigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25] +\tkzLevelStars[colframe=...,colback=...,offset=...,maxlevel=...,valign=...]{level} +\end{codehigh} + +\begin{demohigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25] +\tkzLevelStars{2.5}\par +{\LARGE We ty inline \tkzLevelStars{2.25} with score 2.25}\par +{\LARGE We ty inline \tkzLevelStars[valign=false]{1.75} with score 1.75}\par +\tkzLevelStars[colframe=red,colback=yellow,maxlevel=5]{3} +\end{demohigh} \end{document} \ No newline at end of file diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf index 5f86baf5c9..4059d5dfa2 100644 Binary files a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf and b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf differ diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex index 1d9576f944..13058113c2 100644 --- a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex +++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex @@ -39,8 +39,8 @@ \usepackage[margin=1.5cm]{geometry} \setlength{\parindent}{0pt} -\def\TPversion{0.1.9} -\def\TPdate{20 août 2024} +\def\TPversion{0.2.0} +\def\TPdate{26 août 2024} \usepackage{tcolorbox} \tcbuselibrary{listingsutf8} \newtcblisting{DemoCode}[1]{% @@ -66,10 +66,10 @@ keywordstyle={\color{violet}},% classoffset=2,% alsoletter={-},% - morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum,EnvSMS,\SMSrec,\SMSenv,BoiteSimple,\SujetTitreExo,\CircledNumber,\AffVignette,\BoiteArrondie,\ChangerDisplaySkip,\celcouleur,\celfusion,\lignetxt,\colonnetxt,\celnumbreak,\celtxt,\BandeauScore,\InsererImage,\tkzBannerTri},% + morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum,EnvSMS,\SMSrec,\SMSenv,BoiteSimple,\SujetTitreExo,\CircledNumber,\AffVignette,\BoiteArrondie,\ChangerDisplaySkip,\celcouleur,\celfusion,\lignetxt,\colonnetxt,\celnumbreak,\celtxt,\BandeauScore,\InsererImage,\tkzBannerTri,\NiveauDiffExos,\tkzEtoiles},% keywordstyle={\color{green!50!black}},% classoffset=3,% - morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait,Avatar,AffAvatar,NoirBlanc,CouleurE,CouleurR,CouleurFond,Hauteur,Largeur,PoliceTxt,CouleurTitre,AlignH,bg,txt,bthick,bcol,raise,Type,EspH,Fond,Texte,Style,Dense,Avant,AvantS,Apres,ApresS,Global,align,width,Legende,CouleurFond,Hauteur,Ratio,AffLegende,Couleurs,EchelleSymboles,Symboles,vRemplir,vOffset,vCentrer,height,width,blockwidth,collight,colmedium,coldar,coltxt,fonttxt,swap,maincolor,logo,type,num,dispblock,customtype},% + morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait,Avatar,AffAvatar,NoirBlanc,CouleurE,CouleurR,CouleurFond,Hauteur,Largeur,PoliceTxt,CouleurTitre,AlignH,bg,txt,bthick,bcol,raise,Type,EspH,Fond,Texte,Style,Dense,Avant,AvantS,Apres,ApresS,Global,align,width,Legende,CouleurFond,Hauteur,Ratio,AffLegende,Couleurs,EchelleSymboles,Symboles,vRemplir,vOffset,vCentrer,height,width,blockwidth,collight,colmedium,coldar,coltxt,fonttxt,swap,maincolor,logo,type,num,dispblock,customtype,Couleur,AlignV,Offset,NiveauMax},% keywordstyle={\color{orange}} },% #1 @@ -149,6 +149,8 @@ \section{Historique} +\verb|v0.2.0|~:~~~Étoiles pour des niveaux de difficultés (compatible avec \texttt{EnvtExo}) + \verb|v0.1.9|~:~~~Bannière de titre + Insertion d'images en remplissage vertical \verb|v0.1.8|~:~~~Nutriscore @@ -956,6 +958,8 @@ Les éléments personnalisables sont : \begin{itemize} \item le libellé via la clé \MontreCode{[Libelle]}, qui vaut \MontreCode{Exercice~} par défaut ; \item la couleur via la clé \MontreCode{[Couleur]}, qui vaut \MontreCode{blue!50!black} par défaut ; + \item la couleur de la décoration (si textuelle) via la clé \MontreCode{[CouleurDeco]}, qui vaut \MontreCode{blue!50!black} par défaut ; + \item la couleur de fond la décoration (si il existe) via la clé \MontreCode{[CouleurFondDeco]}, qui vaut 50\,\% de \MontreCode{blue!50!black} par défaut ; \item la police via la clé \MontreCode{[Police]}, qui vaut \MontreCode{\textbackslash bfseries\textbackslash LARGE\textbackslash sffamily} par défaut ; \item l'épaisseur du trait (éventuel) via la clé \MontreCode{[EpTrait]}, qui vaut \MontreCode{1.1pt} par défaut. \end{itemize} @@ -1003,14 +1007,13 @@ Hormis le style global, il est possible de modifier/ajouter certains éléments \item des points, sous la forme \texttt{(xx points)} ; \item une image, via \texttt{graphicx}, dont la hauteur est adaptée à la hauteur de la ligne en cours ; \item une icône, via \texttt{fontawesome5}, dont la hauteur est adaptée à la hauteur de la ligne en cours ; + \item des étoiles, via \texttt{fontawesome5} ou \TikZ, dont la hauteur est adaptée à la hauteur de la ligne en cours ; \item un petit chronomètre, via \texttt{pictochrono}, dont la hauteur est adaptée à la hauteur de la ligne en cours ; \item une ceinture colorée, via \texttt{coloredbelts}, dont la hauteur est adaptée à la hauteur de la ligne en cours ; \end{itemize} \item le compteur (nommé \MontreCode{numeroexo}) peut être désactivé et \textit{adpaté} via les commandes classiques de compteurs. \end{itemize} -\pagebreak - Les \MontreCode{clés} disponibles, à donner entre \MontreCode{[...]}, sont : \begin{itemize} @@ -1026,6 +1029,8 @@ Les \MontreCode{clés} disponibles, à donner entre \MontreCode{[...]}, sont : \item \MontreCode{Ceinture/...} := afficher la ceinture couleur \MontreCode{...} à la fin de la ligne ; \item \MontreCode{Chrono/...} := afficher le chrono de durée \MontreCode{...} à la fin de la ligne ; \item \MontreCode{Points/...} := afficher les points \MontreCode{(... points)} à la fin de la ligne ; + \item \MontreCode{faEtoiles/...} := afficher des étoiles de difficultés à la fin de la ligne ; + \item \MontreCode{tkzEtoiles/...} := afficher des étoiles de difficultés à la fin de la ligne ; \end{itemize} \item \MontreCode{Trait} : choix du trait parmi : \begin{itemize} @@ -1036,6 +1041,34 @@ Les \MontreCode{clés} disponibles, à donner entre \MontreCode{[...]}, sont : \end{itemize} \end{itemize} +La commande d'affichage des étoiles de difficultés est indépendante de l'environnement \MontreCode{EnvtExo}, la clé \MontreCode{Decoration=xxxEtoiles/niv} ou \MontreCode{Decoration=xxxEtoiles/niv§max} permet de l'y intégrer. + +\begin{DemoCode}{listing only} +%commande d'étoiles (max=3 par défaut) avec fontawesome5 +\NiveauDiffExos[max]{nb} + +%commande d'étoiles (max=3 par défaut) avec tikz +\tkzEtoiles[Couleur=...,CouleurFond=...,Offset=...,NiveauMax=...,AlignV=...]{nb} +\end{DemoCode} + +\begin{DemoCode}{} +%des demies étoiles sont possibles +\NiveauDiffExos{0}\par +\NiveauDiffExos{2.5}\par +\textcolor{teal}{\LARGE\NiveauDiffExos[5]{4}}\par +\NiveauDiffExos[5]{1.5}\par +\end{DemoCode} + +\begin{DemoCode}{} +%des portions d'étoiles sont possibles +%Offset=... permet de gérer l'espacement horizontal +%AlignV est un booléen pour décaler verticalement les étoiles (inline) +\tkzEtoiles{2.5}\par +{\LARGE On essaye en ligne \tkzEtoiles{2.5} avec une note de 2.5}\par +{\LARGE On essaye en ligne \tkzEtoiles[AlignV=false]{2.5} avec une note de 2.5}\par +\tkzEtoiles[Couleur=red,CouleurFond=yellow,NiveauMax=5]{3.5} +\end{DemoCode} + \subsection{Exemples} Les exemples suivants ont été obtenus via un document externe (fourni avec le package), du fait du chargement de packages spécifiques. @@ -1063,65 +1096,46 @@ Le code proposé utilise l'environnement, mais la commande simple est complètem \pagebreak \begin{DemoCode}{listing only} -\begin{EnvtExo}%exo1 -\ipsum -\end{EnvtExo} +\begin{EnvtExo}\ipsum\end{EnvtExo}%exo1 -\begin{EnvtExo}[Trait=pointilles]%exo2 -\ipsum -\end{EnvtExo} +\begin{EnvtExo}[Trait=pointilles]\ipsum\end{EnvtExo}%exo2 -\begin{EnvtExo}[Trait=dashilles]%exo3 -\ipsum -\end{EnvtExo} +\begin{EnvtExo}[Trait=dashilles]\ipsum\end{EnvtExo}%exo3 -\begin{EnvtExo}[Decoration=Icone/\faPython]%exo4 -\ipsum -\end{EnvtExo} +\begin{EnvtExo}[Decoration=Icone/\faPython]\ipsum\end{EnvtExo}%exo4 -\begin{EnvtExo}[Decoration=Ceinture/rouge]%exo5 -\ipsum -\end{EnvtExo} +\begin{EnvtExo}[Decoration=Ceinture/rouge]\ipsum\end{EnvtExo}%exo5 -\begin{EnvtExo}[Decoration=Chrono/20]%exo6 -\ipsum -\end{EnvtExo} +\begin{EnvtExo}[Decoration=Chrono/20]\ipsum\end{EnvtExo}%exo6 -\begin{EnvtExo}[Decoration=Image/goku_ssj4]%exo7 -\ipsum -\end{EnvtExo} +\begin{EnvtExo}[Decoration=Image/goku_ssj4]\ipsum\end{EnvtExo}%exo7 -\begin{EnvtExo}[Decoration=Image/sseiya_shura]%exo8 -\ipsum -\end{EnvtExo} +\begin{EnvtExo}[Decoration=faEtoiles/1.5§4]\ipsum\end{EnvtExo}%exo8 -\begin{EnvtExo}[Decoration=Points/7]%exo9 -\ipsum -\end{EnvtExo} +\begin{EnvtExo}[Decoration=tkzEtoiles/3.5§5]\ipsum\end{EnvtExo}%exo8 -\begin{EnvtExo}[Type=Perso/{Titre perso }]%exo10 -\ipsum -\end{EnvtExo} +\begin{EnvtExo}[Decoration=Points/7]\ipsum\end{EnvtExo}%exo9 + +\begin{EnvtExo}[Type=Perso/{Titre perso }]\ipsum\end{EnvtExo}%exo10 -\StyleEnvtExo[Couleur=red,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}] +\StyleEnvtExo[Couleur=red,CouleurDeco=teal,Police=\bfseries\ttfamily,EpTrait=2pt, Libelle={Exercice n°}] -\begin{EnvtExo}[Decoration=Icone/\faAddressBook]%exo11 +\begin{EnvtExo}[Decoration=Icone/\faAddressBook] \ipsum -\end{EnvtExo} +\end{EnvtExo}%exo11 + -\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Couleur=red,Trait=dashilles]%exo12 +\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Trait=dashilles]%exo12 \ipsum \end{EnvtExo} \StyleEnvtExoDefaut - \begin{EnvtExo}% [Type=Perso/{Titre perso~},Decoration=Image/goku_ssj4,Trait=non,Compteur=false]%exo13 \ipsum \end{EnvtExo} \TitreExo[Type=Perso/{Annexe Exercice 3},Compteur=false,Decoration=Image/sseiya_aiolos]%exo14 - \ipsum \end{DemoCode} diff --git a/macros/latex/contrib/customenvs/doc/envtexo_exemples.pdf b/macros/latex/contrib/customenvs/doc/envtexo_exemples.pdf index 717f3a12c9..16a8d7d3e6 100644 Binary files a/macros/latex/contrib/customenvs/doc/envtexo_exemples.pdf and b/macros/latex/contrib/customenvs/doc/envtexo_exemples.pdf differ diff --git a/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex b/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex index 2daa195179..a91733525b 100644 --- a/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex +++ b/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex @@ -15,6 +15,8 @@ \setlength{\parindent}{0pt} \begin{document} + +\pagestyle{empty} \begin{EnvtExo}%exo1 \ipsum @@ -44,7 +46,11 @@ \ipsum \end{EnvtExo} -\begin{EnvtExo}[Decoration=Image/sseiya_shura]%exo8 +\begin{EnvtExo}[Decoration=faEtoiles/1.5§4]%exo8 + \ipsum +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=tkzEtoiles/3.5§5]%exo8 \ipsum \end{EnvtExo} @@ -56,13 +62,13 @@ \ipsum \end{EnvtExo} -\StyleEnvtExo[Couleur=red,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}] +\StyleEnvtExo[Couleur=red,,CouleurDeco=teal,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}] \begin{EnvtExo}[Decoration=Icone/\faAddressBook]%exo11 \ipsum \end{EnvtExo} -\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Couleur=red,Trait=dashilles]%exo12 +\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Trait=dashilles]%exo12 \ipsum \end{EnvtExo} diff --git a/macros/latex/contrib/customenvs/tex/customenvs.sty b/macros/latex/contrib/customenvs/tex/customenvs.sty index 535baa0f18..4c90d39b3d 100644 --- a/macros/latex/contrib/customenvs/tex/customenvs.sty +++ b/macros/latex/contrib/customenvs/tex/customenvs.sty @@ -3,9 +3,10 @@ % source pencil...: CC-BY-SA 4.0 https://tex.stackexchange.com/questions/504092/replicating-a-fancy-bordered-text-style-in-latex/504145#504145 \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{customenvs}[2024/08/20 0.1.9 Custom classic environments] +\ProvidesPackage{customenvs}[2024/08/26 0.2.0 Custom classic environments] %====HISTORIQUE +% v 0.2.0 Ajout d'étoiles pour les difficultés d'exercices (2 versions) % v 0.1.9 tkzBanner + tkzBannerTri + includegraphicsfill % v 0.1.8 Nutriscore % v 0.1.7 Style perso pour les vignettes @@ -678,7 +679,153 @@ } %====EXERCICE PERSO +\newlength{\largstarsempty} +\newlength{\largstarsmid} +\newlength{\largstarfull} +\newlength{\largmaxstars} + +%commande annexe tkzlevelstars [en] + [fr] +\usetikzlibrary{shapes.geometric} + +\newlength{\tmphauteuretoiles} +\newlength{\tmpprofondeuretoiles} +\newlength{\tmpoffsetetoiles}\setlength{\tmpoffsetetoiles}{0.25pt} + +\defKV[levelstars]{% + colframe=\def\tkzLevelStarsColor{#1}, + colback=\def\tkzLevelStarsColorBg{#1}, + offset=\setlength{\tmpoffsetetoiles}{#1}, + maxlevel=\def\tkzLevelStarsMaxLevel{#1} +} + +\setKVdefault[levelstars]{% + colframe=black, + colback=gray, + offset={0.025em}, + maxlevel=3, + valign=true +} + +\NewDocumentCommand{\tkzLevelStars}{ O{} m }{% + %lectures des clés + \restoreKV[levelstars]% + \setKV[levelstars]{#1}% + %dimensions + \settototalheight{\tmphauteuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}% + \ifboolKV[levelstars]{valign}% + {% + \settodepth{\tmpprofondeuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}% + \begin{tikzpicture}[baseline={-\tmpprofondeuretoiles},fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}] + }% + {% + \begin{tikzpicture}[fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}] + }% + \foreach \X in {1,...,\tkzLevelStarsMaxLevel}{% + \xdef\tmpxfill{\xintfloateval{min(1,max(1+#2-\X,0))}}% + %\pgfmathsetmacro{\tmpxfill}{min(1,max(1+#2-\X,0))} + \path ({\X*(\tmphauteuretoiles+\tmpoffsetetoiles)},0) node[star,draw,star point height={0.25\tmphauteuretoiles},minimum size={\tmphauteuretoiles},inner sep=0pt,path picture={\fill (path picture bounding box.south west) rectangle ([xshift=\tmpxfill*0.9515*\tmphauteuretoiles]path picture bounding box.north west);}]{}; + } + \end{tikzpicture}% +} + +\defKV[tkznivetoiles]{% + Couleur=\def\tkzLevelStarsColor{#1}, + CouleurFond=\def\tkzLevelStarsColorBg{#1}, + Offset=\setlength{\tmpoffsetetoiles}{#1}, + NiveauMax=\def\tkzLevelStarsMaxLevel{#1} +} + +\setKVdefault[tkznivetoiles]{% + Couleur=black, + CouleurFond=gray, + Offset={0.025em}, + NiveauMax=3, + AlignV=true +} + +\NewDocumentCommand{\tkzEtoiles}{ O{} m }{% + %lectures des clés + \restoreKV[tkznivetoiles]% + \setKV[tkznivetoiles]{#1}% + %dimensions + \settototalheight{\tmphauteuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}% + \ifboolKV[tkznivetoiles]{AlignV}% + {% + \settodepth{\tmpprofondeuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}% + \begin{tikzpicture}[baseline={-\tmpprofondeuretoiles},fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}] + }% + {% + \begin{tikzpicture}[fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}] + }% + \foreach \X in {1,...,\tkzLevelStarsMaxLevel}{% + \xdef\tmpxfill{\xintfloateval{min(1,max(1+#2-\X,0))}}% + %\pgfmathsetmacro{\tmpxfill}{min(1,max(1+#2-\X,0))} + \path ({\X*(\tmphauteuretoiles+\tmpoffsetetoiles)},0) node[star,draw,star point height={0.25\tmphauteuretoiles},minimum size={\tmphauteuretoiles},inner sep=0pt,path picture={\fill (path picture bounding box.south west) rectangle ([xshift=\tmpxfill*0.9515*\tmphauteuretoiles]path picture bounding box.north west);}]{}; + } + \end{tikzpicture}% +} + +%commande annexe ;-) +\NewDocumentCommand\NiveauDiffExos{ O{3} m }{%avec des demis ?? + %les tailles de boîtes + \settowidth{\largstarsempty}{{\faStar[regular]}}% + \settowidth{\largstarsmid}{{\faIcon{star-half-alt}}}% + \settowidth{\largstarfull}{{\faStar}}% + \pgfmathsetlength{\largmaxstars}{max(\largstarsempty,\largstarsmid,\largstarfull)}% + %les calculs intermédiaires + \xintifboolexpr{#1 < 0}{\xdef\tmpstarsmax{3}}{\xdef\tmpstarsmax{#1}}%on met à 3 si pas valide + \xintifboolexpr{#2 >= 0 'and' #2 <= \tmpstarsmax 'and' isint(2*#2) == 1}{\xdef\tmpstars{#2}}{\xdef\tmpstars{0}}%on met à zéro si pas valide + % + \xintifboolexpr{isint(\tmpstars) == 1}% + {% + \xdef\tmpstarsexosfull{\tmpstars}% + \xdef\tmpstarsexosmid{0}% + \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-\tmpstars}}% + }% + {% + \xdef\tmpstarsexosmid{1}% + \xdef\tmpstarsexosfull{\xinteval{(\tmpstars-0.5)}}% + \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-1-\tmpstarsexosfull}}% + }% + %affichage des full + \xintifboolexpr{\tmpstarsexosfull > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosfull}}\do{\makebox[\largmaxstars][c]{\faStar}}}{}% + %affichage des mid + \xintifboolexpr{\tmpstarsexosmid > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosmid}}\do{\makebox[\largmaxstars][c]{\faIcon{star-half-alt}}}}{}% + %affichage des vides + \xintifboolexpr{\tmpstarsexosempty > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosempty}}\do{\makebox[\largmaxstars][c]{\faStar[regular]}}}{}% +} + +%commande annexe [en] ;-) +\NewDocumentCommand\DiffLevelStars{ O{3} m }{%avec des demis ?? + %les tailles de boîtes + \settowidth{\largstarsempty}{{\faStar[regular]}}% + \settowidth{\largstarsmid}{{\faIcon{star-half-alt}}}% + \settowidth{\largstarfull}{{\faStar}}% + \pgfmathsetlength{\largmaxstars}{max(\largstarsempty,\largstarsmid,\largstarfull)}% + %les calculs intermédiaires + \xintifboolexpr{#1 < 0}{\xdef\tmpstarsmax{3}}{\xdef\tmpstarsmax{#1}}%on met à 3 si pas valide + \xintifboolexpr{#2 >= 0 'and' #2 <= \tmpstarsmax 'and' isint(2*#2) == 1}{\xdef\tmpstars{#2}}{\xdef\tmpstars{0}}%on met à zéro si pas valide + % + \xintifboolexpr{isint(\tmpstars) == 1}% + {% + \xdef\tmpstarsexosfull{\tmpstars}% + \xdef\tmpstarsexosmid{0}% + \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-\tmpstars}}% + }% + {% + \xdef\tmpstarsexosmid{1}% + \xdef\tmpstarsexosfull{\xinteval{(\tmpstars-0.5)}}% + \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-1-\tmpstarsexosfull}}% + }% + %affichage des full + \xintifboolexpr{\tmpstarsexosfull > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosfull}}\do{\makebox[\largmaxstars][c]{\faStar}}}{}% + %affichage des mid + \xintifboolexpr{\tmpstarsexosmid > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosmid}}\do{\makebox[\largmaxstars][c]{\faIcon{star-half-alt}}}}{}% + %affichage des vides + \xintifboolexpr{\tmpstarsexosempty > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosempty}}\do{\makebox[\largmaxstars][c]{\faStar[regular]}}}{}% +} +%code ppal \newcounter{numeroexo} \setcounter{numeroexo}{0} \newlength{\eptraitexo} @@ -689,6 +836,8 @@ \newlength{\tmp@image@profondeur} \colorlet{macouleurexo}{blue!50!black} +\colorlet{macouleurexodeco}{blue!50!black} +\colorlet{macouleurexodecofond}{blue!50!black} \newcommand\tmpstyleexo{\bfseries\LARGE\sffamily}% \newcommand\tmplabelexo{Exercice~}% @@ -696,15 +845,21 @@ \defKV[globalstyleexo]{% Libelle=\renewcommand\tmplabelexo{#1},% Couleur=\colorlet{macouleurexo}{#1},% + CouleurDeco=\colorlet{macouleurexodeco}{#1},% + CouleurFondDeco=\colorlet{macouleurexodecofond}{#1},% Police=\renewcommand\tmpstyleexo{#1},% - EpTrait=\setlength{\eptraitexo}{#1} + EpTrait=\setlength{\eptraitexo}{#1},% + EchelleEtoiles=\def\tmpscalestarsexos{#1} } \setKVdefault[globalstyleexo]{% Libelle={Exercice~},% Couleur={blue!50!black},% + CouleurDeco={blue!50!black},% + CouleurFondDeco={macouleurexodeco!50},% Police={\bfseries\LARGE\sffamily},% - EpTrait={1.1pt} + EpTrait={1.1pt},% + EchelleEtoiles=0.85 } \NewDocumentCommand\StyleEnvtExo{ O{} }{% @@ -719,7 +874,6 @@ Type=\def\EnvtExoType{#1},% ComplementTitre=\def\EnvtExoCpltTitre{#1},% CodeDebut=\def\EnvtExoCodeAvant{#1},% - %Couleur=\def\EnvtExoCouleur{#1},% EchelleImage=\def\EnvtExoScaleImg{#1},% Decoration=\def\EnvtExoDeco{#1},% Trait=\def\EnvtExoTrait{#1} @@ -728,7 +882,6 @@ Type=Classique,% ComplementTitre={},% CodeDebut={},% - %Couleur=macouleurexo,% EchelleImage=1.15,% Compteur=true,% Decoration={},% @@ -753,12 +906,13 @@ {pointilles}{\,\dotfill}% {dashilles}{\,\hdashrule{\fill}{\eptraitexo}{\eptraitexospace}}% {non}{\hfill}% + {aucun}{~}% }% %décoration éventuelle \IfSubStr{\EnvtExoDeco}{Icone}% {% \StrBehind{\EnvtExoDeco}{/}[\EnvtExoIcon]% - \,\scalebox{0.85}[0.85]{\EnvtExoIcon}% + \,\textcolor{macouleurexodeco}{\scalebox{0.85}[0.85]{\EnvtExoIcon}}% }{}% \IfSubStr{\EnvtExoDeco}{Ceinture}% {% @@ -768,13 +922,13 @@ \IfSubStr{\EnvtExoDeco}{Chrono}% {% \StrBehind{\EnvtExoDeco}{/}[\EnvtExoChrono]% - \,\pictochrono[ColTime=macouleurexo!50]{\EnvtExoChrono}% + \,\pictochrono[ColTime=macouleurexodeco!50]{\EnvtExoChrono}% }{}% \IfSubStr{\EnvtExoDeco}{Points}% {% \StrBehind{\EnvtExoDeco}{/}[\EnvtExoPts]% \IfStrEq{\EnvtExoPts}{1}{\def\pts{point}}{\def\pts{points}}% - \,(\EnvtExoPts\ \pts)% + \,\textcolor{macouleurexodeco}{(\EnvtExoPts\ \pts)}% }{}% \IfSubStr{\EnvtExoDeco}{Image}% {% @@ -782,6 +936,30 @@ \settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}% \,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$% }{}% + \IfSubStr{\EnvtExoDeco}{faEtoiles}% + {% + \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]% + \IfSubStr{\EnvtExoStars}{§}% + {% + \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}% + }% + {% + \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}% + }% + }{}% + \IfSubStr{\EnvtExoDeco}{tkzEtoiles}% + {% + \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]% + \IfSubStr{\EnvtExoStars}{§}% + {% + \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}% + }% + {% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}% + }% + }{}% }{}% \IfSubStr{\EnvtExoType}{Perso}%OK perso____déco {% @@ -799,7 +977,7 @@ \IfSubStr{\EnvtExoDeco}{Icone}% {% \StrBehind{\EnvtExoDeco}{/}[\EnvtExoIcon]% - \,\scalebox{0.85}[0.85]{\EnvtExoIcon}% + \,\textcolor{macouleurexodeco}{\scalebox{0.85}[0.85]{\EnvtExoIcon}}% }{}% \IfSubStr{\EnvtExoDeco}{Ceinture}% {% @@ -809,13 +987,13 @@ \IfSubStr{\EnvtExoDeco}{Chrono}% {% \StrBehind{\EnvtExoDeco}{/}[\EnvtExoChrono]% - \,\pictochrono[ColTime=macouleurexo!50]{\EnvtExoChrono}% + \,\pictochrono[ColTime=macouleurexodeco!50]{\EnvtExoChrono}% }{}% \IfSubStr{\EnvtExoDeco}{Points}% {% \StrBehind{\EnvtExoDeco}{/}[\EnvtExoPts]% \IfStrEq{\EnvtExoPts}{1}{\def\pts{point}}{\def\pts{points}}% - \,(\EnvtExoPts\ \pts)% + \,\textcolor{macouleurexodeco}{(\EnvtExoPts\ \pts)}% }{}% \IfSubStr{\EnvtExoDeco}{Image}% {% @@ -823,6 +1001,30 @@ \settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}% \,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$% }{}% + \IfSubStr{\EnvtExoDeco}{faEtoiles}% + {% + \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]% + \IfSuStr{\EnvtExoStars}{§}% + {% + \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}% + }% + {% + \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}% + }% + }{}% + \IfSubStr{\EnvtExoDeco}{tkzEtoiles}% + {% + \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]% + \IfSubStr{\EnvtExoStars}{§}% + {% + \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}% + }% + {% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}% + }% + }{}% }{}% \endgroup% \def\hrulefill{\leavevmode\leaders\hrule height 0.4pt\hfill\kern\z@}% @@ -2237,7 +2439,7 @@ \setKVdefault[tkzBannerpartKeys]{% height=2.5em,% - width=\linewidth,% + width={\linewidth-0.5pt},% blockwidth=2.75em,% collight=darkgray!25,% colmedium=darkgray!50,% @@ -2260,10 +2462,10 @@ \noindent% \restoreKV[tkzBannerpartKeys]% \setKV[tkzBannerpartKeys]{#1}% - \pgfmathsetmacro{\tkzBannertriscale}{0.75*\useKV[tkzBannerpartKeys]{height}/1.25cm}% - \pgfmathsetmacro{\scaletypedoctribanner}{1.05*0.75*\useKV[tkzBannerpartKeys]{height}/1.25cm}% - \pgfmathsetmacro{\scaletypedoctribannernum}{2.5*0.75*\useKV[tkzBannerpartKeys]{height}/1.25cm}% - \pgfmathsetmacro{\tkzBannertriangle}{0.10*\useKV[tkzBannerpartKeys]{height}/\useKV[tkzBannerpartKeys]{width}}% + \pgfmathsetmacro{\tkzBannertriscale}{0.75*(\useKV[tkzBannerpartKeys]{height})/1.25cm}% + \pgfmathsetmacro{\scaletypedoctribanner}{1.05*0.75*(\useKV[tkzBannerpartKeys]{height})/1.25cm}% + \pgfmathsetmacro{\scaletypedoctribannernum}{2.5*0.75*(\useKV[tkzBannerpartKeys]{height})/1.25cm}% + \pgfmathsetmacro{\tkzBannertriangle}{0.10*(\useKV[tkzBannerpartKeys]{height})/(\useKV[tkzBannerpartKeys]{width})}% \IfEq{\tkzBannermaintriblockwidth}{auto}% {% \settowidth{\tmp@tkzbanner@autowidthtype}{\scalebox{\scaletypedoctribanner}[\scaletypedoctribanner]{\sffamily\bfseries\vphantom{qÉ}\tkzBannermaintritype}}% @@ -2309,34 +2511,34 @@ \begin{scope} \clip ($(tkzBannerTri-SW)!0.0375!(tkzBannerTri-NW)$) -- ($(tkzBannerTri-SE)!0.1375!(tkzBannerTri-NE)$) -- (tkzBannerTri-NE) -| cycle ; %light - \fill[tkzbannertrilight] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner},0) -- ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1em},{0.5*\useKV[tkzBannerpartKeys]{height}}) -- ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner},0) -- (tkzBannerTri-SW) -- cycle ; + \fill[tkzbannertrilight] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner},0) -- ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) -- ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner},0) -- (tkzBannerTri-SW) -- cycle ; \end{scope} \begin{scope} \clip ($(tkzBannerTri-SW)!0.025!(tkzBannerTri-NW)$) -- ($(tkzBannerTri-SE)!0.125!(tkzBannerTri-NE)$) -- (tkzBannerTri-NE) -| cycle ; %medium - \fill[tkzbannertrimedium] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner},0) -- ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner+1em},{0.5*\useKV[tkzBannerpartKeys]{height}}) -- ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner},0) -- (tkzBannerTri-SW) -- cycle ; + \fill[tkzbannertrimedium] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner},0) -- ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner+1em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) -- ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner},0) -- (tkzBannerTri-SW) -- cycle ; \end{scope} \begin{scope} \clip ($(tkzBannerTri-SW)!0.0125!(tkzBannerTri-NW)$) -- ($(tkzBannerTri-SE)!0.1125!(tkzBannerTri-NE)$) -- (tkzBannerTri-NE) -| cycle ; %dark - \fill[tkzbannertridark] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth},0) -- ({\tmp@tkzbanner@autowidth+1em},{0.5*\useKV[tkzBannerpartKeys]{height}}) -- ({\tmp@tkzbanner@autowidth},0) -- (tkzBannerTri-SW) -- cycle ; + \fill[tkzbannertridark] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth},0) -- ({\tmp@tkzbanner@autowidth+1em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) -- ({\tmp@tkzbanner@autowidth},0) -- (tkzBannerTri-SW) -- cycle ; \IfEq{\tkzBannermaintritypelibre}{}% {% \ifboolKV[tkzBannerpartKeys]{num}% {% \IfEq{\tkzBannermaintritype}{}% {% - \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.5*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}#2}; + \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#2}; }% {% \node[inner sep=2pt,below=1pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={1.05*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}\tkzBannermaintritype}; - \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.425*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}#2}; + \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.425*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#2}; }% }% {}% }% {% - \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.5*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}\tkzBannermaintritypelibre}; + \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}\tkzBannermaintritypelibre}; }% \end{scope} }% @@ -2346,21 +2548,21 @@ \clip (tkzBannerTri-SWd) -- (tkzBannerTri-SEd) -- (tkzBannerTri-NE) -| cycle ; \ifboolKV[tkzBannerpartKeys]{swap}% {% - \node[inner sep=2pt,right,text=\tkzBannermaintricol,font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.75*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1.25em},{0.5*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}#3}; + \node[inner sep=2pt,right,text=\tkzBannermaintricol,font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.75*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1.25em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#3}; %logo \IfEq{\tkzBannermaintrilogo}{}% {}% {% - \node[inner sep=2pt,left,text=\tkzBannermaintricol,font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\useKV[tkzBannerpartKeys]{width}},{0.55*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}\tkzBannermaintrilogo}; + \node[inner sep=2pt,left,text=\tkzBannermaintricol,font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\useKV[tkzBannerpartKeys]{width}},{0.55*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}\tkzBannermaintrilogo}; }% }% {% - \node[inner sep=2pt,right,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.75*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1.25em},{0.5*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}#3}; + \node[inner sep=2pt,right,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.75*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1.25em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#3}; %logo \IfEq{\tkzBannermaintrilogo}{}% {}% {% - \node[inner sep=2pt,left,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\useKV[tkzBannerpartKeys]{width}},{0.55*\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}\tkzBannermaintrilogo}; + \node[inner sep=2pt,left,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\useKV[tkzBannerpartKeys]{width}},{0.55*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}\tkzBannermaintrilogo}; }% }% \end{scope} diff --git a/macros/luatex/latex/domaincoloring/Changes b/macros/luatex/latex/domaincoloring/Changes index e49a69aac3..725f4399fb 100644 --- a/macros/luatex/latex/domaincoloring/Changes +++ b/macros/luatex/latex/domaincoloring/Changes @@ -1,3 +1,7 @@ +0.03 2024-08-26 - use \jobname for temporary file + - added option force for not creating already existing pdf's + - allow different x|y resolutions + - updated documentation 0.02 2024-08-22 - edit option bgcolor - reduced header for the intermediate eps - renamed complex-numbers.lua diff --git a/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.bib b/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.bib index d109070c92..5529a63a48 100644 --- a/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.bib +++ b/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.bib @@ -25,3 +25,14 @@ date = {2024-08-18}, } +@online{dm, + author = {Juan Carlos Ponce Campuzano}, + title = {Dynamic Mathematics}, + subtitle = {Domain Coloring -- Visualizing Complex Functions}, + date = {2018-07-15}, + urldate = {2024-08-23}, + url ={https://www.dynamicmath.xyz/domain-coloring/}, +} + + + \ No newline at end of file diff --git a/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.pdf b/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.pdf index 8a8b79e4d9..bf0e31988e 100644 Binary files a/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.pdf and b/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.pdf differ diff --git a/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.tex b/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.tex index 63c33ec368..cedf037ab1 100644 --- a/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.tex +++ b/macros/luatex/latex/domaincoloring/doc/domaincoloring-doc.tex @@ -1,7 +1,9 @@ -%% $Id: domaincoloring-doc.tex 952 2024-08-22 15:40:35Z herbert $ +%% $Id: domaincoloring-doc.tex 966 2024-08-26 19:55:11Z herbert $ % \listfiles +\def\header{Complex Functions} + \DocumentMetadata{} \documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small, headinclude=false,footinclude=false,oneside]{pst-doc} @@ -15,15 +17,19 @@ \usepackage{enumitem} \setlist{noitemsep,nosep} +\usepackage{makeidx} +\makeindex + \usepackage{domaincoloring} \let\DColFV\fileversion +\setDColkeys{force=false}% only for this documentation relevant \usepackage{hvlogos} \usepackage{listings} \lstset{columns=fixed,basicstyle=\ttfamily\small} -\def\bgImage{\includegraphics[width=7cm]{titleImg}} +\def\bgImage{\hspace{-2cm}*\includegraphics[width=14cm]{titleImg.png}} \title{Domain Coloring of complex functions\\version \DColFV} \author{Herbert Voß} @@ -34,7 +40,9 @@ \section{Introduction} -This package works only with \texttt{lualatex}! +This package works only with \texttt{lualatex} and the option \Loption{shell-escape}! +It creates an intermediate external EPS-file, which is automatically converted with +\LFile{epstopdf}. The pdf is in the end imported by the macro \Lcs{includegraphics}. \subsection{Loading the package} The package \texttt{domaincoloring} creates acolored interpretation of the @@ -76,16 +84,17 @@ Every math function has to be preceeded by \texttt{cmath} if it has a complex ar \noindent \begin{xltabular}{\linewidth}{@{} >{\ttfamily}l l X @{}}\\\toprule \emph{name} & \emph{value} &\emph{meaning}\\\midrule -domain & {-2,2,-2,2} & the (re,im)-coordinates for the complex system\\ -resolution & 500 & the number of steps for the re,im interval. At the moment only -for both coordinates the same. Will be in future -versions different for the both axes. \\ -filename & \Lcs{jobname-tmp} & name of the created external file, must be unique\\ -grfOptions &scale=0.5 & optional arguments for \Lcs{includegraphics}\\ -hsvrgb & {phi,1,r} & for the conversion into rgb\\ -funcName & & corresponding to external file\\ -bgcolor & 0 & change color to white as background for all values $r+g+b\le\text{bgcolor}$\\ -invers & false & inverted colors with $color=|color-255|$\\ +\Lkeyword{domain} & {-2,2,-2,2} & the (re,im)-coordinates for the complex system\\ +\Lkeyword{resolution} & 500 & the number of steps for the re,im interval. One value will be for +both axes. Two values like \verb|{500,600}| for real axis and imaginary axis,\\ +\Lkeyword{filename} & \Lcs{jobname-tmp} & name of the created external file, must be unique\\ +\Lkeyword{funcName} & \texttt{\{\}} & corresponding to external file\\ +\Lkeyword{grfOptions} &scale=0.5 & optional arguments for \Lcs{includegraphics}\\ +\Lkeyword{hsvrgb} & {phi+pi,1,r} & for the conversion into rgb\\ +\Lkeyword{bgcolor} & -1 & change color to white as background for all values $-1\le r+g+b\le\text{bgcolor}$\\ +\Lkeyword{invers} & false & inverted colors with $color=|color-255|$\\ +\Lkeyword{force} & true & With \texttt{force=false} an existing pdf file will be used +without calculating a new one.\\ \bottomrule \end{xltabular} @@ -96,7 +105,7 @@ invers & false & inverted colors with $color=|color-255|$\\ \subsection{The default with function $f(z)=z$} \begin{lstlisting} -\DomainColoring{z}\qquad % default filename \jobname-tmp.png +\DomainColoring{z} % default filename \jobname-tmp.png \end{lstlisting} \noindent @@ -111,7 +120,9 @@ invers & false & inverted colors with $color=|color-255|$\\ f(z) &= \cos(z)/\sin(z^4-1) \end{align} -in Lua-notation: \verb|cmath.cos(z)/cmath.sin(z^4-1)|. +in Lua-notation: \verb|cmath.cos(z)/cmath.sin(z^4-1)|. All complex functions +must be preceeded by \texttt{cmath.}. For real functions the prefix \texttt{math.} +can be omitted. \begin{lstlisting} \DomainColoring[domain={-2.5,2.5,-2.5,2.5},resolution=500, @@ -138,7 +149,7 @@ in Lua-notation: \verb|cmath.cos(z)/cmath.sin(z^4-1)|. filename=\jobname-tmp1c]{cmath.cos(z)/cmath.sin(z^4-1)}} -With \Lcs{bgcolor}\texttt{=} all RGB-combinations with a sum $R+G+B <= \text{int}$ are set to +With \Lkeyword{bgcolor}\texttt{=} all RGB-combinations with a sum $R+G+B <= \text{int}$ are set to the color white. \subsection{Option for \Lcs{includegraphics}} @@ -159,9 +170,9 @@ With \Lkeyword{grfOptions} one can define optional arguments for \Lcs{includegra \subsection{Higher resolution} The resolution is more or less the number of pixels for the given domain. -In later versions of this package it may be possible to have different values -for the two coordinates. By now the one value for \Lkeyword{resolution} is for -both axes. +It is possible to have different values +for the two coordinates. Is only one value for \Lkeyword{resolution} given, then it is +for both axes. \begin{lstlisting} @@ -182,7 +193,7 @@ both axes. \subsection{hsv to rgb conversion} -The color model (Wikipedia) +The color model (Wikipedia): \begin{center} \includegraphics[width=0.5\linewidth]{hsv} @@ -222,27 +233,28 @@ e.g. \texttt{hsvrgb=\{phi+2,0.5,2/r\}} \subsection{External function definition} The already existing file \LFile{domaincoloring-functions.lua} collects sone definitions of complex functions $f(z)$, which can be used from inside \LaTeX\ -with the optional argument \Lkeyword{funcName}. In this case the mandatory argument +with the optional argument \Lkeyword{funcName}\texttt{}. +In this case the mandatory argument of \Lcs{DomainColoring} has no meaning and can be empty. \begin{lstlisting} \DomainColoring[filename=\jobname-tmp6a,resolution=1000, domain={-1.5,1.5,-1.5,1.5}, grfOptions={width=0.49\linewidth}, - hsvrgb={phi+2*pi,1,1/r}, funcName=f12]{}% using predefined function + hsvrgb={phi+pi,1,2/r}, funcName=f12]{}% using predefined function \hfill \DomainColoring[filename=\jobname-tmp6b,resolution=2000, domain={-2.3,0.7,-1.5,1.5}, grfOptions={width=0.49\linewidth}, - hsvrgb={phi+2*pi,1,1/r},funcName=f13]{} + hsvrgb={phi+pi,1,2/r},funcName=f13]{} \end{lstlisting} \noindent \DomainColoring[filename=\jobname-tmp6a,resolution=1000, domain={-1.5,1.5,-1.5,1.5}, grfOptions={width=0.49\linewidth}, - hsvrgb={phi+2*pi,1,1/r}, funcName=f12]{}% using predefined function + hsvrgb={phi+pi,1,2/r}, funcName=f12]{}% using predefined function \hfill \DomainColoring[filename=\jobname-tmp6b,resolution=2000, domain={-2.3,0.7,-1.5,1.5}, grfOptions={width=0.49\linewidth}, - hsvrgb={phi+2*pi,1,1/r},funcName=f13]{} + hsvrgb={phi+pi,1,2/r},funcName=f13]{} The contents of the function file of the current version of \LPack{domaincoloring} is:: @@ -254,4 +266,5 @@ The contents of the function file of the current version of \LPack{domaincolorin \nocite{*} \printbibliography +\printindex \end{document} diff --git a/macros/luatex/latex/domaincoloring/doc/titleImg.pdf b/macros/luatex/latex/domaincoloring/doc/titleImg.pdf index e68120b481..decae34f42 100644 Binary files a/macros/luatex/latex/domaincoloring/doc/titleImg.pdf and b/macros/luatex/latex/domaincoloring/doc/titleImg.pdf differ diff --git a/macros/luatex/latex/domaincoloring/latex/domaincoloring.sty b/macros/luatex/latex/domaincoloring/latex/domaincoloring.sty index d668d057f0..170e1897f0 100644 --- a/macros/luatex/latex/domaincoloring/latex/domaincoloring.sty +++ b/macros/luatex/latex/domaincoloring/latex/domaincoloring.sty @@ -1,4 +1,4 @@ -%% $Id: domaincoloring.sty 952 2024-08-22 15:40:35Z herbert $ +%% $Id: domaincoloring.sty 966 2024-08-26 19:55:11Z herbert $ %% This is file `domaincoloring.sty', %% %% Copyright (C) 2024- Herbert Voss @@ -14,13 +14,13 @@ \RequirePackage{graphicx} \RequirePackage{shellesc} -\def\fileversion{0.02} -\def\filedate{2024/08/22} +\def\fileversion{0.03} +\def\filedate{2024/08/26} \message{`DCol' v\fileversion, \filedate} \ProvidesPackage{domaincoloring} - [\filedate\ \fileversion\ 0.02 package for domain coloring of complex functions] + [\filedate\ \fileversion\ package for domain coloring of complex functions] -\ifnum\ShellEscapeStatus < 1 +\ifnum\ShellEscapeStatus < 1 \PackageError{shellesc}{ShellEscape not enabled! Use --shell-escape}% \fi @@ -28,25 +28,35 @@ \catcode`\^=11\relax % for power symbol in Lua \define@key{DCol}{domain}{\def\@domaincoloring@domain{#1}} -\define@key{DCol}{resolution}{\def\@domaincoloring@res{#1,#1}} +\define@key{DCol}{resolution}{\@domaincoloring@res@i#1,\@nil} +\def\@domaincoloring@res@i#1,#2\@nil{% + \ifx\relax#2\relax % only one value + \def\@domaincoloring@res{#1,#1}% + \else + \def\@domaincoloring@res{#1,#2}% + \fi} \define@key{DCol}{bgcolor}{\def\@domaincoloring@bgcolor{#1}} \define@key{DCol}{filename}{\def\@domaincoloring@filename{#1}} \define@key{DCol}{hsvrgb}{\def\@domaincoloring@hsvrgb{#1}} \define@key{DCol}{funcName}{\def\@domaincoloring@funcName{#1}} \define@key{DCol}{invers}{\def\@domaincoloring@invers{#1}} \define@key{DCol}{grfOptions}{\def\@domaincoloring@grf{#1}} +\define@boolkey{DCol}[DCol@]{force}[true]{} +\define@boolkey{DCol}[DCol@]{grid}[true]{} \def\setDColkeys#1{\edef\x{\noexpand\setkeys{DCol}{#1}}\x} \setDColkeys{ funcName={}, % corresponding to external file - hsvrgb={phi+3.14,1,r}, % given (r,phi) of the complex value + hsvrgb={phi+pi,1,r}, % given (r,phi) of the complex value filename=\jobname-tmp, % the external image filename resolution=500, % pixel per (x|y) interval domain={-2,2,-2,2}, % x|y domain - bgcolor=0, % R+G+B value, changes only 0,0,0 -> 255,255,255 + bgcolor=-1, % R+G+B value, changes only 0,0,0 -> 255,255,255 invers=false, % 0 or 1 vor inverted colors grfOptions={scale=0.5}, % LaTeX options for the included image + force=true, % only valid for the documentation + grid=false, % draw a grid into the image }% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -55,14 +65,22 @@ \def\DomainColoring@i[#1]#2{% \begingroup \setDColkeys{#1}% - \directlua{ - require("domaincoloring-complex-numbers") - require ("domaincoloring") - createData("#2",{\@domaincoloring@domain},{\@domaincoloring@res}, - "\@domaincoloring@funcName","\@domaincoloring@hsvrgb", - \@domaincoloring@bgcolor,"\@domaincoloring@invers")}% - \typeout{Convert domain.eps file to \@domaincoloring@filename.pdf}% - \ShellEscape{epstopdf domain.eps \@domaincoloring@filename.pdf}% + \ifDCol@force\else + \IfFileExists{\@domaincoloring@filename.pdf}{}{\DCol@forcetrue}% + \fi + \ifDCol@force + \directlua{% + require("domaincoloring-complex-numbers") + require ("domaincoloring") + createData("\jobname", + "#2","\@domaincoloring@funcName", % user defined, function no from -functions.lua + {\@domaincoloring@domain},{\@domaincoloring@res}, + "\@domaincoloring@hsvrgb", + \@domaincoloring@bgcolor,"\@domaincoloring@invers", + \ifDCol@grid "true" \else "false" \fi)}% + \typeout{Convert \jobname-domain.eps file to \@domaincoloring@filename.pdf}% + \ShellEscape{epstopdf \jobname-domain.eps \@domaincoloring@filename.pdf}% + \fi % \expandafter\includegraphics\expandafter[\@domaincoloring@grf]{\@domaincoloring@filename.pdf}% \endgroup diff --git a/macros/luatex/latex/domaincoloring/lua/domaincoloring-functions.lua b/macros/luatex/latex/domaincoloring/lua/domaincoloring-functions.lua index 84cfd65d7c..bd71f282ce 100644 --- a/macros/luatex/latex/domaincoloring/lua/domaincoloring-functions.lua +++ b/macros/luatex/latex/domaincoloring/lua/domaincoloring-functions.lua @@ -1,4 +1,4 @@ --- $Id: domaincoloring-functions.lua 946 2024-08-21 19:32:10Z herbert $ +-- $Id: domaincoloring-functions.lua 965 2024-08-26 17:50:33Z herbert $ kpse.set_program_name("luatex") @@ -72,3 +72,13 @@ function f13(z) -- mandelbrot return z end +function f14(z) + local iterateNo = 5 +-- local c = z +-- z = complex(0,0) + for n=1,iterateNo do + z = cmath.sin(z)*cmath.sin(0.8*z) -- + c + end + return z +end + diff --git a/macros/luatex/latex/domaincoloring/lua/domaincoloring.lua b/macros/luatex/latex/domaincoloring/lua/domaincoloring.lua index 2b2ae177ea..872acc762f 100644 --- a/macros/luatex/latex/domaincoloring/lua/domaincoloring.lua +++ b/macros/luatex/latex/domaincoloring/lua/domaincoloring.lua @@ -1,4 +1,4 @@ --- $Id: domaincoloring.lua 952 2024-08-22 15:40:35Z herbert $ +-- $Id: domaincoloring.lua 965 2024-08-26 17:50:33Z herbert $ ----------------------------------------------------------------------- -- FILE: domaincoloring.lua @@ -9,7 +9,7 @@ -- ----------------------------------------------------------------------- -local version = 0.02 +local version = 0.03 kpse.set_program_name("luatex") @@ -65,7 +65,7 @@ A row of an image is horizontal. A column is vertical. The pixels in the image are square and contiguous. ]] -function write_eps_data(name,data,res) +function write_eps_data(name,data,domain,res,grid) print("Lua: writing data file "..name.." ...") -- print(data) outFile = io.open(name,"w+") -- Dateiname @@ -159,17 +159,72 @@ DisplayImage end end outFile:write("\n") -- neue Zeile - outFile:write([[end % of userdict + if grid == "true" then + outFile:write("gsave \n /xMin "..domain[1].." def\n") + outFile:write("/xMax "..domain[2].." def\n") + outFile:write("/yMin "..domain[3].." def\n") + outFile:write("/yMax "..domain[4].." def\n") + outFile:write(res[1].." xMax xMin sub div dup /xScale exch def \n") + outFile:write(res[2].." yMax yMin sub div dup /yScale exch def \n") + outFile:write("scale\n") + outFile:write([[ +xMin neg yMin neg translate % the new origin\n" +gsave +xMin floor 0.5 yScale div sub + 0.5 xMax 0.5 add round { % loop variable on stack\n" + dup yMin moveto yMax lineto +} for +2 ]]) + outFile:write(res[2]) + outFile:write([[ div setlinewidth 0.4 setgray [5 5 ] { ]]) + outFile:write(res[2]..[[ div } forall 2 array astore 0 setdash +stroke +grestore +gsave +yMin floor 0.5 yScale div add % startValue + % with shift 0.5 to be in the middle of the pixel + 0.5 % step + yMax 0.5 add round { % loop variable on stack + dup xMin exch moveto xMax exch lineto +} for +2 ]]) + outFile:write(res[1]) + outFile:write([[ div setlinewidth 0.4 setgray [5 5 ] { ]]) + outFile:write(res[1]..[[ div } forall 2 array astore 0 setdash +stroke +grestore +gsave +xMin floor 0.5 yScale div sub + 1 xMax 0.5 add round { % loop variable on stack\n" + dup yMin moveto yMax lineto +} for +2 ]]) + outFile:write(res[2]) + outFile:write([[ div setlinewidth 0.3 setgray stroke +grestore +gsave +yMin floor 0.5 yScale div add + 1 yMax 0.5 add round { % loop variable on stack + dup xMin exch moveto xMax exch lineto +} for +2 ]]) + outFile:write(res[1]) + outFile:write([[ div setlinewidth 0.3 setgray stroke +grestore +]]) + end + outFile:write([[ +end % of userdict %%PageTrailer %%Trailer %%EOF -]]) + ]]) outFile:close() -- Datei schließen --os.execute("pnmtopng apfel.ppm >"..fileName..".png") -- ppm -> png Format end -function write_data(name,data,res) -- only valid for writing ppm files - print("\nLua: writing data file "..name.." ...") +function write_data(name,data,domain,res) -- only valid for writing ppm files + print("Lua: writing data to file "..name.." ...") -- print(data) outFile = io.open(name,"w+") -- Dateiname outFile:write("P3 ") -- Grafictype R G B @@ -192,6 +247,7 @@ function write_data(name,data,res) -- only valid for writing ppm files end function plot(fString, domain, res, funcName, hsvrgb, bgColor, invers) + print("\nLua: calculating data with "..tostring(fString).." ... ") local left = domain[1] local right = domain[2] local bottom = domain[3] @@ -222,7 +278,7 @@ function plot(fString, domain, res, funcName, hsvrgb, bgColor, invers) color[c] = math.abs(color[c]-255) end end - if bgColor > 0 then + if bgColor > -1 then if color[1] + color[2] + color[3] <= bgColor then color = { 255, 255, 255 } end @@ -241,13 +297,13 @@ end Resolution: (points per Interval) xRes,yRes funcName: true/false (see f) ]] -function createData(f,Domain,Resolution,funcName,hsvrgb,bgColor,invers) - if funcName == "" then - img = plot(f,Domain,Resolution,false,hsvrgb,bgColor,invers) - else - img = plot(load("return "..funcName)(),Domain,Resolution,true,hsvrgb,bgColor,invers) - end +function createData(jobname,f,funcName,Domain,Resolution,hsvrgb,bgColor,invers,grid) + if funcName == "" then + img = plot(f,Domain,Resolution,false,hsvrgb,bgColor,invers) + else + img = plot(load("return "..funcName)(),Domain,Resolution,true,hsvrgb,bgColor,invers) + end -- write_data("domain.ppm",img,Resolution) - write_eps_data("domain.eps",img,Resolution) + write_eps_data(jobname.."-domain.eps",img,Domain,Resolution,grid) end -- cgit v1.2.3