% https://github.com/vEnhance/dotfiles/blob/main/texmf/tex/latex/evan/evan.sty % % % % | \ % % ______ __ __ ______ _______ _______ _| ▓▓_ __ __ % % / \| \ / \| \| \ / \ ▓▓ \ | \ | \ % % | ▓▓▓▓▓▓\\▓▓\ / ▓▓ \▓▓▓▓▓▓\ ▓▓▓▓▓▓▓\ | ▓▓▓▓▓▓▓\▓▓▓▓▓▓ | ▓▓ | ▓▓ % % | ▓▓ ▓▓ \▓▓\ ▓▓ / ▓▓ ▓▓ | ▓▓ \▓▓ \ | ▓▓ __| ▓▓ | ▓▓ % % | ▓▓▓▓▓▓▓▓ \▓▓ ▓▓ | ▓▓▓▓▓▓▓ ▓▓ | ▓▓__ _\▓▓▓▓▓▓\ | ▓▓| \ ▓▓__/ ▓▓ % % \▓▓ \ \▓▓▓ \▓▓ ▓▓ ▓▓ | ▓▓ \ ▓▓ \▓▓ ▓▓\▓▓ ▓▓ % % \▓▓▓▓▓▓▓ \▓ \▓▓▓▓▓▓▓\▓▓ \▓▓\▓▓\▓▓▓▓▓▓▓ \▓▓▓▓ _\▓▓▓▓▓▓▓ % % | \__| ▓▓ % % \▓▓ ▓▓ % % \▓▓▓▓▓▓ % % % % https://github.com/vEnhance/dotfiles/blob/main/texmf/tex/latex/evan/evan.sty % % ░█▄█░▄▀▄░█░░▒█░░░▀█▀░▄▀▄░░░█▒█░▄▀▀▒██▀ % ▒█▒█░▀▄▀░▀▄▀▄▀▒░░▒█▒░▀▄▀▒░░▀▄█▒▄██░█▄▄ % % If you don't know how to use this file, read: % +--------------------------------------------+ % | https://web.evanchen.cc/faq-latex.html#L-4 | % +--------------------------------------------+ % % TL;DR of the Boost license conditions are as follows: % % 1. Any SOURCE VERSIONS must cite evan.sty and the Boost license below. % 2. For COMPILED PDF OUTPUT, attribution of evan.sty is OPTIONAL (but nice). % 3. NO OTHER REQUIREMENTS; you may modify, redistribute, sell freely. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % BOOST SOFTWARE LICENSE - VERSION 1.0 - 17 AUGUST 2003 % % Copyright (c) 2025 Evan Chen [evan at evanchen.cc] % https://web.evanchen.cc/ || github.com/vEnhance % % Available for download at: % https://github.com/vEnhance/dotfiles/blob/main/texmf/tex/latex/evan/evan.sty % % Permission is hereby granted, free of charge, to any person or organization % obtaining a copy of the software and accompanying documentation covered by % this license (the "Software") to use, reproduce, display, distribute, % execute, and transmit the Software, and to prepare derivative works of the % Software, and to permit third-parties to whom the Software is furnished to % do so, all subject to the following: % % The copyright notices in the Software and this entire statement, including % the above license grant, this restriction and the following disclaimer, % must be included in all copies of the Software, in whole or in part, and % all derivative works of the Software, unless such copies or derivative % works are solely in the form of machine-executable object code generated by % a source language processor. % % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR % IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, % FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT % SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE % FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, % ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER % DEALINGS IN THE SOFTWARE. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ProvidesPackage{evan} %%fakesection Argument processing % Default Arguments % We include "Evan" in all of these to make sure % that they don't collide with anything in external packages \newif\ifevanfancy\evanfancytrue \newif\ifevanhdr\evanhdrtrue \newif\ifevanhref\evanhreftrue \newif\ifevansetup\evansetuptrue \newif\ifevanthm\evanthmtrue \newif\ifevansecthm\evansecthmfalse \newif\ifevanpkg\evanpkgtrue \newif\ifevanpdf\evanpdftrue \newif\ifevanauthor\evanauthortrue \newif\ifevanchinese\evanchinesefalse \newif\ifevanmdthm\evanmdthmfalse \newif\ifevanpatchasy\evanpatchasyfalse \newif\ifevanhints\evanhintsfalse \newif\ifevanasy\evanasytrue \newif\ifevancolorsec\evancolorsecfalse \newif\ifevantitlemark\evantitlemarktrue \newif\ifevanvonenabled\evanvonenabledfalse \newif\ifevanbritish\evanbritishtrue \newif\ifevanbib\evanbibfalse %Receive Arguments \DeclareOption{chinese}{\evanchinesetrue} % Chinese support % allow href to override this one \DeclareOption{sexy}{\evansecthmtrue\evanmdthmtrue\evancolorsectrue} % long docs \DeclareOption{fancy}{\evanfancytrue} \DeclareOption{nofancy}{\evanfancyfalse} \DeclareOption{hdr}{\evanhdrtrue} \DeclareOption{nohdr}{\evanhdrfalse} \DeclareOption{href}{\evanhreftrue} \DeclareOption{nohref}{\evanhreffalse} \DeclareOption{nosetup}{\evansetupfalse} \DeclareOption{thm}{\evanthmtrue} \DeclareOption{nothm}{\evanthmfalse} \DeclareOption{secthm}{\evansecthmtrue} \DeclareOption{nosecthm}{\evansecthmfalse} \DeclareOption{nopdf}{\evanpdffalse} \DeclareOption{nopkg}{\evanpkgfalse} \DeclareOption{noauthor}{\evanauthorfalse} \DeclareOption{titlemark}{\evantitlemarktrue} % Sets title in ohead, not \rightmark \DeclareOption{sectionmark}{\evantitlemarkfalse} % Uses \rightmark not title in ohead \DeclareOption{mdthm}{\evanmdthmtrue} \DeclareOption{nomdthm}{\evanmdthmfalse} \DeclareOption{colorsec}{\evancolorsectrue} \DeclareOption{nocolorsec}{\evancolorsecfalse} \DeclareOption{patchasy}{\evanpatchasytrue} \DeclareOption{noasy}{\evanasyfalse} \DeclareOption{hints}{\evanhintstrue} \DeclareOption{von}{\evanvonenabledtrue} \DeclareOption{british}{\evanbritishtrue} \DeclareOption{american}{\evanbritishfalse} \DeclareOption{bib}{\evanbibtrue} % legacy diagrams option, for backwards compatibility \DeclareOption{diagrams}{} \DeclareOption{nodiagrams}{} \ProcessOptions\relax % if packages not loaded, turn off mdthm and asy \ifevanpkg\else\evanmdthmfalse\fi \ifevanpkg\else\evanasyfalse\fi % If no setup, turn off theorems \ifevansetup\else\evanthmfalse\fi %%fakesection Some macros %Small commands \usepackage{amsmath,amssymb} \usepackage{iftex} \ifevanpkg \usepackage[minimal]{yhmath} \usepackage{derivative} \fi \newcommand{\cbrt}[1]{\sqrt[3]{#1}} \newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor} \newcommand{\ceiling}[1]{\left\lceil #1 \right\rceil} \newcommand{\mailto}[1]{\href{mailto:#1}{\texttt{#1}}} \newcommand{\ol}{\overline} \newcommand{\ul}{\underline} \newcommand{\wt}{\widetilde} \newcommand{\wh}{\widehat} \newcommand{\eps}{\varepsilon} \newcommand{\vocab}[1]{\textbf{\color{blue}\sffamily #1}} \providecommand{\alert}{\vocab} \providecommand{\half}{\frac{1}{2}} \newcommand{\catname}{\mathsf} \newcommand{\hrulebar}{ \par\hspace{\fill}\rule{0.95\linewidth}{.7pt}\hspace{\fill} \par\nointerlineskip \vspace{\baselineskip} } \providecommand{\arc}[1]{\wideparen{#1}} %For use in author command \newcommand{\plusemail}[1]{\\ \normalfont \texttt{\mailto{#1}}} %More commands and math operators \DeclareMathOperator{\cis}{cis} \DeclareMathOperator*{\lcm}{lcm} \DeclareMathOperator*{\argmin}{arg min} \DeclareMathOperator*{\argmax}{arg max} %Convenient Environments \newenvironment{soln}{\begin{proof}[Solution]}{\end{proof}} \newenvironment{parlist}{\begin{inparaenum}[(i)]}{\end{inparaenum}} \newenvironment{gobble}{\setbox\z@\vbox\bgroup}{\egroup} %Inequalities \newcommand{\cycsum}{\sum_{\mathrm{cyc}}} \newcommand{\symsum}{\sum_{\mathrm{sym}}} \newcommand{\cycprod}{\prod_{\mathrm{cyc}}} \newcommand{\symprod}{\prod_{\mathrm{sym}}} %From H113 "Introduction to Abstract Algebra" at UC Berkeley \newcommand{\CC}{\mathbb C} \newcommand{\FF}{\mathbb F} \newcommand{\NN}{\mathbb N} \newcommand{\QQ}{\mathbb Q} \newcommand{\RR}{\mathbb R} \newcommand{\ZZ}{\mathbb Z} \newcommand{\charin}{\text{ char }} \DeclareMathOperator{\sign}{sign} \DeclareMathOperator{\Aut}{Aut} \DeclareMathOperator{\Inn}{Inn} \DeclareMathOperator{\Syl}{Syl} \DeclareMathOperator{\Gal}{Gal} \DeclareMathOperator{\GL}{GL} % General linear group \DeclareMathOperator{\SL}{SL} % Special linear group \DeclareMathOperator{\Vol}{Vol} % Special linear group %From Kiran Kedlaya's "Geometry Unbound" \newcommand{\abs}[1]{\left\lvert #1 \right\rvert} \newcommand{\norm}[1]{\left\lVert #1 \right\rVert} \newcommand{\dang}{\measuredangle} %% Directed angle \newcommand{\ray}[1]{\overrightarrow{#1}} \newcommand{\seg}[1]{\overline{#1}} %From M275 "Topology" at SJSU \DeclareMathOperator{\id}{id} \newcommand{\taking}[1]{\xrightarrow{#1}} \newcommand{\inv}{^{-1}} %From M170 "Introduction to Graph Theory" at SJSU \DeclareMathOperator{\diam}{diam} \DeclareMathOperator{\ord}{ord} \newcommand{\defeq}{\overset{\mathrm{def}}{=}} %From the USAMO .tex files \newcommand{\ts}{\textsuperscript} \newcommand{\dg}{^\circ} \newcommand{\ii}{\item} % From Math 55 and Math 145 at Harvard \newenvironment{subproof}[1][Proof]{% \begin{proof}[#1] \renewcommand{\qedsymbol}{$\blacksquare$}}% {\end{proof}} \newcommand{\liff}{\leftrightarrow} \newcommand{\lthen}{\rightarrow} \newcommand{\opname}{\operatorname} \newcommand{\surjto}{\twoheadrightarrow} \newcommand{\injto}{\hookrightarrow} \newcommand{\On}{\mathrm{On}} % ordinals \DeclareMathOperator{\img}{im} % Image \DeclareMathOperator{\Img}{Im} % Image \DeclareMathOperator{\coker}{coker} % Cokernel \DeclareMathOperator{\Coker}{Coker} % Cokernel \DeclareMathOperator{\Ker}{Ker} % Kernel \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\Spec}{Spec} % spectrum \DeclareMathOperator{\Tr}{Tr} % trace \DeclareMathOperator{\pr}{pr} % projection \DeclareMathOperator{\ext}{ext} % extension \DeclareMathOperator{\pred}{pred} % predecessor \DeclareMathOperator{\dom}{dom} % domain \DeclareMathOperator{\ran}{ran} % range \DeclareMathOperator{\Hom}{Hom} % homomorphism \DeclareMathOperator{\Mor}{Mor} % morphisms \DeclareMathOperator{\End}{End} % endomorphism % Things Lie \newcommand{\kb}{\mathfrak b} \newcommand{\kg}{\mathfrak g} \newcommand{\kh}{\mathfrak h} \newcommand{\kn}{\mathfrak n} \newcommand{\ku}{\mathfrak u} \newcommand{\kz}{\mathfrak z} \DeclareMathOperator{\Ext}{Ext} % Ext functor \DeclareMathOperator{\Tor}{Tor} % Tor functor \newcommand{\gl}{\opname{\mathfrak{gl}}} % frak gl group \def\sl{\opname{\mathfrak{sl}}} % frak sl group chktex 6 % More script letters etc. \newcommand{\SA}{\mathcal A} \newcommand{\SB}{\mathcal B} \newcommand{\SC}{\mathcal C} \newcommand{\SF}{\mathcal F} \newcommand{\SG}{\mathcal G} \newcommand{\SH}{\mathcal H} \newcommand{\OO}{\mathcal O} \newcommand{\SCA}{\mathscr A} \newcommand{\SCB}{\mathscr B} \newcommand{\SCC}{\mathscr C} \newcommand{\SCD}{\mathscr D} \newcommand{\SCE}{\mathscr E} \newcommand{\SCF}{\mathscr F} \newcommand{\SCG}{\mathscr G} \newcommand{\SCH}{\mathscr H} % Mathfrak primes \newcommand{\km}{\mathfrak m} \newcommand{\kp}{\mathfrak p} \newcommand{\kq}{\mathfrak q} %%fakesection Asymptote setup \ifevanasy \ifevanpatchasy \usepackage{patchasy} \else \usepackage{asymptote} \fi \begin{asydef} defaultpen(fontsize(10pt)); size(8cm); // set a reasonable default usepackage("amsmath"); usepackage("amssymb"); settings.tex="pdflatex"; settings.outformat="pdf"; // Replacement for olympiad+cse5 which is not standard import geometry; // recalibrate fill and filldraw for conics void filldraw(picture pic = currentpicture, conic g, pen fillpen=defaultpen, pen drawpen=defaultpen) { filldraw(pic, (path) g, fillpen, drawpen); } void fill(picture pic = currentpicture, conic g, pen p=defaultpen) { filldraw(pic, (path) g, p); } // some geometry pair foot(pair P, pair A, pair B) { return foot(triangle(A,B,P).VC); } pair centroid(pair A, pair B, pair C) { return (A+B+C)/3; } // cse5 abbreviations path CP(pair P, pair A) { return circle(P, abs(A-P)); } path CR(pair P, real r) { return circle(P, r); } pair IP(path p, path q) { return intersectionpoints(p,q)[0]; } pair OP(path p, path q) { return intersectionpoints(p,q)[1]; } path Line(pair A, pair B, real a=0.6, real b=a) { return (a*(A-B)+A)--(b*(B-A)+B); } // cse5 more useful functions picture CC() { picture p=rotate(0)*currentpicture; currentpicture.erase(); return p; } pair MP(Label s, pair A, pair B = plain.S, pen p = defaultpen) { Label L = s; L.s = "$"+s.s+"$"; label(L, A, B, p); return A; } pair Drawing(Label s = "", pair A, pair B = plain.S, pen p = defaultpen) { dot(MP(s, A, B, p), p); return A; } path Drawing(path g, pen p = defaultpen, arrowbar ar = None) { draw(g, p, ar); return g; } \end{asydef} \fi %%fakesection BEGIN MAIN SETUP %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifevansetup %%fakesection Set up author and date \ifevanauthor \title{} % empty title to avoid crashes \ifluatex \author{Evan Chen《陳誼廷》} \else \author{Evan Chen} \fi \date{\today} \fi %%fakesection Hyperref \ifevanpkg \PassOptionsToPackage{svgnames,dvipsnames,table}{xcolor} \usepackage{xcolor} \ifevanbib \usepackage[backend=biber,backref=true,style=alphabetic]{biblatex} \DeclareFieldFormat{labelalpha}{\textbf{\small #1}} % citation ID's in small-bold \DefineBibliographyStrings{english}{% backrefpage = {cited p.}, % for single page number backrefpages = {cited pp.} % for multiple page numbers } \DeclareFieldFormat{journaltitle}{\mkbibemph{#1},} % italic journal title with comma \DeclareFieldFormat[inbook,thesis]{title}{\mkbibemph{#1}\addperiod} % italic title with period \DeclareFieldFormat[article]{title}{#1} % title of journal article is printed as normal text \DeclareFieldFormat[article]{volume}{\textbf{#1}\addcolon\space} % bold volume numbers % Separate ISBN-13 field \DeclareSourcemap{\maps[datatype=bibtex]{\map{\step[fieldsource=ISBN-13,fieldtarget=ISBN]}}} % Evan likes small caps for bibliography author names \renewcommand{\mkbibnamegiven}[1]{\textsc{#1}} \renewcommand{\mkbibnamefamily}[1]{\textsc{#1}} \renewcommand{\mkbibnameprefix}[1]{\textsc{#1}} \renewcommand{\mkbibnamesuffix}[1]{\textsc{#1}} % Drop trailing punctuation in bibliography names \renewcommand{\finentrypunct}{} \fi \ifevanhref \usepackage[colorlinks=true,pdfusetitle]{hyperref} \hypersetup{pdfkeywords={evan.sty},pdfsubject={web.evanchen.cc}} \hypersetup{urlcolor=RubineRed,linkcolor=RoyalBlue,citecolor=ForestGreen} \fi \usepackage[nameinlink]{cleveref} \fi %%fakesection New theorem styles \ifevanthm \usepackage{amsthm} \usepackage{thmtools} \hypersetup{hypertexnames=false} \fi \ifevanmdthm \ifevanthm %% theorem packages loaded already \else \usepackage{amsthm} \usepackage{thmtools} \hypersetup{hypertexnames=false} \fi \usepackage[framemethod=TikZ]{mdframed} \usetikzlibrary{shadows} % https://tex.stackexchange.com/a/292090/76888 % https://github.com/marcodaniel/mdframed/issues/12 \usepackage{xpatch} \xpatchcmd{\endmdframed} {\aftergroup\endmdf@trivlist\color@endgroup} {\endmdf@trivlist\color@endgroup\@doendpe} {}{} \mdfdefinestyle{mdbluebox}{% roundcorner=10pt, linewidth=1pt, skipabove=12pt, innerbottommargin=9pt, skipbelow=2pt, linecolor=blue, nobreak=true, backgroundcolor=TealBlue!5, } \declaretheoremstyle[ headfont=\sffamily\bfseries\color{MidnightBlue}, mdframed={style=mdbluebox}, headpunct={\\[3pt]}, postheadspace={0pt} ]{thmbluebox} \mdfdefinestyle{mdredbox}{% linewidth=0.5pt, skipabove=12pt, frametitleaboveskip=5pt, frametitlebelowskip=0pt, skipbelow=2pt, frametitlefont=\bfseries, innertopmargin=4pt, innerbottommargin=8pt, nobreak=true, backgroundcolor=Salmon!5, linecolor=RawSienna, } \declaretheoremstyle[ headfont=\bfseries\color{RawSienna}, mdframed={style=mdredbox}, headpunct={\\[3pt]}, postheadspace={0pt}, ]{thmredbox} \mdfdefinestyle{mdgreenbox}{% skipabove=8pt, skipbelow=0pt, linewidth=2pt, rightline=false, leftline=true, topline=false, bottomline=false, linecolor=ForestGreen, backgroundcolor=ForestGreen!5, } \declaretheoremstyle[ headfont=\bfseries\sffamily\color{ForestGreen!70!black}, bodyfont=\normalfont, spaceabove=2pt, spacebelow=1pt, mdframed={style=mdgreenbox}, headpunct={ --- }, ]{thmgreenbox} \mdfdefinestyle{mdblackbox}{% skipabove=8pt, linewidth=3pt, rightline=false, leftline=true, topline=false, bottomline=false, linecolor=black, backgroundcolor=RedViolet!5!gray!5, } \declaretheoremstyle[ headfont=\bfseries, bodyfont=\normalfont\small, spaceabove=0pt, spacebelow=0pt, mdframed={style=mdblackbox} ]{thmblackbox} \mdfdefinestyle{mdpurplebox}{% roundcorner=10pt, linewidth=1pt, skipabove=12pt, skipbelow=12pt, innertopmargin=9pt, innerbottommargin=9pt, linecolor=black, nobreak=true, backgroundcolor=Orchid!10, shadow=true, shadowsize=6pt, shadowcolor=black!30, frametitleaboveskip=8pt, frametitlebelowskip=8pt, frametitlebackgroundcolor=Violet!50!black, frametitlefont=\bfseries\sffamily\color{white}, frametitlerule=true, } \newcommand{\listhack}{$\empty$\vspace{-2em}} \fi %%fakesection Theorem setup \ifevanthm \theoremstyle{definition} %Branching here: the option secthm changes theorems to be labelled by section \ifevanmdthm \ifevansecthm \declaretheorem[style=thmbluebox,name=Theorem,numberwithin=section]{theorem} \else \declaretheorem[style=thmbluebox,name=Theorem]{theorem} \fi \declaretheorem[style=thmbluebox,name=Lemma,sibling=theorem]{lemma} \declaretheorem[style=thmbluebox,name=Proposition,sibling=theorem]{proposition} \declaretheorem[style=thmbluebox,name=Corollary,sibling=theorem]{corollary} \declaretheorem[style=thmbluebox,name=Assumption,sibling=theorem]{assume} \declaretheorem[style=thmbluebox,name=Theorem,numbered=no]{theorem*} \declaretheorem[style=thmbluebox,name=Lemma,numbered=no]{lemma*} \declaretheorem[style=thmbluebox,name=Proposition,numbered=no]{proposition*} \declaretheorem[style=thmbluebox,name=Corollary,numbered=no]{corollary*} \declaretheorem[style=thmbluebox,name=Assumption,numbered=no]{assume*} \else \ifevansecthm \declaretheorem[name=Theorem,numberwithin=section]{theorem} \else \declaretheorem[name=Theorem]{theorem} \fi \declaretheorem[name=Lemma,sibling=theorem]{lemma} \declaretheorem[name=Proposition,sibling=theorem]{proposition} \declaretheorem[name=Corollary,sibling=theorem]{corollary} \declaretheorem[name=Assumption,sibling=theorem]{assume} \declaretheorem[name=Theorem,numbered=no]{theorem*} \declaretheorem[name=Lemma,numbered=no]{lemma*} \declaretheorem[name=Proposition,numbered=no]{proposition*} \declaretheorem[name=Corollary,numbered=no]{corollary*} \declaretheorem[name=Assumption,numbered=no]{assume*} \fi \ifevanmdthm \declaretheorem[style=thmgreenbox,name=Algorithm,sibling=theorem]{algorithm} \declaretheorem[style=thmgreenbox,name=Algorithm,numbered=no]{algorithm*} \declaretheorem[style=thmgreenbox,name=Claim,sibling=theorem]{claim} \declaretheorem[style=thmgreenbox,name=Claim,numbered=no]{claim*} \else \declaretheorem[name=Algorithm,sibling=theorem]{algorithm} \declaretheorem[name=Algorithm,numbered=no]{algorithm*} \declaretheorem[name=Claim,sibling=theorem]{claim} \declaretheorem[name=Claim,numbered=no]{claim*} \fi \ifevanmdthm \declaretheorem[style=thmredbox,name=Example,sibling=theorem]{example} \declaretheorem[style=thmredbox,name=Example,numbered=no]{example*} \else \declaretheorem[name=Example,sibling=theorem]{example} \declaretheorem[name=Example,numbered=no]{example*} \fi % Remark-style theorems \ifevanmdthm \declaretheorem[style=thmblackbox,name=Remark,sibling=theorem]{remark} \declaretheorem[style=thmblackbox,name=Remark,numbered=no]{remark*} \else \declaretheorem[name=Remark,sibling=theorem]{remark} \declaretheorem[name=Remark,numbered=no]{remark*} \fi \ifevanmdthm \declaretheoremstyle[ headfont=\color{blue!40!black}\normalfont\bfseries, spaceabove=8pt, spacebelow=8pt, bodyfont=\normalfont ]{basehead} \else \declaretheoremstyle[spaceabove=6pt,spacebelow=6pt]{basehead} \fi \declaretheorem[style=basehead,name=Answer,sibling=theorem]{answer} \declaretheorem[style=basehead,name=Answer,numbered=no]{answer*} \declaretheorem[style=basehead,name=Conjecture,sibling=theorem]{conjecture} \declaretheorem[style=basehead,name=Conjecture,numbered=no]{conjecture*} \declaretheorem[style=basehead,name=Definition,sibling=theorem]{definition} \declaretheorem[style=basehead,name=Definition,numbered=no]{definition*} \declaretheorem[style=basehead,name=Exercise,sibling=theorem]{exercise} \declaretheorem[style=basehead,name=Exercise,numbered=no]{exercise*} \declaretheorem[style=basehead,name=Fact,sibling=theorem]{fact} \declaretheorem[style=basehead,name=Fact,numbered=no]{fact*} \declaretheorem[style=basehead,name=Problem,sibling=theorem]{problem} \declaretheorem[style=basehead,name=Problem,numbered=no]{problem*} \declaretheorem[style=basehead,name=Question,sibling=theorem]{ques} \declaretheorem[style=basehead,name=Question,numbered=no]{ques*} \ifevanpkg \Crefname{answer}{Answer}{Answers} \Crefname{assume}{Assumption}{Assumptions} \Crefname{claim}{Claim}{Claims} \Crefname{conjecture}{Conjecture}{Conjectures} \Crefname{exercise}{Exercise}{Exercises} \Crefname{fact}{Fact}{Facts} \Crefname{problem}{Problem}{Problems} \Crefname{ques}{Question}{Questions} \fi \fi %%fakesection Fancy section and chapter heads \ifevancolorsec \@ifundefined{KOMAClassName}{}{ \@ifundefined{chapter}{}{ \addtokomafont{partprefix}{\rmfamily} \renewcommand*{\partformat}{\color{purple} \scalebox{2.5}{\thepart}\enlargethispage{2em}} \addtokomafont{chapterprefix}{\raggedleft} \RedeclareSectionCommand[beforeskip=0.5em]{chapter} \renewcommand*{\chapterformat}{\mbox{% \scalebox{1.5}{\chapappifchapterprefix{\nobreakspace}}% \scalebox{2.718}{\color{purple}\thechapter}\enskip}} } \renewcommand*{\sectionformat}% {\color{purple}\S\thesection\enskip} \renewcommand*{\subsectionformat}% {\color{purple}\S\thesubsection\enskip} \renewcommand*{\subsubsectionformat}% {\color{purple}\S\thesubsubsection\enskip} \addtokomafont{paragraph}{\color{orange!35!black}\P\ } \KOMAoptions{numbers=noenddot} %\usetocstyle{KOMAlike} } \fi %%fakesection Loads a bunch of useful packages (but allow disabling) \ifevanpkg \ifevanvonenabled \IfFileExists{von.sty}{\usepackage{von}}{} \fi \usepackage{listings} \usepackage{mathrsfs} \usepackage{textcomp} \lstset{basicstyle=\ttfamily\small, backgroundcolor=\color{yellow!3!white}, breakatwhitespace=true, breaklines=true, columns=fullflexible, commentstyle=\color{red!70!black}, frame=shadowbox, frame=single, framerule=1pt, identifierstyle=\color{green!40!black}, keywordstyle=\bfseries, keywordstyle=\bfseries\color{blue!80!black}, numbers=left, numbersep=8pt, numberstyle=\scriptsize\sffamily\itshape\color{black!80}, rulecolor=\color{blue!70!black}, rulesepcolor=\color{blue!30!black}, showstringspaces=false, stringstyle=\color{orange}, tabsize=4, xleftmargin=15pt, xrightmargin=15pt, resetmargins=true, } % chktex 6 \lstdefinelanguage{gitcommit}{ alsoletter={:}, morecomment=[l]{|}, morekeywords={commit,Author:,Date:,chore,doc,edit,feat,fix,polish,style,tests,}, sensitive=true, } \lstdefinelanguage{gitlog}{ morekeywords={chore,doc,edit,feat,fix,polish,style,tests,}, morecomment=[s]{[}{]}, % chktex 9 sensitive=true, } \usepackage[shortlabels]{enumitem} \usepackage[obeyFinal,textsize=scriptsize,shadow,loadshadowlibrary]{todonotes} \usepackage{multirow} \usepackage{ellipsis} % don't use ugly unicode ellipsis \usepackage{epigraph} \renewcommand{\epigraphsize}{\scriptsize} \renewcommand{\epigraphwidth}{60ex} % Tiny optimizations: \usepackage{mathtools} \usepackage{microtype} \usepackage{xstring} \usepackage{wrapfig} \ifevanbritish\usepackage[cleanlook,british]{isodate}\fi % day-first date \usepackage{tikz-cd} \usetikzlibrary{decorations.pathmorphing} \allowdisplaybreaks % a list I like for walkthrough's --- Drew-style parts \newlist{walk}{enumerate}{3} \setlist[walk]{label=\bfseries (\alph*)} % list item for MO style rubrics \newcommand{\worth}[1]{\def\hfill{\hskip 20pt plus 1fill}\dotfill% \IfEq{#1}{0}{\textbf{0~points}}% {\textbf{\color{blue}#1~point\IfEndWith{#1}{1}{}{s}}}% \par} \newcommand{\subworth}[1]{\def\hfill{\hskip 20pt plus 1fill}\dotfill% \IfEq{#1}{0}{{\footnotesize0~points}}% {\textbf{\footnotesize#1~point\IfEndWith{#1}{1}{}{s}}}% \par} \newlist{rubric}{enumerate}{2} \setlist[rubric,1]{label=\Roman*.} \setlist[rubric,2]{label=(\Roman{rubrici}.\alph*)} \fi %%fakesection \maketitle configuration \@ifundefined{KOMAClassName}% {} % do nothing outside KOMA class {% If KOMA exists. . . \addtokomafont{subtitle}{\Large} \setkomafont{author}{\Large\scshape} \setkomafont{date}{\Large\normalsize} } \providecommand{\thetitle}{\@title} \providecommand{\theauthor}{\@author} \providecommand{\thedate}{\@date} %%fakesection Page setup \ifevanfancy \@ifundefined{KOMAClassName} { \usepackage{fancyhdr} \setlength{\headheight}{0.75in} \setlength{\oddsidemargin}{0in} \setlength{\evensidemargin}{0in} \setlength{\voffset}{-1.0in} \setlength{\headsep}{10pt} \setlength{\textwidth}{6.5in} \setlength{\headwidth}{6.5in} \setlength{\textheight}{8.75in} \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} \setlength{\footskip}{0.3in} \ifevanhdr \renewcommand{\headrulewidth}{0.5pt} \renewcommand{\footrulewidth}{0.0pt} \pagestyle{fancy} \lhead{Evan Chen} \chead{} \rhead{\nouppercase{\leftmark}} \lfoot{} \cfoot{\thepage} \rfoot{} \fi } { \usepackage[headsepline]{scrlayer-scrpage} \renewcommand{\headfont}{} \addtolength{\textheight}{3.14cm} \setlength{\footskip}{0.5in} \setlength{\headsep}{10pt} \ihead{\footnotesize\textbf{\theauthor} --- \thedate} \automark{section} \chead{} \ohead{\footnotesize\textbf{\thetitle}} \cfoot{\pagemark} } \fi %%fakesection Unicode \ifevanpkg \ifluatex \ifevanchinese \usepackage{luatexja-fontspec} \else \usepackage{fontspec} \fi % https://tex.stackexchange.com/a/572220/76888 \directlua{luaotfload.add_fallback ("evans_fallbacks", { "NotoColorEmoji:mode=harf;", "Noto Serif CJK TC:style=Regular;", } )} \setmainfont{CMU Serif}[ SlantedFont={Latin Modern Roman Slanted}, RawFeature={fallback=evans_fallbacks} ] \setsansfont{Latin Modern Sans}[ RawFeature={fallback=evans_fallbacks} ] \setmonofont{Inconsolata}[ Scale=MatchLowercase, RawFeature={fallback=evans_fallbacks} ] \ifevanchinese \setmainjfont{Source Han Sans TW}[RawFeature={fallback=evans_fallbacks}] \setsansjfont{Source Han Sans TW}[RawFeature={fallback=evans_fallbacks}] \fi \else \ifevanchinese \usepackage{babel} \usepackage[encapsulated]{CJK} \usepackage{ucs} \usepackage[utf8x]{inputenc} \newenvironment{bsmi}{\begin{CJK}{UTF8}{bsmi}}{\end{CJK}} \newcommand{\cn}[1]{\begin{bsmi}#1\end{bsmi}} \AtBeginDocument{\begin{CJK}{UTF8}{bsmi}} \AtEndDocument{\end{CJK}} \fi \fi \fi %%fakesection Hints \ifevanhints \usepackage{answers} \Newassociation{hint}{hintitem}{hints} \renewcommand{\solutionextension}{out} \Opensolutionfile{hints} \newcommand{\makehints}{\Closesolutionfile{hints}\input{hints.out}} % chktex 27 \fi %%fakesection END MAIN SETUP \fi