Skip to content

Commit

Permalink
1. Detect Noto font for bibel; 2. Avoid redefine theorems
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxinyu95 committed Jun 13, 2024
1 parent 5801636 commit bc8d679
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion prelude.sty
Original file line number Diff line number Diff line change
Expand Up @@ -332,17 +332,57 @@
}
\DeclareOption{en}{
\babelfont[chinese]{rm}{Noto Serif CJK SC}
\IfFontExistsTF{Noto Serif CJK SC}{
\message{Apply Noto Serif CJK SC for bible}
\babelfont[chinese]{rm}{Noto Serif CJK SC}
}{ % else
\IfFontExistsTF{Noto Serif SC}{
\message{Apply Noto Serif SC for bible}
\babelfont[chinese]{rm}{Noto Serif SC}
}{ % else
\ifwindows{
\message{Apply SimSun for bible}
\babelfont[chinese]{rm}{SimSun}
}\else{
\IfFontExistsTF{STSong}{
\message{Apply STSong for bible}
\babelfont[chinese]{rm}{STSong}
}{ % else
\message{No CN default font}
} % end if exits STSong
}\fi % end if windows
} % end if exits Noto Serif SC
} % end if exits Noto Serif CJK SC
\theoremstyle{plain}
\ifdefined\theorem\else
\newtheorem{theorem}{Theorem}[section]
\fi
\ifdefined\lemma\else
\newtheorem{lemma}[theorem]{Lemma}
\fi
\ifdefined\proposition\else
\newtheorem{proposition}[theorem]{Proposition}
\fi
\ifdefined\corollary\else
\newtheorem{corollary}[theorem]{Corollary}
\fi
\theoremstyle{definition}
\ifdefined\axiom\else
\newtheorem{axiom}{Axiom}[section]
\fi
\ifdefined\definition\else
\newtheorem{definition}{Definition}[section]
\fi
\ifdefined\example\else
\newtheorem{example}{Example}[section]
\fi
\AtEndEnvironment{Exercise}{
\par \rightline{\AnswerListName: \cpageref{\ExerciseLabel-Answer}}}
Expand Down

0 comments on commit bc8d679

Please sign in to comment.