summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-08-27 19:53:30 +0000
committerKarl Berry <karl@freefriends.org>2023-08-27 19:53:30 +0000
commitfbf64a12c56dc2745e3809b4325780ee808fcf59 (patch)
treeacdf327f35dce520b7a9b63d678cf32e73bbd639 /Master/texmf-dist
parentd5515ac6c674357e891c2e17177b1bc5c5149b33 (diff)
jwjournal (27aug23)
git-svn-id: svn://tug.org/texlive/trunk@68088 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/README.md12
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.pdfbin46598 -> 46611 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex4
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.pdfbin19484 -> 19506 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex8
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.pdfbin19833 -> 19847 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex6
-rw-r--r--Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls19
8 files changed, 36 insertions, 13 deletions
diff --git a/Master/texmf-dist/doc/latex/jwjournal/README.md b/Master/texmf-dist/doc/latex/jwjournal/README.md
index 6432aebb1ef..4dd00cbba4d 100644
--- a/Master/texmf-dist/doc/latex/jwjournal/README.md
+++ b/Master/texmf-dist/doc/latex/jwjournal/README.md
@@ -50,20 +50,27 @@ The options are:
And there are only two major syntaxes for the main text:
1) Title
- - Any line begins with date like `2023-01-01` would be regard as the Title line.
+ - 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.
- Example:
```
2023-01-01 Sunny --- Apartment
```
2) Note
- - Any line begins with something like `[Note]` would be regard as the Note line.
+ - Any line begins with something like `[Note]` would be regard as the *Note* line.
- Example:
```
[Note] In hindsight, it was the right decision.
```
+ 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.
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
+ ```
+ 2023-01-01 Sunny | Botanical Garden
+ ```
+ and then the address `Botanical Garden` would be printed at the end of the title line.
- `+++`: 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.
- `===`: 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:
```
@@ -124,6 +131,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}`).
+Also, synctex won't work properly.
### Dates
The conversion of date string to natural language, and the calculation of the day of the week are accomplished by `projlib-date`, part of the `ProjLib` toolkit, which is still at its early stage, in some aspects not as functional as existing package such as `datenumber`, but should evolve through time.
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 8d393374c8f..d4175f70726 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 0fa7c87cb09..92b00e0ddfe 100644
--- a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex
+++ b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex
@@ -8,13 +8,13 @@
\begin{document}
-2023-01-01 晴 —— 公寓
+2023-01-01 晴 | 公寓
在文中出现的日期和标注不会被识别: 2022-12-25、[标注],放心使用
[体育] 一些关于体育赛事的事情
- [学习] 一些关于学习的事情
+ 【学习】一些关于学习的事情 % 【...】与 [...] 效果相同
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 84fd7596f9a..f1da481824b 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 ae95a74d530..500c772c1c3 100644
--- a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex
+++ b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex
@@ -6,13 +6,13 @@
\begin{document}
-01/01/2023 Sunny --- Apartment
+01/01/2023 Sunny | Apartment
- Dates and annotations appearing in the text will not be recognized: 12/25/2022, [Note], so feel free to write them
+ Dates and annotations appearing in the text will not be recognized: 12/25/2022, [Note], so feel free to write these.
- [Sports] something about sporting events
+ [Sports] something about sporting events.
- [Learning] something about learning
+ [Learning] something about learning.
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 6986ffd900d..65f7cf45a56 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 c5d8d7b821a..c7b3e41d25c 100644
--- a/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex
+++ b/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex
@@ -8,13 +8,13 @@
\begin{document}
-01/01/2023 Ensoleillé --- Appartement
+01/01/2023 Ensoleillé | Appartement
Les dates et annotations apparaissant dans le texte ne seront pas reconnues : 25/12/2022, [Note], alors n'hésitez pas à les écrire.
- [Sports] quelque chose sur les événements sportifs
+ [Sports] quelque chose sur les événements sportifs.
- [Apprendre] quelque chose sur l'apprentissage
+ [Apprendre] quelque chose sur l'apprentissage.
diff --git a/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls b/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls
index 4d515d580a9..fc8b0919527 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/01/07} {}
+ {2023/08/26} {}
{JW's journal class}
\keys_define:nn { jwjournal }
@@ -68,7 +68,14 @@
{
\colorlet { jwjournal-entry-background } { paper }
}
- \begin{tcolorbox}[enhanced~jigsaw, breakable, enlarge~left~by=-3.5mm, width=\textwidth+3.5mm, colback=jwjournal-entry-background, boxrule=0pt, top=2pt, bottom=2pt, left=2.5mm, borderline~west={1.5mm}{0mm}{jwjournal-entry!90!main-text}, frame~hidden]
+ \begin{tcolorbox}[enhanced~jigsaw, breakable,
+ enlarge~left~by=-3.5mm, width=\textwidth+3.5mm,
+ colback=jwjournal-entry-background,
+ boxrule=0pt, top=2pt, bottom=2pt, left=2.5mm, right=
+ \bool_if:NTF \l__jwjournal_color_entry_bool
+ { 2mm }
+ { -1mm },
+ borderline~west={1.5mm}{0mm}{jwjournal-entry!90!main-text}, frame~hidden]
\sffamily \bfseries
\bool_if:NT \l__jwjournal_color_entry_bool
{
@@ -132,6 +139,10 @@
{ ={3,} }
{ }
\l_tmpa_tl
+ \regex_replace_once:nnN
+ { \| }
+ { \c{hfill} }
+ \l_tmpa_tl
\regex_match:nVT { ❄️ +++ (.*) } \l_tmpa_tl
{
\tl_gput_right:Nn \g_jwjournal_content_tl { \g_jwjournal_enlarge_page_by_one_line_tl }
@@ -160,6 +171,10 @@
{ ❄️ (\[.*\] .*) }
{ \c{JWJournalItem} {\1} }
\l_tmpa_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
\tl_gput_right:Nn \g_jwjournal_content_tl { \par }