texlive[68124] Master/texmf-dist: jwjournal (31aug23)
commits+karl at tug.org
commits+karl at tug.org
Thu Aug 31 23:41:03 CEST 2023
Revision: 68124
http://tug.org/svn/texlive?view=revision&revision=68124
Author: karl
Date: 2023-08-31 23:41:03 +0200 (Thu, 31 Aug 2023)
Log Message:
-----------
jwjournal (31aug23)
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-31 21:40:54 UTC (rev 68123)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/README.md 2023-08-31 21:41:03 UTC (rev 68124)
@@ -13,7 +13,16 @@
Today I visited the botanical garden!
- [Food] And had ice-cream for lunch!
+ [Food] And had *ice cream* for lunch!
+
+ >>> This botanical garden has a history of nearly two hundred years, take a look at this photo:
+ || <0.40> {example-image}
+
+ (( <0.45> {example-image-a}
+ <- <5>
+ )) <0.50> {example-image-b}
+ <- <5>
+ (( <0.45> {example-image-c}
```
> It is also possible to write the date as `2023/01/01`.
@@ -35,28 +44,34 @@
The structure of the document is very simple:
```latex
-\documentclass[11pt, paperstyle=light yellow, color entry]{jwjournal}
+\documentclass[11pt, paperstyle = light yellow, color entry]{jwjournal}
+\UseLanguage{⟨language⟩}
\begin{document}
+
+
% Your journal
+
+
\end{document}
```
-The options are:
-- `month-day-year` or `day-month-year` for other date format
-- `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
+The available class options include:
+- `month-day-year` or `day-month-year` for using other date format;
+- `paperstyle = ...` adjusts the paper color, choices include: `light yellow`, `yellow`, `parchment`, `green`, `light gray`, `gray`, `nord`, `dark`...
+- `color entry` adds more color to the title of each entry;
+- `scroll` turns the scroll mode on, which generates a single-page pdf similar to a long screenshot.
-And there are only three major syntaxes for the main text:
+Here are the major syntaxes for your 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` or `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
+ 2023-01-01 Sunny | Apartment
```
-2) Note
+ > With the options `month-day-year` or `day-month-year`, you can also write date in the format `mm-dd-yyyy` or `dd-mm-yyyy`, respectively. You may refer to the English and French demo documents for examples.
+1) Note
- Any line begins with something like `[Note]` would be regard as the *Note* line.
- Example:
```
@@ -64,10 +79,17 @@
```
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⟩}` or `|| {⟨image file name⟩} <⟨width⟩>`: show image in the middle.
- - `(( <⟨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.
+1) Emphasis
+ - You may emphasize text as with Markdown:
+ - `*⟨text⟩*` is emphasizing;
+ - `**⟨text⟩**` is bolding;
+ - `***⟨text⟩***` is bolding and emphasizing.
+ - You may put text in a colored block via `>>>`, its usage is like the `>` in Markdown for blockquote.
+1) Image
+ - Displayed images can be included via one of the following ways:
+ - `|| <⟨width⟩> {⟨image file name⟩}` or `|| {⟨image file name⟩} <⟨width⟩>`: show image in the middle.
+ - `(( <⟨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`.
With a few more for icing on the cake:
@@ -111,6 +133,8 @@
> You may also refer to the demo documents to see their behaviors in action.
+> And don't forget that you are still using LaTeX! Thus if the provided syntax does not satisfy you, there are always LaTeX commands as a fallback.
+
Indentations are not important, but paragraphs need to be separated by a blank line. For the sake of readability, it is recommended to organize your text as one of the following ways:
- with indentation:
```
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-31 21:40:54 UTC (rev 68123)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-cn.tex 2023-08-31 21:41:03 UTC (rev 68124)
@@ -12,14 +12,16 @@
在文中出现的日期和标注不会被识别: 2022-12-25、[标注]、【标注】,放心使用!
- [体育] 一些关于体育赛事的事情
+ [文本] 你可以使用*斜体*、**粗体**或者***两者结合***。
- 【学习】 % 【...】与 [...] 效果相同
- 一些关于学习的事情
+ 【说明】 % 【...】与 [...] 效果相同
+ 在一些特殊情况需要把星号用 \texttt{\{\}} 隔开:**像**{}***这***{}*样*。
- 图片这可以这样引入:
+ >>> 像这样可以把文本放在色彩框内。
- || <.4> {example-image-a} % 或者 || {example-image-a} <.4>
+ 图片可以这样引入:
+
+ || <.4> {example-image} % 或者 || {example-image} <.4>
>> (图片的注释)
>> (更多注释)
@@ -26,7 +28,7 @@
也可以靠左或者靠右显示:
(( <.4> {example-image-a} % 或者 (( {example-image-a} <.4>
-> <.3> % 加入一点竖直间距,例如这里是 0.3\baselineskip
- )) <.4> {example-image-a} % 或者 )) {example-image-a} <.4>
+ )) <.4> {example-image-b} % 或者 )) {example-image-b} <.4>
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-31 21:40:54 UTC (rev 68123)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-en.tex 2023-08-31 21:41:03 UTC (rev 68124)
@@ -10,13 +10,15 @@
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.
+ [Text] You can write text in *italics*, **bold** or ***both***.
- [Learning] something about learning.
+ [Remark] In some special cases, it would be necessary to separate the asterisks with~\texttt{\{\}}: **like**{}***this***{}*one*.
+ >>> You can put text inside a colored block like this.
+
Images can be included via:
- || <.4> {example-image-a} % or || {example-image-a} <.4>
+ || <.4> {example-image} % or || {example-image} <.4>
>> (Remark on the image)
>> (More remark...)
@@ -23,7 +25,7 @@
You may also show the image on the left or on the right:
(( <.4> {example-image-a} % or (( {example-image-a} <.4>
-> <.3> % add some vertical spacing, here is 0.3\baselineskip
- )) <.4> {example-image-a} % or )) {example-image-a} <.4>
+ )) <.4> {example-image-b} % or )) {example-image-b} <.4>
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-31 21:40:54 UTC (rev 68123)
+++ trunk/Master/texmf-dist/doc/latex/jwjournal/jwjournal-demo-fr.tex 2023-08-31 21:41:03 UTC (rev 68124)
@@ -12,13 +12,15 @@
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.
+ [Texte] Vous pouvez écrire votre texte en *italique*, **gras** ou ***les deux***.
- [Apprendre] quelque chose sur l'apprentissage.
+ [Remarque] Dans certains cas particuliers, il serait nécessaire de séparer les astérisques par~\texttt{\{\}} : **comme**{}***cet***{}*exemple*.
+ >>> Vous pouvez mettre votre texte dans un bloc coloré comme celui-ci.
+
Les images peuvent être incluses via :
- || <.4> {example-image-a} % ou || {example-image-a} <.4>
+ || <.4> {example-image} % ou || {example-image} <.4>
>> (Remarque sur l'image)
>> (Plus de remarque...)
@@ -25,7 +27,7 @@
Vous pouvez également afficher l'image à gauche ou à droite :
(( <.4> {example-image-a} % ou (( {example-image-a} <.4>
-> <.3> % ajouter un certain espace vertical, ici c'est 0.3\baselineskip
- )) <.4> {example-image-a} % ou )) {example-image-a} <.4>
+ )) <.4> {example-image-b} % ou )) {example-image-b} <.4>
Modified: trunk/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls 2023-08-31 21:40:54 UTC (rev 68123)
+++ trunk/Master/texmf-dist/tex/latex/jwjournal/jwjournal.cls 2023-08-31 21:41:03 UTC (rev 68124)
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{jwjournal}
- {2023/08/30} {}
+ {2023/08/31} {}
{JW's journal class}
\keys_define:nn { jwjournal }
@@ -57,6 +57,14 @@
\colorlet { jwjournal-entry } { . }
+\NewDocumentCommand \JWJournalSeperator { O{jwjournal-entry!60!main-text} }
+ {
+ \enspace
+ \tikz [x=.75ex,y=.75ex,line~width=.2ex,line~join=round,baseline=-.3ex]
+ \draw [#1] (0,.5) -- (.5,1) -- (1,.5) -- (.5,0) -- (0,.5) -- cycle;
+ \enspace
+ }
+
\NewDocumentCommand \JWJournalEntry { m m }
{
\skip_vertical:n { .5 \baselineskip }
@@ -70,7 +78,7 @@
{
\colorlet { jwjournal-entry-background } { paper }
}
- \begin{tcolorbox}[enhanced~jigsaw, breakable,
+ \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=
@@ -84,15 +92,11 @@
\color {jwjournal-entry!30!main-text}
}
\ProjLibDate {#1}
- \enspace
- \tikz [x=.75ex,y=.75ex,line~width=.2ex,line~join=round,baseline=-.3ex] \draw [jwjournal-entry!60!main-text] (0,.5) -- (.5,1) -- (1,.5) -- (.5,0) -- (0,.5) -- cycle;
- \enspace
+ \JWJournalSeperator{}
\projlib_datetime_display_week_uppercase:n { #1 }
\tl_if_blank:eF { #2 }
{
- \enspace
- \tikz [x=.75ex,y=.75ex,line~width=.2ex,line~join=round,baseline=-.3ex] \draw [jwjournal-entry!60!main-text] (0,.5) -- (.5,1) -- (1,.5) -- (.5,0) -- (0,.5) -- cycle;
- \enspace
+ \JWJournalSeperator{}
#2
}
\end{tcolorbox}
@@ -100,11 +104,10 @@
}
\RequirePackage { enumitem }
-\setlist [ description ] { font = \normalfont\sffamily, leftmargin = 3em, topsep = 0pt }
+\setlist [ description ] { font = \normalfont\sffamily, leftmargin = 3em, topsep = 0pt, labelsep = 1em }
\RenewDocumentCommand \descriptionlabel { m }
{
- \skip_horizontal:n { \labelsep }
- \makebox[\maxof{\width}{2.5em}]{
+ \makebox[\maxof{\width}{2em}][l]{
\tcbox[enhanced~jigsaw, breakable, oversize,
on~line, arc = .12em, outer~arc = .1em,
colframe = jwjournal-entry, colupper=main-text, opacityback = 0,
@@ -119,6 +122,26 @@
\end{description}
}
+\NewDocumentCommand \JWJournalNote { m }
+ {
+ \bool_if:NTF \l__jwjournal_color_entry_bool
+ {
+ \colorlet { jwjournal-note-background } { jwjournal-entry!3!paper }
+ }
+ {
+ \colorlet { jwjournal-note-background } { paper }
+ }
+ \begin{tcolorbox}[enhanced~jigsaw, breakable,
+ colback=jwjournal-note-background,
+ boxrule=0pt, top=2pt, bottom=2pt, left=1em-1mm, right=
+ \bool_if:NTF \l__jwjournal_color_entry_bool
+ { 2mm }
+ { -1mm },
+ borderline~west={1mm}{0mm}{jwjournal-entry!90!main-text!60!paper}, frame~hidden]
+ #1
+ \end{tcolorbox}
+ }
+
\NewDocumentCommand \JWJournalSkip { D<>{.5} }
{
% \vspace{#1\baselineskip}
@@ -316,10 +339,36 @@
{ \c{c_jwjournal_new_line_with_skip_tl} }
\l_jwjournal_tmp_tl
- % \regex_replace_all:nnN
- % { >> (.*) }
- % { \c{JWJournalCompactCenterText}\{\1\} }
- % \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { \*\*\* (.*?) \*\*\* }
+ { \c{textbf}\{ \c{emph}\{ \1 \} \} }
+ \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { \*\* (.*?) \*\* }
+ { \c{textbf}\{ \1 \} }
+ \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { \* (.*?) \* }
+ { \c{emph}\{ \1 \} }
+ \l_jwjournal_tmp_tl
+
+ \regex_replace_once:nnN
+ { >>> \ *? (.*) }
+ { \c{JWJournalNote}\{\1\} }
+ \l_jwjournal_tmp_tl
+ \regex_replace_all:nnN
+ { \ *? >>> \ *? }
+ { }
+ \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_set_eq:NN \l_jwjournal_tmp_tl \l_tmpa_tl
+ % \seq_map_inline:Nn \l_tmpa_seq
+ % {
+ % \tl_put_right:Nn \l_jwjournal_tmp_tl
+ % { \JWJournalNote { ####1 } }
+ % }
+
\exp_args:Nno \regex_split:nnN { >> } { \l_jwjournal_tmp_tl } \l_tmpa_seq
\seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl
\tl_set_eq:NN \l_jwjournal_tmp_tl \l_tmpa_tl
More information about the tex-live-commits
mailing list.