diff options
Diffstat (limited to 'macros')
30 files changed, 601 insertions, 811 deletions
diff --git a/macros/latex/contrib/acro/README b/macros/latex/contrib/acro/README index 8263eb47e5..5bfe1ce016 100644 --- a/macros/latex/contrib/acro/README +++ b/macros/latex/contrib/acro/README @@ -1,5 +1,5 @@ -------------------------------------------------------------------------- -the ACRO package v2.10c 2019/10/12 +the ACRO package v2.10d 2019/12/30 Typeset Acronyms @@ -23,7 +23,7 @@ This work has the LPPL maintenance status `maintained'. The Current Maintainer of this work is Clemens Niederberger. -------------------------------------------------------------------------- The acro package consists of the files - - acro.sty, acro_en.tex, acro_en.pdf, README + - acro.sty, acro_en.tex, acro_en.pdf, README, acro.history -------------------------------------------------------------------------- If you have any ideas, questions, suggestions or bugs to report, please feel free to contact me. diff --git a/macros/latex/contrib/acro/acro.history b/macros/latex/contrib/acro/acro.history index c442d5bb52..b20f53427a 100644 --- a/macros/latex/contrib/acro/acro.history +++ b/macros/latex/contrib/acro/acro.history @@ -267,3 +267,6 @@ - clearer documentation of `uppercase-short' - set the default of `uppercase-short' to `true' 2019/10/12 v2.10c - fix issue #139 +2019/12/30 v2.10d - fix issue #76 + - fix issue #141 + - fix issue #143 diff --git a/macros/latex/contrib/acro/acro.sty b/macros/latex/contrib/acro/acro.sty index 4f94b1304c..03d0121d5f 100644 --- a/macros/latex/contrib/acro/acro.sty +++ b/macros/latex/contrib/acro/acro.sty @@ -31,8 +31,8 @@ \RequirePackage{expl3,xparse,l3keys2e,xtemplate,etoolbox} \ProvidesExplPackage {acro} - {2019/10/12} - {2.10c} + {2019/12/30} + {2.10d} {Typeset Acronyms} % -------------------------------------------------------------------------- @@ -109,7 +109,12 @@ % -------------------------------------------------------------------------- % logging: -\cs_new:Npn \acro_if_log:T #1 { \use:n {#1} } +\prg_new_conditional:Npnn \acro_if_log: {p,T,F,TF} + { + \bool_if:NTF \l__acro_log_acronyms_bool + { \prg_return_true: } + { \prg_return_false: } + } \bool_new:N \l__acro_log_acronyms_bool \bool_new:N \l__acro_log_acronyms_verbose_bool @@ -440,12 +445,12 @@ \cs_new_protected:Npn \__acro_first_upper_case:n #1 { \tl_upper_case:n { \tl_head:n {#1} } \tl_tail:n {#1} } -\cs_generate_variant:Nn \__acro_first_upper_case:n { x } -\cs_generate_variant:Nn \tl_mixed_case:n { x } +\cs_generate_variant:Nn \__acro_first_upper_case:n {x} +\cs_generate_variant:Nn \tl_mixed_case:n {x} \cs_new_eq:NN \acro_first_upper_case:n \__acro_first_upper_case:n -\NewDocumentCommand \acfirstupper { m } +\NewDocumentCommand \acfirstupper {m} { \acro_first_upper_case:n {#1} } % -------------------------------------------------------------------------- @@ -660,29 +665,30 @@ { \bool_if:nT { \l__acro_hyperref_loaded_bool && \l__acro_use_hyperref_bool } { - \cs_set_eq:NN \acro_hyper_link:nn \hyperlink + \sys_if_engine_xetex:TF + { + \cs_set:Npn \acro_hyper_link:nn ##1##2 + { \hyperlink { \XeTeXLinkBox {##1} } {##2} } + } + { \cs_set_eq:NN \acro_hyper_link:nn \hyperlink } \cs_set:Npn \acro_hyper_target:nn ##1##2 - { \raisebox { 3ex } [ 0pt ] { \hypertarget {##1} { } } ##2 } + { \raisebox {3ex} [0pt] { \hypertarget {##1} { } } ##2 } } } -% #1: tl var -% #2: id -% #3: text -\cs_new_protected:Npn \__acro_make_link:Nnn #1#2#3 +% #1: id +% #2: text +\cs_new_protected:Npn \__acro_make_link:nn #1#2 { \bool_if:nTF { \l__acro_use_hyperref_bool && \l__acro_hyperref_loaded_bool } { - \tl_set:Nn #1 - { - \acro_hyper_link:nn {#2} { \phantom {#3} } - \acro_if_is_single:nTF {#2} - { \hbox_overlap_left:n {#3} } - { \acro_color_link:n { \hbox_overlap_left:n {#3} } } - } + \acro_hyper_link:nn {#1} { \phantom {#2} } + \acro_if_is_single:nTF {#1} + { \hbox_overlap_left:n {#2} } + { \acro_color_link:n { \hbox_overlap_left:n {#2} } } } - { \tl_set:Nn #1 {#3} } + {#2} } \cs_generate_variant:Nn \__acro_make_link:Nnn {NnV} @@ -1426,7 +1432,7 @@ } { \l__acro_custom_short_format_tl } { \l__acro_list_short_format_tl } - \__acro_get_property:nn {short} {#1} + { \__acro_get_property:nn {short} {#1} } } } \group_end: @@ -2018,26 +2024,22 @@ \bool_if:NF \l__acro_in_list_bool { \leavevmode } \acro_activate_hyperref_support: % short: - \prop_get:NnNF \l__acro_short_prop {#1} \l__acro_tmpa_tl {} - \__acro_make_link:NnV \l__acro_short_tl {#1} \l__acro_tmpa_tl - % \acro_get_property:nn {#1} {short-format} + \prop_get:NnNF \l__acro_short_prop {#1} \l__acro_short_tl {} + % \__acro_make_link:NnV \l__acro_short_tl {#1} \l__acro_tmpa_tl % alt: - \prop_get:NnNTF \l__acro_alt_prop {#1} \l__acro_tmpa_tl - { \__acro_make_link:NnV \l__acro_alt_tl {#1} \l__acro_tmpa_tl } + \prop_get:NnNF \l__acro_alt_prop {#1} \l__acro_alt_tl + % { \__acro_make_link:NnV \l__acro_alt_tl {#1} \l__acro_tmpa_tl } { \tl_set_eq:NN \l__acro_alt_tl \l__acro_short_tl } % long: \acro_get_property:nn {#1} {long} - % \acro_get_property:nn {#1} {long-format} % foreign: \acro_get_property:nn {#1} {foreign} % foreign-lang: \acro_get_property:nn {#1} {foreign-lang} % extra: \acro_get_property:nn {#1} {extra} - % \acro_get_property:nn {#1} {extra-format} % single: \acro_get_property:nn {#1} {single} - % \acro_get_property:nn {#1} {single-format} % first-style: \acro_get_property:nn {#1} {first-style} % formatting @@ -2329,8 +2331,8 @@ \cs_new:cpn {acro_pdf_string_short_#1:n} ##1 { \acro_if_star_gobble:nTF {##1} - { \prop_item:cn {l__acro_pdfstring_short_#1_prop} } - { \prop_item:cn {l__acro_pdfstring_short_#1_prop} {##1} } + { \use:e { \prop_item:cn {l__acro_pdfstring_short_#1_prop} } } + { \use:e {\prop_item:cn {l__acro_pdfstring_short_#1_prop} {##1} } } } \cs_new:cpn {acpdfstring#1} { \use:c {acro_pdf_string_short_#1:n} } \prop_new:c {l__acro_pdfstring_alt_#1_prop} @@ -2512,9 +2514,9 @@ { \__acro_aux_file_now:x { - \token_to_str:N \acro@pages {#1} + \acro@pages {#1} { \seq_use:cn {g__acro_#1_pages_seq} {|} } ^^J - \token_to_str:N \acro@barriers {#1} + \acro@barriers {#1} { \seq_use:cn {g__acro_#1_barriers_seq} {,} } } } @@ -2561,12 +2563,15 @@ % #2: short form \cs_new_protected:Npn \acro_write_short:nn #1#2 { - \__acro_typeset:nn {short} + \__acro_make_link:nn {#1} { - \bool_if:nTF - { \l__acro_first_upper_bool } - { \exp_not:N \__acro_first_upper_case:n { \exp_not:n {#2} } } - { \exp_not:n {#2} } + \__acro_typeset:nn {short} + { + \bool_if:nTF + { \l__acro_first_upper_bool } + { \exp_not:N \__acro_first_upper_case:n { \exp_not:n {#2} } } + { \exp_not:n {#2} } + } } } \cs_generate_variant:Nn \acro_write_short:nn { nV , nv } @@ -2576,12 +2581,15 @@ % #2: alt form \cs_new_protected:Npn \acro_write_alt:nn #1#2 { - \__acro_typeset:nn {alt} + \__acro_make_link:nn {#1} { - \bool_if:nTF - { \l__acro_first_upper_bool && \l__acro_upper_short_bool } - { \exp_not:N \__acro_first_upper_case:n { \exp_not:n {#2} } } - { \exp_not:n {#2} } + \__acro_typeset:nn {alt} + { + \bool_if:nTF + { \l__acro_first_upper_bool && \l__acro_upper_short_bool } + { \exp_not:N \__acro_first_upper_case:n { \exp_not:n {#2} } } + { \exp_not:n {#2} } + } } } \cs_generate_variant:Nn \acro_write_alt:nn { nV , nv } @@ -3000,11 +3008,11 @@ \cs_new_protected:Npn \acro_write_indefinite:nn #1#2 { \bool_if:NT \l__acro_indefinite_bool - { \prop_item:cn { l__acro_#2_indefinite_prop } {#1} ~ } + { \prop_item:cn {l__acro_#2_indefinite_prop} {#1} ~ } \bool_if:NT \l__acro_upper_indefinite_bool { % \bool_set_true:N \l__acro_first_upper_bool \__acro_first_upper_case:x - { \prop_item:cn { l__acro_#2_indefinite_prop } {#1} } ~ + { \prop_item:cn {l__acro_#2_indefinite_prop} {#1} } ~ } } @@ -3321,7 +3329,7 @@ } \cs_generate_variant:Nn \acro_if_in_barrier:nnTF {nx} -\cs_new:Npn \acro@barriers #1#2 +\cs_new_protected:Npn \acro@barriers #1#2 { \seq_gset_split:cnn {g__acro_#1_recorded_barriers_seq} {,} {#2} } % -------------------------------------------------------------------------- @@ -3509,7 +3517,7 @@ \cs_new:Npn \acro_expandable_short:n #1 { \use:e { \prop_item:Nn \l__acro_short_prop {#1} } } - + \cs_new:Npn \acro_expandable_alt:n #1 { \use:e { \prop_item:Nn \l__acro_alt_prop {#1} } } diff --git a/macros/latex/contrib/acro/acro_en.pdf b/macros/latex/contrib/acro/acro_en.pdf Binary files differindex 31e6bdb440..eee6eaed49 100644 --- a/macros/latex/contrib/acro/acro_en.pdf +++ b/macros/latex/contrib/acro/acro_en.pdf diff --git a/macros/latex/contrib/acro/acro_en.tex b/macros/latex/contrib/acro/acro_en.tex index 2ac8b01d65..9aaea47d3c 100644 --- a/macros/latex/contrib/acro/acro_en.tex +++ b/macros/latex/contrib/acro/acro_en.tex @@ -1,8 +1,8 @@ -% arara: pdflatex: { action: nonstopmode } -% !arara: biber -% !arara: pdflatex: { action: nonstopmode } -% !arara: pdflatex: { action: nonstopmode } -% !arara: pdflatex: { action: nonstopmode } +% arara: pdflatex: { interaction: nonstopmode } +% arara: biber +% arara: pdflatex: { interaction: nonstopmode } +% arara: pdflatex: { interaction: nonstopmode } +% !arara: pdflatex: { interaction: nonstopmode } % -------------------------------------------------------------------------- % the ACRO package % diff --git a/macros/latex/contrib/apa7/apa7.dtx b/macros/latex/contrib/apa7/apa7.dtx index 303a2064f9..4641281267 100644 --- a/macros/latex/contrib/apa7/apa7.dtx +++ b/macros/latex/contrib/apa7/apa7.dtx @@ -4,11 +4,11 @@ % % % CHANGE THESE VALUES WITH EACH NEW RELEASE: % % % -%<class>\ProvidesClass{apa7}[2019/12/29 v1.01 APA formatting (7th edition)] +%<class>\ProvidesClass{apa7}[2019/12/30 v1.04 APA formatting (7th edition)] % % %<*internal> % -\def\apaSevenVersionDate{2019/12/29} -\def\apaSevenVersionNumber{1.01} +\def\apaSevenVersionDate{2019/12/30} +\def\apaSevenVersionNumber{1.04} % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -105,18 +105,16 @@ and the derived files apa7.ins, apa7.cls, apa7.pdf, README, - APAamerican.txt, - APAbritish.txt, - APAdutch.txt, - APAenglish.txt, - APAgerman.txt, - APAngerman.txt, - APAgreek.txt, - APAczech.txt, - APAturkish.txt, - APAendfloat.cfg, - apa7.ptex, - TeX2WordForapa7.bas, + APA7american.txt, + APA7british.txt, + APA7dutch.txt, + APA7english.txt, + APA7german.txt, + APA7ngerman.txt, + APA7greek.txt, + APA7czech.txt, + APA7turkish.txt, + APA7endfloat.cfg, Figure1.pdf, shortsample.tex, longsample.tex, and @@ -129,16 +127,16 @@ and the derived files apa7.ins, } \usedir{tex/latex/apa7/config} \generate{ - \file{./config/APAamerican.txt}{\from{\jobname.dtx}{american}} - \file{./config/APAbritish.txt}{\from{\jobname.dtx}{british}} - \file{./config/APAdutch.txt}{\from{\jobname.dtx}{dutch}} - \file{./config/APAenglish.txt}{\from{\jobname.dtx}{english}} - \file{./config/APAgerman.txt}{\from{\jobname.dtx}{german}} - \file{./config/APAngerman.txt}{\from{\jobname.dtx}{ngerman}} - \file{./config/APAgreek.txt}{\from{\jobname.dtx}{greek}} - \file{./config/APAczech.txt}{\from{\jobname.dtx}{czech}} - \file{./config/APAturkish.txt}{\from{\jobname.dtx}{turkish}} - \file{./config/APAendfloat.cfg}{\from{\jobname.dtx}{APAendfloat}} + \file{./config/APA7american.txt}{\from{\jobname.dtx}{american}} + \file{./config/APA7british.txt}{\from{\jobname.dtx}{british}} + \file{./config/APA7dutch.txt}{\from{\jobname.dtx}{dutch}} + \file{./config/APA7english.txt}{\from{\jobname.dtx}{english}} + \file{./config/APA7german.txt}{\from{\jobname.dtx}{german}} + \file{./config/APA7ngerman.txt}{\from{\jobname.dtx}{ngerman}} + \file{./config/APA7greek.txt}{\from{\jobname.dtx}{greek}} + \file{./config/APA7czech.txt}{\from{\jobname.dtx}{czech}} + \file{./config/APA7turkish.txt}{\from{\jobname.dtx}{turkish}} + \file{./config/APA7endfloat.cfg}{\from{\jobname.dtx}{APAendfloat}} } \usedir{tex/latex/apa7/samples} \generate{ @@ -187,6 +185,16 @@ and the derived files apa7.ins, }{|}}} https://orcid.org/#2}} \usepackage{hyperref} +\hypersetup{% + colorlinks, + linkcolor=blue, + citecolor=blue, + urlcolor=black, + pdfauthor = {Daniel A. Weiss <daniel.weiss.led@gmail.com>}, + pdftitle = {The apa7 class}, + pdfsubject = {Documentation of LaTeX class apa7}, + pdfkeywords = {LaTeX, APA} +} \usepackage{graphicx} \usepackage{booktabs} \usepackage{verbatimbox} @@ -206,14 +214,6 @@ and the derived files apa7.ins, %\DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup} %\DoNotIndex{\newcommand,\renewcommand} % -% \ifpdf -% \hypersetup{% -% pdfauthor = {Daniel A. Weiss <daniel.weiss.led@gmail.com>}, -% pdftitle = {The apa7 class}, -% pdfsubject = {Documentation of LaTeX class apa7}, -% pdfkeywords = {LaTeX, APA} -% }% -% \fi % % \title{^^A % Formatting documents in APA style (7th Edition)\\^^A @@ -231,6 +231,13 @@ and the derived files apa7.ins, % \changes{v1.01}{2019/12/29}{Corrected figure caption styles for doc format.} % \changes{v1.01}{2019/12/29}{Clarified that apacite and natbib are in 6th edition style.} % +% \changes{v1.02}{2019/12/29}{Fixed filename issue with language localization files.} +% +% \changes{v1.03}{2019/12/29}{Updated class to detect babel package in document and localize accordingly.} +% +% \changes{v1.04}{2019/12/30}{Added table of contents.} +% \changes{v1.04}{2019/12/30}{Updated documentation and added correct license statement to cls for apa6 package.} +% % \begin{abstract} % The \textit{Publication Manual} of the American Psychological % Association is widely used in the social sciences. The most @@ -240,6 +247,8 @@ and the derived files apa7.ins, % \textsf{apa6} class. The student manuscript type has been added. % \end{abstract} % +% \tableofcontents +% % \section{Background} % Most journals in the social sciences require manuscripts to be % formatted in compliance with the American Psychological @@ -268,7 +277,7 @@ and the derived files apa7.ins, % available. % % \vspace{1em} -% \textbf{Document mode:} Three choices are available. +% \textbf{Document mode:} Four choices are available. % \begin{itemize} % \item \DescribeMacro{jou}|jou| (default): Formats the document with an % appearance resembling a printed APA journal (e.g., \textit{Journal @@ -327,10 +336,10 @@ and the derived files apa7.ins, % it may not work in all contexts). Do \textbf{\textit{not}} load % \textsf{longtable} yourself because of precedence requirements % with the \textsf{endfloat} package. Copy the file -% |APAendfloat.cfg| from the ``config'' folder of your \textsf{apa} +% |APA7endfloat.cfg| from the ``config'' folder of your \textsf{apa} % installation to the working folder of your document (not in your % |texmf| tree), and rename it to |endfloat.cfg| so that endfloat -% will recognize it. The supplied |APAendfloat.cfg| file will also +% will recognize it. The supplied |APA7endfloat.cfg| file will also % be necessary in conjunction with the \textsf{rotating} package % (and its |\sideways| command) to produce rotated tables; this % works for |man| and |stu| mode only. For rotated tables in |jou| or |doc| @@ -414,7 +423,7 @@ and the derived files apa7.ins, % \item \DescribeMacro{\authornote}|\authornote|\marg{author-note}: % The Author Note, containing contact information, acknowledgements, % etc. -% \item \DescribeMacro{\addORCIDlink}|\addORCIDlink|\marg{author-name}\marg{ORCID}: Use this within the author note to generate the ORCID link. \\ +% \item \DescribeMacro{\addORCIDlink}|\addORCIDlink|\marg{author-name}\marg{ORCID}: Optionally, use this within the author note to generate the ORCID link. \\ % For example % \begin{verbatim} \addORCIDlink{First M. Last}{0000-0000-0000-0000} \end{verbatim} \\ % generates \\ \\ @@ -587,39 +596,17 @@ and the derived files apa7.ins, % utilizes code (with permission) from the \textsf{apa6} class to % comply with all of these specifications. % -% \subsection{Float Placement} -% The 7th Edition requires -% that tables and figures (in that order) be placed after the -% references but before the appendices. This creates a bit of a -% conundrum as to what should happen with tables or figures that are -% ultimately typeset within an appendix. The choices we are left with -% are to place appendix floats (a) along with the floats from the main -% part of the manuscript, which would mean that appendix floats appear -% prior to the point at which they are mentioned; (b) within the -% appendices themselves, which is not consistent with how floats in -% the main part of the manuscript are handled; or (c) in a separate -% float section that follows the appendices, which results in two -% float sections. Obviously none of these choices is satisfactory, so -% I posed the question to APA's Style Expert. He responded that at -% least for APA's journals ``it doesn't matter whether appendix tables -% are submitted with text tables or separately, as long as they are -% numbered correctly (e.g., Table A1, Table B1, etc.)'' (J.\ -% Hume-Pratuch, personal communication, June 15, 2011). Therefore, -% \textsf{apa7} takes the most straightforward approach and includes -% all appendix floats within the body of the relevant appendix. This -% also has the advantage of making appendices more readable. -% % Because the 7th Edition requires figure captions to be printed on % the same page as their respective figures, there are no more Figure % Captions pages. % % \subsection{Author Note} -% According to 7th Edition guidelines, Author Notes are placed on the -% title page of manuscripts. +% According to 7th Edition guidelines, Author Notes are now placed "in the bottom half of the title page" on the +% title page of manuscripts per the style guide. % % \section{Features} -% In addition to providing compatibility with the 7th Edition of the -% \textit{Manual}, several features have been implemented. +% The featured implemented in the |apa6| have been included in the |apa7| class for the 7th Edition of the +% \textit{Manual}. % % \subsection{Masked References} % \label{sec:masking} @@ -692,7 +679,7 @@ and the derived files apa7.ins, % \DescribeMacro{floatsintext}|floatsintext| option (specified in the % |\documentclass| line) will integrate tables and figures % approximately where they are mentioned in the text. This is -% available only with the |man| option, of course, because the other +% available only with the |man| and |stu| options, of course, because the other % formats already have floats integrated with the text. % % \subsection{User-defined Font Size} @@ -715,7 +702,7 @@ and the derived files apa7.ins, % \subsection{Flexible Bibliographies} % The \textsf{apa7} class supports three bibliography packages: % \textsf{biblatex}, \textsf{apacite}, and \textsf{natbib}. \\ \\ -% At this time, only biblatex is updated to support the 7th edition of APA style for citations and references. +% At this time, only \textsf{biblatex} is updated to support the 7th edition of APA style for citations and references. % % \subsubsection{\textsf{biblatex}} % \label{sec:biblatexinfo} @@ -758,6 +745,28 @@ and the derived files apa7.ins, % label can be localized by modifying the appropriate configuration % file (in the `config' folder of the \textsf{apa7} installation). % +% \subsection{Float Placement} +% The 7th Edition (as did the 6th Edition) requires +% that tables and figures (in that order) be placed after the +% references but before the appendices. This creates a bit of a +% conundrum as to what should happen with tables or figures that are +% ultimately typeset within an appendix. The choices we are left with +% are to place appendix floats (a) along with the floats from the main +% part of the manuscript, which would mean that appendix floats appear +% prior to the point at which they are mentioned; (b) within the +% appendices themselves, which is not consistent with how floats in +% the main part of the manuscript are handled; or (c) in a separate +% float section that follows the appendices, which results in two +% float sections. Obviously none of these choices is satisfactory, so +% Brian Beitzel (author of |apa6| package) posed the question to APA's Style Expert. The style expert responded that at +% least for APA's journals ``it doesn't matter whether appendix tables +% are submitted with text tables or separately, as long as they are +% numbered correctly (e.g., Table A1, Table B1, etc.)'' (J.\ +% Hume-Pratuch, personal communication, June 15, 2011). Therefore, +% \textsf{apa7} takes the same approach as \textsf{apa6}: the most straightforward approach that includes +% all appendix floats within the body of the relevant appendix. This +% also has the advantage of making appendices more readable. +% % \section{Dependencies} % \textsf{apa7} automatically loads the following packages. If these % packages are not already installed, producing the first @@ -836,7 +845,7 @@ and the derived files apa7.ins, \author{Daniel A. Weiss} \affiliation{A University Somewhere} - \leftheader{Beitzel} + \leftheader{Weiss} \abstract{This demonstration paper uses the \textsf{apa7} \LaTeX\ class to format the document in compliance with the 7th Edition of @@ -951,25 +960,25 @@ and the derived files apa7.ins, % % apa7 class was built % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% apa.cls version 1.3.4 +% apa6 version 2.33 % -% NOTE CHANGE IN VERSION NUMBERING : 1.21--1.28 should have been 1.2.1--1.2.8 +% apa6 - A LaTeX class for formatting documents in compliance with the +% American Psychological Association's Publication Manual, 6th edition % -% Athanassios Protopapas, December 2008 -% protopap@ilsp.gr +% Copyright (C) 2011-2017 by Brian D. Beitzel <brian at beitzel.com> % -% This package may be distributed under the terms of the LaTeX Project Public -% License, as described in lppl.txt in the base LaTeX distribution. Either -% version 1.0 or, at your option, any later version. +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License (LPPL), either +% version 1.3c of this license or (at your option) any later +% version. The latest version of this license is in the file: % -% The term "package", in the above license statement, applies to all files -% included with apa.cls (language files, examples, configuration, -% instructions etc.) -- they may be all distributed under LPPL. +% http://www.latex-project.org/lppl.txt % -% Use with LaTeX2e, \documentclass[man|jou|doc]{apa} -% Default mode is doc. Conforms to the APA manual 5th ed. +% Users may freely modify these files without permission, as long as the +% copyright line and this statement are maintained intact. % -% ** Read apacls.txt and examples.txt carefully before using ** +% This work is not endorsed by, affiliated with, or probably even known +% by, the American Psychological Association. % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1387,9 +1396,9 @@ and the derived files apa7.ins, % last in the definition list, whether or not the babel % package is loaded by the current document - \@ifundefined{def@babel}% this is defined only if the user requested loading babel - {\def\@apaSeven@langfile{config/APAamerican.txt}} - {\def\@apaSeven@langfile{config/APA\languagename.txt}} +\@ifpackageloaded{babel}% this is defined only if the user requested loading babel + {\def\@apaSeven@langfile{config/APA7\languagename.txt}} + {\def\@apaSeven@langfile{config/APA7american.txt}} \InputIfFileExists{\@apaSeven@langfile}{}{% \ClassInfo{apa7}{Language definition file \@apaSeven@langfile\space not found} }% @@ -3733,10 +3742,10 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] % % %%%%%%%%%%% CONFIGURATION FILES %%%%%%%%%%%% % -%\begin{macro}{APAamerican.txt} +%\begin{macro}{APA7american.txt} % \begin{macrocode} %<*american> -\ProvidesFile{APAamerican.txt}[2012/02/23 v1.25 apa7 configuration for American English] +\ProvidesFile{APA7american.txt}[2019/12/29 v1.00 apa7 configuration for American English] \renewcommand{\acksname}{Author Note} \renewcommand{\keywordname}{Keywords} @@ -3748,10 +3757,10 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] %\end{macro} % % -%\begin{macro}{APAbritish.txt} +%\begin{macro}{APA7british.txt} % \begin{macrocode} %<*british> -\ProvidesFile{APAbritish.txt}[2012/02/23 v1.25 apa7 configuration for British English] +\ProvidesFile{APA7british.txt}[2019/12/29 v1.00 apa7 configuration for British English] \renewcommand{\acksname}{Author Note} \renewcommand{\keywordname}{Keywords} @@ -3763,10 +3772,10 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] %\end{macro} % % -%\begin{macro}{APAenglish.txt} +%\begin{macro}{APA7english.txt} % \begin{macrocode} %<*english> -\ProvidesFile{APAenglish.txt}[2012/02/23 v1.25 apa7 configuration for non-American English] +\ProvidesFile{APA7english.txt}[2019/12/29 v1.00 apa7 configuration for non-American English] \renewcommand{\acksname}{Author Note} \renewcommand{\keywordname}{Keywords} @@ -3776,10 +3785,10 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] % \end{macrocode} %\end{macro} % -%\begin{macro}{APAdutch.txt} +%\begin{macro}{APA7dutch.txt} % \begin{macrocode} %<*dutch> -\ProvidesFile{APAdutch.txt}[2012/02/23 v1.25 apa7 configuration for Dutch] +\ProvidesFile{APA7dutch.txt}[2019/12/29 v1.00 apa7 configuration for Dutch] \renewcommand{\acksname}{Auteursnoot}% Author Note \renewcommand{\keywordname}{Trefwoorden}% Keywords @@ -3789,10 +3798,10 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] % \end{macrocode} %\end{macro} % -%\begin{macro}{APAgerman.txt} +%\begin{macro}{APA7german.txt} % \begin{macrocode} %<*german> -\ProvidesFile{APAgerman.txt}[2012/02/23 v1.25 apa7 configuration for German] +\ProvidesFile{APA7german.txt}[2019/12/29 v1.00 apa7 configuration for German] \renewcommand{\acksname}{Autorenhinweis}% Author Note \renewcommand{\keywordname}{Schl\"usselw\"orter}% Keywords @@ -3802,10 +3811,10 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] % \end{macrocode} %\end{macro} % -%\begin{macro}{APAngerman.txt} +%\begin{macro}{APA7ngerman.txt} % \begin{macrocode} %<*ngerman> -\ProvidesFile{APAgerman.txt}[2012/02/23 v1.25 apa7 configuration for "new" German] +\ProvidesFile{APA7german.txt}[2019/12/29 v1.00 apa7 configuration for "new" German] \renewcommand{\acksname}{Autorenhinweis}% Author Note \renewcommand{\keywordname}{Schl\"usselw\"orter}% Keywords @@ -3815,10 +3824,10 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] % \end{macrocode} %\end{macro} % -%\begin{macro}{APAgreek.txt} +%\begin{macro}{APA7greek.txt} % \begin{macrocode} %<*greek> -\ProvidesFile{APAgreek.txt}[2012/02/23 v1.25 apa7 configuration for Greek] +\ProvidesFile{APA7greek.txt}[2019/12/29 v1.00 apa7 configuration for Greek] \renewcommand{\acksname}{Shmei'wseis tou suggraf'ea}% Author Note \renewcommand{\keywordname}{L'exeis kleidi'a}% Keywords @@ -3828,10 +3837,10 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] % \end{macrocode} %\end{macro} % -%\begin{macro}{APAczech.txt} +%\begin{macro}{APA7czech.txt} % \begin{macrocode} %<*czech> -\ProvidesFile{APAczech.txt}[2012/02/23 v1.25 apa7 configuration for Czech] +\ProvidesFile{APA7czech.txt}[2019/12/29 v1.00 apa7 configuration for Czech] \renewcommand{\acksname}{Poznámka~autora}% Author Note \renewcommand{\keywordname}{KlÃcová~1slova}% Keywords @@ -3841,10 +3850,10 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] % \end{macrocode} %\end{macro} % -%\begin{macro}{APAturkish.txt} +%\begin{macro}{APA7turkish.txt} % \begin{macrocode} %<*turkish> -\ProvidesFile{APAturkish.txt}[2016/05/26 v2.2 apa7 configuration for Turkish] +\ProvidesFile{APA7turkish.txt}[2019/12/29 v1.00 apa7 configuration for Turkish] \renewcommand{\acksname}{Yazar Notu}% Author Note \renewcommand{\keywordname}{Anahtar Kelimeler}% Keywords @@ -3854,7 +3863,7 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] % \end{macrocode} %\end{macro} % -%\begin{macro}{APAendfloat.cfg} +%\begin{macro}{APA7endfloat.cfg} % \begin{macrocode} %<*APAendfloat> %% diff --git a/macros/latex/contrib/apa7/apa7.pdf b/macros/latex/contrib/apa7/apa7.pdf Binary files differindex ee6608e236..b334f6db64 100644 --- a/macros/latex/contrib/apa7/apa7.pdf +++ b/macros/latex/contrib/apa7/apa7.pdf diff --git a/macros/latex/contrib/apa7/config/APAamerican.txt b/macros/latex/contrib/apa7/config/APA7american.txt index d08442ba1b..e5bc6d9c36 100644 --- a/macros/latex/contrib/apa7/config/APAamerican.txt +++ b/macros/latex/contrib/apa7/config/APA7american.txt @@ -1,5 +1,5 @@ %% -%% This is file `./config/APAamerican.txt', +%% This is file `./config/APA7american.txt', %% generated with the docstrip utility. %% %% The original source files were: @@ -27,7 +27,7 @@ %% %% ---------------------------------------------------------------------- %% -\ProvidesFile{APAamerican.txt}[2012/02/23 v1.25 apa7 configuration for American English] +\ProvidesFile{APA7american.txt}[2019/12/29 v1.00 apa7 configuration for American English] \renewcommand{\acksname}{Author Note} \renewcommand{\keywordname}{Keywords} @@ -58,22 +58,20 @@ %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and %% bibliography.bib. %% %% -%% End of file `./config/APAamerican.txt'. +%% End of file `./config/APA7american.txt'. diff --git a/macros/latex/contrib/apa7/config/APAbritish.txt b/macros/latex/contrib/apa7/config/APA7british.txt index 6b4a835592..d0fcaab21e 100644 --- a/macros/latex/contrib/apa7/config/APAbritish.txt +++ b/macros/latex/contrib/apa7/config/APA7british.txt @@ -1,5 +1,5 @@ %% -%% This is file `./config/APAbritish.txt', +%% This is file `./config/APA7british.txt', %% generated with the docstrip utility. %% %% The original source files were: @@ -27,7 +27,7 @@ %% %% ---------------------------------------------------------------------- %% -\ProvidesFile{APAbritish.txt}[2012/02/23 v1.25 apa7 configuration for British English] +\ProvidesFile{APA7british.txt}[2019/12/29 v1.00 apa7 configuration for British English] \renewcommand{\acksname}{Author Note} \renewcommand{\keywordname}{Keywords} @@ -58,22 +58,20 @@ %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and %% bibliography.bib. %% %% -%% End of file `./config/APAbritish.txt'. +%% End of file `./config/APA7british.txt'. diff --git a/macros/latex/contrib/apa7/config/APAczech.txt b/macros/latex/contrib/apa7/config/APA7czech.txt index 7f97c94a80..0704f8f171 100644 --- a/macros/latex/contrib/apa7/config/APAczech.txt +++ b/macros/latex/contrib/apa7/config/APA7czech.txt @@ -1,5 +1,5 @@ %% -%% This is file `./config/APAczech.txt', +%% This is file `./config/APA7czech.txt', %% generated with the docstrip utility. %% %% The original source files were: @@ -27,7 +27,7 @@ %% %% ---------------------------------------------------------------------- %% -\ProvidesFile{APAczech.txt}[2012/02/23 v1.25 apa7 configuration for Czech] +\ProvidesFile{APA7czech.txt}[2019/12/29 v1.00 apa7 configuration for Czech] \renewcommand{\acksname}{Poznámka~autora}% Author Note \renewcommand{\keywordname}{KlÃcová~1slova}% Keywords @@ -58,22 +58,20 @@ %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and %% bibliography.bib. %% %% -%% End of file `./config/APAczech.txt'. +%% End of file `./config/APA7czech.txt'. diff --git a/macros/latex/contrib/apa7/config/APAdutch.txt b/macros/latex/contrib/apa7/config/APA7dutch.txt index 1549f7a5c2..c7817997cc 100644 --- a/macros/latex/contrib/apa7/config/APAdutch.txt +++ b/macros/latex/contrib/apa7/config/APA7dutch.txt @@ -1,5 +1,5 @@ %% -%% This is file `./config/APAdutch.txt', +%% This is file `./config/APA7dutch.txt', %% generated with the docstrip utility. %% %% The original source files were: @@ -27,7 +27,7 @@ %% %% ---------------------------------------------------------------------- %% -\ProvidesFile{APAdutch.txt}[2012/02/23 v1.25 apa7 configuration for Dutch] +\ProvidesFile{APA7dutch.txt}[2019/12/29 v1.00 apa7 configuration for Dutch] \renewcommand{\acksname}{Auteursnoot}% Author Note \renewcommand{\keywordname}{Trefwoorden}% Keywords @@ -58,22 +58,20 @@ %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and %% bibliography.bib. %% %% -%% End of file `./config/APAdutch.txt'. +%% End of file `./config/APA7dutch.txt'. diff --git a/macros/latex/contrib/apa7/config/APAendfloat.cfg b/macros/latex/contrib/apa7/config/APA7endfloat.cfg index 39c6ffc777..802cfe52db 100644 --- a/macros/latex/contrib/apa7/config/APAendfloat.cfg +++ b/macros/latex/contrib/apa7/config/APA7endfloat.cfg @@ -1,5 +1,5 @@ %% -%% This is file `./config/APAendfloat.cfg', +%% This is file `./config/APA7endfloat.cfg', %% generated with the docstrip utility. %% %% The original source files were: @@ -123,22 +123,20 @@ %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and %% bibliography.bib. %% %% -%% End of file `./config/APAendfloat.cfg'. +%% End of file `./config/APA7endfloat.cfg'. diff --git a/macros/latex/contrib/apa7/config/APAenglish.txt b/macros/latex/contrib/apa7/config/APA7english.txt index 421fae43d8..f70dfdd920 100644 --- a/macros/latex/contrib/apa7/config/APAenglish.txt +++ b/macros/latex/contrib/apa7/config/APA7english.txt @@ -1,5 +1,5 @@ %% -%% This is file `./config/APAenglish.txt', +%% This is file `./config/APA7english.txt', %% generated with the docstrip utility. %% %% The original source files were: @@ -27,7 +27,7 @@ %% %% ---------------------------------------------------------------------- %% -\ProvidesFile{APAenglish.txt}[2012/02/23 v1.25 apa7 configuration for non-American English] +\ProvidesFile{APA7english.txt}[2019/12/29 v1.00 apa7 configuration for non-American English] \renewcommand{\acksname}{Author Note} \renewcommand{\keywordname}{Keywords} @@ -58,22 +58,20 @@ %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and %% bibliography.bib. %% %% -%% End of file `./config/APAenglish.txt'. +%% End of file `./config/APA7english.txt'. diff --git a/macros/latex/contrib/apa7/config/APAgerman.txt b/macros/latex/contrib/apa7/config/APA7german.txt index 82eed3cbe1..0cf23f4564 100644 --- a/macros/latex/contrib/apa7/config/APAgerman.txt +++ b/macros/latex/contrib/apa7/config/APA7german.txt @@ -1,5 +1,5 @@ %% -%% This is file `./config/APAgerman.txt', +%% This is file `./config/APA7german.txt', %% generated with the docstrip utility. %% %% The original source files were: @@ -27,7 +27,7 @@ %% %% ---------------------------------------------------------------------- %% -\ProvidesFile{APAgerman.txt}[2012/02/23 v1.25 apa7 configuration for German] +\ProvidesFile{APA7german.txt}[2019/12/29 v1.00 apa7 configuration for German] \renewcommand{\acksname}{Autorenhinweis}% Author Note \renewcommand{\keywordname}{Schl\"usselw\"orter}% Keywords @@ -58,22 +58,20 @@ %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and %% bibliography.bib. %% %% -%% End of file `./config/APAgerman.txt'. +%% End of file `./config/APA7german.txt'. diff --git a/macros/latex/contrib/apa7/config/APAgreek.txt b/macros/latex/contrib/apa7/config/APA7greek.txt index 6259d8f4e9..c61343ee15 100644 --- a/macros/latex/contrib/apa7/config/APAgreek.txt +++ b/macros/latex/contrib/apa7/config/APA7greek.txt @@ -1,5 +1,5 @@ %% -%% This is file `./config/APAgreek.txt', +%% This is file `./config/APA7greek.txt', %% generated with the docstrip utility. %% %% The original source files were: @@ -27,7 +27,7 @@ %% %% ---------------------------------------------------------------------- %% -\ProvidesFile{APAgreek.txt}[2012/02/23 v1.25 apa7 configuration for Greek] +\ProvidesFile{APA7greek.txt}[2019/12/29 v1.00 apa7 configuration for Greek] \renewcommand{\acksname}{Shmei'wseis tou suggraf'ea}% Author Note \renewcommand{\keywordname}{L'exeis kleidi'a}% Keywords @@ -58,22 +58,20 @@ %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and %% bibliography.bib. %% %% -%% End of file `./config/APAgreek.txt'. +%% End of file `./config/APA7greek.txt'. diff --git a/macros/latex/contrib/apa7/config/APAngerman.txt b/macros/latex/contrib/apa7/config/APA7ngerman.txt index 1ce7e2478c..52cbfe3d5f 100644 --- a/macros/latex/contrib/apa7/config/APAngerman.txt +++ b/macros/latex/contrib/apa7/config/APA7ngerman.txt @@ -1,5 +1,5 @@ %% -%% This is file `./config/APAngerman.txt', +%% This is file `./config/APA7ngerman.txt', %% generated with the docstrip utility. %% %% The original source files were: @@ -27,7 +27,7 @@ %% %% ---------------------------------------------------------------------- %% -\ProvidesFile{APAgerman.txt}[2012/02/23 v1.25 apa7 configuration for "new" German] +\ProvidesFile{APA7german.txt}[2019/12/29 v1.00 apa7 configuration for "new" German] \renewcommand{\acksname}{Autorenhinweis}% Author Note \renewcommand{\keywordname}{Schl\"usselw\"orter}% Keywords @@ -58,22 +58,20 @@ %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and %% bibliography.bib. %% %% -%% End of file `./config/APAngerman.txt'. +%% End of file `./config/APA7ngerman.txt'. diff --git a/macros/latex/contrib/apa7/config/APAturkish.txt b/macros/latex/contrib/apa7/config/APA7turkish.txt index 348a13c3e2..c689591739 100644 --- a/macros/latex/contrib/apa7/config/APAturkish.txt +++ b/macros/latex/contrib/apa7/config/APA7turkish.txt @@ -1,5 +1,5 @@ %% -%% This is file `./config/APAturkish.txt', +%% This is file `./config/APA7turkish.txt', %% generated with the docstrip utility. %% %% The original source files were: @@ -27,7 +27,7 @@ %% %% ---------------------------------------------------------------------- %% -\ProvidesFile{APAturkish.txt}[2016/05/26 v2.2 apa7 configuration for Turkish] +\ProvidesFile{APA7turkish.txt}[2019/12/29 v1.00 apa7 configuration for Turkish] \renewcommand{\acksname}{Yazar Notu}% Author Note \renewcommand{\keywordname}{Anahtar Kelimeler}% Keywords @@ -58,22 +58,20 @@ %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and %% bibliography.bib. %% %% -%% End of file `./config/APAturkish.txt'. +%% End of file `./config/APA7turkish.txt'. diff --git a/macros/latex/contrib/apa7/samples/bibliography.bib b/macros/latex/contrib/apa7/samples/bibliography.bib index e94ede5700..9c27070e82 100644 --- a/macros/latex/contrib/apa7/samples/bibliography.bib +++ b/macros/latex/contrib/apa7/samples/bibliography.bib @@ -214,18 +214,16 @@ the design of multimedia instruction}, %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and diff --git a/macros/latex/contrib/apa7/samples/longsample.pdf b/macros/latex/contrib/apa7/samples/longsample.pdf Binary files differindex 1af9d9eebc..331640c4ac 100644 --- a/macros/latex/contrib/apa7/samples/longsample.pdf +++ b/macros/latex/contrib/apa7/samples/longsample.pdf diff --git a/macros/latex/contrib/apa7/samples/longsample.tex b/macros/latex/contrib/apa7/samples/longsample.tex index d2d720db36..960d53823a 100644 --- a/macros/latex/contrib/apa7/samples/longsample.tex +++ b/macros/latex/contrib/apa7/samples/longsample.tex @@ -208,18 +208,16 @@ The detailed results are shown in Table~\ref{tab:DeckedTable}. \lipsum[22] %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and diff --git a/macros/latex/contrib/apa7/samples/shortsample.pdf b/macros/latex/contrib/apa7/samples/shortsample.pdf Binary files differindex 55900e2ff5..86bd2a0488 100644 --- a/macros/latex/contrib/apa7/samples/shortsample.pdf +++ b/macros/latex/contrib/apa7/samples/shortsample.pdf diff --git a/macros/latex/contrib/apa7/samples/shortsample.tex b/macros/latex/contrib/apa7/samples/shortsample.tex index 8c66b9c8dd..d4fdf3f533 100644 --- a/macros/latex/contrib/apa7/samples/shortsample.tex +++ b/macros/latex/contrib/apa7/samples/shortsample.tex @@ -156,18 +156,16 @@ skill in interpreting the results for the masses. %% apa7.cls, %% apa7.pdf, %% README, -%% APAamerican.txt, -%% APAbritish.txt, -%% APAdutch.txt, -%% APAenglish.txt, -%% APAgerman.txt, -%% APAngerman.txt, -%% APAgreek.txt, -%% APAczech.txt, -%% APAturkish.txt, -%% APAendfloat.cfg, -%% apa7.ptex, -%% TeX2WordForapa7.bas, +%% APA7american.txt, +%% APA7british.txt, +%% APA7dutch.txt, +%% APA7english.txt, +%% APA7german.txt, +%% APA7ngerman.txt, +%% APA7greek.txt, +%% APA7czech.txt, +%% APA7turkish.txt, +%% APA7endfloat.cfg, %% Figure1.pdf, %% shortsample.tex, %% longsample.tex, and diff --git a/macros/latex/contrib/ran_toks/README.md b/macros/latex/contrib/ran_toks/README.md index 6e47bf5109..c4c67686b7 100644 --- a/macros/latex/contrib/ran_toks/README.md +++ b/macros/latex/contrib/ran_toks/README.md @@ -1,6 +1,6 @@ The ran_toks Package Author: D. P. Story -Dated: 2017/05/04 +Dated: 2019-12-28 This short package, with minimal requirements, defines macros for randomizing a list of tokens. There are two approaches: @@ -40,6 +40,9 @@ tokens in the myList list. For users of AeB or eqexam, the latter structure can be used to randomize the order of the questions on a quiz or exam. +What's New (2019-12-28 ) Defined \rtVWHook to insert at the top of the +rtVW environment. Also created an alternate package name of ran-toks. + What's new in v1.1: Added the convenience command \useTheseDBs to input files for an application to constructing exams (using eqexam) from a series of DB files. Refer to the new demo file mc-db.tex. diff --git a/macros/latex/contrib/ran_toks/docs/ran_toks.pdf b/macros/latex/contrib/ran_toks/docs/ran_toks.pdf Binary files differnew file mode 100644 index 0000000000..8896ea676c --- /dev/null +++ b/macros/latex/contrib/ran_toks/docs/ran_toks.pdf diff --git a/macros/latex/contrib/ran_toks/doc/rantoks_man.pdf b/macros/latex/contrib/ran_toks/docs/rantoks_man.pdf Binary files differindex 66c8f3cbfd..8d7c1e06e9 100644 --- a/macros/latex/contrib/ran_toks/doc/rantoks_man.pdf +++ b/macros/latex/contrib/ran_toks/docs/rantoks_man.pdf diff --git a/macros/latex/contrib/ran_toks/doc/rantoks_man.tex b/macros/latex/contrib/ran_toks/docs/rantoks_man.tex index 2776e3863d..c17c9e9a7e 100644 --- a/macros/latex/contrib/ran_toks/doc/rantoks_man.tex +++ b/macros/latex/contrib/ran_toks/docs/rantoks_man.tex @@ -72,7 +72,7 @@ email={dpstory@acrotex.net}, subject=Documentation for the ran\_toks package, talksite={\url{www.acrotex.net}}, - version={1.1}, + version={1.2, 2019/12/28}, Keywords={LaTeX,PDF,random, tokens, JavaScript,Adobe Acrobat}, copyrightStatus=True, copyrightNotice={Copyright (C) \the\year, D. P. Story}, @@ -353,6 +353,12 @@ are written to the computer hard drive and saved under a different name (based on the parameter \meta{name}). Later, using the \cs{useRanTok} commands, they are input back into the document in a random order. +The \env{rtWVW} environment also writes the command +\cs{RTVWHook}\marginpar{\small\itshape\flushright\cs{RTVWHook}} to the top of +the file. Its initial value is \cs{relax}. It can be redefined using the convenience +command \cs{rtVWHook\darg{\ameta{arg}}}, which expands to +\verb|\def\RTVWHook{|\ameta{arg}\verb|}|. + The use of \cs{useRTName} and \cs{useRanTok} were explained and illustrated in the previous section. Let's go to the examples, \begin{Verbatim}[xleftmargin=\amtIndent] diff --git a/macros/latex/contrib/ran_toks/examples/mc-db.tex b/macros/latex/contrib/ran_toks/examples/mc-db.tex index 0e8ceab7b7..1eb2ce548a 100644 --- a/macros/latex/contrib/ran_toks/examples/mc-db.tex +++ b/macros/latex/contrib/ran_toks/examples/mc-db.tex @@ -34,7 +34,7 @@ Solve each without error. Passing is 100\%. \medskip\noindent -This part demonstrates how to not only randomly pull problems (two from each of the DB files) at random, but +This part demonstrates how to not only randomly pull problems (two from each of the DB files), but to randomize the order they are listed in the exam. \end{instructions} diff --git a/macros/latex/contrib/ran_toks/ran_toks.dtx b/macros/latex/contrib/ran_toks/ran_toks.dtx index 0a36c48614..89aafdc826 100644 --- a/macros/latex/contrib/ran_toks/ran_toks.dtx +++ b/macros/latex/contrib/ran_toks/ran_toks.dtx @@ -3,9 +3,9 @@ % makeindex -s gind.ist -o ran_toks.ind ran_toks.idx %<*copyright> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Web package, %% -%% Copyright (C) 1999-2017 D. P. Story %% -%% dpstory@uakron.edu %% +%% ran_toks package, %% +%% Copyright (C) 1999-2019 D. P. Story %% +%% dpstory@uakron.edu, dpstory@acrotex.net %% %% %% %% This program can redistributed and/or modified under %% %% the terms of the LaTeX Project Public License %% @@ -16,7 +16,7 @@ %</copyright> %<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01] %<package>\ProvidesPackage{ran_toks} -%<package> [2017/05/04 v1.1 Randomizing tokens (dps)] +%<package> [2019/12/28 v1.2 Randomizing tokens (dps)] %<*driver> \documentclass{ltxdoc} \usepackage[colorlinks,hyperindex=false]{hyperref} @@ -120,7 +120,7 @@ % We redefine \cs{nextrandom} from \texttt{random.tex} to save the initializing seed. % \begin{macrocode} \def\nextrandom{\begingroup - \ifnum\randomi<\@ne % then initialize with time + \ifnum\randomi<\@ne % then initialize with time \global\randomi\time \global\multiply\randomi388 \global\advance\randomi\year \global\multiply\randomi31 \global\advance\randomi\day @@ -163,7 +163,27 @@ % \begin{macrocode} \def\rt@nameedef#1{\expandafter\edef\csname #1\endcsname} % \end{macrocode} +% \begin{macrocode} +%</package> +%<*altpkgname> +% \end{macrocode} % +% \section{Alternate package name: \texorpdfstring{\protect\pkg{ran-toks}}{ran-toks}} +% CTAN lists this package (\pkg{ran\_toks}) as \pkg{ran-toks}, so we'll create +% a dummy package by that name. +% \changes{v1.2}{2019/12/28}{Added dummy package \string\pkg{ran-toks}} +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{ran-toks} + [2019/12/28 v1.0 ran-toks Alt-name (dps)] +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{ran_toks}} +\ProcessOptions +\RequirePackage{ran_toks}[2019/12/28] +% \end{macrocode} +% \begin{macrocode} +%</altpkgname> +%<*package> +% \end{macrocode} % \section{Commands for controlling the process} % % \DescribeMacro{\ranToksOn}\DescribeMacro{\ranToksOff} These two turn on and turn off @@ -186,23 +206,23 @@ \def\useLastAsSeed{\rt@useLastAsSeed} \@onlypreamble\useLastAsSeed \def\rt@useLastAsSeed{% - \IfFileExists{\jobname_rt.sav}{% - \PackageInfo{ran_toks}{Inputting \jobname_rt.sav}% - \@ifundefined{readsavfile}{\newread\readsavfile}{}% - \openin\readsavfile=\jobname_rt.sav - \read\readsavfile to \InitSeedValue - \read\readsavfile to \lastRandomNum - \closein\readsavfile - \randomi=\lastRandomNum + \IfFileExists{\jobname_rt.sav}{% + \PackageInfo{ran_toks}{Inputting \jobname_rt.sav}% + \@ifundefined{readsavfile}{\newread\readsavfile}{}% + \openin\readsavfile=\jobname_rt.sav + \read\readsavfile to \InitSeedValue + \read\readsavfile to \lastRandomNum + \closein\readsavfile + \randomi=\lastRandomNum % \end{macrocode} % When \cs{useLastAsSeed}, the last becomes the first. % \begin{macrocode} \xdef\InitSeedValue{\the\randomi} - }{% - \PackageInfo{ran_toks}{\jobname_rt.sav cannot - be found, \MessageBreak - using the random initializer}% - }% + }{% + \PackageInfo{ran_toks}{\jobname_rt.sav cannot + be found, \MessageBreak + using the random initializer}% + }% } \@ifundefined{aeb@randomizeChoices}{% \let\inputRandomSeed\useLastAsSeed @@ -214,12 +234,12 @@ % A standard \cs{verbatim} write used in exerquiz and other package in the AeB family. % \begin{macrocode} \def\verbatimwrite{\@bsphack - \let\do\@makeother\dospecials - \catcode`\^^M\active \catcode`\^^I=12 - \def\verbatim@processline{% - \immediate\write\verbatim@out - {\the\verbatim@line}}% - \verbatim@start} + \let\do\@makeother\dospecials + \catcode`\^^M\active \catcode`\^^I=12 + \def\verbatim@processline{% + \immediate\write\verbatim@out + {\the\verbatim@line}}% + \verbatim@start} \def\endverbatimwrite{\@esphack} \def\rt@IWVO{\immediate\write\verbatim@out} % \end{macrocode} @@ -227,15 +247,15 @@ % \begin{macrocode} \def\InitSeedValue{\the\randomi} \def\rt@writeSeedData{\ifsaveseed - \@ifundefined{saveseedinfo}{\newwrite\saveseedinfo}{} - \immediate\openout \saveseedinfo \jobname_rt.sav - \let\verbatim@out\saveseedinfo - \def\rt@msgi{initializing seed value}% - \def\rt@msgii{last random number used}% - \uccode`c=`\%\uppercase{% - \rt@IWVO{\InitSeedValue\space c \rt@msgi}% - \rt@IWVO{\the\randomi\space c \rt@msgii}}\immediate - \closeout\saveseedinfo\fi} + \@ifundefined{saveseedinfo}{\newwrite\saveseedinfo}{} + \immediate\openout \saveseedinfo \jobname_rt.sav + \let\verbatim@out\saveseedinfo + \def\rt@msgi{initializing seed value}% + \def\rt@msgii{last random number used}% + \uccode`c=`\%\uppercase{% + \rt@IWVO{\InitSeedValue\space c \rt@msgi}% + \rt@IWVO{\the\randomi\space c \rt@msgii}}\immediate + \closeout\saveseedinfo\fi} % \end{macrocode} % Save the initial seed value to hard drive. % \begin{macrocode} @@ -248,9 +268,9 @@ % randomly permuted by \cs{rt@RandomizeList}. % \begin{macrocode} \def\rt@populateList#1{\rt@listIn={}\rt@nCnt\z@ - \@whilenum\rt@nCnt<#1\do{\advance\rt@nCnt\@ne - \edef\rt@listInHold{\the\rt@listIn\noexpand\\{\the\rt@nCnt}}% - \rt@listIn=\expandafter{\rt@listInHold}}} + \@whilenum\rt@nCnt<#1\do{\advance\rt@nCnt\@ne + \edef\rt@listInHold{\the\rt@listIn\noexpand\\{\the\rt@nCnt}}% + \rt@listIn=\expandafter{\rt@listInHold}}} % \end{macrocode} % \DescribeMacro{\rt@RandomizeList}\hskip-\marginparsep\thinspace|{|\ameta{n}|}| % is the command that gets the process of randomizing @@ -259,17 +279,17 @@ % calls \cs{rt@randomizeList} to actually do the work. % \begin{macrocode} \def\rt@RandomizeList#1{\global - \rt@listIn={}\global\rt@newListIn={}\global\rt@listOut={}% - \rt@nMax=#1\relax\rt@populateList{\the\rt@nMax}% - \ifwerandomize - \expandafter\rt@randomizeList\else - \global\rt@listOut=\expandafter{\the\rt@listIn}\fi + \rt@listIn={}\global\rt@newListIn={}\global\rt@listOut={}% + \rt@nMax=#1\relax\rt@populateList{\the\rt@nMax}% + \ifwerandomize + \expandafter\rt@randomizeList\else + \global\rt@listOut=\expandafter{\the\rt@listIn}\fi % \end{macrocode} % Save the list out as \cs{rt@BaseName-List} for later retrieval. This is the randomized % list of integers for this base name. % \changes{v1.1}{2017/05/04}{Save out list for later use} % \begin{macrocode} - \global\rt@nameedef{\rt@BaseName-List}{\the\rt@listOut}} + \global\rt@nameedef{\rt@BaseName-List}{\the\rt@listOut}} % \end{macrocode} % \DescribeMacro{\rt@randomizeList} randomizes the list of consecutive integers, and leaves the % results, @@ -280,24 +300,24 @@ % \cs{rt@randomizeList} is a loop, looping between itself and \cs{rt@loopTest}. % \begin{macrocode} \def\rt@randomizeList{\let\\=\rt@processi - \setrannum{\rt@getRanNum}{1}{\the\rt@nMax}% + \setrannum{\rt@getRanNum}{1}{\the\rt@nMax}% \ifrtdebug\typeout{\string\rt@getRanNum=\the\rt@getRanNum}\fi - \rt@nCnt\z@ + \rt@nCnt\z@ \ifrtdebug\typeout{LISTING: \the\rt@listIn}\fi - \the\rt@listIn - \rt@loopTest + \the\rt@listIn + \rt@loopTest } \def\rt@loopTest{\advance\rt@nMax\m@ne - \ifnum\rt@nMax>\z@ - \def\rt@next{% - \rt@listIn=\expandafter{\the\rt@newListIn}% - \rt@newListIn={}\rt@randomizeList}% - \else - \let\rt@next\relax - \global\rt@listOut=\expandafter{\the\rt@listOut}% -\ifrtdebug\typeout{Final Result: \string\rt@listOut=\the\rt@listOut}\fi - \fi - \rt@next + \ifnum\rt@nMax>\z@ + \def\rt@next{% + \rt@listIn=\expandafter{\the\rt@newListIn}% + \rt@newListIn={}\rt@randomizeList}% + \else + \let\rt@next\relax + \global\rt@listOut=\expandafter{\the\rt@listOut}% + \ifrtdebug + \typeout{Final Result: \string\rt@listOut=\the\rt@listOut}\fi + \fi\rt@next } % \end{macrocode} % In \cs{rt@randomizeList}, we \verb~\let\\=\rt@processi~ before dumping the @@ -305,16 +325,16 @@ % is the random integer between 1 and \cs{rt@nMax}. % \begin{macrocode} \def\rt@processi#1{\advance\rt@nCnt\@ne - \ifnum\rt@nCnt=\rt@getRanNum - \edef\rt@listOutHold{\the\rt@listOut}% - \global\rt@listOut=\expandafter{\rt@listOutHold\\{#1}}% -\ifrtdebug\typeout{Found it: \string\\{#1}}% -\typeout{New \string\rt@listOut: \the\rt@listOut}\fi - \else - \edef\rt@listInHold{\the\rt@newListIn}% - \rt@newListIn=\expandafter{\rt@listInHold\\{#1}}% -\ifrtdebug\typeout{\string\rt@newListIn: \the\rt@newListIn}\fi - \fi + \ifnum\rt@nCnt=\rt@getRanNum + \edef\rt@listOutHold{\the\rt@listOut}% + \global\rt@listOut=\expandafter{\rt@listOutHold\\{#1}}% + \ifrtdebug\typeout{Found it: \string\\{#1}}% + \typeout{New \string\rt@listOut: \the\rt@listOut}\fi + \else + \edef\rt@listInHold{\the\rt@newListIn}% + \rt@newListIn=\expandafter{\rt@listInHold\\{#1}}% + \ifrtdebug\typeout{\string\rt@newListIn: \the\rt@newListIn}\fi + \fi } % \end{macrocode} % We perform modular arithmetic when the index of \cs{useRanTok} is too large. @@ -326,36 +346,36 @@ % This macro uses \cs{dimen0} and % \cs{dimen2}, so it should be called within a group. % \begin{macrocode} - \advance\count\z@\m@ne\divide\count\z@ #2\relax - \multiply\count\z@ #2\relax - \advance\count\tw@-\count\z@ - \edef\rt@mod{\the\count\tw@}} + \advance\count\z@\m@ne\divide\count\z@ #2\relax + \multiply\count\z@ #2\relax + \advance\count\tw@-\count\z@ + \edef\rt@mod{\the\count\tw@}} % \end{macrocode} % Warning messages, these are \DescribeMacro{\rt@badIndex}\cs{rt@badIndex} and % \cs{rt@badTokName}\DescribeMacro{\rt@badTokName}. % \begin{macrocode} \def\rt@badIndex#1#2{\PackageWarningNoLine{ran_toks} - {The argument of \string\useRanTok{#1} on line - \the\inputlineno\space is\MessageBreak + {The argument of \string\useRanTok{#1} on line + \the\inputlineno\space is\MessageBreak greater than \string\nToksFor{#2} (\nToksFor{#2}), - instead will use\MessageBreak + instead will use\MessageBreak \string\useRanTok{\rt@mod}, obtained from modular - arithmetic.\MessageBreak + arithmetic.\MessageBreak You might want to fix this} } \def\rt@badTokName#1{% - \PackageWarningNoLine{ran_toks} - {The token list `#1' on line \the\inputlineno\space - is undefined,\MessageBreak + \PackageWarningNoLine{ran_toks} + {The token list `#1' on line \the\inputlineno\space + is undefined,\MessageBreak possibly simply mispelled; check spelling.\MessageBreak If undefined, use \string\ranToks\space or \string\bRTVToks/% - \string\eRTVToks\space\MessageBreak + \string\eRTVToks\space\MessageBreak to define a list with the name `#1'}% } \def\rt@warnTokName#1{% - \PackageWarningNoLine{ran_toks} - {The token list `#1' on line \the\inputlineno\space - is already defined,\MessageBreak + \PackageWarningNoLine{ran_toks} + {The token list `#1' on line \the\inputlineno\space + is already defined,\MessageBreak will overwrite this list}% } % \end{macrocode} @@ -365,8 +385,8 @@ % The randomized listing can be accessed using \cs{useRanTok}. % \begin{macrocode} \def\ranToks#1{\begingroup - \useRTName{#1}% - \r@nToks + \useRTName{#1}% + \r@nToks } \long\def\r@nToks#1{\rt@nMax\z@\r@ndToks#1\rt@NIL} \def\rt@NIL{@nil} @@ -394,8 +414,8 @@ % \cs{r@nVToks}. % \begin{macrocode} \newcommand{\eRTVToks}{\global - \rt@nameedef{\rt@BaseName Cnt}{\the\rt@nCnt}% - \expandafter\r@nVToks\expandafter{\rt@BaseName}} + \rt@nameedef{\rt@BaseName Cnt}{\the\rt@nCnt}% + \expandafter\r@nVToks\expandafter{\rt@BaseName}} % \end{macrocode} % \end{macro} % \begin{environment}{rtVW} @@ -404,15 +424,24 @@ % the source file in a random way. % \begin{macrocode} \def\reVerbEnd{\ifhmode\unskip\fi} +% \end{macrocode} +% Insert the hook \cs{rtVWHook} prior to writing the verbatim content. +% The default is \cs{relax}. +% \changes{v1.2}{2019/12/28}{Defined \string\cs{rtVWHook}} +% \begin{macrocode} +\def\rtVWHook#1{\def\@rgi{#1}\ifx\@rgi\@empty + \let\RTVWHook\relax\else\def\RTVWHook{#1}\fi} +\rtVWHook{} \newenvironment{rtVW}{\global\advance\rt@nCnt\@ne - \immediate\openout\rt@Verb@write - \jobname_\rt@BaseName\the\rt@nCnt.cut - \let\verbatim@out\rt@Verb@write - \verbatimwrite + \immediate\openout\rt@Verb@write + \jobname_\rt@BaseName\the\rt@nCnt.cut + \let\verbatim@out\rt@Verb@write + \rt@IWVO{\string\RTVWHook}% + \verbatimwrite }{% - \endverbatimwrite - \immediate\write\rt@Verb@write{\string\reVerbEnd}% - \immediate\closeout\rt@Verb@write + \endverbatimwrite + \immediate\write\rt@Verb@write{\string\reVerbEnd}% + \immediate\closeout\rt@Verb@write } % \end{macrocode} % \end{environment} @@ -420,15 +449,15 @@ % environment. % \begin{macrocode} \def\r@nVToks#1{\begingroup - \gdef\rt@BaseName{#1}% - \expandafter\rt@nMax\@nameuse{#1Cnt}% - \rt@listIn={}\rt@nCnt=0\relax\let\rt@listInHold\@empty - \@whilenum\rt@nCnt<\rt@nMax\do{\advance\rt@nCnt\@ne - \edef\rt@listInHold{% - \the\rt@listIn{\noexpand\rt@inputVerb{#1\the\rt@nCnt}}}% - \rt@listIn=\expandafter{\rt@listInHold}}\ifrtdebug - \typeout{\string\r@nVToks: \the\rt@listIn}\fi - \expandafter\r@nToks\expandafter{\the\rt@listIn}} + \gdef\rt@BaseName{#1}% + \expandafter\rt@nMax\@nameuse{#1Cnt}% + \rt@listIn={}\rt@nCnt=0\relax\let\rt@listInHold\@empty + \@whilenum\rt@nCnt<\rt@nMax\do{\advance\rt@nCnt\@ne + \edef\rt@listInHold{% + \the\rt@listIn{\noexpand\rt@inputVerb{#1\the\rt@nCnt}}}% + \rt@listIn=\expandafter{\rt@listInHold}}\ifrtdebug + \typeout{\string\r@nVToks: \the\rt@listIn}\fi + \expandafter\r@nToks\expandafter{\the\rt@listIn}} \def\rt@inputVerb#1{\input{\jobname_#1.cut}} % \end{macrocode} % \DescribeMacro{\r@ndToks} is main looping command for \cs{ranToks} @@ -442,11 +471,11 @@ % \end{macrocode} % If the current argument is \cs{par}, we skip it % \begin{macrocode} - \ifx\rt@rgi\rt@PAR\def\rt@next{\r@ndToks}\else - \advance\rt@nMax\@ne - \global\@namedef{rtTok\the\rt@nMax\rt@BaseName}{#1}% - \def\rt@next{\@ifnextchar\rt@NIL - {\rt@endToks\@gobble}{\r@ndToks}}\fi\rt@next} + \ifx\rt@rgi\rt@PAR\def\rt@next{\r@ndToks}\else + \advance\rt@nMax\@ne + \global\@namedef{rtTok\the\rt@nMax\rt@BaseName}{#1}% + \def\rt@next{\@ifnextchar\rt@NIL + {\rt@endToks\@gobble}{\r@ndToks}}\fi\rt@next} % \end{macrocode} % \hskip-\marginparsep|{|\ameta{n}|}| The \DescribeMacro{\rt@performRanDefns}\cs{rt@performRanDefns} performs code that % is repeated in several other macros: \cs{rt@endToks}, \cs{reorderRanToks}, and @@ -457,12 +486,12 @@ % \end{macrocode} % Now we randomize the order of the integers 1, 2,\dots \texttt{\#1}. % \begin{macrocode} - \rt@RandomizeList{#1}\rt@nCnt\z@ + \rt@RandomizeList{#1}\rt@nCnt\z@ % \end{macrocode} % Now we randomize the definitions. We \verb!\let\\=\rt@ssign!, then % let loose the tokens! % \begin{macrocode} - \let\\\rt@ssign\the\rt@listOut} + \let\\\rt@ssign\the\rt@listOut} % \end{macrocode} % The final destination for \DescribeMacro{\rt@endToks}\cs{r@ndToks}. % \begin{macrocode} @@ -470,23 +499,23 @@ % \end{macrocode} % Save the number of tokens counted % \begin{macrocode} - \rt@nameedef{nMax4\rt@BaseName}{\the\rt@nMax}% - \rt@performRanDefns{\the\rt@nMax}\endgroup} + \rt@nameedef{nMax4\rt@BaseName}{\the\rt@nMax}% + \rt@performRanDefns{\the\rt@nMax}\endgroup} % \end{macrocode} % \begin{macro}{\reorderRanToks}\hskip-\marginparsep\,\texttt{\darg{\ameta{name}}} % The \cs{reorderRanToks} command reorders (or re-indexes) % the family with name \ameta{name} (\texttt{\#1}). % \begin{macrocode} \def\reorderRanToks#1{\begingroup\useRTName{#1}\expandafter - \ifx\csname nMax4#1\endcsname\relax + \ifx\csname nMax4#1\endcsname\relax % \end{macrocode} % Document author has not run \cs{ranToks} yet for this basename (\texttt{\#1}) % \begin{macrocode} - \rt@badTokName{#1}\else + \rt@badTokName{#1}\else % \end{macrocode} % Good to go. We reorder this list. % \begin{macrocode} - \rt@performRanDefns{\@nameuse{nMax4#1}}\fi + \rt@performRanDefns{\@nameuse{nMax4#1}}\fi \endgroup} % \end{macrocode} % \end{macro} @@ -496,33 +525,33 @@ % a randomization of the same list, without affecting the original order of \ameta{name1}. % \begin{macrocode} \newcommand\copyRanToks[2]{\begingroup\expandafter - \ifx\csname nMax4#1\endcsname\relax + \ifx\csname nMax4#1\endcsname\relax % \end{macrocode} % Source list is not defined % \begin{macrocode} \rt@badTokName{#1}% - \else\expandafter + \else\expandafter % \end{macrocode} % Source list is defined % \begin{macrocode} - \ifx\csname nMax4#2\endcsname\relax + \ifx\csname nMax4#2\endcsname\relax % \end{macrocode} % Destination list is not defined, which is good in this instance. This is % the case we copy the list. % \begin{macrocode} - \useRTName{#2}\global - \rt@nameedef{nMax4#2}{\@nameuse{nMax4#1}}% - \rt@nCnt=\csname nMax4#2\endcsname\relax - \@whilenum\rt@nCnt>\z@\do{\global - \rt@nameedef{rtTok\the\rt@nCnt#2}% - {\noexpand\@nameuse{rtTok\the\rt@nCnt#1}}% - \advance\rt@nCnt\m@ne}% - \rt@performRanDefns{\@nameuse{nMax4#2}}\else + \useRTName{#2}\global + \rt@nameedef{nMax4#2}{\@nameuse{nMax4#1}}% + \rt@nCnt=\csname nMax4#2\endcsname\relax + \@whilenum\rt@nCnt>\z@\do{\global + \rt@nameedef{rtTok\the\rt@nCnt#2}% + {\noexpand\@nameuse{rtTok\the\rt@nCnt#1}}% + \advance\rt@nCnt\m@ne}% + \rt@performRanDefns{\@nameuse{nMax4#2}}\else % \end{macrocode} % Destination list is defined already, warn the user. % \begin{macrocode} - \rt@warnTokName{#2}\fi - \fi + \rt@warnTokName{#2}\fi + \fi \endgroup} % \end{macrocode} % \end{macro} @@ -531,42 +560,42 @@ % contents of \verb!\the\rt@listOut!. % \begin{macrocode} \def\rt@ssign#1{\advance\rt@nCnt\@ne\global - \rt@nameedef{rtRanTok\the\rt@nCnt\rt@BaseName}{\noexpand - \@nameuse{rtTok#1\rt@BaseName}}} + \rt@nameedef{rtRanTok\the\rt@nCnt\rt@BaseName}{\noexpand + \@nameuse{rtTok#1\rt@BaseName}}} % \end{macrocode} % \subsection{Additional user access commands} % \DescribeMacro{\nToksFor}\hskip-\marginparsep\texttt{\darg{\ameta{name}}} % expands the the number of tokens whose name is \ameta{name} (\texttt{\#1}). % \begin{macrocode} \newcommand{\nToksFor}[1]{\expandafter - \ifx\csname nMax4#1\endcsname\relax - \textbf{??}\rt@badTokName{#1}\else - \@nameuse{nMax4#1}\fi} + \ifx\csname nMax4#1\endcsname\relax + \textbf{??}\rt@badTokName{#1}\else + \@nameuse{nMax4#1}\fi} % \end{macrocode} % \DescribeMacro{\rtTokByNum}\hskip-\marginparsep\texttt{[\ameta{name}]\darg{\ameta{num}}} is an internal macro, but it can be used publicly. % The argument of it is an integer, eg, \verb!\rtTokByNum{3}! is the third token, as listed in the order % given in the argument of \cs{ranToks}. % \begin{macrocode} \newcommand{\rtTokByNum}[2][\rt@BaseName]{\expandafter - \ifx\csname nMax4#1\endcsname\relax - \textbf{??}\rt@badTokName{#1}\else - \@nameuse{rtTok#2#1}\expandafter\ignorespaces\fi} + \ifx\csname nMax4#1\endcsname\relax + \textbf{??}\rt@badTokName{#1}\else + \@nameuse{rtTok#2#1}\expandafter\ignorespaces\fi} % \end{macrocode} %\DescribeMacro{\useRanTok}\hskip-\marginparsep\texttt{[\ameta{name}]\darg{\ameta{num}}} % After \cs{ranToks} has been executed, the user has access to the % randomized tokens through \cs{useRanTok}. The argument \ameta{num} is an integer 1 through max. % \begin{macrocode} \newcommand{\useRanTok}[2][\rt@BaseName]{\bgroup - \expandafter\ifx\csname nMax4#1\endcsname\relax - \rt@badTokName{#1}\else + \expandafter\ifx\csname nMax4#1\endcsname\relax + \rt@badTokName{#1}\else \ifnum#2>\nToksFor{#1}\rt@modarith{#2}{\nToksFor{#1}}% % \end{macrocode} % If index (\texttt{\#2}) is greater than array length, use modular arithmetic to resolve % the issue, and send a warning to the user. % \changes{v1.1}{2017/05/04}{Add modular arithmetic to resolve case where index is greater than length} % \begin{macrocode} - \rt@badIndex{#2}{#1}\@nameuse{rtRanTok\rt@mod#1}\else - \@nameuse{rtRanTok#2#1}\fi\fi\egroup} + \rt@badIndex{#2}{#1}\@nameuse{rtRanTok\rt@mod#1}\else + \@nameuse{rtRanTok#2#1}\fi\fi\egroup} % \end{macrocode} % \DescribeMacro{\displayListRandomly}\hskip-\marginparsep\texttt{[\ameta{prior}][\ameta{post}]\darg{\ameta{name}}} % lists all items in the list as passed @@ -578,11 +607,11 @@ %\changes{v1.1}{2017/05/04}{Added second optional argument to \string\cs{displayListRandomly}} % \begin{macrocode} \newcommand{\displayListRandomly}[1][]{\bgroup\def\rt@prior{#1}% - \displ@yListRandomly} + \displ@yListRandomly} \newcommand{\displ@yListRandomly}[2][]{\rt@nCnt\z@ - \expandafter\ifx\csname nMax4#2\endcsname\relax - \rt@rgi\space\textbf{??}\rt@badTokName{#2}#1% - \else + \expandafter\ifx\csname nMax4#2\endcsname\relax + \rt@rgi\space\textbf{??}\rt@badTokName{#2}#1% + \else % \end{macrocode} % Within the optional arguments, we define \DescribeMacro{\i}\cs{i}, % \DescribeMacro{\first}\cs{first}, \DescribeMacro{\last}\cs{last}, and @@ -590,22 +619,22 @@ % These four macro are defined locally and not available outside the command % \cs{displayListRandomly}. % \begin{macrocode} - \def\rt@post{#1}\useRTName{#2}\let\i\rt@nCnt - \def\first{1}\edef\last{\@nameuse{nMax4#2}}% - \@tempcnta\last \advance\@tempcnta\m@ne - \edef\lessone{\the\@tempcnta}% - \@whilenum\rt@nCnt<\last\advance\rt@nCnt\@ne - \do{\rt@prior\useRanTok{\the\rt@nCnt}\rt@post}% - \fi\egroup -} + \def\rt@post{#1}\useRTName{#2}\let\i\rt@nCnt + \def\first{1}\edef\last{\@nameuse{nMax4#2}}% + \@tempcnta\last \advance\@tempcnta\m@ne + \edef\lessone{\the\@tempcnta}% + \@whilenum\rt@nCnt<\last\advance\rt@nCnt\@ne + \do{\rt@prior\useRanTok{\the\rt@nCnt}\rt@post}% + \fi +\egroup} % \end{macrocode} % \section{Commands that support a DB application} % We begin with some utility commands to help parse the argument of \cs{useProbDBs}. % \begin{macrocode} \def\rt@gettonil#1\@nil{\def\to@nilarg{#1}} \def\rt@ifspc{\ifx\@let@token\@sptoken - \let\rt@next\rt@xifspc\else - \let\rt@next\rt@gettonil\fi\rt@next} + \let\rt@next\rt@xifspc\else + \let\rt@next\rt@gettonil\fi\rt@next} \begingroup \def\:{\rt@xifspc} \expandafter\gdef\: {\futurelet\@let@token\rt@ifspc} @@ -618,21 +647,21 @@ % in the preamble. Refer to the demo file \texttt{mc\_db.tex} for an illustration of its intended use. % \begin{macrocode} \def\ProbDBWarningMsg#1{\filename@parse{#1} - \PackageWarning{ran_toks} - {The file \filename@area\filename@base.\ifx\filename@ext\relax - tex\else\filename@ext\fi\space cannot be found}} + \PackageWarning{ran_toks} + {The file \filename@area\filename@base.\ifx\filename@ext\relax + tex\else\filename@ext\fi\space cannot be found}} \def\useTheseDBs#1{\def\rt@dblist{#1}\ifx\rt@dblist\@empty\else - \let\rt@DB@List\@empty - \edef\temp@expand{\noexpand\@for\noexpand\@@tmp:=\rt@dblist}% - \temp@expand\do{\ifx\@@tmp\@empty\else - \expandafter\rt@strpspcs\@@tmp\@nil\edef\@@tmp{\to@nilarg}% - \edef\rt@nextDB{\noexpand - \InputIfFileExists{\@@tmp}{}{\noexpand - \ProbDBWarningMsg{\@@tmp}}}% - \toks\tw@=\expandafter{\rt@DB@List}% - \toks@=\expandafter{\rt@nextDB}% - \edef\rt@DB@List{\the\toks\tw@\space\the\toks@}\fi - }\expandafter\rt@DB@List\fi} + \let\rt@DB@List\@empty + \edef\temp@expand{\noexpand\@for\noexpand\@@tmp:=\rt@dblist}% + \temp@expand\do{\ifx\@@tmp\@empty\else + \expandafter\rt@strpspcs\@@tmp\@nil\edef\@@tmp{\to@nilarg}% + \edef\rt@nextDB{\noexpand + \InputIfFileExists{\@@tmp}{}{\noexpand + \ProbDBWarningMsg{\@@tmp}}}% + \toks\tw@=\expandafter{\rt@DB@List}% + \toks@=\expandafter{\rt@nextDB}% + \edef\rt@DB@List{\the\toks\tw@\space\the\toks@}\fi + }\expandafter\rt@DB@List\fi} \let\useProbDBs\useTheseDBs % \end{macrocode} % \end{macro} diff --git a/macros/latex/contrib/ran_toks/ran_toks.ins b/macros/latex/contrib/ran_toks/ran_toks.ins new file mode 100644 index 0000000000..4d2d77d191 --- /dev/null +++ b/macros/latex/contrib/ran_toks/ran_toks.ins @@ -0,0 +1,60 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1999-2019 D. P. Story +%% +%% This file is part of the `AcroTeX eDucation Bundle'. +%% ------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{2019/12/28} +\def\batchfile{ran_toks.ins} +% +\input docstrip +\ifx\generate\undefined + \Msg{**********************************************} + \Msg{*} + \Msg{* This installation requires docstrip} + \Msg{* version 2.4 or later.} + \Msg{*} + \Msg{* An older version of docstrip has been input} + \Msg{*} + \Msg{**********************************************} + \errhelp{Move or rename old docstrip.tex and get a newer one.} + \errmessage{Old docstrip in input path} + \batchmode + \csname @@end\endcsname\end +\fi + +\keepsilent +\askforoverwritefalse +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\preamble +\endpreamble +\generate +{% + \file{ran_toks.sty}{\from{ran_toks.dtx}{copyright,package}} + \file{ran-toks.sty}{\from{ran_toks.dtx}{copyright,altpkgname}} +} + +\Msg{***************************************************************} +\Msg{*} +\Msg{* \space To finish the installation you have to copy the files } +\Msg{*} +\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX} +\Msg{*} +\Msg{***************************************************************} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput diff --git a/macros/latex/contrib/ran_toks/ran_toks.sty b/macros/latex/contrib/ran_toks/ran_toks.sty deleted file mode 100644 index f5f253e0b1..0000000000 --- a/macros/latex/contrib/ran_toks/ran_toks.sty +++ /dev/null @@ -1,302 +0,0 @@ -%% -%% This is file `ran_toks.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% ran_toks.dtx (with options: `copyright,package') -%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Web package, %% -%% Copyright (C) 1999-2017 D. P. Story %% -%% dpstory@uakron.edu %% -%% %% -%% This program can redistributed and/or modified under %% -%% the terms of the LaTeX Project Public License %% -%% Distributed from CTAN archives in directory %% -%% macros/latex/base/lppl.txt; either version 1 of the %% -%% License, or (at your option) any later version. %% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\NeedsTeXFormat{LaTeX2e}[1997/12/01] -\ProvidesPackage{ran_toks} - [2017/05/04 v1.1 Randomizing tokens (dps)] -\RequirePackage{verbatim} -\@ifundefined{nextrandom}{\input{random.tex}}{} -\def\nextrandom{\begingroup - \ifnum\randomi<\@ne % then initialize with time - \global\randomi\time - \global\multiply\randomi388 \global\advance\randomi\year - \global\multiply\randomi31 \global\advance\randomi\day - \global\multiply\randomi97 \global\advance\randomi\month - \message{Randomizer initialized to \the\randomi.}% - \nextrandom \nextrandom \nextrandom - \xdef\InitSeedValue{\the\randomi}% - \fi - \count@ii\randomi - \divide\count@ii 127773 % modulus = multiplier * 127773 + 2836 - \count@\count@ii - \multiply\count@ii 127773 - \global\advance\randomi-\count@ii % random mod 127773 - \global\multiply\randomi 16807 - \multiply\count@ 2836 - \global\advance\randomi-\count@ - \ifnum\randomi<\z@ \global\advance\randomi 2147483647\relax\fi - \endgroup -} -\newtoks\rt@listIn \rt@listIn={} -\newtoks\rt@newListIn \rt@newListIn={} -\newtoks\rt@listOut \rt@listOut={} -\newcount\rt@nMax -\newcount\rt@nCnt -\newcount\rt@getRanNum -\newif\ifrtdebug \rtdebugfalse -\newif\ifwerandomize \werandomizetrue -\newif\ifsaveseed\saveseedtrue -\newwrite\rt@Verb@write -\def\rt@nameedef#1{\expandafter\edef\csname #1\endcsname} -\def\ranToksOn{\werandomizetrue} -\def\ranToksOff{\werandomizefalse} -\def\useThisSeed#1{\saveseedfalse\randomi=#1} -\@onlypreamble\useThisSeed -\def\useLastAsSeed{\rt@useLastAsSeed} -\@onlypreamble\useLastAsSeed -\def\rt@useLastAsSeed{% - \IfFileExists{\jobname_rt.sav}{% - \PackageInfo{ran_toks}{Inputting \jobname_rt.sav}% - \@ifundefined{readsavfile}{\newread\readsavfile}{}% - \openin\readsavfile=\jobname_rt.sav - \read\readsavfile to \InitSeedValue - \read\readsavfile to \lastRandomNum - \closein\readsavfile - \randomi=\lastRandomNum - \xdef\InitSeedValue{\the\randomi} - }{% - \PackageInfo{ran_toks}{\jobname_rt.sav cannot - be found, \MessageBreak - using the random initializer}% - }% -} -\@ifundefined{aeb@randomizeChoices}{% - \let\inputRandomSeed\useLastAsSeed - \let\useRandomSeed\useThisSeed}{} -\def\verbatimwrite{\@bsphack - \let\do\@makeother\dospecials - \catcode`\^^M\active \catcode`\^^I=12 - \def\verbatim@processline{% - \immediate\write\verbatim@out - {\the\verbatim@line}}% - \verbatim@start} -\def\endverbatimwrite{\@esphack} -\def\rt@IWVO{\immediate\write\verbatim@out} -\def\InitSeedValue{\the\randomi} -\def\rt@writeSeedData{\ifsaveseed - \@ifundefined{saveseedinfo}{\newwrite\saveseedinfo}{} - \immediate\openout \saveseedinfo \jobname_rt.sav - \let\verbatim@out\saveseedinfo - \def\rt@msgi{initializing seed value}% - \def\rt@msgii{last random number used}% - \uccode`c=`\%\uppercase{% - \rt@IWVO{\InitSeedValue\space c \rt@msgi}% - \rt@IWVO{\the\randomi\space c \rt@msgii}}\immediate - \closeout\saveseedinfo\fi} -\AtEndDocument{\rt@writeSeedData}% -\def\rt@populateList#1{\rt@listIn={}\rt@nCnt\z@ - \@whilenum\rt@nCnt<#1\do{\advance\rt@nCnt\@ne - \edef\rt@listInHold{\the\rt@listIn\noexpand\\{\the\rt@nCnt}}% - \rt@listIn=\expandafter{\rt@listInHold}}} -\def\rt@RandomizeList#1{\global - \rt@listIn={}\global\rt@newListIn={}\global\rt@listOut={}% - \rt@nMax=#1\relax\rt@populateList{\the\rt@nMax}% - \ifwerandomize - \expandafter\rt@randomizeList\else - \global\rt@listOut=\expandafter{\the\rt@listIn}\fi - \global\rt@nameedef{\rt@BaseName-List}{\the\rt@listOut}} -\def\rt@randomizeList{\let\\=\rt@processi - \setrannum{\rt@getRanNum}{1}{\the\rt@nMax}% -\ifrtdebug\typeout{\string\rt@getRanNum=\the\rt@getRanNum}\fi - \rt@nCnt\z@ -\ifrtdebug\typeout{LISTING: \the\rt@listIn}\fi - \the\rt@listIn - \rt@loopTest -} -\def\rt@loopTest{\advance\rt@nMax\m@ne - \ifnum\rt@nMax>\z@ - \def\rt@next{% - \rt@listIn=\expandafter{\the\rt@newListIn}% - \rt@newListIn={}\rt@randomizeList}% - \else - \let\rt@next\relax - \global\rt@listOut=\expandafter{\the\rt@listOut}% -\ifrtdebug\typeout{Final Result: \string\rt@listOut=\the\rt@listOut}\fi - \fi - \rt@next -} -\def\rt@processi#1{\advance\rt@nCnt\@ne - \ifnum\rt@nCnt=\rt@getRanNum - \edef\rt@listOutHold{\the\rt@listOut}% - \global\rt@listOut=\expandafter{\rt@listOutHold\\{#1}}% -\ifrtdebug\typeout{Found it: \string\\{#1}}% -\typeout{New \string\rt@listOut: \the\rt@listOut}\fi - \else - \edef\rt@listInHold{\the\rt@newListIn}% - \rt@newListIn=\expandafter{\rt@listInHold\\{#1}}% -\ifrtdebug\typeout{\string\rt@newListIn: \the\rt@newListIn}\fi - \fi -} -\def\rt@modarith#1#2{\count\z@=#1\relax\count\tw@=#1\relax - \advance\count\z@\m@ne\divide\count\z@ #2\relax - \multiply\count\z@ #2\relax - \advance\count\tw@-\count\z@ - \edef\rt@mod{\the\count\tw@}} -\def\rt@badIndex#1#2{\PackageWarningNoLine{ran_toks} - {The argument of \string\useRanTok{#1} on line - \the\inputlineno\space is\MessageBreak - greater than \string\nToksFor{#2} (\nToksFor{#2}), - instead will use\MessageBreak - \string\useRanTok{\rt@mod}, obtained from modular - arithmetic.\MessageBreak - You might want to fix this} -} -\def\rt@badTokName#1{% - \PackageWarningNoLine{ran_toks} - {The token list `#1' on line \the\inputlineno\space - is undefined,\MessageBreak - possibly simply mispelled; check spelling.\MessageBreak - If undefined, use \string\ranToks\space or \string\bRTVToks/% - \string\eRTVToks\space\MessageBreak - to define a list with the name `#1'}% -} -\def\rt@warnTokName#1{% - \PackageWarningNoLine{ran_toks} - {The token list `#1' on line \the\inputlineno\space - is already defined,\MessageBreak - will overwrite this list}% -} -\def\ranToks#1{\begingroup - \useRTName{#1}% - \r@nToks -} -\long\def\r@nToks#1{\rt@nMax\z@\r@ndToks#1\rt@NIL} -\def\rt@NIL{@nil} -\newcommand{\useRTName}[1]{\gdef\rt@BaseName{#1}}% -\let\rt@BaseName\@empty -\newcommand{\bRTVToks}[1]{\rt@nCnt\z@\useRTName{#1}} -\newcommand{\eRTVToks}{\global - \rt@nameedef{\rt@BaseName Cnt}{\the\rt@nCnt}% - \expandafter\r@nVToks\expandafter{\rt@BaseName}} -\def\reVerbEnd{\ifhmode\unskip\fi} -\newenvironment{rtVW}{\global\advance\rt@nCnt\@ne - \immediate\openout\rt@Verb@write - \jobname_\rt@BaseName\the\rt@nCnt.cut - \let\verbatim@out\rt@Verb@write - \verbatimwrite -}{% - \endverbatimwrite - \immediate\write\rt@Verb@write{\string\reVerbEnd}% - \immediate\closeout\rt@Verb@write -} -\def\r@nVToks#1{\begingroup - \gdef\rt@BaseName{#1}% - \expandafter\rt@nMax\@nameuse{#1Cnt}% - \rt@listIn={}\rt@nCnt=0\relax\let\rt@listInHold\@empty - \@whilenum\rt@nCnt<\rt@nMax\do{\advance\rt@nCnt\@ne - \edef\rt@listInHold{% - \the\rt@listIn{\noexpand\rt@inputVerb{#1\the\rt@nCnt}}}% - \rt@listIn=\expandafter{\rt@listInHold}}\ifrtdebug - \typeout{\string\r@nVToks: \the\rt@listIn}\fi - \expandafter\r@nToks\expandafter{\the\rt@listIn}} -\def\rt@inputVerb#1{\input{\jobname_#1.cut}} -\def\rt@PAR{\par} -\long\def\r@ndToks#1{\def\rt@rgi{#1}% - \ifx\rt@rgi\rt@PAR\def\rt@next{\r@ndToks}\else - \advance\rt@nMax\@ne - \global\@namedef{rtTok\the\rt@nMax\rt@BaseName}{#1}% - \def\rt@next{\@ifnextchar\rt@NIL - {\rt@endToks\@gobble}{\r@ndToks}}\fi\rt@next} -\def\rt@performRanDefns#1{% - \rt@RandomizeList{#1}\rt@nCnt\z@ - \let\\\rt@ssign\the\rt@listOut} -\def\rt@endToks{\global - \rt@nameedef{nMax4\rt@BaseName}{\the\rt@nMax}% - \rt@performRanDefns{\the\rt@nMax}\endgroup} -\def\reorderRanToks#1{\begingroup\useRTName{#1}\expandafter - \ifx\csname nMax4#1\endcsname\relax - \rt@badTokName{#1}\else - \rt@performRanDefns{\@nameuse{nMax4#1}}\fi -\endgroup} -\newcommand\copyRanToks[2]{\begingroup\expandafter - \ifx\csname nMax4#1\endcsname\relax - \rt@badTokName{#1}% - \else\expandafter - \ifx\csname nMax4#2\endcsname\relax - \useRTName{#2}\global - \rt@nameedef{nMax4#2}{\@nameuse{nMax4#1}}% - \rt@nCnt=\csname nMax4#2\endcsname\relax - \@whilenum\rt@nCnt>\z@\do{\global - \rt@nameedef{rtTok\the\rt@nCnt#2}% - {\noexpand\@nameuse{rtTok\the\rt@nCnt#1}}% - \advance\rt@nCnt\m@ne}% - \rt@performRanDefns{\@nameuse{nMax4#2}}\else - \rt@warnTokName{#2}\fi - \fi -\endgroup} -\def\rt@ssign#1{\advance\rt@nCnt\@ne\global - \rt@nameedef{rtRanTok\the\rt@nCnt\rt@BaseName}{\noexpand - \@nameuse{rtTok#1\rt@BaseName}}} -\newcommand{\nToksFor}[1]{\expandafter - \ifx\csname nMax4#1\endcsname\relax - \textbf{??}\rt@badTokName{#1}\else - \@nameuse{nMax4#1}\fi} -\newcommand{\rtTokByNum}[2][\rt@BaseName]{\expandafter - \ifx\csname nMax4#1\endcsname\relax - \textbf{??}\rt@badTokName{#1}\else - \@nameuse{rtTok#2#1}\expandafter\ignorespaces\fi} -\newcommand{\useRanTok}[2][\rt@BaseName]{\bgroup - \expandafter\ifx\csname nMax4#1\endcsname\relax - \rt@badTokName{#1}\else - \ifnum#2>\nToksFor{#1}\rt@modarith{#2}{\nToksFor{#1}}% - \rt@badIndex{#2}{#1}\@nameuse{rtRanTok\rt@mod#1}\else - \@nameuse{rtRanTok#2#1}\fi\fi\egroup} -\newcommand{\displayListRandomly}[1][]{\bgroup\def\rt@prior{#1}% - \displ@yListRandomly} -\newcommand{\displ@yListRandomly}[2][]{\rt@nCnt\z@ - \expandafter\ifx\csname nMax4#2\endcsname\relax - \rt@rgi\space\textbf{??}\rt@badTokName{#2}#1% - \else - \def\rt@post{#1}\useRTName{#2}\let\i\rt@nCnt - \def\first{1}\edef\last{\@nameuse{nMax4#2}}% - \@tempcnta\last \advance\@tempcnta\m@ne - \edef\lessone{\the\@tempcnta}% - \@whilenum\rt@nCnt<\last\advance\rt@nCnt\@ne - \do{\rt@prior\useRanTok{\the\rt@nCnt}\rt@post}% - \fi\egroup -} -\def\rt@gettonil#1\@nil{\def\to@nilarg{#1}} -\def\rt@ifspc{\ifx\@let@token\@sptoken - \let\rt@next\rt@xifspc\else - \let\rt@next\rt@gettonil\fi\rt@next} -\begingroup -\def\:{\rt@xifspc} -\expandafter\gdef\: {\futurelet\@let@token\rt@ifspc} -\endgroup -\def\rt@strpspcs{\futurelet\@let@token\rt@ifspc} -\def\ProbDBWarningMsg#1{\filename@parse{#1} - \PackageWarning{ran_toks} - {The file \filename@area\filename@base.\ifx\filename@ext\relax - tex\else\filename@ext\fi\space cannot be found}} -\def\useTheseDBs#1{\def\rt@dblist{#1}\ifx\rt@dblist\@empty\else - \let\rt@DB@List\@empty - \edef\temp@expand{\noexpand\@for\noexpand\@@tmp:=\rt@dblist}% - \temp@expand\do{\ifx\@@tmp\@empty\else - \expandafter\rt@strpspcs\@@tmp\@nil\edef\@@tmp{\to@nilarg}% - \edef\rt@nextDB{\noexpand - \InputIfFileExists{\@@tmp}{}{\noexpand - \ProbDBWarningMsg{\@@tmp}}}% - \toks\tw@=\expandafter{\rt@DB@List}% - \toks@=\expandafter{\rt@nextDB}% - \edef\rt@DB@List{\the\toks\tw@\space\the\toks@}\fi - }\expandafter\rt@DB@List\fi} -\let\useProbDBs\useTheseDBs -\endinput -%% -%% End of file `ran_toks.sty'. |