diff options
author | Norbert Preining <norbert@preining.info> | 2021-05-09 03:02:17 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-05-09 03:02:17 +0000 |
commit | 2cd369d8df4e5fcf26840e6da140091a2f16fa8c (patch) | |
tree | e4757d386a1dbde3545992eb48d7265ac7e06638 /macros | |
parent | 0f8acc6eb1940c147de1fb17b307dad849cb3915 (diff) |
CTAN sync 202105090302
Diffstat (limited to 'macros')
71 files changed, 778 insertions, 265 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost-examples.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost-examples.pdf Binary files differindex c716507f02..cbdae60073 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost-examples.pdf +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost-examples.pdf diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost.pdf Binary files differindex bb00a434c9..a46a7734ce 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost.pdf +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost.pdf diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost.tex b/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost.tex index ad4f12d673..3a99b36075 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost.tex +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/doc/biblatex-gost.tex @@ -2539,6 +2539,12 @@ pageref & + & + & + & + & + & + & + & + \begin{changelog} + \begin{release}{1.22}{08-05-2021} + \item При версиях \biblatex 3.15+ не применяется патч для обхода ошибки + \url{https://github.com/odomanov/biblatex-gost/issues/22}, + \url{https://github.com/plk/biblatex/issues/960}. + \end{release} + \begin{release}{1.21}{28-10-2020} \item Ошибки отсутствующих \%. \end{release} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-alphabetic-min.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-alphabetic-min.bbx index 946247db60..dca3d3d0ad 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-alphabetic-min.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-alphabetic-min.bbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-alphabetic-min.bbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireBibliographyStyle{gost-alphabetic} \AtEveryBibitem{% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-alphabetic.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-alphabetic.bbx index 49c10ba1f6..9d96c69198 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-alphabetic.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-alphabetic.bbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-alphabetic.bbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireBibliographyStyle{gost-standard} \ExecuteBibliographyOptions{labelalpha,sorting=anyvt} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-authoryear-min.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-authoryear-min.bbx index f202c61b4a..df17b27455 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-authoryear-min.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-authoryear-min.bbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-authoryear-min.bbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireBibliographyStyle{gost-authoryear} \AtEveryBibitem{% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-authoryear.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-authoryear.bbx index 0aa2c785f9..48e824f977 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-authoryear.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-authoryear.bbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-authoryear.bbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireBibliographyStyle{gost-standard} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-footnote-min.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-footnote-min.bbx index f930e47395..596e33ce7b 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-footnote-min.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-footnote-min.bbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-footnote-min.bbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireBibliographyStyle{gost-inline-min} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-footnote.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-footnote.bbx index c2857322e0..acda184237 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-footnote.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-footnote.bbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-footnote.bbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireBibliographyStyle{gost-inline} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-inline-min.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-inline-min.bbx index 2e4c02d77b..dd14a89153 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-inline-min.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-inline-min.bbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-inline-min.bbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireBibliographyStyle{gost-inline} \AtEveryBibitem{% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-inline.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-inline.bbx index 5b32063f9a..b9c4278507 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-inline.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-inline.bbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-inline.bbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireBibliographyStyle{gost-standard} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-numeric-min.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-numeric-min.bbx index 4675b23aa8..f0c5062005 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-numeric-min.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-numeric-min.bbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-numeric-min.bbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireBibliographyStyle{gost-numeric} \AtEveryBibitem{% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-numeric.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-numeric.bbx index 288b1c2475..68d5fb053a 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-numeric.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-numeric.bbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-numeric.bbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireBibliographyStyle{gost-standard} \ExecuteBibliographyOptions{labelnumber,bibisbn,biburl,bibdoi,bibeprint} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-standard.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-standard.bbx index 4bfe50bbb8..b763121b31 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-standard.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/bbx/gost-standard.bbx @@ -1,8 +1,8 @@ \ProvidesFile{gost-standard.bbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] -\def\bbx@gost@date{2020/10/28} -\def\bbx@gost@version{1.21} +\def\bbx@gost@date{2021/05/08} +\def\bbx@gost@version{1.22} \@ifpackagelater{biblatex}{2019/09/01} {} @@ -14,9 +14,11 @@ \endinput} \ifpdftex - \PackageWarningNoLine{biblatex-gost}{Applying temporary patch for +\@ifpackagelater{biblatex}{2020/08/23} % v3.15a+ + {} + {\PackageWarningNoLine{biblatex-gost}{Applying temporary patch for Unicode symbols.\MessageBreak For details see biblatex issue \protect#960} - \AtEndPreamble{\DefineBibliographyStrings{russian}{number={\textnumero}}} + \AtEndPreamble{\DefineBibliographyStrings{russian}{number={\textnumero}}}} \fi \AtEndOfPackage{% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/biblatex-gost.def b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/biblatex-gost.def index 3251dca137..ff20a2ff41 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/biblatex-gost.def +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/biblatex-gost.def @@ -1,5 +1,5 @@ \ProvidesFile{biblatex-gost.def} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] % these declarations should be here, not in lbx, to be initialized for all languages \NewBibliographyString{ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-alphabetic-min.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-alphabetic-min.cbx index 97142e7d3f..9ce16a39a9 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-alphabetic-min.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-alphabetic-min.cbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-alphabetic-min.cbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireCitationStyle{gost-alphabetic} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-alphabetic.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-alphabetic.cbx index e770b359c6..bca89235f4 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-alphabetic.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-alphabetic.cbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-alphabetic.cbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireCitationStyle{alphabetic} \ExecuteBibliographyOptions{labelalpha,autocite=inline} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-authoryear-min.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-authoryear-min.cbx index d407c54dfd..c976469735 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-authoryear-min.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-authoryear-min.cbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-authoryear-min.cbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireCitationStyle{gost-authoryear} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-authoryear.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-authoryear.cbx index 10232bc594..bdf7cc545c 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-authoryear.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-authoryear.cbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-authoryear.cbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \ExecuteBibliographyOptions{dashed=false,citetracker=constrict,loccittracker=constrict, dropdates=false, diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-footnote-min.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-footnote-min.cbx index 3ea8299101..110dbc29e0 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-footnote-min.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-footnote-min.cbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-footnote-min.cbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireCitationStyle{gost-footnote} \renewbibmacro*{cite:clearfields}{% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-footnote.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-footnote.cbx index 2dbaf8fe86..c58cf9a724 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-footnote.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-footnote.cbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-footnote.cbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireCitationStyle{gost-inline} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-inline-min.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-inline-min.cbx index 40eb144e7c..ce31bc54a5 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-inline-min.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-inline-min.cbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-inline-min.cbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireCitationStyle{gost-inline} \renewbibmacro*{cite:clearfields}{% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-inline.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-inline.cbx index 462643fc2d..ead6f2dc61 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-inline.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-inline.cbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-inline.cbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \DeclareLabelname [inbook,incollection,inproceedings,inreference,suppbook,suppcollection,suppperiodical,bookinbook] diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-numeric-min.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-numeric-min.cbx index d0b0ccaeaa..50838c887b 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-numeric-min.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-numeric-min.cbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-numeric-min.cbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireCitationStyle{gost-numeric} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-numeric.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-numeric.cbx index 391d5d62cc..6d5f2f918a 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-numeric.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/cbx/gost-numeric.cbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-numeric.cbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \RequireCitationStyle{numeric-comp} \ExecuteBibliographyOptions{dashed=false,citeisbn,citeurl,citedoi,citeeprint} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/biblatex-gost.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/biblatex-gost.dbx index 5a52d9a049..74759a5a53 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/biblatex-gost.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/biblatex-gost.dbx @@ -1,5 +1,5 @@ \ProvidesFile{biblatex-gost.dbx} -[2020/10/28\space v1.21\space biblatex-gost data model] +[2021/05/08\space v1.22\space biblatex-gost data model] % Biblatex-GOST data model diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-alphabetic-min.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-alphabetic-min.dbx index ed38339760..5b95ef4f02 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-alphabetic-min.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-alphabetic-min.dbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-alphabetic-min.dbx} -[2020/10/28\space v1.21\space biblatex-gost data model] +[2021/05/08\space v1.22\space biblatex-gost data model] \blx@inputonce{biblatex-gost.dbx}{biblatex-gost data model}{}{}{}{} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-alphabetic.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-alphabetic.dbx index 114f7df720..8aa1267902 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-alphabetic.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-alphabetic.dbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-alphabetic.dbx} -[2020/10/28\space v1.21\space biblatex-gost data model] +[2021/05/08\space v1.22\space biblatex-gost data model] \blx@inputonce{biblatex-gost.dbx}{biblatex-gost data model}{}{}{}{} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-authoryear-min.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-authoryear-min.dbx index 445ffdd44f..619447ddd4 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-authoryear-min.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-authoryear-min.dbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-authoryear-min.dbx} -[2020/10/28\space v1.21\space biblatex-gost data model] +[2021/05/08\space v1.22\space biblatex-gost data model] \blx@inputonce{biblatex-gost.dbx}{biblatex-gost data model}{}{}{}{} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-authoryear.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-authoryear.dbx index 3d8362b599..e8e5ab65d3 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-authoryear.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-authoryear.dbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-authoryear.dbx} -[2020/10/28\space v1.21\space biblatex-gost data model] +[2021/05/08\space v1.22\space biblatex-gost data model] \blx@inputonce{biblatex-gost.dbx}{biblatex-gost data model}{}{}{}{} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-footnote-min.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-footnote-min.dbx index 384f3671df..5677eed3fc 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-footnote-min.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-footnote-min.dbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-footnote-min.dbx} -[2020/10/28\space v1.21\space biblatex-gost data model] +[2021/05/08\space v1.22\space biblatex-gost data model] \blx@inputonce{biblatex-gost.dbx}{biblatex-gost data model}{}{}{}{} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-footnote.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-footnote.dbx index b301f03cfa..e4e423246f 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-footnote.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-footnote.dbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-footnote.dbx} -[2020/10/28\space v1.21\space biblatex-gost data model] +[2021/05/08\space v1.22\space biblatex-gost data model] \blx@inputonce{biblatex-gost.dbx}{biblatex-gost data model}{}{}{}{} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-inline-min.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-inline-min.dbx index abb002de93..5213788042 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-inline-min.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-inline-min.dbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-inline-min.dbx} -[2020/10/28\space v1.21\space biblatex-gost data model] +[2021/05/08\space v1.22\space biblatex-gost data model] \blx@inputonce{biblatex-gost.dbx}{biblatex-gost data model}{}{}{}{} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-inline.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-inline.dbx index 9f84b8ee2d..22c5521f3a 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-inline.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-inline.dbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-inline.dbx} -[2020/10/28\space v1.21\space biblatex-gost data model] +[2021/05/08\space v1.22\space biblatex-gost data model] \blx@inputonce{biblatex-gost.dbx}{biblatex-gost data model}{}{}{}{} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-numeric-min.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-numeric-min.dbx index c148cf6698..17e9e06801 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-numeric-min.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-numeric-min.dbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-numeric-min.dbx} -[2020/10/28\space v1.21\space biblatex-gost data model] +[2021/05/08\space v1.22\space biblatex-gost data model] \blx@inputonce{biblatex-gost.dbx}{biblatex-gost data model}{}{}{}{} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-numeric.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-numeric.dbx index 8ae06feaf5..53bd8183b2 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-numeric.dbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/dbx/gost-numeric.dbx @@ -1,5 +1,5 @@ \ProvidesFile{gost-numeric.dbx} -[2020/10/28\space v1.21\space biblatex-gost data model] +[2021/05/08\space v1.22\space biblatex-gost data model] \blx@inputonce{biblatex-gost.dbx}{biblatex-gost data model}{}{}{}{} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/american-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/american-gost.lbx index 73fe3882c0..58f32d61c7 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/american-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/american-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{american-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{american} \InheritBibliographyStrings{american} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/brazilian-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/brazilian-gost.lbx index f3408ac90a..e6db5a32b8 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/brazilian-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/brazilian-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{brazilian-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{brazilian} \InheritBibliographyStrings{brazilian} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/british-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/british-gost.lbx index e3c80109c6..eb20ffb207 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/british-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/british-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{british-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{british} \InheritBibliographyStrings{british} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/catalan-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/catalan-gost.lbx index 5b4a8633ab..11a6cd9da7 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/catalan-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/catalan-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{catalan-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{catalan} \InheritBibliographyStrings{catalan} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/croatian-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/croatian-gost.lbx index 6fcc52dd5a..5931ff8a35 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/croatian-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/croatian-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{croatian-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{croatian} \InheritBibliographyStrings{croatian} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/english-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/english-gost.lbx index 038bbc713f..df3e6610ae 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/english-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/english-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{english-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{english} \InheritBibliographyStrings{english} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/french-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/french-gost.lbx index 4e8738763d..d7c8827eab 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/french-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/french-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{french-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{french} \InheritBibliographyStrings{french} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/galician-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/galician-gost.lbx index a18379a439..c98ab8c7ea 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/galician-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/galician-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{galician-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{galician} \InheritBibliographyStrings{galician} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/german-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/german-gost.lbx index c9f9ec1382..477b3fcf17 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/german-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/german-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{german-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{german} \InheritBibliographyStrings{german} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/greek-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/greek-gost.lbx index 67c3ea778c..3e876a87a8 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/greek-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/greek-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{greek-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{greek} \InheritBibliographyStrings{greek} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/icelandic-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/icelandic-gost.lbx index 7ecb906e9d..50085a1e4e 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/icelandic-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/icelandic-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{icelandic-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{icelandic} \InheritBibliographyStrings{icelandic} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/italian-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/italian-gost.lbx index 3e878b3a25..f016ba9061 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/italian-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/italian-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{italian-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{italian} \InheritBibliographyStrings{italian} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/portuguese-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/portuguese-gost.lbx index ab68ebcbe9..879f823e9c 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/portuguese-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/portuguese-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{portuguese-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{portuguese} \InheritBibliographyStrings{portuguese} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/russian-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/russian-gost.lbx index cfb4a7312f..1655b93b29 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/russian-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/russian-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{russian-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{russian} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/slovene-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/slovene-gost.lbx index 93856bfcb3..5a21956ff8 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/slovene-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/slovene-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{slovene-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{slovene} \InheritBibliographyStrings{slovene} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/spanish-gost.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/spanish-gost.lbx index 77c60223f3..1c66ef0280 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/spanish-gost.lbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gost/tex/lbx/spanish-gost.lbx @@ -1,5 +1,5 @@ \ProvidesFile{spanish-gost.lbx} -[2020/10/28\space v1.21\space biblatex-gost styles] +[2021/05/08\space v1.22\space biblatex-gost styles] \InheritBibliographyExtras{spanish} \InheritBibliographyStrings{spanish} diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index e2bbfaa746..dc7e4887c0 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -24,11 +24,11 @@ % \changes{v1.20}{2021/01/09}{修改和完善用户文档。} % \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。} % \changes{v1.23}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。} -% \changes{v1.25d}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。} +% \changes{v1.25e}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。} % % \title{\sffamily easybook 文档类手册} % \author{瞿毅} -% \date{2021/05/07\hskip\ccwd\relax v1.25d\thanks{\url{https://gitee.com/texl3/easybook}}} +% \date{2021/05/08\hskip\ccwd\relax v1.25e\thanks{\url{https://gitee.com/texl3/easybook}}} % % \maketitle % \begin{abstract} @@ -118,7 +118,7 @@ % \end{syntax} % 传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。 % \changes{v1.21}{2021/01/12}{默认字体与 \CTeX 一致,不再是自定义字体。} -% \changes{v1.25d}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。} +% \changes{v1.25e}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。} % \end{function} % % \begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper} @@ -169,7 +169,7 @@ % \tn{listoflistings*+}\oarg{键值列表} % \end{syntax} % \tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有+号的目录命令可以使当前标题编号。\tn{tableofcontents+} 与其它命令不同是用于输出双语目录,需要与双语目录标题命令 \tn{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入文本和换页命令等。目录的键值列表选项如下 -% \changes{v1.25d}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。} +% \changes{v1.25e}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。} % \end{function} % % \begin{function}{multoc,title,format,aftertitle,pagestyle,book,article} @@ -200,7 +200,7 @@ % 双语目录的标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录,这个功能是为国内一些大学的学位论文模板的要求设计,在一般情况和英文模式下不需要使用。 % % 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \tn{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。双语目录的格式是一致的,共享使用 \tn{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下 -% \changes{v1.25d}{2021/05/05}{增加与双语目录配合的标题命令。} +% \changes{v1.25e}{2021/05/05}{增加与双语目录配合的标题命令。} % \end{function} % % \begin{function}{biname,binmuber} @@ -224,7 +224,7 @@ % \begin{syntax} % \tn{ctexset}\marg{键值列表} % \end{syntax} -% \cls{easybook} 扩展了 \CTeX 宏集\LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样可用它设置, 原有的键值列表仍然可用。本文档类目前有九个模块用于实现常规的排版功能,如下表所示,它们既是统一接口 \tn{ctexset} 的路径,也是相关模块的接口命令名 +% \cls{easybook} 扩展了 \CTeX 宏集 \LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样可用它设置, 原有的键值列表仍然可用。本文档类目前有九个模块用于实现常规的排版功能,如下表所示,它们既是统一接口 \tn{ctexset} 的路径,也是相关模块的接口命令名 % \begin{center} % \begin{tabular}{*{5}{c}} % \toprule @@ -299,7 +299,7 @@ % \opt{refset} 将超链接选项(包括以上选项)交给 \pkg{hyperref} 处理,除了一些关于 pdf 书签的选项可能会失效,其它由键值选项命令 \tn{hypersetup} 支持的多数选项可用。 % \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。} % \changes{v1.24}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。} -% \changes{v1.25d}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。} +% \changes{v1.25e}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。} % \end{function} % % \begin{optdesc} @@ -920,7 +920,7 @@ % \item[ctexbook] 提供中文排版的通用框架。 % \item[xcolor] 提供任意颜色的设定与混合,已载入了 \opt{svgnames} 颜色库。 % \item[footmisc] 更改脚注排版的方法的集合。 -% \item[amsmath] 提供\LaTeX 中的数学功能。 +% \item[amsmath] 提供 \LaTeX 中的数学功能。 % \item[thmtools] 用于通常需要的排版定理支持。 % \item[marginnote] 增强了边注输出的功能。 % \item[setspace] 提供对文档中行间距的支持。 @@ -928,7 +928,7 @@ % \item[siunitx] 全面的国际标准单位支持。 % \item[ulem] 提供可断行多样式的下划线命令。 % \item[geometry] 灵活完整的页面尺寸设置。 -% \item[pdfpages] 在\LaTeX 中插入 pdf 文档。 +% \item[pdfpages] 在 \LaTeX 中插入 pdf 文档。 % \item[graphicx] 增强了对图形插入的支持。 % \item[fancyhdr] 广泛控制页面的页眉和页脚。 % \item[titletoc] 设置目录中的标题格式。 @@ -937,7 +937,7 @@ % \item[multirow] 创建跨越多行的表格单元格。 % \item[booktabs] 为表格提供三线表式的命令。 % \item[enumitem] 提供列表环境的布局控制。 -% \item[listings] 可以在\LaTeX 中排版程序/编程代码。 +% \item[listings] 可以在 \LaTeX 中排版程序/编程代码。 % \item[hyperref] 处理交叉引用命令以及在文档中生成超文本链接。 % \item[\ding{75} tcolorbox] 为带有标题线的彩色和带框文本框提供了一个环境。 % \item[\ding{75} tasks] 将练习题组织成水平而不是垂直计数的列。 @@ -951,7 +951,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplClass{easybook}{2021/05/07}{1.25d}{beta} +\ProvidesExplClass{easybook}{2021/05/08}{1.25e}{beta} \cs_generate_variant:Nn \eb_ctex_define:nn { nx } \cs_generate_variant:Nn \int_to_arabic:n { v } @@ -2345,7 +2345,7 @@ ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#5} }{ \group_begin: - \keys_set:nn { ctex/section } { format += \centering } + \ctex_set:nn { section } { format += \centering } \IfValueT{#6}{\ctex_set:nn { section } {#6}} \IfBooleanTF{#1}{\section*{#5}}{\section{#5}} \group_end: @@ -2768,11 +2768,8 @@ lstlistingname = 代码 } \labelformat{equation}{式(#1)} - \labelformat{align}{式(#1)} - \labelformat{multline}{式(#1)} - \labelformat{gather}{式(#1)} - \labelformat{section}{节#1} - \labelformat{subsection}{小节#1} + \labelformat{section}{节 #1} + \labelformat{subsection}{小节 #1} } { \keys_set_known:nn { ctex } @@ -2782,9 +2779,6 @@ lstlistingname = Code } \labelformat{equation}{Equation~(#1)} - \labelformat{align}{Equation~(#1)} - \labelformat{multline}{Equation~(#1)} - \labelformat{gather}{Equation~(#1)} \labelformat{section}{Section~#1} \labelformat{subsection}{Subsection~#1} } diff --git a/macros/latex/contrib/easybook/easybook.ins b/macros/latex/contrib/easybook/easybook.ins index ffe304d2af..af8f3f8134 100644 --- a/macros/latex/contrib/easybook/easybook.ins +++ b/macros/latex/contrib/easybook/easybook.ins @@ -22,4 +22,4 @@ The latest version of this license is in \generate{\file{\jobname.cls}{\from{\jobname.dtx}{class}}} -\endbatchfile +\endbatchfile
\ No newline at end of file diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf Binary files differindex 059d644933..e43ede81b4 100644 --- a/macros/latex/contrib/easybook/easybook.pdf +++ b/macros/latex/contrib/easybook/easybook.pdf diff --git a/macros/latex/contrib/mindflow/mindflow.dtx b/macros/latex/contrib/mindflow/mindflow.dtx index 8fa703d938..629ceaaf41 100644 --- a/macros/latex/contrib/mindflow/mindflow.dtx +++ b/macros/latex/contrib/mindflow/mindflow.dtx @@ -18,20 +18,24 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{mindflow} %<*package> - [2021/03/17 Mindflow environment] + [2021/05/07 Mindflow environment] %</package> % %<*driver> \documentclass{article} \usepackage{doc} \usepackage[a4paper,top=1.2in,bottom=1.2in,left=1.6in,right=1.2in]{geometry} +\usepackage{titlesec} +\titleformat{\section}{\large\scshape\centering}{\thesection.}{.5em}{} +\titleformat{\subsection}{\large}{\thesubsection}{.5em}{} \usepackage{titling} \setlength{\droptitle}{-.5in} -\PassOptionsToPackage{mathlines}{lineno} -\usepackage[linenumber,rightmarker]{mindflow} \usepackage{enumitem} \setlist{noitemsep} -\usepackage{newpxtext} +\usepackage{mathpazo,newpxtext} +\useosf +\PassOptionsToPackage{mathlines}{lineno} +\usepackage[linenumber,rightmarker]{mindflow} \usepackage{blindtext} \usepackage{parskip} \EnableCrossrefs @@ -43,7 +47,7 @@ %</driver> % \fi % -% \CheckSum{186} +% \CheckSum{197} % % \GetFileInfo{mindflow.dtx} % @@ -71,29 +75,38 @@ % % \section{Usage} % +% \subsection{Initialization} % Simply load the package with % \begin{verbatim} % \usepackage{mindflow} % \end{verbatim} -% \vspace{-.5\baselineskip} -% By default, it has no line numbers or markers. You can use the following options: +% +% \vspace{-\baselineskip} +% There are a few options available, which are listed in the next subsection. +% +% \subsection{Options} +% By default, the environment has no line numbers or markers. You can use the following options: % % \begin{tabular}{ll} -% \verb|linenumber| & Enable line numbers\\ +% \verb|linenumber| & Same as \verb|leftlinenumber|\\ +% \verb|leftlinenumber| & Enable left line numbers\\ +% \verb|rightlinenumber| & Enable right line numbers\\ % \verb|leftmarker| & Enable left marker, by default it is a ``\verb|*|''\\ % \verb|rightmarker| & Enable right marker, by default it is a ``\verb|*|''\\ % \verb|incolumn| or \verb|twocolumn| & The separation line would fit in the column \\&(\emph{automatically applied in two-column documents})\\ % \verb|off| & Hide all the \verb|mindflow| environments % \end{tabular} % -% \DescribeEnv{mindflow} +% \DescribeEnv{\{mindflow\}} % Then you can use the \verb|mindflow| environment as % \begin{verbatim} % \begin{mindflow} % ... % \end{mindflow} % \end{verbatim} +% \vspace{-\baselineskip} % +% \subsection{About the line numbers} % \linenumbers % % You can also add line numbers to the other part of your document in the usual @@ -104,9 +117,10 @@ % Line numbers within the \textsf{mindflow} environments are independent from % those of the main text. % \end{mindflow} -% (\emph{I recommend that you put an empty line before and after the mindflow -% environments. This way, your paragraph structure won't get changed when you -% use the }\verb|off|\emph{ option.}) +% (\emph{I recommend that you put an empty line before and after the mindflow +% environments, i.e.~make the \emph{\textsf{mindflow}} environment a paragraph +% of its own. This way, your paragraph structure won't get changed when you use +% the} \verb|off|\emph{ option.}) % % \nolinenumbers % @@ -162,33 +176,35 @@ % 8\% for the line numbers. % % \section{An example} -% With option \verb|linenumber, leftmarker, rightmarker| and the following settings: +% With option \verb|leftlinenumber, rightlinenumber, leftmarker, rightmarker| and the +% following settings: % \begin{verbatim} % \colorlet{mindflowLine}{green!50!black} % \colorlet{mindflowText}{blue!50!cyan} % \colorlet{mindflowNum}{red!50!orange} % \colorlet{mindflowMarker}{orange} % \renewcommand{\mindflowTextFont}{\normalfont\footnotesize\sffamily\itshape} -% \renewcommand{\mindflowNumFont}{\normalfont\small\footnotesize\sffamily} +% \renewcommand{\mindflowNumFont}{\normalfont\small\footnotesize\ttfamily} % \renewcommand{\mindflowMarkerFont}{\normalfont\footnotesize\sffamily} % \renewcommand{\mindflowLeft}{\hspace{1em}\(\succ\)} -% \renewcommand{\mindflowRight}{\(\prec\)} +% \renewcommand{\mindflowRight}{\(\prec\)\hspace{1em}} % \setlength{\mindflowLineHeight}{1pt} % \end{verbatim} % \vspace{-.5\baselineskip} % One gets: % \makeatletter % \@mindflow@leftmarkertrue +% \@mindflow@rightlinenumbertrue % \makeatother % \colorlet{mindflowLine}{green!50!black} % \colorlet{mindflowText}{blue!50!cyan} % \colorlet{mindflowNum}{red!50!orange} % \colorlet{mindflowMarker}{orange} % \renewcommand{\mindflowTextFont}{\normalfont\footnotesize\sffamily\itshape} -% \renewcommand{\mindflowNumFont}{\normalfont\small\footnotesize\sffamily} +% \renewcommand{\mindflowNumFont}{\normalfont\small\footnotesize\ttfamily} % \renewcommand{\mindflowMarkerFont}{\normalfont\footnotesize\sffamily} % \renewcommand{\mindflowLeft}{\hspace{1em}\(\succ\)} -% \renewcommand{\mindflowRight}{\(\prec\)} +% \renewcommand{\mindflowRight}{\(\prec\)\hspace{1em}} % \setlength{\mindflowLineHeight}{1pt} % \begin{mindflow} % \blindtext @@ -205,18 +221,23 @@ family = @mindflow, prefix = @mindflow@ } -\DeclareBoolOption[false]{off} % Turn off mindflow -\DeclareBoolOption[false]{leftmarker} % Left marker -\DeclareBoolOption[false]{rightmarker} % Right marker -\DeclareBoolOption[false]{linenumber} % Line numbers -\DeclareBoolOption[false]{twocolumn} % Two column -\DeclareBoolOption[false]{incolumn} % Separation line fits in the column +\DeclareBoolOption[false]{off} % Turn off mindflow +\DeclareBoolOption[false]{leftmarker} % Left marker +\DeclareBoolOption[false]{rightmarker} % Right marker +\DeclareBoolOption[false]{linenumber} % Left line numbers +\DeclareBoolOption[false]{leftlinenumber} % Left line numbers +\DeclareBoolOption[false]{rightlinenumber} % Right line numbers +\DeclareBoolOption[false]{twocolumn} % Two column +\DeclareBoolOption[false]{incolumn} % Separation line fits in the column \ProcessKeyvalOptions*\relax \if@mindflow@twocolumn \@mindflow@incolumntrue \fi +\if@mindflow@linenumber + \@mindflow@leftlinenumbertrue +\fi %%================================ %% Initialization @@ -242,7 +263,6 @@ %% The mindflow environment %%================================ \newif\ifLNturnsON - \newcommand*{\mfSepLine}{% \parskip=0pt \LNturnsONfalse% @@ -251,7 +271,8 @@ \if@mindflow@incolumn% \makebox[\linewidth]{\rule{\linewidth}{\mindflowLineHeight}}% \else% - \hspace*{-\paperwidth}\makebox[\linewidth]{\rule{4\paperwidth}{\mindflowLineHeight}}% + \hspace*{-\paperwidth}% + \makebox[\linewidth]{\rule{4\paperwidth}{\mindflowLineHeight}}% \fi% \nopagebreak\par% \ifLNturnsON\linenumbers\fi% @@ -277,16 +298,22 @@ \linenumbers% \renewcommand\makeLineNumber{% \hss% - \if@mindflow@linenumber% + \if@mindflow@leftlinenumber% \mindflowNumFont\color{mindflowNum}\LineNumber\hspace{1em}% \fi% \color{mindflowMarker}% \if@mindflow@leftmarker% \mindflowMarkerFont\mindflowLeft\hspace{1em}% \fi% - \if@mindflow@rightmarker% - \rlap{\hskip\textwidth\hspace{1em}\mindflowRight}% - \fi% + \rlap{\hskip\textwidth% + \if@mindflow@rightmarker% + \hspace{1em}\mindflowRight% + \fi% + \if@mindflow@rightlinenumber% + \hspace{1em}% + \mindflowNumFont\color{mindflowNum}\LineNumber% + \fi% + }% }% } {% @@ -304,8 +331,8 @@ \newcommand*\linenomathpatch[1]{% \cspreto{#1}{\linenomath}% \cspreto{#1*}{\linenomath}% - \cspreto{end#1}{\endlinenomath}% - \cspreto{end#1*}{\endlinenomath}% + \csappto{end#1}{\endlinenomath}% + \csappto{end#1*}{\endlinenomath}% } \newcommand*\linenomathpatchAMS[1]{% \cspreto{#1}{\linenomathAMS}% diff --git a/macros/latex/contrib/mindflow/mindflow.pdf b/macros/latex/contrib/mindflow/mindflow.pdf Binary files differindex 753bb68053..e861974e19 100644 --- a/macros/latex/contrib/mindflow/mindflow.pdf +++ b/macros/latex/contrib/mindflow/mindflow.pdf diff --git a/macros/luatex/latex/lua-physical/LICENSE b/macros/luatex/latex/lua-physical/LICENSE index 408f06f14d..8e40f98ea6 100644 --- a/macros/luatex/latex/lua-physical/LICENSE +++ b/macros/luatex/latex/lua-physical/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Thomas Jenni +Copyright (c) 2021 Thomas Jenni Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/macros/luatex/latex/lua-physical/README.md b/macros/luatex/latex/lua-physical/README.md index 830574a5da..6959ba2d39 100644 --- a/macros/luatex/latex/lua-physical/README.md +++ b/macros/luatex/latex/lua-physical/README.md @@ -2,9 +2,9 @@ Author: Thomas Jenni -Version: 1.0.3 +Version: 1.0.5 -Date: 2020-09-09 +Date: 2021-05-08 License: MIT diff --git a/macros/luatex/latex/lua-physical/lua-physical.pdf b/macros/luatex/latex/lua-physical/lua-physical.pdf Binary files differindex 577bf24f05..ea5221c92b 100644 --- a/macros/luatex/latex/lua-physical/lua-physical.pdf +++ b/macros/luatex/latex/lua-physical/lua-physical.pdf diff --git a/macros/luatex/latex/lua-physical/lua-physical.tex b/macros/luatex/latex/lua-physical/lua-physical.tex index 331a17d23e..0402419df8 100644 --- a/macros/luatex/latex/lua-physical/lua-physical.tex +++ b/macros/luatex/latex/lua-physical/lua-physical.tex @@ -42,7 +42,7 @@ % lua code and lua-physical command definitions \begin{luacode} -physical = require("physical") +physical = require('src.physicalx') N = physical.Number Q = physical.Quantity \end{luacode} @@ -70,8 +70,12 @@ Q = physical.Quantity round-mode=off } +\DeclareSIUnit\unitless{} + \DeclareSIUnit\fahrenheit{\ensuremath{{}^{\circ}}F} +\DeclareSIUnit\inch{in} + % config listings \lstdefinelanguage{lua} { @@ -152,14 +156,14 @@ Q = physical.Quantity \lstset{language=[LaTex]Tex} -\title{The \textsc{lua-physical} library \\\ \\\normalsize Version 1.0.3} +\title{The \textsc{lua-physical} library \\\ \\\normalsize Version 1.0.5} \author{Thomas Jenni} \date{\today} \maketitle \begin{abstract} -\noindent |lua-physical| is a pure Lua library, which provides functions and objects for the computation of physical quantities. A physical quantity is the product of a numerical value and a physical unit. The package has been written, to simplify the creation physics problem sets. The package provides units of the SI and the imperial system. Furthermore, an almost complete set of international currencies are supported, however without realtime exchange rates. In order to display the numbers with measurement uncertainties, the package is able to perform gaussian error propagation. +\noindent |lua-physical| is a pure Lua library, which provides functions and objects for the computation of physical quantities. The package has been written, to simplify the creation physics problem sets. The package provides units of the SI and the imperial system. In order to display the numbers with measurement uncertainties, the package is able to perform gaussian error propagation. \end{abstract} @@ -170,27 +174,33 @@ Q = physical.Quantity \newpage \section{Introduction} -The author of this package is a physics teacher at the high school \emph{Kantonsschule Zug}, Switzerland. The main use of this package is to write physics problem sets. \LuaLaTeX{} does make it possible to integrate physical calculations directly. The package has been in use since 2016. Many bugs have been found and fixed. Nevertheless it still is possible, that some were not found yet. Therefore the author recommends not to use this package in industry or science. If one does so, it's the responsability of the user to check results for plausability. If the user finds some bugs, they can be reported at github.com. +The author of this package is a physics teacher at the high school \emph{Kantonsschule Zug}, Switzerland. The main use of this package is to write physics problem sets. It is possible to integrate physical calculations directly into \LuaLaTeX{}. The package has been in use since 2016. Many bugs have been found and fixed. Nevertheless it still is possible, that some were not found yet. Therefore the author recommends not to use this package in industry or science. If one does so, it's the responsability of the user to check results for plausability. If the user finds some bugs, they can be reported at github.com. \subsection{Dependencies} -In principle this library is standalone, but it is compatible with the |siunitx| package. Calculation results can be written to \LuaLaTeX{} directly by calling the |tosiunitx()| method. If the preamble in the next section is used, the printing is done by the |\q{}| macro. +This is a standalone library. However, it is compatible with the |siunitx| package. The results of calculations can be printed to \LuaLaTeX{} by calling the |physical.Quantity.tosiunitx()| method. It is recommended to use a macro for this purpose. The preamble in the next section, simplifies the printing of quantities by the macros |\q{}|, |\qs{}| and |\qu{}|. \section{Loading} -This package is a pure Lua library. Therefore one has to require it explicitly by calling |require("physical")|. For printing physical quanties, the |siunitx| is supported. It's recommended to define a macro like |\q| to convert the lua quantity object to a |siunitx| expression. +By calling |require("physical")| the |lua-physical| library is loaded. The following \LuaLaTeX{} preamble loads the |lua-physical| package, does some configuration of the |siunitx| package and defines the macros |\q{}|, |\qs{}| and |\qu{}| for printing physical quantities. -The following \LaTeX{} preamble loads the |lua-physical| package and creates a macro |\q| for printing physical quantities. \nopagebreak + \begin{lstlisting}[language=Tex, caption=basic preamble, label=lst:basic preamble] \usepackage{luacode} \usepackage{siunitx} -% configure siunitx +% initialize the lua-physical package +\begin{luacode*} + physical = require("physical") + N = physical.Number +\end{luacode*} + +% configure the siunitx package \sisetup{ output-decimal-marker = {.}, per-mode = symbol, @@ -200,15 +210,10 @@ The following \LaTeX{} preamble loads the |lua-physical| package and creates a m round-mode = off } -% load the lua-physical package -\begin{luacode*} - physical = require("physical") - N = physical.Number -\end{luacode*} - - +% declare the unitless unit (siunitx package) +\DeclareSIUnit\unitless{} -% print a physical quantity +% print a quantity using the \SI{}{} macro. \newcommand{\q}[1]{% \directlua{ tex.print( @@ -219,9 +224,36 @@ The following \LaTeX{} preamble loads the |lua-physical| package and creates a m ) }% } -\end{lstlisting} +% print a quantity in scientific notation using \SI{}{} macro. +\newcommand{\qs}[1]{% + \directlua{ + tex.print( + physical.Quantity.tosiunitx( + #1, + "scientific-notation=true,exponent-to-prefix=false, + round-integer-to-decimal=true" + ) + ) + }% +} + +% print the unit of a quantity using the \si{} macro +\newcommand{\qu}[1]{% + \directlua{ + tex.print( + physical.Quantity.tosiunitx( + #1, + nil, + physical.Quantity.SIUNITX_si + ) + ) + }% +} + +\end{lstlisting} +\pagebreak \subsection{License} This code is freely distributable under the terms of the MIT license.\\ @@ -241,19 +273,19 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI \label{ch:usage} %------------------------------------------------------------ -Given the basic preamble, units can be used in lua code directly. By convention, all units have an underscore in front of them, i.e.\ meter is |_m|, second is |_s|. All available units are listed in section~\ref{ch:Supported Units}. The following example illustrates the use of this library. +Given the basic preamble~\ref{lst:basic preamble}, units can be used in lua code directly. By convention, all units have an underscore in front of them, i.e.\ meter is |_m|, second is |_s|. For a complete list of all available units, see section~\ref{ch:Supported Units}. The following example illustrates the use of this library. \begin{lstlisting}[caption=Velocity of a car.,label=lst:Car Velocity] \begin{luacode} - s = 10 * _m + d = 10 * _m t = 2 * _s - v = s/t + v = d / t \end{luacode} -A car travels $\q{s}$ in $\q{t}$. calculate its velocity. +A car travels $\q{d}$ in $\q{t}$. Calculate its velocity. % \begin{equation*} - v=\frac{s}{t} = \frac{\q{s}}{\q{t}} = \underline{\q{v}} + v=\frac{d}{t} = \frac{\q{d}}{\q{t}} = \underline{\q{v}} \end{equation*} \end{lstlisting} @@ -261,7 +293,7 @@ A car travels $\q{s}$ in $\q{t}$. calculate its velocity. s = 10 * _m t = 2 * _s - v = s/t + v = s / t \end{luacode} \leftbar @@ -272,7 +304,14 @@ A car travels $\q{s}$ in $\q{t}$. Calculate its velocity. \end{equation*} \endleftbar -In the above listing~\ref{lst:Car Velocity}, the variable |s| stands for displacement and has the unit meter |_m|, the variable |t| stands for time and is given in seconds |_s|. If mathematical operations are done on them, new physical quantities are created. In the problem above, the velocity |v| is calculated by dividing |s| by |t|. The instance |v| has the derived unit \si{\m\per\s}. By using the macro |\q{}| all quantities can be printed to the \LuaLaTeX{} code directly. + + + + + + + +In the above listing~\ref{lst:Car Velocity}, the variable |s| stands for displacement and has the unit meter |_m|, the variable |t| stands for time and is given in seconds |_s|. If physical quantities are divided or multiplied, derived quantities are created. In the example problem above, the velocity |v| has the unit |_m/_s|. By using the macro |\q{}| all quantities can be printed to the \LuaLaTeX{} code directly. @@ -280,9 +319,41 @@ In the above listing~\ref{lst:Car Velocity}, the variable |s| stands for displac %------------------------------------------------------------ \subsection{Unit conversion} -Very often, the result of a calculation has to be converted to another unit. In listing~\ref{lst:Volume of Cuboid} the task is to calculate the volume of a cuboid. The length of the edges are given in different units. The volume is calculated by multipling all three lengths, the unit of the result is \si{\cm\mm\m}. If the unit \si{\cm\cubed} is preferred, it has to be converted explicitly. The conversion function is called |to()| and is available on all physical quantitiy instances. At first this looks a bit cumbersome. The reason of this behaviour is, that the software is not able to guess the unit of the result. In many cases, like in the example here, it's not clear what unit the result sould have. Therefore the user has always to give the target unit explicitly. +It is often the case, that the result of a calculation has to be converted to other units. Lets assume, that in the problem of listing~\ref{lst:Car Velocity}, the velocity should be determined in |_km/_h|. This can be done using the |:to()| method, which is available on all quantity objects, see ~\ref{lst:Car Velocity2}. + + +\begin{lstlisting}[caption=Velocity of a car in kilometers per hour.,label=lst:Car Velocity2] +\begin{luacode} + d = 10 * _m + t = 2 * _s + v = (s / t):to(_km/_h) +\end{luacode} + +A car travels $\q{d}$ in $\q{t}$. Calculate its velocity in $\qu{_km/_h}$. +% +\begin{equation*} + v = \frac{d}{t} = \frac{\q{d}}{\q{t}} = \underline{\q{v}} +\end{equation*} +\end{lstlisting} + + +\begin{luacode} + d = 10 * _m + t = 2 * _s + + v = (d / t):to(_km/_h) +\end{luacode} + +\leftbar +A car travels $\q{d}$ in $\q{t}$. Calculate its velocity in $\qu{_km/_h}$. +% +\begin{equation*} + v = \frac{d}{t} = \frac{\q{d}}{\q{t}} = \underline{\q{v}} +\end{equation*} +\endleftbar + +Another example is given in listing~\ref{lst:Volume of Cuboid}. The task is to calculate the volume of a cuboid. The length of the edges are given in different units. The result of the multiplication has the unit \si{\cm\mm\m}. If the unit \si{\cm\cubed} is preferred, it has to be converted explicitly. At first this looks a bit cumbersome. The reason of this behaviour is, that the software is not able to guess the unit of the result. In many cases, like in the example problem, it's not clear what unit the volume should have. Is it |_m^3|, |_cm^3| or |_L|? The user has to give that convertion explicitly. -\pagebreak \begin{lstlisting}[caption=Volume of a cuboid.,label=lst:Volume of Cuboid] \begin{luacode} @@ -290,7 +361,7 @@ Very often, the result of a calculation has to be converted to another unit. In b = 150 * _mm c = 1.5 * _m - V = a*b*c + V = ( a * b * c ):to(_dm^3) \end{luacode} Find the volume of a rectangular cuboid with lengths $\q{a}$, @@ -299,8 +370,7 @@ $\q{b}$ and $\q{c}$. \begin{equation*} V= a \cdot b \cdot c = \q{a} \cdot \q{b} \cdot \q{c} - = \q{V} - = \underline{\q{V:to(_dm^3)}} + = \underline{\q{V}} \end{equation*} \end{lstlisting} @@ -309,7 +379,7 @@ $\q{b}$ and $\q{c}$. b = 150 * _mm c = 1.5 * _m - V = a*b*c + V = ( a * b * c ):to(_dm^3) \end{luacode} \leftbar @@ -319,17 +389,53 @@ Find the volume of a rectangular cuboid with lengths $\q{a}$, $\q{b}$ and $\q{c} V= a \cdot b \cdot c = \q{a} \cdot \q{b} \cdot \q{c} = \q{V} - = \underline{\q{V:to(_dm^3)}} + = \underline{\q{V}} \end{equation*} \endleftbar +The |siunitx| package has definitions or all SI units plus some non-SI units. If a quantity has a unit, which is not defined by the |siunitx| package, it has to be declared using the |\DeclareSIUnit| macro. + +\begin{lstlisting}[caption=Non-SI units.,label=lst:Non-SI units] +% add this declaration to the preamble +\DeclareSIUnit\inch{in} + + +% document +\begin{luacode} + l = 12 * _in +\end{luacode} + +Convert $\q{l}$ to the unit $\qu{_cm}$. +% +\begin{equation*} + l = \q{l} \cdot \frac{\q{_in:to(_cm)}}{\qu{_in}} = \q{l:to(_cm)} +\end{equation*} +\end{lstlisting} + +\begin{luacode} + l = 12 * _in +\end{luacode} + +\leftbar +Convert $\q{l}$ (inches) to the unit $\qu{_cm}$. +% +\begin{equation*} + l = \q{l} \cdot \frac{\q{_in:to(_cm)}}{\qu{_in}} = \underline{ \q{l:to(_cm)} } +\end{equation*} +\endleftbar + + + + + + %------------------------------------------------------------ \subsubsection{Temperature Conversion} -Most physical units transform linearly. Exceptions are the unit degree Celsius |_degC| and degree Fahrenheit |_degF|. These units are ambigous and can be interpreted as temperature differences or as an absolute temperatures. In the latter case, the conversion to base units is not a linear, but an affine transformation. This is because degree Celsius and degree Fahrenheit scales have their zero points at different temperatures compared to the unit Kelvin. +Most physical units transform linearly. Exceptions are temperature units lie degree Celsius |_degC| and degree Fahrenheit |_degF|. These units are ambigous and can be interpreted as temperature differences or as an absolute temperatures. In the latter case, the conversion to base units is not a linear, but an affine transformation. This is because degree Celsius and degree Fahrenheit scales have their zero points at different temperatures compared to the unit Kelvin. By default |_degC| and |_degF| units are temperature differences. If one wants to have it converted absolutely, it has to be done adding / subtracting |_degC_0 = 273.15*_K| or |_degF_0 = (273.15 - 32*(5/9)) * _K|, the zero point temperatures of the scales. @@ -402,61 +508,61 @@ In the following problem, listing~\ref{lst:temperature conversion}, the task is + + + %------------------------------------------------------------ \subsection{Uncertainty Propagation} -The package supports uncertainty propagation. To create a number with an uncertainty, an instance of |physical.Number| has to be created, see listing~\ref{lst:rectangular area}. It has to be remembered, that |N| is a alias for |physical.Number|. The first argument of the constructor |N(mean, uncertainty)| is the mean value and the second one the uncertainty of the measurement. If the proposed preamble \ref{lst:basic preamble} is used, the uncertainty is by default seperated from the mean value by a plus-minus sign. +The |lua-physical| library supports uncertainty propagation. To create a number with an uncertainty, an instance of |physical.Number| has to be created. It has to be remembered, that |N| is a alias for |physical.Number|. The first argument of the constructor |N(mean, uncertainty)| is the mean value and the second one the uncertainty of the measurement. For the uncertainty propagation the gaussian formula \begin{equation*} \Delta f = \sqrt{ \left(\frac{\partial f}{x_1} \cdot \Delta x_1\right)^2 + \dots + \left(\frac{\partial f}{x_n} \cdot \Delta x_2 \right)^2 } \end{equation*} -is used. This formula is a good estimation for the uncertainty $\Delta f$, if the quantities $x_1, \dots, x_n$ the function $f$ depends on, have no correlation. Further, the function $f$ has to change linear, if quantities $x_i$ are changed in the range of their uncertainties. +is used. This formula is a good estimation for the uncertainty $\Delta f$, if the quantities $x_1, \dots, x_n$ the function $f$ depends on, have no correlation. Further, the function $f$ has to change linearly, if quantities $x_i$ are changed in the range of their uncertainties. +The example in listing~\ref{lst:Time of flight} shows the usage of |N()|. At the defintion of the distance and the speed of light, the constants are given with full precision, i.e. The distance |_au| is $\q{_au:to(_km)}$ and |_c| is $\q{_c:to(_km/_s)}$. By multipling these quantities with $|N(1,0.0001)|$ the precision is reduced. The uncertainty propagation takes care of rounding the resulting time |t| to the correct precision. For printing, the macro |\qs{}| for scientific notation is used. -\begin{lstlisting}[caption=Uncertainty in area calculation.,label=lst:rectangular area] -\begin{luacode} - a = N(2,0.1) * _m - b = N(3,0.1) * _m +\begin{lstlisting}[caption=Time of flight.,label=lst:Time of flight] - A = (a*b):to(_m^2) +\begin{luacode} + d = N(1,0.0001) * ( _au ):to(_km) + v = N(1,0.0001) * ( _c ):to(_km/_s) + t = ( d/v ):to(_min) \end{luacode} -Calculate the area of a rectangle with lengths $\q{a}$ and $\q{b}$. +Calculate the time, a lightray travels from the surface of the sun to the earth. +The mean distance from the sun to the eart is $\qs{d}$. The speed of light is $\qs{v}$. % \begin{equation*} - A = a \cdot b - = \q{a} \cdot \q{b} - = \underline{\q{A}} + t = \frac{d}{v} = \frac{\q{d}}{\q{v}} = \underline{\q{t}} \end{equation*} \end{lstlisting} \begin{luacode} - a = N(2,0.1) * _m - b = N(3,0.1) * _m - - A = (a*b):to(_m^2) + N.omitUncertainty = true + d = N(1,0.0001) * ( _au ):to(_km) + v = N(1,0.0001) * ( _c ):to(_km/_s) + t = ( d/v ):to(_min) \end{luacode} \leftbar -Calculate the area of a rectangle with lengths $\q{a}$ and $\q{b}$. +Calculate the time, a lightray travels from the surface of the sun to the earth. +The mean distance from the sun to the eart is $\qs{d}$. The speed of light is $\qs{v}$. % \begin{equation*} - A = a \cdot b - = \q{a} \cdot \q{b} - = \underline{\q{A}} + t = \frac{d}{v} = \frac{\qs{d}}{\qs{v}} = \underline{\q{t}} \end{equation*} \endleftbar - -Instead of printing the uncertainties, one can use the uncertainty calculation to provide significant digits and omit it. - -In the following problem, listing~\ref{lst:volume of ideal gas}, the task is to find the volume of an ideal gas. Given are pressure |p| in |_bar|, amount of substance |n| in |_mol| and temperature |T| in degree celsius |_degC|. In order to do the calculation, one has to convert |T|, which is given as an absolute temperature in degree celsius to the base unit Kelvin first. By setting |N.omitUncertainty = true|, all uncertainties are not printed. +Another example is given in listing~\ref{lst:volume of ideal gas}, the task is to find the volume of an ideal gas. Given are pressure |p| in |_bar|, amount of substance |n| in |_mol| and absolute temperature |T| in degree celsius |_degC|. \begin{lstlisting}[caption=Volume of an ideal gas.,label=lst:volume of ideal gas] \begin{luacode} N.omitUncertainty = true + p = N(1.013,0.0001) * _bar n = N(1,0.01) * _mol T = N(30,0.1) * _degC @@ -476,6 +582,7 @@ An ideal gas ($\q{n}$) has a pressure of $\q{p}$ and a temperature of $\q{T}$. C \begin{luacode} N.omitUncertainty = true + p = N(1.013,0.0001) * _bar n = N(1,0.01) * _mol T = N(30,0.1) * _degC @@ -492,7 +599,51 @@ An ideal gas ($\q{n}$) has a pressure of $\q{p}$ and a temperature of $\q{T}$. C \end{equation*} \endleftbar -This example shows, that the result has only two digits. If more digits are needed, the uncertainties of the given quantities should be smaller. +This example shows, that the result has only two digits. If more digits are needed, the uncertainties of the given quantities should be made smaller. + + + +%------------------------------------------------------------ +\subsubsection{Print the Uncertainty explicitly} + +It is possible to print the uncertainty explicitly. By default the parameter |N.omitUncertainty| is set to |true|. In listing~\ref{lst:rectangular area} it is set to |false| and the uncertainty is printed. + + +\begin{lstlisting}[caption=Uncertainty in area calculation.,label=lst:rectangular area] +\begin{luacode} + N.omitUncertainty = false + + a = N(2,0.1) * _m + b = N(3,0.1) * _m + + A = ( a * b ):to(_m^2) +\end{luacode} + +Calculate the area of a rectangle with lengths $\q{a}$ and $\q{b}$. +% +\begin{equation*} + A = a \cdot b + = \q{a} \cdot \q{b} + = \underline{\q{A}} +\end{equation*} +\end{lstlisting} + +\begin{luacode} + N.omitUncertainty = false + + a = N(2,0.1) * _m + b = N(3,0.1) * _m + + A = ( a * b ):to(_m^2) +\end{luacode} + +Calculate the area of a rectangle with lengths $\q{a}$ and $\q{b}$. +% +\begin{equation*} + A = a \cdot b + = \q{a} \cdot \q{b} + = \underline{\q{A}} +\end{equation*} @@ -561,10 +712,6 @@ N_0 * Q.exp(-lambda * t) - - - - %------------------------------------------------------------ \newpage \section{Supported Units} @@ -681,6 +828,12 @@ yobi & |Yi| & |1208925819614629174706176| \\ + + + + + + %------------------------------------------------------------ \subsection{Base Units} \label{ch:base units} @@ -700,7 +853,7 @@ The |lua-physical| library has nine base quantities. These are the seven basis u \thead{Quantity} & \thead{Unit} & \thead{Symbol} & \thead{Dim.} & \thead{Definition} \\\hline number \protect\footnotemark & --- & +unitless & |_1| & $\mathrm{1}$ & The dimensionless number one. \\ @@ -723,7 +876,7 @@ The SI unit of length. It is defined by taking the fixed numercial value of the \end{table} \footnotetext[1]{ - The number one is a unit with dimension zero. Stricly speaking it is not a base unit. + The number one is a unit with dimension zero. It is not a base unit stricty speaking. } @@ -795,6 +948,55 @@ The value of the currency Euro. \\\hline +% lua function for printing dimension names. +\begin{luacode} +function getdim(q) + local str = q.dimension:__tostring() + + str = string.gsub(str,"%[","") + str = string.gsub(str,"%]","") + + return str +end + +function strtoidx(str) + local s,n = string.gsub(str,"%_","\\_") + return s +end +\end{luacode} + +% print unit table +\newcommand{\unittable}[1]{ + \begin{table}[H] + \centering + \begin{tabularx}{\linewidth}{% + >{\setlength\hsize{1\hsize}}X% + l% + l% + >{\setlength\hsize{1\hsize}}X% + } + \thead{Quantity} & \thead{Unit} & \thead{Symbol} & \thead{Definition} \\\hline + + #1 + + \hline + \end{tabularx} + \end{table} +} + +% print unit table row +\newcommand{\printunit}[3][]{ + \ifthenelse{\equal{#1}{}}{ + \directlua{tex.print(getdim(#2))} + }{ + #1 + } & + \directlua{tex.print(#2.unit.name)} & + |#2| & + \mbox{|#3|}\index[unit]{\directlua{tex.print(#2.unit.name)} \texttt{\directlua{tex.print( strtoidx("#2") )}}} \\ +} + + %------------------------------------------------------------ \newpage @@ -807,7 +1009,7 @@ All physical constants are taken from the NIST webpage \cite{nist19}. \newcommand{\printconstant}[2]{ \directlua{tex.print(#1.unit.name)} & |#1| & - \mbox{|#2|}\index[unit]{\directlua{tex.print(#1.unit.name)} \texttt{\directlua{tex.print( strtoidx("#1") )}}}\\ + \mbox{|#2|}\index[unit]{\directlua{tex.print(#1.unit.name)} \texttt{\directlua{tex.print(strtoidx("#1"))}}}\\ } \begin{table}[H] @@ -879,55 +1081,6 @@ All physical constants are taken from the NIST webpage \cite{nist19}. \label{ch:coherent derived units} All units in this section are coherent derived units from the SI base units with special names, \cite[118]{bipm06}. - -% lua function for printing dimension names. -\begin{luacode} -function getdim(q) - local str = q.dimension:__tostring() - - str = string.gsub(str,"%[","") - str = string.gsub(str,"%]","") - - return str -end - -function strtoidx(str) - local s,n = string.gsub(str,"%_","\\_") - return s -end -\end{luacode} - -% print unit table -\newcommand{\unittable}[1]{ - \begin{table}[H] - \centering - \begin{tabularx}{\linewidth}{% - >{\setlength\hsize{1\hsize}}X% - l% - l% - >{\setlength\hsize{1\hsize}}X% - } - \thead{Quantity} & \thead{Unit} & \thead{Symbol} & \thead{Definition} \\\hline - - #1 - - \hline - \end{tabularx} - \end{table} -} - -% print unit table row -\newcommand{\printunit}[3][]{ - \ifthenelse{\equal{#1}{}}{ - \directlua{tex.print(getdim(#2))} - }{ - #1 - } & - \directlua{tex.print(#2.unit.name)} & - |#2| & - \mbox{|#3|}\index[unit]{\directlua{tex.print(#2.unit.name)} \texttt{\directlua{tex.print( strtoidx("#2") )}}} \\ -} - \unittable{ \printunit[Plane Angle\protect\footnotemark]{_rad}{_1} \printunit[Solid Angle\protect\footnotemark]{_sr}{_rad^2} @@ -1021,6 +1174,11 @@ The nominal values of solar, terrestrial and jovial quantities are taken from IA +The mass of the sun is proposed to be used as the astronomical mass unit. +%\unittable{ +% \printunit[Mass]{_M_S}{N(1.98847e30,0.00007e30) * _kg} +%} + %------------------------------------------------------------ \newpage @@ -1399,6 +1557,8 @@ International currency which are pegged to other currencies. % shortcut for method definitions \newcommand{\method}[2]{\subsection*{|#1.#2|}\index[lua]{\texttt{#1.#2}}} +\newcommand{\variable}[2]{\subsection*{|#1.#2|}\index[lua]{\texttt{#1.#2}}} + \newcommand{\subtitle}[1]{\noindent \\\textbf{#1}} % set listings language to lua @@ -2369,11 +2529,109 @@ N.seperateUncertainty = true N.format = N.DECIMAL \end{luacode} -It does arithmetics with gaussian error propagation. A number instance has a mean value called |x| and an uncertainty value called |dx|. +This class enhances the Lua number with an uncertainty and gaussian error propagation. A number instance has a mean value called |x| and an uncertainty value called |dx|. + + + +\variable{N}{omitUncertainty=true} +\begin{quote} +This variable controls, wether the uncertainty |dx| is printed or not. The default value is |true|, i.e. the uncertainty is omitted. +\end{quote} + +\begin{lstlisting} +n = N(45,0.012) + +N.omitUncertainty = false +print(n) +` +\begin{luacode} +n = N(45,0.012) + +N.omitUncertainty = false +tex.write(tostring(n)) +\end{luacode} +` + +N.omitUncertainty = true +print(n) +` +\begin{luacode} +N.omitUncertainty = true +tex.write(tostring(n)) +\end{luacode} +` +\end{lstlisting} + + +\variable{N}{seperateUncertainty=true} +\begin{quote} +This variable controls, how the uncertainty is printed. If set to |false|, the parenthesis notation is used. If set to |true| the plus minus notation is used. The default value is |true|. +\end{quote} + +\begin{lstlisting} +n = N(56,0.025) + +N.seperateUncertainty = false +print(n) +` +\begin{luacode} +n = N(56,0.025) + +N.omitUncertainty = false +N.seperateUncertainty = false + +tex.write(tostring(n)) +\end{luacode} +` + +N.seperateUncertainty = true +print(n) +` +\begin{luacode} +N.seperateUncertainty = true +tex.write(tostring(n)) +\end{luacode} +` +\end{lstlisting} + + +\variable{N}{format=N.SCIENTIFIC} +\begin{quote} +This variable controls, how the number is printed. If set to |N.SCIENTIFIC|, scientific notation is used. If set to |N.DECIMAL| the decimal notation is used. The default value is |N.SCIENTIFIC|. +\end{quote} + +\begin{lstlisting} +n = N(12000000,0.1) + +N.format = N.SCIENTIFIC +print(n) +` +\begin{luacode} +n = N(12000000,0.1) + +N.omitUncertainty = true + +N.format = N.SCIENTIFIC + +tex.write(tostring(n)) +\end{luacode} +` + +N.format = N.DECIMAL +print(n) +` +\begin{luacode} +N.format = N.DECIMAL +tex.write(tostring(n)) +\end{luacode} +` +\end{lstlisting} + + \method{N}{new(n=nil)} \begin{quote} - This is the copy Constructor. It copies a given number object. If |n| is |nil|, an instance representing number zero with uncertainty zero is created. + This is the copy Constructor for the |Number| class. It copies a given number object. If |n| is |nil|, an instance representing number zero with uncertainty zero is created. \begin{description} \item |n| : |Number|\\ @@ -2477,6 +2735,38 @@ tex.write(tostring(n_4)) \end{quote} +\method{N}{tosiunitx()} +\begin{quote} + Converts the number to an siunitx string. + + \subtitle{Parameters / Return} + \begin{description} + \item returns : |string| + \end{description} + +\begin{lstlisting} +N.omitUncertainty = false +N.seperateUncertainty = true + +n = N(5.25,0.0045) +print( n:tosiunitx() ) +` +\begin{luacode} +N.omitUncertainty = false +N.seperateUncertainty = true + +n = N(1.25,0.0023) +tex.write(tostring(n:tosiunitx())) + +N.omitUncertainty = true +N.seperateUncertainty = false +\end{luacode} +` +\end{lstlisting} + +\end{quote} + + \method{N}{mean(n)} \begin{quote} @@ -2730,11 +3020,11 @@ tex.write(tostring(n:cos())) \begin{lstlisting} -n = N(1.5,0.01) +n = N(1.5,0.001) print( n:tan() ) ` \begin{luacode} -n = N(1.5,0.01) +n = N(1.5,0.001) tex.write(tostring(n:tan())) \end{luacode} ` @@ -2761,11 +3051,11 @@ tex.write(tostring(n:tan())) \begin{lstlisting} -n = N(0.99,0.1) +n = N(0.99,0.001) print( n:asin() ) ` \begin{luacode} -n = N(0.99,0.1) +n = N(0.99,0.001) tex.write(tostring(n:asin())) \end{luacode} ` @@ -2792,11 +3082,11 @@ tex.write(tostring(n:asin())) \begin{lstlisting} -n = N(0.99,0.1) +n = N(0.99,0.001) print( n:acos() ) ` \begin{luacode} -n = N(0.99,0.1) +n = N(0.99,0.001) tex.write(tostring(n:acos())) \end{luacode} ` @@ -2823,11 +3113,11 @@ tex.write(tostring(n:acos())) \begin{lstlisting} -n = N(1,0.1) +n = N(1,0.001) print( n:atan() ) ` \begin{luacode} -n = N(1,0.1) +n = N(1,0.001) tex.write(tostring(n:atan())) \end{luacode} ` @@ -2859,11 +3149,11 @@ tex.write(tostring(n:atan())) \begin{lstlisting} -n = N(1,0.1) +n = N(1,0.001) print( n:sinh() ) ` \begin{luacode} -n = N(1,0.1) +n = N(1,0.001) tex.write(tostring(n:sinh())) \end{luacode} ` @@ -2895,11 +3185,11 @@ tex.write(tostring(n:sinh())) \end{align*} \begin{lstlisting} -n = N(1,0.1) +n = N(1,0.001) print( n:cosh() ) ` \begin{luacode} -n = N(1,0.1) +n = N(1,0.001) tex.write(tostring(n:cosh())) \end{luacode} ` @@ -2932,11 +3222,11 @@ tex.write(tostring(n:cosh())) \begin{lstlisting} -n = N(1,0.1) +n = N(1,0.001) print( n:tanh() ) ` \begin{luacode} -n = N(1,0.1) +n = N(1,0.001) tex.write(tostring(n:tanh())) \end{luacode} ` @@ -2969,11 +3259,11 @@ tex.write(tostring(n:tanh())) \begin{lstlisting} -n = N(1,0.1) +n = N(1,0.001) print( n:asinh() ) ` \begin{luacode} -n = N(1,0.1) +n = N(1,0.001) tex.write(tostring(n:asinh())) \end{luacode} ` @@ -3007,11 +3297,11 @@ tex.write(tostring(n:asinh())) \begin{lstlisting} -n = N(1,0.1) +n = N(2,0.001) print( n:acosh() ) ` \begin{luacode} -n = N(1,0.1) +n = N(2,0.001) tex.write(tostring(n:acosh())) \end{luacode} ` @@ -3044,11 +3334,11 @@ tex.write(tostring(n:acosh())) \begin{lstlisting} -n = N(1,0.1) +n = N(-0.5,0.0001) print( n:atanh() ) ` \begin{luacode} -n = N(1,0.1) +n = N(-0.5,0.0001) tex.write(tostring(n:atanh())) \end{luacode} ` @@ -3077,13 +3367,22 @@ tex.write(tostring(n:atanh())) \vspace{1em} } +\vhist{V1.0.5}{2021/05/08}{Minor release}{ + The unitmacro |\textbackslash number| had some collision with other packages. The unitless unit has been renamed from |\textbackslash number| to |\textbackslash unitless|. The declaration in the preamble |\textbackslash DeclareSIUnit\textbackslash number\{\}| has therefore to be replaced with |\textbackslash DeclareSIUnit\textbackslash unitless\{\}|. \\ + \ \\ + The parsing of uncertainty values in the package |siunitx| has changed. It was incompatible with the output of |Number.\_\_tostring()|. To mitigate this issue a new method |Number.tosiunitx()| has been added. +} + +\vhist{V1.0.4}{2020/09/15}{Minor release}{ + Changed default value of |Number.omitUncertainty| and |Number.seperateUncertainty| to |true|. Documentation added. +} \vhist{V1.0.3}{2020/09/09}{Minor release}{ Changed foldername |physical| to |src|. Changed Classvariables |Q.siunitx\_SI|, |Q.siunitx\_num| and |Q.siunitx\_si| to uppercase |Q.SIUNITX\_SI|, |Q.SIUNITX\_num| and |Q.SIUNITX\_si|. } \vhist{V1.0.2}{2020/09/07}{Minor release}{ - Path issues resolved. Docs corrected. + Path issues resolved. Documentation added. } \vhist{V1.0.1}{2020/09/05}{Minor release}{ @@ -3119,4 +3418,9 @@ tex.write(tostring(n:atanh())) \printindex[lua] + + + + + \end{document} diff --git a/macros/luatex/latex/lua-physical/lua-physical_example.pdf b/macros/luatex/latex/lua-physical/lua-physical_example.pdf Binary files differnew file mode 100644 index 0000000000..729338946a --- /dev/null +++ b/macros/luatex/latex/lua-physical/lua-physical_example.pdf diff --git a/macros/luatex/latex/lua-physical/lua-physical_example.tex b/macros/luatex/latex/lua-physical/lua-physical_example.tex new file mode 100644 index 0000000000..70c729193d --- /dev/null +++ b/macros/luatex/latex/lua-physical/lua-physical_example.tex @@ -0,0 +1,138 @@ +%!TEX program = lualatex + +% Copyright (c) 2021 Thomas Jenni + +% Permission is hereby granted, free of charge, to any person obtaining a copy +% of this software and associated documentation files (the "Software"), to deal +% in the Software without restriction, including without limitation the rights +% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +% copies of the Software, and to permit persons to whom the Software is +% furnished to do so, subject to the following conditions: + +% The above copyright notice and this permission notice shall be included in all +% copies or substantial portions of the Software. + +% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +% SOFTWARE. + +\documentclass{article} + +\usepackage{luacode} +\usepackage{siunitx} +\usepackage{amsmath} + +% siunitx config +\sisetup{ + output-decimal-marker = {.}, + per-mode = symbol, + separate-uncertainty = false, + add-decimal-zero = true, + exponent-product = \cdot, + round-mode=off +} + +% empty unit +\DeclareSIUnit\unitless{} + +\DeclareSIUnit\inch{in} + +% init lua-physical +\begin{luacode} +physical = require("physical") +N = physical.Number +\end{luacode} + + +\newcommand{\q}[1]{% + \directlua{tex.print(physical.Quantity.tosiunitx(#1,"add-decimal-zero=true,scientific-notation=fixed,exponent-to-prefix=false"))}% +} + +\newcommand{\qs}[1]{% + \directlua{tex.print(physical.Quantity.tosiunitx(#1,"scientific-notation=true,exponent-to-prefix=false,round-integer-to-decimal=true"))}% +} + +\newcommand{\qt}[1]{% + \directlua{tex.print(physical.Quantity.tosiunitx(#1,"scientific-notation=engineering,exponent-to-prefix=true,round-integer-to-decimal=true"))}% +} + +\newcommand{\qn}[1]{% + \directlua{tex.print(physical.Quantity.tosiunitx(#1,"add-decimal-zero=true,scientific-notation=fixed,exponent-to-prefix=false",1))}% +} + +\newcommand{\qu}[1]{% + \directlua{tex.print(physical.Quantity.tosiunitx(#1,nil,2))}% +} + + + + + +\begin{document} + +\section*{Example for the {\tt lua-physical} package}. + +Compile this Lua\LaTeX file with the command `{\tt lualatex lua-physical\_example.tex}'. + + + +\begin{enumerate} + +\begin{luacode} +a = 12 * _cm +b = 150 * _mm +c = 1.5 * _m + +V = ( a * b * c ):to(_dm^3) +\end{luacode} + +\item Find the volume of a cuboid with lengths $\q{a}$, +$\q{b}$ and $\q{c}$. +% +\begin{equation*} + V= a \cdot b \cdot c + = \q{a} \cdot \q{b} \cdot \q{c} + = \underline{\q{V}} +\end{equation*} + + + + + +\begin{luacode} +l = 12 * _in +\end{luacode} + +\item Convert $\q{l}$ to the unit $\qu{_cm}$. +% +\begin{equation*} + l = \q{l} \cdot \frac{\q{_in:to(_cm)}}{\qu{_in}} = \q{l:to(_cm)} +\end{equation*} + + + + + +\begin{luacode} +N.omitUncertainty = true + +d = N(1,0.0001) * ( _au ):to(_km) +v = N(1,0.0001) * ( _c ):to(_km/_s) +t = ( d/v ):to(_min) +\end{luacode} + +\item Calculate the time, a lightray travels from the surface of the sun to the earth. +The mean distance from the sun to the eart is $\qs{d}$. The speed of light is $\q{v}$. +% +\begin{equation*} + t = \frac{d}{v} = \frac{\qs{d}}{\q{v}} = \underline{\q{t}} +\end{equation*} + +\end{enumerate} + + +\end{document} diff --git a/macros/luatex/latex/lua-physical/src/physical-astronomical.lua b/macros/luatex/latex/lua-physical/src/physical-astronomical.lua index 48ca5646b8..629832b879 100644 --- a/macros/luatex/latex/lua-physical/src/physical-astronomical.lua +++ b/macros/luatex/latex/lua-physical/src/physical-astronomical.lua @@ -1,7 +1,7 @@ --[[ Astronomical data -Copyright (c) 2020 Thomas Jenni +Copyright (c) 2021 Thomas Jenni Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/macros/luatex/latex/lua-physical/src/physical-data.lua b/macros/luatex/latex/lua-physical/src/physical-data.lua index efc1a30ffa..f77eee9f8d 100644 --- a/macros/luatex/latex/lua-physical/src/physical-data.lua +++ b/macros/luatex/latex/lua-physical/src/physical-data.lua @@ -1,7 +1,7 @@ --[[ This file contains the methods for accessing physical data. -Copyright (c) 2020 Thomas Jenni +Copyright (c) 2021 Thomas Jenni Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/macros/luatex/latex/lua-physical/src/physical-definition.lua b/macros/luatex/latex/lua-physical/src/physical-definition.lua index cf1576b4c5..5e0ec79a73 100644 --- a/macros/luatex/latex/lua-physical/src/physical-definition.lua +++ b/macros/luatex/latex/lua-physical/src/physical-definition.lua @@ -2,7 +2,7 @@ This file contains the definitions for dimensions, prefixes, SI, Imperial and U.S. Survey units -Copyright (c) 2020 Thomas Jenni +Copyright (c) 2021 Thomas Jenni Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -119,7 +119,7 @@ Q.definePrefix("Ki", "kibi", 1024) local IEC_prefixes = {"Ki","Mi","Gi","Ti","Pi","Ei","Zi","Yi"} -- define the dimensionless base quantity for real numbers -Q.define("1", "number", Q(1)) +Q.define("1", "unitless", Q(1)) -- define SI base units Q.defineBase("m", "meter", L) @@ -276,6 +276,8 @@ Q.define("t", "tonne", 1e3 * _kg) -- https://arxiv.org/pdf/1605.09788.pdf -- https://arxiv.org/pdf/1510.07674.pdf +Q.define("mag", "magnitude", _1) + Q.define("R_S_nom", "nomsolradius", 6.957e8 * _m) Q.define("S_S_nom", "nomsolirradiance", 1361 * _W/_m^2) Q.define("L_S_nom", "nomsolluminosity", 3.828e26 * _W) @@ -290,6 +292,8 @@ Q.define("Re_J_nom", "nomjoveqradius", 7.1492e7 * _m) Q.define("Rp_J_nom", "nomjovpolradius", 6.6854e7 * _m) Q.define("GM_J_nom", "nomjovmassparameter", 1.2668653e17 * _m^3*_s^-2) +Q.define("M_S", "solmass", N(1.98847e30,0.00007e30) * _kg) + diff --git a/macros/luatex/latex/lua-physical/src/physical-dimension.lua b/macros/luatex/latex/lua-physical/src/physical-dimension.lua index edd9e65997..03cf315b74 100644 --- a/macros/luatex/latex/lua-physical/src/physical-dimension.lua +++ b/macros/luatex/latex/lua-physical/src/physical-dimension.lua @@ -3,7 +3,7 @@ The Dimension class keeps track of the dimenionality of a physical quantity. It can be used to perform validity checks on mathematical operations such as addition and subtraction. -Copyright (c) 2020 Thomas Jenni +Copyright (c) 2021 Thomas Jenni Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/macros/luatex/latex/lua-physical/src/physical-number.lua b/macros/luatex/latex/lua-physical/src/physical-number.lua index 8c278aacfe..bd6a01e451 100644 --- a/macros/luatex/latex/lua-physical/src/physical-number.lua +++ b/macros/luatex/latex/lua-physical/src/physical-number.lua @@ -2,7 +2,7 @@ This file contains the number class which allows to do calculations with uncertainties. -Copyright (c) 2020 Thomas Jenni +Copyright (c) 2021 Thomas Jenni Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -39,12 +39,12 @@ setmetatable(Number, { -- allows to set a default uncertainty, i.e. (5.6) will become (5.60 +/- 0.05) Number.defaultUncertainty = 0.5 --- Switch for writing uncertainty or not -Number.omitUncertainty = false +-- Switch for writing the uncertainty or not +Number.omitUncertainty = true -- If true, the plus-minus notation will be used, otherwise the uncertainty -- will be appended to the value in parentheses. -Number.seperateUncertainty = false +Number.seperateUncertainty = true -- number format "decimal" or "scientific" Number.DECIMAL = 0 @@ -196,12 +196,20 @@ end -- plus minus notation, i.e. (5.040 +/- 0.001) -function Number:toPlusMinusNotation(format) +function Number:toPlusMinusNotation(format, parenthesis, pmsign) if format == nil then format = Number.format end + if parenthesis == nil then + parenthesis = true + end + + if pmsign == nil then + pmsign = " +/- " + end + local m, e = self._frexp(self._x) local dm, de = self._frexp(self._dx) @@ -216,13 +224,15 @@ function Number:toPlusMinusNotation(format) -- In the decimal format, the numbers are given as decimals, i.e. (0.02 +/- 0.001) if format == Number.DECIMAL then if de - udigit >= 0 then - str = self._flt2str(self._x, 0).." +/- "..self._flt2str(self._dx, 0) + str = self._flt2str(self._x, 0)..pmsign..self._flt2str(self._dx, 0) else local digits = math.abs(-de + udigit) - str = self._flt2str(self._x, digits).." +/- "..self._flt2str(self._dx, digits) + str = self._flt2str(self._x, digits)..pmsign..self._flt2str(self._dx, digits) end - str = "("..str..")" + if parenthesis then + str = "("..str..")" + end -- In the scientific format, the numbers are written with powers of ten, i.e. (2.0 +/- 0.1) e-2 elseif format == Number.SCIENTIFIC then @@ -232,13 +242,15 @@ function Number:toPlusMinusNotation(format) de = de - e if de >= 0 then - str = self._flt2str(m, 0).." +/- "..self._flt2str(dm, 0) + str = self._flt2str(m, 0)..pmsign..self._flt2str(dm, 0) else local digits = math.abs(-de + udigit) - str = self._flt2str(m, digits).." +/- "..self._flt2str(dm, digits) + str = self._flt2str(m, digits)..pmsign..self._flt2str(dm, digits) end - str = "("..str..")" + if parenthesis then + str = "("..str..")" + end if e ~= 0 then str = str.."e"..e @@ -341,6 +353,24 @@ function Number:__tostring() end +-- convert number to a string +function Number:tosiunitx() + + if self._dx == 0 then + return tostring(self._x) + + elseif Number.omitUncertainty then + return self:toOmitUncertaintyNotation() + + elseif Number.seperateUncertainty then + return self:toPlusMinusNotation(Number.format, false, "+-") + + else + return self:toParenthesisNotation() + end + +end + -- equal -- Two physical numbers are equal if they have the same value and uncertainty function Number.__eq(n1,n2) diff --git a/macros/luatex/latex/lua-physical/src/physical-quantity.lua b/macros/luatex/latex/lua-physical/src/physical-quantity.lua index d89fdd2836..875a2ee38d 100644 --- a/macros/luatex/latex/lua-physical/src/physical-quantity.lua +++ b/macros/luatex/latex/lua-physical/src/physical-quantity.lua @@ -1,7 +1,7 @@ --[[ This file contains the quantity class -Copyright (c) 2020 Thomas Jenni +Copyright (c) 2021 Thomas Jenni Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -424,10 +424,18 @@ function Quantity:tosiunitx(param,mode) end if mode == Quantity.SIUNITX_SI then - return "\\SI"..param.."{"..tostring(self.value).."}".."{"..self.unit:tosiunitx().."}" + if type(self.value) == "number" then + return "\\SI"..param.."{"..tostring(self.value).."}".."{"..self.unit:tosiunitx().."}" + else + return "\\SI"..param.."{"..self.value:tosiunitx().."}".."{"..self.unit:tosiunitx().."}" + end elseif mode == Quantity.SIUNITX_num then - return "\\num"..param.."{"..tostring(self.value).."}" + if type(self.value) == "number" then + return "\\num"..param.."{"..tostring(self.value).."}" + else + return "\\num"..param.."{"..self.value:tosiunitx().."}" + end elseif mode == Quantity.SIUNITX_si then return "\\si"..param.."{"..self.unit:tosiunitx().."}" diff --git a/macros/luatex/latex/lua-physical/src/physical-unit.lua b/macros/luatex/latex/lua-physical/src/physical-unit.lua index 65c016449b..5c20722fe1 100644 --- a/macros/luatex/latex/lua-physical/src/physical-unit.lua +++ b/macros/luatex/latex/lua-physical/src/physical-unit.lua @@ -2,7 +2,7 @@ This file contains the unit class. It task is keeping track of the unit terms. -Copyright (c) 2020 Thomas Jenni +Copyright (c) 2021 Thomas Jenni Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/macros/luatex/latex/lua-physical/src/physical.lua b/macros/luatex/latex/lua-physical/src/physical.lua index 8c8d30171b..6964687357 100644 --- a/macros/luatex/latex/lua-physical/src/physical.lua +++ b/macros/luatex/latex/lua-physical/src/physical.lua @@ -3,8 +3,8 @@ lua-physical Author: Thomas Jenni -Version: 1.0.3 -Date: 2020-09-09 +Version: 1.0.5 +Date: 2021-05-08 License: MIT |