Skip to content

Commit

Permalink
ver 1.8.1 - fix bold font
Browse files Browse the repository at this point in the history
  • Loading branch information
wyqy committed Oct 20, 2024
1 parent e728046 commit de55bb3
Show file tree
Hide file tree
Showing 8 changed files with 409 additions and 438 deletions.
164 changes: 82 additions & 82 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
{
// editor
"files.associations": {
"*.cfg": "tex",
"*.def": "tex"
},
// latex
"latex-workshop.latex.autoBuild.run": "onSave",
"latex-workshop.showContextMenu": true,
"latex-workshop.message.error.show": false,
"latex-workshop.message.warning.show": false,
"latex-workshop.latex.recipe.default": "lastUsed",
"latex-workshop.intellisense.package.enabled": true,
"latex-workshop.intellisense.biblatexJSON.replace": {},
"latex-workshop.latex.outDir": ".\\.output",
"latex-workshop.latex.recipes": [
{
"name": "build",
"tools": ["build - latexmk"]
},
{
"name": "clean",
"tools": ["clean - latexmk"]
}
],
"latex-workshop.latex.tools": [
{
"name": "build - latexmk",
"command": "latexmk",
"args": [
"-norc", "-xelatex",
"-bibtex", "-bibfudge",
"-latex=xelatex", "-recorder-",
"-latexoption=-synctex=1 -interaction=nonstopmode -file-line-error --shell-escape",
"-outdir=%OUTDIR%",
"%DOCFILE%"
]
},
{
"name": "clean - latexmk",
"command": "latexmk",
"args": [
"-norc", "-c",
"-outdir=%OUTDIR%"
]
}
],
"latex-workshop.latex.clean.fileTypes": [
"*.aux",
"*.bbl",
"*.blg",
"*.idx",
"*.ind",
"*.lof",
"*.lot",
"*.out",
"*.toc",
"*.acn",
"*.acr",
"*.alg",
"*.glg",
"*.glo",
"*.gls",
"*.ist",
"*.fls",
"*.log",
"*.fdb_latexmk"
]//, pdf reviewer
// "latex-workshop.view.pdf.viewer": "external",
// "latex-workshop.view.pdf.ref.viewer":"external",
// "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
// "latex-workshop.view.pdf.external.viewer.command": "C:/Program Files/SumatraPDF/SumatraPDF.exe",
// "latex-workshop.view.pdf.external.viewer.args": [
// "%PDF%"
// ],
// "latex-workshop.view.pdf.external.synctex.command": "C:/Program Files/SumatraPDF/SumatraPDF.exe",
// "latex-workshop.view.pdf.external.synctex.args": [
// "-forward-search",
// "%TEX%",
// "%LINE%",
// "%PDF%"
// ]
{
// editor
"files.associations": {
"*.cfg": "tex",
"*.def": "tex"
},
// latex
"latex-workshop.latex.autoBuild.run": "onSave",
"latex-workshop.showContextMenu": true,
"latex-workshop.message.error.show": false,
"latex-workshop.message.warning.show": false,
"latex-workshop.latex.recipe.default": "lastUsed",
"latex-workshop.intellisense.package.enabled": true,
"latex-workshop.intellisense.biblatexJSON.replace": {},
"latex-workshop.latex.outDir": "./.output",
"latex-workshop.latex.recipes": [
{
"name": "build",
"tools": ["build - latexmk"]
},
{
"name": "clean",
"tools": ["clean - latexmk"]
}
],
"latex-workshop.latex.tools": [
{
"name": "build - latexmk",
"command": "latexmk",
"args": [
"-norc", "-xelatex",
"-bibtex", "-bibfudge",
"-latex=xelatex", "-recorder-",
"-latexoption=-synctex=1 -interaction=nonstopmode -file-line-error --shell-escape",
"-outdir=%OUTDIR%",
"%DOCFILE%"
]
},
{
"name": "clean - latexmk",
"command": "latexmk",
"args": [
"-norc", "-c",
"-outdir=%OUTDIR%"
]
}
],
"latex-workshop.latex.clean.fileTypes": [
"*.aux",
"*.bbl",
"*.blg",
"*.idx",
"*.ind",
"*.lof",
"*.lot",
"*.out",
"*.toc",
"*.acn",
"*.acr",
"*.alg",
"*.glg",
"*.glo",
"*.gls",
"*.ist",
"*.fls",
"*.log",
"*.fdb_latexmk"
]//, pdf reviewer
// "latex-workshop.view.pdf.viewer": "external",
// "latex-workshop.view.pdf.ref.viewer":"external",
// "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
// "latex-workshop.view.pdf.external.viewer.command": "C:/Program Files/SumatraPDF/SumatraPDF.exe",
// "latex-workshop.view.pdf.external.viewer.args": [
// "%PDF%"
// ],
// "latex-workshop.view.pdf.external.synctex.command": "C:/Program Files/SumatraPDF/SumatraPDF.exe",
// "latex-workshop.view.pdf.external.synctex.args": [
// "-forward-search",
// "%TEX%",
// "%LINE%",
// "%PDF%"
// ]
}
82 changes: 11 additions & 71 deletions ctex-fontset-tongji.def
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,18 @@
\ProvidesExplFile{ctex-fontset-tongji.def}
{\ExplFileDate}{2.5.10}{\ExplFileDescription}

\ctex_fontset_case:nnnn
{ \ctex_fontset_error:n { tongji } }
{ % pdftex (only for compatibility)
\ctex_zhmap_case:nnn
{
\setCJKmainfont[Path={fonts/}]{SimSun.ttf}
\setCJKsansfont[Path={fonts/}]{SimHei.ttf}
\setCJKmonofont[Path={fonts/}]{FangSong_GB2312.ttf}

\setCJKfamilyfont{zhsong}[Path={fonts/}]{SimSun.ttf}
\setCJKfamilyfont{zhhei}[Path={fonts/}]{SimHei.ttf}
\setCJKfamilyfont{zhkai}[Path={fonts/}]{KaiTi_GB2312.ttf}
\setCJKfamilyfont{zhli}[Path={fonts/}]{LiShu.ttf}
\setCJKfamilyfont{zhyou}[Path={fonts/}]{SimYou.ttf}
\setCJKfamilyfont{zhyahei}[Path={fonts/}]{MSYaHei.ttf}

\setmainfont{times.ttf}[ % Times New Roman 字体
Path = fonts/,
BoldFont = timesbd.ttf,
ItalicFont = timesi.ttf,
BoldItalicFont = timesbi.ttf
]
\setmonofont{cour.ttf}[ % Courier New 字体
Path = fonts/,
BoldFont = courbd.ttf,
ItalicFont = couri.ttf,
BoldItalicFont = courbi.ttf
]

\ctex_punct_set:n { tongji }
\ctex_punct_map_family:nn { \CJKrmdefault } { zhsong }
\ctex_punct_map_family:nn { \CJKsfdefault } { zhhei }
\ctex_punct_map_family:nn { \CJKttdefault } { zhsong }
\ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai }
\ctex_punct_map_bfseries:nn { \CJKsfdefault, zhhei } { zhheib }
\ctex_punct_map_bfseries:nn
{ \CJKrmdefault, \CJKttdefault, zhsong }
{ zhsongb }
}
{
\ctex_load_zhmap:nnnn { rm } { zhhei } { zhsong } { ubuntu }
\ctex_punct_set:n { ubuntu }
\ctex_punct_map_family:nn { \CJKrmdefault } { zhsong }
\ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei }
\ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai }
}
{ \ctex_fontset_error:n { tongji } }
}
{ % uptex (only for compatibility)
\ctex_set_upmap_unicode:nnn { upserif } { fonts/SimSun.ttf } { fonts/SimSun.ttf }
\ctex_set_upmap_unicode:nnn { upsans } { fonts/SimHei.ttf } { fonts/SimHei.ttf }
\ctex_set_upmap_unicode:nnn { upmono } { fonts/FangSong_GB2312.ttf } { }
\ctex_set_upmap:nnn { upserifit } { fonts/KaiTi_GB2312.ttf } { }
\ctex_set_upfamily:nnn { zhsong } { upzhserif } { upzhserifb }
\ctex_set_upfamily:nnn { zhhei } { upzhsans } { upzhsansb }
\ctex_set_upfamily:nnn { zhkai } { upzhserifit } { }
}
\ctex_fontset_case:nnn
{ \ctex_fontset_error:n { tongji } } % fail early for pdfTeX
{ \ctex_fontset_error:n { tongji } } % fail early for upTeX
{ % xetex / luatex
\setCJKmainfont[Path={fonts/}]{SimSun.ttf}
\setmainfont{times.ttf}
[ Path = {fonts/}, BoldFont = timesbd.ttf, ItalicFont = timesi.ttf, BoldItalicFont = timesbi.ttf ]
\setmonofont{cour.ttf}
[ Path = {fonts/}, BoldFont = courbd.ttf, ItalicFont = couri.ttf, BoldItalicFont = courbi.ttf ]

\setCJKmainfont{SimSun.ttf}
[ Path = {fonts/}, BoldFont = SimHei.ttf, ItalicFont = KaiTi_GB2312.ttf ]

\setCJKsansfont[Path={fonts/}]{SimHei.ttf}
\setCJKmonofont[Path={fonts/}]{FangSong_GB2312.ttf}

Expand All @@ -71,19 +24,6 @@
\setCJKfamilyfont{zhli}[Path={fonts/}]{LiShu.ttf}
\setCJKfamilyfont{zhyou}[Path={fonts/}]{SimYou.ttf}
\setCJKfamilyfont{zhyahei}[Path={fonts/}]{MSYaHei.ttf}

\setmainfont{times.ttf}[ % Times New Roman 字体
Path = fonts/,
BoldFont = timesbd.ttf,
ItalicFont = timesi.ttf,
BoldItalicFont = timesbi.ttf
]
\setmonofont{cour.ttf}[ % Courier New 字体
Path = fonts/,
BoldFont = courbd.ttf,
ItalicFont = couri.ttf,
BoldItalicFont = courbi.ttf
]
}

