summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/colorist
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-08-09 03:00:45 +0000
committerNorbert Preining <norbert@preining.info>2021-08-09 03:00:45 +0000
commit36320cbe81185b9897691aaae9caae090e675fd0 (patch)
tree1115dfe769a208115a326db29c6d07e33e2a1774 /macros/latex/contrib/colorist
parented204b296810be74994f70f76b7f5b849f6e9ecb (diff)
CTAN sync 202108090300
Diffstat (limited to 'macros/latex/contrib/colorist')
-rw-r--r--macros/latex/contrib/colorist/README.md30
-rw-r--r--macros/latex/contrib/colorist/colorart.cls2
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls2
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.pdfbin95143 -> 94096 bytes
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.tex13
-rw-r--r--macros/latex/contrib/colorist/colorist.sty114
6 files changed, 92 insertions, 69 deletions
diff --git a/macros/latex/contrib/colorist/README.md b/macros/latex/contrib/colorist/README.md
index 05164cf1d0..2b54c97fa2 100644
--- a/macros/latex/contrib/colorist/README.md
+++ b/macros/latex/contrib/colorist/README.md
@@ -2,7 +2,9 @@
# `colorist` bundle: write you documents in a colorful way
-A collection of styles and classes that helps you typesetting articles and books
+## Introduction
+
+`colorist` is a collection of styles and classes that helps you typesetting articles and books
with a colorful design. It mainly consists of two parts.
- Main part:
@@ -15,7 +17,7 @@ with a colorful design. It mainly consists of two parts.
(European and Brazilian) and Spanish typesetting.
-- Derivative part (they have separate pages on CTAN):
+- Derivative part:
- `lebhart.cls` : enhanced version of `colorart`
- `beaulivre.cls` : enhanced version of `colorbook`
@@ -25,6 +27,30 @@ with a colorful design. It mainly consists of two parts.
Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish
typesetting, and also use more beautiful fonts.
+### How to get these files
+You can get the `.sty` and `.cls` files mentioned above simply by compiling
+`colorist.ins`:
+```
+latex colorist.ins
+```
+To get the `.tex` source files of the documentation, compile `colorist-doc.ins`:
+```
+latex colorist-doc.ins
+```
+
+## Features
+
+Compared with usual document classes, it has the following features:
+
+- Native multi-language support: Chinese (simplified and traditional), English,
+ French, German, Italian, Japanese, Portuguese (European and Brazilian),
+ Russian and Spanish
+ > In particular, for simplified Chinese, traditional Chinese and Japanese,
+ > the fonts of the corresponding glyphs can be automatically switched
+- Ready-to-use theorem-like environments, also with multi-language support
+- Support both the standard and the AMS writing fashion
+
+
# License
This work is released under the LaTeX Project Public License, v1.3c or later.
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index 5d45070c7a..4f2a247c67 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{colorart}
- [2021/07/30 A colorful article style]
+ [2021/08/08 A colorful article style]
\def\colorclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index 798ec0bcb3..cefcb450bb 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{colorbook}
- [2021/07/30 A colorful book style]
+ [2021/08/08 A colorful book style]
\def\colorclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
diff --git a/macros/latex/contrib/colorist/colorist-doc.pdf b/macros/latex/contrib/colorist/colorist-doc.pdf
index 56badd7b1f..365d097b77 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 e17a0ba207..d0782450d0 100644
--- a/macros/latex/contrib/colorist/colorist-doc.tex
+++ b/macros/latex/contrib/colorist/colorist-doc.tex
@@ -93,9 +93,9 @@
\title{\colorist{}, write your articles or books in a colorful way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\colorist{} 2021/07/30}}
+\thanks{Corresponding to: \texttt{\colorist{} 2021/08/08}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
-\date{July 2021, Beijing}
+\date{August 2021, Beijing}
\maketitle
@@ -116,6 +116,7 @@
In order to use the package or classes described here, you need to:
\begin{itemize}
\item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{colorist} and \texttt{projlib} are correctly installed in your \TeX{} system.
+ \item download and install the required fonts if needed.
\item be familiar with the basic usage of \LaTeX{}, and knows how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
\end{itemize}
@@ -189,7 +190,6 @@ If you find this example a little complicated, don't worry. Let's now look at th
\LevelThreeTitle{Initialization}
-\medskip
\begin{code}
\documentclass{colorart}
\usepackage{ProjLib}
@@ -199,7 +199,6 @@ Initialization is straightforward. The first line loads the document class \colo
\LevelThreeTitle{Set the language}
-\medskip
\begin{code}
\UseLanguage{French}
\end{code}
@@ -212,7 +211,6 @@ For detailed description of this command and more related commands, please refer
\LevelThreeTitle{Title, author information, abstract and keywords}
-\medskip
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
@@ -262,7 +260,6 @@ In addition, you may also write in the \AmS{} fashion, i.e.:
\LevelThreeTitle{Draft marks}
-\medskip
\begin{code}
\dnf<(*\meta{some hint}*)>
\end{code}
@@ -271,7 +268,6 @@ When you have some places that have not yet been finished yet, you can mark them
\LevelThreeTitle{Theorem-like environments}
-\medskip
\begin{code}
\begin{theorem}\label{thm:abc}
Ceci est un théorème.
@@ -488,7 +484,6 @@ By default, when referenced, the name of the theorem matches the current context
\UseLanguage{English}
-\bigskip
The following are the main styles of theorem-like environments:
\begin{theorem}
Theorem style: theorem, proposition, lemma, corollary, ...
@@ -656,10 +651,12 @@ The author information can contain multiple groups, written as:
Among them, the mutual order of \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| is not important.
+\clearpage
\LevelOneTitle{Known issues}
\begin{itemize}[itemsep=.6em]
\item The font settings are still not perfect.
+ \item The TOC design does not look very nice.
\item Since many features are based on the \ProjLib{} toolkit, \colorist{} (and hence \colorart{}, \lebhart{} and \colorbook{}, \beaulivre{}) inherits all its problems. For details, please refer to the ``Known Issues'' section of the \ProjLib{} documentation.
\item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur.
\item There are still many things that can be optimized in the code.
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index 354006dc4b..f5f9766e09 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesPackage{colorist}
- [2021/07/30 A colorful style for articles and books]
+ [2021/08/08 A colorful style for articles and books]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{%
@@ -71,6 +71,7 @@
\ifdefined\c@chapter\IsBooktrue\else\IsBookfalse\fi
\let\colorist@sffamily\sffamily
+\let\colorist@scshape\scshape
\let\colorist@textsc\textsc
%%================================
@@ -79,7 +80,7 @@
\RequirePackage{anyfontsize}
\newcommand{\partfont}{\conditionalbfseries\colorist@sffamily}
-\newcommand{\chapfont}{\conditionalbfseries\colorist@sffamily}
+\newcommand{\chapfont}{\conditionalbfseries\colorist@sffamily\colorist@scshape}
\newcommand{\secfont}{\conditionalbfseries\colorist@sffamily}
\newcommand{\subsecfont}{\conditionalbfseries\colorist@sffamily}
\newcommand{\subsubsecfont}{\conditionalbfseries\colorist@sffamily}
@@ -169,7 +170,7 @@
\gappto{\PJLlang@langconfig@common}{%
\renewcommand{\partstring}{\MakeUppercase{{\partname~\protect\thepart}}}%
}
-\gappto{\PJLlang@langconfig@chinese}{%
+\gappto{\PJLlang@langconfig@schinese}{%
\renewcommand{\partstring}{第~\thepart~部分}%
}
\gappto{\PJLlang@langconfig@tchinese}{%
@@ -184,13 +185,25 @@
\titleclass{\part}{top} % make part like a chapter
\titleformat{\part}[display]
{\partfont\filleft}
- {\partstring}
+ {%
+ \thispagestyle{empty}%
+ \begin{tikzpicture}[remember picture,overlay]
+ \fill[maintheme!10!paper] (current page.north west) rectangle (current page.south east);
+ \node at ($(current page.north west)+(15em,-15em)$) {\normalfont\textcolor{maintheme}{\scalebox{12}{\thepart}}};
+ \end{tikzpicture}%
+ }
{1em}
{\fontsize{20}{0}\selectfont\MakeUppercase{#1}}
\titleformat{name=\part,numberless}[display]
{% \phantomsection\addcontentsline{toc}{part}{#1}%
\partfont\filleft}
- {\phantom{\MakeUppercase{\partname}}}
+ {%
+ \thispagestyle{empty}%
+ \begin{tikzpicture}[remember picture,overlay]
+ \fill[maintheme!10!paper] (current page.north west) rectangle (current page.south east);
+ \node at ($(current page.north west)+(15em,-15em)$) {\normalfont\textcolor{maintheme}{\scalebox{12}{$*$}}};
+ \end{tikzpicture}%
+ }
{1em}
{\fontsize{20}{0}\selectfont\MakeUppercase{#1}}
\titlespacing*{\part}{0pt}{5em}{6em}
@@ -207,63 +220,48 @@
}
%% Chapter
- \newlength{\colorist@chapboxwidth}
-
- \newcommand{\MakeChapBox}[2]{%
- \settowidth{\colorist@chapboxwidth}{#1}
- \begin{tcolorbox}[
- enhanced,
- skin = bicolor,
- frame engine = path,
- % sharp corners = all,
- width = 0.9\textwidth,
- top = 4mm, bottom = 4mm,
- arc = .5mm,
- sidebyside,
- frame hidden,
- boxrule = 0mm,
- lefthand width = 1.5\colorist@chapboxwidth,
- colupper = white,
- colback = maintheme!80!paper,
- colbacklower = maintheme!20!paper,
- sidebyside align=center,
- halign=center]
- \Huge #1%
- \tcblower%
- #2%
- \end{tcolorbox}%
+ \newcommand{\TheChapter}[2]{%
+ \tcbsidebyside[enhanced,sidebyside adapt=right,sidebyside align=bottom,
+ colback=paper,frame hidden,
+ segmentation code={
+ \filldraw[maintheme] (segmentation.north)
+ -- ($(segmentation.east)-(12pt,0)$)
+ -- ($(segmentation.west)+(12pt,0)$)
+ -- (segmentation.south);}
+ ]{\filleft#2}{\normalfont\textcolor{maintheme}{\scalebox{4}{#1}}}
}
- \newcommand{\MakeChapBoxSingle}[1]{%
+ \newcommand{\TheChapterSingle}[1]{%
\begin{tcolorbox}[
enhanced,
- width = 0.7\textwidth,
- % sharp corners = all,
- top = 4mm, bottom = 4mm,
- arc = .5mm,
- frame hidden,
- boxrule = 0mm,
- colback = maintheme!20!paper,
+ width = 0.67\textwidth,
+ colback=paper,frame hidden,
halign=center]
#1
+ \vspace{-.6em}
+ \begin{center}
+ \begin{tikzpicture}
+ \filldraw[maintheme] (-4em,0) -- (4em,0) -- (0,-.1em) -- (0,.1em);
+ \end{tikzpicture}
+ \end{center}
\end{tcolorbox}
}
\titleformat{name=\chapter}
- {\filright\chapfont\huge} % Format
+ {\chapfont\huge} % Format
{} % Label
{0mm} % Sep
- {\MakeChapBox{\thechapter}{#1}} % Before-code
+ {\TheChapter{\thechapter}{#1}} % Before-code
\titlespacing*{name=\chapter}
{0em}{*2}{0em} % {left}{before-sep}{after-sep}
\titleformat{name=\chapter, numberless}
- {\filcenter\chapfont\huge} % Format
- {} % Label
- {0mm} % Sep
- {\MakeChapBoxSingle{#1}} % Before-code
+ {\filcenter\chapfont\huge}
+ {}
+ {0mm}
+ {\TheChapterSingle{#1}}
\titlespacing*{name=\chapter, numberless}
- {0em}{*2}{0em} % {left}{before-sep}{after-sep}
+ {0em}{*2}{0em}
%% Section
\titleformat{\section}
@@ -327,7 +325,7 @@
\titlespacing{\section}{0pt}{\baselineskip}{.6\baselineskip}
\titlespacing{\subsection}{0pt}{.75\baselineskip}{.4\baselineskip}
-\titlespacing{\subsubsection}{0pt}{.5\baselineskip}{.2\baselineskip}
+\titlespacing{\subsubsection}{0pt}{.6\baselineskip}{.3\baselineskip}
%%================================
%% TOC format
@@ -336,7 +334,7 @@
\titlecontents{part}
[0em]
{\addvspace{1.5pc}\filcenter\colorist@sffamily}
- {\thecontentslabel\nopagebreak\\\nopagebreak\uppercase}
+ {{\normalfont\color{maintheme}\thecontentslabel}\nopagebreak\\\nopagebreak\uppercase}
{}
{} % without page number
[\addvspace{.5pc}]
@@ -360,10 +358,10 @@
{\hspace*{-2.75em}}
{\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\color{maintext!45!paper}\contentspage}
\titlecontents{subsubsection}
- [9em] % i.e., 7em (subsection) + 2em
+ [10em] % i.e., 7em (subsection) + 3em
{\normalfont\colorist@sffamily}
- {\contentslabel{2.75em}}
- {\hspace*{-2.75em}}
+ {\contentslabel{3.25em}}
+ {\hspace*{-3.25em}}
{\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\color{maintext!45!paper}\contentspage}
}{
\titlecontents{section}
@@ -375,11 +373,11 @@
\titlecontents{subsection}
[5em] % i.e., 2em (section) + 3em
{\addvspace{.15pc}\normalfont\colorist@sffamily}
- {\contentslabel{2.75em}}
- {\hspace*{-2.75em}}
+ {\contentslabel{2.25em}}
+ {\hspace*{-2.25em}}
{\titlerule*[1em]{\textcolor{maintext!15!paper}{.}}\color{maintext!45!paper}\contentspage}
\titlecontents{subsubsection}
- [7em] % i.e., 5em (subsection) + 2em
+ [8em] % i.e., 5em (subsection) + 3em
{\normalfont\colorist@sffamily}
{\contentslabel{2.75em}}
{\hspace*{-2.75em}}
@@ -750,8 +748,8 @@
\expandafter\def\csname definition-theoremnameRU\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{Определение}-\theoremnameRU}
\AtEndPreamble{
-\theoremstyle{basic}
\if@colorist@nothms\else
+\theoremstyle{basic}
\if@colorist@nothmnum
\CreateTheorem*{theorem}
\CreateTheorem*{lemma}
@@ -826,9 +824,13 @@
\fi
\CreateTheorem*{remark*}
\CreateTheorem*{observation*}
+
+\theoremstyle{simple}
\fi
}
+\theoremstyle{simple}
+
\creflabelformat{PJLtheorem}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
\creflabelformat{PJLlemma}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
\creflabelformat{PJLproposition}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
@@ -1137,8 +1139,6 @@
}}
\fi
-\theoremstyle{simple}% as the default style for user-defined environments
-
\renewenvironment{proof}[1][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
@@ -1460,7 +1460,7 @@
%% Abstract style
%%================================
\renewenvironment{abstract}
-{\small{\centerline{\textsc{\conditionalbfseries\abstractname}}\vspace{-0.3\baselineskip}}
+{\small{\centerline{\textsc{\conditionalbfseries\sffamily\abstractname}}\vspace{-0.3\baselineskip}}
\color{maintext!80!paper}\begin{quotation}}
{\end{quotation}\medskip}