texlive[68088] Master/texmf-dist: jwjournal (27aug23)

commits+karl at tug.org commits+karl at tug.org
Sun Aug 27 21:53:30 CEST 2023


Revision: 68088
          http://tug.org/svn/texlive?view=revision&revision=68088
Author:   karl
Date:     2023-08-27 21:53:30 +0200 (Sun, 27 Aug 2023)
Log Message:
-----------
jwjournal (27aug23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/jwjournal/README.md
    trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.pdf
    trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex
    trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.pdf
    trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex
    trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.pdf
    trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex
    trunk/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls

Modified: trunk/Master/texmf-dist/doc/latex/jwjournal/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jwjournal/README.md	2023-08-27 19:53:19 UTC (rev 68087)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/README.md	2023-08-27 19:53:30 UTC (rev 68088)
@@ -50,7 +50,7 @@
 
 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:
       ```
@@ -57,13 +57,20 @@
       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 @@
 
 ### 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.

Modified: trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex	2023-08-27 19:53:19 UTC (rev 68087)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex	2023-08-27 19:53:30 UTC (rev 68088)
@@ -8,13 +8,13 @@
 \begin{document}
 
 
-2023-01-01 晴 —— 公寓
+2023-01-01 晴 | 公寓
 
   在文中出现的日期和标注不会被识别: 2022-12-25、[标注],放心使用
 
   [体育] 一些关于体育赛事的事情
 
-  [学习] 一些关于学习的事情
+  【学习】一些关于学习的事情 % 【...】与 [...] 效果相同
 
 
 

Modified: trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex	2023-08-27 19:53:19 UTC (rev 68087)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex	2023-08-27 19:53:30 UTC (rev 68088)
@@ -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.
 
 
 

Modified: trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex	2023-08-27 19:53:19 UTC (rev 68087)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex	2023-08-27 19:53:30 UTC (rev 68088)
@@ -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.
 
 
 

Modified: trunk/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls	2023-08-27 19:53:19 UTC (rev 68087)
+++ trunk/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls	2023-08-27 19:53:30 UTC (rev 68088)
@@ -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 }



More information about the tex-live-commits mailing list.