summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/crefthe/crefthe-doc.pdfbin66532 -> 66531 bytes
-rw-r--r--macros/latex/contrib/crefthe/crefthe-doc.tex2
-rw-r--r--macros/latex/contrib/crefthe/crefthe.sty4
-rw-r--r--macros/latex/contrib/jwjournal/README.md20
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdfbin115307 -> 120740 bytes
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex16
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal-demo-en.pdfbin75218 -> 77414 bytes
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal-demo-en.tex16
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal-demo-fr.pdfbin77570 -> 80058 bytes
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal-demo-fr.tex16
-rw-r--r--macros/latex/contrib/jwjournal/jwjournal.cls84
-rw-r--r--macros/latex/contrib/longdivision/README.md10
-rw-r--r--macros/latex/contrib/longdivision/longdivision.sty30
-rw-r--r--macros/latex/contrib/longdivision/longdivision_manual.pdfbin152721 -> 159288 bytes
-rw-r--r--macros/latex/contrib/longdivision/longdivision_manual.tex2
-rw-r--r--macros/latex/contrib/pdfpc/README.md66
-rw-r--r--macros/latex/contrib/pdfpc/pdfpc-doc.pdfbin190336 -> 210457 bytes
-rw-r--r--macros/latex/contrib/pdfpc/pdfpc-doc.tex129
-rw-r--r--macros/latex/contrib/pdfpc/pdfpc.sty56
19 files changed, 351 insertions, 100 deletions
diff --git a/macros/latex/contrib/crefthe/crefthe-doc.pdf b/macros/latex/contrib/crefthe/crefthe-doc.pdf
index 63fd1342e3..ac2a6d590e 100644
--- a/macros/latex/contrib/crefthe/crefthe-doc.pdf
+++ b/macros/latex/contrib/crefthe/crefthe-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/crefthe/crefthe-doc.tex b/macros/latex/contrib/crefthe/crefthe-doc.tex
index c433d17e82..2567d4f02e 100644
--- a/macros/latex/contrib/crefthe/crefthe-doc.tex
+++ b/macros/latex/contrib/crefthe/crefthe-doc.tex
@@ -120,7 +120,7 @@
\begin{document}
-\def\PackageVersion{2023/10/16}
+\def\PackageVersion{2023/10/21}
\def\PackageSubVersion{}
\title{\crefthepackage{}\\\smallskip\itshape Cross referencing with proper definite articles}
diff --git a/macros/latex/contrib/crefthe/crefthe.sty b/macros/latex/contrib/crefthe/crefthe.sty
index bffa152b57..e73444aa88 100644
--- a/macros/latex/contrib/crefthe/crefthe.sty
+++ b/macros/latex/contrib/crefthe/crefthe.sty
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{crefthe}
- {2023/10/16} {}
+ {2023/10/21} {}
{Cross referencing with proper definite articles}
\keys_define:nn { crefthe }
@@ -429,7 +429,7 @@
\tl_gclear:N \l__crefthe_prep_once_tl
\tl_gset:Nx \l__crefthe_prep_each_tl
{ \text_lowercase:n { \l__crefthe_prep_each_tl } }
- \str_if_eq:eeF { \str_tail:n { #1 } } { ' } { ~ }
+ \str_if_eq:eeF { \exp_args:Ne \str_item:nn { #1 } { -1 } } { ' } { ~ }
\bool_gset_false:N \g__crefthe_uppercase_bool
}
diff --git a/macros/latex/contrib/jwjournal/README.md b/macros/latex/contrib/jwjournal/README.md
index 26caffafbf..fb3e0270a3 100644
--- a/macros/latex/contrib/jwjournal/README.md
+++ b/macros/latex/contrib/jwjournal/README.md
@@ -45,7 +45,7 @@ By the way, the conversion from plain date string like `2023-01-01` to natural l
The structure of the document is very simple:
```latex
\documentclass[11pt, paperstyle = light yellow, color entry]{jwjournal}
-\UseLanguage{⟨language⟩}
+\UseLanguage{⟨language⟩} % For English this line can be omitted.
\begin{document}
@@ -91,6 +91,21 @@ 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) Section
+ - You may start a new (*unnumbered*)
+ - section, via `## {⟨section title⟩}`;
+ - subsection, via `### {⟨subsection title⟩}`;
+ - subsubsection, via `#### {⟨subsubsection title⟩}`.
+ - If you wish to use the *numbered* version, write `##+`, `###+` and `####+` instead.
+ > It is recommanded to use the class option `title in boldface`, `title in sffamily` and `use style = classical` (these options are provided by the base class of `jwjournal`). If you also wish your section title to be in small caps shape, then you may put the `⟨section title⟩` in `\textsc`.
+
+ <!-- > Due to the current implementation of the emphasizing `*⟨text⟩*`, you cannot put two `##*`, `###*` or `####*` in the same paragraph — but this shouldn't be any problem, just put an empty line between any two sectional commands. -->
+1) Subfile
+ - With this feature you may organize your journals in a systematic way by putting the fragments of it into subfiles distributed in separate folders. For example, you may have each folder's name to be the year, and within a folder you may have `.tex` files named after each month.
+ - You may include a subfile containing journal text in one of the following ways:
+ - `:: {⟨file name⟩}` for input, similarly as `\input`.
+ - `::: {⟨file name⟩}` for include, similarly as `\include`.
+ > Explicitly, these are `\InputJournal` and `\IncludeJournal`. If in the preamble you wish to define some automatic processing involving input or inclusion of subfiles, please use these two commands.
With a few more for icing on the cake:
- `|`: The first vertical bar would be interpreted as `\hfill`. This allows you to write the title line as
@@ -132,6 +147,7 @@ With a few more for icing on the cake:
And more text.
```
- `->` and `<-`: Skip or retrieve certain vertical space, by default half of `\baselineskip`. You may specify the exact spacing in the unit of `\baselineskip`: for example, `-> <0.3>` would be skipping `0.3\baselineskip`, while `<- <.75>` means retrieving `0.75\baselineskip`.
+- `---`: Three or more hyphen chars `-` in a separate paragraph would be interpreted as a separation line (as with Markdown).
- `+++`: If a single sentence or a few words fall to the next page, you may write a `+++` before that entry to enlarge the current page by one line.
> You may write this `+++` several times if necessary, but do make sure that the number of the `+` sign is a multiple of 3.
- `===`: Three or more equal signs `=` would simply be ignored. This is for improving the readability of the code, allowing you to write your journal like:
@@ -191,7 +207,7 @@ If you are using XeLaTeX or LuaLaTeX to compile your document, then the current
- Source Han Mono, [go to its Release page](https://github.com/adobe-fonts/source-han-mono/releases).
> It is recommended to download the Super-OTC version, so that the total download size would be smaller, and the installation would be easier.
-These are necessary if you wish to write your document in Chinese (either simplified or traditional) or Japanese. Also, without these fonts installed, the compilation speed might be much slower — the compilation would still passing, but the system shall spend (quite) some time verifying that the fonts are indeed missing before switching to the fallback fonts.
+These are necessary if you wish to write your document in Chinese (either simplified or traditional) or Japanese. Also, without these fonts installed, the compilation speed might be much slower — the compilation would still pass, but the system shall spend (quite) some time verifying that the fonts are indeed missing before switching to the fallback fonts.
### Colors
The colors from Monday to Sunday have the internal names `jwjournal-color-1`, ..., `jwjournal-color-7`. Currently they are defined as:
diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf
index 7980506f1e..ef27817556 100644
--- a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf
+++ b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex
index 9cd0937d84..78cdb86040 100644
--- a/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex
+++ b/macros/latex/contrib/jwjournal/jwjournal-demo-cn.tex
@@ -1,4 +1,5 @@
-\documentclass[11pt, paperstyle=light yellow, color entry]{jwjournal}
+\documentclass[11pt, paperstyle=light yellow, color entry,
+ title in boldface, title in sffamily, use style = classical]{jwjournal}
% paperstyle = ... 用于调节纸张颜色,可选项包括:lightyellow、yellow、parchment、green、lightgray、gray、nord、dark
% color entry 可以为每个条目的标题增添更多色彩
% scroll 可以开启卷轴模式,生成类似于长截图的单页 pdf
@@ -8,7 +9,7 @@
\begin{document}
-2023-01-01 晴 | 公寓
+2023-01-01 晴 | 地点
在文中出现的日期和标注不会被识别: 2022-12-25、[标注]、【标注】,放心使用!
@@ -31,6 +32,7 @@
)) <.4> {example-image-b} % 或者 )) {example-image-b} <.4>
+## {新篇章}
2023-01-02
不明(天气也可以写在第二行,看你的喜好)
@@ -39,6 +41,16 @@
[学习] 今天没有学习,但我写了很多很多很多很多很多很多很多很多很多很多很多很多很多很多很多很多代码。
+ -----
+
+ 三个或更多的\textquote{\texttt{-}}符号被放置在单独的段落中时,就会生成一条分割线 ---
+
+ ---
+
+ --- 不过当前这一行不会被转换,因为在 \texttt{-}\texttt{-}\texttt{-} 之后还有其他文本。
+
+ -----
+
如果标注后的文本有多段,可以合理使用 \texttt{\textbackslash\textbackslash} 与 \texttt{\slash\slash} 将它们连接起来,这样所有文本都会被正确缩进:
[标签] 一些文本。
diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-en.pdf b/macros/latex/contrib/jwjournal/jwjournal-demo-en.pdf
index eeffdf0183..e93e4c83b0 100644
--- a/macros/latex/contrib/jwjournal/jwjournal-demo-en.pdf
+++ b/macros/latex/contrib/jwjournal/jwjournal-demo-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-en.tex b/macros/latex/contrib/jwjournal/jwjournal-demo-en.tex
index 0fb357e3ee..32bc336ec8 100644
--- a/macros/latex/contrib/jwjournal/jwjournal-demo-en.tex
+++ b/macros/latex/contrib/jwjournal/jwjournal-demo-en.tex
@@ -1,4 +1,5 @@
-\documentclass[11pt, paperstyle=light yellow, color entry, month-day-year]{jwjournal}
+\documentclass[11pt, paperstyle=light yellow, color entry, month-day-year,
+ title in boldface, title in sffamily, use style = classical]{jwjournal}
% "paperstyle = ..." adjusts the paper color, options include: lightyellow、yellow、parchment、green、lightgray、gray、nord、dark
% "color entry" adds more color to the title of each entry
% "scroll" turns on the scroll mode and can generate a single-page pdf similar to a long screenshot
@@ -6,7 +7,7 @@
\begin{document}
-01/01/2023 Sunny | Apartment
+01/01/2023 Sunny | Location
Dates and annotations appearing in the text will not be recognized: 12/25/2022, [Note], so feel free to write these.
@@ -28,6 +29,7 @@
)) <.4> {example-image-b} % or )) {example-image-b} <.4>
+## {\textsc{A New Section}}
01/02/2023
Unknown (the weather can also be written on the second line, depending on your preference)
@@ -36,6 +38,16 @@ Unknown (the weather can also be written on the second line, depending on your p
[Note] I didn't study today, but I wrote many many many many many many many many many many many many code.
+ -----
+
+ Three or more \textquote{\texttt{-}} in a separate paragraph give you a separation line ---
+
+ ---
+
+ --- but the current line won't be matched since there is extra text behind \texttt{-}\texttt{-}\texttt{-}.
+
+ -----
+
If there are multiple paragraphs following the label, you may use \texttt{\textbackslash\textbackslash} and \texttt{\slash\slash} wisely to concatenate them, so that all texts would be indented properly:
[Label] Some text.
diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-fr.pdf b/macros/latex/contrib/jwjournal/jwjournal-demo-fr.pdf
index 98da8d1897..f8395eeee3 100644
--- a/macros/latex/contrib/jwjournal/jwjournal-demo-fr.pdf
+++ b/macros/latex/contrib/jwjournal/jwjournal-demo-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/jwjournal/jwjournal-demo-fr.tex b/macros/latex/contrib/jwjournal/jwjournal-demo-fr.tex
index f83a5d4ae1..e10fe350b3 100644
--- a/macros/latex/contrib/jwjournal/jwjournal-demo-fr.tex
+++ b/macros/latex/contrib/jwjournal/jwjournal-demo-fr.tex
@@ -1,4 +1,5 @@
-\documentclass[11pt, paperstyle=light yellow, color entry, day-month-year]{jwjournal}
+\documentclass[11pt, paperstyle=light yellow, color entry, day-month-year,
+ title in boldface, title in sffamily, use style = classical]{jwjournal}
% "paperstyle = ..." ajuste la couleur du papier, les options incluent : lightyellow、yellow、parchment、green、lightgray、gray、nord、dark
% "color entry" ajoute plus de couleur au titre de chaque entrée
% "scroll" active le mode de défilement et peut générer un pdf d'une seule page similaire à une longue capture d'écran
@@ -8,7 +9,7 @@
\begin{document}
-01/01/2023 Ensoleillé | Mon appartement
+01/01/2023 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 !
@@ -30,6 +31,7 @@
)) <.4> {example-image-b} % ou )) {example-image-b} <.4>
+## {\textsc{Une Nouvelle Section}}
02/01/2023
Inconnu (la météo peut aussi être écrite sur la deuxième ligne, selon votre préférence)
@@ -38,6 +40,16 @@ Inconnu (la météo peut aussi être écrite sur la deuxième ligne, selon votre
[Note] Je n'ai pas étudié aujourd'hui, mais j'ai écrit beaucoup beaucoup beaucoup beaucoup beaucoup beaucoup beaucoup beaucoup beaucoup de code.
+ -----
+
+ Trois ou plus \textquote{\texttt{-}} signes dans un paragraphe isolé vous donnent une ligne de séparation ---
+
+ ---
+
+ --- mais la ligne actuelle ne sera pas prise en compte car il y a du texte supplémentaire derrière \texttt{-}\texttt{-}\texttt{-}.
+
+ -----
+
Si l'étiquette est suivie de plusieurs paragraphes, vous pouvez utiliser \texttt{\textbackslash\textbackslash} et \texttt{\slash\slash} judicieusement pour les concaténer, de manière à ce que tous les textes soient indentés convenablement :
[Étiquette] Un peu de texte.
diff --git a/macros/latex/contrib/jwjournal/jwjournal.cls b/macros/latex/contrib/jwjournal/jwjournal.cls
index 7ba40e53e4..2a57f1064b 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/10/01} {}
+ {2023/10/19} {}
{JW's journal class}
\keys_define:nn { jwjournal }
@@ -56,6 +56,7 @@
\colorlet { jwjournal-color-7 } { red!20!orange }
\colorlet { jwjournal-entry } { . }
+\colorlet { jwjournal-sep-line } { .!27!paper }
\NewDocumentCommand \JWJournalSeperator { O{jwjournal-entry!60!main-text} }
{
@@ -65,6 +66,14 @@
\enspace
}
+\NewDocumentCommand \JWJournalSepLine { O{.75pt} }
+ {
+ \vspace*{-.5\baselineskip}
+ \noindent
+ \hspace*{-\paperwidth}
+ \makebox[\linewidth]{\color{jwjournal-sep-line}\rule{4\paperwidth}{#1}}
+ }
+
\NewDocumentCommand \JWJournalEntry { m m }
{
\phantomsection
@@ -83,7 +92,17 @@
\begin{tcolorbox}[enhanced~jigsaw,
enlarge~left~by=-3.5mm, width=\textwidth+3.5mm,
colback=jwjournal-entry-background,
- boxrule=0pt, top=2pt, bottom=2pt, left=2.5mm, right=
+ boxrule=0pt,
+ top=
+ \bool_if:NTF \l__jwjournal_color_entry_bool
+ { 2pt }
+ { 0pt },
+ bottom=
+ \bool_if:NTF \l__jwjournal_color_entry_bool
+ { 2pt }
+ { 0pt },
+ left=2.5mm,
+ right=
\bool_if:NTF \l__jwjournal_color_entry_bool
{ 2mm }
{ -1mm },
@@ -252,6 +271,23 @@
\tl_use:N \g_jwjournal_content_tl
}
{}
+\NewDocumentCommand \jwjournaltext { +m }
+ {
+ \tl_gset:Nn \g_jwjournal_content_tl { #1 }
+ \jwjournal_parse_content:N \g_jwjournal_content_tl
+ \tl_use:N \g_jwjournal_content_tl
+ }
+\NewDocumentCommand \InputJournal { m }
+ {
+ \file_get:nnN { #1 } { } \l_tmpa_tl
+ \exp_args:No \jwjournaltext { \l_tmpa_tl }
+ }
+\NewDocumentCommand \IncludeJournal { m }
+ {
+ \clearpage
+ \InputJournal { #1 }
+ \clearpage
+ }
\tl_const:Nn \c_jwjournal_new_line_with_skip_tl { \\[.3\baselineskip] }
\bool_new:N \l_jwjournal_regex_no_more_match_bool
@@ -271,6 +307,40 @@
{ }
\l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { \:\:\: }
+ { \c{IncludeJournal} }
+ \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { \:\: }
+ { \c{InputJournal} }
+ \l_jwjournal_tmp_tl
+
+ \regex_replace_all:nnN
+ { \#\#\#\#\+ }
+ { \c{subsubsection} }
+ \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { \#\#\#\+ }
+ { \c{subsection} }
+ \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { \#\#\+ }
+ { \c{section} }
+ \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { \#\#\#\# }
+ { \c{subsubsection}\* }
+ \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { \#\#\# }
+ { \c{subsection}\* }
+ \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { \#\# }
+ { \c{section}\* }
+ \l_jwjournal_tmp_tl
+
\regex_match:nVT { ❄️ \ *? -> } \l_jwjournal_tmp_tl
{
\regex_match:nVTF { ❄️ \ *? -> \ *? < [\+\-\ ]*(\d+|\d*\.\d+)\ * > } \l_jwjournal_tmp_tl
@@ -407,6 +477,16 @@
}
}
+ \tl_put_right:Nn \l_jwjournal_tmp_tl { ❄️ }
+ \regex_match:nVT { ❄️ \ *? \-{3,} \ *? ❄️ } \l_jwjournal_tmp_tl
+ {
+ \regex_replace_once:nnN
+ { ❄️ \ *? \-{3,} \ *? }
+ { ❄️ \c{JWJournalSepLine} }
+ \l_jwjournal_tmp_tl
+ }
+ \regex_replace_once:nnN { ❄️ (.*) ❄️ } { ❄️ \1 } \l_jwjournal_tmp_tl
+
\regex_replace_once:nnN
{ ❄️ (\ *)? (\d{4}-\d{1,2}-\d{1,2}) (\ *)? (.*) }
{ \c{JWJournalEntry} {\2} {\4} }
diff --git a/macros/latex/contrib/longdivision/README.md b/macros/latex/contrib/longdivision/README.md
index b25cec2d36..84dbff5a02 100644
--- a/macros/latex/contrib/longdivision/README.md
+++ b/macros/latex/contrib/longdivision/README.md
@@ -1,8 +1,8 @@
-longdivision v1.2.0
+longdivision v1.2.2
========================
Author: Hood Chatham
Email: hood@mit.edu
-Date: 2020-05-09
+Date: 2023-10-21
Description:
License: All files have the Latex Project Public License.
Files:
@@ -41,6 +41,12 @@ The current development copy is hosted at https://github.com/hoodmane/longdivisi
Changelog:
==========
+## [1.2.1](2023-10-21)
+### Fixed:
+- The decimal separator no longer goes missing when the "stage" is set to a low
+ enough number that digits after the decimal separator are not inspected.
+- Added "brazilian" style (contributed by gh-user Felipe-Math)
+
## [1.2.1](2021-07-17)
### Fixed:
- The stage option works again.
diff --git a/macros/latex/contrib/longdivision/longdivision.sty b/macros/latex/contrib/longdivision/longdivision.sty
index 114417fd62..3599fc5f9b 100644
--- a/macros/latex/contrib/longdivision/longdivision.sty
+++ b/macros/latex/contrib/longdivision/longdivision.sty
@@ -1,7 +1,7 @@
-%% Package: longdivision.sty version 1.2.1
+%% Package: longdivision.sty version 1.2.2
%% Author: Hood Chatham
%% Email: hood@mit.edu
-%% Date: 2021-07-17
+%% Date: 2023-10-21
%% License: Latex Project Public License
@@ -243,6 +243,8 @@
% Note that \int_eval:n wouldn't work here because it inserts a "\relax" token that would not get eaten by \numexpr if
% #1 contains a decimal point. This "\relax" causes trouble for the division main loop.
\cs_new:Nn \longdiv_start_i:nn {
+ % As a side effect, longdiv_if_decimal_number locates the decimal point.
+ % This is used by \longdiv_insert_separators
\longdiv_if_decimal_number:nF { #1 } {
\longdiv_error:nwnn { dividend_invalid }
}
@@ -269,9 +271,12 @@
}
-% Parse through the dividend token by token
-% Check that every token is a digit with the exception of at most one .
+% Parse through the dividend token by token Check that every token is a digit
+% with the exception of at most one . While we're at it, record the location of
+% the decimal separator. Note that this odd side effect means if we used it more
+% than once we'd have to rearrange this.
\prg_new_conditional:Nnn \longdiv_if_decimal_number:n { F } {
+ \int_set_eq:NN \l__longdiv_point_digit_dividend_int { 0 }
\longdiv_if_decimal_number_before_point:N #1 \q_stop
}
@@ -282,6 +287,8 @@
\longdiv_if_token_is_decimal_separator:NTF #1 {
\longdiv_if_decimal_number_seen_point:N
}{
+ % Saw another digit before decimal separator
+ \int_incr:N \l__longdiv_point_digit_dividend_int
\longdiv_if_digit:nF { #1 }{
\prg_return_false:
\use_none_delimit_by_q_stop:w
@@ -395,7 +402,6 @@
\bool_if:NF \l__longdiv_seen_digit_bool {
\tl_put_right:Nn \l__longdiv_quotient_tl { 0 } % Add a leading zero
}
- \int_set_eq:NN \l__longdiv_point_digit_dividend_int { \l__longdiv_position_int } % Record the position of the point
\bool_set_true:N \l__longdiv_seen_point_bool
\int_set:Nn \l__longdiv_point_digit_quotient_int { \tl_count:N \l__longdiv_quotient_tl }
}
@@ -951,6 +957,20 @@
}
}
+% Credit Felipe-Math
+% https://github.com/hoodmane/longdivision/issues/9
+\longdiv_define_style:nn { brazilian } {
+ \begingroup
+ \def\arraystretch{1.1}
+ \begin{tabular}{@{}ll}
+ \longdivdividend & \multicolumn{1}{|l}{\longdivdivisor}\\\cline{2-2}
+ & \longdivquotient\\[-\arraystretch\baselineskip]
+ \longdivwork &
+ \end{tabular}%
+ \endgroup
+}
+
+
\bool_new:N \l__longdiv_is_tikz_loaded_bool
\AtBeginDocument{ \@ifpackageloaded { tikz }{ \bool_gset_true:N \l__longdiv_is_tikz_loaded_bool } { } }
diff --git a/macros/latex/contrib/longdivision/longdivision_manual.pdf b/macros/latex/contrib/longdivision/longdivision_manual.pdf
index 21e6b7a06c..324aa6908f 100644
--- a/macros/latex/contrib/longdivision/longdivision_manual.pdf
+++ b/macros/latex/contrib/longdivision/longdivision_manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/longdivision/longdivision_manual.tex b/macros/latex/contrib/longdivision/longdivision_manual.tex
index 325e2b993a..690744909e 100644
--- a/macros/latex/contrib/longdivision/longdivision_manual.tex
+++ b/macros/latex/contrib/longdivision/longdivision_manual.tex
@@ -1,5 +1,5 @@
\documentclass{ltxdoc}
-\def\version{Version 1.2.1}
+\def\version{Version 1.2.2}
\let\ifluatex\relax
\usepackage{ifluatex}
diff --git a/macros/latex/contrib/pdfpc/README.md b/macros/latex/contrib/pdfpc/README.md
index 60311000b1..5d243921de 100644
--- a/macros/latex/contrib/pdfpc/README.md
+++ b/macros/latex/contrib/pdfpc/README.md
@@ -1,19 +1,73 @@
# pdfpc
-This packages allows to define additional meta data within
-the PDF file which can be interpreted by the pdf presenter
-console (pdfpc) program.
+This LaTeX package provides a convenient way to specify notes and to define
+certain meta properties of the presentation when used with [PDF Presenter
+Console (`pdfpc`)](https://pdfpc.github.io), a GPLv3+ licensed multi-monitor PDF
+presentation viewer application available on GitHub.
+
## Dependencies
-`pdfpc` depends on these packages:
+The `pdfpc` package depends on these other packages:
[`kvoptions`](https://ctan.org/pkg/kvoptions),
[`xstring`](https://ctan.org/pkg/xstring),
[`iftex`](https://ctan.org/pkg/iftex),
[`hyperxmp`](https://ctan.org/pkg/hyperxmp)
+When using LuaTeX, it additionally depends on these packages:
+[`stringenc`](https://ctan.org/pkg/stringenc),
+[`pdftexcmds`](https://ctan.org/pkg/pdftexcmds)
+
+
## Usage
-It's best to read the [`pdfpc`](https://github.com/pdfpc/pdfpc) documentation
-for `pdfpc` integration.
+The [PDF Presenter Console](https://pdfpc.github.io) program accepts a variety
+of configuration options when started from the command line. (See the *pdfpc(1)*
+manual page for details.)
+
+This package allows certain details, such as presentation duration, default
+slide transitions, and speaker notes, to be specified within the metadata of the
+PDF itself, instead of via the command line. These settings are parsed by the
+PDF Presenter Console when the presentation is loaded.
+
+These parameters can be specified as package options, or via the `\pdfpcsetup` command.
+
+The following is a simple LaTeX document demonstrating a few example features:
+
+```latex
+\documentclass{beamer}
+\usepackage[overridenote]{pdfpc}
+% "overridenote" must be specified as a package option
+\pdfpcsetup{
+ % Other settings can be package options, or can go here
+ duration=5,
+ lastminutes=2,
+}
+
+% The usual Beamer document setup
+\title{\texttt{pdfpc} Example Presentation}
+\author{\texttt{pdfpc} Contributors}
+\institute{GitHub}
+\date{\today}
+
+\begin{document}
+\maketitle
+
+\begin{frame}
+ Hello PDFPC World!
+ % Because of "overridenote", this uses the pdfpc note command
+ \note{This speaker note will be shown by `pdfpc`, but hidden for the audience.}
+ \pause
+ Notice that the timer starts counting down from 5 minutes, just as we specified in the preamble!
+\end{frame}
+
+\end{document}
+```
+
+
+## Documentation
+Complete
+[documentation](http://mirrors.ctan.org/macros/latex/contrib/pdfpc/pdfpc-doc.pdf)
+for the current version of `pdfpc` is availble on [its CTAN
+page](https://ctan.org/pkg/pdfpc).
diff --git a/macros/latex/contrib/pdfpc/pdfpc-doc.pdf b/macros/latex/contrib/pdfpc/pdfpc-doc.pdf
index dc6c357667..22cf5de175 100644
--- a/macros/latex/contrib/pdfpc/pdfpc-doc.pdf
+++ b/macros/latex/contrib/pdfpc/pdfpc-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfpc/pdfpc-doc.tex b/macros/latex/contrib/pdfpc/pdfpc-doc.tex
index f4b959c6b6..1519ab7580 100644
--- a/macros/latex/contrib/pdfpc/pdfpc-doc.tex
+++ b/macros/latex/contrib/pdfpc/pdfpc-doc.tex
@@ -1,5 +1,5 @@
% This file is part of pdfpc.
-% Copyright (C) 2020 Evgeny Stambulchik
+% Copyright (C) 2023 Evgeny Stambulchik
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
@@ -37,6 +37,8 @@
\usepackage{hyperref}
+\usepackage{enumitem}
+
\newcommand*{\sty}[1]{\textsf{#1}}
\def\param#1%
{\textit{\rmfamily\mdseries\ensuremath{\langle}#1\ensuremath{\rangle}}}
@@ -45,41 +47,51 @@
\title{The \sty{pdfpc} package \\
{\large\url{https://github.com/pdfpc/latex-pdfpc}}}
\author{Evgeny Stambulchik}
-\date{2022/07/05 (v0.7.0)}
+\date{2023/10/21 (v0.7.1)}
\hypersetup{pdftitle={The pdfpc package}, pdfauthor={Evgeny Stambulchik}}
+\setlist{noitemsep}
+
\begin{document}
\maketitle
\thispagestyle{empty}
\begin{abstract}
-This package provides a convenient way to specify notes and to define certain
-meta properties of the presentation when used with
-\href{https://pdfpc.github.io/}{PDF Presenter Console (\texttt{pdfpc}), a
-GPLv3+ licensed multi-monitor PDF presentation viewer application available on
-GitHub}\footnote{\url{https://pdfpc.github.io/}}.
+This package provides a convenient way to specify notes and to define certain meta properties of the presentation when used with \href{https://pdfpc.github.io}{PDF Presenter Console (\texttt{pdfpc})}, a GPLv3+ licensed multi-monitor PDF presentation viewer application available on GitHub\footnote{\url{https://pdfpc.github.io}}.
\end{abstract}
+
\clearpage
+
\section*{Dependencies and other requirements}
\sty{pdfpc} requires the use of \LaTeXe.
It depends on the following packages:
-\begin{multicols}{4}\sffamily\centering
-kvoptions \\ xstring \\ iftex \\ hyperxmp
-\end{multicols}
+\begin{itemize}
+ \sffamily
+ \item kvoptions
+ \item xstring
+ \item iftex
+ \item hyperxmp
+\end{itemize}
+
+When using LuaTeX, it additionally depends on these packages:
+
+\begin{itemize}
+ \sffamily
+ \item stringenc
+ \item pdftexcmds
+\end{itemize}
+
\section*{License}
-\textcopyright\ 2020--2022 Evgeny Stambulchik
+\textcopyright\ 2020--2023 Evgeny Stambulchik
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This work consists of the following files:
@@ -89,53 +101,60 @@ This work consists of the following files:
\item ``pdfpc-doc.pdf'' \emph{(compiled)}
\end{itemize}
+
\clearpage
\part{The documentation}
\section*{Loading \sty{pdfpc}}
-Load \sty{pdfpc} by adding \cmd{\usepackage[\param{options}]\{pdfpc\}} to your
-preamble.
-
+Load \sty{pdfpc} by adding \cmd{\usepackage[\param{options}]\{pdfpc\}} to your preamble.
The following options may be given as comma-separated list:
-\begin{itemize}
-\item \texttt{duration}
-\item \texttt{starttime}
-\item \texttt{endtime}
-\item \texttt{enduserslide}
-\item \texttt{lastminutes}
-\item \texttt{hidenotes}
-\item \texttt{overridenote}
-\item \texttt{disablemarkdown}
-\item \texttt{defaulttransition} (needs pdfpc v4.5 or higher)
-\end{itemize}
-
-Alternatively, the options can be set using the \cmd{\pdfpcsetup} command
-like \cmd{\pdfpcsetup\{\param{option1=value1}[,~\ldots]\}}.
-The meaning and possible values of most of these options are documented in
-\textit{pdfpcrc(5)} man page of the pdfpc program. The rest are explained below.
-
-To add a note to a slide, use \cmd{\pdfpcnote\{Text of a note\}}. A line break
-in the body of the note can be inserted with \cmd{\\}. The notes are rendered
-according to the Markdown syntax by default. If you prefer the plain text format
-(which was the case with \texttt{pdfpc}-4.4 and below), use the
-\texttt{disablemarkdown} option.
-
-The pdfpc package can be used standalone or together with beamer. In
-the later case, it may be desirable to continue using the \cmd{\note}
-command. To this end, the \texttt{overridenote} option should be provided.
-Please note though, that this will work only in simple cases.
-
-If you prefer using full-featured beamer notes rendered alongside the
-presentation (\cmd{\setbeameroption\{show notes on second screen\}}), the pdfpc
-package will autodetect it, so using the \texttt{--notes} command-line option is
-unnecessary. To override the autodetection, use the \texttt{notesposition}
-option, accepting the same values (right/left/top/bottom/none).
-
-When sharing slides, one may want to omit the (private) notes, by using the
-\texttt{hidenotes} option. Enabling it together with \texttt{overridenote} will
-disable the beamer notes as well.
+\begin{table}[h]
+\centering
+\begin{tabular}{ l l }
+ \hline
+ Package option & Equivalent \texttt{pdfpc} flag \\
+ \hline
+ \texttt{duration=\textit{value}} & \texttt{--duration=\textit{value}} \\
+ \texttt{starttime=\textit{value}} & \texttt{--start-time=\textit{value}} \\
+ \texttt{endtime=\textit{value}} & \texttt{--end-time=\textit{value}} \\
+ \texttt{lastminutes=\textit{value}} & \texttt{--last-minutes=\textit{value}} \\
+ \texttt{enduserslide=\textit{value}} & \\
+ \texttt{notesposition=\textit{value}} & \texttt{--notes=\textit{value}} \\
+ \texttt{disablemarkdown} & \texttt{--note-format=plain} \\
+ \texttt{hidenotes} & \\
+ \texttt{overridenote} & \\
+ \texttt{defaulttransition=\textit{value}} & \texttt{--page-transition=\textit{value}} \\
+ \hline
+\end{tabular}
+\end{table}
+
+Options should be given as a comma-separated list.
+All options, aside from \texttt{overridenote}, can alternatively be set via a command of the form \cmd{\pdfpcsetup\{\param{option1=value1}[,~\ldots]\}}.
+
+The meaning and possible values of most of these options are documented in the \textit{pdfpc(1)} man page, provided by the \texttt{pdfpc} program.
+The rest are explained below.
+
+To add a note to a slide, use \cmd{\pdfpcnote\{Text of a note\}}, which also supports Beamer's overlay specifications\footnote{See sections 3.10 and 9.2 of the \texttt{beamer} package documentation.}.
+A line break in the body of the note can be inserted with \cmd{\\}.
+To preserve a whitespace, e.g., to indent a nested list, preceed it by a backslash.
+The notes are rendered according to the Markdown syntax by default.
+If you prefer the plain text format (which was the case with \texttt{pdfpc}-4.4 and below), use the \texttt{disablemarkdown} option.
+
+The pdfpc package can be used standalone or together with Beamer.
+In the later case, it may be desirable to continue using the \cmd{\note} command.
+To this end, the \texttt{overridenote} option should be provided.
+Note, however, that this will work only in simple cases.
+
+If you prefer full-featured Beamer notes rendered alongside the presentation (as with \cmd{\setbeameroption\{show notes on second screen\}}), the pdfpc package will autodetect this, so using the \texttt{--notes} command-line option is unnecessary.
+To override the autodetection, use the \texttt{notesposition} option, accepting the same values (right/left/top/bottom/none) that Beamer natively supports.
+
+When sharing slides, one may want to omit the (potentially private) notes, by using the \texttt{hidenotes} option.
+Enabling it will disable notes, including Beamer notes if \texttt{overridenote} was specified.
+
+Finally, be aware that some features are unsupported by old versions of the \texttt{pdfpc} console.
+In particular, the \texttt{defaulttransition} option requires version 4.5 or later.
\StopEventually{%
\clearpage
diff --git a/macros/latex/contrib/pdfpc/pdfpc.sty b/macros/latex/contrib/pdfpc/pdfpc.sty
index 30529d3c11..eaad303306 100644
--- a/macros/latex/contrib/pdfpc/pdfpc.sty
+++ b/macros/latex/contrib/pdfpc/pdfpc.sty
@@ -1,5 +1,5 @@
% This file is part of pdfpc.
-% Copyright (C) 2020 Evgeny Stambulchik
+% Copyright (C) 2023 Evgeny Stambulchik
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
%
% -------------------------------------------------------------------------------------------
%
-\ProvidesPackage{pdfpc}[2022/07/05 v0.7.0 PDFPC]
+\ProvidesPackage{pdfpc}[2023/10/21 v0.7.1 PDFPC]
\NeedsTeXFormat{LaTeX2e}
%
% Require additional packages needed by \sty{pdfpc}:
@@ -38,6 +38,10 @@
\RequirePackage{xstring}
\RequirePackage{iftex}
\RequirePackage{hyperxmp}
+\ifLuaTeX
+ \RequirePackage{stringenc}
+ \RequirePackage{pdftexcmds}
+\fi
%
\SetupKeyvalOptions{
family=PDFPC,
@@ -77,11 +81,11 @@
\fi
%
\ifPDFPC@overridenote
- \renewcommand{\note}[2][]{%
+ \renewcommand<>{\note}[2][]{%
\IfStrEq{#1}{item}%
% Imitate a bullet
- {\pdfpcnote{* #2}}%
- {\pdfpcnote{#2}}%
+ {\pdfpcnote#3{* #2}}%
+ {\pdfpcnote#3{#2}}%
}%
\fi
%
@@ -148,11 +152,11 @@ ______</rdf:Description>^^J%
%
% Note command
\ifPDFPC@hidenotes%
- \newcommand{\pdfpcnote}[1]{}%
+ \newcommand<>{\pdfpcnote}[1]{}%
\else%
\ifXeTeX%
- \newcommand{\pdfpcnote}[1]{%
- {%
+ \newcommand<>{\pdfpcnote}[1]{%
+ \only#2{%
\edef\\{\string\n}%
\special{pdf: ann width 0pt height 0pt depth 0pt%
<<%
@@ -167,18 +171,34 @@ ______</rdf:Description>^^J%
\else%
\ifLuaTeX%
\protected\def\pdfannot {\pdfextension annot }%
- \fi%
- \newcommand{\pdfpcnote}[1]{%
- {%
- \edef\\{\string\n}%
- \pdfannot width 0pt height 0pt depth 0pt {%
- /Subtype /Text%
- /Contents (#1)%
- /F 6%
+ \newcommand<>{\pdfpcnote}[1]{%
+ \only#2{%
+ \edef\tmp@a{\pdf@escapehexnative{#1}}
+ \expandafter\SE@ConvertFrom\expandafter\tmp@a\expandafter{\tmp@a}{utf8}
+ {%
+ \edef\\{\string\n}%
+ \pdfannot width 0pt height 0pt depth 0pt {%
+ /Subtype /Text%
+ /Contents <FEFF\tmp@a>%
+ /F 6%
+ }%
+ }%
}%
+ \relax%
}%
- \relax%
- }%
+ \else%
+ \newcommand<>{\pdfpcnote}[1]{%
+ \only#2{%
+ \edef\\{\string\n}%
+ \pdfannot width 0pt height 0pt depth 0pt {%
+ /Subtype /Text%
+ /Contents (#1)%
+ /F 6%
+ }%
+ }%
+ \relax%
+ }%
+ \fi%
\fi%
\fi%
%