\NewDocumentCommand \songti { } { \CJKfamily { zhsong } }
Expand Down
30 changes: 29 additions & 1 deletion data/chap01.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,35 @@ \section{文字排版示例}
大家好啊,我是一段文字。

% 另一段文字
我是另一段文字。中文~English~中文,中文(English,En)中文。
标点挤压测试:我是另一段文字。中文~English~中文,中文(English,En)中文。

横排引号测试:从前有座山,山里有座庙,庙里有两个和尚,小和尚让老和尚讲故事。老和尚说:
“从前有座山,山里有座庙,庙里有两个和尚,小和尚让老和尚讲故事。老和尚说:
‘从前有座山,山里有座庙,庙里有两个和尚……’”

For users who wants to use Roman Quotation Marks in English-only text:
Please use \verb|\tjeng| environment.
See \href{https://github.com/CTeX-org/ctex-kit/issues/389}{ctex-issue-281} for more information.
For example:

\begin{tjeng}
Nested Quotation Test: A long time ago in a mountain, there was a temple where two monks lived.
The young monk asked the old monk to tell a story, and the old monk said:
“A long time ago in a mountain, there was a temple where two monks lived.
The young monk asked the old monk to tell a story, and the old monk said:
‘A long time ago in a mountain, there was a temple where two monks lived...’”
\end{tjeng}

Hyphenation Test: -- A --, -- 汉字 --, --- A ---, --- 汉字 ---

Ligature Test: significance, difference, stationary (\textit{Times New Roman} does not support it)

我是普通样式的文字。This is a pain-styled sentence.

\textbf{我是加粗样式的文字。This is a bold-styled sentence.}

\textit{我是斜体样式的文字。This is a italic-styled sentence.}

我是带有脚注的文字 \footnote{我是脚注。}。

\section{公式排版示例}
Expand Down
Loading

0 comments on commit de55bb3

Please sign in to comment.