diff options
author | Karl Berry <karl@freefriends.org> | 2019-12-08 22:48:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-12-08 22:48:47 +0000 |
commit | 43e7967ca666f134ba02d13e77365b9581cbd825 (patch) | |
tree | dc6d696404aef8a55b27faf7e9fef083dc10ba42 /Master/texmf-dist/tex/latex | |
parent | a4c58668f86f9a5e7f269e1424b9c7dedca4a906 (diff) |
elegantnote (8dec19)
git-svn-id: svn://tug.org/texlive/trunk@53061 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/elegantnote/elegantnote.cls | 563 |
1 files changed, 367 insertions, 196 deletions
diff --git a/Master/texmf-dist/tex/latex/elegantnote/elegantnote.cls b/Master/texmf-dist/tex/latex/elegantnote/elegantnote.cls index 8ad12488500..549745689e0 100644 --- a/Master/texmf-dist/tex/latex/elegantnote/elegantnote.cls +++ b/Master/texmf-dist/tex/latex/elegantnote/elegantnote.cls @@ -1,163 +1,223 @@ +% Author: Dongsheng Deng +% Homepage: https://ddswhu.me/ +% Email: elegantlatex2e@gmail.com +% Lastest Version: https://github.com/ElegantLaTeX/ElegantNote + +% --- Class structure: identification part +\ProvidesClass{elegantnote}[2018/12/09 ElegantNote v2.20 class] \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{elegantnote}[2018/01/06 ElegantNote v2.00 class] -\LoadClass[12pt,final]{article} \RequirePackage{kvoptions} \RequirePackage{ifthen} \RequirePackage{ifxetex} \RequirePackage{etoolbox} \RequirePackage{calc} -\AtEndOfClass{\RequirePackage{microtype}} +\SetupKeyvalOptions{ + family=ELEGANT, + prefix=ELEGANT@, + setkeys=\kvsetkeys} -\SetupKeyvalOptions{family=ELEGANT, prefix=ELEGANT@, setkeys=\kvsetkeys} \newcommand{\ekv}[1]{\kvsetkeys{ELEGANT}{#1}} % ----- Colors ----- -\DeclareStringOption[green]{color} +\DeclareStringOption[blue]{color} \DeclareStringOption[pad]{device} \DeclareStringOption[cn]{lang} \DeclareStringOption{mode} % ----- backward compatibility -\DeclareVoidOption{green}{\ekv{color = green}} -\DeclareVoidOption{cyan}{\ekv{color = cyan}} -\DeclareVoidOption{blue}{\ekv{color = blue}} -\DeclareVoidOption{sakura}{\ekv{color = sakura}} -\DeclareVoidOption{black}{\ekv{color = black}} +\DeclareVoidOption{green}{\ekv{color=green}} +\DeclareVoidOption{cyan}{\ekv{color=cyan}} +\DeclareVoidOption{blue}{\ekv{color=blue}} +\DeclareVoidOption{sakura}{\ekv{color=sakura}} +\DeclareVoidOption{black}{\ekv{color=black}} + + +\DeclareVoidOption{pc}{\ekv{device=pc}} +\DeclareVoidOption{pad}{\ekv{device=pad}} +\DeclareVoidOption{kindle}{\ekv{device=kindle}} +\DeclareVoidOption{normal}{\ekv{device=normal}} +\DeclareVoidOption{screen}{\ekv{device=screen}} + +\DeclareVoidOption{cn}{\ekv{lang=cn}} +\DeclareVoidOption{en}{\ekv{lang=en}} + +\DeclareVoidOption{geye}{\ekv{mode=geye}} +\DeclareVoidOption{hazy}{\ekv{mode=hazy}} + +\DeclareStringOption[numbers]{cite} +\DeclareVoidOption{numbers}{\ekv{cite=numbers}} +\DeclareVoidOption{authoryear}{\ekv{cite=authoryear}} +\DeclareVoidOption{super}{\ekv{cite=super}} + +\DeclareStringOption[11pt]{fontsize} +\DeclareVoidOption{10pt}{\ekv{fontsize=10pt}} +\DeclareVoidOption{11pt}{\ekv{fontsize=11pt}} +\DeclareVoidOption{12pt}{\ekv{fontsize=12pt}} + +\DeclareDefaultOption{ + \PassOptionsToClass{\CurrentOption}{article} + } +\ProcessKeyvalOptions*\relax -\DeclareVoidOption{pc}{\ekv{device = pc}} -\DeclareVoidOption{pad}{\ekv{device = pad}} -\DeclareVoidOption{kindle}{\ekv{device = kindle}} -\DeclareVoidOption{normal}{\ekv{device = normal}} +\LoadClass{article} -\DeclareVoidOption{cn}{\ekv{lang = cn}} -\DeclareVoidOption{en}{\ekv{lang = en}} -\DeclareVoidOption{geye}{\ekv{mode = geye}} +\RequirePackage{amsmath,amsthm} +\PassOptionsToPackage{no-math}{fontspec} +\ifdefstring{\ELEGANT@lang}{cn}{% + \RequirePackage[ + UTF8, + scheme=plain, + punct=kaiming]{ctex} + }{\relax} -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} -%\ExecuteOptions{12pt} -\ProcessKeyvalOptions*\relax -\ProcessOptions* +% newtxtext and newtxmath pkg +\RequirePackage{newtxtext} +\RequirePackage{newtxmath} +\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} -% fontsetting -\RequirePackage{ifxetex} -\ifxetex - \RequirePackage{fontenc} - \RequirePackage[no-math]{fontspec} - \setmainfont{Times New Roman}[NFSSFamily=ntxtlf] - \setsansfont{Arial} - %\setmonofont[Scale=0.9]{Courier New} - \RequirePackage{xeCJK} - \RequirePackage{xunicode} - \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun} - \setCJKsansfont[BoldFont={SimHei},ItalicFont={KaiTi}]{KaiTi} - \setCJKmonofont[BoldFont={SimHei},ItalicFont={KaiTi},Scale=0.9]{Microsoft YaHei} - \XeTeXlinebreaklocale "zh" - \XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt - \RequirePackage{newtxmath} - %\DeclareSymbolFont{operators}{OT1}{ntxtlf}{m}{n} - %\SetSymbolFont{operators}{bold}{OT1}{ntxtlf}{b}{n} - \setCJKfamilyfont{zhsong}{SimSun} - \setCJKfamilyfont{zhhei}{SimHei} - \setCJKfamilyfont{zhkai}{KaiTi} - \setCJKfamilyfont{zhfs}{FangSong} - \newcommand*{\songti}{\CJKfamily{zhsong}} - \newcommand*{\heiti}{\CJKfamily{zhhei}} - \newcommand*{\kaishu}{\CJKfamily{zhkai}} - \newcommand*{\fangsong}{\CJKfamily{zhfs}} -\else - \RequirePackage{fontenc} - \RequirePackage{newtxtext} - \RequirePackage{newtxmath} - \RequirePackage[UTF8, scheme=plain]{ctex} -\fi -\RequirePackage[scale=0.8]{FiraMono} - -% 常用宏包 \RequirePackage{indentfirst} \RequirePackage{anyfontsize} -\RequirePackage{amsmath} + \RequirePackage{graphicx} \RequirePackage{booktabs} \let\openbox\relax -\RequirePackage{amsthm} + \RequirePackage{xcolor} -\RequirePackage{hyperref} -\RequirePackage{xpatch} \definecolor{winered}{rgb}{0.5,0,0} +\definecolor{epubblue}{RGB}{1,126,218} +\RequirePackage{hyperref} +\RequirePackage{xpatch} \hypersetup{% - pdfborder = {0 0 0}, - colorlinks, - citecolor=ecolor, - filecolor=ecolor, - linkcolor=ecolor, - urlcolor=ecolor + pdfborder={0 0 0}, + colorlinks, + citecolor=ecolor, + filecolor=ecolor, + linkcolor=ecolor, + urlcolor=ecolor } + +\RequirePackage{hologo} + % 行距设置 \linespread{1.3} \setlength{\parskip}{3mm} \setlength{\parindent}{2em} -% 定义护眼模式 geye = true +% 定义护眼模式 geye=true \RequirePackage{xcolor} +\RequirePackage{silence} % good for eye color \ifdefstring{\ELEGANT@mode}{geye}{ \definecolor{geyecolor}{RGB}{199,237,204}% \pagecolor{geyecolor} }{\relax} +\ifdefstring{\ELEGANT@mode}{hazy}{ + \definecolor{geyecolor}{RGB}{251,250,248}% + \pagecolor{geyecolor} +}{\relax} + % graphics path -\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}} +\graphicspath{ + {./figure/} + {./figures/} + {./image/} + {./images/} + {./graphics/} + {./graphic/} + {./pictures/} + {./picture/} +} \let\openbox\relax -\newtheoremstyle{plain}{3pt}{3pt}{\itshape}{}{\color{ecolor}\bfseries}{}{0.5em}{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}} -\newtheoremstyle{definition}{3pt}{3pt}{\itshape}{}{\color{ecolor}\bfseries}{}{0.5em}{} -\newtheoremstyle{remark}{3pt}{3pt}{\itshape}{}{\color{ecolor}\bfseries}{}{0.5em}{} +\newtheoremstyle{plain}{3pt}{3pt}{% + \ifdefstring{\ELEGANT@lang}{en}{% + \itshape}{% + \kaishu}}{}{% + \color{ecolor}\bfseries}{}{% + 0.5em}{% + \thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}} + +\newtheoremstyle{definition}{3pt}{3pt}{% + \ifdefstring{\ELEGANT@lang}{en}{% + \itshape}{% + \kaishu}}{}{% + \color{ecolor}\bfseries}{}{% + 0.5em}{} + +\newtheoremstyle{remark}{3pt}{3pt}{ + \ifdefstring{\ELEGANT@lang}{en}{ + \itshape}{ + \kaishu}}{}{ + \color{ecolor}\bfseries}{}{ + 0.5em}{} % caption settings -\RequirePackage[font=small,labelfont={bf,color=ecolor}]{caption} +\RequirePackage{caption} +\captionsetup{ + labelfont={bf,color=ecolor}} \captionsetup[table]{skip=3pt} \captionsetup[figure]{skip=3pt} % list/itemize/enumerate setting -\RequirePackage[shortlabels]{enumitem} +\RequirePackage[shortlabels,inline]{enumitem} \setlist{nolistsep} +\RequirePackage[sort&compress]{natbib} +\setlength{\bibsep}{0.0pt} +\def\bibfont{\footnotesize} + + % headings \RequirePackage{fancyhdr} \fancyhf{} \pagestyle{fancy} -\cfoot{\footnotesize\textcolor{gray}{\thepage}} +\rfoot{\footnotesize\textcolor{gray}{\thepage}} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \fancypagestyle{plain}{% \renewcommand{\headrulewidth}{0pt}% \fancyhf{}% - \fancyfoot[C]{\footnotesize \textcolor{gray}{\thepage}}% -} + \fancyfoot[R]{ + \footnotesize \textcolor{gray}{\thepage}}} -% bib-settings -\RequirePackage{natbib} -\setlength{\bibsep}{0.0pt} -\def\bibfont{\footnotesize} +\RequirePackage[flushmargin,stable]{footmisc} +\setlength{\footnotesep}{12pt} -\RequirePackage{sectsty} +\RequirePackage{titlesec} +\titleformat*{\section}{\normalfont\Large\bfseries\color{ecolor}} +\titleformat*{\subsection}{\normalfont\large\bfseries\color{ecolor}} +\titleformat*{\subsubsection}{\normalfont\normalsize\bfseries\color{ecolor}} \ifdefstring{\ELEGANT@color}{green}{ - \definecolor{ecolor}{RGB}{0,120,2}% + \definecolor{ecolor}{RGB}{0,120,2}% }{\relax} \ifdefstring{\ELEGANT@color}{cyan}{ - \definecolor{ecolor}{RGB}{0,175,152}% + \definecolor{ecolor}{RGB}{31,186,190}% }{\relax} \ifdefstring{\ELEGANT@color}{blue}{ - \definecolor{ecolor}{RGB}{20,50,104}% + \definecolor{ecolor}{RGB}{1,126,218}% }{\relax} \ifdefstring{\ELEGANT@color}{sakura}{ \definecolor{ecolor}{RGB}{255,183,197}% @@ -173,80 +233,120 @@ % \definecolor{black}{RGB}{255,183,197} %% device settings -%% default = pad -\ifdefstring{\ELEGANT@device}{pc}{ - \RequirePackage[margin=8mm, paperwidth=6.2in, paperheight=6in,includefoot]{geometry} -}{\relax} -\ifdefstring{\ELEGANT@device}{pad}{ - \RequirePackage[margin=8mm, paperwidth=6in, paperheight=8in,includefoot]{geometry} - %197mm*148mm -}{\relax} -\ifdefstring{\ELEGANT@device}{kindle}{ - \RequirePackage[margin=8mm, paperwidth=3.68in, paperheight=4.92in]{geometry} - % 160mm*115mm -}{\relax} -\ifdefstring{\ELEGANT@device}{normal}{ - \RequirePackage[margin=1in, a4paper]{geometry} -}{\relax} +%% default=pad -\allsectionsfont{\color{ecolor}} -%\sectionfont{\color{ecolor}} -%\subsectionfont{\color{ecolor}} +\RequirePackage{geometry} +\WarningsOff +\RequirePackage[\ELEGANT@fontsize]{extsizes} +\WarningsOn -\ifdefstring{\ELEGANT@lang}{cn}{ +\ifdefstring{\ELEGANT@device}{pad}{% + \geometry{ + paperwidth=6in, + paperheight=8in, + includefoot, + margin=8mm}}{% + \relax} + +\ifdefstring{\ELEGANT@device}{pc}{ + \geometry{% + margin=8mm, + paperwidth=6.2in, + paperheight=6in, + includefoot}}{% + \relax} + +\ifdefstring{\ELEGANT@device}{kindle}{% + \geometry{ + margin=8mm, + paperwidth=3.68in, + paperheight=4.92in}}{% + \relax} + +\ifdefstring{\ELEGANT@device}{normal}{% + \geometry{ + margin=1in, + a4paper}}{% + \relax} + +\ifdefstring{\ELEGANT@device}{screen}{% + \geometry{ + screen, + paperwidth=25.4cm, + paperheight=19.05cm, + margin=1.6cm, + headheight=2.17cm, + footskip=0.6cm}}{% + \relax} + + +\ifdefstring{\ELEGANT@lang}{cn}{% \theoremstyle{plain}% default - \newtheorem{theorem}{定理}[section] % - \newtheorem{lemma}[theorem]{引理} % - \newtheorem{proposition}[theorem]{性质} % - \newtheorem*{corollary}{推论} % - \theoremstyle{definition} % - \newtheorem{definition}{定义}[section] % - \newtheorem{conjecture}{猜想}[section] % - \newtheorem{example}{例}[section] % - \theoremstyle{remark} % - \newtheorem*{remark}{\normalfont\bfseries 评论} % - \newtheorem*{note}{\normalfont\bfseries 注} % - \newtheorem{case}{\normalfont\bfseries 案例} % - \renewcommand*{\proofname}{\normalfont\bfseries\color{ecolor}证明} % - \renewcommand\contentsname{\color{ecolor}目录} - \renewcommand\refname{\color{ecolor}参考文献} % - \renewcommand\figurename{图} % - \renewcommand\tablename{表} - \newcommand\versiontext{版本:}% - \newcommand\updatetext{更新:}% - \setlength{\parindent}{2em} - \newcommand{\keywords}[1]{\vskip2ex\par\noindent\normalfont{\bfseries 关键词: } #1} - -}{\relax} + \newtheorem{theorem}{定理}[section] % + \newtheorem{lemma}[theorem]{引理} % + \newtheorem{proposition}[theorem]{性质} % + \newtheorem*{corollary}{推论} % + \theoremstyle{definition} % + \newtheorem{definition}{定义}[section] % + \newtheorem{conjecture}{猜想}[section] % + \newtheorem{example}{例}[section] % + \theoremstyle{remark} % + \newtheorem*{remark}{\normalfont\bfseries 评论} % + \newtheorem*{note}{\normalfont\bfseries 注} % + \newtheorem{case}{\normalfont\bfseries 案例} % + \renewcommand*{\proofname}{\normalfont\bfseries\color{ecolor}证明} % + \renewcommand\contentsname{\color{ecolor}目录} + \renewcommand\refname{\color{ecolor}参考文献} % + \renewcommand\figurename{图} % + \renewcommand\tablename{表} + \newcommand\versiontext{版本:}% + \newcommand\updatetext{更新:}% + \setlength{\parindent}{2em} + \newcommand{\keywords}[1]{% + \vskip2ex\par\noindent\normalfont{\bfseries 关键词: } #1} + \RequirePackage[\ELEGANT@cite]{gbt7714}}{% + \relax} + \ifdefstring{\ELEGANT@lang}{en}{ \theoremstyle{plain}% default - \newtheorem{theorem}{Theorem}[section] % - \newtheorem{lemma}[theorem]{Lemma} % - \newtheorem{proposition}[theorem]{Proposition} % - \newtheorem*{corollary}{Corollary} % - \theoremstyle{definition} % - \newtheorem{definition}{Definition}[section] % - \newtheorem{conjecture}{Conjecture}[section] % - \newtheorem{example}{Example}[section] % - \theoremstyle{remark} % - \newtheorem*{remark}{Remark} % - \newtheorem*{note}{Note} % - \newtheorem{case}{Case} - \renewcommand*{\proofname}{\normalfont\bfseries\color{ecolor}Proof} - \newcommand\versiontext{Version: }% - \newcommand\updatetext{Update: }% -}{\relax} + \newtheorem{theorem}{Theorem}[section] % + \newtheorem{lemma}[theorem]{Lemma} % + \newtheorem{proposition}[theorem]{Proposition} % + \newtheorem*{corollary}{Corollary} % + \theoremstyle{definition} % + \newtheorem{definition}{Definition}[section] % + \newtheorem{conjecture}{Conjecture}[section] % + \newtheorem{example}{Example}[section] % + \theoremstyle{remark} % + \newtheorem*{remark}{Remark} % + \newtheorem*{note}{Note} % + \newtheorem{case}{Case} + \renewcommand*{\proofname}{% + \normalfont\bfseries\color{ecolor} Proof} + \newcommand\versiontext{Version: }% + \newcommand\updatetext{Update: }% + \bibliographystyle{aer}}{% + \relax} + + +\def\IfEmpty#1{% + \edef\1{\the#1} + \ifx\1\empty} \newtoks\version \newtoks\institute +\def \ifempty#1{ + \def\temp{#1} + \ifx\temp\empty} + \renewcommand\maketitle{\par \begingroup \renewcommand\thefootnote{\@fnsymbol\c@footnote}% \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% \long\def\@makefntext##1{\parindent 1em\noindent - \hb@xt@1.8em{% - \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% \if@twocolumn \ifnum \col@number=\@ne \@maketitle @@ -255,10 +355,10 @@ \fi \else \newpage - \global\@topnum\z@ % Prevents figures from going at top of page. + \global\@topnum\z@ % Prevents figures from going at top of page. \@maketitle \fi - \thispagestyle{plain}\@thanks + \thispagestyle{empty}\@thanks \endgroup \setcounter{footnote}{0}% \global\let\thanks\relax @@ -266,75 +366,146 @@ \global\let\@maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty + \global\let\@ELEGANT@version\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax -} + \global\let\ELEGANT@version\relax} + \def\@maketitle{% - \newpage \color{ecolor} \null \vskip 2em% \begin{center}% - \let \footnote \thanks - {\LARGE\bfseries \@title \par}% - \vskip 1.5em% - {\large + \let \footnote \thanks{% + \LARGE\bfseries \@title \par}% + \vskip 1.5em {% + \large \lineskip .5em% \begin{tabular}[t]{c}% - \kaishu \@author\\ + \@author\\ \the\institute \end{tabular}\par}% - \vskip 1.5em% - {\small\itshape \versiontext \the\version}% - \vskip -.5em% - {\small\itshape \updatetext \@date}% + + \IfEmpty\version + \else + {\normalfont\ifdefstring{\ELEGANT@lang}{en}{ + \itshape}{% + \kaishu} + \versiontext\the\version \\} + \fi + \ifx\@date\empty + \else + {\normalfont\ifdefstring{\ELEGANT@lang}{en}{ + \itshape}{% + \kaishu} + \updatetext\@date}% + \fi \end{center}% - \par - \vskip 1.5em} - + \par} + \RequirePackage{tikz} \usetikzlibrary{shadows} -\newcommand*{\eBall}{\tikz \draw [baseline, ball color=ecolor, draw=ecolor] circle (2pt);} -\newcommand*{\eShadow}{\tikz \draw [baseline, fill=ecolor,draw=ecolor,circular drop shadow] circle (2pt);} -\setlist[enumerate,1]{label=\color{ecolor}(\arabic*).} -\setlist[enumerate,2]{label=\color{ecolor}(\Roman*).} -\setlist[enumerate,3]{label=\color{ecolor}(\Alph*).} -\setlist[enumerate,4]{label=\color{ecolor}(\roman*).} -\setlist[itemize,1]{label={\eBall}} -\setlist[itemize,2]{label={\eShadow}} -%source1: https://tex.stackexchange.com/questions/41408/a-five-level-deep-list -%source2: https://tex.stackexchange.com/questions/318199/change-color-of-itemize-bullet - -\DeclareSymbolFont{cmlargesymbols}{OMX}{cmex}{m}{n} -\DeclareMathSymbol{\intop}{\mathop}{cmlargesymbols}{"5A} - \def\int{\intop\nolimits} -\DeclareMathSymbol{\ointop}{\mathop}{cmlargesymbols}{"49} - \def\oint{\ointop\nolimits} -\DeclareMathSymbol{\sumop}{\mathop}{cmlargesymbols}{"58} - \let\sum\sumop -\DeclareMathSymbol{\prodop}{\mathop}{cmlargesymbols}{"59} - \let\prod\prodop - - -\RequirePackage{listings} +\newcommand*{\eitemi}{ + \tikz\draw[baseline, ball color=ecolor, draw=none] circle (2pt);} +\newcommand*{\eitemii}{ + \tikz\draw[baseline, fill=ecolor,draw=none,circular drop shadow] circle (2pt);} +\newcommand*{\eitemiii}{% + \tikz\draw[baseline,fill=ecolor,draw=none] circle (2pt);} + +\setlist[enumerate,1]{label=\color{ecolor}\arabic*.} +\setlist[enumerate,2]{label=\color{ecolor}(\alph*).} +\setlist[enumerate,3]{label=\color{ecolor}\Roman*.} +\setlist[enumerate,4]{label=\color{ecolor}\Alph*.} +\setlist[itemize,1]{label={\eitemi}} +\setlist[itemize,2]{label={\eitemii}} +\setlist[itemize,3]{label={\eitemiii}} +% source1: https://tex.stackexchange.com/questions/41408/a-five-level-deep-list +% source2: https://tex.stackexchange.com/questions/318199/change-color-of-itemize-bullet + + +\RequirePackage{listings,lstautogobble} +\renewcommand{\ttdefault}{cmtt} + +\lstdefinestyle{estyle}{ + basicstyle=% + \ttfamily + \lst@ifdisplaystyle\footnotesize\fi} + +% \lstset{ +% basicstyle=\scriptsize\ttfamily, +% style=estyle} + \definecolor{lightgrey}{rgb}{0.9,0.9,0.9} \definecolor{frenchplum}{RGB}{190,20,83} \lstset{language=[LaTeX]TeX, - texcsstyle=*\bf\color{winered}\ttfamily, - basicstyle=\footnotesize\ttfamily, - numbers=none, - breaklines=true, - keywordstyle=\bf\color{winered}\ttfamily, - commentstyle=\color{gray}, - emph={elegantpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath,figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt,ctex,microtype,description,times,newtx,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm}, - emphstyle={\color{frenchplum}}, - morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords}, - frame=none, - tabsize=2, - rulecolor=\color{ecolor}, -} + style=estyle, + autogobble=true, + texcsstyle=*\color{winered}, + numbers=none, + breaklines=true, + keywordstyle=\color{winered}, + commentstyle=\color{gray}, + emph={% + elegantpaper, + fontenc, + fontspec, + xeCJK, + FiraMono, + xunicode, + newtxmath, + figure, + fig, + image, + img, + table, + itemize, + enumerate, + newtxtext, + newtxtt, + ctex, + microtype, + description, + times, + newtx, + booktabs, + tabular, + PDFLaTeX, + XeLaTeX, + type1cm, + BibTeX, + device, + color, + mode, + lang, + amsthm}, + emphstyle={\color{frenchplum}}, + morekeywords={% + DeclareSymbolFont, + SetSymbolFont, + toprule, + midrule, + bottomrule, + institute, + version, + includegraphics, + setmainfont, + setsansfont, + setmonofont , + setCJKmainfont, + setCJKsansfont, + setCJKmonofont, + RequirePackage, + figref, + pagecolor, + definecolor, + tabref, + email, + maketitle, + keywords}, + frame=none, + tabsize=2} |