mirror of
https://github.com/ElegantLaTeX/ElegantBook.git
synced 2026-01-26 12:24:36 +08:00
update font settings
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
\documentclass[lang=cn,10pt]{elegantbook}
|
\documentclass[lang=cn,10pt,founder]{elegantbook}
|
||||||
|
|
||||||
\title{ElegantBook:优美的 \LaTeX{} 书籍模板}
|
\title{ElegantBook:优美的 \LaTeX{} 书籍模板}
|
||||||
\subtitle{Elegant\LaTeX{} 经典之作}
|
\subtitle{Elegant\LaTeX{} 经典之作}
|
||||||
@@ -16,6 +16,17 @@
|
|||||||
\logo{logo-blue.png}
|
\logo{logo-blue.png}
|
||||||
\cover{cover.jpg}
|
\cover{cover.jpg}
|
||||||
|
|
||||||
|
\usepackage{lmodern}
|
||||||
|
|
||||||
|
\setmainfont{texgyretermes}[
|
||||||
|
UprightFont = *-regular ,
|
||||||
|
BoldFont = *-bold ,
|
||||||
|
ItalicFont = *-italic ,
|
||||||
|
BoldItalicFont = *-bolditalic ,
|
||||||
|
Extension = .otf ,
|
||||||
|
Scale = 1.0]
|
||||||
|
|
||||||
|
\usepackage[]{newtxmath}
|
||||||
% 本文档命令
|
% 本文档命令
|
||||||
\usepackage{array}
|
\usepackage{array}
|
||||||
\newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}}
|
\newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}}
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
\colorlet{coverlinecolor}{customcolor}
|
\colorlet{coverlinecolor}{customcolor}
|
||||||
|
|
||||||
|
|
||||||
|
\usepackage{mathptmx}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesClass{elegantbook}[2022/03/08 v4.2 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}
|
||||||
@@ -61,7 +60,6 @@
|
|||||||
\DeclareStringOption[numeric]{bibstyle}
|
\DeclareStringOption[numeric]{bibstyle}
|
||||||
|
|
||||||
|
|
||||||
\DeclareVoidOption{newtx}{\ekv{math=newtx}}
|
|
||||||
\DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}}
|
\DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}}
|
||||||
\DeclareVoidOption{cm}{\ekv{math=cm}}
|
\DeclareVoidOption{cm}{\ekv{math=cm}}
|
||||||
|
|
||||||
@@ -203,26 +201,7 @@
|
|||||||
\newcommand{\cfs}{\normalfont}
|
\newcommand{\cfs}{\normalfont}
|
||||||
\fi
|
\fi
|
||||||
|
|
||||||
\RequirePackage{newtxtext}
|
|
||||||
\RequirePackage{anyfontsize}
|
\RequirePackage{anyfontsize}
|
||||||
\ifdefstring{\ELEGANT@math}{newtx}{
|
|
||||||
\RequirePackage{newtxmath}
|
|
||||||
\let\Bbbk\relax
|
|
||||||
\RequirePackage{esint}
|
|
||||||
%%% use yhmath pkg, uncomment following code
|
|
||||||
% \let\oldwidering\widering
|
|
||||||
% \let\widering\undefined
|
|
||||||
% \RequirePackage{yhmath}
|
|
||||||
% \let\widering\oldwidering
|
|
||||||
|
|
||||||
%%% use esvect pkg, uncomment following code
|
|
||||||
% \RequirePackage{esvect}
|
|
||||||
|
|
||||||
\DeclareSymbolFont{CMlargesymbols}{OMX}{cmex}{m}{n}
|
|
||||||
\let\sumop\relax\let\prodop\relax
|
|
||||||
\DeclareMathSymbol{\sumop}{\mathop}{CMlargesymbols}{"50}
|
|
||||||
\DeclareMathSymbol{\prodop}{\mathop}{CMlargesymbols}{"51}
|
|
||||||
}{\relax}
|
|
||||||
|
|
||||||
% ----- Handle Colors -----
|
% ----- Handle Colors -----
|
||||||
%% 章节以及页脚图形
|
%% 章节以及页脚图形
|
||||||
@@ -1159,7 +1138,7 @@
|
|||||||
breaklines=true,
|
breaklines=true,
|
||||||
keywordstyle=\color{winered},
|
keywordstyle=\color{winered},
|
||||||
commentstyle=\color{gray},
|
commentstyle=\color{gray},
|
||||||
emph={elegantpaper,fontenc,fontspec,xeCJK,citestyle,FiraMono,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm,tcolorbox,titlestyle,cite,ctex,listings,base,math,scheme,toc,esint,chinesefont,amsmath,bibstyle,natbib,pgfornament},
|
emph={elegantpaper,fontenc,fontspec,xeCJK,citestyle,FiraMono,xunicode,figure,fig,image,img,table,itemize,enumerate,ctex,microtype,description,times,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm,tcolorbox,titlestyle,cite,ctex,listings,base,math,scheme,toc,esint,chinesefont,amsmath,bibstyle,natbib,pgfornament},
|
||||||
emphstyle={\color{frenchplum}},
|
emphstyle={\color{frenchplum}},
|
||||||
morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords,definecolor,extrainfo,logo,cover,subtitle,appendix,chapter,hypersetup,mainmatter,frontmatter,tableofcontents,elegantpar,heiti,kaishu,lstset,pagecolor,zhnumber,marginpar,part,equote,marginnote,bioinfo,datechange,listofchange,lvert,lastpage,songti,heiti,fangsong,setCJKfamilyfont,textbf},
|
morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords,definecolor,extrainfo,logo,cover,subtitle,appendix,chapter,hypersetup,mainmatter,frontmatter,tableofcontents,elegantpar,heiti,kaishu,lstset,pagecolor,zhnumber,marginpar,part,equote,marginnote,bioinfo,datechange,listofchange,lvert,lastpage,songti,heiti,fangsong,setCJKfamilyfont,textbf},
|
||||||
frame=single,
|
frame=single,
|
||||||
|
|||||||
Reference in New Issue
Block a user