summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/colorist
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-04-05 03:01:24 +0000
committerNorbert Preining <norbert@preining.info>2022-04-05 03:01:24 +0000
commita4e931576165d0a4a143915f4725399272e06fee (patch)
treeef5b6d71c2223b9f58e61fbb25423d4042430198 /macros/latex/contrib/colorist
parent7548e4d37c2aaefd32fe0a9bcd83f8e71326dde1 (diff)
CTAN sync 202204050301
Diffstat (limited to 'macros/latex/contrib/colorist')
-rw-r--r--macros/latex/contrib/colorist/colorart.cls3
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls3
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.pdfbin101019 -> 101825 bytes
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.tex16
-rw-r--r--macros/latex/contrib/colorist/colorist-fancy.sty113
-rw-r--r--macros/latex/contrib/colorist/colorist.sty2
6 files changed, 107 insertions, 30 deletions
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index fd6bc08f62..98e55b01ae 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplClass
{colorart}
- {2022/03/28} {}
+ {2022/04/03} {}
{A colorful article style}
\tl_const:Nn \l__colorclass_base_class_tl { article }
@@ -119,6 +119,7 @@
\RequirePackage { colorist }
+\raggedbottom
\hfuzz=2pt
\vfuzz=2pt
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index 07389ebc5c..9e43b291af 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplClass
{colorbook}
- {2022/03/28} {}
+ {2022/04/03} {}
{A colorful book style}
\tl_const:Nn \l__colorclass_base_class_tl { book }
@@ -119,6 +119,7 @@
\RequirePackage { colorist }
+\raggedbottom
\hfuzz=2pt
\vfuzz=2pt
diff --git a/macros/latex/contrib/colorist/colorist-doc.pdf b/macros/latex/contrib/colorist/colorist-doc.pdf
index e187bcbc51..9e0720ff4c 100644
--- a/macros/latex/contrib/colorist/colorist-doc.pdf
+++ b/macros/latex/contrib/colorist/colorist-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/colorist/colorist-doc.tex b/macros/latex/contrib/colorist/colorist-doc.tex
index 064648846c..5a1e6d3955 100644
--- a/macros/latex/contrib/colorist/colorist-doc.tex
+++ b/macros/latex/contrib/colorist/colorist-doc.tex
@@ -37,7 +37,7 @@
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
{part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href,
- color,NameTheorem,CreateTheorem,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
+ color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -91,7 +91,7 @@
%%================================
\begin{document}
-\def\PackageVersion{2022/03/28}
+\def\PackageVersion{2022/04/03}
\title{{\normalfont\bfseries\color{main-text}\colorist{}}\\write your articles or books in a colorful way}
\author{Jinwen XU}
@@ -104,7 +104,7 @@
\begin{abstract}
\colorist{} is a series of styles and classes for you to typeset your articles or books in a colorful manner. The original intention in designing this series was to write drafts and notes that look colorful yet not dazzling. With the help of the \ProjLib{} toolkit, also developed by the author, the classes provided here have multi-language support, preset theorem-like environments with clever reference support, and many other functionalities. Notably, using these classes, one can organize the author information in the \AmS{} fashion, makes it easy to switch to journal classes later for publication.
- Finally, this documentation is typeset using the \colorart{} class (with the option \texttt{allowbf}). You can think of it as a short introduction and demonstration.
+ Finally, this documentation is typeset using the \colorart{} class (with the option \texttt{use boldface}). You can think of it as a short introduction and demonstration.
\end{abstract}
@@ -175,7 +175,7 @@ Let's first look at a complete example of \colorart{} (the same works for \lebha
\maketitle
\begin{abstract}
- Ceci est un résumé. \dnf<(*\meta{some hint}*)>
+ Ceci est un résumé. \DNF<(*\meta{some hint}*)>
\end{abstract}
\begin{keyword}
AAA, BBB, CCC, DDD, EEE
@@ -267,7 +267,7 @@ In addition, you may also write in the \AmS{} fashion, i.e.:
\LevelThreeTitle{Draft marks}
\begin{code}
-\dnf<(*\meta{some hint}*)>
+\DNF<(*\meta{some hint}*)>
\end{code}
When you have some places that have not yet been finished yet, you can mark them with this command, which is especially useful during the draft stage.
@@ -380,7 +380,7 @@ In the next section, we will go through the options available.
\begin{tip}
During the draft stage, it is recommended to use the \verb|fast| option to speed up compilation. When in \verb|fast| mode, there will be a watermark ``DRAFT'' to indicate that you are currently in the draft mode.
\end{tip}
- \item \texttt{allowbf}
+ \item \texttt{use boldface}
\begin{itemize}
\item Allow boldface. When this option is enabled, the main title, the titles of all levels and the names of theorem-like environments will be bolded.
\end{itemize}
@@ -530,9 +530,9 @@ For aesthetics, adjacent definitions will be connected together automatically:
\LevelTwoTitle{Draft mark}
-You can use \lstinline|\dnf| to mark the unfinished part. For example:
+You can use \lstinline|\DNF| to mark the unfinished part. For example:
\begin{itemize}
- \item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
+ \item \lstinline|\DNF| or \lstinline|\DNF<...>|. The effect is: \DNF~ or \DNF<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\DNF} in French mode.
\end{itemize}
\LevelTwoTitle{Title, abstract and keywords}
diff --git a/macros/latex/contrib/colorist/colorist-fancy.sty b/macros/latex/contrib/colorist/colorist-fancy.sty
index cb625ce8ac..5f69f0857a 100644
--- a/macros/latex/contrib/colorist/colorist-fancy.sty
+++ b/macros/latex/contrib/colorist/colorist-fancy.sty
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{colorist-fancy}
- {2022/03/28} {}
+ {2022/04/03} {}
{The fancy style of colorist}
\@ifpackageloaded { colorist } {}
@@ -403,10 +403,10 @@
{
\titlecontents{chapter}
[2em] % i.e., 0em (part) + 2em
- {\addvspace{1pc}\normalfont\color{maintheme}\sffamily \colorist_bfseries: }
- {\contentslabel{2em}}
- {\scshape\hspace*{-2em}}
- {\titlerule*[10pt]{\parbox{3pt}{\hspace*{-.25pt}\textcolor{main-text!15!paper}{.}}}\color{maintheme}\contentspage}
+ {\addvspace{1pc} \color{maintheme} \normalfont \sffamily \colorist_bfseries: \scshape }
+ {\contentslabel[ \raisebox{-.03\baselineskip}{ \large \normalfont \sffamily \colorist_bfseries: \thecontentslabel } ]{2em}}
+ {\hspace*{-2em}}
+ {\titlerule*[10pt]{\parbox{3pt}{\hspace*{-.25pt}\textcolor{main-text!15!paper}{.}}}\color{maintheme}\normalfont\sffamily\contentspage}
\titlecontents{section}
[4em] % i.e., 2em (chapter) + 2em
{\addvspace{.3pc}\normalfont\color{maintheme}\sffamily}
@@ -429,10 +429,10 @@
{
\titlecontents{section}
[2em] % i.e., 0em (part) + 2em
- {\addvspace{.3pc}\normalfont\color{maintheme}\sffamily}
- {\contentslabel{1.75em}}
+ {\addvspace{.3pc} \color{maintheme} \normalfont \sffamily \scshape }
+ {\contentslabel[ { \normalfont \sffamily \thecontentslabel } ]{1.75em}}
{\hspace*{-1.75em}}
- {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{maintheme}\contentspage}
+ {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{maintheme}\normalfont\sffamily\contentspage}
\titlecontents{subsection}
[4.5em] % i.e., 2em (section) + 2.5em
{\addvspace{.15pc}\normalfont\sffamily}
@@ -479,8 +479,8 @@
, PT = Esta~página~foi~intencionalmente~deixada~em~branco
, BR = Esta~página~foi~intencionalmente~deixada~em~branco
, ES = Esta~página~se~ha~dejado~intencionadamente~en~blanco
- , CN = 此页为有意留为空白
- , TC = 此頁為有意留為空白
+ , CN = \ziju{0.2} 此页为有意留为空白
+ , TC = \ziju{0.2} 此頁為有意留為空白
, JP = このページは意図的に空白にしてあります
, RU = Эта~страница~намеренно~оставлена~пустой
}
@@ -492,12 +492,76 @@
\hook_gput_next_code:nn { shipout/background }
{
\put(0.5\paperwidth,-0.5\paperheight){
- \makebox[0pt]{\large\color{main-text!10!paper}\bl@nkpagetext}}
+ \makebox[0pt]{\large\color{main-text!10!paper}\g_colorist_title_font_common_tl\bl@nkpagetext}}
}
\null\newpage\fi\fi
}
%%================================
+%% Index
+%%================================
+\RequirePackage { imakeidx }
+\makeindex[intoc]
+
+\RequirePackage { silence }
+\ExplSyntaxOff
+\WarningFilter{latex}{Writing or overwriting file}
+\begin{filecontents*}[overwrite]{\jobname.mst}
+delim_0 "\\IndexDotfill " % Filler between section heading and page number
+delim_1 "\\IndexDotfill " % Filler between subsection heading and page number
+headings_flag 1
+heading_prefix "\\IndexHeading{"
+heading_suffix "}\n"
+\end{filecontents*}
+\ExplSyntaxOn
+
+\projlib_langauge_define_multilingual_text:Nn \index_symbols_name
+ {
+ , EN = Symbols
+ , FR = Symboles
+ , DE = Symbole
+ , IT = Simboli
+ , PT = Símbolos
+ , BR = Símbolos
+ , ES = Símbolos
+ , CN = 符号
+ , TC = 符號
+ , JP = 記号
+ , RU = Символы
+ }
+
+\newcommand*{\IndexDotfill}
+ {
+ \nobreakspace\nobreakspace
+ \titlerule*[.67em]{\textcolor{main-text!15!paper}{.}}
+ \nobreakspace\nobreakspace
+ }
+\newcommand*{\IndexHeading}[1]
+ {
+ \str_if_eq:nnTF { #1 } { Symbols }
+ { \tl_set:Nn \l_tmpa_tl { \index_symbols_name } }
+ { \tl_set:Nn \l_tmpa_tl { #1 } }
+ \tikz\node[
+ rounded~corners=5pt,
+ draw=maintheme,
+ fill=maintheme!10,
+ line~width=1pt,
+ inner~sep=5pt,
+ align=center,
+ font=\large\sffamily\colorist_bfseries:,
+ minimum~width=\linewidth-\pgflinewidth,
+ ] { \l_tmpa_tl };
+ \nopagebreak
+ \par
+ \vspace{.3\baselineskip}
+ }
+\renewcommand*{\indexspace}
+ {
+ \par
+ \vspace{2pc~plus~.5pc~minus~.3pc}
+ }
+
+%%================================
%% Draft mark
%%================================
\RequirePackage { projlib-draft }
@@ -505,8 +569,10 @@
%%================================
%% Icons
%%================================
-\RequirePackage{tikz}
-\newcommand{\ideabulb}[2][0.15]
+\RequirePackage { tikz }
+\NewDocumentCommand \colorist_icon_ideabulb:w { O{0.15} m }
+ % #1 = scale
+ % #2 = color
{
\scalebox{#1}{
\begin{tikzpicture}
@@ -523,7 +589,9 @@
\end{tikzpicture}}
}
-\newcommand{\questionmark}[2][0.15]
+\NewDocumentCommand \colorist_icon_questionmark:w { O{0.15} m }
+ % #1 = scale
+ % #2 = color
{
\scalebox{#1}{
\begin{tikzpicture}
@@ -607,12 +675,15 @@
{
\providecommand{\phantomsection}{}
\RequirePackage { url }
- \newcommand{\href}[2]{#2}
+ \providecommand{\href}[2]{#2}
+ \providecommand{\texorpdfstring}[2]{#1}
}
{
- \PassOptionsToPackage { hidelinks,linktoc=all } { hyperref }
- \RequirePackage { bookmark }
\RequirePackage { hyperref }
+ \RequirePackage { bookmark }
+ \hypersetup{ hidelinks, linktoc = all }
+ \bookmarksetup{ numbered }
+ \renewcommand\Hy@numberline[1]{#1.~}
}
@@ -811,7 +882,8 @@
\reversemarginpar
\fi
\mparadjust{-.25em}
- \marginnote{\ideabulb[0.3]{orange}
+ \marginnote{
+ \colorist_icon_ideabulb:w [0.3] {orange}
\bool_if:NTF \l__colorist_is_book_bool
{
\hspace*{-.2em}
@@ -830,7 +902,8 @@
\reversemarginpar
\fi
\mparadjust{-.25em}
- \marginnote{\questionmark[0.3]{purple}
+ \marginnote{
+ \colorist_icon_questionmark:w [0.3] {purple}
\bool_if:NTF \l__colorist_is_book_bool
{
\hspace*{-.2em}
@@ -1027,6 +1100,8 @@
\theoremstyle{simple}
+\hook_gput_code:nnn { env/quote/begin } { colorist } { \small }
+
%%================================
%% Title block style
%%================================
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index ad936a1081..1095910ca9 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -19,7 +19,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{colorist}
- {2022/03/28} {}
+ {2022/04/03} {}
{A colorful style for articles and books}
\keys_define:nn { colorist }