9 Commits
v4.1 ... v4.2

Author SHA1 Message Date
EthanDeng
34e2225019 version 4.2 2022-03-07 17:18:48 +08:00
EthanDeng
91f5e46c94 update version id 2022-03-07 17:17:56 +08:00
EthanDeng
6a60b16e14 bug fix for newtx pkg update 2022-03-07 17:04:26 +08:00
Dongsheng Deng
909fb2c997 Merge pull request #178 from valdigleis/pt-branch
Add portuguese translation
2022-02-14 16:23:18 +08:00
valdigleis
c669c4a263 Add portuguese translation 2022-02-05 21:15:01 -03:00
Dongsheng Deng
53547c11e4 Merge pull request #177 from syvshc/hotfix
patch for newtx v1.7 or later
2022-01-15 10:00:34 +08:00
syvshc
093c73e4c9 patch for newtx v1.7 or later 2022-01-15 00:50:18 +08:00
EthanDeng
3d0f25cc6a update readme 2022-01-04 13:42:26 +08:00
EthanDeng
a7e5c032c5 update install latex site 2021-05-13 21:53:13 +08:00
5 changed files with 203 additions and 90 deletions

View File

@@ -17,6 +17,8 @@ ElegantBook 是为 LaTeX 书籍写作而设计的模板,由 [Dongsheng Deng](h
## 致谢 ## 致谢
特别感谢 [sikouhjw](https://github.com/sikouhjw) 长期以来对于 Github 上 issue 的快速回应,以及各个社区论坛对于 ElegantLaTeX 相关问题的回复。
特别感谢 ChinaTeX 以及 [LaTeX 工作室](http://www.latexstudio.net/)对于本系列模板的大力宣传与推广。 特别感谢 ChinaTeX 以及 [LaTeX 工作室](http://www.latexstudio.net/)对于本系列模板的大力宣传与推广。
如果你喜欢我们的模板,你可以在 Github 上收藏我们的模板。 如果你喜欢我们的模板,你可以在 Github 上收藏我们的模板。

View File

@@ -17,6 +17,8 @@ For some reasons, __unauthorized__ pull requests are **UNACCEPTABLE** since May
## Acknowledgement ## Acknowledgement
Thank [sikouhjw](https://github.com/sikouhjw) for his quick response to Github issues and continuously support work for ElegantLaTeX.
Thank ChinaTeX and [LaTeX Studio](http://www.latexstudio.net/) for their promotion. Thank ChinaTeX and [LaTeX Studio](http://www.latexstudio.net/) for their promotion.

View File

@@ -1,15 +1,15 @@
\documentclass[cn,10pt,math=newtx,citestyle=gb7714-2015,bibstyle=gb7714-2015]{elegantbook} \documentclass[lang=cn,10pt]{elegantbook}
\title{ElegantBook优美的 \LaTeX{} 书籍模板} \title{ElegantBook优美的 \LaTeX{} 书籍模板}
\subtitle{Elegant\LaTeX{} 经典之作} \subtitle{Elegant\LaTeX{} 经典之作}
\author{Ethan Deng \& Liam Huang} \author{Ethan Deng \& Liam Huang}
\institute{Elegant\LaTeX{} Program} \institute{Elegant\LaTeX{} Program}
\date{May 2, 2021} \date{March 8, 2022}
\version{4.1} \version{4.2}
\bioinfo{自定义}{信息} \bioinfo{自定义}{信息}
\extrainfo{各人自扫门前雪,休管他人瓦上霜。—— 陈元靓} \extrainfo{不要以为抹消过去,重新来过,即可发生什么改变。—— 比企谷八幡}
\setcounter{tocdepth}{3} \setcounter{tocdepth}{3}
@@ -20,37 +20,14 @@
\usepackage{array} \usepackage{array}
\newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}} \newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}}
\definecolor{customcolor}{RGB}{32,178,170} % \definecolor{customcolor}{RGB}{32,178,170}
\colorlet{coverlinecolor}{customcolor} % \colorlet{coverlinecolor}{customcolor}
\begin{document} \begin{document}
\maketitle \maketitle
\frontmatter \frontmatter
\chapter*{特别声明}
\markboth{Introduction}{前言}
自 2019 年 Elegant\LaTeX{} 系列模板上线 GitHub、CTAN 以来,受到很多用户的喜爱。
2020 年,我打算做 Elegant\LaTeX{} 的最后一个版本,也就是原定计划 ElegantBook 4.x 版本为 Elegant\LaTeX{} 系列模板的终止符。基于我想把 4.x 做成一个最终版本,我计划了很多事情,包括将代码转为 dtx将三个模板的文档打包进 dtx 里面,然后重新设计封面,补充各种页面,增加元素等等。我想的很多,但是做起来并不是很顺利,中间也发生了很多事情,不想解释。直至今年 4 月,我决定,不论如何,先把 4.1 发布出来。
\vskip 0.5cm
另外,在临近 Elegant\LaTeX{} 模板告别之际,我想和各位用户说:多分享,多奉献。
\vskip 0.5cm
\underline{如果你无法认同我的想法,建议直接删除本模板。}
\vskip 1.5cm
\begin{flushright}
Ethan Deng\\
May 2, 2021
\end{flushright}
\tableofcontents \tableofcontents
\mainmatter \mainmatter
@@ -72,23 +49,6 @@ Elegant\LaTeX{} 项目组致力于打造一系列美观、优雅、简便的模
\end{itemize} \end{itemize}
\section{ElegantBook 更新说明}
此次为 4.x 第一个版本,在 3.x 基础上,主要更新了定理以及参考文献的支持方式,具体内容有:
\begin{enumerate}
\item \textbf{重要改动}:由原先的 \hologo{BibTeX} 改为 biblatex 编译方式(后端为 \lstinline{biber}),请注意两者之间的差异;
\item \textbf{重要改进}:修改对于定理写法兼容方式,提高数学公式代码的兼容性;
\item 页面设置改动,默认页面更宽;方便书写和阅读;
\item 支持目录文字以及页码跳转;
\item 不再维护 \hologo{pdfLaTeX} 中文支持方式,请务必使用 \hologo{XeLaTeX} 编译中文文稿。
\item 增加多语言选项,法语 \lstinline{lang=fr}、德语 \lstinline{lang=de}、荷兰语 \lstinline{lang=nl}、匈牙利语 \lstinline{lang=hu}、西班牙语 \lstinline{lang=es}、蒙古语 \lstinline{lang=mn} 等。
\end{enumerate}
\begin{note}
如果你使用旧版本切换到新版本时,遇到问题时,请核对文档中是否有 \lstinline{pageanchor} 字样。如果有,请删除文档中的 \lstinline|\hypersetup{pageanchor=true}|,并且在 \lstinline{\maketitle}\lstinline{\tableofcontents} 之间添加 \lstinline{\frontmatter}。2.x 版本的用户请仔细查看\href{https://github.com/ElegantLaTeX/ElegantBook/wiki/convert}{跨版本转换}
\end{note}
\section{模板安装与更新} \section{模板安装与更新}
你可以通过免安装的方式使用本模板,包括在线使用和本地(文件夹内)使用两种方式,也可以通过 \TeX{} 发行版安装使用。 你可以通过免安装的方式使用本模板,包括在线使用和本地(文件夹内)使用两种方式,也可以通过 \TeX{} 发行版安装使用。
@@ -124,7 +84,7 @@ Overleaf 上,中文需要使用 \hologo{XeLaTeX} 进行编译,英文建议
\subsection{其他发行版本} \subsection{其他发行版本}
由于宏包版本问题,本模板不支持 C\TeX{} 套装,请务必安装 TeX Live。更多关于 \TeX{} Live 的安装使用以及 C\TeX{}\TeX{} Live 的兼容、系统路径问题,请参考官方文档以及啸行的\href{https://github.com/OsbertWang/install_latex/releases}{一份简短的安装 \LaTeX{} 的介绍} 由于宏包版本问题,本模板不支持 C\TeX{} 套装,请务必安装 TeX Live。更多关于 \TeX{} Live 的安装使用以及 C\TeX{}\TeX{} Live 的兼容、系统路径问题,请参考官方文档以及啸行的\href{https://github.com/OsbertWang/install-latex-guide-zh-cn/releases/}{一份简短的关于安装 \LaTeX{} 安装的介绍}
\section{关于提交} \section{关于提交}
@@ -152,7 +112,8 @@ Overleaf 上,中文需要使用 \hologo{XeLaTeX} 进行编译,英文建议
\item\href{https://github.com/palkotamas}{palkotamas} 提供的匈牙利语翻译 \lstinline{lang=hu},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/111}{Hungarian translation} \item\href{https://github.com/palkotamas}{palkotamas} 提供的匈牙利语翻译 \lstinline{lang=hu},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/111}{Hungarian translation}
\item 由 Lisa 提供的德语翻译 \lstinline{lang=de},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/113}{Deutsch translation} \item 由 Lisa 提供的德语翻译 \lstinline{lang=de},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/113}{Deutsch translation}
\item 由 Gustavo A. Corradi 提供的西班牙语的翻译 \lstinline{lang=es},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/133}{Spanish translation} \item 由 Gustavo A. Corradi 提供的西班牙语的翻译 \lstinline{lang=es},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/133}{Spanish translation}
\item\href{https://github.com/Altantsooj}{Altantsooj} 提供的蒙古语的翻译 \lstinline{lang=mn},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/137}{Mongolian translation} \item\href{https://github.com/Altantsooj}{Altantsooj} 提供的蒙古语的翻译 \lstinline{lang=mn},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/137}{Mongolian translation}
\item\href{https://github.com/inusturbo}{inusturbo} 提供的日本语的翻译 \lstinline{lang=jp},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/172}{Japanese Translation}
\end{itemize} \end{itemize}
@@ -796,6 +757,17 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
根据用户的反馈我们不断修正和完善模板。截止到此次更新ElegantBook 模板在 GitHub 上有将近 100 次提交正式发行版本release有 17 次。由于 3.00 之前版本与现在版本差异非常大,在此不列出 3.00 之前的更新内容。 根据用户的反馈我们不断修正和完善模板。截止到此次更新ElegantBook 模板在 GitHub 上有将近 100 次提交正式发行版本release有 17 次。由于 3.00 之前版本与现在版本差异非常大,在此不列出 3.00 之前的更新内容。
\datechange{2022/03/08}{版本 4.2 正式发布。}
\begin{change}
\item 对于 newtx 系列宏包更新导致的字体 bug 的修复;
\item 修缮目录格式,为了达到这个目的,重新改写 \lstinline{\chaptername} 的重定义语句;
\item 增加日语 \lstinline{lang=jp} 设定。
\item 这个版本为一个临时性版本,在 \TeX Live 2022 发布之后,将尽快发布 4.3 版本,由于对于中文的改动比较大,可能会出现预期之外的 bug有问题可以在 QQ 群或者 Github 反馈。
\end{change}
\datechange{2021/05/02}{版本 4.1 正式发布。} \datechange{2021/05/02}{版本 4.1 正式发布。}
\begin{change} \begin{change}
@@ -933,8 +905,8 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
\item 颜色名字重命名。 \item 颜色名字重命名。
\end{change} \end{change}
\nocite{*} \nocite{*}
\printbibliography \printbibliography[heading=bibintoc, title=\ebibname]
\appendix \appendix
\chapter{基本数学工具} \chapter{基本数学工具}

View File

@@ -5,8 +5,8 @@
\author{Ethan Deng \& Liam Huang} \author{Ethan Deng \& Liam Huang}
\institute{Elegant\LaTeX{} Program} \institute{Elegant\LaTeX{} Program}
\date{May. 2, 2021} \date{March 8, 2022}
\version{4.1} \version{4.2}
\bioinfo{Bio}{Information} \bioinfo{Bio}{Information}
\extrainfo{Victory won\rq t come to us unless we go to it. } \extrainfo{Victory won\rq t come to us unless we go to it. }
@@ -47,16 +47,15 @@ Contact Infos:
\section{ElegantBook Updates} \section{ElegantBook Updates}
Version 4.1 is the first version of 3.x, we add support for biblatex, theorem, and multilingual translation. What\rq s new in this version: Version 4.2 is the \textit{temporary} version before v4.3 which will be released when \TeX Live 2022 is ready, we add quick bug fix caused by newtx package updates, and multilingual translation \lstinline{lang=jp}. What\rq s new in this version:
\begin{change}
\item Bug fix due to the update of newtx fonts;
\item Add `Chapter' in TOC, and redefine \lstinline{\chaptername} to unify the logic under different languages;
\item Add language option for Japanese, \lstinline{lang=jp}.
\item \textbf{! Warnings}: Due to this `urgent' fonts bug and TOC modification, the multilingual option may cause some unexpected errors, you can report in this \href{https://github.com/ElegantLaTeX/ElegantBook/issues/170}{issue}, I will fix it after the releases of \TeX{} Live 2022.
\end{change}
\begin{enumerate}
\item \textbf{! Big Change}: Change the bibliography method from \hologo{BibTeX} to biblatex(with backend \lstinline{biber});
\item \textbf{! Big Change}: Add support for the default theorem writing method (with optional name and label);
\item Add left and right space;
\item Support hyperlink from the text of TOC;
\item Remove the \hologo{pdfLaTeX} compatiblity check for Chinese.
\item Add multilingual support, for french \lstinline{lang=fr}, dutch \lstinline{lang=nl}, Hungarian \lstinline{lang=hu}, Spanish \lstinline{lang=es}, Mongolian \lstinline{lang=mn} etc.
\end{enumerate}
\section{Installation and Update} \section{Installation and Update}
Both portable version and installation package are available, online usage is optional as well. Both portable version and installation package are available, online usage is optional as well.
@@ -639,6 +638,15 @@ We list some FAQs for users to refer to:
\chapter{Version History} \chapter{Version History}
We revised our templates now and then. This section shows the version story of ElegantBook. We have nearly 100 submits and 17 releases on GitHub since uploaded. We revised our templates now and then. This section shows the version story of ElegantBook. We have nearly 100 submits and 17 releases on GitHub since uploaded.
\datechange{2022/03/08}{release of v4.2.}
\begin{change}
\item Bug fix due to the update of newtx fonts;
\item Add `Chapter' in TOC, and redefine \lstinline{\chaptername} to unify the logic under different languages;
\item Add language option for Japanese, \lstinline{lang=jp}.
\item \textbf{! Warnings}: Due to this `urgent' fonts bug and TOC modification, the multilingual option may cause some unexpected errors, you can report in this \href{https://github.com/ElegantLaTeX/ElegantBook/issues/170}{issue}, I will fix it after the releases of \TeX{} Live 2022.
\end{change}
\datechange{2021/05/02}{release of v4.1.} \datechange{2021/05/02}{release of v4.1.}
@@ -688,7 +696,8 @@ We revised our templates now and then. This section shows the version story of E
\end{change} \end{change}
\nocite{en2,en3} \nocite{en2,en3}
\printbibliography
\printbibliography[heading=bibintoc, title=\ebibname]
\appendix \appendix
% \renewcommand\chaptername{\eappendix \thechapter} % \renewcommand\chaptername{\eappendix \thechapter}

View File

@@ -1,6 +1,6 @@
%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%
%% start of file `elegantbook.cls'. %% start of file `elegantbook.cls'.
%% Copyright 2013-2021 ElegantLaTeX (elegantlatex2e@gmail.com) %% Copyright 2013-2022 ElegantLaTeX (elegantlatex2e@gmail.com)
%% %%
%% This work may be distributed and/or modified freely %% This work may be distributed and/or modified freely
%% available at https://github.com/ElegantLaTeX/ElegantBook %% available at https://github.com/ElegantLaTeX/ElegantBook
@@ -8,8 +8,11 @@
%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%
% % !Mode:: "TeX:UTF-8" % % !Mode:: "TeX:UTF-8"
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesClass{elegantbook}[2021/05/02 v4.1 ElegantBook document class] \ProvidesClass{elegantbook}[2022/03/08 v4.2 ElegantBook document class]
%%% patch for newtx v1.7 or later
\IfFileExists{newtx.sty}{\PassOptionsToPackage{nofontspec}{newtxtext}}{}
%%%
\RequirePackage{kvoptions} \RequirePackage{kvoptions}
\RequirePackage{etoolbox} \RequirePackage{etoolbox}
\SetupKeyvalOptions{family=ELEGANT, prefix=ELEGANT@, setkeys=\kvsetkeys} \SetupKeyvalOptions{family=ELEGANT, prefix=ELEGANT@, setkeys=\kvsetkeys}
@@ -43,6 +46,7 @@
\DeclareVoidOption{en}{\ekv{lang=en}} \DeclareVoidOption{en}{\ekv{lang=en}}
\DeclareVoidOption{cn}{\ekv{lang=cn}} \DeclareVoidOption{cn}{\ekv{lang=cn}}
\DeclareVoidOption{it}{\ekv{lang=it}} \DeclareVoidOption{it}{\ekv{lang=it}}
\DeclareVoidOption{pt}{\ekv{lang=pt}}
\DeclareVoidOption{fancy}{\ekv{mode=fancy}} \DeclareVoidOption{fancy}{\ekv{mode=fancy}}
\DeclareVoidOption{simple}{\ekv{mode=simple}} \DeclareVoidOption{simple}{\ekv{mode=simple}}
@@ -340,16 +344,17 @@
\RequirePackage{makecell,lipsum,hologo} \RequirePackage{makecell,lipsum,hologo}
%% %%
%%
\RequirePackage[center,pagestyles]{titlesec}
\RequirePackage[title,titletoc,header]{appendix}
\RequirePackage[ \RequirePackage[
backend=biber, backend=biber,
citestyle=\ELEGANT@citestyle, citestyle=\ELEGANT@citestyle,
bibstyle=\ELEGANT@bibstyle]{biblatex} bibstyle=\ELEGANT@bibstyle]{biblatex}
\defbibheading{elegantbook}[\ebibname]{#1}
%%
\RequirePackage{appendix}
\ifdefstring{\ELEGANT@lang}{cn}{ \ifdefstring{\ELEGANT@lang}{cn}{
\renewcommand{\baselinestretch}{1.3} \renewcommand{\baselinestretch}{1.3}
@@ -361,13 +366,12 @@
\renewcommand{\listfigurename}{} \renewcommand{\listfigurename}{}
\renewcommand{\listtablename}{} \renewcommand{\listtablename}{}
\renewcommand{\bibname}{} \renewcommand{\bibname}{}
\newcommand{\ebibname}{}
\renewcommand{\appendixname}{} \renewcommand{\appendixname}{}
\renewcommand{\appendixtocname}{}
\renewcommand{\indexname}{\hspace{2em}} \renewcommand{\indexname}{\hspace{2em}}
\newcommand\figref[1]{\textbf{}~\ref{#1}} \newcommand\figref[1]{\textbf{}~\ref{#1}}
\newcommand\tabref[1]{\textbf{}~\ref{#1}} \newcommand\tabref[1]{\textbf{}~\ref{#1}}
\ifdefstring{\ELEGANT@scheme}{chinese}{
\renewcommand{\chaptername}{\zhnumber{\arabic{chapter}}}}{
\renewcommand{\chaptername}{ \thechapter{} }}
\newcommand{\authorname}{\citshape } \newcommand{\authorname}{\citshape }
\newcommand{\institutename}{\citshape } \newcommand{\institutename}{\citshape }
\newcommand{\datename}{\citshape } \newcommand{\datename}{\citshape }
@@ -394,12 +398,16 @@
\newcommand\bioinfo[2]{\gdef\@bioinfo{{\citshape #1}#2}} \newcommand\bioinfo[2]{\gdef\@bioinfo{{\citshape #1}#2}}
\newcommand{\updatename}{} \newcommand{\updatename}{}
\newcommand{\historyname}{} \newcommand{\historyname}{}
}{\relax} \newcommand{\beforechap}{}
\newcommand{\afterchap}{}
}{\relax}
\ifdefstring{\ELEGANT@lang}{en}{ \ifdefstring{\ELEGANT@lang}{en}{
\setlength\parindent{2em} \setlength\parindent{2em}
\newcommand\figref[1]{\textbf{Figure}~\ref{#1}} \newcommand\figref[1]{\textbf{Figure}~\ref{#1}}
\newcommand\tabref[1]{\textbf{Table}~\ref{#1}} \newcommand\tabref[1]{\textbf{Table}~\ref{#1}}
\renewcommand{\chaptername}{Chapter \thechapter} \renewcommand{\chaptername}{Chapter}
\renewcommand{\partname}{\color{structurecolor} Part} \renewcommand{\partname}{\color{structurecolor} Part}
\newcommand{\authorname}{\textbf{Author: }} \newcommand{\authorname}{\textbf{Author: }}
\newcommand{\institutename}{\textbf{Institute: }} \newcommand{\institutename}{\textbf{Institute: }}
@@ -424,6 +432,7 @@
\newcommand{\propertyname}{Property} \newcommand{\propertyname}{Property}
\newcommand{\introductionname}{Introduction} \newcommand{\introductionname}{Introduction}
\renewcommand{\appendixname}{Appendix} \renewcommand{\appendixname}{Appendix}
\newcommand{\ebibname}{Bibliography}
% \newcommand{\problemsetname}{Exercise} % \newcommand{\problemsetname}{Exercise}
\newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}}
\newcommand{\updatename}{Updates:} \newcommand{\updatename}{Updates:}
@@ -437,7 +446,7 @@
\setlength\parindent{2em} \setlength\parindent{2em}
\newcommand\figref[1]{\textbf{Figura}~\ref{#1}} \newcommand\figref[1]{\textbf{Figura}~\ref{#1}}
\newcommand\tabref[1]{\textbf{Tabella}~\ref{#1}} \newcommand\tabref[1]{\textbf{Tabella}~\ref{#1}}
\renewcommand{\chaptername}{Chapter \thechapter} \renewcommand{\chaptername}{Chapter}
\newcommand{\authorname}{\textbf{Autore: }} \newcommand{\authorname}{\textbf{Autore: }}
\newcommand{\institutename}{\textbf{Istituto: }} \newcommand{\institutename}{\textbf{Istituto: }}
\newcommand{\datename}{\textbf{Data: }} \newcommand{\datename}{\textbf{Data: }}
@@ -462,6 +471,7 @@
\newcommand{\introductionname}{Introduzione} \newcommand{\introductionname}{Introduzione}
\newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}}
\newcommand{\updatename}{Aggiornamenti:} \newcommand{\updatename}{Aggiornamenti:}
\newcommand{\ebibname}{Bibliografia}
\newcommand{\historyname}{Cronologia delle versioni} \newcommand{\historyname}{Cronologia delle versioni}
}{\relax} }{\relax}
@@ -472,7 +482,7 @@
\setlength\parindent{2em} \setlength\parindent{2em}
\renewcommand\figref[1]{\textbf{Figure}\ref{#1}} \renewcommand\figref[1]{\textbf{Figure}\ref{#1}}
\renewcommand\tabref[1]{\textbf{Tableau}\ref{#1}} \renewcommand\tabref[1]{\textbf{Tableau}\ref{#1}}
\renewcommand{\chaptername}{Chapitre \thechapter} \renewcommand{\chaptername}{Chapitre}
\renewcommand{\authorname}{\textbf{Auteur: }} \renewcommand{\authorname}{\textbf{Auteur: }}
\renewcommand{\institutename}{\textbf{Institut: }} \renewcommand{\institutename}{\textbf{Institut: }}
\renewcommand{\datename}{\textbf{Date: }} \renewcommand{\datename}{\textbf{Date: }}
@@ -497,6 +507,7 @@
\renewcommand{\introductionname}{Introduction} \renewcommand{\introductionname}{Introduction}
\renewcommand{\problemsetname}{Exercice} \renewcommand{\problemsetname}{Exercice}
\renewcommand{\updatename}{Mises à jour:} \renewcommand{\updatename}{Mises à jour:}
\newcommand{\ebibname}{Bibliographie}
\renewcommand{\historyname}{Historique des versions} \renewcommand{\historyname}{Historique des versions}
}{\relax} }{\relax}
@@ -506,7 +517,7 @@
\setlength\parindent{2em} \setlength\parindent{2em}
\newcommand\figref[1]{\textbf{Figuur}~\ref{#1}} \newcommand\figref[1]{\textbf{Figuur}~\ref{#1}}
\newcommand\tabref[1]{\textbf{Tabel}~\ref{#1}} \newcommand\tabref[1]{\textbf{Tabel}~\ref{#1}}
\renewcommand{\chaptername}{Hoofdstuk \arabic{chapter}} \renewcommand{\chaptername}{Hoofdstuk}
\newcommand{\authorname}{\textbf{Auteur: }} \newcommand{\authorname}{\textbf{Auteur: }}
\newcommand{\institutename}{\textbf{Instituut: }} \newcommand{\institutename}{\textbf{Instituut: }}
\newcommand{\datename}{\textbf{Datum: }} \newcommand{\datename}{\textbf{Datum: }}
@@ -532,6 +543,7 @@
\newcommand{\problemsetname}{Probleemcomplex} \newcommand{\problemsetname}{Probleemcomplex}
\newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}}
\newcommand{\updatename}{Update:} \newcommand{\updatename}{Update:}
\newcommand{\ebibname}{Bibliographie}
\newcommand{\historyname}{Versie Geschiedenis} \newcommand{\historyname}{Versie Geschiedenis}
}{\relax} }{\relax}
@@ -541,7 +553,7 @@
\setlength\parindent{2em} \setlength\parindent{2em}
\newcommand\figref[1]{\ref{#1}~\textbf{Ábra}} \newcommand\figref[1]{\ref{#1}~\textbf{Ábra}}
\newcommand\tabref[1]{\ref{#1}~\textbf{Táblázat}} \newcommand\tabref[1]{\ref{#1}~\textbf{Táblázat}}
\renewcommand{\chaptername}{\thechapter ~ fejezet} \renewcommand{\chaptername}{Fejezet}
\newcommand{\authorname}{\textbf{Szerző: }} \newcommand{\authorname}{\textbf{Szerző: }}
\newcommand{\institutename}{\textbf{Intézmény: }} \newcommand{\institutename}{\textbf{Intézmény: }}
\newcommand{\datename}{\textbf{Dátum: }} \newcommand{\datename}{\textbf{Dátum: }}
@@ -567,6 +579,7 @@
\newcommand{\problemsetname}{Feladatok} \newcommand{\problemsetname}{Feladatok}
\newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}}
\newcommand{\updatename}{Frissítve:} \newcommand{\updatename}{Frissítve:}
\newcommand{\ebibname}{Bibliográfia}
\newcommand{\historyname}{Korábbi verziók} \newcommand{\historyname}{Korábbi verziók}
}{\relax} }{\relax}
@@ -580,7 +593,7 @@
\renewcommand{\listtablename}{Tabellenverzeichnis} \renewcommand{\listtablename}{Tabellenverzeichnis}
\renewcommand{\bibname}{Bibliographie} \renewcommand{\bibname}{Bibliographie}
\renewcommand{\appendixname}{Anhang} \renewcommand{\appendixname}{Anhang}
\renewcommand{\chaptername}{Kapitel \thechapter} \renewcommand{\chaptername}{Kapitel}
\newcommand{\authorname}{\textbf{Autor: }} \newcommand{\authorname}{\textbf{Autor: }}
\newcommand{\institutename}{\textbf{Institut: }} \newcommand{\institutename}{\textbf{Institut: }}
\newcommand{\datename}{\textbf{Datum: }} \newcommand{\datename}{\textbf{Datum: }}
@@ -606,6 +619,7 @@
\newcommand{\introductionname}{Einleitung} \newcommand{\introductionname}{Einleitung}
\newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}}
\newcommand{\updatename}{Updates:} \newcommand{\updatename}{Updates:}
\renewcommand{\ebibname}{Bibliographie}
\newcommand{\historyname}{Version der Geschichte} \newcommand{\historyname}{Version der Geschichte}
}{\relax} }{\relax}
@@ -614,7 +628,7 @@
\setlength\parindent{2em} \setlength\parindent{2em}
\newcommand\figref[1]{\textbf{Figura}~\ref{#1}} \newcommand\figref[1]{\textbf{Figura}~\ref{#1}}
\newcommand\tabref[1]{\textbf{Tabla}~\ref{#1}} \newcommand\tabref[1]{\textbf{Tabla}~\ref{#1}}
\renewcommand{\spanishchaptername}{Capítulo \thechapter} \renewcommand{\spanishchaptername}{Capítulo}
\newcommand{\authorname}{\textbf{Autor: }} \newcommand{\authorname}{\textbf{Autor: }}
\newcommand{\institutename}{\textbf{Instituto: }} \newcommand{\institutename}{\textbf{Instituto: }}
\newcommand{\datename}{\textbf{Fecha: }} \newcommand{\datename}{\textbf{Fecha: }}
@@ -640,6 +654,7 @@
\newcommand{\problemsetname}{Ejercicio} \newcommand{\problemsetname}{Ejercicio}
\newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}}
\newcommand{\updatename}{Actualización:} \newcommand{\updatename}{Actualización:}
\newcommand{\ebibname}{Bibliografía}
\newcommand{\historyname}{Historial de versiones} \newcommand{\historyname}{Historial de versiones}
}{\relax} }{\relax}
@@ -650,7 +665,7 @@
\setlength\parindent{2em} \setlength\parindent{2em}
\newcommand\figref[1]{\textbf{Зураг}\ref{#1}} \newcommand\figref[1]{\textbf{Зураг}\ref{#1}}
\newcommand\tabref[1]{\textbf{Хүснэгт}\ref{#1}} \newcommand\tabref[1]{\textbf{Хүснэгт}\ref{#1}}
\renewcommand{\chaptername}{Бүлэг \thechapter} \renewcommand{\chaptername}{Бүлэг}
\newcommand{\authorname}{\textbf{Зохиогч: }} \newcommand{\authorname}{\textbf{Зохиогч: }}
\newcommand{\institutename}{\textbf{Сургууль: }} \newcommand{\institutename}{\textbf{Сургууль: }}
\newcommand{\datename}{\textbf{Огноо: }} \newcommand{\datename}{\textbf{Огноо: }}
@@ -676,9 +691,89 @@
\newcommand{\problemsetname}{Бодлогууд} \newcommand{\problemsetname}{Бодлогууд}
\newcommand\bioinfo[2]{\gdef@bioinfo{\textbf{#1}: #2}} \newcommand\bioinfo[2]{\gdef@bioinfo{\textbf{#1}: #2}}
\newcommand{\updatename}{Шинэчлэлтүүд:} \newcommand{\updatename}{Шинэчлэлтүүд:}
\newcommand{\ebibname}{Ном зүй}
\newcommand{\historyname}{Хувилбарын түүх} \newcommand{\historyname}{Хувилбарын түүх}
}{\relax} }{\relax}
\ifdefstring{\ELEGANT@lang}{pt}{
\RequirePackage[portuguese]{babel}
\setlength\parindent{2em}
\newcommand\figref[1]{\textbf{Figura}~\ref{#1}}
\newcommand\tabref[1]{\textbf{Tabela}~\ref{#1}}
\renewcommand{\chaptername}{Capítulo}
\newcommand{\authorname}{\textbf{Autor: }}
\newcommand{\institutename}{\textbf{Instituição: }}
\newcommand{\datename}{\textbf{Data: }}
\newcommand{\versionname}{\textbf{Versão: }}
\newcommand{\notename}{Observação}
\newcommand{\proofname}{Demostração}
\newcommand{\problemname}{Problema}
\newcommand{\definitionname}{Definição}
\newcommand{\theoremname}{Teorema}
\newcommand{\axiomname}{Axioma}
\newcommand{\postulatename}{Postulado}
\newcommand{\lemmaname}{Lema}
\newcommand{\propositionname}{Proposição}
\newcommand{\corollaryname}{Corolário}
\newcommand{\examplename}{Exemplo}
\newcommand{\exercisename}{Exercício}
\newcommand{\remarkname}{Comentário}
\newcommand{\assumptionname}{Assunto}
\newcommand{\conclusionname}{Conclusão}
\newcommand{\solutionname}{Soluções}
\newcommand{\propertyname}{Propiedade}
\newcommand{\introductionname}{Introdução}
\newcommand{\problemsetname}{Questão}
\newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}}
\newcommand{\updatename}{Atualização: }
\newcommand{\ebibname}{Bibliografia}
\newcommand{\historyname}{Histórico de versões}
}{\relax}
\ifdefstring{\ELEGANT@lang}{jp}{
\RequirePackage{luatexja}
\setlength\parindent{2em}
\renewcommand{\contentsname}{}
\newcommand\figref[1]{\textbf{}~\ref{#1}}
\newcommand\tabref[1]{\textbf{}~\ref{#1}}
\renewcommand{\partname}{\color{structurecolor}}
\renewcommand{\listfigurename}{}
\renewcommand{\listtablename}{}
\renewcommand{\bibname}{}
\renewcommand{\appendixname}{}
\renewcommand{\chaptername}{ \thechapter }
\newcommand{\authorname}{\textbf{}}
\newcommand{\institutename}{\textbf{}}
\newcommand{\datename}{\textbf{}}
\newcommand{\versionname}{\textbf{\citshape }}
\newcommand{\notename}{}
\newcommand{\proofname}{}
\newcommand{\problemname}{}
\newcommand{\definitionname}{}
\newcommand{\theoremname}{}
\newcommand{\axiomname}{}
\newcommand{\postulatename}{}
\newcommand{\lemmaname}{}
\newcommand{\propositionname}{}
\newcommand{\corollaryname}{}
\newcommand{\examplename}{}
\newcommand{\instancename}{}
\newcommand{\exercisename}{}
\newcommand{\remarkname}{}
\newcommand{\assumptionname}{}
\newcommand{\conclusionname}{}
\newcommand{\solutionname}{}
\newcommand{\propertyname}{}
\newcommand{\introductionname}{}
\newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}}
\newcommand{\updatename}{}
\newcommand{\ebibname}{}
\newcommand{\historyname}{}
}{\relax}
\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}} \graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
\RequirePackage{tikz} %% load tikz without tikz \RequirePackage{tikz} %% load tikz without tikz
@@ -698,12 +793,19 @@
\setlist[itemize,2]{label={\eitemii}} \setlist[itemize,2]{label={\eitemii}}
\setlist[itemize,3]{label={\eitemiii}} \setlist[itemize,3]{label={\eitemiii}}
\RequirePackage[center,pagestyles]{titlesec}
\RequirePackage{apptools} \RequirePackage{apptools}
% appendix chapter:
\ifdefstring{\ELEGANT@lang}{cn}{
\ifdefstring{\ELEGANT@scheme}{chinese}{
\newcommand{\xchaptertitle}{\zhnumber{\arabic{chapter}}} }{
\newcommand{\xchaptertitle}{ \thechapter{} }} }{
\newcommand{\xchaptertitle}{\chaptername~\thechapter~}}
\setcounter{secnumdepth}{5} \setcounter{secnumdepth}{5}
\titleformat{\chapter}[\style]{\bfseries}{ \titleformat{\chapter}[\style]{\bfseries}{
\filcenter\LARGE\enspace\bfseries{\color{structurecolor} \IfAppendix{\appendixname\;\thechapter}{\chaptername}\;}}{1pt}{ \filcenter\LARGE\enspace\bfseries{\color{structurecolor} \IfAppendix{\appendixname\;\thechapter\;}{\xchaptertitle\;}}}{1pt}{
\LARGE\bfseries\color{structurecolor}\filcenter}[] \LARGE\bfseries\color{structurecolor}\filcenter}[]
\titleformat{\section}[hang]{\bfseries}{ \titleformat{\section}[hang]{\bfseries}{
\Large\bfseries{\color{structurecolor}\thesection}\enspace}{1pt}{% \Large\bfseries{\color{structurecolor}\thesection}\enspace}{1pt}{%
@@ -921,9 +1023,9 @@
\RequirePackage{adforn} \RequirePackage{adforn}
\newenvironment{problemset}[1][\chaptername~\;\exercisename]{ \newenvironment{problemset}[1][\xchaptertitle~\exercisename]{
\begin{center} \begin{center}
\phantomsection\addcontentsline{toc}{section}{\texorpdfstring{\chaptername\;\exercisename}{\exercisename}} \phantomsection\addcontentsline{toc}{section}{\texorpdfstring{\xchaptertitle~\exercisename}{\exercisename}}
% \markboth{#1}{\rightmark} % \markboth{#1}{\rightmark}
\markright{#1} \markright{#1}
\textcolor{structurecolor}{\Large\bfseries\adftripleflourishleft~#1~\adftripleflourishright} \textcolor{structurecolor}{\Large\bfseries\adftripleflourishleft~#1~\adftripleflourishright}
@@ -948,7 +1050,7 @@
\fancyhf{} \fancyhf{}
\fancyfoot[c]{\color{structurecolor}\scriptsize\thepage} \fancyfoot[c]{\color{structurecolor}\small\thepage}
\if@twoside \if@twoside
\fancyhead[EL]{\color{structurecolor}\cnormal\leftmark} \fancyhead[EL]{\color{structurecolor}\cnormal\leftmark}
\fancyhead[OR]{\color{structurecolor}\cnormal\rightmark} \fancyhead[OR]{\color{structurecolor}\cnormal\rightmark}
@@ -962,8 +1064,7 @@
% \renewcommand{\headrule}{} % \renewcommand{\headrule}{}
\fancypagestyle{plain}{\renewcommand{\headrulewidth}{0pt}\fancyhf{}\renewcommand{\headrule}{}} \fancypagestyle{plain}{\renewcommand{\headrulewidth}{0pt}\fancyhf{}\renewcommand{\headrule}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\, #1}{}} \renewcommand{\sectionmark}[1]{\markright{\thesection\, #1}{}}
\renewcommand{\chaptermark}[1]{\markboth{\chaptername\, #1}{}} \renewcommand{\chaptermark}[1]{\markboth{\xchaptertitle\, #1}{}}
\renewcommand*{\maketitle}{% \renewcommand*{\maketitle}{%
@@ -1125,3 +1226,30 @@
\thispagestyle{empty}% \thispagestyle{empty}%
\newpage% \newpage%
\if@twocolumn\hbox{}\newpage\fi\fi\fi} \if@twocolumn\hbox{}\newpage\fi\fi\fi}
% https://tex.stackexchange.com/questions/56839/chaptername-is-used-even-for-appendix-chapters-in-toc
\usepackage{calc}
\usepackage[titles]{tocloft}
\ifdefstring{\ELEGANT@lang}{cn}{
\renewcommand{\cftchappresnum}{\beforechap\space}
\renewcommand{\cftchapaftersnum}{\space\afterchap}
\setlength{\cftchapnumwidth}{\widthof{\textbf{~999}}}
\g@addto@macro\appendix{%
\addtocontents{toc}{%
\protect\renewcommand{\protect\cftchappresnum}{\appendixname\space}%
\protect\renewcommand{\protect\cftchapaftersnum}{}%
}%
}
}{
\renewcommand{\cftchappresnum}{\chaptername\space}
\renewcommand{\cftchapaftersnum}{\space}
\setlength{\cftchapnumwidth}{\widthof{\textbf{Appendix~9}}}
\g@addto@macro\appendix{%
\addtocontents{toc}{%
\protect\renewcommand{\protect\cftchappresnum}{\appendixname\space}%
\protect\renewcommand{\protect\cftchapaftersnum}{}%
\setlength{\cftchapnumwidth}{\widthof{\textbf{Appendix~999}}}
}%
}
}