texlive[68608] Master/texmf-dist: jwjournal (21oct23)

commits+karl at tug.org commits+karl at tug.org
Sat Oct 21 22:16:54 CEST 2023


Revision: 68608
          https://tug.org/svn/texlive?view=revision&revision=68608
Author:   karl
Date:     2023-10-21 22:16:54 +0200 (Sat, 21 Oct 2023)
Log Message:
-----------
jwjournal (21oct23)

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-10-21 15:32:27 UTC (rev 68607)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/README.md	2023-10-21 20:16:54 UTC (rev 68608)
@@ -45,7 +45,7 @@
 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,7 +91,22 @@
       - `(( <⟨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 @@
     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 @@
   - 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:

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-10-21 15:32:27 UTC (rev 68607)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex	2023-10-21 20:16:54 UTC (rev 68608)
@@ -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} 将它们连接起来,这样所有文本都会被正确缩进:
 
   [标签] 一些文本。

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-10-21 15:32:27 UTC (rev 68607)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex	2023-10-21 20:16:54 UTC (rev 68608)
@@ -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 @@
 
   [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.

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-10-21 15:32:27 UTC (rev 68607)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex	2023-10-21 20:16:54 UTC (rev 68608)
@@ -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 @@
 
   [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.

Modified: trunk/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls	2023-10-21 15:32:27 UTC (rev 68607)
+++ trunk/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls	2023-10-21 20:16:54 UTC (rev 68608)
@@ -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,8 +92,18 @@
     \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 },
       borderline~west={1.5mm}{0mm}{jwjournal-entry!90!main-text}, frame~hidden]
@@ -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} }



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