Skip to content

Commit

Permalink
New option `cjkfont'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexaraWu committed Jun 3, 2021
1 parent bdc9f27 commit 9ad621b
Show file tree
Hide file tree
Showing 10 changed files with 368 additions and 16 deletions.
45 changes: 45 additions & 0 deletions texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-adobe.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
%%
%% This is file `sjtu-cjk-font-adobe.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% sjtuthesis.dtx (with options: `cjkfont,adobe')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (C) 2018-2021 by SJTUG
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This file has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is Alexara Wu.
%%
\ProvidesFile{sjtu-cjk-font-adobe.def}
[2020/07/31 1.0.0rc7 Adobe CJK fonts definition (SJTUThesis)]
\setCJKmainfont{AdobeSongStd-Light}[
AutoFakeBold = 3,
ItalicFont = AdobeKaitiStd-Regular,
]
\setCJKsansfont{AdobeHeitiStd-Regular}[AutoFakeBold=3]
\setCJKmonofont{AdobeFangsongStd-Regular}
\setCJKfamilyfont{zhsong}{AdobeSongStd-Light}[
AutoFakeBold = 3,
ItalicFont = AdobeKaitiStd-Regular,
]
\setCJKfamilyfont{zhhei}{AdobeHeitiStd-Regular}[AutoFakeBold=3]
\setCJKfamilyfont{zhfs}{AdobeFangsongStd-Regular}
\setCJKfamilyfont{zhkai}{AdobeKaitiStd-Regular}
\NewDocumentCommand\songti{}{\CJKfamily{zhsong}}
\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}}
\NewDocumentCommand\fangsong{}{\CJKfamily{zhfs}}
\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}}
\endinput
%%
%% End of file `sjtu-cjk-font-adobe.def'.
65 changes: 65 additions & 0 deletions texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-fandol.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
%%
%% This is file `sjtu-cjk-font-fandol.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% sjtuthesis.dtx (with options: `cjkfont,fandol')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (C) 2018-2021 by SJTUG
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This file has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is Alexara Wu.
%%
\ProvidesFile{sjtu-cjk-font-fandol.def}
[2020/07/31 1.0.0rc7 Fandol CJK fonts definition (SJTUThesis)]
\setCJKmainfont{FandolSong}[
Extension = .otf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = FandolKai-Regular,
]
\setCJKsansfont{FandolHei}[
Extension = .otf,
UprightFont = *-Regular,
BoldFont = *-Bold,
]
\setCJKmonofont{FandolFang}[
Extension = .otf,
UprightFont = *-Regular,
]
\setCJKfamilyfont{zhsong}{FandolSong}[
Extension = .otf,
UprightFont = *-Regular,
BoldFont = *-Bold,
]
\setCJKfamilyfont{zhhei}{FandolHei}[
Extension = .otf,
UprightFont = *-Regular,
BoldFont = *-Bold,
]
\setCJKfamilyfont{zhfs}{FandolFang}[
Extension = .otf,
UprightFont = *-Regular,
]
\setCJKfamilyfont{zhkai}{FandolKai}[
Extension = .otf,
UprightFont = *-Regular,
]
\NewDocumentCommand\songti{}{\CJKfamily{zhsong}}
\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}}
\NewDocumentCommand\fangsong{}{\CJKfamily{zhfs}}
\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}}
\endinput
%%
%% End of file `sjtu-cjk-font-fandol.def'.
45 changes: 45 additions & 0 deletions texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-founder.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
%%
%% This is file `sjtu-cjk-font-founder.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% sjtuthesis.dtx (with options: `cjkfont,founder')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (C) 2018-2021 by SJTUG
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This file has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is Alexara Wu.
%%
\ProvidesFile{sjtu-cjk-font-founder.def}
[2020/07/31 1.0.0rc7 Founder CJK fonts definition (SJTUThesis)]
\setCJKmainfont{FZShuSong-Z01}[
AutoFakeBold = 3,
ItalicFont = FZKai-Z03,
]
\setCJKsansfont{FZHei-B01}[AutoFakeBold=3]
\setCJKmonofont{FZFangSong-Z02}
\setCJKfamilyfont{zhsong}{FZShuSong-Z01}[
AutoFakeBold = 3,
ItalicFont = FZKai-Z03,
]
\setCJKfamilyfont{zhhei}{FZHei-B01}[AutoFakeBold=3]
\setCJKfamilyfont{zhkai}{FZKai-Z03}
\setCJKfamilyfont{zhfs}{FZFangSong-Z02}
\NewDocumentCommand\songti{}{\CJKfamily{zhsong}}
\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}}
\NewDocumentCommand\fangsong{}{\CJKfamily{zhfs}}
\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}}
\endinput
%%
%% End of file `sjtu-cjk-font-founder.def'.
56 changes: 56 additions & 0 deletions texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-mac.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
%%
%% This is file `sjtu-cjk-font-mac.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% sjtuthesis.dtx (with options: `cjkfont,mac')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (C) 2018-2021 by SJTUG
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This file has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is Alexara Wu.
%%
\ProvidesFile{sjtu-cjk-font-mac.def}
[2020/07/31 1.0.0rc7 macOS CJK fonts definition (SJTUThesis)]
\setCJKmainfont{Songti SC}[
UprightFont = * Light,
BoldFont = * Bold,
ItalicFont = Kaiti SC Regular,
BoldItalicFont = Kaiti SC Bold,
]
\setCJKsansfont{Heiti SC}[
AutoFakeBold = 3,
UprightFont = * Medium,
]%
\setCJKmonofont{STFangsong}
\setCJKfamilyfont{zhsong}{Songti SC}[
UprightFont = * Light,
BoldFont = * Bold,
]
\setCJKfamilyfont{zhhei}{Heiti SC}[
AutoFakeBold = 3,
UprightFont = * Medium,
]
\setCJKfamilyfont{zhfs}{STFangsong}
\setCJKfamilyfont{zhkai}{Kaiti SC}[
UprightFont = * Regular,
BoldFont = * Bold,
]
\NewDocumentCommand\songti{}{\CJKfamily{zhsong}}
\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}}
\NewDocumentCommand\fangsong{}{\CJKfamily{zhfs}}
\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}}
\endinput
%%
%% End of file `sjtu-cjk-font-mac.def'.
49 changes: 49 additions & 0 deletions texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-ubuntu.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
%%
%% This is file `sjtu-cjk-font-ubuntu.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% sjtuthesis.dtx (with options: `cjkfont,ubuntu')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (C) 2018-2021 by SJTUG
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This file has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is Alexara Wu.
%%
\ProvidesFile{sjtu-cjk-font-ubuntu.def}
[2020/07/31 1.0.0rc7 Ubuntu CJK fonts definition (SJTUThesis)]
\setCJKmainfont{Noto Serif CJK SC}[
UprightFont = * Light,
BoldFont = * Bold,
ItalicFont = AR PL UKai CN,
]
\setCJKsansfont{Noto Sans CJK SC}[
BoldFont = * Medium,
]
\setCJKmonofont{Noto Sans Mono CJK SC}
\setCJKfamilyfont{zhsong}{Noto Serif CJK SC}[
UprightFont = * Light,
BoldFont = * Bold,
ItalicFont = AR PL UKai CN,
]
\setCJKfamilyfont{zhhei}{Noto Sans CJK SC}[
BoldFont = * Medium,
]
\setCJKfamilyfont{zhkai}{AR PL UKai CN}
\NewDocumentCommand\songti{}{\CJKfamily{zhsong}}
\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}}
\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}}
\endinput
%%
%% End of file `sjtu-cjk-font-ubuntu.def'.
45 changes: 45 additions & 0 deletions texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-windows.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
%%
%% This is file `sjtu-cjk-font-windows.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% sjtuthesis.dtx (with options: `cjkfont,windows')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (C) 2018-2021 by SJTUG
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This file has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is Alexara Wu.
%%
\ProvidesFile{sjtu-cjk-font-windows.def}
[2020/07/31 1.0.0rc7 Windows CJK fonts definition (SJTUThesis)]
\setCJKmainfont{SimSun}[
AutoFakeBold = 3,
ItalicFont = KaiTi,
]
\setCJKsansfont{SimHei}[AutoFakeBold=3]
\setCJKmonofont{FangSong}
\setCJKfamilyfont{zhsong}{SimSun}[
AutoFakeBold = 3,
ItalicFont = KaiTi,
]
\setCJKfamilyfont{zhhei}{SimHei}[AutoFakeBold=3]
\setCJKfamilyfont{zhkai}{KaiTi}
\setCJKfamilyfont{zhfs}{FangSong}
\NewDocumentCommand\songti{}{\CJKfamily{zhsong}}
\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}}
\NewDocumentCommand\fangsong{}{\CJKfamily{zhfs}}
\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}}
\endinput
%%
%% End of file `sjtu-cjk-font-windows.def'.
9 changes: 7 additions & 2 deletions texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newcm.def
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@
[2020/07/31 1.0.0rc7 New Computer Modern math fonts definition (SJTUThesis)]
\sjtu@unimathtrue
\RequirePackage{unicode-math}
\setmathfont[StylisticSet=2]{NewCMMath-Book.otf}
\setmathfont[range={scr,bfscr},StylisticSet=1]{NewCMMath-Book.otf}
\setmathfont[
StylisticSet = 2
]{NewCMMath-Book.otf}
\setmathfont[
range = {scr, bfscr},
StylisticSet = 1
]{NewCMMath-Book.otf}
\setmathrm[
Extension = .otf,
UprightFont = *-Book,
Expand Down
18 changes: 14 additions & 4 deletions texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-stix2.def
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,21 @@
\sjtu@unimathtrue
\RequirePackage{unicode-math}
\IfFontExistsTF{STIXTwoMath-Regular.otf}{
\setmathfont[StylisticSet=8]{STIXTwoMath-Regular.otf}
\setmathfont[range={scr,bfscr},StylisticSet=1]{STIXTwoMath-Regular.otf}
\setmathfont[
StylisticSet = 8
]{STIXTwoMath-Regular.otf}
\setmathfont[
range = {scr, bfscr},
StylisticSet = 1
]{STIXTwoMath-Regular.otf}
}{
\setmathfont[StylisticSet=8]{STIX2Math.otf}
\setmathfont[range={scr,bfscr},StylisticSet=1]{STIX2Math.otf}
\setmathfont[
StylisticSet = 8
]{STIX2Math.otf}
\setmathfont[
range = {scr, bfscr},
StylisticSet = 1
]{STIX2Math.otf}
}
\IfFontExistsTF{STIXTwoText-Regular.otf}{
\setmathrm[
Expand Down
10 changes: 8 additions & 2 deletions texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-xits.def
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,20 @@
BoldFont = XITSMath-Bold,
StylisticSet = 8,
]{XITSMath-Regular}
\setmathfont[range={cal,bfcal},StylisticSet=1]{XITSMath-Regular.otf}
\setmathfont[
range = {cal, bfcal},
StylisticSet = 1
]{XITSMath-Regular.otf}
}{
\setmathfont[
Extension = .otf,
BoldFont = *bold,
StylisticSet = 8,
]{xits-math}
\setmathfont[range={cal,bfcal},StylisticSet=1]{xits-math.otf}
\setmathfont[
range = {cal, bfcal},
StylisticSet = 1
]{xits-math.otf}
}
\IfFontExistsTF{XITS-Regular.otf}{
\setmathrm[
Expand Down
Loading

0 comments on commit 9ad621b

Please sign in to comment.