From 60e9a31bad8271499f6b5f9280174e76bd62814f Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 19 Dec 2023 03:00:50 +0000 Subject: CTAN sync 202312190300 --- macros/latex/contrib/jnuexam/README | 2 +- macros/latex/contrib/jnuexam/exam-a-answer.pdf | Bin 109655 -> 109643 bytes macros/latex/contrib/jnuexam/exam-a-empty.pdf | Bin 95853 -> 95848 bytes macros/latex/contrib/jnuexam/exam-b-answer.pdf | Bin 109567 -> 109569 bytes macros/latex/contrib/jnuexam/exam-b-empty.pdf | Bin 95809 -> 95796 bytes macros/latex/contrib/jnuexam/jnuexam.cls | 125 +- macros/latex/contrib/jnuexam/jnuexam.pdf | Bin 81129 -> 81144 bytes macros/latex/contrib/jwjournal/README.md | 5 + .../latex/contrib/jwjournal/jwjournal-demo-cn.pdf | Bin 120740 -> 125619 bytes .../latex/contrib/jwjournal/jwjournal-demo-cn.tex | 31 +- .../latex/contrib/jwjournal/jwjournal-demo-en.pdf | Bin 77414 -> 83515 bytes .../latex/contrib/jwjournal/jwjournal-demo-en.tex | 30 +- .../latex/contrib/jwjournal/jwjournal-demo-fr.pdf | Bin 80058 -> 86244 bytes .../latex/contrib/jwjournal/jwjournal-demo-fr.tex | 30 +- macros/latex/contrib/jwjournal/jwjournal.cls | 133 +- macros/latex/contrib/minted/minted.dtx | 102 +- macros/latex/contrib/minted/minted.pdf | Bin 871382 -> 872465 bytes macros/latex/contrib/q-and-a/Q-and-A.cls | 86 +- .../theme-ChatGPT/Q-and-A-demo-ChatGPT-dark.pdf | Bin 111664 -> 46035 bytes .../theme-ChatGPT/Q-and-A-demo-ChatGPT-light.pdf | Bin 111646 -> 45995 bytes macros/latex/contrib/q-and-a/doc/Q-and-A-doc.pdf | Bin 116495 -> 116023 bytes macros/latex/contrib/q-and-a/doc/Q-and-A-doc.tex | 7 +- macros/latex/contrib/tagpdf/README.md | 8 +- macros/latex/contrib/tagpdf/ex-AF-file.pdf | 106 +- macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf | Bin 42249 -> 34295 bytes macros/latex/contrib/tagpdf/ex-attribute.pdf | 80 +- macros/latex/contrib/tagpdf/ex-formula-problem.pdf | 68 +- macros/latex/contrib/tagpdf/ex-list.pdf | 152 +- .../tagpdf/ex-mc-manual-para-split-obsolete.pdf | 46 +- macros/latex/contrib/tagpdf/ex-softhyphen.pdf | 68 +- .../contrib/tagpdf/ex-spaceglyph-listings.pdf | 60 +- .../latex/contrib/tagpdf/ex-structure-obsolete.pdf | 94 +- macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf | 90 +- macros/latex/contrib/tagpdf/tagpdf-backend.dtx | 10 +- macros/latex/contrib/tagpdf/tagpdf-checks.dtx | 30 +- macros/latex/contrib/tagpdf/tagpdf-code.pdf | Bin 1639998 -> 1646817 bytes macros/latex/contrib/tagpdf/tagpdf-code.tex | 6 +- macros/latex/contrib/tagpdf/tagpdf-data.dtx | 20 +- macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx | 8 +- macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx | 8 +- macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx | 12 +- macros/latex/contrib/tagpdf/tagpdf-roles.dtx | 6 +- macros/latex/contrib/tagpdf/tagpdf-space.dtx | 6 +- macros/latex/contrib/tagpdf/tagpdf-struct.dtx | 85 +- macros/latex/contrib/tagpdf/tagpdf-tree.dtx | 6 +- macros/latex/contrib/tagpdf/tagpdf-user.dtx | 131 +- macros/latex/contrib/tagpdf/tagpdf.dtx | 118 +- macros/latex/contrib/tagpdf/tagpdf.ins | 2 +- macros/latex/contrib/tagpdf/tagpdf.pdf | Bin 1094883 -> 1085167 bytes macros/latex/contrib/tagpdf/tagpdf.tex | 2172 ++++++++++++-------- macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty | 62 +- 51 files changed, 2440 insertions(+), 1565 deletions(-) (limited to 'macros/latex/contrib') diff --git a/macros/latex/contrib/jnuexam/README b/macros/latex/contrib/jnuexam/README index 6dfda47e55..96789d72cc 100644 --- a/macros/latex/contrib/jnuexam/README +++ b/macros/latex/contrib/jnuexam/README @@ -1,4 +1,4 @@ Package: An exam class for Jinan University Author: Jianrui Lyu Website: https://lvjr.bitbucket.io/jnuexam.html -License: The LaTeX Project Public License 1.3 \ No newline at end of file +License: The LaTeX Project Public License 1.3c \ No newline at end of file diff --git a/macros/latex/contrib/jnuexam/exam-a-answer.pdf b/macros/latex/contrib/jnuexam/exam-a-answer.pdf index 030ffb6eec..3088b9303a 100644 Binary files a/macros/latex/contrib/jnuexam/exam-a-answer.pdf and b/macros/latex/contrib/jnuexam/exam-a-answer.pdf differ diff --git a/macros/latex/contrib/jnuexam/exam-a-empty.pdf b/macros/latex/contrib/jnuexam/exam-a-empty.pdf index c558560089..486e1bf782 100644 Binary files a/macros/latex/contrib/jnuexam/exam-a-empty.pdf and b/macros/latex/contrib/jnuexam/exam-a-empty.pdf differ diff --git a/macros/latex/contrib/jnuexam/exam-b-answer.pdf b/macros/latex/contrib/jnuexam/exam-b-answer.pdf index 7cd246095a..3da76b9f31 100644 Binary files a/macros/latex/contrib/jnuexam/exam-b-answer.pdf and b/macros/latex/contrib/jnuexam/exam-b-answer.pdf differ diff --git a/macros/latex/contrib/jnuexam/exam-b-empty.pdf b/macros/latex/contrib/jnuexam/exam-b-empty.pdf index b98b5e7df4..047319bf58 100644 Binary files a/macros/latex/contrib/jnuexam/exam-b-empty.pdf and b/macros/latex/contrib/jnuexam/exam-b-empty.pdf differ diff --git a/macros/latex/contrib/jnuexam/jnuexam.cls b/macros/latex/contrib/jnuexam/jnuexam.cls index 5b25fa01d6..c70cee0fd9 100644 --- a/macros/latex/contrib/jnuexam/jnuexam.cls +++ b/macros/latex/contrib/jnuexam/jnuexam.cls @@ -2,11 +2,11 @@ % ---------------------------------------------------------------------------- % Author: Jianrui Lyu % Website: https://lvjr.bitbucket.io/jnuexam.html -% License: The LaTeX Project Public License 1.3 +% License: The LaTeX Project Public License 1.3c % ---------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jnuexam}[2023/12/11 v2.0 An exam class for Jinan University] +\ProvidesClass{jnuexam}[2023/12/18 v2.1 An exam class for Jinan University] %% 旧版本的 LaTeX 不能识别 2022-11-01 这种日期格式 %\@ifl@t@r\fmtversion{2022-11-01}{}{ @@ -396,12 +396,32 @@ \pagestyle{fancy} \fi +%% --------------------------------------------------------------------------- +%% 乱序排列选项 random +%% 随机种子选项 seed +%% --------------------------------------------------------------------------- + +%% 随机数种子不能超过 2147483647 = "7FFFFFFF +\def\my@random@seed{19061116} +\define@key{jnuexam@setup}{seed}[19061116]{\def\my@random@seed{#1}} + +\ifrandom + \RequirePackage{pgf} + \RequirePackage{pgffor} + \newcommand*\exam@set@seed{% + %% 当\pgfmathrandom的参数为3的倍数时,对相邻种子生成的多个随机数分布不均匀 + %\pgfmathsetseed{\numexpr\my@random@seed+\value{section}-1\relax}% + %% 因此我们改用下面的方法,用随机数种子生成下一个随机数种子 + \pgfmathsetseed{\my@random@seed}% + \pgfmathrandominteger\my@random@seed{1}{2147483647}% + } +\fi + %% --------------------------------------------------------------------------- %% 题型命令 \makepart %% 附录命令 \makedata %% 题目环境 problem %% 解答环境 solution -%% 乱序选项 random %% --------------------------------------------------------------------------- \newif\ifonlyoneproblem \onlyoneproblemfalse % 此部分仅有一道题时不显示题目编号 @@ -418,11 +438,6 @@ \colorlet{problem number}{blue!80!black} \colorlet{solution name}{blue!80!black} -\ifrandom - \RequirePackage{pgf} - \RequirePackage{pgffor} -\fi - \newcounter{my@shuffle@temp@cnt} \newcounter{my@list@temp@cnt} @@ -448,16 +463,8 @@ \dolistloop\my@tmpa@list } -%% 随机数种子不能超过 2147483647 = "7FFFFFFF -\def\my@random@seed{19061116} -\define@key{jnuexam@setup}{seed}[19061116]{\def\my@random@seed{#1}} - \newcommand\my@shuffle@problems{% - %% 当\pgfmathrandom的参数为3的倍数时,对相邻种子生成的多个随机数分布不均匀 - %\pgfmathsetseed{\numexpr\my@random@seed+\value{section}-1\relax}% - %% 因此我们改用下面的方法,用随机数种子生成下一个随机数种子 - \pgfmathsetseed{\my@random@seed}% - \pgfmathrandominteger\my@random@seed{1}{2147483647}% + \exam@set@seed \ifnumgreater{\value{problem}}{2}{% \gdef\my@shuffle@list{}% \foreach \i in {1,...,\value{problem}} {\listxadd\my@shuffle@list{\i}}% @@ -715,9 +722,6 @@ \newcommand*{\tick@text@F}{\sffamily F} \newcommand*{\tickin}[1]{\tick@box{\csname tick@text@#1\endcsname}} \newcommand*{\tickout}[1]{\unskip\nobreak\cdotfill\tick@box{\csname tick@text@#1\endcsname}} -% 过时命令,不要再使用 -%\newcommand*{\true}{\tickout{t}} -%\newcommand*{\false}{\tickout{f}} \newcommand*{\ulinefill}[1]{\xleaders\hbox{\underline{\vphantom{#1}\kern1pt}}\hfill\kern0pt} \newcommand*{\minwidthbox}[2]{\makebox[{\ifdim#1<\width\width\else#1\fi}]{#2}} @@ -725,8 +729,55 @@ \newcommand*{\fillout}[1]{\allowbreak\hbox{}\nobreak\ulinefill{#1}\underline{\color{blue}\answer{#1}}\ulinefill{#1}} \newcommand*{\fillin}[1]{\underline{\hspace{1em}\color{blue}\minwidthbox{2em}{\answer{#1}}\hspace{1em}}} -\newcommand*{\pickout}[1]{\unskip\nobreak\cdotfill(\makebox[1.5em]{\color{blue}\answer{#1}})} -\newcommand*{\pickin}[1]{\unskip\nobreak\hspace{0.3em}(\makebox[1.5em]{\color{blue}\answer{#1}})\hspace{0.3em}\ignorespaces} +\newcommand*\pickoutreal[1]{% + \unskip\nobreak\cdotfill(\makebox[1.5em]{\color{blue}\answer{#1}})% +} +\newcommand*\pickinreal[1]{% + \unskip\nobreak + \hspace{0.3em}(\makebox[1.5em]{\color{blue}\answer{#1}})\hspace{0.3em}% + \ignorespaces +} + +%% 选择题四个选项打乱顺序,用三种方法即可保证答案不同 +%% 1:ABCD -> CDAB; 2:ABCD -> BADC; 3: ABCD -> DCBA +%% 即在两行排列时仅用到上下交换以及左右交换,这样可以保持两行长度不变 + +\csdef{my@shuffle@1@A}{C} \csdef{my@shuffle@2@A}{B} \csdef{my@shuffle@3@A}{D} +\csdef{my@shuffle@1@B}{D} \csdef{my@shuffle@2@B}{A} \csdef{my@shuffle@3@B}{C} +\csdef{my@shuffle@1@C}{A} \csdef{my@shuffle@2@C}{D} \csdef{my@shuffle@3@C}{B} +\csdef{my@shuffle@1@D}{B} \csdef{my@shuffle@2@D}{C} \csdef{my@shuffle@3@D}{A} + +\def\@my@choice@random{0} +\newcommand\my@shuffle@abcd[1]{\csuse{my@shuffle@\@my@choice@random @#1}} + +\newcommand*\pickout[1]{% + \ifbool{random}{% + \exam@set@seed + \pgfmathrandominteger\@my@choice@random{1}{3}% + %\@my@choice@random + \pickoutreal{\my@shuffle@abcd{#1}}% + }{% + \pickoutreal{#1}% + }% +} +\newcommand*\pickoutfixed[1]{% + \pickoutreal{#1}% + \randomfalse +} +\newcommand*\pickin[1]{% + \ifbool{random}{% + \exam@set@seed + \pgfmathrandominteger\@my@choice@random{1}{3}% + %\@my@choice@random + \pickinreal{\my@shuffle@abcd{#1}}% + }{% + \pickinreal{#1}% + }% +} +\newcommand*\pickinfixed[1]{% + \pickinreal{#1}% + \randomfalse +} %% --------------------------------------------------------------------------- %% 选择题四个选项排版环境,根据四个选项的长度自动排成一行、两行或四行 @@ -753,7 +804,7 @@ \my@label@text\ignorespaces } -\NewEnviron{abcd}{ +\NewEnviron{abcdreal}{ \unskip \setlength{\parindent}{0pt}% \setlength{\parskip}{0pt}% @@ -787,7 +838,7 @@ \stepcounter{choice}(\Alph{choice})\ % } -\NewEnviron{abcd*}{ +\NewEnviron{abcd*real}{ \unskip \setlength{\parindent}{0pt}% \setlength{\parskip}{0pt}% @@ -814,6 +865,30 @@ \fi } +\ifbool{random}{% + \csdef{my@swap@items@1}#1#2#3#4{\item#3\item#4\item#1\item#2} + \csdef{my@swap@items@2}#1#2#3#4{\item#2\item#1\item#4\item#3} + \csdef{my@swap@items@3}#1#2#3#4{\item#4\item#3\item#2\item#1} + \long\def\my@swap@items#1\item#2\item#3\item#4\item#5\@my@stop@mark{% + #1\csuse{my@swap@items@\@my@choice@random}{#2}{#3}{#4}{#5}% + } +}{} + +\NewDocumentEnvironment{abcd}{+b}{% + \ifbool{random}{% + \begin{abcdreal}\my@swap@items#1\@my@stop@mark\end{abcdreal}% + }{% + \begin{abcdreal}#1\end{abcdreal}% + }% +}{} +\NewDocumentEnvironment{abcd*}{+b}{% + \ifbool{random}{% + \begin{abcd*real}\my@swap@items#1\@my@stop@mark\end{abcd*real}% + }{% + \begin{abcd*real}#1\end{abcd*real}% + }% +}{} + %% --------------------------------------------------------------------------- %% 设定有序列表使用悬挂缩进,并指定前两级有序列表的标签格式 %% 标签宽度按最宽者自动设定,左边距自动计算,竖直空白全部去掉 @@ -914,7 +989,6 @@ \pointstext{#1}% }% } -%\let\score=\points % \score 命令已经废弃,不要再使用 %% --------------------------------------------------------------------------- %% 载入个人定制文件 jnuexam.cfg @@ -1128,7 +1202,6 @@ \let\my@saved@sum=\sum \def\sum{\my@saved@sum\limits}% \let\my@saved@prod=\prod \def\prod{\my@saved@prod\limits}% } -%\newcommand{\limit}{\lim\limits} % 废弃命令,不要再使用 \newcommand{\e}{\mathrm{e}} \newcommand{\R}{\mathbb{R}} diff --git a/macros/latex/contrib/jnuexam/jnuexam.pdf b/macros/latex/contrib/jnuexam/jnuexam.pdf index b8a0d9e33b..c5281ee42b 100644 Binary files a/macros/latex/contrib/jnuexam/jnuexam.pdf and b/macros/latex/contrib/jnuexam/jnuexam.pdf differ diff --git a/macros/latex/contrib/jwjournal/README.md b/macros/latex/contrib/jwjournal/README.md index fb3e0270a3..6185459348 100644 --- a/macros/latex/contrib/jwjournal/README.md +++ b/macros/latex/contrib/jwjournal/README.md @@ -91,6 +91,11 @@ Here are the major syntaxes for your main text: - `(( <⟨width⟩> {⟨image file name⟩}` or `(( {⟨image file name⟩} <⟨width⟩>`: show image on the left. - `)) <⟨width⟩> {⟨image file name⟩}` or `)) {⟨image file name⟩} <⟨width⟩>`: show image on the right. > The `<⟨width⟩>` is optional. Here `⟨width⟩` is a number like `0.75`, the unit is `\linewidth`. When `<⟨width⟩>` is not given, the width would be full `\linewidth`. +1) Code + > Due to the current method of implementation, it is unfortunate that one cannot directly insert source code in the document. There are some workarounds though, as described below. + - For *inline* code: you may simply write it between two backticks `` `⟨code⟩` ``, similar to the Markdown syntax. However, be aware that special characters need to be escaped, for example, `\` should be written as `\textbackslash`, `{` should be written as `\{`, `%` should be written as `\%`, etc. + - For *displayed* code: **this feature is not yet complete.** + 1) Section - You may start a new (*unnumbered*) - section, via `## {⟨section title⟩}`; diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf index ef27817556..010d83d024 100644 Binary files a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf and b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf differ diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex index 78cdb86040..213bf34d51 100644 --- a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex +++ b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex @@ -9,14 +9,17 @@ \begin{document} -2023-01-01 晴 | 地点 +2024-01-01 晴 | 地点 - 在文中出现的日期和标注不会被识别: 2022-12-25、[标注]、【标注】,放心使用! + 在文中出现的日期和标注不会被识别: 2023-12-25、[标注]、【标注】,放心使用! - [文本] 你可以使用*斜体*、**粗体**或者***两者结合***。 + [文本] + 你可以使用*斜体*、**粗体**或者***两者结合***。 + \\ + 数学模式下的星号不会被识别: 【说明】 % 【...】与 [...] 效果相同 - 在一些特殊情况需要把星号用 \texttt{\{\}} 隔开:**像**{}***这***{}*样*。 + 在一些特殊情况需要把星号用 \texttt{\{\}} 隔开:**像**{}***这***{}*样*。 >>> 像这样可以把文本放在色彩框内。 @@ -34,12 +37,14 @@ ## {新篇章} -2023-01-02 +2024-01-02 不明(天气也可以写在第二行,看你的喜好) 标签的颜色会根据日期改变,并且很长的文本会自动缩进: - [学习] 今天没有学习,但我写了很多很多很多很多很多很多很多很多很多很多很多很多很多很多很多很多代码。 + [学习] 今天没有学习,但我写了很多很多很多很多很多很多很多很多很多很多很多很多很多很多很多很多代码: `inline code`. + + [注意] 行内代码中的特殊字符需要转义。例如,`\textbackslash` 应写为 `\textbackslash textbackslash`, `\{` 应写为 `\textbackslash\{`, `\%` 应写为 `\textbackslash\%`,等等。 ----- @@ -67,45 +72,45 @@ -2023-01-03 +2024-01-03 [注] 如果只写了日期,那么后面就不会有第二个分隔符。 +++ -2023-01-04 多云 +2024-01-04 多云 三个加号 \texttt{+++} 可以将当前页面显示的文字多出一行左右,有时候单独的一句话或者几个字落到了下一页,这时可以用它来改善一下显示的效果。 -2023-01-05 多云 —— 居家办公 +2024-01-05 多云 —— 居家办公 ======================================= 也可以把代码排列成这样。 ========== -2023-01-06 晴朗 —— 居家办公 +2024-01-06 晴朗 —— 居家办公 ========== 或者这样…… -2023-01-07 多云 +2024-01-07 多云 ... -2023-01-08 多云 +2024-01-08 多云 一周之后,又会回到之前的颜色 -2023-01-09 多云 +2024-01-09 多云 ... diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-en.pdf b/macros/latex/contrib/jwjournal/jwjournal-demo-en.pdf index e93e4c83b0..85e1d07044 100644 Binary files a/macros/latex/contrib/jwjournal/jwjournal-demo-en.pdf and b/macros/latex/contrib/jwjournal/jwjournal-demo-en.pdf differ diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-en.tex b/macros/latex/contrib/jwjournal/jwjournal-demo-en.tex index 32bc336ec8..61d1d8258b 100644 --- a/macros/latex/contrib/jwjournal/jwjournal-demo-en.tex +++ b/macros/latex/contrib/jwjournal/jwjournal-demo-en.tex @@ -7,11 +7,14 @@ \begin{document} -01/01/2023 Sunny | Location +01/01/2024 Sunny | Location - Dates and annotations appearing in the text will not be recognized: 12/25/2022, [Note], so feel free to write these. + Dates and annotations appearing in the text will not be recognized: 12/25/2023, [Note], so feel free to write these. - [Text] You can write text in *italics*, **bold** or ***both***. + [Text] + You can write text in *italics*, **bold** or ***both***. + \\ + Asterisks in math mode will not be recognized: $a^* b^*$. [Remark] In some special cases, it would be necessary to separate the asterisks with~\texttt{\{\}}: **like**{}***this***{}*one*. @@ -23,6 +26,7 @@ >> (Remark on the image) >> (More remark...) + +++ You may also show the image on the left or on the right: (( <.4> {example-image-a} % or (( {example-image-a} <.4> -> <.3> % add some vertical spacing, here is 0.3\baselineskip @@ -31,12 +35,14 @@ ## {\textsc{A New Section}} -01/02/2023 +01/02/2024 Unknown (the weather can also be written on the second line, depending on your preference) The color of the labels shall change according to the date, and long text shall be automatically wrapped and indented: - [Note] I didn't study today, but I wrote many many many many many many many many many many many many code. + [Note] I didn't study today, but I wrote many many many many many many many many many many many many code: `inline code`. + + [Attention] Special characters in inline code need to be escaped. For example, `\textbackslash` should be written as `\textbackslash textbackslash`, `\{` should be written as `\textbackslash\{`, `\%` should be written as `\textbackslash\%`, etc. ----- @@ -64,45 +70,45 @@ Unknown (the weather can also be written on the second line, depending on your p -01/03/2023 +01/03/2024 [Note] If only the date is written, then there would be no second separator after it. +++ -01/04/2023 Cloudy +01/04/2024 Cloudy Three plus signs \texttt{+++} can enlarge the current page by about one line. Sometimes a single sentence or a few words fall to the next page --- in such cases, you may use it to improve the display effect. -01-05-2023 Cloudy --- Work at home +01-05-2024 Cloudy --- Work at home ============================================ You may also organize your code like this. ========== -01-06-2023 Sunny --- Work at home +01-06-2024 Sunny --- Work at home ========== Or like this... -01/07/2023 Cloudy +01/07/2024 Cloudy ... -01/08/2023 Cloudy +01/08/2024 Cloudy A week later, the color goes back to the earlier one. -01/09/2023 Cloudy +01/09/2024 Cloudy ... diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-fr.pdf b/macros/latex/contrib/jwjournal/jwjournal-demo-fr.pdf index f8395eeee3..0fa54e2a4e 100644 Binary files a/macros/latex/contrib/jwjournal/jwjournal-demo-fr.pdf and b/macros/latex/contrib/jwjournal/jwjournal-demo-fr.pdf differ diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-fr.tex b/macros/latex/contrib/jwjournal/jwjournal-demo-fr.tex index e10fe350b3..25b79871e8 100644 --- a/macros/latex/contrib/jwjournal/jwjournal-demo-fr.tex +++ b/macros/latex/contrib/jwjournal/jwjournal-demo-fr.tex @@ -9,16 +9,20 @@ \begin{document} -01/01/2023 Ensoleillé | Lieu +01/01/2024 Ensoleillé | Lieu - Les dates et annotations apparaissant dans le texte ne seront pas détectées : 25/12/2022, [Note], alors n'hésitez pas à les écrire ! + Les dates et annotations apparaissant dans le texte ne seront pas détectées : 25/12/2023, [Note], alors n'hésitez pas à les écrire ! - [Texte] Vous pouvez écrire votre texte en *italique*, **gras** ou ***les deux***. + [Texte] + Vous pouvez écrire votre texte en *italique*, **gras** ou ***les deux***. + \\ + Les astérisques en mode math ne seront pas détectées : $a^* b^*$. [Remarque] Dans certains cas particuliers, il serait nécessaire de séparer les astérisques par~\texttt{\{\}} : **comme**{}***cet***{}*exemple*. >>> Vous pouvez mettre votre texte dans un bloc coloré comme celui-ci. + +++ Les images peuvent être incluses via : || <.4> {example-image} % ou || {example-image} <.4> @@ -33,12 +37,14 @@ ## {\textsc{Une Nouvelle Section}} -02/01/2023 +02/01/2024 Inconnu (la météo peut aussi être écrite sur la deuxième ligne, selon votre préférence) La couleur des étiquettes changera en fonction de la date, et le texte long sera automatiquement indenté : - [Note] Je n'ai pas étudié aujourd'hui, mais j'ai écrit beaucoup beaucoup beaucoup beaucoup beaucoup beaucoup beaucoup beaucoup beaucoup de code. + [Note] Je n'ai pas étudié aujourd'hui, mais j'ai écrit beaucoup beaucoup beaucoup beaucoup beaucoup beaucoup beaucoup de code: `code en ligne`. + + [Attention] Les caractères spéciaux dans le code en ligne doivent être échappés. Par exemple, `\textbackslash` doit être écrit comme `\textbackslash textbackslash`, `\{` doit être écrit comme `\textbackslash\{`, `\%` doit être écrit comme `\textbackslash\%`, etc. ----- @@ -66,45 +72,45 @@ Inconnu (la météo peut aussi être écrite sur la deuxième ligne, selon votre -03/01/2023 +03/01/2024 [Note] Si seule la date est écrite, il n'y aura pas de deuxième séparateur après celle-ci. +++ -04/01/2023 Nuageux +04/01/2024 Nuageux Trois signes plus \texttt{+++} peuvent agrandir la page courante d'environ une ligne. Parfois, une seule phrase ou quelques mots tombent sur la page suivante --- dans de tels cas, vous pouvez l'utiliser pour améliorer l'effet d'affichage. -05-01-2023 Nuageux --- Travail à domicile +05-01-2024 Nuageux --- Travail à domicile ================================================== Vous pouvez également organiser votre code comme ceci. ========== -06-01-2023 Ensoleillé --- Travail à domicile +06-01-2024 Ensoleillé --- Travail à domicile ========== Ou bien comme ceci... -07/01/2023 Nuageux +07/01/2024 Nuageux ... -08/01/2023 Nuageux +08/01/2024 Nuageux Une semaine plus tard, la couleur revient à la précédente... -09/01/2023 Nuageux +09/01/2024 Nuageux ... diff --git a/macros/latex/contrib/jwjournal/jwjournal.cls b/macros/latex/contrib/jwjournal/jwjournal.cls index bf7e6cc8ff..3b968ce12e 100644 --- a/macros/latex/contrib/jwjournal/jwjournal.cls +++ b/macros/latex/contrib/jwjournal/jwjournal.cls @@ -12,7 +12,7 @@ \NeedsTeXFormat{LaTeX2e}[2022-06-01] \ProvidesExplClass {jwjournal} - {2023/11/03} {} + {2023/12/19} {} {JW's journal class} \keys_define:nn { jwjournal } @@ -263,6 +263,22 @@ \end{JWJournalRight} } +\newtcbox \JWJournalCodebox + { + tcbox~raise~base, + nobeforeafter, + boxrule=.1pt, boxsep=1.5pt, arc=1pt, + left=.5pt, right=.5pt, top=0pt, bottom=0pt, + colframe=main-text!60!paper, + colback=main-text!3!paper, + fontupper=\small\normalfont\ttfamily, + } +\NewDocumentCommand \JWJournalCode { m } + { + % \textcolor{emph-text}{\texttt{#1}} + \JWJournalCodebox{\vphantom{Äpgjy}#1} + } + \tl_new:N \g_jwjournal_content_tl \NewDocumentEnvironment { jwjournal } { +b } { @@ -295,6 +311,26 @@ \seq_new:N \l_jwjournal_tmp_seq \tl_new:N \l_jwjournal_tmp_tl \cs_generate_variant:Nn \regex_split:nnN { nVN } +\cs_new:Nn \jwjournal_regex_replace_case_once_skip_math:nN + { + \regex_replace_case_once:nN + { + { \$ (.*?) \$ } { \0 } + { \c{\(} (.*?) \c{\)} } { \0 } + { \c{\[} (.*?) \c{\]} } { \0 } + #1 + } #2 + } +\cs_new:Nn \jwjournal_regex_replace_case_all_skip_math:nN + { + \regex_replace_case_all:nN + { + { \$ (.*?) \$ } { \0 } + { \c{\(} (.*?) \c{\)} } { \0 } + { \c{\[} (.*?) \c{\]} } { \0 } + #1 + } #2 + } \cs_new:Nn \jwjournal_parse_content:N { \regex_split:nVN { \c{par} } #1 \l_jwjournal_tmp_seq @@ -342,6 +378,19 @@ { \c{section}\* } \l_jwjournal_tmp_tl + \regex_replace_all:nnN + { \`\` } + { ❝ } + \l_jwjournal_tmp_tl + \regex_replace_all:nnN + { \` (.*?) \` } + { \c{JWJournalCode} {\1} } + \l_jwjournal_tmp_tl + \regex_replace_all:nnN + { ❝ } + { \`\` } + \l_jwjournal_tmp_tl + \regex_match:nVT { ❄️ \ *? -> } \l_jwjournal_tmp_tl { \regex_match:nVTF { ❄️ \ *? -> \ *? < [\+\-\ ]*(\d+|\d*\.\d+)\ * > } \l_jwjournal_tmp_tl @@ -401,40 +450,57 @@ { \c{JWJournalBack} } \l_jwjournal_tmp_tl - \regex_replace_all:nnN - { \|\| } - { \c{JWJournalShowImageCenter} } - \l_jwjournal_tmp_tl - \regex_replace_all:nnN - { \(\( } - { \c{JWJournalShowImageLeft} } - \l_jwjournal_tmp_tl - \regex_replace_all:nnN - { \)\) } - { \c{JWJournalShowImageRight} } - \l_jwjournal_tmp_tl + % \regex_replace_all:nnN + % { \|\| } + % { \c{JWJournalShowImageCenter} } + % \l_jwjournal_tmp_tl + % \regex_replace_all:nnN + % { \(\( } + % { \c{JWJournalShowImageLeft} } + % \l_jwjournal_tmp_tl + % \regex_replace_all:nnN + % { \)\) } + % { \c{JWJournalShowImageRight} } + % \l_jwjournal_tmp_tl + \jwjournal_regex_replace_case_all_skip_math:nN + { + { \|\| } { \c{JWJournalShowImageCenter} } + { \(\( } { \c{JWJournalShowImageLeft} } + { \)\) } { \c{JWJournalShowImageRight} } + } \l_jwjournal_tmp_tl + + % \regex_replace_once:nnN + % { \| } + % { \c{hfill} } + % \l_jwjournal_tmp_tl + \jwjournal_regex_replace_case_once_skip_math:nN + { + { \| } { \c{hfill} } + } \l_jwjournal_tmp_tl - \regex_replace_once:nnN - { \| } - { \c{hfill} } - \l_jwjournal_tmp_tl \regex_replace_all:nnN { [^\:]// } { \c{c_jwjournal_new_line_with_skip_tl} } \l_jwjournal_tmp_tl - \regex_replace_all:nnN - { \*\*\* (.*?) \*\*\* } - { \c{textbf} { \c{emph} {\1} } } - \l_jwjournal_tmp_tl - \regex_replace_all:nnN - { \*\* (.*?) \*\* } - { \c{textbf} {\1} } - \l_jwjournal_tmp_tl - \regex_replace_all:nnN - { \* (.*?) \* } - { \c{emph} {\1} } - \l_jwjournal_tmp_tl + % \regex_replace_all:nnN + % { \*\*\* (.*?) \*\*\* } + % { \c{textbf} { \c{emph} {\1} } } + % \l_jwjournal_tmp_tl + % \regex_replace_all:nnN + % { \*\* (.*?) \*\* } + % { \c{textbf} {\1} } + % \l_jwjournal_tmp_tl + % \regex_replace_all:nnN + % { \* (.*?) \* } + % { \c{emph} {\1} } + % \l_jwjournal_tmp_tl + \jwjournal_regex_replace_case_all_skip_math:nN + { + { \*\*\* (.*?) \*\*\* } { \c{textbf} { \c{emph} { \1 } } } + { \*\* (.*?) \*\* } { \c{textbf} { \1 } } + { \* (.*?) \* } { \c{emph} { \1 } } + } \l_jwjournal_tmp_tl \regex_replace_once:nnN { >>> \ *? (.*) } @@ -578,6 +644,15 @@ \pagestyle { empty } +\def\textasterisk{*} +\def\textbacktick{`} +\def\textcolon{:} +\def\textequalsign{=} +\def\textleftparen{(} +\def\textrightparen{)} +\def\textsharp{\#} +\def\textvert{|} + \endinput %% %% End of file `jwjournal.cls'. diff --git a/macros/latex/contrib/minted/minted.dtx b/macros/latex/contrib/minted/minted.dtx index b326c9baee..d1a0d3c2d9 100644 --- a/macros/latex/contrib/minted/minted.dtx +++ b/macros/latex/contrib/minted/minted.dtx @@ -31,12 +31,12 @@ %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{minted} %<*package> - [2023/09/12 v2.8 Yet another Pygments shim for LaTeX] + [2023/12/18 v2.9 Yet another Pygments shim for LaTeX] % %<*driver> \documentclass{ltxdoc} \EnableCrossrefs -\CodelineIndex +%\CodelineIndex %\DisableCrossrefs %\RecordChanges %\OnlyDescription @@ -110,9 +110,8 @@ \g@addto@macro\changestext{\end{itemize}}% } \newcommand{\PrintChangelog}{% - \section*{Version History}% - \addcontentsline{toc}{section}{Version History} - \label{sec:version-history} + \section{Changelog}% + \label{sec:changelog} \begin{description}% \changestext \end{description}% @@ -204,12 +203,12 @@ \begin{document} \DocInput{minted.dtx} -\PrintIndex +% \PrintIndex \end{document} % % \fi % -% \CheckSum{2565} +% \CheckSum{2572} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -230,6 +229,12 @@ % % % +% \begin{changelog}{v2.9}{2023/12/18} +% \item This is expected to be the last release of \pkg{minted} v2.x. If so, it will then become the new package \Verb{minted2} for backward compatibility. +% \item Added new option \Verb{ignorelexererrors}. When lexer errors are shown in highlighted output (default), they are typically displayed as red boxes that surround the relevant text. When lexer errors are ignored, the literal text that caused lexer errors is shown but there is no indication that it caused errors (\#374). +% \item There is now a warning if \pkg{fvextra} version is less than 1.5. +% \end{changelog} +% % \begin{changelog}{v2.8}{2023/09/12} % \item Under non-Windows operating systems, detect executables with \Verb{command -v} rather than \Verb{which} to provide better cross-platform support (\#345). % \item Added new package option \Verb{inputlanglinenos}. This extends the existing \Verb{langlinenos} to cover \Verb{\inputminted} as well (\#361). @@ -302,7 +307,7 @@ % \item \texttt{fvextra} brings the new options \texttt{highlightcolor} and \texttt{highlightlines}, which allow single lines or ranges of lines to be highlighted based on line number (\#124). % \item \texttt{fvextra} brings the new options \texttt{numberfirstline}, \texttt{stepnumberfromfirst}, and \texttt{stepnumberoffsetvalues} that provide better control over line numbering when \texttt{stepnumber} is not 1. % \item Fixed a bug from v2.2.2 that prevented \texttt{upquote} from working. -% \end{changelog} +% \end{changelog} % % % \begin{changelog}{v2.2.2}{2016/06/21} @@ -723,7 +728,7 @@ % % \DescribeMacro{\mintinline} % Code can be typeset inline: -% +% % \begin{example} % X\mintinline{python}{print(x**2)}X % \end{example} @@ -815,7 +820,7 @@ % \subsection*{Customizing the \texttt{listing} environment} % By default, the |listing| environment is created using the \texpkg{float} package. In that case, the |\listingscaption| and |\listoflistingscaption| macros described below may be used to customize the caption and list of listings. If \texpkg{minted} is loaded with the |newfloat| option, then the |listing| environment will be created with the more powerful \href{http://www.ctan.org/pkg/newfloat}{\texpkg{newfloat}} package instead. \texpkg{newfloat} is part of \href{http://www.ctan.org/pkg/caption}{\texpkg{caption}}, which provides many options for customizing captions. % -% When \texpkg{newfloat} is used to create the |listing| environment, customization should be achieved using \texpkg{newfloat}'s |\SetupFloatingEnvironment| command. For example, the string ``Listing'' in the caption could be changed to ``Program code'' using +% When \texpkg{newfloat} is used to create the |listing| environment, customization should be achieved using \texpkg{newfloat}'s |\SetupFloatingEnvironment| command. For example, the string ``Listing'' in the caption could be changed to ``Program code'' using %\begin{verbatim} %\SetupFloatingEnvironment{listing}{name=Program code} %\end{verbatim} @@ -887,7 +892,7 @@ % Use a frozen (static) cache created with the |finalizecache| option. When |frozencache| is on, |-shell-escape| is not needed, and Python and Pygments are not required. In addition, any external files accessed through |\inputminted| are no longer necessary. % % \textbf{This option must be used with care. A document \emph{must} be in final form, as far as \texpkg{minted} is concerned, \emph{before} \texttt{frozencache} is turned on, and the document \emph{must} have been compiled with \texttt{finalizecache}. When this option is on, \texpkg{minted} content cannot be modified, except by editing the cache files directly. Changing any \texpkg{minted} settings that require Pygments or Python is not possible. If \texpkg{minted} content is incorrectly modified after \texttt{frozencache} is turned on, \texpkg{minted} \emph{cannot} detect the modification.} -% +% % If you are using |frozencache|, and want to verify that \texpkg{minted} settings or content have not been modified in an invalid fashion, you can test the cache using the following procedure. % \begin{enumerate} % \item Obtain a copy of the cache used with |frozencache|. @@ -1175,7 +1180,7 @@ % % This is not compatible with \texttt{draft} mode. A complete list of Pygments tokens is available at \url{http://pygments.org/docs/tokens/}. If the breaks provided by \texttt{breakbytoken} occur in unexpected locations, it may indicate a bug or shortcoming in the Pygments lexer for the language. % -% \item[breakbytokenanywhere (boolean) (false)] +% \item[breakbytokenanywhere (boolean) (false)] % Like \texttt{breakbytoken}, but also allows line breaks between immediately adjacent tokens, not just between tokens that are separated by spaces. Using \texttt{breakbytokenanywhere} with \texttt{breakanywhere} is redundant. % % \item[breakindent (dimension) (\meta{breakindentnchars})] @@ -1186,7 +1191,7 @@ % \item[breakindentnchars (integer) (0)] % This allows |breakindent| to be specified as an integer number of characters rather than as a dimension (assumes a fixed-width font). % -% \item[breaklines (boolean) (false)] +% \item[breaklines (boolean) (false)] % Automatically break long lines in \texttt{minted} environments and \texttt{\string\mint} commands, and wrap longer lines in \texttt{\string\mintinline}. % % By default, automatic breaks occur at space characters. Use \texttt{breakanywhere} to enable breaking anywhere; use \texttt{breakbytoken}, \texttt{breakbytokenanywhere}, \texttt{breakbefore}, and \texttt{breakafter} for more fine-tuned breaking. Using \texttt{escapeinside} to escape to \LaTeX\ and then insert a manual break is also an option. For example, use \texttt{escapeinside=||}, and then insert \texttt{|\textbackslash\textbackslash|} at the appropriate point. (Note that \texttt{escapeinside} does not work within strings.) @@ -1273,7 +1278,7 @@ % % % \item[breaksymbolsepleft (dimension) (\meta{breaksymbolsepleftnchars})] -% The separation between the |breaksymbolleft| and the adjacent text. +% The separation between the |breaksymbolleft| and the adjacent text. % % \item[breaksymbolsepleftnchars (integer) (2)] % Allows |breaksymbolsepleft| to be specified as an integer number of characters rather than as a dimension (assumes a fixed-width font). @@ -1373,7 +1378,7 @@ % firstnumber=11]{python} % def all(iterable): % for i in iterable: -% if not i: +% if not i: % return False % return True % \end{minted} @@ -1406,6 +1411,20 @@ % The color of the frame. % \item[samepage (boolean) (false)] % Forces the whole listing to appear on the same page, even if it doesn't fit. +% \item[ignorelexererrors (boolean) (false)] +% When lexer errors are shown in highlighted output (default), they are typically displayed as red boxes that surround the relevant text. When lexer errors are ignored, the literal text that caused lexer errors is shown but there is no indication that it caused errors. +% +% \begin{longexample} +% \begin{minted}{python} +% variable = !!! +% \end{minted} +% \end{longexample} +% +% \begin{longexample} +% \begin{minted}[ignorelexererrors=true]{python} +% variable = !!! +% \end{minted} +% \end{longexample} % \item[showspaces (boolean) (false)] % Enables visible spaces: \verb*/visible spaces/. % \item[showtabs (boolean) (false)] @@ -1619,7 +1638,7 @@ % \item \textbf{The \texpkg{caption} package produces an error when \texttt{\string\captionof} and other commands are used in combination with \texpkg{minted}.} % Load the \texpkg{caption} package with the option |compatibility=false|. Or better yet, use \texpkg{minted}'s |newfloat| package option, which provides better \texpkg{caption} compatibility. % -% \item \textbf{I need a listing environment that supports page breaks.} The built-in listing environment is a standard float; it doesn't support page breaks. You will probably want to define a new environment for long floats. For example, +% \item \textbf{I need a listing environment that supports page breaks.} The built-in listing environment is a standard float; it doesn't support page breaks. You will probably want to define a new environment for long floats. For example, %\begin{verbatim} %\usepackage{caption} %\newenvironment{longlisting}{\captionsetup{type=listing}}{} @@ -1642,8 +1661,7 @@ % % % -% \section*{Acknowledgements} -% \addcontentsline{toc}{section}{Acknowledgements} +% \section{Acknowledgements} % % \textbf{Konrad Rudolph:} Special thanks to Philipp Stephani and the rest of the guys from \texttt{comp.text.tex} and \texttt{tex.stackexchange.com}. % @@ -1672,7 +1690,7 @@ % \begin{macrocode} \RequirePackage{keyval} \RequirePackage{kvoptions} -\RequirePackage{fvextra} +\RequirePackage{fvextra}[2022/11/30] \RequirePackage{ifthen} \IfFileExists{shellesc.sty} {\RequirePackage{shellesc} @@ -1826,7 +1844,7 @@ % \begin{macrocode} \ProcessKeyvalOptions* \ifthenelse{\boolean{minted@newfloat}}{\RequirePackage{newfloat}}{\RequirePackage{float}} -\ifcsname tikzifexternalizing\endcsname +\ifcsname tikzifexternalizing\endcsname \tikzifexternalizing{\minted@drafttrue\minted@cachefalse}{} \else \ifcsname tikzexternalrealjob\endcsname @@ -1852,15 +1870,15 @@ % % % \subsection{Input, caching, and temp files} -% +% % \begin{macro}{\minted@input} % We need a wrapper for |\input|. In most cases, |\input| failure will be due to attempts to use |\inputminted| with files that don't exist, but we also want to give informative error messages when |outputdir| is needed or incompatible build tools are used. % \begin{macrocode} \newcommand{\minted@input}[1]{% \IfFileExists{#1}% {\input{#1}}% - {\PackageError{minted}{Missing Pygments output; \string\inputminted\space - was^^Jprobably given a file that does not exist--otherwise, you may need + {\PackageError{minted}{Missing Pygments output; \string\inputminted\space + was^^Jprobably given a file that does not exist--otherwise, you may need ^^Jthe outputdir package option, or may be using an incompatible build tool,^^Jor may be using frozencache with a missing file}% {This could be caused by using -output-directory or -aux-directory @@ -2028,7 +2046,7 @@ % \begin{macrocode} \DeleteFile{\minted@jobname.aex}% \ShellEscape{for \string^\@percentchar i in (#1.exe #1.bat #1.cmd) - do set > \minted@jobname.aex \minted@jobname.aex > \minted@jobname.aex}% %$ <- balance syntax highlighting \immediate\openin\minted@appexistsfile\minted@jobname.aex @@ -2509,13 +2527,13 @@ % % % \begin{macro}{\minted@generate@PYGdef} -% Generate Pygments style definition with |pygmentize| if a cached version does not exist. Load the style definition into a global macro of the form +% Generate Pygments style definition with |pygmentize| if a cached version does not exist. Load the style definition into a global macro of the form %\begin{Verbatim} %\csname minted@PYGdef@