diff options
author | Karl Berry <karl@freefriends.org> | 2024-03-18 20:04:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-03-18 20:04:32 +0000 |
commit | e2a8343a97dc7d58c3a81223451fe2c17f3fa106 (patch) | |
tree | dbdd6cc29fda39fa91c9ad278a78d355e97ade0d | |
parent | 392b90ca61e104045d9216de5d13413d6992660d (diff) |
litebook (18mar24)
git-svn-id: svn://tug.org/texlive/trunk@70695 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/litebook/cha/cha1.tex | 159 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/litebook/cha/scha.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/litebook/figures/cover.jpeg (renamed from Master/texmf-dist/doc/latex/litebook/figures/Beautiful-realities.jpeg) | bin | 94115 -> 94115 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/litebook/litebook.pdf | bin | 721987 -> 690409 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/litebook/litebook.tex | 18 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/litebook/litebook.cls | 226 |
6 files changed, 245 insertions, 160 deletions
diff --git a/Master/texmf-dist/doc/latex/litebook/cha/cha1.tex b/Master/texmf-dist/doc/latex/litebook/cha/cha1.tex index 09ca12e9969..89ab1c9f901 100644 --- a/Master/texmf-dist/doc/latex/litebook/cha/cha1.tex +++ b/Master/texmf-dist/doc/latex/litebook/cha/cha1.tex @@ -1,11 +1,13 @@ \chapter{The \pkg{LiteBook} Template} \section{The purpose of this package} + This template provides a fresh cover and chapter design for book. Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} or \href{https://github.com/xiamyphys/litebook}{GitHub}. -This template was originally used for the reformatting of the textbook \emph{General Relativity, R. Wald}, you can download it from \url{https://github.com/xiamyphys/LaTeX-General-Relativity-R.Wald}. +This template is used by me to reformat the textbook \href{https://github.com/xiamyphys/LaTeX-General-Relativity-R.Wald}{\emph{General Relativity, R. Wald}}, and I also use this template to typesetting my notes on \href{https://github.com/xiamyphys/Group-Theory-in-Physics}{\emph{Group Theory in Physics}}. You can download their codes on \href{https://github.com/xiamyphys}{GitHub}. \section{Installing \pkg{LiteBook} and loading it} + For portable version, simply download latest \verb|litebook.cls| file from \href{https://github.com/xiamyphys/LiteBook}{GitHub} or \href{https://ctan.org/pkg/litebook}{CTAN} and save it under your working directory. This way of installation is simple and convenient, but you have to manually update \verb|.cls| now and then. However, I strongly suggest that you should 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 @@ -13,101 +15,72 @@ However, I strongly suggest that you should use terminal/cmd to implement the co sudo tlmgr update --self --all \end{verbatim} -If you are in some areas with awful Internet environment (such as a), you can choose proper mirror source or use other means\footnote{Please comply with local network regulations.}. To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \textsf{\TeX} distribution?} +If you are in some areas with awful Internet environment (such as GFW), you can choose a proper mirror source or use other means\footnote{Please comply with local network regulations.}. To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \hologo{TeX} distribution?} \section{Compatibility} -The test environments are macOS + Mac\TeX{} 2024 / Overleaf and they all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers, Windows, Linux and Unix platforms compatibility unknown. + +The test environments are macOS + Mac\hologo{TeX} 2024 / Overleaf and they all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. Windows, Linux and Unix platforms' unknown. The compile time of current document via \hologo{pdfLaTeX} compiler is \verb|0.965±0.0019s| on \textsf{MacBook Air M2 8GB (macOS Sonoma 14.4)} when charging. \section{Cover Information Settings} -Just like the cover of this document, there are 5 lines of information on the cover and a cover image, the corresponding commands are + +There are several lines of information and a cover image on the cover of this document, the corresponding commands are the following + +\begin{verbatim} + \cover{\UPLOWFadingImage[trim={0 {.9\paperheight} 0 0},clip]{cover} + [trim={0 {.5\paperheight} 0 0},clip]{cover}} + \title{\scshape The \pkg{LiteBook} Template} + \subtitle{Version 0.2a \today} \author{Hsia Mingyu} + \bioinfo{Hangzhou Dianzi University} + \press{\scshape The University of Chicago Press} +\end{verbatim} + +The same as the \pkg{book} class, the command \cmd{title} could not be omitted, or it will return an error, and there will be a warning if the command \cmd{author} is omitted. The \cmd{cover} can assign the format of the image on the cover and you can adjust the format of the image with the \pkg{fadingimage} package. + +\section{Global options of this template} \begin{verbatim} - \title{The \pkg{LiteBook} Template} \subtitle{Version 0.1b \today} - \press{The University of Chicago Press} \author{Hsia Mingyu} - \bioinfo{Hangzhou Dianzi University} \cover{Beautiful-realities.jpeg} + \documentclass[<math>,<thmstyle>]{litebook} \end{verbatim} -Here, the same as the \pkg{book} class, the command \cmd{title} could not be omitted, or it will return an error, and there will be a warning if the command \cmd{author} is omitted. +\begin{itemize} + \item The \mode{math} option can set the math font to be \mode{newtx} (default) or \mode{mtpro2}. + \item The \mode{thmstyle} option can set the style of \pkg{amsthm} environments be the \pkg{mdframed} (default) or \pkg{amsthm}. +\end{itemize} \section{Preset packages and commands} -This package has been preset with the following packages: + +This template has been preset with the following packages: \begin{table}[!ht] \centering - \begin{tabular}{l l l l l l l} + \begin{tabular}{l l l l l l l l} \toprule - \pkg{amsmath} & \pkg{amssymb} & \pkg{mathrsfs} & \pkg{esvect} & \pkg{physics2} & \pkg{fixdif} & \pkg{bm}\\ + \pkg{amsthm} & \pkg{bm} & \pkg{cancel} & \pkg{derivative} & \pkg{esvect} & \pkg{extarrows} & \pkg{fixdif} & \pkg{nicefrac}\\ \midrule - \pkg{derivative} & \pkg{cancel} & \pkg{extarrows} & \pkg{siunitx} & \pkg{nicefrac} & \pkg{nicematrix} & \pkg{booktabs}\\ + \pkg{nicematrix} & \pkg{physics2} & \pkg{refstyle} & \pkg{siunitx} & \pkg{booktabs} & \pkg{diagbox} & \pkg{fontawesome5} & \pkg{geometry}\\ \midrule - \pkg{tabularx} & \pkg{diagbox} & \pkg{multicol} & \pkg{multirow} & \pkg{refstyle} & \pkg{tcolorbox} & \pkg{fontawesome5}\\ + \pkg{indentfirst} & \pkg{mdframed} & \pkg{multicol} & \pkg{multirow} & \pkg{setspace} & \pkg{tabularx} & \pkg{tcolorbox} & \pkg{tikz}\\ \bottomrule \end{tabular} \end{table} You can click on them to go to the homepage to view the documentation. -And commands \verb|\i|, \verb|\e|, \verb|\T| has been defined to input +And commands \verb|\i|, \verb|\e|, \verb|\T| have been defined to input $\i$, $\e$ in roman (non-italic) text and matrix transpose symbol $\T$, which can help you typeset math quickly. -The template has been preset the following reference command via \pkg{refstyle} package: \verb|\eqref{#1}|, \verb|\figref{#1}| and \verb|\tabref{#1}|, you can add other commands like these via \pkg{refstyle} package. - -\section{Preset Environments} -The following environments have been preset, you can add other environments via the \pkg{amsthm} package. - -\begin{multicols}{2} - -\begin{definition} - A definition environment. -\end{definition} - -\begin{theorem} - A theorem environment. -\end{theorem} - -\begin{lemma} - A lemma environment. -\end{lemma} - -\begin{corollary} - A corollary environment. -\end{corollary} - -\begin{postulate} - A postulate environment. -\end{postulate} - -\begin{axiom} - An axiom environment. -\end{axiom} - -\begin{proposition} - A proposition environment. -\end{proposition} - -\begin{example} - An example environment. -\end{example} - -\begin{problem} - A problem environment. -\end{problem} - -\begin{solution} - A solution environment. -\end{solution} - -\end{multicols} +The template has been preset the following reference command via \pkg{refstyle} package: \verb|\eqref{<label>}|, \verb|\figref{<label>}| and \verb|\tabref{<label>}|, you can add other ref commands via \pkg{refstyle} package. \section{Equation Test} + +The following is the Schr\"odinger Equation \begin{equation} - \ab(\frac1{c^2}\frac{\partial^2}{\partial t^2}-\nabla^2+\frac{mc^2}{\hbar^2})\psi(\mathbf x,t)=0 - \label{1.6.1} + \i\hbar\pdv{}t\Psi(x,t)=\ab[-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}+V(x,t)]\Psi(x,t) \end{equation} -The Klein-Gordon \eqref{1.6.1}. +The above equations are the integral formula of the Maxwell's Equations in Gaussian units. \section{Figure and Caption Side by Side Test} -\begin{figure}[!ht] +\begin{figure}[htbp] \begin{minipage}{.32\textwidth} \caption{A diagram showing the causal structure of spacetime in special relativity. The ``light cone'' of $p$ rather than a ``surface of simultaneity'' with $p$ now plays a fundamental role in determining the causal relationship of $p$ to other events.} \label{1.1} @@ -116,7 +89,7 @@ The Klein-Gordon \eqref{1.6.1}. \begin{minipage}{.64\textwidth} \centering \begin{tikzpicture} - \draw [line join=round,line cap=round] (-1,1) -- (1,-1) arc (-60:-120:2) -- (1,1) arc (-60:-120:2) arc (-60:-120:-2); + \draw (-1,1) -- (1,-1) arc (-60:-120:2) -- (1,1) arc (-60:-120:2) arc (-60:-120:-2); \shade [ball color=teal] (0,0) circle (.06) node [anchor=east,xshift=-1ex] {\sffamily\small p}; \node at (0,1.5) {\sffamily\small Future}; \path [->] (.6,1.5) edge [bend left] (.2,1); @@ -133,4 +106,54 @@ The Klein-Gordon \eqref{1.6.1}. \end{minipage} \end{figure} -\figref{1.1} shows the Light Cone.
\ No newline at end of file +Here, \figref{1.1} is a diagram showing the causal structure of spacetime in special relativity. + +\section{Preset Environments} + +\begin{verbatim} + \begin{<theoremname>} ... \end{<theoremname>} \begin{axiom} ... \end{axiom} +\end{verbatim} + +\begin{definition}[The Definition Environment]\leavevmode\newline + From WikipediA: A definition is used to give a precise meaning to a new term, by describing a condition which unambiguously qualifies what a mathematical term is and is not. +\end{definition} + +\begin{theorem}[The Theorem Environment]\leavevmode\newline + From WikipediA: A theorem is a statement that has been proved, or can be proved. +\end{theorem} + +\begin{lemma}[The Lemma Environment]\leavevmode\newline + From WikipediA: In mathematics, informal logic and argument mapping, a lemma (pl.: lemmas or lemmata) is a generally minor, proven proposition which is used as a stepping stone to a larger result. For that reason, it is also known as a ``helping theorem'' or an ``auxiliary theorem''. +\end{lemma} + +\begin{corollary}[The Corollary Environment]\leavevmode\newline + From WikipediA: A corollary is a theorem of less importance which can be readily deduced from a previous, more notable statement. +\end{corollary} + +\begin{proposition}[The Proposition Environment]\leavevmode\newline + From WikipediA: A proposition is a central concept in the philosophy of language, semantics, logic, and related fields, often characterized as the primary bearer of truth or falsity. +\end{proposition} + +\begin{postulate}[The Postulate Environment]\leavevmode\newline + From WikipediA: A postulate is a statement everyone agrees to be correct. +\end{postulate} + +\begin{axiom}[The Axiom Environment]\leavevmode\newline + From WikipediA: An axiom is a statement that is taken to be true, to serve as a premise or starting point for further reasoning and arguments. +\end{axiom} + +\begin{remark}[The Remark Environment]\leavevmode\newline + From Math StackExchange: The remark device is used for material that is is too long to be included in parentheses, while it deserves greater prominence than a footnote. +\end{remark} + +\begin{example} + From Cambridge Dictionary: The example is a way of helping someone to understand something by showing them how it is used. +\end{example} + +\begin{problem} + From Springer: A problem is generally considered to be a task, a situation, or person which is difficult to deal with or control due to complexity and intransparency. +\end{problem} + +\begin{solution} + The quick brown fox jumps over the lazy dog. +\end{solution} diff --git a/Master/texmf-dist/doc/latex/litebook/cha/scha.tex b/Master/texmf-dist/doc/latex/litebook/cha/scha.tex index 42101fe8d59..1d85aa31cef 100644 --- a/Master/texmf-dist/doc/latex/litebook/cha/scha.tex +++ b/Master/texmf-dist/doc/latex/litebook/cha/scha.tex @@ -1,3 +1,3 @@ -\chapter*{A Test of Unnumbered Chapter} +\chapter*{A Test to Unnumbered Chapter} \lipsum[1-6]
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/litebook/figures/Beautiful-realities.jpeg b/Master/texmf-dist/doc/latex/litebook/figures/cover.jpeg Binary files differindex 2b6036083d3..2b6036083d3 100644 --- a/Master/texmf-dist/doc/latex/litebook/figures/Beautiful-realities.jpeg +++ b/Master/texmf-dist/doc/latex/litebook/figures/cover.jpeg diff --git a/Master/texmf-dist/doc/latex/litebook/litebook.pdf b/Master/texmf-dist/doc/latex/litebook/litebook.pdf Binary files differindex 9172a5c78ff..4e747172111 100644 --- a/Master/texmf-dist/doc/latex/litebook/litebook.pdf +++ b/Master/texmf-dist/doc/latex/litebook/litebook.pdf diff --git a/Master/texmf-dist/doc/latex/litebook/litebook.tex b/Master/texmf-dist/doc/latex/litebook/litebook.tex index 39ce87706eb..5a42f997a33 100644 --- a/Master/texmf-dist/doc/latex/litebook/litebook.tex +++ b/Master/texmf-dist/doc/latex/litebook/litebook.tex @@ -1,17 +1,19 @@ -% !TEX TS-program = pdflatex -\documentclass{litebook} +\documentclass[ + math = newtx, + thmstyle = mdframed +]{litebook} -\title{The \pkg{LiteBook} Template} -\subtitle{Version 0.1c \today} -\press{The University of Chicago Press} +\cover{\UPLOWFadingImage[trim={0 {.9\paperheight} 0 0},clip]{cover} + [trim={0 {.5\paperheight} 0 0},clip]{cover}} +\title{\scshape The \pkg{LiteBook} Template} +\subtitle{Version 0.2a \today} \author{Hsia Mingyu} \bioinfo{Hangzhou Dianzi University} -\cover{Beautiful-realities} +\press{\scshape\textcolor{teal}{\faIcon{telegram-plane}}Hangzhou in Late Spring 2024} \begin{document} -\maketitle -\frontmatter\tableofcontents\mainmatter +\maketitle\frontmatter\tableofcontents\mainmatter \input{cha/cha1.tex} \input{cha/scha.tex} diff --git a/Master/texmf-dist/tex/latex/litebook/litebook.cls b/Master/texmf-dist/tex/latex/litebook/litebook.cls index 92de10dd3e0..ceeb43e1632 100644 --- a/Master/texmf-dist/tex/latex/litebook/litebook.cls +++ b/Master/texmf-dist/tex/latex/litebook/litebook.cls @@ -19,45 +19,68 @@ %% **************************************************************************************************** % !Mode:: "TeX:UTF-8" \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{litebook}[2024/03/11 v0.1c LiteBook document class] +\ProvidesClass{litebook}[2024/03/18 v0.2a LiteBook document class] \RequirePackage{kvoptions} \RequirePackage{etoolbox} +\SetupKeyvalOptions{family=LITE, prefix=LITE@, setkeys=\kvsetkeys} +\def\ekv#1{\kvsetkeys{LITE}{#1}} + +\DeclareStringOption[newtx]{math} +\DeclareVoidOption{newtx}{\ekv{math=newtx}} +\DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}} + +\DeclareStringOption[mdframed]{thmstyle} +\DeclareVoidOption{mdframed}{\ekv{thmstyle=mdframed}} +\DeclareVoidOption{amsthm}{\ekv{thmstyle=amsthm}} + \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{book}} \ProcessKeyvalOptions*\relax \LoadClass[letterpaper,11pt,openany]{book} -\RequirePackage{geometry,enumitem,booktabs,tabularx,diagbox,multicol,multirow} -\geometry{rmargin=1.25 in,lmargin=.75 in,tmargin=1 in,bmargin=1 in} +\RequirePackage{geometry,indentfirst,setspace,enumitem,booktabs,tabularx,diagbox,multicol,multirow} +\geometry{lmargin = .8 in,rmargin = 1.2 in,tmargin= 1 in,bmargin= 1 in} +\setlength{\headheight}{13.6pt} + +\RequirePackage{lipsum,hologo} +\hologoFontSetup{general=\sffamily} +\RequirePackage{ifxetex} +\ifXeTeX + \RequirePackage[quiet]{xeCJK} + \RequirePackage[quiet,no-math]{fontspec} + \RequirePackage{zhlipsum} + \setlength{\parindent}{2em} +\else + \setlength{\parindent}{2ex} +\fi \RequirePackage{graphics,graphicx} \graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}} -\RequirePackage{indentfirst} -\setlength{\parindent}{2ex} - \RequirePackage[labelsep=period,labelfont={bf,sf},font=small]{caption} \RequirePackage[nokeyprefix]{refstyle} +\newref{eq}{refcmd=(\ref{#1}),name={\sffamily Eq.~}} \newref{fig}{name={\sffamily\bfseries Figure~}} \newref{tab}{name={\sffamily\bfseries Table~}} \RequirePackage{tocloft} -\setlength{\cftbeforetoctitleskip}{16\p@} +\setlength{\cftbeforetoctitleskip}{6\p@} \setlength{\cftaftertoctitleskip}{24\p@} -\renewcommand{\contentsname}{\sffamily Contents} +\setlength{\cftbeforesecskip}{3\p@} +\def\contentsname{\sffamily\scshape\hfill Contents\hfill} +\setcounter{tocdepth}{1} \def\@makechapterhead#1{% - \vspace*{\p@}% - { + \vspace*{\p@}{% \parindent \z@ \raggedright \normalfont \ifnum \c@secnumdepth >\m@ne \if@mainmatter - \parbox{25mm} - {\centering\HUGE\normalfont\bfseries\textcolor{darkgray}{\thechapter}\\[4mm]\normalsize\bfseries\textcolor{darkgray}{\bfseries\sffamily\scshape \@chapapp}}% - \tikz[baseline] - \draw[line width=3pt,dotted,dash pattern=on 0pt off 8pt, gray](0,-.85)--(0,1.35); + \parbox{1 in} + {\centering\HUGE\normalfont\bfseries\textcolor{darkgray}\thechapter\vskip10\p@\normalsize\bfseries\textcolor{darkgray}{\bfseries\sffamily\scshape \@chapapp}}% + \tikz[baseline,overlay] + \draw[line width=3pt,dotted,dash pattern=on 0pt off 8pt, gray](0,-.8)--(0,1.2); \fi \fi - \interlinepenalty\@M\hspace*{4ex} + \interlinepenalty\@M\hspace*{2em} \huge\bfseries\sffamily #1\par\nobreak \vskip 36\p@ }} @@ -72,29 +95,52 @@ \huge \bfseries \sffamily #1\par\nobreak \vskip 40\p@ }} -\setlength{\headheight}{13.6pt} + +\let\cleardoublepage=\clearpage +\makeatletter +\renewcommand*{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else + \vspace*{\fill} + {\centering\itshape\Large This page was intentionally left blank.\par} + \vspace{\fill} +\thispagestyle{empty} +\newpage +\if@twocolumn\hbox{}\newpage\fi\fi\fi} \RequirePackage{fancyhdr} \pagestyle{fancy} - \let\headrule\relax - \fancyhead[OL]{\textsc{\sffamily\nouppercase\leftmark}} - \fancyhead[OR]{\sffamily\thepage} - \fancyhead[ER]{\textsc{\sffamily\nouppercase\rightmark}} - \fancyhead[EL]{\sffamily\thepage} - \lfoot{}\cfoot{}\rfoot{} - -\RequirePackage[most]{tcolorbox} -\RequirePackage{tikz,fontawesome5} + \fancyhead[OL]{\textsc{\sffamily\nouppercase\leftmark}} + \fancyhead[OR]{\sffamily\thepage} + \fancyhead[ER]{\textsc{\sffamily\nouppercase\rightmark}} + \fancyhead[EL]{\sffamily\thepage} + \lfoot{}\cfoot{}\rfoot{} + +\RequirePackage{tikz} \usetikzlibrary{arrows,tikzmark,patterns,calc} \RequirePackage{fadingimage} \tikzset{>=stealth', -every picture/.append style={ +every picture/.append style={% line join=round, line cap=round, thick } } +\RequirePackage[fixed]{fontawesome5} +\AddToHook{cmd/faIcon/before}{% + \begingroup\fontsize{\fpeval{\f@size*.9}}{0}\selectfont +} +\AddToHook{cmd/faIcon/after}{\endgroup} + +\RequirePackage[svgnames]{xcolor} +\definecolor{pkgcolor}{Hsb}{103,.8,.5} +\definecolor{moducolor}{Hsb}{290,.8,.5} +\definecolor{cmdcolor}{Hsb}{188,.8,.5} +\RequirePackage[colorlinks,linkcolor=cmdcolor,urlcolor=pkgcolor]{hyperref} +\def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{% + \href{https://ctan.org/pkg/#1}{\textsf{#1}}}}{“#1”}} +\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}} +\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}} + \RequirePackage{datetime}\yyyymmdddate \def\subtitle#1{\gdef\@subtitle{#1}} \def\cover#1{\gdef\@cover{#1}} @@ -104,77 +150,91 @@ every picture/.append style={ \def\HUGE{\@setfontsize\HUGE{40}{50}} \def\HUge{\@setfontsize\HUGE{35}{45}} -\renewcommand*\maketitle -{ +\renewcommand*\maketitle{% \begin{titlepage} - \newgeometry{margin = 0 in} + \newgeometry{margin = 0 in} \ifcsname @cover\endcsname - \UPFadingImage[trim={0 {.9\paperheight} 0 0},clip]{\@cover} - \LOWFadingImage[trim={0 {.5\paperheight} 0 0},clip]{\@cover} + \@cover\vskip75\p@ + \else + \vspace*{75\p@} \fi - \parindent=0pt\vskip75\p@ + \parindent=0pt \centering\sffamily\bfseries - \HUge\@title + \HUge\@title\normalfont \ifcsname @subtitle\endcsname - \vskip2ex\LARGE\@subtitle\fi + \vskip2ex\LARGE\sffamily\bfseries\@subtitle\normalfont\fi \ifcsname @author\endcsname - \vskip4ex\LARGE\@author\fi + \vskip4ex\LARGE\sffamily\bfseries\@author\normalfont\fi \ifcsname @bioinfo\endcsname - \vskip2ex\Large\@bioinfo\fi + \vskip2ex\Large\sffamily\bfseries\@bioinfo\normalfont\fi \ifcsname @press\endcsname\vfill - \parbox[t]{\textwidth}{\centering - \Large\@press\vskip75\p@}\fi + \parbox[t]{\textwidth}{\centering + \sffamily\bfseries\large\@press\normalfont\vskip75\p@}\fi \clearpage - \vspace*{\fill} - \Huge\itshape\@title - \vspace*{\fill} - \restoregeometry -\end{titlepage} -} - -\AtBeginDocument{ - \everymath{\displaystyle} - \setlength{\abovedisplayskip}{3pt} - \setlength{\belowdisplayskip}{3pt} - \setcounter{tocdepth}{1} -} - -\definecolor{pkgcolor}{Hsb}{103,.8,.5} -\definecolor{moducolor}{Hsb}{290,.8,.5} -\definecolor{cmdcolor}{Hsb}{188,.8,.5} -\RequirePackage[colorlinks,linkcolor=teal,urlcolor=pkgcolor]{hyperref} -\def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{ - \href{https://ctan.org/pkg/#1}{\textsf{#1}}}}{“#1”}} -\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}} -\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}} - -\RequirePackage{lipsum,hologo} -\RequirePackage{ifxetex} -\ifxetex - \RequirePackage[quiet]{xeCJK} - \RequirePackage[quiet,no-math]{fontspec} - \RequirePackage{zhlipsum} -\fi - -\def\hmmax{0}\def\bmmax{0} -\RequirePackage{amsmath,amssymb,amsthm,mathrsfs} -\RequirePackage[libertine,mono=false]{newtx} -\RequirePackage[e]{esvect} + \vspace*{\fill}\normalfont + {\centering \Huge\sffamily\bfseries\itshape\@title\par} + \vspace{\fill} + \restoregeometry +\end{titlepage}} + +\ifdefstring{\LITE@math}{mtpro2}{% + \RequirePackage{amssymb} + \let\Bbbk\relax + \RequirePackage[mtpscr,mtpccal,mtpfrak]{mtpro2} + \RequirePackage[mono=false]{libertine} +}{\relax} + +\ifdefstring{\LITE@math}{newtx}{% + \RequirePackage[libertine,mono=false]{newtx} +}{\relax} + +\let\openbox\relax\def\hmmax{0}\def\bmmax{0} \RequirePackage{physics2,bm,fixdif,derivative,cancel,extarrows,siunitx,nicefrac,nicematrix} \usephysicsmodule{ab,braket,diagmat,doubleprod,xmat,ab.legacy,op.legacy} \RequirePackage[e]{esvect} \def\i{\mathrm i}\def\e{\mathrm e}\def\T{\mathsf T} +\numberwithin{equation}{section} +\RequirePackage{amsthm,mdframed,listofitems} +\setsepchar{;/,}\ignoreemptyitems \theoremstyle{definition} -\newtheorem{definition}{\sffamily\color{pkgcolor} Definition}[section] -\newtheorem{theorem}{\sffamily\color{moducolor} Theorem}[section] -\newtheorem{lemma}{\sffamily\color{moducolor} Lemma}[section] -\newtheorem{corollary}{\sffamily\color{moducolor}Corollary}[section] -\newtheorem{postulate}{\sffamily\color{moducolor}Postulate}[section] -\newtheorem{axiom}{\sffamily\color{moducolor}Axiom}[section] -\newtheorem{proposition}{\sffamily\color{cmdcolor}Proposition}[section] -\newtheorem*{example}{\sffamily Example} +\def\th@definition{\thm@notefont{}\normalfont} +\readlist*\thmlist{% + theorem, lemma, definition, corollary, proposition, postulate, axiom, remark; + DarkGreen, MidnightBlue, MidnightBlue, Olive, Olive, Indigo, Indigo, DarkRed +} +\ifnum \listlen\thmlist[1]<\listlen\thmlist[2] + \def\thmnum{\listlen\thmlist[1]} +\else + \def\thmnum{\listlen\thmlist[2]} +\fi + +\ifdefstring{\LITE@thmstyle}{mdframed}{% + \foreach \x in {1,...,\thmnum}{\expandafter\xdef\csname\x\x\endcsname{\noexpand + \newmdtheoremenv[ + skipabove=0pt, skipbelow=0pt, + hidealllines=true, leftline=true, + linewidth=.5ex, linecolor=\thmlist[2,\x], + innerleftmargin=1.5ex, innerrightmargin=0pt, + innertopmargin=-1.5ex, innerbottommargin=.5ex] + {\thmlist[1,\x]} + {\noexpand\color{\thmlist[2,\x]}\noexpand\sffamily\expandafter\MakeUppercase\expanded{\thmlist[1,\x]}}[chapter] +}} +}{\relax} + +\ifdefstring{\LITE@thmstyle}{amsthm}{% + \foreach \x in {1,...,\thmnum}{\expandafter\xdef\csname\x\x\endcsname{\noexpand + \newtheorem + {\thmlist[1,\x]} + {\noexpand\color{\thmlist[2,\x]}\noexpand\sffamily\expandafter\MakeUppercase\expanded{\thmlist[1,\x]}}[chapter] +}} +}{\relax} + +\foreach \x in {1,...,\thmnum}{\csname\x\x\endcsname} +\let\theremark=\relax + +\newtheorem{example}{\sffamily\color{Teal} Example}[chapter] +\def\theexample{\arabic{example}} \newtheorem{problem}{\sffamily Problem}[chapter] \def\theproblem{\arabic{problem}} -\newtheorem*{solution}{\sffamily Solution} -\numberwithin{equation}{section}
\ No newline at end of file +\newtheorem*{solution}{\sffamily Solution}
\ No newline at end of file |