summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-03-18 03:01:30 +0000
committerNorbert Preining <norbert@preining.info>2024-03-18 03:01:30 +0000
commit9c8677e09c2c9b0d9593f26ed226411d68160a4e (patch)
tree1c5464d3dc4dbe0ad27d69bec29b581f4b0d1fdd /macros/latex/contrib
parent55140d5421e1ad0024c9acbfa72bd06402c2aa9f (diff)
CTAN sync 202403180301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/beautybook/Beautybook-CN.cls43
-rw-r--r--macros/latex/contrib/beautybook/Beautybook-EN.cls39
-rw-r--r--macros/latex/contrib/beautybook/Beautybook-cn.pdfbin5536441 -> 6210741 bytes
-rw-r--r--macros/latex/contrib/beautybook/Beautybook-cn.tex286
-rw-r--r--macros/latex/contrib/beautybook/README.md2
-rw-r--r--macros/latex/contrib/beautybook/beautybook-en.pdfbin3560151 -> 3706871 bytes
-rw-r--r--macros/latex/contrib/beautybook/beautybook-en.tex161
-rw-r--r--macros/latex/contrib/beautybook/ref.bib7
-rw-r--r--macros/latex/contrib/beautybook/stys/Beautybook-bottompage.sty4
-rw-r--r--macros/latex/contrib/beautybook/stys/Beautybook-cover-cn.sty8
-rw-r--r--macros/latex/contrib/dashrulex/dashrulex.pdfbin54472 -> 56156 bytes
-rw-r--r--macros/latex/contrib/dashrulex/dashrulex.sty4
-rw-r--r--macros/latex/contrib/dashrulex/dashrulex.tex28
-rw-r--r--macros/latex/contrib/fadingimage/doc/fadingimage.pdfbin135453 -> 228555 bytes
-rw-r--r--macros/latex/contrib/fadingimage/doc/fadingimage.tex25
-rw-r--r--macros/latex/contrib/fadingimage/tex/fadingimage.sty24
-rw-r--r--macros/latex/contrib/hvfloat/Changes1
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/after1s1c.pdfbin80278 -> 80278 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/after2s2c.pdfbin86613 -> 86613 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/capPos.pdfbin98058 -> 98064 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/default1s1c.pdfbin81968 -> 82047 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/default1s2c.pdfbin83201 -> 83277 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/default2s1c.pdfbin79342 -> 79342 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/default2s2c.pdfbin85763 -> 85844 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/doublepage2s1c.pdfbin2353650 -> 2350647 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.pdfbin617745 -> 618818 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.tex4
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/even1s1c.pdfbin77785 -> 77810 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/even1s2c.pdfbin86361 -> 86582 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/even2s1c.pdfbin84419 -> 84620 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/even2s2c.pdfbin85033 -> 1825222 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/even2s2c.tex10
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/fullpage1s2c.pdfbin84979 -> 85143 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/inner1s2c.pdfbin84016 -> 84100 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/inner2s1c.pdfbin83984 -> 84068 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/inner2s2c.pdfbin84071 -> 84149 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/left2s2c.pdfbin85470 -> 1825644 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/left2s2c.tex10
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/multi-after1s1c.pdfbin142607 -> 142513 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/multi-default1s1c.pdfbin146068 -> 145980 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/multi-default1s2c.pdfbin94532 -> 94441 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/multi-default2s1c.pdfbin146241 -> 146159 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/multi-default2s2c.pdfbin92138 -> 92046 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/multi-inner2s2c.pdfbin89696 -> 89597 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/multi-outer2s2c.pdfbin92902 -> 92802 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/multi-right1s1c.pdfbin145635 -> 145541 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/odd1s1c.pdfbin77734 -> 77734 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/odd1s2c.pdfbin86529 -> 86601 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/odd2s1c.pdfbin173858 -> 173938 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/odd2s2c.pdfbin85527 -> 85726 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/outer1s2c.pdfbin86353 -> 86554 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/outer2s1c.pdfbin84291 -> 84373 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/outer2s2c.pdfbin84725 -> 84940 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/paper-after1s1c.pdfbin79014 -> 79008 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/paper-after2s2c.pdfbin89655 -> 89736 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/paper-default1s1c.pdfbin81199 -> 81374 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/paper-default1s2c.pdfbin90470 -> 90548 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/paper-default2s2c.pdfbin90288 -> 90376 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/paper-even2s1c.pdfbin87273 -> 87492 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/paper-inner2s2c.pdfbin87843 -> 87903 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/paper-odd2s1c.pdfbin87055 -> 87144 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/paper-right1s1c.pdfbin81469 -> 81463 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/right1s1c.pdfbin80095 -> 80095 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/right1s2c.pdfbin89250 -> 89339 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/right2s1c.pdfbin80969 -> 80969 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/right2s2c.pdfbin85508 -> 1825612 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/right2s2c.tex10
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/sub-after1s1c.pdfbin143883 -> 143944 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/sub-after2s2c.pdfbin144738 -> 144840 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/sub-default1s1c.pdfbin143745 -> 143825 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/sub-default1s2c.pdfbin144175 -> 144273 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/sub-default2s2c.pdfbin143455 -> 143556 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/sub-right1s1c.pdfbin143804 -> 143873 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/sub-right1s2c.pdfbin144842 -> 144946 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/sub-right2s2c.pdfbin144282 -> 143003 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/wide1s2c.pdfbin120972 -> 121991 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/wide1s2c.tex3
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/wide2s2c.pdfbin121957 -> 122005 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/examples/wide2s2c.tex4
-rw-r--r--macros/latex/contrib/hvfloat/doc/hvfloat.pdfbin6393567 -> 11613770 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/hvfloat.tex104
-rw-r--r--macros/latex/contrib/hvfloat/doc/images/usa5.jpgbin0 -> 1742387 bytes
-rw-r--r--macros/latex/contrib/hvfloat/latex/hvfloat-0.inc2
-rw-r--r--macros/latex/contrib/hvfloat/latex/hvfloat-1.inc3
-rw-r--r--macros/latex/contrib/hvfloat/latex/hvfloat-2.inc2
-rw-r--r--macros/latex/contrib/hvfloat/latex/hvfloat-3.inc48
-rw-r--r--macros/latex/contrib/hvfloat/latex/hvfloat.sty118
-rw-r--r--macros/latex/contrib/snaptodo/README4
-rw-r--r--macros/latex/contrib/snaptodo/snaptodo.pdfbin208140 -> 237197 bytes
-rw-r--r--macros/latex/contrib/snaptodo/snaptodo.sty70
-rw-r--r--macros/latex/contrib/snaptodo/snaptodo.tex372
-rw-r--r--macros/latex/contrib/snaptodo/test/before_after.tex44
-rw-r--r--macros/latex/contrib/snaptodo/test/circle_testing.tex4
-rw-r--r--macros/latex/contrib/snaptodo/test/minimal_testing.tex1
-rw-r--r--macros/latex/contrib/snaptodo/test/stress_testing.tex902
-rw-r--r--macros/latex/contrib/starray/README.md6
-rw-r--r--macros/latex/contrib/starray/doc/starray.pdfbin273444 -> 284852 bytes
-rw-r--r--macros/latex/contrib/starray/doc/starray.tex28
-rw-r--r--macros/latex/contrib/starray/latex/starray.sty461
99 files changed, 1544 insertions, 1298 deletions
diff --git a/macros/latex/contrib/beautybook/Beautybook-CN.cls b/macros/latex/contrib/beautybook/Beautybook-CN.cls
index 32a3f4de85..d3ab12a333 100644
--- a/macros/latex/contrib/beautybook/Beautybook-CN.cls
+++ b/macros/latex/contrib/beautybook/Beautybook-CN.cls
@@ -7,6 +7,8 @@
\RequirePackage[dvipsnames,svgnames,x11names,table]{xcolor}
\RequirePackage{cncolours}
\setmainfont{Times New Roman}
+\setsansfont{HONOR Sans}
+\setmonofont{Latin Modern Mono}
\colorlet{outermarginfgcolor}{DarkCyan} % foregroundcolor 较深
\colorlet{outermarginbgcolor}{DarkCyan!30} % backgroundcolor 较浅
\RequirePackage{bropd} % math 自适应数学括号命令 \br{} !!!
@@ -193,32 +195,53 @@ citecolor = purple, %%修改此处为你想要的颜色
\newcommand\boxednum[1]
{
\tcbsidebyside[sidebyside adapt=left,
-nobeforeafter,fontupper=\sffamily\large\bfseries,fontlower=\large\bfseries,colframe=white,colupper=white,colback=outermarginfgcolor!90,colbacklower=gray!10,frame hidden,width =\textwidth,
-top=0mm,bottom=0mm,right=0mm,left=2mm,before skip balanced=0em,after skip balanced=0em,arc=0pt,outer arc=0pt,bicolor,sidebyside gap=6mm,boxrule=0pt,sidebyside align=center,halign=center,halign lower=left,fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
-fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
+nobeforeafter,fontupper=\sffamily\large\bfseries,fontlower=\large,colframe=white,colupper=white,colback=outermarginfgcolor!90,colbacklower=gray!10,frame hidden,width =\textwidth,
+top=0mm,bottom=0mm,right=0mm,left=2mm,before skip balanced=0em,after skip balanced=0em,arc=0pt,outer arc=0pt,bicolor,sidebyside gap=6mm,boxrule=0pt,sidebyside align=center,halign=center,halign lower=left,fuzzy shadow={-0.4mm}{0.4mm}{0mm}{0.2mm}{white!50!gray},% 上
+fuzzy shadow={0.4mm}{-0.4mm}{0mm}{0.2mm}{fill=white!40!gray},%下
]{% left hand side % adjust from this side
\thecontentslabel
}{% right hand side
-#1 \hfill \bfseries\sffamily\thecontentspage
+\textbf{#1} \hfill \thecontentspage
}% end
}
\newcommand\boxednonum[1]
{
-\begin{tcolorbox}[nobeforeafter,fontupper=\large,fontlower=\large\bfseries,colframe=white,fontupper=\sffamily\bfseries,colupper=white,colback=outermarginfgcolor!90,colbacklower=gray!10,frame hidden,width = 1\textwidth,sidebyside gap=6mm,
-top=0mm,bottom=0mm,right=0cm,left=2mm,before skip balanced=0em,after skip balanced=0em,arc=0pt,outer arc=0pt,bicolor,sidebyside,boxrule=0pt,sidebyside align=center,halign=center,halign lower=left,lefthand width=3mm,fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
-fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
+\begin{tcolorbox}[nobeforeafter,fontupper=\large,fontlower=\large,colframe=white,fontupper=\sffamily\bfseries,colupper=white,colback=outermarginfgcolor!90,colbacklower=gray!10,frame hidden,width = \textwidth,sidebyside gap=6mm,
+top=0mm,bottom=0mm,right=0cm,left=2mm,before skip balanced=0em,after skip balanced=0em,arc=0pt,outer arc=0pt,bicolor,sidebyside,boxrule=0pt,sidebyside align=center,halign=center,halign lower=left,lefthand width=3mm,fuzzy shadow={-0.4mm}{0.4mm}{0mm}{0.2mm}{white!50!gray},% 上
+fuzzy shadow={0.4mm}{-0.4mm}{0mm}{0.2mm}{fill=white!40!gray},%下
]
-\tcblower #1\hfill \bfseries\sffamily\thecontentspage
+\tcblower \textbf{#1}\hfill \thecontentspage
\end{tcolorbox}
}
-
+%
\titlecontents{chapter}[0mm]
{\addvspace{-.5em}}
{\contentsmargin{0pt}\boxednum}
{\contentsmargin{0pt}\boxednonum}
{}
[\addvspace{-.5em}]
+%
+ \titlecontents{section}
+ [4.5em] % ie, 1.5em (chapter) + 2.3em
+ {}
+ {\hyperlink{section.\thecontentslabel}{\contentslabel{2.2em}}}
+ {\hspace*{-2.2em}}
+ {\titlerule*[1pc]{.}\contentspage\hspace*{1.5mm}}
+%
+ \titlecontents{subsection}
+ [7.3em] % ie, 1.5em (chapter) + 2.3em
+ {}
+ {\hyperlink{subsection.\thecontentslabel}{\contentslabel{2.7em}}}
+ {\hspace*{-2.7em}}
+ {\titlerule*[1pc]{.}\contentspage\hspace*{1.5mm}}
+%
+ \titlecontents{subsubsection}
+ [10.7em] % ie, 1.5em (chapter) + 2.3em
+ {}
+ {\hyperlink{subsubsection.\thecontentslabel}{\contentslabel{3.3em}}}
+ {\hspace*{-3.3em}}
+ {\titlerule*[1pc]{.}\contentspage\hspace*{1.5mm}}
% tcolorbox中插入图片或者tikz绘图方法
\newcommand\Figure[4]{%
@@ -1119,7 +1142,7 @@ anchor=west,rounded corners=3pt,font=\bfseries\normalsize] at ([xshift=0cm,yshif
bodyfont=\normalfont,
postheadspace=.5em,
headpunct={.},
- qed=$\blacksquare$,%\qedsymbol
+ qed=\color{cyan!40!black}$\blacksquare$,%\qedsymbol
]{Proofstyle}
\declaretheorem[style=Proofstyle,numbered=no,name={\itbf{Proof}}]{Proof}
\renewenvironment{proof}{\begin{Proof} }{\end{Proof}}
diff --git a/macros/latex/contrib/beautybook/Beautybook-EN.cls b/macros/latex/contrib/beautybook/Beautybook-EN.cls
index f64062a468..63e3e038df 100644
--- a/macros/latex/contrib/beautybook/Beautybook-EN.cls
+++ b/macros/latex/contrib/beautybook/Beautybook-EN.cls
@@ -196,32 +196,53 @@ citecolor = purple, %%修改此处为你想要的颜色
\newcommand\boxednum[1]
{
\tcbsidebyside[sidebyside adapt=left,
-nobeforeafter,fontupper=\sffamily\large\bfseries,fontlower=\large\bfseries,colframe=white,colupper=white,colback=outermarginfgcolor!90,colbacklower=gray!10,frame hidden,width =\textwidth,
-top=0mm,bottom=0mm,right=0mm,left=2mm,before skip balanced=0em,after skip balanced=0em,arc=0pt,outer arc=0pt,bicolor,sidebyside gap=6mm,boxrule=0pt,sidebyside align=center,halign=center,halign lower=left,fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
-fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
+nobeforeafter,fontupper=\sffamily\large\bfseries,fontlower=\large,colframe=white,colupper=white,colback=outermarginfgcolor!90,colbacklower=gray!10,frame hidden,width =\textwidth,
+top=0mm,bottom=0mm,right=0mm,left=2mm,before skip balanced=0em,after skip balanced=0em,arc=0pt,outer arc=0pt,bicolor,sidebyside gap=6mm,boxrule=0pt,sidebyside align=center,halign=center,halign lower=left,fuzzy shadow={-0.4mm}{0.4mm}{0mm}{0.2mm}{white!50!gray},% 上
+fuzzy shadow={0.4mm}{-0.4mm}{0mm}{0.2mm}{fill=white!40!gray},%下
]{% left hand side % adjust from this side
\thecontentslabel
}{% right hand side
-#1 \hfill \bfseries\sffamily\thecontentspage
+\textbf{#1} \hfill \thecontentspage
}% end
}
\newcommand\boxednonum[1]
{
-\begin{tcolorbox}[nobeforeafter,fontupper=\large,fontlower=\large\bfseries,colframe=white,fontupper=\sffamily\bfseries,colupper=white,colback=outermarginfgcolor!90,colbacklower=gray!10,frame hidden,width = 1\textwidth,sidebyside gap=6mm,
-top=0mm,bottom=0mm,right=0cm,left=2mm,before skip balanced=0em,after skip balanced=0em,arc=0pt,outer arc=0pt,bicolor,sidebyside,boxrule=0pt,sidebyside align=center,halign=center,halign lower=left,lefthand width=3mm,fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
-fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
+\begin{tcolorbox}[nobeforeafter,fontupper=\large,fontlower=\large,colframe=white,fontupper=\sffamily\bfseries,colupper=white,colback=outermarginfgcolor!90,colbacklower=gray!10,frame hidden,width = \textwidth,sidebyside gap=6mm,
+top=0mm,bottom=0mm,right=0cm,left=2mm,before skip balanced=0em,after skip balanced=0em,arc=0pt,outer arc=0pt,bicolor,sidebyside,boxrule=0pt,sidebyside align=center,halign=center,halign lower=left,lefthand width=3mm,fuzzy shadow={-0.4mm}{0.4mm}{0mm}{0.2mm}{white!50!gray},% 上
+fuzzy shadow={0.4mm}{-0.4mm}{0mm}{0.2mm}{fill=white!40!gray},%下
]
-\tcblower #1\hfill \bfseries\sffamily\thecontentspage
+\tcblower \textbf{#1}\hfill \thecontentspage
\end{tcolorbox}
}
-
+%
\titlecontents{chapter}[0mm]
{\addvspace{-.5em}}
{\contentsmargin{0pt}\boxednum}
{\contentsmargin{0pt}\boxednonum}
{}
[\addvspace{-.5em}]
+%
+ \titlecontents{section}
+ [4.5em] % ie, 1.5em (chapter) + 2.3em
+ {}
+ {\hyperlink{section.\thecontentslabel}{\contentslabel{2.2em}}}
+ {\hspace*{-2.2em}}
+ {\titlerule*[1pc]{.}\contentspage\hspace*{1.5mm}}
+%
+ \titlecontents{subsection}
+ [7.3em] % ie, 1.5em (chapter) + 2.3em
+ {}
+ {\hyperlink{subsection.\thecontentslabel}{\contentslabel{2.7em}}}
+ {\hspace*{-2.7em}}
+ {\titlerule*[1pc]{.}\contentspage\hspace*{1.5mm}}
+%
+ \titlecontents{subsubsection}
+ [10.7em] % ie, 1.5em (chapter) + 2.3em
+ {}
+ {\hyperlink{subsubsection.\thecontentslabel}{\contentslabel{3.3em}}}
+ {\hspace*{-3.3em}}
+ {\titlerule*[1pc]{.}\contentspage\hspace*{1.5mm}}
% tcolorbox中插入图片或者tikz绘图方法
\newcommand\Figure[4]{%
diff --git a/macros/latex/contrib/beautybook/Beautybook-cn.pdf b/macros/latex/contrib/beautybook/Beautybook-cn.pdf
index d5fe6b8561..924e220ab7 100644
--- a/macros/latex/contrib/beautybook/Beautybook-cn.pdf
+++ b/macros/latex/contrib/beautybook/Beautybook-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/beautybook/Beautybook-cn.tex b/macros/latex/contrib/beautybook/Beautybook-cn.tex
index 5722dcb40c..4e0e850bf4 100644
--- a/macros/latex/contrib/beautybook/Beautybook-cn.tex
+++ b/macros/latex/contrib/beautybook/Beautybook-cn.tex
@@ -2,12 +2,24 @@
% This template is made by Ethan Lu.
% Please use XeLaTeX engine!
\documentclass[zihao=-4,fontset=windows]{Beautybook-CN}
+% ---------------------------------------------------------------------------- %
+% The Cover Theme Chosen %
+% ---------------------------------------------------------------------------- %
+\definecolor{coverbgcolor}{HTML}{e0e0e0}
+\definecolor{coverfgcolor}{HTML}{826e68} % The color of the background
+\definecolor{coverbar}{HTML}{7c9092} % The color of the left bar
+\definecolor{bottomcolor}{HTML}{826e68}
\coverstyle={ % 封面键值列表
cover-choose=cn, % cn (需新增项\entitle{#}); en ; enfig ; birkar
}
+% ---------------------------------------------------------------------------- %
+% The Cover Theme Chosen %
+% ---------------------------------------------------------------------------- %
\mathstyle={ % 数学字体键值列表
math-font=plain, %plain (默认数学字体); stix; mtpro2
}
+\setmainfont{Times New Roman}
+\renewcommand{\partial}{∂}
%% First one
\mynewtheorem{
defi={\textbf{Definition}}[section]{interior style={left color=ReD!8,right color=ReD!5!CyaN!50}, borderline west={1.5mm}{0mm}{ReD}},
@@ -187,15 +199,6 @@ sorting=nty
\makeindex[title={\sffamily References},columns=3,columnsep=15pt,columnseprule]
\makeindex
-\newcommand{\pr}{^\prime}
-\newcommand{\prr}{^{\prime\prime}}
-\newcommand{\bd}{\partial}
-\newcommand{\bdd}{\overline{\partial}}
-\newcommand{\Dif}[2]{\frac{\dd #1}{\dd #2}}
-\newcommand{\Diff}[2][]{\frac{\partial #1}{\partial #2}}
-\usepackage{shadowtext}\shadowoffset{.65pt}
-\newcommand*{\circledd}[1]{\lower.7ex\hbox{\tikz\draw (0pt, 0pt)%
- circle (.5em) node {\makebox[1em][c]{\small #1}};}}
\usepackage{listings}
\lstset{
basicstyle=\small\ttfamily,
@@ -245,19 +248,24 @@ sorting=nty
\coverimage{inner_pics/coverimage.jpg}%ivy-ge998908f8_1280.jpg
\makecover
-
+\makeatletter
+% ---------------------------------------------------------------------------- %
+% The Sidebar Theme Chosen %
+% ---------------------------------------------------------------------------- %
\definecolor{bg}{HTML}{e0e0e0}
\definecolor{fg}{HTML}{2c4f54}
\colorlet{outermarginbgcolor}{bg}
\colorlet{outermarginfgcolor}{fg}
-\colorlet{framegolden}{fg}
-\colorlet{framegray}{bg!50}
-
-\makeatletter
% set the contents of the outer margin on even and odd pages for scrheadings, plain and scth
-\oddoutermargin{\sffamily Vanishing Theorems on Vector Bundles with Semidefinite Curvature} % Odd 奇数页
-\evenoutermargin{\sffamily\@title} % Even 偶数页
-%
+\oddoutermargin{\sffamily \leftmark} % Odd
+\evenoutermargin{\sffamily\@title} % Even
+% ---------------------------------------------------------------------------- %
+% The Sidebar Theme Chosen %
+% ---------------------------------------------------------------------------- %
+
+% ---------------------------------------------------------------------------- %
+% The images used in the title %
+% ---------------------------------------------------------------------------- %
\titleimage{
chapteroddimage={odd1,odd2,odd3,odd4,odd5,odd6,odd7,odd8,odd9,odd10,odd11,odd12,odd13,odd14,odd15,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11},
%
@@ -270,7 +278,19 @@ sorting=nty
\chapimage{\Beautybook@chapterimagename} % 会自动改变
\partimage{\Beautybook@partimagename} % 会自动改变
\makeatother
-%
+% ---------------------------------------------------------------------------- %
+% The images used in the title %
+% ---------------------------------------------------------------------------- %
+
+% ---------------------------------------------------------------------------- %
+% The Color Chosen for The Magic Box %
+% ---------------------------------------------------------------------------- %
+\colorlet{framegolden}{fg} % The line color of the magic box
+\colorlet{framegray}{bg!50} % The background color of the magic box
+% ---------------------------------------------------------------------------- %
+% The Color Chosen for The Magic Box %
+% ---------------------------------------------------------------------------- %
+
\frontmatter
\pagenumbering{Roman}
@@ -283,8 +303,8 @@ Introduction to Beatybook template.
\hfill
\begin{tabular}{lr}
- &----- Ethan Lu\\
- &2023-09-01
+ &--- Ethan Lu\\
+ &2024-03-17
\end{tabular}
\clearpage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -323,23 +343,20 @@ Beauty\LaTeX{} 系列模板是由我所做的书籍模板系列, 名叫\textbf{B
\subsection{在线使用模板}
本模板可以直接上传到overleaf上使用,但需要注意的是, 需要使用 math-font=plain 键值, 并使用XeLaTeX或者lualatex编译!
-
+\newpage
\subsection{本地安装使用}
-\textbf{本地安装}使用方法如下:从 GitHub 或者 QQ群下载最新版, 然后将模板文件放在你的工作目录下并且同步复制这几个文件夹: \textit{chinesefonts}, \textit{fonts}, \textit{stys}, \textit{inner\_pics}, 即可使用。这样使用的好处是,相比在线使用,可以通过自行安装mtpro2字体实现更加精美的效果,当然如何选择交给用户本身,此处不作评价.
+\textbf{本地安装}使用方法如下:从 GitHub 或者 QQ群下载最新版, 然后将模板文件放在你的工作目录下即可使用。
以下是最小工作示例:
\begin{lstlisting}
\documentclass[zihao=-4,fontset=windows]{Beautybook-CN}
-\coverstyle={
- cover-choose=enfig, % cn (en ; enfig ; birkar)
+\coverstyle={ % 封面键值列表
+ cover-choose=cn, % cn (需新增项\entitle{#}); en ; enfig ; birkar
}
-\mathstyle={
- math-font=plain, % plain; stix; mtpro2
+\mathstyle={ % 数学字体键值列表
+ math-font=plain, %plain (默认数学字体); stix; mtpro2
}
-\usepackage{bm}
-% \overfullrule=1pt
-% \RequirePackage[fontsize=13.5pt]{fontsize}
%% First one
\mynewtheorem{
defi={\textbf{Definition}}[section]{interior style={left color=ReD!8,right color=ReD!5!CyaN!50}, borderline west={1.5mm}{0mm}{ReD}},
@@ -353,35 +370,35 @@ Beauty\LaTeX{} 系列模板是由我所做的书籍模板系列, 名叫\textbf{B
%% Second one
\makeatletter
\mynewtcbtheorem{
- % Theorems
+ % 这个 theorem 是环境名
problem={
counter=tcbprob,
the counter=\thesection.\arabic{tcbprob},
- name=Problem,
- thmcolor=purple,
+ name=Problem, % 它保存到 \theorem@name 里
+ thmcolor=绛紫,
autoref name=\bfseries Problem,
style={
- arc=3pt,breakable,enhanced,interior style={top color=purple!9 ,middle color=purple!6, bottom color=purple!3},boxrule=0pt,top=8mm,
- fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},
- fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},
+ arc=3pt,breakable,enhanced,interior style={top color=绛紫!9 ,middle color=绛紫!6, bottom color=绛紫!3},boxrule=0pt,top=8mm,
+ fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
+ fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
opacityframe=0, opacityback=0.98,
fontupper=\itshape, step={tcbprob},
before pre=\smallskip, after app=\smallskip,
- overlay unbroken=\my@theorem@overlay@unbroken{Problem\ \thetcbprob}{purple},
- overlay first=\my@theorem@overlay@first{Problem\ \thetcbprob}{purple},
- overlay last=\my@theorem@overlay@last{purple},
+ overlay unbroken=\my@theorem@overlay@unbroken{Problem\ \thetcbprob}{绛紫},
+ overlay first=\my@theorem@overlay@first{Problem\ \thetcbprob}{绛紫},
+ overlay last=\my@theorem@overlay@last{绛紫},
}
},
lemma={
counter=tcblem,
the counter=\thesection.\arabic{tcblem},
name=Lemma,
- lemcolor=blue,
+ lemcolor=靛蓝,
autoref name=\bfseries Lemma,
style={
- arc=0mm,breakable,enhanced,interior style={top color=blue!9 ,middle color=blue!6, bottom color=blue!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm,
- fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},%
- fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%
+ arc=0mm,breakable,enhanced,interior style={top color=靛蓝!9 ,middle color=靛蓝!6, bottom color=靛蓝!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm,
+ fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
+ fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
opacityframe=0, opacityback=0.98,
fontupper=\itshape,step={tcblem},
before pre=\smallskip, after app=\smallskip,
@@ -390,12 +407,124 @@ Beauty\LaTeX{} 系列模板是由我所做的书籍模板系列, 名叫\textbf{B
overlay last=\my@lemma@overlay@last{\lemma@lemcolor},
}
},
+ corollary={
+ counter=tcbcor,
+ the counter=\thesection.\arabic{tcbcor},
+ autoref name=\bfseries Corollary,
+ style={
+ arc=0mm,breakable,enhanced,interior style={top color=茶色!9 ,middle color=茶色!6, bottom color=茶色!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm,
+ fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
+ fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
+ opacityframe=0, opacityback=0.98,
+ fontupper=\itshape,step={tcbcor},
+ before pre=\smallskip, after app=\smallskip,
+ overlay unbroken=\my@lemma@overlay@unbroken{Corollary\ \thetcbcor}{茶色},
+ overlay first=\my@lemma@overlay@first{Corollary\ \thetcbcor}{茶色},
+ overlay last=\my@lemma@overlay@last{茶色},
+ }
+ },
+ proposition={
+ counter=tcbprop,
+ the counter=\thesection.\arabic{tcbprop},
+ autoref name=\bfseries Proposition,
+ style={
+ arc=0mm,breakable,enhanced,interior style={top color=黛绿!9 ,middle color=黛绿!6, bottom color=黛绿!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm,
+ fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
+ fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
+ opacityframe=0, opacityback=0.98,
+ fontupper=\itshape,step={tcbprop},
+ before pre=\smallskip, after app=\smallskip,
+ overlay unbroken=\my@lemma@overlay@unbroken{Proposition\ \thetcbprop}{黛绿},
+ overlay first=\my@lemma@overlay@first{Proposition\ \thetcbprop}{黛绿},
+ overlay last=\my@lemma@overlay@last{黛绿},
+ }
+ },
+ definition={
+ counter=tcbdefi,
+ the counter=\thesection.\arabic{tcbdefi},
+ autoref name=\bfseries Definition,
+ style={
+ arc=0mm,breakable,enhanced,interior style={top color=茜色!9 ,middle color=茜色!6, bottom color=茜色!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm,
+ fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
+ fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
+ opacityframe=0, opacityback=0.98,
+ fontupper=\normalsize,step={tcbdefi},
+ before pre=\smallskip, after app=\smallskip,
+ overlay unbroken=\my@lemma@overlay@unbroken{Definition\ \thetcbdefi}{茜色},
+ overlay first=\my@lemma@overlay@first{Definition\ \thetcbdefi}{茜色},
+ overlay last=\my@lemma@overlay@last{茜色},
+ }
+ },
+ example={
+ counter=tcbexam,
+ the counter=\thesection.\arabic{tcbexam},
+ autoref name=\bfseries Example,
+ style={
+ arc=0mm,breakable,enhanced,interior style={top color=黛绿!9 ,middle color=黛绿!6, bottom color=黛绿!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm,
+ fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
+ fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
+ opacityframe=0, opacityback=0.98,
+ fontupper=\normalsize,step={tcbexam},
+ before pre=\smallskip, after app=\smallskip,
+ overlay unbroken=\my@lemma@overlay@unbroken{Example\ \thetcbexam}{黛绿},
+ overlay first=\my@lemma@overlay@first{Example\ \thetcbexam}{黛绿},
+ overlay last=\my@lemma@overlay@last{黛绿},
+ }
+ },
+ Exercise={
+ counter=tcbexer,
+ the counter=\thechapter.\arabic{tcbexer},
+ autoref name=\bfseries Exercise,
+ style={
+ arc=0mm,breakable,enhanced,interior style={top color=绛紫!9 ,middle color=绛紫!6, bottom color=绛紫!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm,
+ fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
+ fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
+ opacityframe=0, opacityback=0.9,
+ fontupper=\normalsize,step={tcbexer},
+ before pre=\smallskip, after app=\smallskip,
+ overlay unbroken=\my@lemma@overlay@unbroken{Exercise\ \thetcbexer}{绛紫},
+ overlay first=\my@lemma@overlay@first{Exercise\ \thetcbexer}{绛紫},
+ overlay last=\my@lemma@overlay@last{绛紫},
+ }
+ },
+ theorem={
+ counter=tcbthm,
+ the counter=\thesection.\arabic{tcbthm},
+ autoref name=\bfseries Theorem,
+ style={
+ arc=0mm,breakable,enhanced,interior style={top color=黛绿!9 ,middle color=黛绿!6, bottom color=黛绿!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm,
+ fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
+ fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
+ opacityframe=0, opacityback=0.98,
+ fontupper=\itshape,step={tcbthm},
+ before pre=\smallskip, after app=\smallskip,
+ overlay unbroken=\my@lemma@overlay@unbroken{Theorem\ \thetcbthm}{黛绿},
+ overlay first=\my@lemma@overlay@first{Theorem\ \thetcbthm}{黛绿},
+ overlay last=\my@lemma@overlay@last{黛绿},
+ }
+ },
+ conjecture={
+ counter=tcbconj,
+ the counter=\thesection.\arabic{tcbconj},
+ name=Conjecture,
+ lemcolor=靛蓝,
+ autoref name=\bfseries Conjecture,
+ style={
+ arc=0mm,breakable,enhanced,interior style={top color=靛蓝!9 ,middle color=靛蓝!6, bottom color=靛蓝!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm,
+ fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},% 上
+ fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%下
+ opacityframe=0, opacityback=0.98,
+ fontupper=\itshape,step={tcbconj},
+ before pre=\smallskip, after app=\smallskip,
+ overlay unbroken=\my@lemma@overlay@unbroken{Conjecture\ \thetcblem}{靛蓝},
+ overlay first=\my@lemma@overlay@first{Conjecture\ \thetcblem}{靛蓝},
+ overlay last=\my@lemma@overlay@last{靛蓝},
+ }
+ },
}
\makeatother
-%
-
-%% --------References
+%% --------参考文献
\RequirePackage[
backend=biber,
style=numeric,
@@ -406,28 +535,17 @@ sorting=nty
\indexsetup{level=\chapter*,noclearpage}
\makeindex[title={\sffamily References},columns=3,columnsep=15pt,columnseprule]
\makeindex
-
-\newcommand{\pr}{^\prime}
-\newcommand{\prr}{^{\prime\prime}}
-\newcommand{\bd}{\partial}
-\newcommand{\bdd}{\overline{\partial}}
-\newcommand{\Dif}[2]{\frac{\dd #1}{\dd #2}}
-\newcommand{\Diff}[2][]{\frac{\partial #1}{\partial #2}}
-\usepackage{shadowtext}\shadowoffset{.65pt}
-\newcommand*{\circledd}[1]{\lower.7ex\hbox{\tikz\draw (0pt, 0pt)%
- circle (.5em) node {\makebox[1em][c]{\small #1}};}}
\usepackage{listings}
- \lstset{
+ \lstset{ % 代码环境
basicstyle=\small\ttfamily,
keywordstyle=\color{NavyBlue},
commentstyle=\color{gray!50!black!50},
stringstyle=\rmfamily\slshape\color{red},
backgroundcolor=\color{gray!5},
frame=leftline,
- framerule=12pt,%
- rulecolor=\color{gray!90},
+ framerule=0.5pt,rulecolor=\color{gray!80},
numbers=left,
- numberstyle=\footnotesize\itshape,
+ numberstyle=\footnotesize,
firstnumber=1,
stepnumber=1,
numbersep=7pt,
@@ -456,12 +574,12 @@ sorting=nty
\begin{document}
\thispagestyle{empty}
-\title{An Introduction to Beautybook template}
+\title{Beautybook模板简介}
\subtitle{}
\edition{First Edition}
\bookseries{Illustrated by Ethan Lu}
\author{Ethan Lu}
-\pressname{Springer}
+\pressname{Beautybook}
\presslogo{inner_pics/logo.png}
\coverimage{inner_pics/coverimage.jpg}%ivy-ge998908f8_1280.jpg
\makecover
@@ -476,8 +594,8 @@ sorting=nty
\makeatletter
% set the contents of the outer margin on even and odd pages for scrheadings, plain and scth
-\oddoutermargin{\sffamily Vanishing Theorems on Vector Bundles with Semidefinite Curvature} % Odd pages
-\evenoutermargin{\sffamily\@title} % Even pages
+\oddoutermargin{\sffamily Vanishing Theorems on Vector Bundles with Semidefinite Curvature} % Odd 奇数页
+\evenoutermargin{\sffamily\@title} % Even 偶数页
%
\titleimage{
chapteroddimage={odd1,odd2,odd3,odd4,odd5,odd6,odd7,odd8,odd9,odd10,odd11,odd12,odd13,odd14,odd15,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11},
@@ -488,8 +606,8 @@ sorting=nty
%
partevenimage={songeven,even1,even2,even3,even4,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11},
}
-\chapimage{\Beautybook@chapterimagename} % Changing automatically.
-\partimage{\Beautybook@partimagename} % Changing automatically.
+\chapimage{\Beautybook@chapterimagename} % 会自动改变
+\partimage{\Beautybook@partimagename} % 会自动改变
\makeatother
%
\frontmatter
@@ -499,13 +617,13 @@ sorting=nty
\thispagestyle{empty}
% \addcontentsline{toc}{chapter}{Preface}
\chapter*{Preface}
-Your words here.
+Introduction to Beatybook template.
\hfill
\begin{tabular}{lr}
- &----- author\\
- & 2023-09-01
+ &---- Ethan Lu\\
+ &2024-03-17
\end{tabular}
\clearpage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -517,12 +635,12 @@ Your words here.
\mainmatter
\pagenumbering{arabic}
-\partabstract{\hspace*{2em} Here is the introduction area of each part, where you can write a concise overview of the part, of course, if there is nothing to say, you can leave it blank.}
-\part{The template usage introduction of \textbf{Beautybook}}
+\partabstract{\hspace*{2em} \textbf{Beautybook} 模板的使用说明,这里是每一个部分 (Part) 的简介区域, 您可以在此处书写下您对该部分的一个简明扼要的概述, 当然,倘若无话可说,此处可以留空.}
+\part{\textbf{Beautybook} 模板使用说明}
-\chapter{A short introduction of \textbf{Beautybook}}
+\chapter{Beautybook模板的简要介绍}
-\section{Section}
+\section{简介}
% your main contents here!
@@ -534,11 +652,12 @@ Your words here.
\makebottomcover
\end{document}
\end{lstlisting}
+
\subsection{发行版安装与更新}
本模板测试环境为
\begin{enumerate}
-\item Win11 22H2 + \TeX{} Live 2023;
+\item Win11 23H2 + \TeX{} Live 2024;
\end{enumerate}
\TeX Live/Mac\TeX{} 的安装请参考知乎的文章,此处略过。
@@ -555,7 +674,7 @@ tlmgr update --self --all --reinstall-forcibly-removed
\subsection{其他发行版本}
-由于宏包版本问题,本模板不支持 C\TeX{} 套装,请务必安装 TeX Live/Mac\TeX{}。更多关于 \TeX{} Live 的安装使用以及 C\TeX{} 与 \TeX{} Live 的兼容、系统路径问题,请参考官方文档以及啸行的\href{https://github.com/OsbertWang/install-latex-guide-zh-cn/releases/}{一份简短的关于安装 \LaTeX{} 安装的介绍}。
+由于宏包版本问题,本模板不支持 C\TeX{} 套装,请务必安装 TeX Live/Mac\TeX{}。更多关于 \TeX{} Live 的安装使用以及 C\TeX{} 与 \TeX{} Live 的兼容、系统路径问题,请参考官方文档。
@@ -621,14 +740,14 @@ tlmgr update --self --all --reinstall-forcibly-removed
\hline
标题 & \lstinline|\title| & 副标题 & \lstinline|\subtitle| & 作者 & \lstinline|\author| \\
出版社 & \lstinline|\pressname| & 版本 & \lstinline|\edition| & 封面图 & \lstinline|\coverimage|\\
- 徽标 & \lstinline|\presslogo| & 英文标题(cn)&\lstinline|\entitle|&&\\
+ 徽标 & \lstinline|\presslogo| & &&&\\
\hline
\end{tabular}
\end{table}
\subsection{封面图}
-封面图片可以自行去找.
+封面图片可以自行选取.
\subsection{徽标}
@@ -690,7 +809,6 @@ tlmgr update --self --all --reinstall-forcibly-removed
\begin{definition}[][名称][def label]
这是个人定制的盒子定制的定理环境,这是其中定义环境示例。注意:使用方法如下
-
\begin{itemize}
\item 如果你没有名称和标签,使用方法为
\begin{lstlisting}
@@ -717,7 +835,6 @@ tlmgr update --self --all --reinstall-forcibly-removed
\end{definition}
\end{lstlisting}
\end{itemize}
-
\end{definition}
\begin{theorem}
@@ -798,7 +915,7 @@ tlmgr update --self --all --reinstall-forcibly-removed
\begin{remark}
解释一下, 其中的overlay部分更改需要看中文修改,定理名称改成你想要的,颜色也是,然后别忘了给最外面的example之类的环境名改成你的,比如axiom之类,还有就是tcbexam这个计数器名称要换成你新定义的,如tcbaxiom之类,其他就不用动了。至于说第一种定理样式看上面例子相信您能学会的。
\end{remark}
-
+\newpage
\section{列表环境}
本模板借助于 \lstinline{enumitem} 实现了可定制化,具体见enumitem宏包说明文档,这里示例如下\\[2ex]
\begin{minipage}[b]{0.49\textwidth}
@@ -842,13 +959,11 @@ tlmgr update --self --all --reinstall-forcibly-removed
关于文献条目(bib item),你可以在谷歌学术,Mendeley,Endnote 中取,然后把它们添加到 \lstinline{ref.bib} 中。在文中引用的时候,引用它们的键值(bib key)即可。
-文献样式默认为国标 GB7714-2015, 参考文献示例:\cite{Huybrechts2010Complex}。
-
-如果需要设置为数字样式,需要将biblatex宏包选项中的国标改为numerical.
+文献样式默认为数字样式。
\begin{lstlisting}
\usepackage[
-backend=biber, % 可改为bibtex (或者直接删掉就是bibtex)
-style=gb7714-2015, % 可改为 numerical
+backend=biber, % 可改为bibtex
+style=numeric, % 可改为其他样式,参考biblatex说明文档
sorting=nty
]{biblatex}
\addbibresource{ref.bib}
@@ -870,8 +985,7 @@ sorting=nty
!必须全部使用英文字体名称进行导入,否则报错找不到的!!切记!!
\section{数学字体选项}
-本模板使用的是mtpro2字体,需要用户自行安装,安装教程见\href{https://www.latexstudio.net/archives/51742.html}{mtpro2字体安装教程}。当然也可以删除本文件导言区的mtpro2字体换回默认数学字体,诸君随意。
-
+本模板使用的是默认数学字体,仅将$\partial$符号改为Times New Roman的Unicode符号。
{\normalem
\printbibliography[
diff --git a/macros/latex/contrib/beautybook/README.md b/macros/latex/contrib/beautybook/README.md
index a420158115..c738ffd950 100644
--- a/macros/latex/contrib/beautybook/README.md
+++ b/macros/latex/contrib/beautybook/README.md
@@ -17,7 +17,7 @@ If you are an English user, then please use a cls file with the "-EN" suffix and
---
## Version
-Release 2023-10-02.
+Release 2024-03-17.
---
## License
diff --git a/macros/latex/contrib/beautybook/beautybook-en.pdf b/macros/latex/contrib/beautybook/beautybook-en.pdf
index 5529baec45..e8f4618ed8 100644
--- a/macros/latex/contrib/beautybook/beautybook-en.pdf
+++ b/macros/latex/contrib/beautybook/beautybook-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/beautybook/beautybook-en.tex b/macros/latex/contrib/beautybook/beautybook-en.tex
index 4d89fd12af..1e5dd8438e 100644
--- a/macros/latex/contrib/beautybook/beautybook-en.tex
+++ b/macros/latex/contrib/beautybook/beautybook-en.tex
@@ -1,7 +1,17 @@
\documentclass[12pt]{Beautybook-EN}
-\coverstyle={
- cover-choose=enfig, % cn (en ; enfig ; birkar)
+% ---------------------------------------------------------------------------- %
+% The Cover Theme Chosen %
+% ---------------------------------------------------------------------------- %
+\definecolor{coverbgcolor}{HTML}{e0e0e0}
+\definecolor{coverfgcolor}{HTML}{826e68} % The color of the background
+\definecolor{coverbar}{HTML}{7c9092} % The color of the left bar
+\definecolor{bottomcolor}{HTML}{826e68}
+\coverstyle={ % 封面键值列表
+ cover-choose=cn, % cn (需新增项\entitle{#}); en ; enfig ; birkar
}
+% ---------------------------------------------------------------------------- %
+% The Cover Theme Chosen %
+% ---------------------------------------------------------------------------- %
\mathstyle={
math-font=plain, % plain; stix; mtpro2
}
@@ -189,15 +199,6 @@ sorting=nty
\makeindex[title={\sffamily References},columns=3,columnsep=15pt,columnseprule]
\makeindex
-\newcommand{\pr}{^\prime}
-\newcommand{\prr}{^{\prime\prime}}
-\newcommand{\bd}{\partial}
-\newcommand{\bdd}{\overline{\partial}}
-\newcommand{\Dif}[2]{\frac{\dd #1}{\dd #2}}
-\newcommand{\Diff}[2][]{\frac{\partial #1}{\partial #2}}
-\usepackage{shadowtext}\shadowoffset{.65pt}
-\newcommand*{\circledd}[1]{\lower.7ex\hbox{\tikz\draw (0pt, 0pt)%
- circle (.5em) node {\makebox[1em][c]{\small #1}};}}
\usepackage{listings}
\lstset{
basicstyle=\small\ttfamily,
@@ -247,19 +248,24 @@ sorting=nty
\coverimage{inner_pics/coverimage.jpg}%ivy-ge998908f8_1280.jpg
\makecover
-
+\makeatletter
+% ---------------------------------------------------------------------------- %
+% The Sidebar Theme Chosen %
+% ---------------------------------------------------------------------------- %
\definecolor{bg}{HTML}{e0e0e0}
\definecolor{fg}{HTML}{2c4f54}
\colorlet{outermarginbgcolor}{bg}
\colorlet{outermarginfgcolor}{fg}
-\colorlet{framegolden}{fg}
-\colorlet{framegray}{bg!50}
-
-\makeatletter
% set the contents of the outer margin on even and odd pages for scrheadings, plain and scth
-\oddoutermargin{\sffamily Vanishing Theorems on Vector Bundles with Semidefinite Curvature} % Odd 奇数页
-\evenoutermargin{\sffamily\@title} % Even 偶数页
-%
+\oddoutermargin{\sffamily \leftmark} % Odd
+\evenoutermargin{\sffamily\@title} % Even
+% ---------------------------------------------------------------------------- %
+% The Sidebar Theme Chosen %
+% ---------------------------------------------------------------------------- %
+
+% ---------------------------------------------------------------------------- %
+% The images used in the title %
+% ---------------------------------------------------------------------------- %
\titleimage{
chapteroddimage={odd1,odd2,odd3,odd4,odd5,odd6,odd7,odd8,odd9,odd10,odd11,odd12,odd13,odd14,odd15,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11},
%
@@ -269,10 +275,22 @@ sorting=nty
%
partevenimage={songeven,even1,even2,even3,even4,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11},
}
-\chapimage{\Beautybook@chapterimagename} % 会自动改变
-\partimage{\Beautybook@partimagename} % 会自动改变
+\chapimage{\Beautybook@chapterimagename}
+\partimage{\Beautybook@partimagename}
\makeatother
-%
+% ---------------------------------------------------------------------------- %
+% The images used in the title %
+% ---------------------------------------------------------------------------- %
+
+% ---------------------------------------------------------------------------- %
+% The Color Chosen for The Magic Box %
+% ---------------------------------------------------------------------------- %
+\colorlet{framegolden}{fg} % The line color of the magic box
+\colorlet{framegray}{bg!50} % The background color of the magic box
+% ---------------------------------------------------------------------------- %
+% The Color Chosen for The Magic Box %
+% ---------------------------------------------------------------------------- %
+
\frontmatter
\pagenumbering{Roman}
@@ -280,13 +298,13 @@ sorting=nty
\thispagestyle{empty}
% \addcontentsline{toc}{chapter}{Preface}
\chapter*{Preface}
-In this note, we obtain a logarithmic vanishing theorem on certain weakly pseudoconvex K\"ahler manifolds. It is a generalization of Norimatsu's result on compact K\"ahler manifolds. As a direct corollary, we obtain relative vanishing theorems of certain direct image sheaves.
+An introduction to the beautybook template.
\hfill
\begin{tabular}{lr}
- &----- Ethan Lu\\
- &2023-09-01
+ &--- Ethan Lu\\
+ &2024-03-17
\end{tabular}
\clearpage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -334,9 +352,10 @@ It is worth noting that when you download the template from CTAN, then the Engli
\subsection{Local Installation}
-To install locally, follow these steps: download the latest version from GitHub, CTAN or the QQ group. Then place the template files in your working directory and copy these folders synchronously: \texttt{fonts}, \texttt{stys}, \texttt{figures}, \texttt{inner\_pics}, and \texttt{frontmatter}, in order to utilize them. (If you are a chinese user, you can choose to copy the chinesefonts folder.) The advantage of this is that you can install \texttt{mtpro2} font to achieve a more elegant effect than if you were using it online. Of course, the choice is left to the users, and I won't comment here.
+To install locally, follow above steps to download the latest version from GitHub, CTAN or the QQ group.
The following is an example of a minimal work:
+
\begin{lstlisting}
\documentclass[12pt]{Beautybook-EN}
\coverstyle={
@@ -358,52 +377,9 @@ The following is an example of a minimal work:
cor={\textbf{Corollary}}[chapter]{interior style={left color=violet!8,right color=violet!5!CyaN!50}, borderline west={1.5mm}{0mm}{violet}},
}
\newtheorem*{remark}{\textbf{Remark}}
-%% Second one
-\makeatletter
-\mynewtcbtheorem{
- % Theorems
- problem={
- counter=tcbprob,
- the counter=\thesection.\arabic{tcbprob},
- name=Problem,
- thmcolor=purple,
- autoref name=\bfseries Problem,
- style={
- arc=3pt,breakable,enhanced,interior style={top color=purple!9 ,middle color=purple!6, bottom color=purple!3},boxrule=0pt,top=8mm,
- fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},
- fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},
- opacityframe=0, opacityback=0.98,
- fontupper=\itshape, step={tcbprob},
- before pre=\smallskip, after app=\smallskip,
- overlay unbroken=\my@theorem@overlay@unbroken{Problem\ \thetcbprob}{purple},
- overlay first=\my@theorem@overlay@first{Problem\ \thetcbprob}{purple},
- overlay last=\my@theorem@overlay@last{purple},
- }
- },
- lemma={
- counter=tcblem,
- the counter=\thesection.\arabic{tcblem},
- name=Lemma,
- lemcolor=blue,
- autoref name=\bfseries Lemma,
- style={
- arc=0mm,breakable,enhanced,interior style={top color=blue!9 ,middle color=blue!6, bottom color=blue!3},arc=3pt,boxrule=0pt,top=6mm,bottom=5mm,
- fuzzy shadow={-0.6mm}{0.6mm}{0mm}{0.3mm}{white!50!gray},%
- fuzzy shadow={0.6mm}{-0.6mm}{0mm}{0.3mm}{fill=white!40!gray},%
- opacityframe=0, opacityback=0.98,
- fontupper=\itshape,step={tcblem},
- before pre=\smallskip, after app=\smallskip,
- overlay unbroken=\my@lemma@overlay@unbroken{\lemma@name\ \thetcblem}{\lemma@lemcolor},
- overlay first=\my@lemma@overlay@first{\lemma@name\ \thetcblem}{\lemma@lemcolor},
- overlay last=\my@lemma@overlay@last{\lemma@lemcolor},
- }
- },
-}
-\makeatother
%
-%% --------References
\RequirePackage[
backend=biber,
style=numeric,
@@ -415,15 +391,6 @@ sorting=nty
\makeindex[title={\sffamily References},columns=3,columnsep=15pt,columnseprule]
\makeindex
-\newcommand{\pr}{^\prime}
-\newcommand{\prr}{^{\prime\prime}}
-\newcommand{\bd}{\partial}
-\newcommand{\bdd}{\overline{\partial}}
-\newcommand{\Dif}[2]{\frac{\dd #1}{\dd #2}}
-\newcommand{\Diff}[2][]{\frac{\partial #1}{\partial #2}}
-\usepackage{shadowtext}\shadowoffset{.65pt}
-\newcommand*{\circledd}[1]{\lower.7ex\hbox{\tikz\draw (0pt, 0pt)%
- circle (.5em) node {\makebox[1em][c]{\small #1}};}}
\usepackage{listings}
\lstset{
basicstyle=\small\ttfamily,
@@ -432,10 +399,9 @@ sorting=nty
stringstyle=\rmfamily\slshape\color{red},
backgroundcolor=\color{gray!5},
frame=leftline,
- framerule=12pt,%
- rulecolor=\color{gray!90},
+ framerule=0.5pt,rulecolor=\color{gray!80},
numbers=left,
- numberstyle=\footnotesize\itshape,
+ numberstyle=\footnotesize,
firstnumber=1,
stepnumber=1,
numbersep=7pt,
@@ -469,7 +435,7 @@ sorting=nty
\edition{First Edition}
\bookseries{Illustrated by Ethan Lu}
\author{Ethan Lu}
-\pressname{Springer}
+\pressname{Beautybook}
\presslogo{inner_pics/logo.png}
\coverimage{inner_pics/coverimage.jpg}%ivy-ge998908f8_1280.jpg
\makecover
@@ -484,8 +450,8 @@ sorting=nty
\makeatletter
% set the contents of the outer margin on even and odd pages for scrheadings, plain and scth
-\oddoutermargin{\sffamily Vanishing Theorems on Vector Bundles with Semidefinite Curvature} % Odd pages
-\evenoutermargin{\sffamily\@title} % Even pages
+\oddoutermargin{\sffamily \leftmark} % Odd page
+\evenoutermargin{\sffamily\@title} % Even page
%
\titleimage{
chapteroddimage={odd1,odd2,odd3,odd4,odd5,odd6,odd7,odd8,odd9,odd10,odd11,odd12,odd13,odd14,odd15,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11},
@@ -496,8 +462,8 @@ sorting=nty
%
partevenimage={songeven,even1,even2,even3,even4,mid1,mid2,mid3,mid4,mid5,mid6,mid7,mid8,mid9,mid10,mid11},
}
-\chapimage{\Beautybook@chapterimagename} % Changing automatically.
-\partimage{\Beautybook@partimagename} % Changing automatically.
+\chapimage{\Beautybook@chapterimagename}
+\partimage{\Beautybook@partimagename}
\makeatother
%
\frontmatter
@@ -507,13 +473,13 @@ sorting=nty
\thispagestyle{empty}
% \addcontentsline{toc}{chapter}{Preface}
\chapter*{Preface}
-Your words here.
+An introduction to the beautybook template.
\hfill
\begin{tabular}{lr}
- &----- author\\
- & 2023-09-01
+ &--- Ethan Lu\\
+ &2024-03-17
\end{tabular}
\clearpage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -530,7 +496,7 @@ Your words here.
\chapter{A short introduction of \textbf{Beautybook}}
-\section{Section}
+\section{Introduction}
% your main contents here!
@@ -547,7 +513,7 @@ Your words here.
The test environment for this template is
\begin{enumerate}
-\item Win11 22H2 + \TeX{} Live 2023;
+\item Win11 23H2 + \TeX{} Live 2024;
\end{enumerate}
For the installation of \TeX Live/Mac\TeX{} , please refer to articles online, which is omitted here.
@@ -628,7 +594,7 @@ This template has multiple sets of covers that can be used at will, and the use
\hline
Title & \lstinline|\title| & subtitle & \lstinline|\subtitle| & author & \lstinline|\author| \\
Publisher & \lstinline|\pressname| & Version & \lstinline|\edition| & cover image & \lstinline|\coverimage|\\
- Logo & \lstinline|\presslogo| & English title (cn)&\lstinline|\entitle|&&\\
+ Logo & \lstinline|\presslogo| &&&&\\
\hline
\end{tabular}
\end{table}
@@ -741,11 +707,10 @@ Here is the effect of the theorem environment provided by amsthm.
\begin{corollary}
The usage is the same as above, refer to the tag \ref{def label} below or you can \autoref{def label}.
\end{corollary}
-
+\newpage
\begin{example}
The usage is the same as above, refer to the tag \ref{def label} below or you can \autoref{def label}.
\end{example}
-
\subsection*{Ancient style box}
\begin{fancybox}
Test ancient style box , you can use it to nest outside of other environments arbitrarily!
@@ -856,14 +821,12 @@ In addition, this template calls the Biblatex macro package and provides Biber e
For bib items, you can pick them up in Google Scholar, Mendeley, Endnote and add them to \lstinline{ref.bib}. When quoting in the text, just quote their bib key.
-The default reference style used by the template is ``GB7714-2015". There is a simple reference example. \cite{Huybrechts2010Complex}
-
-If you need to set to a numeric style, you need to change the ``GB7714-2015" in the biblatex macro package option to ``numerical".
+The default reference style used by the template is ``numeric".
\begin{lstlisting}
\usepackage[
-backend=biber, % can be changed to bibtex (or simply delete bibtex)
-style=GB7714-2015, % can be changed to numerical
+backend=biber, % It can be changed to bibtex.
+style=numeric, % It can be changed to others, cf the documentation of biblatex.
sorting=nty
]{biblatex}
\addbibresource{ref.bib}
diff --git a/macros/latex/contrib/beautybook/ref.bib b/macros/latex/contrib/beautybook/ref.bib
deleted file mode 100644
index c1be504341..0000000000
--- a/macros/latex/contrib/beautybook/ref.bib
+++ /dev/null
@@ -1,7 +0,0 @@
-@book{Huybrechts2010Complex,
- title={Complex geometry:an introduction},
- author={Huybrechts and Daniel},
- publisher={Springer},
- year={2010},
-}
-
diff --git a/macros/latex/contrib/beautybook/stys/Beautybook-bottompage.sty b/macros/latex/contrib/beautybook/stys/Beautybook-bottompage.sty
index dca0a3f4ea..892cf4fbac 100644
--- a/macros/latex/contrib/beautybook/stys/Beautybook-bottompage.sty
+++ b/macros/latex/contrib/beautybook/stys/Beautybook-bottompage.sty
@@ -15,10 +15,6 @@
\pgfdeclarelayer{top} %顶部
\pgfdeclarelayer{bottom} %底部
\pgfsetlayers{bottom,background,main,foreground,top}
-\definecolor{coverbgcolor}{HTML}{e0e0e0} %f9b868
-\definecolor{coverfgcolor}{HTML}{826e68} %503D4B
-\definecolor{coverbar}{HTML}{7c9092}
-\definecolor{bottomcolor}{HTML}{826e68}
\makeatletter
\newcommand*\makebottomcover{
%% Use the Tikz library positioning and clear the page header and footer
diff --git a/macros/latex/contrib/beautybook/stys/Beautybook-cover-cn.sty b/macros/latex/contrib/beautybook/stys/Beautybook-cover-cn.sty
index 73357bb24e..b151d4e5fc 100644
--- a/macros/latex/contrib/beautybook/stys/Beautybook-cover-cn.sty
+++ b/macros/latex/contrib/beautybook/stys/Beautybook-cover-cn.sty
@@ -64,14 +64,14 @@ bottom color=transparent!50]
\end{minipage}}
};% 封面作者信息栏
\fill [path picture={ \node at (path picture bounding box.center)
- {\includegraphics[height=.92\linewidth]{\@coverimage}};}]
- ([xshift=\outermarginwidth]current page.south west) rectangle ++(1.8*\covershift,.58\paperheight);
+ {\includegraphics[height=1.1\linewidth]{\@coverimage}};}]
+ ([xshift=\outermarginwidth]current page.south west) rectangle ++(1.8*\covershift,.575\paperheight);
\fill[pattern color=coverfgcolor!70,pattern=horizontal lines,opacity=0.8]
([xshift=\outermarginwidth,yshift=.2\covershift]current page.south west) rectangle ([xshift=-\outermarginwidth,yshift=1.43\covershift]current page.south east);
\fill [coverfgcolor!80,path fading=fade right]%
- ([xshift=\outermarginwidth+.5\linewidth+.2cm,yshift=.2\covershift]current page.south west) rectangle ([xshift=-\outermarginwidth,yshift=1.43\covershift]current page.south east);
+ ([xshift=\outermarginwidth+.5\linewidth+.5cm,yshift=.2\covershift]current page.south west) rectangle ([xshift=-\outermarginwidth,yshift=1.43\covershift]current page.south east);
\fill [coverfgcolor!80,path fading=fade left]%
- ([xshift=\outermarginwidth+.5\linewidth+.2cm,yshift=.2\covershift]current page.south west) rectangle ([xshift=-\outermarginwidth,yshift=1.43\covershift]current page.south east);
+ ([xshift=\outermarginwidth+.5\linewidth+.5cm,yshift=.2\covershift]current page.south west) rectangle ([xshift=-\outermarginwidth,yshift=1.43\covershift]current page.south east);
\node[left,text=white,font=\rmfamily\Large,] at
([shift={(-2cm,2cm)}]current page.south east) %
{\raisebox{-1.1cm}{\includegraphics[width=0.2\linewidth]{\@presslogo}}\hspace*{-3.5ex}\begin{varwidth}{.4\textwidth}\tikz\draw[white,line width=1.25pt] (0,0)--++(0,1cm);\,\raisebox{.25cm}{\@pressname} \end{varwidth}};%
diff --git a/macros/latex/contrib/dashrulex/dashrulex.pdf b/macros/latex/contrib/dashrulex/dashrulex.pdf
index 71e4597be0..e38ec5a63d 100644
--- a/macros/latex/contrib/dashrulex/dashrulex.pdf
+++ b/macros/latex/contrib/dashrulex/dashrulex.pdf
Binary files differ
diff --git a/macros/latex/contrib/dashrulex/dashrulex.sty b/macros/latex/contrib/dashrulex/dashrulex.sty
index aba9f203d3..4b476963e6 100644
--- a/macros/latex/contrib/dashrulex/dashrulex.sty
+++ b/macros/latex/contrib/dashrulex/dashrulex.sty
@@ -9,8 +9,8 @@
% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2012/02/12]
\RequirePackage{xparse}
-\ProvidesExplPackage{dashrulex}{2024/03/16}{1.00}
- {Customize superscripts and subscripts}
+\ProvidesExplPackage{dashrulex}{2024/03/17}{1.00a}
+ {Draw dashed rules}
\DeclareDocumentCommand{\hdashrule}{O{0pt}O{x}mmm}
{
\tl_if_blank:nTF {#5}
diff --git a/macros/latex/contrib/dashrulex/dashrulex.tex b/macros/latex/contrib/dashrulex/dashrulex.tex
index 1d4ce592b9..acf2025a28 100644
--- a/macros/latex/contrib/dashrulex/dashrulex.tex
+++ b/macros/latex/contrib/dashrulex/dashrulex.tex
@@ -1,13 +1,13 @@
\documentclass[load-preamble+]{cnltx-doc}
-\usepackage{setspace,hologo,dashrulex}
+\usepackage{setspace,hologo,dashrulex,tikz}
\usepackage[noto]{newtxmath}
\setcnltx
{
package = dashrulex,
title = the dashrulex package,
- version = v1.00,
- date = 2024/03/16,
+ version = v1.00a,
+ date = 2024/03/17,
authors = Qu Yi,
info = Draw dashed rules,
email = toquyi@163.com,
@@ -49,7 +49,7 @@ Sometimes it is necessary to draw dashed rules when writing documents, such as g
\section{User commands}
\begin{commands}
\command{hdashrule}[\oarg{raise}\oarg{leader}\marg{width}\marg{thickness}\marg{dash rules}]
- The command to draw horizontal dashed rules, based on the \cs{rule} command, and the same as the \cs{rule} command when the dash rules are empty. \meta{raise} is the vertical offset of the rule. \meta{leader} is the alignment of the dashed line fill, which can be empty, \code{c}, or \code{x} (the default), corresponding to the \cs{leaders}, \cs{cleaders}, and \cs{xleaders} commands, respectively. \meta{width} is the length of the dashed rule, which can be set to \cs{fill} to indicate an arbitrarily long distance when you need to fill the entire horizontal center of the plate. \meta{dash rules} is expressed as \splitmeta[\code{|}]{length 1}{length a}\code{,}\splitmeta[\code{|}]{length 2}{length b}\code{,...}, where \meta{length 1} represents the length of the solid line and \meta{length a} represents the length of the empty space, such as \code{5pt|2pt,3pt}, if the empty space is empty, then it is equal to the solid line length.
+ The command to draw horizontal dashed rules, based on the \cs{rule} command, and the same as the \cs{rule} command when the \meta{dash rules} are empty. \meta{raise} is the vertical offset of the rule. \meta{leader} is the alignment of the dashed line fill, which can be empty, \code{c}, or \code{x} (the default), corresponding to the \cs{leaders}, \cs{cleaders}, and \cs{xleaders} commands, respectively. \meta{width} is the length of the dashed rule, which can be set to \cs{fill} to indicate an arbitrarily long distance when you need to fill the entire horizontal center of the plate. \meta{dash rules} is expressed as \splitmeta[\code{|}]{length 1}{length a}\code{,}\splitmeta[\code{|}]{length 2}{length b}\code{,...}, where \meta{length 1} represents the length of the solid line and \meta{length a} represents the length of the empty space, such as \code{5pt|2pt,3pt}, if the empty space is empty, then it is equal to the solid line length.
\begin{example}
1X\rule{2cm}{1pt}x \\
2X\hdashrule{2cm}{1pt}{}x \\
@@ -64,11 +64,21 @@ Sometimes it is necessary to draw dashed rules when writing documents, such as g
\command{hanyrule}[\oarg{leader}\marg{width}\marg{symbol list}]
This command sets the length of the dotted rule and fills it with arbitrary symbols. \meta{symbol list} can be more than one symbol and they are separated by \textcolor{red}{commas}. Symbols are best packed in boxes of a certain length, as spacing between symbols is not provided.
\begin{example}
- 1X\hanyrule[]{5cm}{\makebox[6pt][l]{$\cdot$}}x \\
- 2X\hanyrule[c]{5cm}{\makebox[6pt][l]{$\cdot$}}x \\
- 3X\hanyrule[x]{5cm}{\makebox[6pt][l]{$\cdot$}}x \\
- 4X\hanyrule[x]{5cm}{\makebox[6pt][c]{$\cdot$}}x \\
- 5X\hanyrule[x]{5cm}{\makebox[6pt][c]{$\cdot$},\makebox[6pt]{$\circ$}}x
+ \newcommand{\dblelement}
+ {%
+ \tikz[color=blue]
+ {
+ \draw[line width=0.8mm](0mm,1.1mm)--(3mm,1.1mm);
+ \draw[line width=0.3mm](0mm,0mm)--(3mm,0mm);
+ }%
+ }
+ 1X\hanyrule[]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\
+ 2X\hanyrule[c]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\
+ 3X\hanyrule[x]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\
+ 4X\hanyrule[c]{5cm}{\makebox[8pt]{$\cdot$}}x \\
+ 5X\hanyrule[x]{5cm}{\makebox[8pt]{$\cdot$}}x \\
+ 6X\hanyrule[x]{5cm}{\makebox[8pt]{$\cdot$},\makebox[8pt]{$\circ$}}x \\
+ 7X\hanyrule[x]{5cm}{\makebox[5mm]{\dblelement}}x
\end{example}
\end{commands}
diff --git a/macros/latex/contrib/fadingimage/doc/fadingimage.pdf b/macros/latex/contrib/fadingimage/doc/fadingimage.pdf
index 4b7e4535d5..f0e81ecf62 100644
--- a/macros/latex/contrib/fadingimage/doc/fadingimage.pdf
+++ b/macros/latex/contrib/fadingimage/doc/fadingimage.pdf
Binary files differ
diff --git a/macros/latex/contrib/fadingimage/doc/fadingimage.tex b/macros/latex/contrib/fadingimage/doc/fadingimage.tex
index a5a88ec226..043d13b129 100644
--- a/macros/latex/contrib/fadingimage/doc/fadingimage.tex
+++ b/macros/latex/contrib/fadingimage/doc/fadingimage.tex
@@ -20,38 +20,41 @@
\author{Hsia Mingyu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}}
\yyyymmdddate\date{\today}
\affil{\href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com}}
-\date{\today\quad Version 0.1c\thanks{\url{https://github.com/xiamyphys/FadingImage}}}
+\date{\today\quad Version 0.1d\thanks{\url{https://github.com/xiamyphys/FadingImage}}}
\begin{document}
+
\maketitle
\UPFadingImage[trim={0 {.96\paperheight} 0 0},clip]{Beautiful-realities}
\LOWFadingImage[trim={0 0 0 {.96\paperheight}},clip]{Beautiful-realities}
\vspace{-6ex}
\begin{abstract}
-This is \textsf{\textbf{not only the document but also the demo}} for \pkg{FadingImage} package, which provides two commands for adding fading full width picture at the top or bottom of a page. And this package is a component of my template \pkg{LiteBook}.
+This is \textsf{\textbf{not only the document but also the demo}} for the \pkg{FadingImage} package, which provides three commands for adding fading full width picture at the top, bottom or both of them on a page. And this package is used for my template \pkg{LiteBook} and \pkg{LiteSolution}.
\end{abstract}
\section{The purpose of this package}
-This package provides two commands for adding fading full width picture at the top or bottom of a page. Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} or \href{https://github.com/xiamyphys/fadingimage}{GitHub}.
+This package provides three commands for adding fading full width picture at the top or bottom of a page. Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} or \href{https://github.com/xiamyphys/fadingimage}{GitHub}.
This package requires \pkg{tikz} package to node images and \pkg{fading} library to support fading image.
\section{Loading \pkg{FadingImage}}
-You can simply download latest \verb|fadingimage.sty| file from \href{https://github.com/xiamyphys/FadingImage}{GitHub} or \href{https://ctan.org/pkg/fadingimage}{CTAN} and save it under your working directory, or using terminal/cmd to implement the commands to update all the packages (and install this package) to the latest version or switch to portable version instead
+I strongly advise you to use terminal/cmd to implement the commands to update all the packages (and install this package) to the latest version or switch to portable version instead
\begin{verbatim}
sudo tlmgr update --self --all
\end{verbatim}
-\section{Commands \cmd{UPFadingImage} \& \cmd{LOWFadingImage}}
+\section{Commands \cmd{UPFadingImage}, \cmd{LOWFadingImage} and \cmd{UPLOWFadingImage}}
+\begin{small}
\begin{verbatim}
- \UPFadingImage[ ]{example-image-a} \LOWFadingImage[ ]{example-image-a}
+ \UPFadingImage [<keyval list>]{<file>} \LOWFadingImage[<keyval list>]{<file>}
+ \UPFadingImage [<keyval list>]{<file>} [<keyval list>]{<file>}
\end{verbatim}
+\end{small}
-The two commands are all have 2 variables, while the first one is optional. The second variable of the commands can assign the image that you want to insert, and the first one can assign the parameters of command \cmd{includegraphics}, such as clip to the inserted image
-\begin{verbatim}
- \UPFadingImage[trim={0 {.75\paperheight} 0 0},clip]{example-image-a}[.5]
-\end{verbatim}
+The first two commands all have 2 variables and the first one is optional. The second variable of the commands can assign the image that you want to insert, and the first one can assign the parameters of command \cmd{includegraphics}, such as clip to the inserted image.
+
+The third command is a combination of the first two commands and it will call the \cmd{tikz} environment for only once time to reduce compile time.
-If a star (*) is added after the commands (such as \verb|\UPFadingImage*[...]{...}|), then the image you inserted won't be faded. \textbf{\textsf{The effect of the commands is just like this document}}.
+If a star (*) is added after the commands (such as \verb|\UPFadingImage*[...]{...}|), then the image you inserted won't be faded.
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/fadingimage/tex/fadingimage.sty b/macros/latex/contrib/fadingimage/tex/fadingimage.sty
index bde2e592cc..2b63cf0cbe 100644
--- a/macros/latex/contrib/fadingimage/tex/fadingimage.sty
+++ b/macros/latex/contrib/fadingimage/tex/fadingimage.sty
@@ -18,12 +18,13 @@
%% available at https://github.com/xiamyphys/FadingImage *
%% ****************************************************************************************************
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesPackage{fadingimage}[2024/03/11/ v0.1c Package for adding fading full width picture at the top or bottom of a page.]
+\ProvidesPackage{fadingimage}[2024/03/17/ v0.1d Package for adding fading full width picture at the top or bottom of a page.]
\RequirePackage{tikz,xcolor}
\usetikzlibrary{fadings}
\NewDocumentCommand{\UPFadingImage}{ s O{} m }{
- \IfBooleanTF{#1}{
+ \IfBooleanTF{#1}
+ {
\tikz[remember picture,overlay]
\node[below,inner sep=0pt,outer sep=auto] at (current page.north) {\includegraphics[width=\paperwidth,#2]{#3}};
}{
@@ -31,12 +32,29 @@
\node[scope fading=south,below,inner sep=0pt,outer sep=auto] at (current page.north) {\includegraphics[width=\paperwidth,#2]{#3}};
}
}
+
\NewDocumentCommand{\LOWFadingImage}{ s O{} m }{
- \IfBooleanTF{#1}{
+ \IfBooleanTF{#1}
+ {
\tikz[remember picture,overlay]
\node[above,inner sep=0pt,outer sep=auto] at (current page.south) {\includegraphics[width=\paperwidth,#2]{#3}};
}{
\tikz[remember picture,overlay]
\node[scope fading=north,above,inner sep=0pt,outer sep=auto] at (current page.south) {\includegraphics[width=\paperwidth,#2]{#3}};
}
+}
+
+\NewDocumentCommand{\UPLOWFadingImage}{ s O{} m O{} m }{
+ \IfBooleanTF{#1}
+ {
+ \tikz[remember picture,overlay]{
+ \node[below,inner sep=0pt,outer sep=auto] at (current page.north) {\includegraphics[width=\paperwidth,#2]{#3}};
+ \node[above,inner sep=0pt,outer sep=auto] at (current page.south) {\includegraphics[width=\paperwidth,#4]{#5}};
+ }
+ }{
+ \tikz[remember picture,overlay]{
+ \node[scope fading=south,below,inner sep=0pt,outer sep=auto] at (current page.north) {\includegraphics[width=\paperwidth,#2]{#3}};
+ \node[scope fading=north,above,inner sep=0pt,outer sep=auto] at (current page.south) {\includegraphics[width=\paperwidth,#4]{#5}};
+ }
+ }
} \ No newline at end of file
diff --git a/macros/latex/contrib/hvfloat/Changes b/macros/latex/contrib/hvfloat/Changes
index 541dc4d5c7..ac9450c444 100644
--- a/macros/latex/contrib/hvfloat/Changes
+++ b/macros/latex/contrib/hvfloat/Changes
@@ -1,4 +1,5 @@
hvfloat.sty:
+2.49 2024-03-17 - bugfix for checkoddpage and FULLPAGE option
2.48 2024-03-03 - added option fboxLines to get patial lines of \fbox
(package fbox)
2.47 2023-10-16 - added type doubleFullPage for images with a width
diff --git a/macros/latex/contrib/hvfloat/doc/examples/after1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/after1s1c.pdf
index b49623bceb..565783ae52 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/after1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/after1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/after2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/after2s2c.pdf
index 8d29f55e11..a38fc42fd8 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/after2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/after2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/capPos.pdf b/macros/latex/contrib/hvfloat/doc/examples/capPos.pdf
index 8d12b64b0c..4ec73b2369 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/capPos.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/capPos.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/default1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/default1s1c.pdf
index 195d9900c1..727a5a6445 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/default1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/default1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/default1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/default1s2c.pdf
index 4cc1b30784..7a32ce70b0 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/default1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/default1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/default2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/default2s1c.pdf
index 44e24d3799..d2e4aa44a0 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/default2s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/default2s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/default2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/default2s2c.pdf
index 7e0151eed9..6e5bcf4255 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/default2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/default2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/doublepage2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/doublepage2s1c.pdf
index 3b897e3f91..28f72e8894 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/doublepage2s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/doublepage2s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.pdf
index 282f48c364..9d9afa8171 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.tex b/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.tex
index f7abc397d4..f0b827f5b8 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.tex
+++ b/macros/latex/contrib/hvfloat/doc/examples/doublepage2s2c.tex
@@ -1,7 +1,7 @@
\errorcontextlines=100
%\documentclass[final]{ltugboat}
\documentclass[twoside,twocolumn]{scrartcl}
-%% $Id: doublepage2s2c.tex 773 2023-10-16 12:29:28Z herbert $
+%% $Id: doublepage2s2c.tex 781 2023-10-19 19:57:50Z herbert $
\input{preamble.ltx}
\usepackage{blindtext,xcolor,marginnote}
@@ -69,6 +69,8 @@
\hvblindtext
+\hvblindtext
+
\subsubsection{\texttt{bindCorr=1cm}}
\begin{lstlisting}
diff --git a/macros/latex/contrib/hvfloat/doc/examples/even1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/even1s1c.pdf
index f5129e2fe1..b692c62cfd 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/even1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/even1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/even1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/even1s2c.pdf
index 8842af5ebb..147b01df2e 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/even1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/even1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/even2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/even2s1c.pdf
index 4f361957fe..6c7bc87f20 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/even2s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/even2s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/even2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/even2s2c.pdf
index c02bd2d322..5a0a113291 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/even2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/even2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/even2s2c.tex b/macros/latex/contrib/hvfloat/doc/examples/even2s2c.tex
index 6952e4e45e..7ed746dbe8 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/even2s2c.tex
+++ b/macros/latex/contrib/hvfloat/doc/examples/even2s2c.tex
@@ -1,5 +1,5 @@
\documentclass[twoside,twocolumn]{scrartcl}
-%% $Id: even2s2c.tex 318 2021-11-20 07:30:54Z herbert $
+%% $Id: even2s2c.tex 878 2024-03-16 20:49:50Z herbert $
\input{preamble.ltx}
\setlength\columnseprule{0.4pt}
@@ -24,7 +24,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\begin{lstlisting}
\hvFloat[fullpage,capPos=evenPage]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
@@ -37,7 +37,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\Float[capPos=evenPage]
\hvFloat[fullpage,capPos=evenPage]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
@@ -50,7 +50,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\begin{lstlisting}
\hvFloat[fullpage,capPos=evenPage]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
@@ -63,7 +63,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\Float[capPos=evenPage]
\hvFloat[fullpage,capPos=evenPage]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
diff --git a/macros/latex/contrib/hvfloat/doc/examples/fullpage1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/fullpage1s2c.pdf
index 8abc361d7b..684b4bf305 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/fullpage1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/fullpage1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/inner1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/inner1s2c.pdf
index 7cf579e2b8..9916c10edb 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/inner1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/inner1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/inner2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/inner2s1c.pdf
index c9364feb7a..909a9cec69 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/inner2s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/inner2s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/inner2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/inner2s2c.pdf
index 163ed2b8ee..b15bbe471d 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/inner2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/inner2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/left2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/left2s2c.pdf
index b5fe92532b..4a1ca31be2 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/left2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/left2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/left2s2c.tex b/macros/latex/contrib/hvfloat/doc/examples/left2s2c.tex
index 56ea72912e..edebc7b645 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/left2s2c.tex
+++ b/macros/latex/contrib/hvfloat/doc/examples/left2s2c.tex
@@ -1,5 +1,5 @@
\documentclass[twoside,twocolumn]{scrartcl}
-%% $Id: left2s2c.tex 318 2021-11-20 07:30:54Z herbert $
+%% $Id: left2s2c.tex 878 2024-03-16 20:49:50Z herbert $
\input{preamble.ltx}
\setlength\columnseprule{0.4pt}
@@ -24,7 +24,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\begin{lstlisting}
\hvFloat[fullpage,capPos=left]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
@@ -37,7 +37,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\Float[default]
\hvFloat[fullpage,capPos=left]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
@@ -50,7 +50,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\begin{lstlisting}
\hvFloat[fullpage,capPos=left]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
@@ -63,7 +63,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\Float[default]
\hvFloat[fullpage,capPos=left]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-after1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-after1s1c.pdf
index 4ecf842042..1e4aa687e9 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/multi-after1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/multi-after1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-default1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-default1s1c.pdf
index 847f10ef7d..960db67b00 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/multi-default1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/multi-default1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-default1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-default1s2c.pdf
index 74776bd2ea..80f1fad09f 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/multi-default1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/multi-default1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-default2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-default2s1c.pdf
index c84effcb2b..a71f936e33 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/multi-default2s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/multi-default2s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-default2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-default2s2c.pdf
index 214edd0ef7..15f0f07c4b 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/multi-default2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/multi-default2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-inner2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-inner2s2c.pdf
index 3664e14647..ba5a21c919 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/multi-inner2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/multi-inner2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-outer2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-outer2s2c.pdf
index 8b12502d6f..250ff6b511 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/multi-outer2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/multi-outer2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/multi-right1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/multi-right1s1c.pdf
index 39fbfbf793..5d1e40727d 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/multi-right1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/multi-right1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.pdf
index 2cc3a2f1b6..90cd8e5a6b 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/odd1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/odd1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/odd1s2c.pdf
index ea14d642b3..ebaa94bdd4 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/odd1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/odd1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/odd2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/odd2s1c.pdf
index fdfe911f30..308f3dfcf7 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/odd2s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/odd2s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/odd2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/odd2s2c.pdf
index 8916a62dea..ebce9ce19d 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/odd2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/odd2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/outer1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/outer1s2c.pdf
index 20b9309053..f655d32345 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/outer1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/outer1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/outer2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/outer2s1c.pdf
index 449a372b49..d27d74a319 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/outer2s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/outer2s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/outer2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/outer2s2c.pdf
index f092b614a1..46c50b5293 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/outer2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/outer2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-after1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-after1s1c.pdf
index 7b0e2c3f58..473a50c75a 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/paper-after1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/paper-after1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-after2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-after2s2c.pdf
index fa884c9d46..8cb352fd40 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/paper-after2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/paper-after2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-default1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-default1s1c.pdf
index 6acb89ccd1..ac28f4f952 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/paper-default1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/paper-default1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-default1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-default1s2c.pdf
index d1c7d7b0d0..6d5c0b9de1 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/paper-default1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/paper-default1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-default2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-default2s2c.pdf
index 06cb4d9dc5..27405876d0 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/paper-default2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/paper-default2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-even2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-even2s1c.pdf
index c1fb0fc94d..ca44b7e794 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/paper-even2s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/paper-even2s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-inner2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-inner2s2c.pdf
index 8e4ebfe2ff..dce41271bd 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/paper-inner2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/paper-inner2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-odd2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-odd2s1c.pdf
index 60a73caf48..e32f14a8a3 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/paper-odd2s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/paper-odd2s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/paper-right1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/paper-right1s1c.pdf
index f0b80bcd5c..ec63ec4cf6 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/paper-right1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/paper-right1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/right1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/right1s1c.pdf
index 7f05564f49..abf1c34521 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/right1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/right1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/right1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/right1s2c.pdf
index 1c117348a0..bb0c11a14d 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/right1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/right1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/right2s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/right2s1c.pdf
index 17f2378168..7465861536 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/right2s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/right2s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/right2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/right2s2c.pdf
index fae4047e16..007db02871 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/right2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/right2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/right2s2c.tex b/macros/latex/contrib/hvfloat/doc/examples/right2s2c.tex
index 7c7cf4e67d..ced8b9cdfb 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/right2s2c.tex
+++ b/macros/latex/contrib/hvfloat/doc/examples/right2s2c.tex
@@ -1,5 +1,5 @@
\documentclass[twoside,twocolumn]{scrartcl}
-%% $Id: right2s2c.tex 318 2021-11-20 07:30:54Z herbert $
+%% $Id: right2s2c.tex 878 2024-03-16 20:49:50Z herbert $
\input{preamble.ltx}
\setlength\columnseprule{0.4pt}
@@ -24,7 +24,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\begin{lstlisting}
\hvFloat[fullpage,capPos=right]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
@@ -37,7 +37,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\Float[capPos=right]
\hvFloat[fullpage,capPos=right]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
@@ -50,7 +50,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\begin{lstlisting}
\hvFloat[fullpage,capPos=right]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
@@ -63,7 +63,7 @@ The fullpage image~\vref{fig:fullpage0} has a caption~\vpageref{fig:fullpage0-ca
\Float[capPos=right]
\hvFloat[fullpage,capPos=right]%
{figure}%
- {\includegraphics[fullpage]{frose}}%
+ {\includegraphics[fullpage]{usa5}}%
[A fullpage float with the default caption setting]%
{A default caption of a ``fullpage'' object with the default setting, which
is a ``left'' caption which means that it always appears before the object.
diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-after1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-after1s1c.pdf
index 04d809ad3d..c40eb0d232 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/sub-after1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/sub-after1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-after2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-after2s2c.pdf
index 55d63a81c9..f77ebf3cca 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/sub-after2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/sub-after2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-default1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-default1s1c.pdf
index c5ff14df2a..9b4874dd73 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/sub-default1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/sub-default1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-default1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-default1s2c.pdf
index cf3eeb2e37..1aa9ff594a 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/sub-default1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/sub-default1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-default2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-default2s2c.pdf
index 2e264d6fef..c7bec6d8bb 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/sub-default2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/sub-default2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-right1s1c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-right1s1c.pdf
index 591ffc1f24..225b3f84c9 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/sub-right1s1c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/sub-right1s1c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-right1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-right1s2c.pdf
index 678fa315a9..f8a4378e25 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/sub-right1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/sub-right1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/sub-right2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/sub-right2s2c.pdf
index 7732433c50..cdbb8426a0 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/sub-right2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/sub-right2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.pdf
index 198249a15b..c73f885eb4 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.tex b/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.tex
index f7c4f36b5e..fc4298cba9 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.tex
+++ b/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.tex
@@ -47,8 +47,7 @@ the option \texttt{wide}.}{fig:70}
Caption at top right beside the float and object position left and
the option \texttt{wide}.}{fig:70}
-\textcolor{black!40}{\blindtext}
-%\blindtext
+\textcolor{black!40}{\blindtext\blindtext}
The code for figure \ref{fig:80}:
diff --git a/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.pdf b/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.pdf
index fb2b1ca1e9..3cbc36a53c 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.pdf
+++ b/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.tex b/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.tex
index 46c8182cb9..35b245c6d4 100644
--- a/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.tex
+++ b/macros/latex/contrib/hvfloat/doc/examples/wide2s2c.tex
@@ -60,8 +60,10 @@ The code for figure \ref{fig:80}:
\end{lstlisting}
+\newpage
+
\hvFloat[wide,nonFloat,
- capPos=left,%
+ capPos=right,%
capVPos=top,%
]{figure}{\includegraphics[width=0.75\linewidth]{images/CTAN}}%
{Caption at top left beside the object and object position left and
diff --git a/macros/latex/contrib/hvfloat/doc/hvfloat.pdf b/macros/latex/contrib/hvfloat/doc/hvfloat.pdf
index 30058a0475..eb14a418f5 100644
--- a/macros/latex/contrib/hvfloat/doc/hvfloat.pdf
+++ b/macros/latex/contrib/hvfloat/doc/hvfloat.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/hvfloat.tex b/macros/latex/contrib/hvfloat/doc/hvfloat.tex
index 40bb098819..169270c2d4 100644
--- a/macros/latex/contrib/hvfloat/doc/hvfloat.tex
+++ b/macros/latex/contrib/hvfloat/doc/hvfloat.tex
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.tex 876 2024-03-03 14:04:56Z herbert $
+%% $Id: hvfloat.tex 878 2024-03-16 20:49:50Z herbert $
%\listfiles
\errorcontextlines=100
\documentclass[twoside,paper=a4,usegeometry,index=totoc]{scrartcl}
@@ -188,6 +188,8 @@
\marginnote{\fbox{\shortstack{float\\#1}}}\fi
}
+\graphicspath{{images/}}
+
\begin{document}
\title{Package \texttt{hvfloat}\\
Controlling captions, fullpage and doublepage floats\\ver \hvFloatFileVersion}
@@ -216,7 +218,10 @@ marginnote \fbox{float} is set into the margin. This is done also only for demon
objectAngle=120,
capAngle=-210,
objectPos=center
-]{figure}{\protect\fbox{\includegraphics[scale=0.9]{images/rose}}}{\protect\fbox{What a nice Caption :-)}}{fig:title}
+ objectFrame,
+]{figure}{\includegraphics[scale=0.9]{images/rose}}
+ {\protect\fbox{What a nice Caption :-)}}
+ {fig:title}
\vspace*{\fill}
@@ -458,8 +463,7 @@ Code for figure \ref{fig:0}:
\end{lstlisting}
-\MarginNote{Tab.~\ref{tab:0}}
-\hvFloat[capPos=top]{table}{%
+\savebox\hvOBox{%
\begin{tabularx}{\textwidth}{l|l|X}
\rmfamily Name & Type & Description\\\hline
\CMD{hvFloat} & command & places object and caption in different ways\\
@@ -468,23 +472,30 @@ Code for figure \ref{fig:0}:
\CMD{tabcaption} & command & writes a table caption in a non floating environment\\
\CMD{hvFloatSetDefaults} & command & sets all options to the defaults\\
\CMD{hvDefFloatStyle} & command & define a user style
-\end{tabularx}%
-}{With the only Option \texttt{capPos=top} to place the caption on top of the table, which is often the default.}{tab:0}
+\end{tabularx}}
+
+\MarginNote{Tab.~\ref{tab:0}}
+\hvFloat[capPos=top,useOBox]{table}{}
+ {With the only Option \texttt{capPos=top} to place the caption on
+ top of the table, which is often the default.}
+ {tab:0}
Code for table \ref{tab:0}:
\begin{lstlisting}
-\hvFloat[capPos=top]{table}{%
-\begin{tabularx}{\textwidth}{>{\ttfamily}l|l|X}
+\savebox\hvOBox{%
+\begin{tabularx}{\textwidth}{l|l|X}
\rmfamily Name & Type & Description\\\hline
\CMD{hvFloat} & command & places object and caption in different ways\\
- hvFloatEnv & environment & places object and caption exactly Here\\
+ \Lenv{hvFloatEnv} & environment & places object and caption exactly Here\\
\CMD{figcaption} & command & writes a figure caption in a non floating environment\\
\CMD{tabcaption} & command & writes a table caption in a non floating environment\\
\CMD{hvFloatSetDefaults} & command & sets all options to the defaults\\
\CMD{hvDefFloatStyle} & command & define a user style
-\end{tabularx}}%
-{With the only Option \texttt{capPos=top} to place the caption on top of the table, which is often the default.}%
-{tab:0}
+\end{tabularx}}
+\hvFloat[capPos=top,useOBox]{table}{}
+ {With the only Option \texttt{capPos=top} to place the caption on
+ top of the table, which is often the default.}
+ {tab:0}
\end{lstlisting}
See section~\ref{sec:tables} for some more informations about tabulars as objects.
@@ -1147,26 +1158,29 @@ the caption to the left, center, or right of the full width which is linewidth a
%\hvblindtext
+\clearpage
+
\section{Margin floats}
With the optional argument \Lkeyword{inMargin} the opject and the caption can be placed into
the margin. This is done internally with the command \Lcs{marginnote} from the package of the same name.
+
+
%\marginnote{Fig.~\ref{thea}}
\hvFloat[inMargin]{figure}{\includegraphics[width=\marginparwidth]{images/thea}}
{An image in the margin of the document.}
{thea}
-
\begin{lstlisting}
\hvFloat[inMargin]{figure}{\includegraphics[width=\marginparwidth]{images/thea}}
{An image in the margin of the document.}
{thea}
-
...
-
-\hvFloat[inMargin]{table}{\small\begin{tabular}{@{}ccc@{}}\hline Mon& Di& Mi\\ frei & Dienst & frei\\
+\savebox\hvOBox{\small\begin{tabular}{@{}
+ ccc@{}}\hline Mon& Di& Mi\\ frei & Dienst & frei\\
Dienst & Dienst & Frei\\\hline \end{tabular}}
+\hvFloat[inMargin,useOBox]{table}{}
{A tabular in the margin just like the image.}
{thea2}
\end{lstlisting}
@@ -1175,9 +1189,13 @@ the margin. This is done internally with the command \Lcs{marginnote} from the p
\hvblindtext
+\savebox\hvOBox{%
+ \small\begin{tabular}{@{}ccc@{}}\hline
+ Mon& Di& Mi\\ frei & Dienst & frei\\
+ Dienst & Dienst & Frei\\\hline \end{tabular}%
+}
%\marginnote{Fig.~\ref{thea2}}
-\hvFloat[inMargin]{table}{\small\tabcolsep=3pt\begin{tabular}{@{}ccc@{}}\hline Mon& Di& Mi\\ frei & Dienst & frei\\
- Dienst & Dienst & Frei\\\hline \end{tabular}}
+\hvFloat[inMargin,useOBox]{table}{}
{A tabular in the margin just like the image.}
{thea2}
@@ -1383,7 +1401,7 @@ The code for table \ref{table:1} and \ref{table:2} is:
\hvFloat[%
floatPos=!hb,
capPos=top,
- useOBox=true]{table}{}{Demonstration of the \texttt{useOBox} Parameter}{table:1}
+ useOBox]{table}{}{Demonstration of the \texttt{useOBox} Parameter}{table:1}
\hvblindtext
@@ -1403,14 +1421,14 @@ In this case leave the third parameter empty.
\hvFloat[%
floatPos=!hb,
capPos=top,
- useOBox=true]{table}{}{Demonstration of the \texttt{useOBox} Parameter}{table:1}
+ useOBox]{table}{}{Demonstration of the \texttt{useOBox} Parameter}{table:1}
\MarginNote{Tab.~\ref{table:2}}
\hvFloat[%
floatPos=!htb,%
- useOBox=true,%
+ useOBox,%
objectAngle=90,%
capPos=right,%
capVPos=top,%
@@ -2730,7 +2748,7 @@ in the inner margin on both pages.
\begin{lstlisting}
\hvFloat[doubleFULLPAGE,capPos=right]%
{figure}%
- {\includegraphics[height=\paperheight]{images/rheinsberg-1000}}%
+ {\includegraphics[height=\paperheight]{images/rheinsberg}}%
{A caption for a double-sided image that will be placed on the right-hand
part of the illustration. The illustration begins on the left edge of the paper.
No further text is placed on the pages. A short form is used for the LOF.
@@ -2741,7 +2759,7 @@ in the inner margin on both pages.
\MarginNote{Fig.~\ref{fig:doubleFULLPAGE1}}
\hvFloat[doubleFULLPAGE,capPos=right]%
{figure}%
- {\includegraphics[height=\paperheight]{images/rheinsberg-1000}}%
+ {\includegraphics[height=\paperheight]{images/rheinsberg}}%
{A caption for a double-sided image that will be placed on the right-hand
part of the illustration. The illustration begins on the left edge of the paper.
No further text is placed on the pages. A short form is used for the LOF.
@@ -2770,7 +2788,7 @@ and the right part on page~\pageref{bar-2}. All three labels points to the same
\hvFloat[doubleFULLPAGE,capPos=after]%
{figure}%
{\includegraphics[doubleFULLPAGE,
- keepaspectratio=false]{images/rheinsberg-1000}}%
+ keepaspectratio=false]{images/rheinsberg}}%
{A caption for a double-sided image that will be placed \textbf{after}
the image. The image begins on the left edge of the paper.
No further text is placed on the pages. A short form is used for the LOF.
@@ -2783,7 +2801,7 @@ and the right part on page~\pageref{bar-2}. All three labels points to the same
\MarginNote{Fig.~\ref{foo}}
\hvFloat[doubleFULLPAGE,capPos=after]%
{figure}%
- {\includegraphics[doubleFULLPAGE]{images/rheinsberg-1000}}%
+ {\includegraphics[doubleFULLPAGE]{images/rheinsberg}}%
{A caption for a double-sided image that will be placed \textbf{after}
the image. The image begins on the left edge of the paper.
No further text is placed on the pages. A short form is used for the LOF.
@@ -2804,7 +2822,7 @@ and the right part on page~\pageref{bar-2}. All three labels points to the same
\hvFloat[doubleFULLPAGE,capPos=before]%
{figure}%
{\includegraphics[height=\paperheight,width=2\paperwidth,
- keepaspectratio=false]{images/rheinsberg-1000}}%
+ keepaspectratio=false]{images/rheinsberg}}%
{A caption for a double-sided image that will be placed \textbf{before}
the image. The image begins on the left edge of the paper.
No further text is placed on the pages. A short form is used for the LOF.
@@ -2815,7 +2833,7 @@ and the right part on page~\pageref{bar-2}. All three labels points to the same
\MarginNote{Fig.~\ref{bar}}
\hvFloat[doubleFULLPAGE,capPos=before]%
{figure}%
- {\includegraphics[height=\paperheight,width=2\paperwidth,keepaspectratio=false]{images/rheinsberg-1000}}%
+ {\includegraphics[height=\paperheight,width=2\paperwidth,keepaspectratio=false]{images/rheinsberg}}%
{A caption for a double-sided image that will be placed \textbf{before}
the image. The image begins on the left edge of the paper.
No further text is placed on the pages. A short form is used for the LOF.
@@ -3117,9 +3135,9 @@ Artikel gesamt & 2 & 6 & 13 & 8 & 4 & 3 & 5 & 4 & 0 & 6 & 3 & 5 &23 &10 & 8 & 15
\hvBlindtext
-\hvFloat[doublePage,capPos=right,capVPos=top,floatCapSep=12pt]%
+\hvFloat[doublePage,capPos=right,capVPos=top,floatCapSep=12pt,useOBox]%
{table}%
- {\usebox\hvOBox}%%%%%%%%%%%%%%
+ {}%%%%%%%%%%%%%%
[A doublepage tabular with a caption on the right side of the right part.]%
{A caption for a double-sided tabular that will be placed on the right side of the
right-hand part of the illustration. The illustration begins on the left edge of
@@ -3128,7 +3146,7 @@ Artikel gesamt & 2 & 6 & 13 & 8 & 4 & 3 & 5 & 4 & 0 & 6 & 3 & 5 &23 &10 & 8 & 15
\end{lstlisting}
-\global\savebox\hvOBox{%
+\savebox\hvOBox{%
\begin{tabular}{l*{18}r} \toprule
& \textbf{1972} & \textbf{1973} & \textbf{1974} & \textbf{1975} & \textbf{1976}
& \textbf{1977} & \textbf{1978} & \textbf{1979} & \textbf{1980} & \textbf{1981} & \textbf{1982} & \textbf{1983} & \textbf{1984} & \textbf{1985}
@@ -3159,7 +3177,31 @@ Artikel gesamt & 2 & 6 & 13 & 8 & 4 & 3 & 5 & 4 & 0 & 6 & 3 & 5 &23 &10 & 8 & 15
\marginpar{Tab.~\ref{tab:doublePage3}}%
\hvFloat[doublePage,capPos=right,capVPos=top,floatCapSep=12pt]%
{table}%
- {\usebox\hvOBox}%%%%%%%%%%%%%%
+ {\begin{tabular}{l*{18}r} \toprule
+ & \textbf{1972} & \textbf{1973} & \textbf{1974} & \textbf{1975} & \textbf{1976}
+ & \textbf{1977} & \textbf{1978} & \textbf{1979} & \textbf{1980} & \textbf{1981} & \textbf{1982} & \textbf{1983} & \textbf{1984} & \textbf{1985}
+ & \textbf{1986} & \textbf{1987} & \textbf{1988} & \textbf{1989}
+ \\\midrule
+\addlinespace[3pt]
+Zeile 1 & 1 & 3 & 1 & 1 & 1 & 0 & 1 & 1 & 0 & 0 & 0 & 0 &20 & 0 & 2 & 2 & 2 & 1\\\addlinespace[3pt]
+Zeile 2 & 1 & 1 & 3 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 2 & 1 & 3 & 4 & 4 & 6 & 4 & 2\\\addlinespace[3pt]
+Zeile 3 & 2 & 1 & 2 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 5 & 3 & 1 & 7 & 7 & 3\\\addlinespace[3pt]
+Zeile 4 & 1 & 0 & 5 & 1 & 2 & 0 & 0 & 0 & 0 & 2 & 1 & 0 & 1 & 0 & 3 & 7 & 2 & 1\\\addlinespace[3pt]
+Zeile 6 & 2 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 2 & 0 & 5 & 2 & 2 & 5 & 4 & 2\\\addlinespace[3pt]
+Zeile 5 & 0 & 0 & 4 & 2 & 1 & 2 & 2 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 2 & 5 & 4 & 3\\\addlinespace[3pt]
+Zeile 8 & 0 & 1 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 3 & 2 & 1 & 2 & 1 & 3 & 5 & 3 & 4\\\addlinespace[3pt]
+Zeile 9 & 0 & 0 & 0 & 0 & 0 & 1 & 2 & 1 & 0 & 0 & 0 & 0 & 4 & 2 & 1 & 4 & 5 & 2\\\addlinespace[3pt]
+Zeile10 & 0 & 1 & 3 & 0 & 1 & 0 & 1 & 0 & 0 & 1 & 1 & 0 & 1 & 1 & 1 & 4 & 4 & 1\\\addlinespace[3pt]
+Zeile11 & 0 & 2 & 2 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 2 & 6 & 1 & 0 & 2 & 1 & 1 \\\addlinespace[3pt]
+Zeile12 & 2 & 0 & 2 & 4 & 1 & 0 & 4 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 3\\\addlinespace[3pt]
+Lärm & 2 & 3 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 2 & 0 & 0 & 2 & 2 & 2\\\addlinespace[3pt]
+Zeile13 & 0 & 1 & 0 & 0 & 1 & 0 & 3 & 0 & 0 & 0 & 0 & 0 & 2 & 0 & 1 & 3 & 0 & 2\\\addlinespace[3pt]
+Zeile14 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 3 & 3 & 2 & 1 & 1 & 0\\\addlinespace[3pt]
+Zeile15 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 4 & 0 & 0 & 3 & 1 & 1\\\addlinespace[3pt]
+Zeile16 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 3 & 5 & 0 & 1\\\addlinespace[3pt]\midrule
+Artikel gesamt & 2 & 6 & 13 & 8 & 4 & 3 & 5 & 4 & 0 & 6 & 3 & 5 &23 &10 & 8 & 15 & 13 &1 \\
+\bottomrule
+\end{tabular}}%%%%%%%%%%%%%%
[A doublepage tabular with a caption on the right side of the right part.]%
{A caption for a double-sided tabular that will be placed on the right side of the
right-hand part of the illustration. The illustration begins on the left edge of
diff --git a/macros/latex/contrib/hvfloat/doc/images/usa5.jpg b/macros/latex/contrib/hvfloat/doc/images/usa5.jpg
new file mode 100644
index 0000000000..6c0aa69013
--- /dev/null
+++ b/macros/latex/contrib/hvfloat/doc/images/usa5.jpg
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat-0.inc b/macros/latex/contrib/hvfloat/latex/hvfloat-0.inc
index c461aa6fca..e4d8b07cf0 100644
--- a/macros/latex/contrib/hvfloat/latex/hvfloat-0.inc
+++ b/macros/latex/contrib/hvfloat/latex/hvfloat-0.inc
@@ -24,7 +24,7 @@
\fi
\let\c@hv@tempCNTfigA\c@figure
\let\c@hv@tempCNTtabA\c@table
-% \checkoddpage
+ \checkoddpage
\ifoddpage
\if@twocolumn
\if@firstcolumn
diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat-1.inc b/macros/latex/contrib/hvfloat/latex/hvfloat-1.inc
index 258bfbfaf7..effd6aec61 100644
--- a/macros/latex/contrib/hvfloat/latex/hvfloat-1.inc
+++ b/macros/latex/contrib/hvfloat/latex/hvfloat-1.inc
@@ -24,7 +24,6 @@
\else
\global\hv@@capPos=2 % other caption type
\fi\fi
- %\checkoddpage
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\global\hv@tempWidthA=\dimexpr-\oddsidemargin-1in-\parindent+\hvSet@bindCorrection% the width of the right side offset
\global\hv@tempWidthB=\dimexpr\ht\hvCaptionBox+\wd\hvObjectBox+2\hvSet@bindCorrection%
@@ -32,6 +31,7 @@
% \savebox\hv@leftBox{\clipbox*{0 0 \the\hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}}%
% \savebox\hv@rightBox{\clipbox*{\the\hv@leftPageObjectWidth{} \depth{} \width{} \height}{\usebox\hvObjectBox}}%
% \expandafter\captionsetup\expandafter{\hv@caption@format}%
+ \checkoddpage
\ifoddpage
\hvfloat@typeout{do@hvFloat@doubleFULLPAGE: oddpage}%
\ifcase\hv@@capPos % =0 Caption before
@@ -451,6 +451,7 @@
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep}%-0.5\baselineskip%
\if@twoside
\hvfloat@typeout{>>>> setPageObject/FULLPAGE/twoside}%
+ \checkoddpage
\ifoddpage
\hvfloat@typeout{>>>> setPageObject/FULLPAGE/twoside/oddpage (\thepage)}%
\hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}%
diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat-2.inc b/macros/latex/contrib/hvfloat/latex/hvfloat-2.inc
index 9c27dc88b4..a6c498e2b3 100644
--- a/macros/latex/contrib/hvfloat/latex/hvfloat-2.inc
+++ b/macros/latex/contrib/hvfloat/latex/hvfloat-2.inc
@@ -16,7 +16,7 @@
\expandafter\global\expandafter\savebox\expandafter\hvObjectBox\expandafter{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\expandafter\global\expandafter\savebox\expandafter\hv@boxLeftPage\expandafter{\clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}}%
\expandafter\global\expandafter\savebox\expandafter\hv@boxRightPage\expandafter{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height}{\usebox\hvObjectBox}}%
- %\checkoddpage
+ \checkoddpage
\ifoddpage
\hvfloat@typeout{do@hvFloat@doublePAGE: oddpage}%
\if@twocolumn
diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat-3.inc b/macros/latex/contrib/hvfloat/latex/hvfloat-3.inc
index 8b394e4fe9..d3544cbe3e 100644
--- a/macros/latex/contrib/hvfloat/latex/hvfloat-3.inc
+++ b/macros/latex/contrib/hvfloat/latex/hvfloat-3.inc
@@ -45,7 +45,7 @@
\ifhv@forceOutput
\do@hvFloat@doublePAGECaptionRight{#1}% no cheque
\else
- %\checkoddpage
+ \checkoddpage
\ifoddpage
\hvfloat@typeout{do@hvFloat@doublePage:oddpage}%
\if@twocolumn
@@ -54,11 +54,15 @@
\hvfloat@typeout{do@hvFloat@doublePage:oddpage->twocolumn->firstcolumn}%
\ifhv@switchType
\hvfloat@typeout{hvfloat: switched to floattype p}%
- \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \do@hvFloat@doublePAGECaptionRight{#1}}%
\else
\hvfloat@typeout{calling do@hvFloat@doublePageCaptionRight}%
- %\afterpage{
- \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%}%
+ %\afterpage{%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \do@hvFloat@doublePageCaptionRight{#1}}%}%
\fi
\else
% \hvfloat@typeout{do@hvFloat@doublePage:oddpage->twocolumn->secondcolumn}%
@@ -68,7 +72,9 @@
\ifhv@switchType
\do@hvFloat@doublePAGECaptionRight{#1}%
\else
- \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \do@hvFloat@doublePageCaptionRight{#1}}%
\fi
\fi
\fi
@@ -82,7 +88,9 @@
\ifhv@forceLeft
\do@hvFloat@doublePageCaptionRight{#1}% no \afterpage
\else
- \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \do@hvFloat@doublePageCaptionRight{#1}}%
\fi
\fi
\fi
@@ -112,30 +120,44 @@
\if@twocolumn
\if@firstcolumn
\ifhv@switchType
- \afterpage{\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}%
+ \afterpage{\afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \do@hvFloat@doublePAGECaptionRight{#1}}}%
\else
- \afterpage{\afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}}%
+ \afterpage{\afterpage{\afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \do@hvFloat@doublePageCaptionRight{#1}}}}%
\fi
\else% second column
\ifhv@switchType
- \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \do@hvFloat@doublePAGECaptionRight{#1}}%
\else
%\afterpage{
- \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%}%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \do@hvFloat@doublePageCaptionRight{#1}}%}%
\fi
\fi
\else% onecolumn
\hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn -> (\thepage)}%
\ifhv@switchType
\hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn/switchType -> (\thepage)}%
- \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \do@hvFloat@doublePAGECaptionRight{#1}}%
\else
\hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn/noSwitchType -> (\thepage)}%
\ifhv@forceLeft
\hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn/noSwitchType/forceLeft -> (\thepage)}%
- \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \do@hvFloat@doublePageCaptionRight{#1}}%
\else
- \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
+ \afterpage{\afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \do@hvFloat@doublePageCaptionRight{#1}}}%
\fi
\fi
\fi
diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat.sty b/macros/latex/contrib/hvfloat/latex/hvfloat.sty
index a5a5e51c65..5c4539a9b2 100644
--- a/macros/latex/contrib/hvfloat/latex/hvfloat.sty
+++ b/macros/latex/contrib/hvfloat/latex/hvfloat.sty
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.sty 876 2024-03-03 14:04:56Z herbert $
+%% $Id: hvfloat.sty 879 2024-03-17 10:44:09Z herbert $
%%
%%
%% IMPORTANT NOTICE:
@@ -16,8 +16,8 @@
%% `hvfloat' offers rotating of captions and objects for floats
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.48}
-\def\filedate{2024/03/03}
+\def\fileversion{2.49}
+\def\filedate{2024/03/17}
\ProvidesPackage{hvfloat}[\filedate\space v\fileversion\space special floating objects (hv)]
\let\hvFloatFileVersion\fileversion
%
@@ -58,6 +58,7 @@
\RequirePackage{zref-savepos}
\newdimen\@tempx
\newdimen\@tempy
+\newcounter{hvfloat@testCtr}
\newcounter{hvfloat@ref}
\renewcommand\thehvfloat@ref{tmp@\arabic{hvfloat@ref}}
\setcounter{hvfloat@ref}{0}
@@ -196,6 +197,9 @@
\define@boolkey{hvSet}[hv@]{twoColumnCaption}[true]\global\@nameuse{hv@twoColumnCaption#1}{}% Write the caption only as text
\define@boolkey{hvSet}[hv@]{sameHeight}[true]{\@nameuse{hv@sameHeight#1}}% Write the caption only as text
\define@boolkey{hvSet}[hv@]{Debug}[true]{}% give more infos in the terminal
+\define@boolkey{hvSet}[hv@]{test}[true]{}% use of the hvOBox contents
+
+\def\test@typeout#1{\ifhv@test\typeout{>>>test\thehvfloat@testCtr:>#1}\fi}
\newif\ifhv@fullpage
\newif\ifhv@FULLPAGE
@@ -531,12 +535,13 @@
\def\hvFloat{\@ifnextchar*% Main macro
- {\checkoddpage\global\hv@startrue\hv@maxImageWidth=\textwidth\hvFloat@i}%
- {\checkoddpage\global\hv@starfalse\hv@maxImageWidth=\columnwidth\hvFloat@i*}%
+ {\global\hv@startrue\hv@maxImageWidth=\textwidth\hvFloat@i}%
+ {\global\hv@starfalse\hv@maxImageWidth=\columnwidth\hvFloat@i*}%
}
\def\hvFloat@i*{\@ifnextchar[{\do@hvFloat}{\do@hvFloat[]}}
\def\do@hvFloat[#1]{%
+ \ifhv@Debug\marginnote{\textbf{hvFloat}}\fi%
%\marginnote{\textbf{hvFloat}}%
\savebox\hvObjectBox{}%
\begingroup
@@ -553,6 +558,9 @@
\setcounter{hv@tempCNTtabB}{\value{table}}%
\gdef\hv@save@setting{#1}% for later use after \endgroup inside figure/table env
\ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi
+ \global\stepcounter{hvfloat@ref}%
+ \test@typeout{>>>test:>hvfloat@ref \thehvfloat@ref}%
+ \global\stepcounter{hvfloat@testCtr}% use anyway, it's only for debugging
\ifx\hv@caption@format\@empty\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
\ifx\hv@subcaption@format\@empty\else
\expandafter
@@ -608,7 +616,6 @@
}
\ExplSyntaxOff
-
\newcount\hv@cnta
\newcount\hv@cntb
@@ -623,7 +630,8 @@
\xdef\hv@save@setting{\hv@save@setting}% for later use after \endgroup inside figure/table env
\fi
% \xdef\hv@floatListOfExt{\@nameuse{ext@\hv@floatType}}%
- \gdef\hv@floatObject{#3}%
+ \ifhv@useOBox\gdef\hv@floatObject{\usebox\hvOBox}\else\gdef\hv@floatObject{#3}\fi
+% \gdef\hv@floatObject{#3}%
\@ifnextchar[{\do@@hvFloat}{\do@@hvFloat[]}%
}
@@ -644,7 +652,7 @@
\ifhv@FULLPAGE
\hvfloat@typeout{>>>> do@@hvFloat: FULLPAGE true}%
\def\hvSet@CapWidth{n}% relative value
- \do@@@@hvFloat% fullpage with caption on other page
+ \do@@@@hvFloat% FULLPAGE with caption on other page
\else
\ifhv@doubleFULLPAGE
\hvfloat@typeout{>>>> do@@hvFloat: doubleFULLPAGE true}%
@@ -702,7 +710,7 @@
}%
}%
\fi
- \ifhv@useOBox\global\savebox\hvOBox{}\fi
+% \ifhv@useOBox\global\savebox\hvOBox{}\fi%%%%%%%%%%%%%
\setlength\hvObjectWidth{\wd\hvObjectBox}%
%
% Now we save the caption with its defined \hvCapWidth
@@ -844,15 +852,16 @@
\begin{\hv@floatType}% Start the floating environment
\fi
\fi
- \checkoddpage
\ifx\hvSet@objectPos\hv@Right\raggedleft\fi
\ifx\hvSet@objectPos\hv@Center
\ifhv@nonFloat\hspace*{\fill}\else\centering\fi
\fi
\ifx\hvSet@objectPos\hv@Outer
+ \checkoddpage
\ifoddpage\raggedleft\fi
\fi
\ifx\hvSet@objectPos\hv@Inner
+ \checkoddpage
\ifoddpage\else\raggedleft\fi
\fi
%
@@ -876,9 +885,11 @@
\hv@@capPos=3
\else
\ifx\hvSet@capPos\hv@Inner
+ \checkoddpage
\ifoddpageoroneside\hv@@capPos=0\else\hv@@capPos=2\fi
\else
\ifx\hvSet@capPos\hv@Outer
+ \checkoddpage
\ifoddpage\hv@@capPos=2\else\hv@@capPos=0\fi
% \ifoddpageoroneside\hv@@capPos=2\else\hv@@capPos=0\fi
% even page (left=0) | odd page (oneside) (right=2)
@@ -897,7 +908,7 @@
\fi
\fi
%%%%
-%\typeout{>>>>>>>>>Pos: \the\hv@@capPos}%
+\test@typeout{>>>>>>>>>Pos: \the\hv@@capPos}%
\savebox{\@tempboxa}{% ***** @tempbox start
\expandafter%
\ifcase\the\hv@@capPos % 0 is LEFT START \ifcase
@@ -984,6 +995,7 @@
% now we rotate the object and caption, if needed
%
\ifhv@wide
+ \checkoddpage
\ifoddpageoroneside
\if@twocolumn
\if@firstcolumn
@@ -992,6 +1004,7 @@
\fi
\fi
\else
+ \checkoddpage
\ifoddpage
\if@twocolumn
\if@firstcolumn
@@ -1042,7 +1055,7 @@
\global\savebox\hvObjectBox{\rotatebox{\hvSet@objectAngle}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}}%
\fi
\setlength\hvObjectWidth{\wd\hvObjectBox}%
- \ifhv@useOBox\global\savebox\hvOBox{}\fi
+ %%%\ifhv@useOBox\global\savebox\hvOBox{}\fi%%%%%%%%%%%%%%%%%%%
%
% Now we save the caption with its defined \hvCapWidth
%
@@ -1115,11 +1128,10 @@
\ifx\hvSet@floatPos\@empty \else\@namedef{fps@\hv@floatType}{\hvSet@floatPos}\fi
\noindent
\begingroup% Start the nonfloat part
- %\checkoddpage
\ifx\hvSet@objectPos\hv@Right \raggedleft\fi
\ifx\hvSet@objectPos\hv@Center \hspace*{\fill}\fi
- \ifx\hvSet@objectPos\hv@Outer \ifoddpage\raggedleft\fi\fi
- \ifx\hvSet@objectPos\hv@Inner \ifoddpage\else\raggedleft\fi\fi
+ \ifx\hvSet@objectPos\hv@Outer \checkoddpage\ifoddpage\raggedleft\fi\fi
+ \ifx\hvSet@objectPos\hv@Inner \checkoddpage\ifoddpage\else\raggedleft\fi\fi
%
% to rotate object and caption together, we save all in another box
% the caption comes first, if its on the left or the top
@@ -1128,6 +1140,7 @@
% 2 caption right, inner and even page, oneside outer
% 3 caption bottom
%
+% \checkoddpage
\ifx\hvSet@capPos\hv@Left \hv@@capPos=0
\else
\ifx\hvSet@capPos\hv@Top \hv@@capPos=1
@@ -1136,9 +1149,9 @@
\else
\ifx\hvSet@capPos\hv@Bottom \hv@@capPos=3
\else
- \ifx\hvSet@capPos\hv@Inner \ifoddpageoroneside\hv@@capPos=0\else\hv@@capPos=2\fi
+ \ifx\hvSet@capPos\hv@Inner \checkoddpage\ifoddpageoroneside\hv@@capPos=0\else\hv@@capPos=2\fi
\else
- \ifx\hvSet@capPos\hv@Outer \ifoddpage\hv@@capPos=2\else\hv@@capPos=0\fi
+ \ifx\hvSet@capPos\hv@Outer \checkoddpage\ifoddpage\hv@@capPos=2\else\hv@@capPos=0\fi
% \ifoddpageoroneside\hv@@capPos=2\else\hv@@capPos=0\fi
% even page (left=0) | odd page (oneside) (right=2)
\else
@@ -1154,7 +1167,7 @@
\fi
\fi
%%%%
-%\typeout{>>>>>>>>>Pos: \the\hv@@capPos}%
+\test@typeout{>>>>>>>>>Pos: \the\hv@@capPos}%
\savebox{\@tempboxa}{% ***** @tempbox start
\expandafter\ifcase\the\hv@@capPos % 0 is LEFT START \ifcase
\ifx\hvSet@capVPos\hv@Center
@@ -1247,7 +1260,8 @@
\let\clist@count@N\clist_count:N
\ExplSyntaxOff
-\def\do@@@@hvFloat{% special float page: caption <-> fullpage images
+\def\do@@@@hvFloat{% special float page: caption <-> FULLPAGE images
+% \ifhv@useOBox\gdef\hv@floatObject{\usebox\hvOBox}\fi
\hvfloat@typeout{>>>do@@@@hvFloat: special float page}%
\ifx\hvSet@capPos\hv@After \global\hv@@capPos=1
\else
@@ -1259,9 +1273,9 @@
\else
\ifx\hvSet@capPos\hv@Outer \global\hv@@capPos=5
\else
- \ifx\hvSet@capPos\hv@Right \global\hv@@capPos=6% only for twocolumn mode
+ \ifx\hvSet@capPos\hv@Right \global\hv@@capPos=6 % only for twocolumn mode
\else
- \ifx\hvSet@capPos\hv@Left \global\hv@@capPos=7% only for twocolumn mode
+ \ifx\hvSet@capPos\hv@Left \global\hv@@capPos=7 % only for twocolumn mode
\else
\global\hv@@capPos=0
\fi
@@ -1272,9 +1286,10 @@
\fi
\fi
\hvfloat@typeout{>>>do@@@@hvFloat: hv@capPos is \the\hv@@capPos}%
- %\checkoddpage
+% \checkoddpage
\hvfloat@typeout{>>>do@@@@hvFloat: set floattype}%
\set@caption@object{\hv@floatType}% set caption and object into a box
+%
\ifcase\hv@@capPos% caption before object 0-> _always_ left
\hvfloat@typeout{>>>do@@@@hvFloat: setBottomCaption and setPageObject (0)}%
\setBottomCaption\setPageObject
@@ -1282,9 +1297,13 @@
\hvfloat@typeout{>>>do@@@@hvFloat: setPageObject and setBottomCaption (1)}%
\setPageObject\setBottomCaption
\or% caption on even page 2-> left page
+ \checkoddpage
\ifoddpage
\hvfloat@typeout{>>>do@@@@hvFloat: afterpage-> oddpage/setBottomCaption and setPageObject (2)}%
- \afterpage{\setBottomCaption\setPageObject}%
+ \afterpage{%
+ \setBottomCaption
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \setPageObject}%
\else% we are on an even page
\hvfloat@typeout{>>>do@@@@hvFloat: evenpage/setBottomCaption and setPageObject (2)}%
\setBottomCaption\setPageObject
@@ -1294,6 +1313,7 @@
\hvfloat@typeout{>>>do@@@@hvFloat: twoside and caption on oddpage (3)}%
\if@twocolumn
\hvfloat@typeout{>>>do@@@@hvFloat: twoside/twocolumn and caption on oddpage (3)}%
+ \checkoddpage
\ifoddpage
\hvfloat@typeout{>>>do@@@@hvFloat: twoside/twocolumn/oddpage and caption on oddpage (3)}%
\if@firstcolumn% on right side
@@ -1301,13 +1321,16 @@
\setBottomCaption\setPageObject
\else
\hvfloat@typeout{>>>do@@@@hvFloat: afterpage->twoside/twocolumn/oddpage/secondcolumn and caption on oddpage (3)}%
- \afterpage{\setPageObject\setBottomCaption}% start next column
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \setPageObject\setBottomCaption}% start next column
\fi
\else% left (even) page
\hvfloat@typeout{>>>do@@@@hvFloat: twoside/twocolumn/oddpage and caption on evenpage (3)}%
\if@firstcolumn
\hvfloat@typeout{>>>do@@@@hvFloat: afterpage->twoside/twocolumn/evenpage/firstcolumn and caption on oddpage (3)}%
- \afterpage{\setPageObject\setBottomCaption}% start next column
+ \afterpage{\global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \setPageObject\setBottomCaption}% start next column
\else
\hvfloat@typeout{>>>do@@@@hvFloat: twoside/twocolumn/evenage/secondcolumn and caption on oddpage (3)}%
\setPageObject\setBottomCaption
@@ -1315,18 +1338,22 @@
\fi
\else% onecolumn
\hvfloat@typeout{>>>do@@@@hvFloat: twoside/onecolumn and caption on oddpage (3)}%
+ \checkoddpage
\ifoddpage
\hvfloat@typeout{>>>do@@@@hvFloat: twoside/onecolumn/oddpage and caption on oddpage (3)}%
\setPageObject\setBottomCaption
\else% even page
\hvfloat@typeout{>>>do@@@@hvFloat: afterpage->twoside/onecolumn/evenpage and caption on oddpage (3)}%
- \afterpage{\setPageObject\setBottomCaption}%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \setPageObject\setBottomCaption}%
\fi
\fi
\else% oneside
\hvfloat@typeout{>>>do@@@@hvFloat: oneside and caption on oddpage (3)}%
\if@twocolumn
\hvfloat@typeout{>>>do@@@@hvFloat: oneside/twocolumn and caption on oddpage (3)}%
+ \checkoddpage
\ifoddpage
\hvfloat@typeout{>>>do@@@@hvFloat: oneside/twocolumn/oddpage and caption on oddpage (3)}%
\if@firstcolumn% on right side
@@ -1340,7 +1367,9 @@
\hvfloat@typeout{>>>do@@@@hvFloat: oneside/twocolumn/evenpage and caption on oddpage (3)}%
\if@firstcolumn% on left side
\hvfloat@typeout{>>>do@@@@hvFloat: afterpage->oneside/twocolumn/evenpage/firstcolumn and caption on oddpage (3)}%
- \afterpage{\setPageObject\setBottomCaption}%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \setPageObject\setBottomCaption}%
\else
\hvfloat@typeout{>>>do@@@@hvFloat: oneside/twocolumn/evenpage/secondcolumn and caption on oddpage (3)}%
\setPageObject\setBottomCaption
@@ -1348,12 +1377,15 @@
\fi
\else % onecolumn
\hvfloat@typeout{>>>do@@@@hvFloat: oneside/onecolumn and caption on oddpage (3)}%
+ \checkoddpage
\ifoddpage
\hvfloat@typeout{>>>do@@@@hvFloat: oneside/onecolumn/oddpage and caption on oddpage (3)}%
- \setBottomCaption\setPageObject
+ \setBottomCaption\setPageObject%
\else
\hvfloat@typeout{>>>do@@@@hvFloat: afterpage->oneside/onecolumn/evenpage and caption on oddpage (3)}%
- \afterpage{\setBottomCaption\setPageObject}%
+ \afterpage{\setBottomCaption
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \setPageObject}%
\fi
\fi
\fi
@@ -1361,11 +1393,12 @@
% \set@caption@object
\if@twocolumn
\hvfloat@typeout{>>>do@@@@hvFloat: twocolumn and caption on inner column (4)}%
+ \checkoddpage
\ifoddpage
\hvfloat@typeout{>>>do@@@@hvFloat: twoside/oddpage and caption on inner column (4)}%
\if@firstcolumn% on right side
\hvfloat@typeout{>>>do@@@@hvFloat: twoside/oddpage/firstcolumn and caption on inner column (4)}%
- \setBottomCaption\setPageObject
+ \setBottomCaption\setPageObject
\else % right column on right side
\hvfloat@typeout{>>>do@@@@hvFloat: twoside/oddpage/secondcolumn and caption on inner column (4)}%
\setPageObject\setBottomCaption% start next firstcolumn next page
@@ -1374,7 +1407,10 @@
\hvfloat@typeout{>>>do@@@@hvFloat: twoside/evenpage and caption on inner column (4)}%
\if@firstcolumn% on left side
\hvfloat@typeout{>>>do@@@@hvFloat: afterpage^2 -> twoside/evenpage/firstcolumn and caption on inner column (4)}%
- \afterpage{\afterpage{\setBottomCaption\setPageObject}}% start next page/first column
+ \afterpage{\afterpage{%
+ \setBottomCaption
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \setPageObject}}% start next page/first column
\else% left page/column
\hvfloat@typeout{>>>do@@@@hvFloat: twoside/evenpage/secondcolumn and caption on inner column (4)}%
\setBottomCaption\setPageObject% start on same page/column
@@ -1388,14 +1424,20 @@
% \set@caption@object
\if@twocolumn
\hvfloat@typeout{>>>do@@@@hvFloat: twocolumn and caption on outer column (5)}%
+ \checkoddpage
\ifoddpage
\hvfloat@typeout{>>>do@@@@hvFloat: twocolumn/oddpage and caption on outer column (5)}%
\if@firstcolumn
\hvfloat@typeout{>>>do@@@@hvFloat: afterpage^2 -> firstcolumn/oddpage/twocolumn and caption on outer column (5)}%
- \afterpage{\afterpage{\setBottomCaption\setPageObject}}%
+ \afterpage{\afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \setBottomCaption\setPageObject}}%
\else
\hvfloat@typeout{>>>do@@@@hvFloat: afterpage -> twocolumn/oddpage/secondcolumn and caption on outer column (5)}%
- \afterpage{\setBottomCaption\setPageObject}%
+ \afterpage{%
+ \setBottomCaption
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \setPageObject}%
\fi
\else% even page (left)
\hvfloat@typeout{>>>do@@@@hvFloat: twocolumn/evenpage and caption on outer column (5)}%
@@ -1415,7 +1457,9 @@
\hvfloat@typeout{>>>do@@@@hvFloat: twocolumn and caption after object (6)}%
\if@firstcolumn
\hvfloat@typeout{>>>do@@@@hvFloat: afterpage -> twocolumn/firstcolumn and caption after object (6)}%
- \afterpage{\setPageObject\setBottomCaption}%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \setPageObject\setBottomCaption}%
\else
\hvfloat@typeout{>>>do@@@@hvFloat: twocolumn/secondcolumn and caption after object (6)}%
\setPageObject\setBottomCaption
@@ -1432,7 +1476,10 @@
\setBottomCaption\setPageObject
\else
\hvfloat@typeout{>>>do@@@@hvFloat: afterpage -> twocolumn/secondcolumn and caption before object (7)}%
- \afterpage{\setBottomCaption\setPageObject}%
+% \global\savebox\hvObjectBox{\hv@floatObject}%
+ \afterpage{%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \setBottomCaption\setPageObject}%
\fi
\else% onecolumn -> same as before
\hvfloat@typeout{>>>do@@@@hvFloat: onecolumn and caption before object (7)}%
@@ -1441,7 +1488,6 @@
\fi
\endgroup% startet at main \hvFloat
}
-%
\newsavebox\hv@boxLeftPage
\newsavebox\hv@boxRightPage
diff --git a/macros/latex/contrib/snaptodo/README b/macros/latex/contrib/snaptodo/README
index 37da2cd92f..b5ec6cf6a1 100644
--- a/macros/latex/contrib/snaptodo/README
+++ b/macros/latex/contrib/snaptodo/README
@@ -4,7 +4,7 @@
https://github.com/Symbol1/snaptodo
Hsin-Po Wang
-mailto:a.simple.people@gmail.com
+a.simple.people@gmail.com
https://www.symbol.codes
This is snaptodo package,
@@ -16,7 +16,7 @@ from which it differs in the following ways:
whichever is closer.
* The notes bump each other down so they never overlap;
the lines never overlap either.
-* Minimalistic, aesthetic and customizable style.
+* Minimalistic, aesthetic, and customizable style.
License
https://www.latex-project.org/lppl/lppl-1-3c/
diff --git a/macros/latex/contrib/snaptodo/snaptodo.pdf b/macros/latex/contrib/snaptodo/snaptodo.pdf
index cd719dd451..76d184842e 100644
--- a/macros/latex/contrib/snaptodo/snaptodo.pdf
+++ b/macros/latex/contrib/snaptodo/snaptodo.pdf
Binary files differ
diff --git a/macros/latex/contrib/snaptodo/snaptodo.sty b/macros/latex/contrib/snaptodo/snaptodo.sty
index 489cd22888..d9add1f0e4 100644
--- a/macros/latex/contrib/snaptodo/snaptodo.sty
+++ b/macros/latex/contrib/snaptodo/snaptodo.sty
@@ -1,10 +1,9 @@
-
% # snaptodo
%
% https://github.com/Symbol1/snaptodo
%
% Hsin-Po Wang
-% mailto:a.simple.people@gmail.com
+% a.simple.people@gmail.com
% https://www.symbol.codes
%
% This is snaptodo.sty,
@@ -16,23 +15,22 @@
% whichever is closer.
% * The notes bump each other so they never overlap;
% the lines never overlap either.
-% * Minimalistic, aesthetic and customizable style.
+% * Minimalistic, aesthetic, and customizable style.
%
% License
% https://www.latex-project.org/lppl/lppl-1-3c/
+\NeedsTeXFormat{LaTeX2e}[2023/10/24]
-\NeedsTeXFormat{LaTeX2e}[2021/06/01]
-
-\ProvidesPackage{snaptodo}[2021/11/25]
+\ProvidesPackage{snaptodo}[2024/03/16]
\RequirePackage{tikzpagenodes}[2012/09/16]
\ifx\snaptodo\snaptodo@undefined
\else
\PackageWarning{snaptodo}{%
- Control sequence \protect\snaptodo\space was defined.\MessageBreak
- I am going to override it anyways.
+ Control sequence \protect\snaptodo\space was defined.
+ \MessageBreak I am going to override it anyways.
}
\fi
@@ -43,20 +41,21 @@
}
\def\snaptodo@initialize{%
- \tikz[overlay]
- \node(snaptodo@margin@left){}
- node(snaptodo@margin@right){}
- coordinate(snaptodo@baseline@left){}
- coordinate(snaptodo@baseline@right){}
- coordinate(snaptodo@descent@left){}
- coordinate(snaptodo@descent@right){}
- ;%
+ \tikz[overlay]{
+ \node(snaptodo@margin@left){};
+ \node(snaptodo@margin@right){};
+ \coordinate(snaptodo@baseline@left);
+ \coordinate(snaptodo@baseline@right);
+ \coordinate(snaptodo@descent@left);
+ \coordinate(snaptodo@descent@right);
+ \xdef\snaptodo@page{0}
+ }%
}
\def\snaptodo@main{%
\pgfutil@ifnextchar[
{\snaptodo@main@opt}
- {\snaptodo@main@opt[]}%]
+ {\snaptodo@main@opt[]}
}
\def\snaptodo@main@opt[#1]#2{%
@@ -75,13 +74,13 @@
\def\std@eastwest{east}
\def\std@leftright{left}
\def\std@rightleft{right}
- \def\std@plusminus{+}
+ \def\std@minusplus{-}
\else
\def\std@westeast{east}
\def\std@eastwest{west}
\def\std@leftright{right}
\def\std@rightleft{left}
- \def\std@plusminus{-}
+ \def\std@minusplus{+}
\fi
}
@@ -91,19 +90,21 @@
\node(snaptodo@margin@\std@leftright)[
/snaptodo/margin@block,
/snaptodo/margin block/.try,
- /utils/exec={
- \let\tikz@transform=\snaptodo@margin@block@transform
- }
+ /utils/exec={\let\tikz@transform=\snaptodo@margin@block@transform}
]{#1};
}
\def\snaptodo@margin@block@transform{
- \pgftransformshift{\pgfpoint{\std@descent@xpt}0}
- \pgftransformshift{\pgfpoint{-\std@plusminus\marginparsep}0}
+ \pgftransformxshift{\std@descent@xpt}
+ \pgftransformxshift{\std@minusplus\marginparsep}
\pgfpointanchor{snaptodo@baseline@\std@leftright}{center}
- \ifdim\pgf@y<0pt\else
+ \ifnum\numexpr\snaptodo@page+1<\c@page
+ \pgftransformyshift{\std@blockrise}
+ \else\ifdim\pgf@y<0pt
+ \pgftransformyshift{\std@blockrise}
+ \else
\pgfpointanchor{snaptodo@margin@\std@leftright}{south}
- \pgftransformshift{\pgfpoint0{min(
+ \pgftransformyshift{min(
\std@blockrise
,
\pgf@y
@@ -111,8 +112,9 @@
-\dp\pgfnodeparttextbox
-2*\pgfkeysvalueof{/pgf/inner ysep}
-\std@blocksep
- )}}
- \fi
+ )}
+ \fi\fi
+ \xdef\snaptodo@page{\the\c@page}
}
\def\snaptodo@dipict@call@chain{
@@ -128,12 +130,12 @@
\def\snaptodo@dipict@call@chain@drawer{
\draw[/snaptodo/call@chain,/snaptodo/call chain/.try]
- (0,\std@chainsep)--
- (0,0)coordinate(snaptodo@baseline@\std@leftright){}--
- (0,\std@descent@y pt)coordinate(snaptodo@descent@\std@leftright){}--
- (\std@descent@xpt,\std@descent@y pt)--
- (snaptodo@margin@\std@leftright.south \std@eastwest)--
- (snaptodo@margin@\std@leftright.south \std@westeast)
+ (0,\std@chainsep)
+ --(0,0)coordinate(snaptodo@baseline@\std@leftright){}
+ --(0,\std@descent@y pt)coordinate(snaptodo@descent@\std@leftright){}
+ --(\std@descent@xpt,\std@descent@y pt)
+ --(snaptodo@margin@\std@leftright.south \std@eastwest)
+ --(snaptodo@margin@\std@leftright.south \std@westeast)
;
}
diff --git a/macros/latex/contrib/snaptodo/snaptodo.tex b/macros/latex/contrib/snaptodo/snaptodo.tex
index 07f091561a..49dc937f54 100644
--- a/macros/latex/contrib/snaptodo/snaptodo.tex
+++ b/macros/latex/contrib/snaptodo/snaptodo.tex
@@ -1,231 +1,237 @@
-
\documentclass{article}
-
-\def\snaptodo{}
\usepackage{snaptodo}
-
-\usepackage[pdfusetitle,urlbordercolor=red!50!black]{hyperref}
+\usepackage[colorlinks, allcolors=red!50!black]{hyperref}
+\def\email#1{\href{mailto:#1}{\ttfamily #1}}
+\def\snaptodocommand{{\ttfamily\color{red!50!black}\string\snaptodo}}
\begin{document}
-\title{Snaptodo---A todo that snaps to the closer side\thanks{
- Repository
- \url{https://github.com/Symbol1/snaptodo}.
-}}
+ \title
+ {Snaptodo---A todo that snaps to the closer side\thanks
+ {Repository \url{https://github.com/Symbol1/snaptodo}.} }
-\author{Hsin-Po Wang\thanks{
- Email
- \href{mailto:a.simple.people@gmail.com}
- {\ttfamily a.simple.people@gmail.com}.
- Website
- \url{https://www.symbol.codes}.}}
+ \author
+ {Hsin-Po Wang\thanks
+ {Email \email{a.simple.people@gmail.com}.
+ Website \url{https://www.symbol.codes}.}}
-\date{November 25, 2021}
+ \date{March 16, 2024}
-\maketitle
+ \maketitle
\begin{abstract}
- Snaptodo package is an alternative to todonote package,
- from which it differs in the following ways:
- (A) Depending on where you call
- {\ttfamily\color{red!50!black}\string\snaptodo},
- the note is put on the left or right margin,
- whichever is closer.
- (B) The notes bump each other down so they never overlap;
- the lines never overlap either;
- (C) Minimalistic, aesthetic, and customizable style.
+ Snaptodo package is an alternative to todonote package,
+ from which it differs in the following ways:
+ (A) Depending on where you call \snaptodocommand,
+ the note is put on the left or right margin,
+ whichever is closer.
+ (B) The notes bump each other down so they never overlap;
+ the lines never overlap either;
+ (C) Minimalistic, aesthetic, and customizable style.
\end{abstract}
\section{Installation}
- Copy and paste
- {\ttfamily\verb|snaptodo.sty|}
- to your working directory.
+ Copy and paste
+ {\ttfamily\verb|snaptodo.sty|}
+ to your working directory.
\section{Minimal Working Example}
- \begin{verbatim}
- \documentclass{article}
- \usepackage{snaptodo}
- \begin{document}
- Your done
- \snaptodo{Your todo}
- \end{document}
- \end{verbatim}
+ \begin{verbatim}
+ \documentclass{article}
+ \usepackage{snaptodo}
+ \begin{document}
+ Your done
+ \snaptodo{Your todo}
+ \end{document}
+ \end{verbatim}
\section{Showcase of Examples}
- Using snaptodo is as simple as calling
- {\ttfamily\verb|\snaptodo|}%
- \snaptodo{Calling \texttt{\string\snaptodo}!}
- and compile twice.%
- \snaptodo{Compile twice!}
- If the calling point%
- \snaptodo{Calling point!}
- is on the left of a page,%
- \snaptodo{Left of a page!}
- the todo note---after compiling twice of
- course---will appear to the left margin.%
- \snaptodo{On the left margin!}
- And vice versa.%
- \snaptodo{Vice versa!}
+ Using snaptodo is as simple as calling \snaptodocommand%
+ \snaptodo{Calling \snaptodocommand!}
+ and compile twice.%
+ \snaptodo{Compile twice!}
+ If the calling point%
+ \snaptodo{Calling point!}
+ is on the left of a page,%
+ \snaptodo{Left of a page!}
+ the todo note---after compiling twice of
+ course---will appear on the left margin.%
+ \snaptodo{On the left margin!}
+ And vice versa.%
+ \snaptodo{Vice versa!}
\section{Customization}
- I defined
- {\ttfamily\verb|\snaptodoset|}
- that works like
- {\ttfamily\verb|\tikzset|} and
- {\ttfamily\verb|\pgfplotsset|}.
- While you can access dedicated options by
- {\ttfamily\verb|\snaptodoset{<some_option>}|},
- you can also assess the exact same options by
- {\ttfamily\verb|\pgfkeys{/snaptodo/<some_option>}|}.
- For local changes, you can put them here
- {\ttfamily\verb|\snaptodo[<some_option>]{}|}.
+ I defined
+ {\ttfamily\verb|\snaptodoset|}
+ that works like
+ {\ttfamily\verb|\tikzset|} and
+ {\ttfamily\verb|\pgfplotsset|}.
+ While you can access dedicated options by
+ {\ttfamily\verb|\snaptodoset{<some_option>}|},
+ you can also access the exact same options by
+ {\ttfamily\verb|\pgfkeys{/snaptodo/<some_option>}|}.
+ For local changes, you can put them here
+ {\ttfamily\verb|\snaptodo[<some_option>]{}|}.
\subsection{Color}
- The color of the broken line is
- {\ttfamily\verb|snaptodo@chain|}.
- The default color for that is
- {\ttfamily\verb|red!50!black|}.
- Saying
- {\ttfamily\verb|\colorlet{snaptodo@chain}{green!50!white}|}
- lets you to change this color globally. On the other hand,
- for locally changing this color, one may prefer
- {\ttfamily\verb|\snaptodo[call chain/.style=green!50!white]{}|}.%
- \snaptodo[call chain/.style=green!50!white]{New broken line color}
-
- The color of the note text is
- {\ttfamily\verb|snaptodo@block|}.
- The default color for that is
- {\ttfamily\verb|yellow!50!black|}.
- Saying
- {\ttfamily\verb|\colorlet{snaptodo@block}{blue!50!white}|}
- lets you change this color. On the other hand,
- for locally changing this color, one may prefer
- {\ttfamily\verb|\snaptodo[margin block/.style=blue!50!white]{}|}.%
- \snaptodo[margin block/.style=blue!50!white]{New note text color}
+ The color of the broken line is
+ {\ttfamily\verb|snaptodo@chain|}.
+ The default color for that is
+ {\ttfamily\verb|yellow!50!black|}.
+ Saying
+ {\ttfamily\verb|\colorlet{snaptodo@chain}{green!50!white}|}
+ lets you to change this color globally. On the other hand,
+ to change this color locally, you can do
+ {\ttfamily\verb|\snaptodo[call chain/.style=green!50!white]{}|}.%
+ \snaptodo[call chain/.style=green!50!white]{New broken line color}
+
+ The color of the note text is
+ {\ttfamily\verb|snaptodo@block|}.
+ The default color for that is
+ {\ttfamily\verb|red!50!black|}.
+ Saying
+ {\ttfamily\verb|\colorlet{snaptodo@block}{blue!50!white}|}
+ lets you change this color. On the other hand,
+ for locally changing this color, you can do
+ {\ttfamily\verb|\snaptodo[margin block/.style=blue!50!white]{}|}.%
+ \snaptodo[margin block/.style=blue!50!white]{New note text color}
\subsection{Line style}
- In order to use a thicker or thinner broken line,
- recall the standard Ti\emph kZ option
- {\ttfamily\verb|[thick]|},
- {\ttfamily\verb|[ultra thin]|},
- or
- {\ttfamily\verb|[line width=???]|}.
- In our case, simply put that option in this style
- \snaptodo[call chain/.style={line width=2pt}]{Thicker broken line}%
- {\ttfamily\verb|\snaptodo[call chain/.style={line width=???}]{}|}.
-
- In order to use a special dash pattern,
- recall the standard Ti\emph kZ option
- {\ttfamily\verb|[dotted]|},
- {\ttfamily\verb|[dashed]|},
- or
- {\ttfamily\verb|[dash pattern=???]|}.
- In our case, simply put that option in this style
- \snaptodo[call chain/.style={dashed}]{Dashed broken line}%
- {\ttfamily\verb|\snaptodo[call chain/.style={dash pattern=???}]{}|}.
+ In order to use a thicker or thinner broken line,
+ recall the standard Ti\emph kZ option
+ {\ttfamily\verb|[thick]|},
+ {\ttfamily\verb|[ultra thin]|},
+ or
+ {\ttfamily\verb|[line width=???]|}.
+ In our case, simply put that option in this style
+ \snaptodo[call chain/.style={line width=2pt}]{Thicker broken line}%
+ {\ttfamily\verb|\snaptodo[call chain/.style={line width=???}]{}|}.
+
+ In order to use a special dash pattern,
+ recall the standard Ti\emph kZ option
+ {\ttfamily\verb|[dotted]|},
+ {\ttfamily\verb|[dashed]|},
+ or
+ {\ttfamily\verb|[dash pattern=???]|}.
+ In our case, simply put that option in this style
+ \snaptodo[call chain/.style={dashed}]{Dashed broken line}%
+ {\ttfamily\verb|\snaptodo[call chain/.style={dash pattern=???}]{}|}.
\subsection{Sep and width}
- The gap between two note blocks is stored in
- {\ttfamily\verb|/snaptodo/block sep|}.
- The default length is
- {\ttfamily\verb|\baselineskip|}.
- Use
- {\ttfamily\verb|\snaptodoset{block sep=0pt}|}
- for global setting and use
- {\ttfamily\verb|\snaptodo[block sep=0pt]{note}|}%
- \snaptodo[block sep=0pt]{2 blocks close.}
- \snaptodo[block sep=0pt]{..to each other}
- for local setting this.
-
- The gap between two horizontal lines is stored in
- {\ttfamily\verb|/snaptodo/chain sep|}.
- The default length is
- {\ttfamily\verb|0.5ex|}.
- To change, use
- {\ttfamily\verb|\snaptodoset{chain sep=0pt}|}
- for global setting and
- {\ttfamily\verb|\snaptodo[chain sep=0pt]{note}|}%
- \snaptodo[chain sep=0pt]{2 chains close.}
- \snaptodo[chain sep=0pt]{..to each other}
- for local setting.
-
- The width of the note block is
- {\ttfamily\verb|\marginparwidth|}.
- The width where the broken line has slope is
- {\ttfamily\verb|\marginparsep|}.
- These are the built-in dimensions.
- (So modify them with care!)
+ The gap between two note blocks is stored in
+ {\ttfamily\verb|/snaptodo/block sep|}.
+ The default length is
+ {\ttfamily\verb|\baselineskip|}.
+ Use
+ {\ttfamily\verb|\snaptodoset{block sep=0pt}|}
+ for global setting and use
+ {\ttfamily\verb|\snaptodo[block sep=0pt]{note}|}%
+ \snaptodo[block sep=0pt]{2 blocks close...}
+ \snaptodo[block sep=0pt]{...to each other}
+ for local setting this.
+
+ The gap between two horizontal lines is stored in
+ {\ttfamily\verb|/snaptodo/chain sep|}.
+ The default length is
+ {\ttfamily\verb|0.5ex|}.
+ To change, use
+ {\ttfamily\verb|\snaptodoset{chain sep=0pt}|}
+ for global setting and
+ {\ttfamily\verb|\snaptodo[chain sep=0pt]{note}|}%
+ \snaptodo[chain sep=0pt]{2 chains close...}
+ \snaptodo[chain sep=0pt]{...to each other}
+ for local setting.
+
+ The width of the note block is
+ {\ttfamily\verb|\marginparwidth|}.
+ The width where the broken line has slope is
+ {\ttfamily\verb|\marginparsep|}.
+ These are the built-in dimensions.
+ (So modify them with care!)
\subsection{Bias}
- The tipping point between snapping to the left versus
- to the right is the center of the page, by default.
- You can change this by
- {\ttfamily\verb|/snaptodo/chain bias=-99in|}.%
- \snaptodo[chain bias=-99in]{Forced to the left}
- That way, all todo notes are forcedly
- snapped to the left hand side. Or, by
- \snaptodo[chain bias=99in]{Forced to the right}%
- {\ttfamily\verb|/snaptodo/call bias=99in|},
- all todo notes are forcedly snapped to the right hand side.
+ The tipping point between snapping to the left versus
+ to the right is the center of the page, by default.
+ You can change this by
+ {\ttfamily\verb|/snaptodo/chain bias=-99in|}.%
+ \snaptodo[chain bias=-99in]{Forced to the left}
+ That way, all todo notes are forcedly
+ snapped to the left hand side. Or, by
+ \snaptodo[chain bias=99in]{Forced to the right}%
+ {\ttfamily\verb|/snaptodo/call bias=99in|},
+ all todo notes are forcedly snapped to the right hand side.
\subsection{Rise}
- If your document is really busy, e.g., like
- {\ttfamily\verb|stress_testing.tex|},
- try setting a positive
- {\ttfamily\verb|/snaptodo/block rise|},%
- \snaptodo[block rise=2em]{Rising}
- \snaptodo[block rise=2em]{to leave}
- \snaptodo[block rise=2em]{room.}
- e.g.,
- {\ttfamily\verb|\snaptodo[block rise=2em]{}|}.
- That way, a note will rise by that amount
- to leave more rooms for later notes.
- (But if there will be overlay,
- the notes automatically bump down.)
+ If your document is really busy, e.g., like
+ {\ttfamily\verb|stress_testing.tex|},
+ try setting a positive
+ {\ttfamily\verb|/snaptodo/block rise|},%
+ \snaptodo[block rise=2em]{Rising}
+ \snaptodo[block rise=2em]{to leave}
+ \snaptodo[block rise=2em]{room.}
+ e.g.,
+ {\ttfamily\verb|\snaptodo[block rise=2em]{}|}.
+ That way, a note will rise by that amount
+ to leave more rooms for later notes.
+ (But if there will be overlay,
+ the notes automatically bump down.)
\subsection{Alignment}
- By
- {\ttfamily\verb|/snaptodo/margin block/.style={align=???}|}
- one can control the alignment of note text.
- The default setting is
- {\ttfamily\verb|align=flush \std@leftright|},
- which flushes the text toward the page edges.
- If
- {\ttfamily\verb|align=flush \std@rightleft|},
- is what you do,%
- \makeatletter
- \snaptodo[margin block/.style={align=flush \std@rightleft}]
- {flush toward text body}
- \makeatother
- the text will be flushed toward the main
- text body. Don't forget that you need
- {\ttfamily\verb|\makeatletter|}
- and
- {\ttfamily\verb|\makeatother|}
- to handel control sequences with the at character.
+ By
+ {\ttfamily\verb|/snaptodo/margin block/.style={align=???}|}
+ you can control the alignment of note text.
+ The default setting is
+ {\ttfamily\verb|align=flush \std@leftright|},
+ which flushes the text toward the page edges.
+ If
+ {\ttfamily\verb|align=flush \std@rightleft|}
+ is what you do,%
+ \makeatletter
+ \snaptodo[margin block/.style={align=flush \std@rightleft}]
+ {flush toward text body}
+ the text will be flushed toward the main text body.%
+ \snaptodo[margin block/.style={align=flush \std@rightleft}]
+ {flush toward text body}
+ Don't forget that you need
+ \makeatother
+ {\ttfamily\verb|\makeatletter|}
+ and
+ {\ttfamily\verb|\makeatother|}
+ to handel control sequences with the at character.
\subsection{Font}
- Font size is controlled by
- \snaptodo[margin block/.style={font=\tiny}]{tiny}
- \snaptodo[margin block/.style={font=\Large}]{Large}
- \snaptodo[margin block/.style={font=\Huge}]{Huge}
- {\ttfamily\verb|/snpatodo/margin block/.style={font=...}|}.
- \snaptodo[margin block/.style={font=\itshape}]{itshape}
- \snaptodo[margin block/.style={font=\sffamily}]{sffamily}
- \snaptodo[margin block/.style={font=\bfseries}]{bfseries}
- So is font family.
+ With
+ \snaptodo[margin block/.style={font=\tiny}]{tiny}
+ \snaptodo[margin block/.style={font=\scriptsize}]{scriptsize}
+ \snaptodo[margin block/.style={font=\footnotesize}]{footnotesize}
+ \snaptodo[margin block/.style={font=\small}]{small}
+ \snaptodo[margin block/.style={font=\normalsize}]{normalsize}
+ \snaptodo[margin block/.style={font=\large}]{large}
+ \snaptodo[margin block/.style={font=\Large}]{Large}
+ \snaptodo[margin block/.style={font=\LARGE}]{LARGE}
+ \snaptodo[margin block/.style={font=\huge}]{huge}
+ \snaptodo[margin block/.style={font=\Huge}]{Huge}
+ {\ttfamily\verb|/snpatodo/margin block/.style={font=...}|},
+ you can change font size.
+ This style also allows you to change font family.
+ \snaptodo[margin block/.style={font=\itshape}]{itshape}
+ \snaptodo[margin block/.style={font=\scshape}]{scshape}
+ \snaptodo[margin block/.style={font=\slshape}]{slshape}
+ \snaptodo[margin block/.style={font=\sffamily}]{sffamily}
+ \snaptodo[margin block/.style={font=\ttfamily}]{ttfamily}
+ \snaptodo[margin block/.style={font=\bfseries}]{bfseries}
\end{document}
diff --git a/macros/latex/contrib/snaptodo/test/before_after.tex b/macros/latex/contrib/snaptodo/test/before_after.tex
index 88dc16b644..f2701370eb 100644
--- a/macros/latex/contrib/snaptodo/test/before_after.tex
+++ b/macros/latex/contrib/snaptodo/test/before_after.tex
@@ -1,39 +1,33 @@
-
\documentclass{article}
-
\usepackage{snaptodo}
-
\begin{document}
-\marginparsep=48pt
-\marginparwidth=72pt
-
-\section{Before todo notes}
+\section{Before snaptodo}
-We the People of the United States, in Order to form a more perfect Union,
-establish Justice, insure domestic Tranquility, provide for the common defence,
-promote the general Welfare, and secure the Blessings of Liberty to ourselves
-and our Posterity, do ordain and establish this Constitution for the United
-States of America.
+We the People of the United States, in Order to form a more perfect
+Union, establish Justice, insure domestic Tranquility, provide for the
+common defence, promote the general Welfare, and secure the Blessings of
+Liberty to ourselves and our Posterity, do ordain and establish this
+Constitution for the United States of America.
\def\snaptodoexample{%
- \pgfmathtruncatemacro\wc{round(1+rnd*10)}%
- \snaptodo{%
- \foreach\w in{1,...,\wc}{%
- \pgfmathsetmacro\l{1+rnd*10}%
- \rule{\l pt}{1ex}
- }%
- },
+ \pgfmathtruncatemacro\wc{round(5+rnd*10)}%
+ \snaptodo[block rise=5em]{%
+ \foreach\w in{1,...,\wc}{%
+ \pgfmathsetmacro\l{0.5+rnd*2.5}%
+ \rule{\l em}{0.5em}
+ }%
+ },
}
\catcode`\,=\active
\let,=\snaptodoexample
-\section{After todo notes}
+\section{After snaptodo}
-We the People of the United States, in Order to form a more perfect Union,
-establish Justice, insure domestic Tranquility, provide for the common defence,
-promote the general Welfare, and secure the Blessings of Liberty to ourselves
-and our Posterity, do ordain and establish this Constitution for the United
-States of America.
+We the People of the United States, in Order to form a more perfect
+Union, establish Justice, insure domestic Tranquility, provide for the
+common defence, promote the general Welfare, and secure the Blessings of
+Liberty to ourselves and our Posterity, do ordain and establish this
+Constitution for the United States of America.
\end{document}
diff --git a/macros/latex/contrib/snaptodo/test/circle_testing.tex b/macros/latex/contrib/snaptodo/test/circle_testing.tex
index 6885de11ca..bc7b0cd1ce 100644
--- a/macros/latex/contrib/snaptodo/test/circle_testing.tex
+++ b/macros/latex/contrib/snaptodo/test/circle_testing.tex
@@ -1,15 +1,11 @@
-
\documentclass{article}
-
\usepackage[
papersize={4in,3in},
text={2in,2in},
marginparwidth=40pt,
marginparsep=20pt
]{geometry}
-
\usepackage{snaptodo}
-
\begin{document}
\def\nframe{120}
diff --git a/macros/latex/contrib/snaptodo/test/minimal_testing.tex b/macros/latex/contrib/snaptodo/test/minimal_testing.tex
index 28adb0562c..d3ee27ec45 100644
--- a/macros/latex/contrib/snaptodo/test/minimal_testing.tex
+++ b/macros/latex/contrib/snaptodo/test/minimal_testing.tex
@@ -1,4 +1,3 @@
-
\documentclass{article}
\usepackage{snaptodo}
\begin{document}
diff --git a/macros/latex/contrib/snaptodo/test/stress_testing.tex b/macros/latex/contrib/snaptodo/test/stress_testing.tex
index a0d32740e8..060492a777 100644
--- a/macros/latex/contrib/snaptodo/test/stress_testing.tex
+++ b/macros/latex/contrib/snaptodo/test/stress_testing.tex
@@ -1,348 +1,356 @@
-
\documentclass{article}
-
\usepackage{snaptodo}
-
\begin{document}
-\marginparsep=48pt
-\marginparwidth=72pt
-
\def\todoexample{%
- \pgfmathtruncatemacro\wc{round(1+rnd*10)}%
- \snaptodo{%
- \foreach\w in{1,...,\wc}{%
- \pgfmathsetmacro\l{1+rnd*10}%
- \rule{\l pt}{1ex}
- }%
- },
+ \pgfmathtruncatemacro\wc{round(5+rnd*10)}%
+ \snaptodo[block rise=10em]{%
+ \foreach\w in{1,...,\wc}{%
+ \pgfmathsetmacro\l{0.5+rnd*2.5}%
+ \rule{\l em}{0.5em}
+ }%
+ }.
}
-\catcode`\,=\active
-\let,=\todoexample
-
-We the People of the United States, in Order to form a more perfect Union,
-establish Justice, insure domestic Tranquility, provide for the common defence,
-promote the general Welfare, and secure the Blessings of Liberty to ourselves
-and our Posterity, do ordain and establish this Constitution for the United
-States of America.
-
-Article. I. Section. 1. All legislative Powers herein granted shall be vested
-in a Congress of the United States, which shall consist of a Senate and House of
-Representatives.
-
-
-Section. 2. The House of Representatives shall be composed of Members chosen
-every second Year by the People of the several States, and the Electors in each
-State shall have the Qualifications requisite for Electors of the most numerous
-Branch of the State Legislature.
-
-No Person shall be a Representative who shall not have attained to the age of
-twenty five Years, and been seven Years a Citizen of the United States, and who
-shall not, when elected, be an Inhabitant of that State in which he shall be
-chosen.
-
-Representatives and direct Taxes shall be apportioned among the several States
-which may be included within this Union, according to their respective Numbers,
-which shall be determined by adding to the whole Number of free Persons,
-including those bound to Service for a Term of Years, and excluding Indians not
-taxed, three fifths of all other Persons. The actual Enumeration shall be made
-within three Years after the first Meeting of the Congress of the United States,
-and within every subsequent Term of ten Years, in such Manner as they shall by
-Law direct. The Number of Representatives shall not exceed one for every thirty
-Thousand, but each State shall have at Least one Representative; and until such
-enumeration shall be made, the State of New Hampshire shall be entitled to chuse
-three, Massachusetts eight, Rhode-Island and Providence Plantations one,
-Connecticut five, New-York six, New Jersey four, Pennsylvania eight, Delaware
-one, Maryland six, Virginia ten, North Carolina five, South Carolina five, and
-Georgia three.
-
-When vacancies happen in the Representation from any State, the Executive
-Authority thereof shall issue Writs of Election to fill such Vacancies.
-
-The House of Representatives shall chuse their Speaker and other Officers; and
-shall have the sole Power of Impeachment.
-
-
-Section. 3. The Senate of the United States shall be composed of two Senators
-from each State, chosen by the Legislature thereof, for six Years; and each
-Senator shall have one Vote.
-
-Immediately after they shall be assembled in Consequence of the first Election,
-they shall be divided as equally as may be into three Classes. The Seats of the
-Senators of the first Class shall be vacated at the Expiration of the second
-Year, of the second Class at the Expiration of the fourth Year, and of the third
-Class at the Expiration of the sixth Year, so that one third may be chosen every
-second Year; and if Vacancies happen by Resignation, or otherwise, during the
-Recess of the Legislature of any State, the Executive thereof may make temporary
-Appointments until the next Meeting of the Legislature, which shall then fill
-such Vacancies.
-
-No Person shall be a Senator who shall not have attained to the Age of thirty
-Years, and been nine Years a Citizen of the United States, and who shall not,
-when elected, be an Inhabitant of that State for which he shall be chosen.
-
-The Vice President of the United States shall be President of the Senate but
-shall have no Vote, unless they be equally divided.
-
-The Senate shall chuse their other Officers, and also a President pro tempore,
-in the Absence of the Vice President, or when he shall exercise the Office of
-President of the United States.
-
-The Senate shall have the sole Power to try all Impeachments. When sitting for
-that Purpose, they shall be on Oath or Affirmation. When the President of the
-United States is tried the Chief Justice shall preside: And no Person shall be
-convicted without the Concurrence of two thirds of the Members present.
-
-Judgment in Cases of Impeachment shall not extend further than to removal from
-Office, and disqualification to hold and enjoy any Office of honor, Trust or
-Profit under the United States: but the Party convicted shall nevertheless be
-liable and subject to Indictment, Trial, Judgment and Punishment, according to
-Law.
-
-
-Section. 4. The Times, Places and Manner of holding Elections for Senators and
-Representatives, shall be prescribed in each State by the Legislature thereof;
-but the Congress may at any time by Law make or alter such Regulations, except
-as to the Places of chusing Senators.
-
-The Congress shall assemble at least once in every Year, and such Meeting shall
-be on the first Monday in December, unless they shall by Law appoint a different
-Day.
-
+\catcode`\.=\active
+\let.=\todoexample
+
+We the People of the United States, in Order to form a more perfect
+Union, establish Justice, insure domestic Tranquility, provide for the
+common defence, promote the general Welfare, and secure the Blessings of
+Liberty to ourselves and our Posterity, do ordain and establish this
+Constitution for the United States of America.
+
+Article. I. Section. 1. All legislative Powers herein granted shall be
+vested in a Congress of the United States, which shall consist of a
+Senate and House of Representatives.
+
+Section. 2. The House of Representatives shall be composed of Members
+chosen every second Year by the People of the several States, and the
+Electors in each State shall have the Qualifications requisite for
+Electors of the most numerous Branch of the State Legislature.
+
+No Person shall be a Representative who shall not have attained to the
+age of twenty five Years, and been seven Years a Citizen of the United
+States, and who shall not, when elected, be an Inhabitant of that State
+in which he shall be chosen.
+
+Representatives and direct Taxes shall be apportioned among the several
+States which may be included within this Union, according to their
+respective Numbers, which shall be determined by adding to the whole
+Number of free Persons, including those bound to Service for a Term of
+Years, and excluding Indians not taxed, three fifths of all other
+Persons. The actual Enumeration shall be made within three Years after
+the first Meeting of the Congress of the United States, and within every
+subsequent Term of ten Years, in such Manner as they shall by Law
+direct. The Number of Representatives shall not exceed one for every
+thirty Thousand, but each State shall have at Least one Representative;
+and until such enumeration shall be made, the State of New Hampshire
+shall be entitled to chuse three, Massachusetts eight, Rhode-Island and
+Providence Plantations one, Connecticut five, New-York six, New Jersey
+four, Pennsylvania eight, Delaware one, Maryland six, Virginia ten,
+North Carolina five, South Carolina five, and Georgia three.
+
+When vacancies happen in the Representation from any State, the
+Executive Authority thereof shall issue Writs of Election to fill such
+Vacancies.
+
+The House of Representatives shall chuse their Speaker and other
+Officers; and shall have the sole Power of Impeachment.
+
+
+Section. 3. The Senate of the United States shall be composed of two
+Senators from each State, chosen by the Legislature thereof, for six
+Years; and each Senator shall have one Vote.
+
+Immediately after they shall be assembled in Consequence of the first
+Election, they shall be divided as equally as may be into three Classes.
+The Seats of the Senators of the first Class shall be vacated at the
+Expiration of the second Year, of the second Class at the Expiration of
+the fourth Year, and of the third Class at the Expiration of the sixth
+Year, so that one third may be chosen every second Year; and if
+Vacancies happen by Resignation, or otherwise, during the Recess of the
+Legislature of any State, the Executive thereof may make temporary
+Appointments until the next Meeting of the Legislature, which shall then
+fill such Vacancies.
+
+No Person shall be a Senator who shall not have attained to the Age of
+thirty Years, and been nine Years a Citizen of the United States, and
+who shall not, when elected, be an Inhabitant of that State for which he
+shall be chosen.
+
+The Vice President of the United States shall be President of the Senate
+but shall have no Vote, unless they be equally divided.
+
+The Senate shall chuse their other Officers, and also a President pro
+tempore, in the Absence of the Vice President, or when he shall exercise
+the Office of President of the United States.
+
+The Senate shall have the sole Power to try all Impeachments. When
+sitting for that Purpose, they shall be on Oath or Affirmation. When the
+President of the United States is tried the Chief Justice shall preside:
+And no Person shall be convicted without the Concurrence of two thirds
+of the Members present.
+
+Judgment in Cases of Impeachment shall not extend further than to
+removal from Office, and disqualification to hold and enjoy any Office
+of honor, Trust or Profit under the United States: but the Party
+convicted shall nevertheless be liable and subject to Indictment, Trial,
+Judgment and Punishment, according to Law.
+
+Section. 4. The Times, Places and Manner of holding Elections for
+Senators and Representatives, shall be prescribed in each State by the
+Legislature thereof; but the Congress may at any time by Law make or
+alter such Regulations, except as to the Places of chusing Senators.
+
+The Congress shall assemble at least once in every Year, and such
+Meeting shall be on the first Monday in December, unless they shall by
+Law appoint a different Day.
Section. 5. Each House shall be the Judge of the Elections, Returns and
-Qualifications of its own Members, and a Majority of each shall constitute a
-Quorum to do Business; but a smaller Number may adjourn from day to day, and may
-be authorized to compel the Attendance of absent Members, in such Manner, and
-under such Penalties as each House may provide.
-
-Each House may determine the Rules of its Proceedings, punish its Members for
-disorderly Behaviour, and, with the Concurrence of two thirds, expel a Member.
-
-Each House shall keep a Journal of its Proceedings, and from time to time
-publish the same, excepting such Parts as may in their Judgment require Secrecy;
-and the Yeas and Nays of the Members of either House on any question shall, at
-the Desire of one fifth of those Present, be entered on the Journal.
-
-Neither House, during the Session of Congress, shall, without the Consent of the
-other, adjourn for more than three days, nor to any other Place than that in
-which the two Houses shall be sitting.
-
-
-Section. 6. The Senators and Representatives shall receive a Compensation for
-their Services, to be ascertained by Law, and paid out of the Treasury of the
-United States. They shall in all Cases, except Treason, Felony and Breach of the
-Peace, be privileged from Arrest during their Attendance at the Session of their
-respective Houses, and in going to and returning from the same; and for any
-Speech or Debate in either House, they shall not be questioned in any other
-Place.
-
-No Senator or Representative shall, during the Time for which he was elected, be
-appointed to any civil Office under the Authority of the United States, which
-shall have been created, or the Emoluments whereof shall have been encreased
-during such time; and no Person holding any Office under the United States,
-shall be a Member of either House during his Continuance in Office.
-
-
-Section. 7. All Bills for raising Revenue shall originate in the House of
-Representatives; but the Senate may propose or concur with amendments as on
-other Bills.
-
-Every Bill which shall have passed the House of Representatives and the Senate,
-shall, before it become a law, be presented to the President of the United
-States: If he approve he shall sign it, but if not he shall return it, with his
-Objections to that House in which it shall have originated, who shall enter the
-Objections at large on their Journal, and proceed to reconsider it. If after
-such Reconsideration two thirds of that House shall agree to pass the Bill, it
-shall be sent, together with the Objections, to the other House, by which it
-shall likewise be reconsidered, and if approved by two thirds of that House, it
-shall become a Law. But in all such Cases the Votes of both Houses shall be
-determined by Yeas and Nays, and the Names of the Persons voting for and against
-the Bill shall be entered on the Journal of each House respectively. If any Bill
-shall not be returned by the President within ten Days (Sundays excepted) after
-it shall have been presented to him, the Same shall be a Law, in like Manner as
-if he had signed it, unless the Congress by their Adjournment prevent its
-Return, in which Case it shall not be a Law.
-
-Every Order, Resolution, or Vote to which the Concurrence of the Senate and
-House of Representatives may be necessary (except on a question of Adjournment)
-shall be presented to the President of the United States; and before the Same
-shall take Effect, shall be approved by him, or being disapproved by him, shall
-be repassed by two thirds of the Senate and House of Representatives, according
-to the Rules and Limitations prescribed in the Case of a Bill.
-
-
-Section. 8. The Congress shall have Power To lay and collect Taxes, Duties,
-Imposts and Excises, to pay the Debts and provide for the common Defence and
-general Welfare of the United States; but all Duties, Imposts and Excises shall
-be uniform throughout the United States;
+Qualifications of its own Members, and a Majority of each shall
+constitute a Quorum to do Business; but a smaller Number may adjourn
+from day to day, and may be authorized to compel the Attendance of
+absent Members, in such Manner, and under such Penalties as each House
+may provide.
+
+Each House may determine the Rules of its Proceedings, punish its
+Members for disorderly Behaviour, and, with the Concurrence of two
+thirds, expel a Member.
+
+Each House shall keep a Journal of its Proceedings, and from time to
+time publish the same, excepting such Parts as may in their Judgment
+require Secrecy; and the Yeas and Nays of the Members of either House on
+any question shall, at the Desire of one fifth of those Present, be
+entered on the Journal.
+
+Neither House, during the Session of Congress, shall, without the
+Consent of the other, adjourn for more than three days, nor to any other
+Place than that in which the two Houses shall be sitting.
+
+Section. 6. The Senators and Representatives shall receive a
+Compensation for their Services, to be ascertained by Law, and paid out
+of the Treasury of the United States. They shall in all Cases, except
+Treason, Felony and Breach of the Peace, be privileged from Arrest
+during their Attendance at the Session of their respective Houses, and
+in going to and returning from the same; and for any Speech or Debate in
+either House, they shall not be questioned in any other Place.
+
+No Senator or Representative shall, during the Time for which he was
+elected, be appointed to any civil Office under the Authority of the
+United States, which shall have been created, or the Emoluments whereof
+shall have been encreased during such time; and no Person holding any
+Office under the United States, shall be a Member of either House during
+his Continuance in Office.
+
+Section. 7. All Bills for raising Revenue shall originate in the House
+of Representatives; but the Senate may propose or concur with amendments
+as on other Bills.
+
+Every Bill which shall have passed the House of Representatives and the
+Senate, shall, before it become a law, be presented to the President of
+the United States: If he approve he shall sign it, but if not he shall
+return it, with his Objections to that House in which it shall have
+originated, who shall enter the Objections at large on their Journal,
+and proceed to reconsider it. If after such Reconsideration two thirds
+of that House shall agree to pass the Bill, it shall be sent, together
+with the Objections, to the other House, by which it shall likewise be
+reconsidered, and if approved by two thirds of that House, it shall
+become a Law. But in all such Cases the Votes of both Houses shall be
+determined by Yeas and Nays, and the Names of the Persons voting for and
+against the Bill shall be entered on the Journal of each House
+respectively. If any Bill shall not be returned by the President within
+ten Days (Sundays excepted) after it shall have been presented to him,
+the Same shall be a Law, in like Manner as if he had signed it, unless
+the Congress by their Adjournment prevent its Return, in which Case it
+shall not be a Law.
+
+Every Order, Resolution, or Vote to which the Concurrence of the Senate
+and House of Representatives may be necessary (except on a question of
+Adjournment) shall be presented to the President of the United States;
+and before the Same shall take Effect, shall be approved by him, or
+being disapproved by him, shall be repassed by two thirds of the Senate
+and House of Representatives, according to the Rules and Limitations
+prescribed in the Case of a Bill.
+
+Section. 8. The Congress shall have Power To lay and collect Taxes,
+Duties, Imposts and Excises, to pay the Debts and provide for the common
+Defence and general Welfare of the United States; but all Duties,
+Imposts and Excises shall be uniform throughout the United States;
To borrow Money on the credit of the United States;
-To regulate Commerce with foreign Nations, and among the several States, and
-with the Indian Tribes;
+To regulate Commerce with foreign Nations, and among the several States,
+and with the Indian Tribes;
-To establish an uniform Rule of Naturalization, and uniform Laws on the subject
-of Bankruptcies throughout the United States;
+To establish an uniform Rule of Naturalization, and uniform Laws on the
+subject of Bankruptcies throughout the United States;
-To coin Money, regulate the Value thereof, and of foreign Coin, and fix the
-Standard of Weights and Measures;
+To coin Money, regulate the Value thereof, and of foreign Coin, and fix
+the Standard of Weights and Measures;
-To provide for the Punishment of counterfeiting the Securities and current Coin
-of the United States;
+To provide for the Punishment of counterfeiting the Securities and
+current Coin of the United States;
To establish Post Offices and post Roads;
-To promote the Progress of Science and useful Arts, by securing for limited
-Times to Authors and Inventors the exclusive Right to their respective Writings
-and Discoveries;
+To promote the Progress of Science and useful Arts, by securing for
+limited Times to Authors and Inventors the exclusive Right to their
+respective Writings and Discoveries;
To constitute Tribunals inferior to the supreme Court;
-To define and punish Piracies and Felonies committed on the high Seas, and
-Offences against the Law of Nations;
+To define and punish Piracies and Felonies committed on the high Seas,
+and Offences against the Law of Nations;
-To declare War, grant Letters of Marque and Reprisal, and make Rules concerning
-Captures on Land and Water;
+To declare War, grant Letters of Marque and Reprisal, and make Rules
+concerning Captures on Land and Water;
-To raise and support Armies, but no Appropriation of Money to that Use shall be
-for a longer Term than two Years;
+To raise and support Armies, but no Appropriation of Money to that Use
+shall be for a longer Term than two Years;
To provide and maintain a Navy;
-To make Rules for the Government and Regulation of the land and naval Forces;
-
-To provide for calling forth the Militia to execute the Laws of the Union,
-suppress Insurrections and repel Invasions;
-
-To provide for organizing, arming, and disciplining, the Militia, and for
-governing such Part of them as may be employed in the Service of the United
-States, reserving to the States respectively, the Appointment of the Officers,
-and the Authority of training the Militia according to the discipline prescribed
-by Congress;
-
-To exercise exclusive Legislation in all Cases whatsoever, over such District
-(not exceeding ten Miles square) as may, by Cession of Particular States, and
-the Acceptance of Congress, become the Seat of the Government of the United
-States, and to exercise like Authority over all Places purchased by the Consent
-of the Legislature of the State in which the Same shall be, for the Erection of
-Forts, Magazines, Arsenals, dock-Yards and other needful Buildings;—And
-
-To make all Laws which shall be necessary and proper for carrying into Execution
-the foregoing Powers and all other Powers vested by this Constitution in the
-Government of the United States, or in any Department or Officer thereof.
-
-
-Section. 9. The Migration or Importation of such Persons as any of the States
-now existing shall think proper to admit, shall not be prohibited by the
-Congress prior to the Year one thousand eight hundred and eight, but a Tax or
-duty may be imposed on such Importation, not exceeding ten dollars for each
-Person.
-
-The Privilege of the Writ of Habeas Corpus shall not be suspended, unless when
-in Cases of Rebellion or Invasion the public Safety may require it.
+To make Rules for the Government and Regulation of the land and naval
+Forces;
+
+To provide for calling forth the Militia to execute the Laws of the
+Union, suppress Insurrections and repel Invasions;
+
+To provide for organizing, arming, and disciplining, the Militia, and
+for governing such Part of them as may be employed in the Service of the
+United States, reserving to the States respectively, the Appointment of
+the Officers, and the Authority of training the Militia according to the
+discipline prescribed by Congress;
+
+To exercise exclusive Legislation in all Cases whatsoever, over such
+District (not exceeding ten Miles square) as may, by Cession of
+Particular States, and the Acceptance of Congress, become the Seat of
+the Government of the United States, and to exercise like Authority over
+all Places purchased by the Consent of the Legislature of the State in
+which the Same shall be, for the Erection of Forts, Magazines, Arsenals,
+dock-Yards and other needful Buildings;—And
+
+To make all Laws which shall be necessary and proper for carrying into
+Execution the foregoing Powers and all other Powers vested by this
+Constitution in the Government of the United States, or in any
+Department or Officer thereof.
+
+Section. 9. The Migration or Importation of such Persons as any of the
+States now existing shall think proper to admit, shall not be prohibited
+by the Congress prior to the Year one thousand eight hundred and eight,
+but a Tax or duty may be imposed on such Importation, not exceeding ten
+dollars for each Person.
+
+The Privilege of the Writ of Habeas Corpus shall not be suspended,
+unless when in Cases of Rebellion or Invasion the public Safety may
+require it.
No Bill of Attainder or ex post facto Law shall be passed.
-No Capitation, or other direct, Tax shall be laid, unless in Proportion to the
-Census or Enumeration herein before directed to be taken.
+No Capitation, or other direct, Tax shall be laid, unless in Proportion
+to the Census or Enumeration herein before directed to be taken.
No Tax or Duty shall be laid on Articles exported from any State.
-No Preference shall be given by any Regulation of Commerce or Revenue to the
-Ports of one State over those of another: nor shall Vessels bound to, or from,
-one State, be obliged to enter, clear or pay Duties in another.
-
-No Money shall be drawn from the Treasury, but in Consequence of Appropriations
-made by Law; and a regular Statement and Account of the Receipts and
-Expenditures of all public Money shall be published from time to time.
-
-No Title of Nobility shall be granted by the United States: And no Person
-holding any Office of Profit or Trust under them, shall, without the Consent of
-the Congress, accept of any present, Emolument, Office, or Title, of any kind
-whatever, from any King, Prince or foreign State.
-
-
-Section. 10. No State shall enter into any Treaty, Alliance, or Confederation;
-grant Letters of Marque and Reprisal; coin Money; emit Bills of Credit; make any
-Thing but gold and silver Coin a Tender in Payment of Debts; pass any Bill of
-Attainder, ex post facto Law, or Law impairing the Obligation of Contracts, or
-grant any Title of Nobility.
-
-No State shall, without the Consent of the Congress, lay any Imposts or Duties
-on Imports or Exports, except what may be absolutely necessary for executing
-it's inspection Laws: and the net Produce of all Duties and Imposts, laid by any
-State on Imports or Exports, shall be for the Use of the Treasury of the United
-States; and all such Laws shall be subject to the Revision and Controul of the
-Congress.
-
-No State shall, without the Consent of Congress, lay any Duty of Tonnage, keep
-Troops, or Ships of War in time of Peace, enter into any Agreement or Compact
-with another State, or with a foreign Power, or engage in War, unless actually
-invaded, or in such imminent Danger as will not admit of delay.
-
-
-Article. II. Section. 1. The executive Power shall be vested in a President of
-the United States of America. He shall hold his Office during the Term of four
-Years, and, together with the Vice President, chosen for the same Term, be
-elected, as follows:
-
-Each State shall appoint, in such Manner as the Legislature thereof may direct,
-a Number of Electors, equal to the whole Number of Senators and Representatives
-to which the State may be entitled in the Congress: but no Senator or
-Representative, or Person holding an Office of Trust or Profit under the United
-States, shall be appointed an Elector.
-
-The Electors shall meet in their respective States, and vote by Ballot for two
-Persons, of whom one at least shall not be an Inhabitant of the same State with
-themselves. And they shall make a List of all the Persons voted for, and of the
-Number of Votes for each; which List they shall sign and certify, and transmit
-sealed to the Seat of the Government of the United States, directed to the
-President of the Senate. The President of the Senate shall, in the Presence of
-the Senate and House of Representatives, open all the Certificates, and the
-Votes shall then be counted. The Person having the greatest Number of Votes
-shall be the President, if such Number be a Majority of the whole Number of
-Electors appointed; and if there be more than one who have such Majority, and
-have an equal Number of Votes, then the House of Representatives shall
-immediately chuse by Ballot one of them for President; and if no Person have a
-Majority, then from the five highest on the List the said House shall in like
-Manner chuse the President. But in chusing the President, the Votes shall be
-taken by States, the Representation from each State having one Vote; a quorum
-for this Purpose shall consist of a Member or Members from two thirds of the
-States, and a Majority of all the States shall be necessary to a Choice. In
-every Case, after the Choice of the President, the Person having the greatest
-Number of Votes of the Electors shall be the Vice President. But if there should
-remain two or more who have equal Votes, the Senate shall chuse from them by
-Ballot the Vice President.
-
-The Congress may determine the Time of chusing the Electors, and the Day on
-which they shall give their Votes; which Day shall be the same throughout the
-United States.
-
-No Person except a natural born Citizen, or a Citizen of the United States, at
-the time of the Adoption of this Constitution, shall be eligible to the Office
-of President; neither shall any person be eligible to that Office who shall not
-have attained to the Age of thirty five Years, and been fourteen Years a
-Resident within the United States.
+No Preference shall be given by any Regulation of Commerce or Revenue to
+the Ports of one State over those of another: nor shall Vessels bound
+to, or from, one State, be obliged to enter, clear or pay Duties in
+another.
+
+No Money shall be drawn from the Treasury, but in Consequence of
+Appropriations made by Law; and a regular Statement and Account of the
+Receipts and Expenditures of all public Money shall be published from
+time to time.
+
+No Title of Nobility shall be granted by the United States: And no
+Person holding any Office of Profit or Trust under them, shall, without
+the Consent of the Congress, accept of any present, Emolument, Office,
+or Title, of any kind whatever, from any King, Prince or foreign State.
+
+Section. 10. No State shall enter into any Treaty, Alliance, or
+Confederation; grant Letters of Marque and Reprisal; coin Money; emit
+Bills of Credit; make any Thing but gold and silver Coin a Tender in
+Payment of Debts; pass any Bill of Attainder, ex post facto Law, or Law
+impairing the Obligation of Contracts, or grant any Title of Nobility.
+
+No State shall, without the Consent of the Congress, lay any Imposts or
+Duties on Imports or Exports, except what may be absolutely necessary
+for executing it's inspection Laws: and the net Produce of all Duties
+and Imposts, laid by any State on Imports or Exports, shall be for the
+Use of the Treasury of the United States; and all such Laws shall be
+subject to the Revision and Controul of the Congress.
+
+No State shall, without the Consent of Congress, lay any Duty of
+Tonnage, keep Troops, or Ships of War in time of Peace, enter into any
+Agreement or Compact with another State, or with a foreign Power, or
+engage in War, unless actually invaded, or in such imminent Danger as
+will not admit of delay.
+
+Article. II. Section. 1. The executive Power shall be vested in a
+President of the United States of America. He shall hold his Office
+during the Term of four Years, and, together with the Vice President,
+chosen for the same Term, be elected, as follows:
+
+Each State shall appoint, in such Manner as the Legislature thereof may
+direct, a Number of Electors, equal to the whole Number of Senators and
+Representatives to which the State may be entitled in the Congress: but
+no Senator or Representative, or Person holding an Office of Trust or
+Profit under the United States, shall be appointed an Elector.
+
+The Electors shall meet in their respective States, and vote by Ballot
+for two Persons, of whom one at least shall not be an Inhabitant of the
+same State with themselves. And they shall make a List of all the
+Persons voted for, and of the Number of Votes for each; which List they
+shall sign and certify, and transmit sealed to the Seat of the
+Government of the United States, directed to the President of the
+Senate. The President of the Senate shall, in the Presence of the Senate
+and House of Representatives, open all the Certificates, and the Votes
+shall then be counted. The Person having the greatest Number of Votes
+shall be the President, if such Number be a Majority of the whole Number
+of Electors appointed; and if there be more than one who have such
+Majority, and have an equal Number of Votes, then the House of
+Representatives shall immediately chuse by Ballot one of them for
+President; and if no Person have a Majority, then from the five highest
+on the List the said House shall in like Manner chuse the President. But
+in chusing the President, the Votes shall be taken by States, the
+Representation from each State having one Vote; a quorum for this
+Purpose shall consist of a Member or Members from two thirds of the
+States, and a Majority of all the States shall be necessary to a Choice.
+In every Case, after the Choice of the President, the Person having the
+greatest Number of Votes of the Electors shall be the Vice President.
+But if there should remain two or more who have equal Votes, the Senate
+shall chuse from them by Ballot the Vice President.
+
+The Congress may determine the Time of chusing the Electors, and the Day
+on which they shall give their Votes; which Day shall be the same
+throughout the United States.
+
+No Person except a natural born Citizen, or a Citizen of the United
+States, at the time of the Adoption of this Constitution, shall be
+eligible to the Office of President; neither shall any person be
+eligible to that Office who shall not have attained to the Age of thirty
+five Years, and been fourteen Years a Resident within the United States.
In Case of the Removal of the President from Office, or of his Death,
-Resignation, or Inability to discharge the Powers and Duties of the said Office,
-the Same shall devolve on the Vice President, and the Congress may by Law
-provide for the Case of Removal, Death, Resignation or Inability, both of the
-President and Vice President, declaring what Officer shall then act as
-President, and such Officer shall act accordingly, until the Disability be
-removed, or a President shall be elected.
-
-The President shall, at stated Times, receive for his Services, a Compensation,
-which shall neither be encreased nor diminished during the Period for which he
-shall have been elected, and he shall not receive within that Period any other
-Emolument from the United States, or any of them.
-
-Before he enter on the Execution of his Office, he shall take the following Oath
-or Affirmation:—“I do solemnly swear (or affirm) that I will faithfully execute
-the Office of President of the United States, and will to the best of my
-Ability, preserve, protect and defend the Constitution of the United States.”
-
+Resignation, or Inability to discharge the Powers and Duties of the said
+Office, the Same shall devolve on the Vice President, and the Congress
+may by Law provide for the Case of Removal, Death, Resignation or
+Inability, both of the President and Vice President, declaring what
+Officer shall then act as President, and such Officer shall act
+accordingly, until the Disability be removed, or a President shall be
+elected.
+
+The President shall, at stated Times, receive for his Services, a
+Compensation, which shall neither be encreased nor diminished during the
+Period for which he shall have been elected, and he shall not receive
+within that Period any other Emolument from the United States, or any of
+them.
+
+Before he enter on the Execution of his Office, he shall take the
+following Oath or Affirmation:—“I do solemnly swear (or affirm) that I
+will faithfully execute the Office of President of the United States,
+and will to the best of my Ability, preserve, protect and defend the
+Constitution of the United States.”
Section. 2. The President shall be Commander in Chief of the Army and Navy of
the United States, and of the Militia of the several States, when called into
@@ -352,140 +360,144 @@ relating to the Duties of their respective Offices, and he shall have Power to
Grant Reprieves and Pardons for Offences against the United States, except in
Cases of Impeachment.
-He shall have Power, by and with the Advice and Consent of the Senate, to make
-Treaties, provided two thirds of the Senators present concur; and he shall
-nominate, and by and with the Advice and Consent of the Senate, shall appoint
-Ambassadors, other public Ministers and Consuls, Judges of the supreme Court,
-and all other Officers of the United States, whose Appointments are not herein
-otherwise provided for, and which shall be established by Law: but the Congress
-may by Law vest the Appointment of such inferior Officers, as they think proper,
-in the President alone, in the Courts of Law, or in the Heads of Departments.
-
-The President shall have Power to fill up all Vacancies that may happen during
-the Recess of the Senate, by granting Commissions which shall expire at the End
-of their next Session.
-
-
-Section. 3. He shall from time to time give to the Congress Information of the
-State of the Union, and recommend to their Consideration such Measures as he
-shall judge necessary and expedient; he may, on extraordinary Occasions, convene
-both Houses, or either of them, and in Case of Disagreement between them, with
-Respect to the Time of Adjournment, he may adjourn them to such Time as he shall
-think proper; he shall receive Ambassadors and other public Ministers; he shall
-take Care that the Laws be faithfully executed, and shall Commission all the
+He shall have Power, by and with the Advice and Consent of the Senate,
+to make Treaties, provided two thirds of the Senators present concur;
+and he shall nominate, and by and with the Advice and Consent of the
+Senate, shall appoint Ambassadors, other public Ministers and Consuls,
+Judges of the supreme Court, and all other Officers of the United
+States, whose Appointments are not herein otherwise provided for, and
+which shall be established by Law: but the Congress may by Law vest the
+Appointment of such inferior Officers, as they think proper, in the
+President alone, in the Courts of Law, or in the Heads of Departments.
+
+The President shall have Power to fill up all Vacancies that may happen
+during the Recess of the Senate, by granting Commissions which shall
+expire at the End of their next Session.
+
+Section. 3. He shall from time to time give to the Congress Information
+of the State of the Union, and recommend to their Consideration such
+Measures as he shall judge necessary and expedient; he may, on
+extraordinary Occasions, convene both Houses, or either of them, and in
+Case of Disagreement between them, with Respect to the Time of
+Adjournment, he may adjourn them to such Time as he shall think proper;
+he shall receive Ambassadors and other public Ministers; he shall take
+Care that the Laws be faithfully executed, and shall Commission all the
Officers of the United States.
-
-Section. 4. The President, Vice President and all Civil Officers of the United
-States, shall be removed from Office on Impeachment for and Conviction of,
-Treason, Bribery, or other high Crimes and Misdemeanors.
-
-
-Article. III. Section. 1. The judicial Power of the United States, shall be
-vested in one supreme Court, and in such inferior Courts as the Congress may
-from time to time ordain and establish. The Judges, both of the supreme and
-inferior Courts, shall hold their Offices during good Behaviour, and shall, at
-stated Times, receive for their Services, a Compensation, which shall not be
-diminished during their Continuance in Office.
-
-
-Section. 2. The judicial Power shall extend to all Cases, in Law and Equity,
-arising under this Constitution, the Laws of the United States, and Treaties
-made, or which shall be made, under their Authority;—to all Cases affecting
-Ambassadors, other public ministers and Consuls;—to all Cases of admiralty and
-maritime Jurisdiction;—to Controversies to which the United States shall be a
-Party;—to Controversies between two or more States;—between a State and Citizens
-of another State;—between Citizens of different States;—between Citizens of the
-same State claiming Lands under Grants of different States, and between a State,
-or the Citizens thereof, and foreign States, Citizens or Subjects.
-
-In all Cases affecting Ambassadors, other public Ministers and Consuls, and
-those in which a State shall be Party, the supreme Court shall have original
-Jurisdiction. In all the other Cases before mentioned, the supreme Court shall
-have appellate Jurisdiction, both as to Law and Fact, with such Exceptions, and
-under such Regulations as the Congress shall make.
-
-The Trial of all Crimes, except in Cases of Impeachment, shall be by Jury; and
-such Trial shall be held in the State where the said Crimes shall have been
-committed; but when not committed within any State, the Trial shall be at such
-Place or Places as the Congress may by Law have directed.
-
-
-Section. 3. Treason against the United States, shall consist only in levying
-War against them, or in adhering to their Enemies, giving them Aid and Comfort.
-No Person shall be convicted of Treason unless on the Testimony of two Witnesses
-to the same overt Act, or on Confession in open Court.
-
-The Congress shall have Power to declare the Punishment of Treason, but no
-Attainder of Treason shall work Corruption of Blood, or Forfeiture except during
-the Life of the Person attainted.
-
-
-Article. IV. Section. 1. Full Faith and Credit shall be given in each State to
-the public Acts, Records, and judicial Proceedings of every other State. And the
-Congress may by general Laws prescribe the Manner in which such Acts, Records
-and Proceedings shall be proved, and the Effect thereof.
-
-
-Section. 2. The Citizens of each State shall be entitled to all Privileges and
-Immunities of Citizens in the several States.
-
-A Person charged in any State with Treason, Felony, or other Crime, who shall
-flee from Justice, and be found in another State, shall on Demand of the
-executive Authority of the State from which he fled, be delivered up, to be
-removed to the State having Jurisdiction of the Crime.
-
-No Person held to Service or Labour in one State, under the Laws thereof,
-escaping into another, shall, in Consequence of any Law or Regulation therein,
-be discharged from such Service or Labour, but shall be delivered up on Claim of
-the Party to whom such Service or Labour may be due.
-
-
-Section. 3. New States may be admitted by the Congress into this Union; but no
-new State shall be formed or erected within the Jurisdiction of any other State;
-nor any State be formed by the Junction of two or more States, or Parts of
-States, without the Consent of the Legislatures of the States concerned as well
-as of the Congress.
-
-The Congress shall have Power to dispose of and make all needful Rules and
-Regulations respecting the Territory or other Property belonging to the United
-States; and nothing in this Constitution shall be so construed as to Prejudice
-any Claims of the United States, or of any particular State.
-
-
-Section. 4. The United States shall guarantee to every State in this Union a
-Republican Form of Government, and shall protect each of them against Invasion;
-and on Application of the Legislature, or of the Executive (when the Legislature
-cannot be convened) against domestic Violence.
-
-
-Article. V. The Congress, whenever two thirds of both Houses shall deem it
-necessary, shall propose Amendments to this Constitution, or, on the Application
-of the Legislatures of two thirds of the several States, shall call a Convention
-for proposing Amendments, which, in either Case, shall be valid to all Intents
-and Purposes, as Part of this Constitution, when ratified by the Legislatures of
-three fourths of the several States, or by Conventions in three fourths thereof,
-as the one or the other Mode of Ratification may be proposed by the Congress;
-Provided that no Amendment which may be made prior to the Year One thousand
-eight hundred and eight shall in any Manner affect the first and fourth Clauses
-in the Ninth Section of the first Article; and that no State, without its
-Consent, shall be deprived of its equal Suffrage in the Senate.
-
-
-Article. VI. All Debts contracted and Engagements entered into, before the
-Adoption of this Constitution, shall be as valid against the United States under
-this Constitution, as under the Confederation.
-
-This Constitution, and the Laws of the United States which shall be made in
-Pursuance thereof; and all Treaties made, or which shall be made, under the
-Authority of the United States, shall be the supreme Law of the Land; and the
-Judges in every State shall be bound thereby, any Thing in the Constitution or
-Laws of any state to the Contrary notwithstanding.
-
-The Senators and Representatives before mentioned, and the Members of the
-several State Legislatures, and all executive and judicial Officers, both of the
-United States and of the several States, shall be bound by Oath or Affirmation,
-to support this Constitution; but no religious Test shall ever be required as a
-Qualification to any Office or public Trust under the United States.
+Section. 4. The President, Vice President and all Civil Officers of the
+United States, shall be removed from Office on Impeachment for and
+Conviction of, Treason, Bribery, or other high Crimes and Misdemeanors.
+
+Article. III. Section. 1. The judicial Power of the United States,
+shall be vested in one supreme Court, and in such inferior Courts as the
+Congress may from time to time ordain and establish. The Judges, both of
+the supreme and inferior Courts, shall hold their Offices during good
+Behaviour, and shall, at stated Times, receive for their Services, a
+Compensation, which shall not be diminished during their Continuance in
+Office.
+
+Section. 2. The judicial Power shall extend to all Cases, in Law and
+Equity, arising under this Constitution, the Laws of the United States,
+and Treaties made, or which shall be made, under their Authority;—to all
+Cases affecting Ambassadors, other public ministers and Consuls;—to all
+Cases of admiralty and maritime Jurisdiction;—to Controversies to which
+the United States shall be a Party;—to Controversies between two or more
+States;—between a State and Citizens of another State;—between Citizens
+of different States;—between Citizens of the same State claiming Lands
+under Grants of different States, and between a State, or the Citizens
+thereof, and foreign States, Citizens or Subjects.
+
+In all Cases affecting Ambassadors, other public Ministers and Consuls,
+and those in which a State shall be Party, the supreme Court shall have
+original Jurisdiction. In all the other Cases before mentioned, the
+supreme Court shall have appellate Jurisdiction, both as to Law and
+Fact, with such Exceptions, and under such Regulations as the Congress
+shall make.
+
+The Trial of all Crimes, except in Cases of Impeachment, shall be by
+Jury; and such Trial shall be held in the State where the said Crimes
+shall have been committed; but when not committed within any State, the
+Trial shall be at such Place or Places as the Congress may by Law have
+directed.
+
+Section. 3. Treason against the United States, shall consist only in
+levying War against them, or in adhering to their Enemies, giving them
+Aid and Comfort. No Person shall be convicted of Treason unless on the
+Testimony of two Witnesses to the same overt Act, or on Confession in
+open Court.
+
+The Congress shall have Power to declare the Punishment of Treason, but
+no Attainder of Treason shall work Corruption of Blood, or Forfeiture
+except during the Life of the Person attainted.
+
+Article. IV. Section. 1. Full Faith and Credit shall be given in each
+State to the public Acts, Records, and judicial Proceedings of every
+other State. And the Congress may by general Laws prescribe the Manner
+in which such Acts, Records and Proceedings shall be proved, and the
+Effect thereof.
+
+Section. 2. The Citizens of each State shall be entitled to all
+Privileges and Immunities of Citizens in the several States.
+
+A Person charged in any State with Treason, Felony, or other Crime, who
+shall flee from Justice, and be found in another State, shall on Demand
+of the executive Authority of the State from which he fled, be delivered
+up, to be removed to the State having Jurisdiction of the Crime.
+
+No Person held to Service or Labour in one State, under the Laws
+thereof, escaping into another, shall, in Consequence of any Law or
+Regulation therein, be discharged from such Service or Labour, but shall
+be delivered up on Claim of the Party to whom such Service or Labour may
+be due.
+
+Section. 3. New States may be admitted by the Congress into this Union;
+but no new State shall be formed or erected within the Jurisdiction of
+any other State; nor any State be formed by the Junction of two or more
+States, or Parts of States, without the Consent of the Legislatures of
+the States concerned as well as of the Congress.
+
+The Congress shall have Power to dispose of and make all needful Rules
+and Regulations respecting the Territory or other Property belonging to
+the United States; and nothing in this Constitution shall be so
+construed as to Prejudice any Claims of the United States, or of any
+particular State.
+
+Section. 4. The United States shall guarantee to every State in this
+Union a Republican Form of Government, and shall protect each of them
+against Invasion; and on Application of the Legislature, or of the
+Executive (when the Legislature cannot be convened) against domestic
+Violence.
+
+Article. V. The Congress, whenever two thirds of both Houses shall deem
+it necessary, shall propose Amendments to this Constitution, or, on the
+Application of the Legislatures of two thirds of the several States,
+shall call a Convention for proposing Amendments, which, in either Case,
+shall be valid to all Intents and Purposes, as Part of this
+Constitution, when ratified by the Legislatures of three fourths of the
+several States, or by Conventions in three fourths thereof, as the one
+or the other Mode of Ratification may be proposed by the Congress;
+Provided that no Amendment which may be made prior to the Year One
+thousand eight hundred and eight shall in any Manner affect the first
+and fourth Clauses in the Ninth Section of the first Article; and that
+no State, without its Consent, shall be deprived of its equal Suffrage
+in the Senate.
+
+Article. VI. All Debts contracted and Engagements entered into, before
+the Adoption of this Constitution, shall be as valid against the United
+States under this Constitution, as under the Confederation.
+
+This Constitution, and the Laws of the United States which shall be made
+in Pursuance thereof; and all Treaties made, or which shall be made,
+under the Authority of the United States, shall be the supreme Law of
+the Land; and the Judges in every State shall be bound thereby, any
+Thing in the Constitution or Laws of any state to the Contrary
+notwithstanding.
+
+The Senators and Representatives before mentioned, and the Members of
+the several State Legislatures, and all executive and judicial Officers,
+both of the United States and of the several States, shall be bound by
+Oath or Affirmation, to support this Constitution; but no religious Test
+shall ever be required as a Qualification to any Office or public Trust
+under the United States.
\end{document}
diff --git a/macros/latex/contrib/starray/README.md b/macros/latex/contrib/starray/README.md
index 4da1c376a0..7522d5faee 100644
--- a/macros/latex/contrib/starray/README.md
+++ b/macros/latex/contrib/starray/README.md
@@ -72,7 +72,11 @@ The Current Maintainer of this work is Alceu Frigeri
-------------
## Changelog
-* Version 1.6 (this)
+* Version 1.7 (this)
+ - code cleanup. Still related to issues: #6, https://github.com/latex3/latex3/issues/1460 and https://github.com/latex3/latex3/issues/1466
+ - documented \starray_get_uniqueID (helper function, see documentation)
+
+* Version 1.6
- removing all V-expansion of property/sequence lists to avoid further issues with l3kernel
issues: #6, https://github.com/latex3/latex3/issues/1460 and https://github.com/latex3/latex3/issues/1466
- Remarks: code is operational but needs further cleanup!
diff --git a/macros/latex/contrib/starray/doc/starray.pdf b/macros/latex/contrib/starray/doc/starray.pdf
index 75af49bf47..4d8645bdab 100644
--- a/macros/latex/contrib/starray/doc/starray.pdf
+++ b/macros/latex/contrib/starray/doc/starray.pdf
Binary files differ
diff --git a/macros/latex/contrib/starray/doc/starray.tex b/macros/latex/contrib/starray/doc/starray.tex
index 0668574cec..d6ef94da90 100644
--- a/macros/latex/contrib/starray/doc/starray.tex
+++ b/macros/latex/contrib/starray/doc/starray.tex
@@ -15,7 +15,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version {1.6} {2024/03/10}
+%% This is version {1.7} {2024/03/17}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/starray
@@ -39,8 +39,8 @@
\begin{typesetabstract}
-This package implements vector like 'structures', like in 'C' and other programming languages.
-It's based on \tsobj[pkg]{expl3} and aimed at 'package writers', and not end users. The provided 'functions' are similar the ones provided for property (or sequence, or token) lists. For most of the provided functions there is a companion 'branching version'.
+This package implements vector like 'structures', alike 'C' and other programming languages.
+It's based on \tsobj[pkg]{expl3} and aimed at 'package writers', and not end users. The provided 'functions' are similar the ones provided for property (or sequence, or token) lists. Most of the provided functions have a companion 'branching version'.
\end{typesetabstract}
@@ -533,13 +533,13 @@ This can be used after any command which 'parses a term', for instance \tsobj{\s
\tsmacro{\starray_iterate_over:nn}{starray-ref,code}
\tsmacro{\starray_iterate_over:nnTF}{starray-ref,code,if-true,if-false}
\end{codesyntax}
-\tsobj{\starray_iterate_over:nn} will reset the \tsobj[marg]{starray-ref} iterator, and then execute \tsobj[marg]{code} for each valid value of \tsobj{iter}. At the loop's end, the \tsobj[marg]{starray-ref} iterator will point to the last element of it. The \tsobj[marg]{if-true} is executed, at the loop's end if there is no syntax error. Similarly \tsobj[marg]{if-false} is only execute if a syntax error is detected.
+\tsobj{\starray_iterate_over:nn} will reset the \tsobj[marg]{starray-ref} iterator, and then execute \tsobj[marg]{code} for each valid value of \tsobj{iter}. At the loop's end, the \tsobj[marg]{starray-ref} iterator will point to the last element of it. The \tsobj[marg]{if-true} is executed, at the loop's end if there is no syntax error, and the referenced structure was properly instantiated. Similarly \tsobj[marg]{if-false} is only execute if a syntax error is detected or the referenced structure wasn't properly instantiated
\end{codedescribe}
\begin{tsremark}
\tsobj{\starray_iterate_over:nn} Creates a local group, so that one can recurse over sub-structures. Be aware, then, that \tsobj[marg]{code} is executed in said local group.
\end{tsremark}
\begin{tsremark}
-A warning is raised (see \ref{pack:options}) in case of a \tsobj[marg]{starray-ref} syntax error. The branching version doesn't raise any warning.
+A warning is raised (see \ref{pack:options}) in case of a \tsobj[marg]{starray-ref} syntax error or the structure wasn't yet instantiated. The branching version doesn't raise any warning.
\end{tsremark}
@@ -656,7 +656,7 @@ This can be used after any command which 'parses a term', for instance \tsobj{\s
\tsobj{\starray_parsed_get_prop:NNn} places the value of \tsobj[marg]{key}, if it exists, associated with \tsobj[marg]{parsed-refA,parsed-refB}.
\end{codedescribe}
\begin{tsremark}[\color{red}Warning:]
-\tsobj[marg]{parsed-refA,parsed-refB} are the values returned by \tsobj{\starray_term_syntax:nNN}.
+\tsobj[marg]{parsed-refA,parsed-refB} should be the values returned by \tsobj{\starray_term_syntax:nNN}.
\end{tsremark}
@@ -688,7 +688,7 @@ A warning is raised (see \ref{pack:options}) in case of a \tsobj[marg]{starray-r
\tsmacro{\starray_term_syntax:nNN}{starray-ref,parsed-refA,parsed-refB}
\tsmacro{\starray_term_syntax:nNNTF}{starray-ref,parsed-refA,parsed-refB,if-true,if-false}
\end{codesyntax}
-Similar to the ones above (\tsobj{\starray_term_syntax:n}). \tsobj[marg]{parsed-refA,parsed-refB} (assumed to be two token list vars, \tsobj[meta]{tl-var}) will receive two 'internal references' that can be used in commands like \tsobj{\starray_parsed_...:NN} which expects such 'references', without having to worry about not using other \tsobj{\starray_} commands.
+Similar to the ones above (\tsobj{\starray_term_syntax:n}). \tsobj[marg]{parsed-refA,parsed-refB} (assumed to be two token list vars, \tsobj[meta]{tl-var}) will receive two 'internal references' that can be used in commands like \tsobj{\starray_parsed_...:NN} which expects such 'references', without having to worry about using another \tsobj{\starray_} command.
\end{codedescribe}
\begin{tsremark}
Once correctly parsed, \tsobj[marg]{parsed-refA,parsed-refB} can be used at 'any time' (by those few \tsobj{\starray_parsed_...:NN} associated commands).\end{tsremark}
@@ -723,9 +723,21 @@ This will test if the given \tsobj[key]{key} is present/associated with \tsobj[m
The predicate version, \tsobj{_p}, expands to either \tsobj{\prg_return_true:} or \tsobj{\prg_return_false:}.
\end{tsremark}
\begin{tsremark}[\color{red}Warning:]
-\tsobj[marg]{parsed-refA,parsed-refB} are the values returned by \tsobj{\starray_term_syntax:nNN}.
+\tsobj[marg]{parsed-refA,parsed-refB} should be the values returned by \tsobj{\starray_term_syntax:nNN}.
\end{tsremark}
+\begin{codedescribe}[code,new=2024/03/10]{\starray_get_unique_id:nN,\starray_get_unique_id:nNTF}
+\begin{codesyntax}%
+\tsmacro{\starray_get_unique_id:nN}{starray-ref,tl-var}
+\tsmacro{\starray_get_unique_id:nNTF}{starray-ref,tl-var}
+\end{codesyntax}
+\end{codedescribe}
+Gets an 'unique ID' for a given \tsobj[marg]{starray-ref} \emph{term}, it should help defining/creating uniquely identified auxiliary structures, like auxiliary property or sequence lists, since one can't (better said shouldn't, as per l3kernel) store an anonymous property/sequence list using V-expansion.
+\begin{tsremark}
+A warning is raised (see \ref{pack:options}) in case of a \tsobj[marg]{starray-ref} syntax error. The branching version doesn't raise any warning.
+\end{tsremark}
+
+
\section{Showing (debugging) starrays }\label{pack:show}
diff --git a/macros/latex/contrib/starray/latex/starray.sty b/macros/latex/contrib/starray/latex/starray.sty
index 73e07868aa..72cd150410 100644
--- a/macros/latex/contrib/starray/latex/starray.sty
+++ b/macros/latex/contrib/starray/latex/starray.sty
@@ -12,7 +12,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version {1.6} {2024/03/10}
+%% This is version {1.7} {2024/03/17}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/starray
@@ -24,8 +24,8 @@
\ProvidesExplPackage
{starray}
- {2024/03/10}
- {1.6}
+ {2024/03/17}
+ {1.7}
{A structured array/hash of properties}
%%%%%%%
@@ -38,8 +38,8 @@
{
name .code:n = {starray} ,
prefix .code:n = {starray} ,
- date .code:n = {2024/03/10},
- version .code:n = {1.6} ,
+ date .code:n = {2024/03/17},
+ version .code:n = {1.7} ,
description .code:n = {A~structured~array/hash~of~properties}
}
\cs_if_exist:NF \PkgInfo
@@ -308,7 +308,7 @@
\cs_new_protected:Npn \__starray_msg_dispatch:
{
- \seq_map_tokens:Nn \l__starray_msg_seq { }
+ \seq_map_inline:Nn \l__starray_msg_seq { ##1 }
\seq_clear:N \l__starray_msg_seq
}
@@ -446,6 +446,7 @@
\prg_generate_conditional_variant:Nnn \__starray_if_valid:n {e} {p, T, F, TF}
+
\prg_new_conditional:Npnn \starray_if_valid:n #1 {p, T, F, TF}
{
\__starray_if_valid:nTF {\l__starray_prefix_tl #1 _def_prop}
@@ -470,14 +471,10 @@
\cs_new_protected:Npn \__starray_base_new:nn #1#2
{
\int_new:c
- { \l__starray_prefix_tl #2 _cnt_int }
- \int_gzero:c
- { \l__starray_prefix_tl #2 _cnt_int }
+ { \l__starray_prefix_tl #2 _base_cnt_int }
\int_new:c
- { \l__starray_prefix_tl #2 _iter_int }
- \int_gzero:c
- { \l__starray_prefix_tl #2 _iter_int }
+ { \l__starray_prefix_tl #2 _base_iter_int }
\prop_new:c { \l__starray_prefix_tl #2 _base_prop }
@@ -488,21 +485,18 @@
is_starray = \c_true_bool ,
}
- \prop_gput:cno
+ \prop_gput:cne
{ \l__starray_prefix_tl #2 _base_prop }
{ cnt }
- { \use:c { \l__starray_prefix_tl #2 _cnt_int } }
+ { \use:c { \l__starray_prefix_tl #2 _base_cnt_int } }
- \prop_gput:cno
+ \prop_gput:cne
{ \l__starray_prefix_tl #2 _base_prop }
{ iter }
- { \use:c {\l__starray_prefix_tl #2 _iter_int} }
-
+ { \use:c {\l__starray_prefix_tl #2 _base_iter_int} }
- %% V-less : new
\prop_new:c {\l__starray_prefix_tl #2 _base_idxhash_prop}
- %% V-less : new iterhash
\prop_new:c {\l__starray_prefix_tl #2 _base_iterhash_prop}
}
@@ -529,10 +523,8 @@
\prop_clear:N \l_tmpa_prop
- %% V-less : new st_seq => defstkeys_seq
\seq_new:c { \l__starray_prefix_tl #1 _defstkeys_seq }
- %% V-less : This shall be the new defkey's holder {def}
\prop_new:c {\l__starray_prefix_tl #1 _defkeys_prop}
}
@@ -617,11 +609,6 @@
% needs protection.
\cs_new_protected:Npn \__starray_def_prop:nnn #1#2#3
{
-% \prop_get:cnN {\l__starray_prefix_tl #1 _def_prop} {def} \l_tmpa_prop
-% \prop_put:Nnn \l_tmpa_prop {#2} {#3}
-% \prop_gput:cnV {\l__starray_prefix_tl #1 _def_prop} {def} \l_tmpa_prop
-
- %% V-less : This shall be the new key's holder {def}
\prop_gput:cnn {\l__starray_prefix_tl #1 _defkeys_prop} {#2} {#3}
}
@@ -669,12 +656,11 @@
% needs protection because of \seq_if...
\cs_new_protected:Npn \__starray_def_struct:nn #1#2
{
- %% V-less : new st_seq... can be optimized by direct reference (no tmpa)
\seq_if_in:cnF {\l__starray_prefix_tl #1 _defstkeys_seq} {#2}
{
- %% V-less : new st_seq
- \seq_gput_right:cn {\l__starray_prefix_tl #1 _defstkeys_seq} {#2}
-
+ \seq_gput_right:cn
+ {\l__starray_prefix_tl #1 _defstkeys_seq}
+ {#2}
\__starray_new:e { #1 . #2}
}
@@ -691,7 +677,7 @@
%%%%
%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%
-%TODO: recurse over 'terms' to fix a 'late addtion' (after being instantiated?)
+%TODO: recurse over 'terms' to fix a 'late addition' (after being instantiated?)
\cs_new_protected:Npn \__starray_fix_terms_seq_aux:nnnn #1#2#3#4
{
@@ -704,44 +690,35 @@
}
}
+
\cs_new_protected:Npn \__starray_fix_terms_seq:nnnn #1#2#3#4
{
\prop_get:cnN
{\l__starray_prefix_tl #2 _base_prop}
{def_ref}
\l_tmpa_tl
-
- %% V-less : new st_seq
- \seq_set_eq:cc {l__starray_tmp A_seq}{\l__starray_prefix_tl \l_tmpa_tl _defstkeys_seq}
-
- %% V-less : can't be optimized. _fix_terms_ will change _defstkeys_seq
- \seq_map_tokens:cn
- {l__starray_tmp A_seq}
- {\__starray_fix_terms_seq_aux:nnnn {#1}{#2}{#4}}
+ \seq_map_inline:cn
+ {\tl_use:N \l__starray_prefix_tl \tl_use:N \l_tmpa_tl _defstkeys_seq}
+ {\__starray_fix_terms_seq_aux:nnnn {#1}{#2}{#4}{##1} }
}
+
\cs_new_protected:Npn \__starray_fix_terms:nn #1#2
{
\group_begin:
- %% V-less : and replaced by
- \prop_set_eq:cc {l__starray_tmp A_prop} {\l__starray_prefix_tl #2 _base_idxhash_prop}
-
- %% V-less : can be improved by direct reference.
- \prop_if_empty:cF {l__starray_tmp A_prop}
+ \prop_if_empty:cF {\tl_use:N \l__starray_prefix_tl #2 _base_idxhash_prop}
{
- \prop_map_tokens:cn
- {l__starray_tmp A_prop}
- {\__starray_fix_terms_seq:nnnn {#1}{#2}}
- }
-
+ \prop_map_inline:cn
+ {\tl_use:N \l__starray_prefix_tl #2 _base_idxhash_prop}
+ {\__starray_fix_terms_seq:nnnn {#1}{#2}{##1}{##2} }
+ }
\group_end:
}
\cs_generate_variant:Nn \__starray_fix_terms:nn {ee}
-
\cs_new_protected:Npn \starray_fix_terms:n #1
{
\tl_set:Ne \l_tmpb_tl {\__starray_get_root:w #1 . \q_nil \q_stop}
@@ -776,6 +753,7 @@
}
}
+
\prg_new_protected_conditional:Npnn \starray_def_struct:nn #1#2 {T, F, TF}
{
\__starray_if_valid:nTF { \l__starray_prefix_tl #1 _def_prop}
@@ -909,54 +887,47 @@
\cs_new_protected:Npn \__starray_new_term:nn #1#2
{
- \int_gincr:N
- {\prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {cnt} }
+ \int_gincr:c {\l__starray_prefix_tl #1 _base_cnt_int}
+
+ \int_gset_eq:cc
+ {\l__starray_prefix_tl #1 _base_iter_int}
+ {\l__starray_prefix_tl #1 _base_cnt_int}
- \int_gset_eq:NN
- {\prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {iter} }
- {\prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {cnt} }
+ \tl_set:Ne \l__starray_tmpa_tl
+ { \int_to_Alph:e {\int_use:c {\l__starray_prefix_tl #1 _base_cnt_int} } }
- %% V-less : new
\prop_put:cee {\l__starray_prefix_tl #1 _base_idxhash_prop}
- { \int_use:N \prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {cnt} }
- { \int_to_Alph:e { \prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {cnt} } }
+ { \int_use:c {\l__starray_prefix_tl #1 _base_cnt_int} }
+ { \l__starray_tmpa_tl }
- %% V-less : new iterhash
\prop_put:cee {\l__starray_prefix_tl #1 _base_iterhash_prop}
- { \int_use:N \prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {cnt} }
- { \int_use:N \prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {cnt} }
+ { \int_use:c {\l__starray_prefix_tl #1 _base_cnt_int} }
+ { \int_use:c {\l__starray_prefix_tl #1 _base_cnt_int} }
\tl_if_blank:nF {#2}
{
- %% V-less : new
\prop_put:cee {\l__starray_prefix_tl #1 _base_idxhash_prop}
{ #2 }
- { \int_to_Alph:e { \prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {cnt} } }
+ { \l__starray_tmpa_tl }
- %% V-less : new iter_hash
\prop_put:cee {\l__starray_prefix_tl #1 _base_iterhash_prop}
{ #2 }
- { \int_use:N \prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {cnt} }
+ { \int_use:c {\l__starray_prefix_tl #1 _base_cnt_int} }
}
- % creating the 'new property list' (aka. term)
- \tl_set:Ne \l_tmpa_tl
- { \int_to_Alph:e { \prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {cnt} } }
-
\prop_new:c
- { \l__starray_prefix_tl #1 _ \l_tmpa_tl _term_prop }
+ { \l__starray_prefix_tl #1 _ \l__starray_tmpa_tl _term_prop }
\prop_get:cnN {\l__starray_prefix_tl #1 _base_prop} {def_ref} \l_tmpb_tl
- %% V-less : replacing above
- \prop_gset_eq:cc { \l__starray_prefix_tl #1 _ \l_tmpa_tl _term_prop } {\l__starray_prefix_tl \l_tmpb_tl _defkeys_prop}
+ \prop_gset_eq:cc { \l__starray_prefix_tl #1 _ \l__starray_tmpa_tl _term_prop } {\l__starray_prefix_tl \l_tmpb_tl _defkeys_prop}
% map over 'all sub-starrays parts of def_ref -> st_seq (those starting with a dot, @st_seq)
- \seq_map_tokens:cn
+ \seq_map_inline:cn
{\l__starray_prefix_tl \l_tmpb_tl _defstkeys_seq}
{
\__starray_sub_base_new:nnn
- { \l_tmpb_tl }{ #1 _ \l_tmpa_tl }
+ { \l_tmpb_tl }{ #1 _ \l__starray_tmpa_tl } {##1}
}
}
@@ -982,6 +953,7 @@
}
}
+
\prg_new_protected_conditional:Npnn \starray_new_term:nn #1#2 {T, F, TF}
{
\__starray_parser:nnTF {\c__starray_no_idx_ending_bool}{#1}
@@ -1008,10 +980,10 @@
\cs_new_protected:Npn \__starray_incr_iter:n #1
{
\int_compare:nNnTF
- {\prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {iter}} <
- {\prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {cnt}}
+ {\use:c {\l__starray_prefix_tl #1 _base_iter_int}} <
+ {\use:c {\l__starray_prefix_tl #1 _base_cnt_int}}
{
- \int_gincr:N { \prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {iter} }
+ \int_gincr:c {\l__starray_prefix_tl #1 _base_iter_int}
}
{
% TODO: validade _rtn_bool for end user???
@@ -1019,58 +991,54 @@
}
}
+
\prg_new_protected_conditional:Npnn \__starray_set_iter:nn #1#2 {T , F , TF}
{
- \int_compare:nNnTF {#1} > {\prop_item:cn {\l__starray_prefix_tl #2 _base_prop} {cnt}}
+ \int_compare:nNnTF {#1} > { \use:c {\l__starray_prefix_tl #2 _base_cnt_int} }
{
- \int_gset_eq:NN
- { \prop_item:cn {\l__starray_prefix_tl #2 _base_prop} {iter} }
- { \prop_item:cn {\l__starray_prefix_tl #2 _base_prop} {cnt} }
+ \int_gset_eq:cc
+ {\l__starray_prefix_tl #2 _base_iter_int}
+ {\l__starray_prefix_tl #2 _base_cnt_int}
\prg_return_false:
}
{
- \int_gset:Nn
- { \prop_item:cn {\l__starray_prefix_tl #2 _base_prop} {iter} }
+ \int_gset:cn
+ {\l__starray_prefix_tl #2 _base_iter_int}
{ #1 }
\prg_return_true:
}
}
+
\prg_generate_conditional_variant:Nnn \__starray_set_iter:nn {ne} {T , F , TF}
+
\cs_new_protected:Npn \__starray_set_sub_iter:nnn #1#2#3
{
-
- %% V-less : to be replaced by
\prop_get:cecT {\l__starray_prefix_tl #2#3 _base_idxhash_prop}
- { \int_use:N \prop_item:cn {\l__starray_prefix_tl #2#3 _base_prop} {iter} }
+ { \int_use:c {\l__starray_prefix_tl #2#3 _base_iter_int } }
{ l__starray_tmp #1 A_tl }
{
- \prop_get:cnN
+ \prop_get:cnc
{\l__starray_prefix_tl #2#3 _base_prop}
{def_ref}
- \l_tmpa_tl
-
- %% V-less : new st_seq
- \seq_set_eq:cc {l__starray_tmp #1 A_seq }{ \l__starray_prefix_tl \l_tmpa_tl _defstkeys_seq }
+ { l__starray_tmp #1 Adefref_tl }
- %% V-less : could it be optimized? direct reference to defstkeys !?
- \seq_if_empty:cF {l__starray_tmp #1 A_seq }
+ \seq_if_empty:cF {\l__starray_prefix_tl \use:c { l__starray_tmp #1 Adefref_tl } _defstkeys_seq}
{
- \seq_map_variable:cNn
- { l__starray_tmp #1 A_seq }
- \l_tmpb_tl
+ \seq_map_inline:cn
+ {\l__starray_prefix_tl \use:c { l__starray_tmp #1 Adefref_tl } _defstkeys_seq}
{
\__starray_set_iter:neTF
{ 1 }
- { #2#3 _ \tl_use:c {l__starray_tmp #1 A_tl} . \l_tmpb_tl }
+ { #2#3 _ \tl_use:c {l__starray_tmp #1 A_tl} . ##1 }
{}
{}
\__starray_set_sub_iter:nne
{ #1 A }
{ #2#3 _ \tl_use:c {l__starray_tmp #1 A_tl} . }
- { \l_tmpb_tl }
+ { ##1 }
}
}
}
@@ -1086,11 +1054,10 @@
%%%%%%%%%%%%%%%
\prg_new_protected_conditional:Npnn \__starray_set_iter_from_hash:nn #1#2 {T , F, TF}
{
-% %% V-less : replacing ... iter_hash
\prop_get:cnNTF {\l__starray_prefix_tl #1 _base_iterhash_prop} {#2} \l_tmpa_tl
{
- \int_gset:Nn
- { \prop_item:cn {\l__starray_prefix_tl #1 _base_prop} {iter} }
+ \int_gset:cn
+ { \l__starray_prefix_tl #1 _base_iter_int }
{ \l_tmpa_tl }
\prg_return_true:
}
@@ -1118,6 +1085,7 @@
} % returns nothing by default
}
+
\prg_new_protected_conditional:Npnn \starray_set_iter_from_hash:nn #1#2 {T, F, TF}
{
\bool_set_true:N \l__starray_rtn_bool
@@ -1164,7 +1132,6 @@
}
-
\prg_new_protected_conditional:Npnn \starray_set_iter:nn #1#2 {T, F, TF}
{
\bool_set_true:N \l__starray_rtn_bool
@@ -1259,7 +1226,6 @@
}
-
\prg_new_protected_conditional:Npnn \starray_next_iter:n #1 {T, F, TF}
{
\bool_set_true:N \l__starray_rtn_bool
@@ -1288,49 +1254,47 @@
\bool_new:N \l__starray_iterate_bool
\cs_new_protected:Npn \starray_iterate_over:nn #1#2
- {
-
- \bool_if_exist:cF {l__starray_iterate_ #1 _bool}
- { \bool_new:c {l__starray_iterate_ #1 _bool} }
- \starray_reset_iter:nTF {#1}
- {
- \bool_gset_true:c {l__starray_iterate_ #1 _bool}
- \bool_do_while:cn {l__starray_iterate_ #1 _bool}
- {
-
- #2
-
- \starray_next_iter:nTF {#1}
- { \bool_gset_true:c {l__starray_iterate_ #1 _bool} }
- { \bool_gset_false:c {l__starray_iterate_ #1 _bool} }
- }
- }
- {
- \bool_set_false:N \l__starray_rtn_bool
- \msg_warning:nnnn {starray} {syntax / iter} {iter:6} {#1}
- }
-
+ {
+ \bool_if_exist:cF {l__starray_iterate_ #1 _bool}
+ { \bool_new:c {l__starray_iterate_ #1 _bool} }
+ \starray_reset_iter:nTF {#1}
+ {
+ \bool_gset_true:c {l__starray_iterate_ #1 _bool}
+ \bool_do_while:cn {l__starray_iterate_ #1 _bool}
+ {
+ #2
+ \starray_next_iter:nTF {#1}
+ { \bool_gset_true:c {l__starray_iterate_ #1 _bool} }
+ { \bool_gset_false:c {l__starray_iterate_ #1 _bool} }
+ }
+ }
+ {
+ \bool_set_false:N \l__starray_rtn_bool
+ \msg_warning:nnnn {starray} {syntax / iter} {iter:6} {#1}
+ }
}
+
\prg_new_protected_conditional:Npnn \starray_iterate_over:nn #1#2 {T, F, TF}
{
- \bool_if_exist:cF {l__starray_iterate_#1_bool}{\bool_new:c {l__starray_iterate_#1_bool}}
- \starray_reset_iter:nTF {#1}
- {
- \bool_gset_true:c {l__starray_iterate_#1_bool}
- \bool_do_while:cn {l__starray_iterate_#1_bool}
- {
- #2
- \starray_next_iter:nF {#1}
- %{\bool_gset_true:c {l__starray_iterate_#1_bool}}
- {\bool_gset_false:c {l__starray_iterate_#1_bool}}
- }
- \prg_return_true:
- }
- {
- \seq_clear:N \l__starray_msg_seq
- \prg_return_false:
- }
+ \bool_if_exist:cF {l__starray_iterate_#1_bool}
+ {\bool_new:c {l__starray_iterate_#1_bool}}
+ \starray_reset_iter:nTF {#1}
+ {
+ \bool_gset_true:c {l__starray_iterate_#1_bool}
+ \bool_do_while:cn {l__starray_iterate_#1_bool}
+ {
+ #2
+ \starray_next_iter:nF {#1}
+ %{\bool_gset_true:c {l__starray_iterate_#1_bool}}
+ {\bool_gset_false:c {l__starray_iterate_#1_bool}}
+ }
+ \prg_return_true:
+ }
+ {
+ \seq_clear:N \l__starray_msg_seq
+ \prg_return_false:
+ }
}
@@ -1407,7 +1371,7 @@
\tl_set:Nn #3 {}
\__starray_msg_dispatch:
\msg_warning:nnnn {starray} {syntax / prop}
- {get:1} {#1}
+ {get:2} {#1}
} % returns nothing by default
}
@@ -1436,7 +1400,6 @@
}
-
\prg_new_protected_conditional:Npnn \starray_if_in:nn #1#2 {T, F, TF}
{
\__starray_parser:nnTF {\c__starray_idx_ending_bool} {#1}
@@ -1455,7 +1418,7 @@
%%%%%%%%%%%%%%%%
%%%
-%%% WARNING: This is uses the 'last parsed term'.
+%%% WARNING: This uses the 'last parsed term'.
%%%
%%%%%%%%%%%%%%%%
\prg_new_conditional:Npnn \starray_parsed_if_in:n #1 {p, T, F, TF}
@@ -1483,18 +1446,15 @@
}
-
-
\cs_new_protected:Npn \starray_get_cnt:n #1
{
\__starray_parser:nnTF {\c__starray_no_idx_ending_bool}{#1}
{
- \int_use:N
- \prop_item:cn { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_prop } {cnt}
+ \int_use:c { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_cnt_int }
}
{
\__starray_msg_dispatch:
- \msg_warning:nnnn {starray} {syntax / prop} {get:XX} {#1}
+ \msg_warning:nnnn {starray} {syntax / prop} {get:3} {#1}
} % returns nothing by default
}
@@ -1504,10 +1464,10 @@
%%% WARNING: This uses the 'last parsed term'.
%%% It will leave cnt directly in the input stream
%%%%%%%%%%%%%%%%
+
\cs_new:Npn \starray_parsed_get_cnt:
{
- \int_use:N
- \prop_item:cn { \l__starray_prefix_tl \l__starray_parsed_ref_no_idx_ending_tl _base_prop } {cnt}
+ \int_use:c { \l__starray_prefix_tl \l__starray_parsed_ref_no_idx_ending_tl _base_cnt_int }
}
%%%%%%%%%%%%%%%%
@@ -1516,10 +1476,10 @@
%%% #2 should be \l__starray_parsed_ref_no_idx_ending_tl
%%%
%%%%%%%%%%%%%%%%
+
\cs_new:Npn \starray_parsed_get_cnt:NN #1#2
{
- \int_use:N
- \prop_item:cn { \l__starray_prefix_tl #2 _base_prop } {cnt}
+ \int_use:c { \l__starray_prefix_tl #2 _base_cnt_int }
}
@@ -1527,24 +1487,25 @@
{
\__starray_parser:nnTF {\c__starray_no_idx_ending_bool}{#1}
{
- \int_set_eq:NN
+ \int_set_eq:Nc
#2
- \prop_item:cn { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_prop } {cnt}
+ { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_cnt_int }
}
{
\__starray_msg_dispatch:
\msg_warning:nnnn {starray} {syntax / prop}
- {get:XX} {#1}
+ {get:4} {#1}
} % returns nothing by default
}
+
\prg_new_protected_conditional:Npnn \starray_get_cnt:nN #1#2 {T, F, TF}
{
\__starray_parser:nnTF {\c__starray_no_idx_ending_bool}{#1}
{
- \int_set_eq:NN
+ \int_set_eq:Nc
#2
- \prop_item:cn { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_prop } {cnt}
+ { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_cnt_int }
\prg_return_true:
}
{
@@ -1553,17 +1514,17 @@
} % returns nothing by default
}
+
\cs_new_protected:Npn \starray_get_iter:n #1
{
\__starray_parser:nnTF {\c__starray_no_idx_ending_bool}{#1}
{
- \int_use:N
- \prop_item:cn { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_prop } {iter}
+ \int_use:c { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_iter_int }
}
{
\__starray_msg_dispatch:
\msg_warning:nnnn {starray} {syntax / prop}
- {get:XX} {#1}
+ {get:5} {#1}
} % returns nothing by default
}
@@ -1573,10 +1534,11 @@
%%% WARNING: This uses the 'last parsed term'.
%%% It will leave current iter directly in the input stream
%%%%%%%%%%%%%%%%
+
\cs_new:Npn \starray_parsed_get_iter:
{
- \int_use:N
- \prop_item:cn { \l__starray_prefix_tl \l__starray_parsed_ref_no_idx_ending_tl _base_prop } {iter}
+ \int_use:c
+ { \l__starray_prefix_tl \l__starray_parsed_ref_no_idx_ending_tl _base_iter_int }
}
@@ -1586,34 +1548,37 @@
%%% #2 should be \l__starray_parsed_ref_no_idx_ending_tl
%%%
%%%%%%%%%%%%%%%%
+
\cs_new:Npn \starray_parsed_get_iter:NN #1#2
{
- \int_use:N
- \prop_item:cn { \l__starray_prefix_tl #2 _base_prop } {iter}
+ \int_use:c
+ { \l__starray_prefix_tl #2 _base_iter_int }
}
+
\cs_new_protected:Npn \starray_get_iter:nN #1#2
{
\__starray_parser:nnTF {\c__starray_no_idx_ending_bool}{#1}
{
- \int_set_eq:NN
+ \int_set_eq:Nc
#2
- \prop_item:cn { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_prop } {iter}
+ { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_iter_int }
}
{
\__starray_msg_dispatch:
\msg_warning:nnnn {starray} {syntax / prop}
- {get:XX} {#1}
+ {get:6} {#1}
} % returns nothing by default
}
+
\prg_new_protected_conditional:Npnn \starray_get_iter:nN #1#2 {T, F, TF}
{
\__starray_parser:nnTF {\c__starray_no_idx_ending_bool}{#1}
{
- \int_set_eq:NN
+ \int_set_eq:Nc
#2
- \prop_item:cn { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_prop } {iter}
+ { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_iter_int }
\prg_return_true:
}
{
@@ -1623,6 +1588,22 @@
}
+\cs_new_protected:Npn \starray_get_unique_id:nN #1#2
+ {
+ \__starray_parser:nnTF {\c__starray_no_idx_ending_bool}{#1}
+ {
+ \int_set_eq:Ne
+ #2
+ { \l__starray_parsed_ref_tl }
+ }
+ {
+ \__starray_msg_dispatch:
+ \msg_warning:nnnn {starray} {syntax / prop}
+ {get:7} {#1}
+ } % returns nothing by default
+ }
+
+
\prg_new_protected_conditional:Npnn \starray_get_unique_id:nN #1#2 {T, F, TF}
{
\__starray_parser:nnTF {\c__starray_idx_ending_bool}{#1}
@@ -1639,8 +1620,6 @@
}
-
-
\cs_new_protected:Npn \__starray_set_prop:nnn #1#2#3
{
\l__starray_put_tl {\l__starray_prefix_tl #1 _term_prop}{#2}{#3}
@@ -1669,6 +1648,7 @@
\cs_generate_variant:Nn \starray_set_prop:nnn {nnV}
+
\cs_new_protected:Npn \starray_gset_prop:nnn #1#2#3
{
\tl_set:Nn \l__starray_put_tl \prop_gput:cnn
@@ -1702,6 +1682,7 @@
\prg_generate_conditional_variant:Nnn \starray_set_prop:nnn { nnV } { p , T, F , TF }
+
\prg_new_protected_conditional:Npnn \starray_gset_prop:nnn #1#2#3 {T, F, TF}
{
\tl_set:Nn \l__starray_put_tl \prop_gput:cnn
@@ -1716,7 +1697,6 @@
}
}
-
\prg_generate_conditional_variant:Nnn \starray_gset_prop:nnn { nnV } { p , T, F , TF }
@@ -1803,7 +1783,7 @@
%%%
\cs_new:Npn \__starray_set_from_keyval_parse:nnnnn #1#2#3#4#5
{
- \tl_clear:c {l__starray_tmp #1 _tl}
+ \tl_clear_new:c {l__starray_tmp #1 _tl}
\__starray_set_parse_begin:wTF {#1}#4 [ \q_nil \q_stop
{
@@ -1817,48 +1797,41 @@
% from there #3.<#4> => {}{...} 'next #2'
% #3.<#4>_[<#4>] (idx construct from #4) 'next #3'
%
- \prop_get:cnc
+
+ \prop_get:cnN
{\l__starray_prefix_tl #2 _base_prop}
{def_ref}
- {l__starray_tmp #1 _def_prop}
-
-
- %% V-less : new st_seq
- \seq_set_eq:cc {l__starray_tmp #1 _seq}{\l__starray_prefix_tl \tl_use:c {l__starray_tmp #1 _def_prop} _defstkeys_seq}
+ \l__starray_tmp_A_tl
- %% V-less : could it be optimized? direct reference to defstkeys !?
- \seq_if_in:cnTF {l__starray_tmp #1 _seq}{#4}
+ \seq_if_in:cnTF
+ {\tl_use:N \l__starray_prefix_tl \tl_use:N \l__starray_tmp_A_tl _defstkeys_seq}
+ {#4}
{
- %% V-less : replacing above
- \prop_set_eq:cc { l__starray_tmp #1 _hash_prop } { \l__starray_prefix_tl #3 .#4 _base_idxhash_prop }
-
- \prop_get:cnc
- { \l__starray_prefix_tl #3 .#4 _base_prop }
- { iter }
- { l__starray_tmp #1 _int }
- \int_compare:nNnTF {\int_use:c {l__starray_tmp #1 _int}} < {1}
+ \int_compare:nNnTF {\int_use:c { \tl_use:N \l__starray_prefix_tl #3 .#4 _base_iter_int }} < {1}
{
\__starray_msg:nnnnn {reference / iter}
{setkeyval:2}{#2.#4}{-0-}{~(not~instantiated)}
% invalid iter / not instantiated
}
{
- \tl_set:ce
+ %%%% WARNING: is't sure it does exist? will result in a quark loop if not!
+ \prop_get:cec
+ { \tl_use:N \l__starray_prefix_tl #3 .#4 _base_idxhash_prop }
+ {\int_use:c { \tl_use:N \l__starray_prefix_tl #3 .#4 _base_iter_int }}
{ l__starray_tmp #1 _tl }
- { #3.#4 _ \int_to_Alph:e {\int_use:c {l__starray_tmp #1 _int}} }
\keyval_parse:nnn
{
\__starray_set_from_keyval_parse:neen
{ #1 A }
{ #3.#4 }
- { \tl_use:c { l__starray_tmp #1 _tl } }
+ { #3.#4 _ \tl_use:c { l__starray_tmp #1 _tl } }
}
{
\__starray_set_from_keyval_parse:neenn
{ #1 A }
{ #3.#4 }
- { \tl_use:c { l__starray_tmp #1 _tl } }
+ { #3.#4 _ \tl_use:c { l__starray_tmp #1 _tl } }
}
{ #5 }
@@ -1868,38 +1841,30 @@
\__starray_set_prop:nnn {#3}{#4}{#5}
}
}
- {
- \prop_get:cnc
+ {
+ \prop_get:cnN
{\l__starray_prefix_tl #2 _base_prop}
{def_ref}
- {l__starray_tmp #1 _def_prop}
-
+ \l__starray_tmp_A_tl
- %% V-less : new st_seq
- \seq_set_eq:cc {l__starray_tmp #1 _seq}{\l__starray_prefix_tl \tl_use:c {l__starray_tmp #1 _def_prop} _defstkeys_seq}
-
- %% V-less : could it be optimized? direct reference to defstkeys !?
\seq_if_in:ceTF
- { l__starray_tmp #1 _seq } { \tl_use:c{l__starray_tmp #1 :B_tl} }
+ {\tl_use:N \l__starray_prefix_tl \tl_use:N \l__starray_tmp_A_tl _defstkeys_seq}
+ { \tl_use:c{l__starray_tmp #1 :B_tl} }
{
- %% V-less : could it be optimized? direct reference !?
- \prop_set_eq:cc
- { l__starray_tmp #1 _hash_prop }
+ \prop_get:ceNTF
{ \l__starray_prefix_tl #3. \tl_use:c{l__starray_tmp #1 :B_tl} _base_idxhash_prop }
-
- \tl_set:ce
- { l__starray_tmp #1 _idx_tl }
- {
- #3 . \tl_use:c{l__starray_tmp #1 :B_tl} _
- \prop_item:ce
- { l__starray_tmp #1 _hash_prop }
- { \tl_use:c{ l__starray_tmp #1 :A_tl } }
- }
- \tl_put_left:cn { l__starray_tmp #1 :B_tl } { #3 . }
- \prop_if_in:ceTF
- { l__starray_tmp #1 _hash_prop }
{ \tl_use:c{l__starray_tmp #1 :A_tl}}
+ \l__starray_tmp_B_tl
{
+ %% here should be all the remaining code. 'everything fine so far'.
+ \tl_set:ce
+ { l__starray_tmp #1 _idx_tl }
+ {
+ #3 . \tl_use:c{l__starray_tmp #1 :B_tl} _
+ \tl_use:N \l__starray_tmp_B_tl
+ }
+ \tl_put_left:cn { l__starray_tmp #1 :B_tl } { #3 . }
+
\keyval_parse:nnn
{
\__starray_set_from_keyval_parse:neen
@@ -1914,9 +1879,10 @@
{ \tl_use:c { l__starray_tmp #1 _idx_tl } }
}
{ #5 }
-
+
}
{
+ %% if we got here, it doesn't exist. wrong idx,
\__starray_msg:nneee {reference / iter}
{setkeyval:3} {#2.#4} {\tl_use:c{l__starray_tmp #1 :A_tl}} {}
% invalid hash
@@ -1977,12 +1943,14 @@
\__starray_set_from_keyval:nn {#1}{#2}
}
+
\cs_new_protected:Npn \starray_gset_from_keyval:nn #1#2
{
\tl_set:Nn \l__starray_put_tl \prop_gput:cnn
\__starray_set_from_keyval:nn {#1}{#2}
}
+
%%%
%%% small surprise, it was possible to _protected it... TODO: further test it.
%%%
@@ -2006,12 +1974,14 @@
{ \prg_return_false: }
}
+
\prg_new_protected_conditional:Npnn \starray_set_from_keyval:nn #1#2 {T, F, TF}
{
\tl_set:Nn \l__starray_put_tl \prop_put:cnn
\__starray_set_from_keyvalTF:nn {#1}{#2}
}
+
\prg_new_protected_conditional:Npnn \starray_gset_from_keyval:nn #1#2 {T, F, TF}
{
\tl_set:Nn \l__starray_put_tl \prop_gput:cnn
@@ -2147,10 +2117,8 @@
{ % assuming it is to set/get a property
\__starray_if_valid_idx:eeTF
{
- \int_use:N
- \prop_item:cn
- {\l__starray_prefix_tl \l__starray_parsed_ref_tl _base_prop}
- {iter}
+ \int_use:c
+ { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_iter_int }
}
{
\l__starray_parsed_idx_tl
@@ -2168,10 +2136,8 @@
{
\__starray_if_valid_idx:eeTF
{
- \int_use:N
- \prop_item:cn
- {\l__starray_prefix_tl \l__starray_parsed_ref_tl _base_prop}
- {iter}
+ \int_use:c
+ { \l__starray_prefix_tl \l__starray_parsed_ref_tl _base_iter_int }
}
{
\l__starray_parsed_idx_tl
@@ -2205,6 +2171,7 @@
} % syntax/ref err.
}
+
%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%
%%%%
@@ -2258,6 +2225,7 @@
}
}
+
\prg_new_protected_conditional:Npnn \starray_term_syntax:nNN #1#2#3 {T, F, TF}
{
\__starray_parser:nnTF {\c__starray_idx_ending_bool}{#1}
@@ -2272,6 +2240,7 @@
}
}
+
\cs_new_protected:Npn \starray_term_syntax:n #1
{
\__starray_parser:nnTF {\c__starray_idx_ending_bool}{#1}
@@ -2283,6 +2252,7 @@
}
}
+
\cs_new_protected:Npn \starray_term_syntax:nNN #1#2#3
{
\__starray_parser:nnTF {\c__starray_idx_ending_bool}{#1}
@@ -2327,6 +2297,7 @@
}
}
+
\cs_new_protected:Npn \__starray_show_def:nnn #1#2#3
{
\group_begin:
@@ -2337,18 +2308,15 @@
\use:nn { ~ } { ~ } =>
}
- %% V-less : direct reference to _defkeys
- \prop_map_tokens:cn
+ \prop_map_inline:cn
{\l__starray_prefix_tl #2#3 _defkeys_prop}
- {\__starray_show_def_item:nnn {#1}}
-
+ {\__starray_show_def_item:nnn {#1} {##1} {##2} }
- %% V-less : direct reference to _defstkeys
\seq_if_empty:cF { \l__starray_prefix_tl #2#3 _defstkeys_seq}
{
- \seq_map_tokens:cn
+ \seq_map_inline:cn
{ \l__starray_prefix_tl #2#3 _defstkeys_seq}
- { \__starray_show_def:nnn { #1 \use:nnn { ~ } { ~ } { ~ }} { #2#3. } }
+ { \__starray_show_def:nnn { #1 \use:nnn { ~ } { ~ } { ~ }} { #2#3. } {##1} }
}
\group_end:
}
@@ -2371,6 +2339,7 @@
{ \tl_use:N \l__starray_tmpa_tl }
}
+
\cs_new_protected:Npn \starray_show_def_in_text:n #1
{
\tl_clear:N \l__starray_tmpa_tl
@@ -2398,7 +2367,6 @@
%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%
-
\cs_new_protected:Npn \__starray_show_term_item:nnnnn #1#2#3#4#5
{
\group_begin:
@@ -2409,42 +2377,38 @@
\use:nn { ~ } { ~ } =>
}
- \prop_map_tokens:cn
+ \prop_map_inline:cn
{\l__starray_prefix_tl #2 #3 _ #5 _term_prop}
- {\__starray_show_def_item:nnn {#1 }}
+ {\__starray_show_def_item:nnn {#1 } {##1}{##2}}
\prop_get:cnN
{ \l__starray_prefix_tl #2 #3 _base_prop }
{ def_ref }
\l_tmpa_tl
- %% V-less : this can be optimized: direct reference to defstkeys_seq
\seq_if_empty:cTF { \l__starray_prefix_tl \l_tmpa_tl _defstkeys_seq }
{}
{
- \seq_map_tokens:cn
+ \seq_map_inline:cn
{ \l__starray_prefix_tl \l_tmpa_tl _defstkeys_seq }
- { \__starray_show_terms:nen { #1 \use:nnn { ~ } { ~ } { ~ }} { #2 #3_#5. } }
- }
-
-
+ { \__starray_show_terms:nen { #1 \use:nnn { ~ } { ~ } { ~ }} { #2 #3_#5. } {##1} }
+ }
\group_end:
}
-
\cs_new_protected:Npn \__starray_show_terms:nnn #1#2#3
{
\group_begin:
- %% V-less : direct reference
- \prop_map_tokens:cn
+ \prop_map_inline:cn
{\l__starray_prefix_tl #2 #3 _base_idxhash_prop}
- {\__starray_show_term_item:nnnnn {#1}{#2}{#3}}
+ {\__starray_show_term_item:nnnnn {#1}{#2}{#3}{##1}{##2}}
\group_end:
}
\cs_generate_variant:Nn \__starray_show_terms:nnn {nen}
+
%%%%%%%%%%%%%%%
%%%%
%%%% \starray_show_terms
@@ -2463,6 +2427,7 @@
{ \tl_use:N \l__starray_tmpa_tl }
}
+
\cs_new_protected:Npn \starray_show_terms_in_text:n #1
{
\tl_clear:N \l__starray_tmpa_tl