summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-08-29 23:20:40 +0000
committerKarl Berry <karl@freefriends.org>2023-08-29 23:20:40 +0000
commitb7fd54847aca3222c3fa76577eee9a082a75ee2e (patch)
treecc09c6980ab63f6b102f805d17ea8eff00b21834 /Master
parenta6264258ab394f5b4ce36ecbee7dc67ef8c4d51c (diff)
jwjournal (30aug23)
git-svn-id: svn://tug.org/texlive/trunk@68105 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/README.md47
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.pdfbin46611 -> 70876 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex37
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.pdfbin19506 -> 34389 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex32
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.pdfbin19847 -> 35287 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex36
-rw-r--r--Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls150
8 files changed, 253 insertions, 49 deletions
diff --git a/Master/texmf-dist/doc/latex/jwjournal/README.md b/Master/texmf-dist/doc/latex/jwjournal/README.md
index 4dd00cbba4d..41146918201 100644
--- a/Master/texmf-dist/doc/latex/jwjournal/README.md
+++ b/Master/texmf-dist/doc/latex/jwjournal/README.md
@@ -9,7 +9,7 @@ A typical journal entry produced by `jwjournal` looks like this:
Codewise, it is as simple as below:
```
-2023-01-01 Sunny --- Botanical Garden
+2023-01-01 Sunny | Botanical Garden
Today I visited the botanical garden!
@@ -23,7 +23,7 @@ Codewise, it is as simple as below:
Every day of the week has its unique color, like this:
![image](https://github.com/Jinwen-XU/jwjournal/raw/main/screenshots/demo2.png)
-By the way, the conversion from plain date string like `2023-01-01` to natural language like `January 1, 2023 | Sunday` is done automatically by `jwjournal` and has multilingual support. Thus, for example (via `\UseLanguage`):
+By the way, the conversion from plain date string like `2023-01-01` to natural language like `January 1, 2023 ⬦ Sunday` is done by `jwjournal` automatically and has multilingual support. Thus, for example (via `\UseLanguage`):
- Chinese: ![image](https://github.com/Jinwen-XU/jwjournal/raw/main/screenshots/demo3-cn.png)
- French: ![image](https://github.com/Jinwen-XU/jwjournal/raw/main/screenshots/demo3-fr.png)
- German: ![image](https://github.com/Jinwen-XU/jwjournal/raw/main/screenshots/demo3-de.png)
@@ -48,7 +48,7 @@ The options are:
- `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
-And there are only two major syntaxes for the main text:
+And there are only three major syntaxes for the main text:
1) Title
- Any line begins with date like `2023-01-01` would be regard as the *Title* line.
- You may write the weather and/or location after the date.
@@ -64,6 +64,11 @@ And there are only two major syntaxes for the main text:
```
The space(s) between `[Note]` and the text following it would be ignored.
> You may also use `【` and `】`, which is especially useful when writing Chinese.
+3) Displayed images can be included via one of the following ways:
+ - `|| [<width>] {<image file name>}`: show image in the middle.
+ - `(( [<width>] {<image file name>}`: show image on the left.
+ - `)) [<width>] {<image file name>}`: 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`.
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
@@ -71,11 +76,33 @@ With a few more for icing on the cake:
2023-01-01 Sunny | Botanical Garden
```
and then the address `Botanical Garden` would be printed at the end of the title line.
+- `\\` and `//`: `\\` has its usual meaning in LaTeX for starting a new line, while `//` has been defined to be starting a new line with some vertical spacing. This allows you to write the annotations as:
+ ```
+ [Note] Some text.
+ //
+ More text.
+ //
+ (Some remark)
+ \\
+ (Another remark)
+ \\
+ (Final remark)
+ ```
+ As a result, all the text would be properly indented.
+ > Note that images specified via `||`, `((` or `))` already contain line breaks, thus you don't need to (actually, *you can't*) write `//` or `\\` around them.
+- `>>`: Text after `>>` would be centered. This is intended for writing annotations/captions for displayed images:
+ ```
+ || {image-name}
+ >> (Some remark)
+ >> (Another remark)
+ ```
+- `->` 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`.
- `+++`: 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:
```
- 2023-01-01 Sunny --- Botanical Garden
- =====================================
+ 2023-01-01 Sunny | Botanical Garden
+ ===================================
Today I visited the botanical garden!
@@ -88,15 +115,15 @@ Indentations are not important, but paragraphs need to be separated by a blank l
- with indentation:
```
2023-01-01
- Sunny
+ Sunny | Botanical Garden
......
......
```
- with a separation line:
```
- 2023-01-01 Sunny
- ================
+ 2023-01-01 Sunny | Botanical Garden
+ ===================================
......
......
@@ -104,7 +131,7 @@ Indentations are not important, but paragraphs need to be separated by a blank l
- or maybe even:
```
==========
- 2023-01-01 Sunny
+ 2023-01-01 Sunny | Botanical Garden
==========
......
@@ -130,7 +157,7 @@ The colors from Monday to Sunday have the internal names `jwjournal-color-1`, ..
```
### Functionality
-The main features are achieved with the power of LaTeX3's regex functionality. It scans the content paragraph by paragraph and converts recognized patterns into corresponding TeX commands. Thus, `2023-01-01 Weather` becomes `\JWJournalEntry{2023-01-01}{Weather}`, `[Note] ...` becomes `\item[Note] ...` inside a `description` environment, and `+++` is essentially `\enlargethispage*{\baselineskip}`, etc. However, this comes with a price: in order to scan the content, it is firstly stored in a macro `\g_jwjournal_content_tl`, and that means that you cannot use commands like `\verb` in your main text (unless explicitly `\end{jwjournal}`, write your code, and then `\begin{jwjournal}`).
+The main features are achieved with the power of LaTeX3's regex functionality. It scans the content paragraph by paragraph and converts recognized patterns into corresponding TeX commands. Thus, `2023-01-01 Weather` becomes `\JWJournalEntry{2023-01-01}{Weather}`, `[Note] ...` becomes `\item[Note] ...` inside a `description` environment, and `+++` is essentially `\enlargethispage{\baselineskip}`, etc. However, this comes with a price: in order to scan the content, it is firstly stored in a macro `\g_jwjournal_content_tl`, and that means that you cannot use commands like `\verb` in your main text (unless explicitly `\end{jwjournal}`, write your code, and then `\begin{jwjournal}`).
Also, synctex won't work properly.
### Dates
diff --git a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.pdf b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.pdf
index d4175f70726..40281336ade 100644
--- a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.pdf
+++ b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex
index 92b00e0ddfe..81647136b9c 100644
--- a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex
+++ b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex
@@ -10,21 +10,47 @@
2023-01-01 晴 | 公寓
- 在文中出现的日期和标注不会被识别: 2022-12-25、[标注],放心使用
+ 在文中出现的日期和标注不会被识别: 2022-12-25、[标注]、【标注】,放心使用!
[体育] 一些关于体育赛事的事情
- 【学习】一些关于学习的事情 % 【...】与 [...] 效果相同
+ 【学习】 % 【...】与 [...] 效果相同
+ 一些关于学习的事情
+
+ 图片这可以这样引入:
+
+ || [.4] {example-image-a}
+ >> (图片的注释)
+ >> (更多注释)
+
+ 也可以靠左或者靠右显示:
+ (( [.4] {example-image-a}
+ -> [.3] % 加入一点竖直间距,例如这里是 0.3\baselineskip
+ )) [.4] {example-image-a}
2023-01-02
不明(天气也可以写在第二行,看你的喜好)
- 标签的颜色会根据日期改变:
+ 标签的颜色会根据日期改变,并且很长的文本会自动缩进:
[学习] 今天没有学习,但我写了很多很多很多很多很多很多很多很多很多很多很多很多很多很多很多很多代码。
+ 如果标注后的文本有多段,可以合理使用 \texttt{\textbackslash\textbackslash} 与 \texttt{\slash\slash} 将它们连接起来,这样所有文本都会被正确缩进:
+
+ [标签] 一些文本。
+ //
+ 更多文本(使用了 \texttt{\slash\slash},因此与上面的文本有一定距离)。
+ //
+ 更多文本(同样与上面的文本有一定距离)。
+ //
+ (一些注释)
+ \\
+ (其他注释,由于使用了 \texttt{\textbackslash\textbackslash},和上面是紧贴着的)
+ \\
+ (更多注释,同样和上面是紧贴着的)
+
2023-01-03
@@ -39,9 +65,8 @@
-==========
2023-01-05 多云 —— 居家办公
-==========
+=======================================
也可以把代码排列成这样。
@@ -50,7 +75,7 @@
2023-01-06 晴朗 —— 居家办公
==========
-...
+或者这样……
diff --git a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.pdf b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.pdf
index f1da481824b..04b98e63663 100644
--- a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.pdf
+++ b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex
index 500c772c1c3..f0b85fc4849 100644
--- a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex
+++ b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex
@@ -14,15 +14,40 @@
[Learning] something about learning.
+ Images can be included via:
+
+ || [.4] {example-image-a}
+ >> (Remark on the image)
+ >> (More remark...)
+
+ You may also show the image on the left or on the right:
+ (( [.4] {example-image-a}
+ -> [.3] % add some vertical spacing, here is 0.3\baselineskip
+ )) [.4] {example-image-a}
+
01/02/2023
Unknown (the weather can also be written on the second line, depending on your preference)
- The color of the labels will change according to the date.
+ 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.
+ 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.
+ //
+ More text (with \texttt{\slash\slash}, thus having some vertical spacing from the above text).
+ //
+ More text (same, with some vertical spacing from the above text).
+ //
+ (Some remark)
+ \\
+ (Another remark, due to the use of \texttt{\textbackslash\textbackslash}, is close to the above remark)
+ \\
+ (More remark --- similarly, is close to the above remark)
+
01/03/2023
@@ -37,9 +62,8 @@ Unknown (the weather can also be written on the second line, depending on your p
-==========
01-05-2023 Cloudy --- Work at home
-==========
+============================================
You may also organize your code like this.
@@ -48,7 +72,7 @@ You may also organize your code like this.
01-06-2023 Sunny --- Work at home
==========
-...
+Or like this...
diff --git a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.pdf b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.pdf
index 65f7cf45a56..7303b8b07e3 100644
--- a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.pdf
+++ b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex
index c7b3e41d25c..d8c6413bc8d 100644
--- a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex
+++ b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex
@@ -8,23 +8,48 @@
\begin{document}
-01/01/2023 Ensoleillé | Appartement
+01/01/2023 Ensoleillé | Mon appartement
- Les dates et annotations apparaissant dans le texte ne seront pas reconnues : 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/2022, [Note], alors n'hésitez pas à les écrire !
[Sports] quelque chose sur les événements sportifs.
[Apprendre] quelque chose sur l'apprentissage.
+ Les images peuvent être incluses via :
+
+ || [.4] {example-image-a}
+ >> (Remarque sur l'image)
+ >> (Plus de remarque...)
+
+ Vous pouvez également afficher l'image à gauche ou à droite :
+ (( [.4] {example-image-a}
+ -> [.3] % ajouter un certain espace vertical, ici c'est 0.3\baselineskip
+ )) [.4] {example-image-a}
+
02/01/2023
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.
+ 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.
+ 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.
+ //
+ Plus de texte (avec \texttt{\slash\slash}, ce qui permet d'avoir un espace vertical par rapport au texte ci-dessus).
+ //
+ Plus de texte (le même, avec un certain espace vertical par rapport au texte précédent).
+ //
+ (Quelque remarque)
+ \\
+ (Une autre remarque, due à l'utilisation de \texttt{\textbackslash\textbackslash}, est proche de la remarque ci-dessus)
+ \\
+ (Une autre remarque --- de même, est proche de la remarque ci-dessus)
+
03/01/2023
@@ -39,9 +64,8 @@ Inconnu (la météo peut aussi être écrite sur la deuxième ligne, selon votre
-==========
05-01-2023 Nuageux --- Travail à domicile
-==========
+==================================================
Vous pouvez également organiser votre code comme ceci.
@@ -50,7 +74,7 @@ Vous pouvez également organiser votre code comme ceci.
06-01-2023 Ensoleillé --- Travail à domicile
==========
-...
+Ou bien comme ceci...
diff --git a/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls b/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls
index fc8b0919527..f7d1da7f64a 100644
--- a/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls
+++ b/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{jwjournal}
- {2023/08/26} {}
+ {2023/08/29} {}
{JW's journal class}
\keys_define:nn { jwjournal }
@@ -55,6 +55,8 @@
\colorlet { jwjournal-color-6 } { yellow!20!orange }
\colorlet { jwjournal-color-7 } { red!20!orange }
+\colorlet { jwjournal-entry } { . }
+
\NewDocumentCommand \JWJournalEntry { m m }
{
\skip_vertical:n { .5 \baselineskip }
@@ -98,7 +100,7 @@
}
\RequirePackage { enumitem }
-\setlist [ description ] { font = \normalfont\sffamily, leftmargin = 3em}
+\setlist [ description ] { font = \normalfont\sffamily, leftmargin = 3em, topsep = 0pt }
\RenewDocumentCommand \descriptionlabel { m }
{
\skip_horizontal:n { \labelsep }
@@ -117,6 +119,54 @@
\end{description}
}
+\NewDocumentCommand \JWJournalSkip { O{.5} }
+ {
+ % \vspace{#1\baselineskip}
+ \vskip#1\baselineskip
+ }
+\NewDocumentCommand \JWJournalBack { O{.5} }
+ {
+ % \vspace{-#1\baselineskip}
+ \vskip-#1\baselineskip
+ }
+
+\newenvironment{JWJournalCompactCenter}
+ {\parskip=0pt\par\nopagebreak\centering}
+ {\par\noindent\ignorespacesafterend}
+\newenvironment{JWJournalCenter}
+ {\parskip=0pt\par\medskip\nopagebreak\centering}
+ {\par\noindent\ignorespacesafterend}
+\newenvironment{JWJournalLeft}
+ {\parskip=0pt\par\medskip\nopagebreak\raggedright}
+ {\par\noindent\ignorespacesafterend}
+\newenvironment{JWJournalRight}
+ {\parskip=0pt\par\medskip\nopagebreak\raggedleft}
+ {\par\noindent\ignorespacesafterend}
+\NewDocumentCommand \JWJournalCompactCenterText { m }
+ {
+ \begin{JWJournalCompactCenter}
+ #1
+ \end{JWJournalCompactCenter}
+ }
+\NewDocumentCommand \JWJournalShowImageCenter { O{1} m }
+ {
+ \begin{JWJournalCenter}
+ \includegraphics[width=#1\linewidth]{#2}
+ \end{JWJournalCenter}
+ }
+\NewDocumentCommand \JWJournalShowImageLeft { O{1} m }
+ {
+ \begin{JWJournalLeft}
+ \includegraphics[width=#1\linewidth]{#2}
+ \end{JWJournalLeft}
+ }
+\NewDocumentCommand \JWJournalShowImageRight { O{1} m }
+ {
+ \begin{JWJournalRight}
+ \includegraphics[width=#1\linewidth]{#2}
+ \end{JWJournalRight}
+ }
+
\tl_new:N \g_jwjournal_content_tl
\NewDocumentEnvironment { jwjournal } { +b }
{
@@ -126,7 +176,10 @@
}
{}
+\tl_const:Nn \c_jwjournal_new_line_with_skip_tl { \\[.3\baselineskip] }
+\bool_new:N \l_jwjournal_regex_no_more_match_bool
\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_parse_content:N
{
@@ -134,56 +187,107 @@
\tl_set:Nn \g_jwjournal_content_tl {}
\seq_map_inline:Nn \l_jwjournal_tmp_seq
{
- \tl_set:Nn \l_tmpa_tl { ❄️ ##1 }
+ \tl_set:Nn \l_jwjournal_tmp_tl { ❄️ ##1 }
+
\regex_replace_all:nnN
{ ={3,} }
{ }
- \l_tmpa_tl
+ \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { -> }
+ { \c{JWJournalSkip} }
+ \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { <- }
+ { \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_once:nnN
{ \| }
{ \c{hfill} }
- \l_tmpa_tl
- \regex_match:nVT { ❄️ +++ (.*) } \l_tmpa_tl
+ \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{JWJournalCompactCenterText}\{\1\} }
+ % \l_jwjournal_tmp_tl
+ \exp_args:Nno \regex_split:nnN { >> } { \l_jwjournal_tmp_tl } \l_tmpa_seq
+ \seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl
+ \tl_clear:N \l_jwjournal_tmp_tl
+ \tl_put_right:NV \l_jwjournal_tmp_tl \l_tmpa_tl
+ \seq_map_inline:Nn \l_tmpa_seq
{
- \tl_gput_right:Nn \g_jwjournal_content_tl { \g_jwjournal_enlarge_page_by_one_line_tl }
- \regex_replace_once:nnN
- { ❄️ +++ (.*) }
- { ❄️ \1 }
- \l_tmpa_tl
+ \tl_put_right:Nn \l_jwjournal_tmp_tl
+ { \JWJournalCompactCenterText { ####1 } }
}
+
+ \bool_set_false:N \l_jwjournal_regex_no_more_match_bool
+ \bool_do_until:nn \l_jwjournal_regex_no_more_match_bool
+ {
+ \regex_match:nVTF { ❄️ \ *? \+{3} } \l_jwjournal_tmp_tl
+ {
+ \tl_gput_right:Nn \g_jwjournal_content_tl { \c_jwjournal_enlarge_page_by_one_line_tl }
+ \regex_replace_once:nnN
+ { ❄️ \ *? \+{3} (.*) }
+ { ❄️ \1 }
+ \l_jwjournal_tmp_tl
+ }
+ {
+ \bool_set_true:N \l_jwjournal_regex_no_more_match_bool
+ }
+ }
+
\regex_replace_once:nnN
{ ❄️ (\ *)? (\d{4}-\d{1,2}-\d{1,2}) (\ *)? (.*) }
{ \c{JWJournalEntry} {\2} {\4} }
- \l_tmpa_tl
+ \l_jwjournal_tmp_tl
\regex_replace_once:nnN
{ ❄️ (\ *)? (\d{1,2}-\d{1,2}-\d{4}) (\ *)? (.*) }
{ \c{JWJournalEntry} {\2} {\4} }
- \l_tmpa_tl
+ \l_jwjournal_tmp_tl
\regex_replace_once:nnN
{ ❄️ (\ *)? (\d{4} \D \d{1,2} \D \d{1,2}) (\ *)? (.*) }
{ \c{JWJournalEntry} {\2} {\4} }
- \l_tmpa_tl
+ \l_jwjournal_tmp_tl
\regex_replace_once:nnN
{ ❄️ (\ *)? (\d{1,2} \D \d{1,2} \D \d{4}) (\ *)? (.*) }
{ \c{JWJournalEntry} {\2} {\4} }
- \l_tmpa_tl
+ \l_jwjournal_tmp_tl
+
\regex_replace_once:nnN
- { ❄️ (\[.*\] .*) }
+ { ❄️ \ *? (\[.*\] .*) }
{ \c{JWJournalItem} {\1} }
- \l_tmpa_tl
+ \l_jwjournal_tmp_tl
\regex_replace_once:nnN
- { ❄️ 【(.*)】(.*) }
+ { ❄️ \ *? 【(.*)】(.*) }
{ \c{JWJournalItem} { \[\1\] \2 } }
- \l_tmpa_tl
- \regex_replace_once:nnN { ❄️ } { } \l_tmpa_tl
- \tl_gput_right:NV \g_jwjournal_content_tl \l_tmpa_tl
+ \l_jwjournal_tmp_tl
+
+ \regex_replace_once:nnN { ❄️ } { } \l_jwjournal_tmp_tl
+
+ \tl_gput_right:NV \g_jwjournal_content_tl \l_jwjournal_tmp_tl
\tl_gput_right:Nn \g_jwjournal_content_tl { \par }
}
}
\bool_if:NTF \l__jwjournal_scroll_bool
{
- \tl_const:Nn \g_jwjournal_enlarge_page_by_one_line_tl {}
+ \tl_const:Nn \c_jwjournal_enlarge_page_by_one_line_tl {}
\geometry{
papersize={7in,\maxdimen},
top=.75in,bottom=.75in,
@@ -212,7 +316,7 @@
}
}
{
- \tl_const:Nn \g_jwjournal_enlarge_page_by_one_line_tl { \enlargethispage*{\baselineskip} }
+ \tl_const:Nn \c_jwjournal_enlarge_page_by_one_line_tl { \enlargethispage{\baselineskip} }
\geometry{
papersize={7in,10in},
top=.75in,bottom=.75in,