TransWikia.com

Writing Chinese text using "CJKutf8" package. Sample is shown below. "textbf{}" not working on Chinese text. Heading of abstract isn't bold too

TeX - LaTeX Asked by Muhammad Shahzad on June 12, 2021

begin{CJK*}{UTF8}{gbsn}
begin{chineseabstract}
addchaptertocentry{chineseabstractname}

中文摘要写在这里 (Chinese abstract is written here)

textbf{关键词:}
end{chineseabstract}  
clearpageend{CJK*}

One Answer

Use polyglossia with ucharclasses.

% !TEX TS-program = xelatex
% !TEX encoding = UTF-8 Unicode
documentclass[12pt, a4paper]{article}
usepackage{fontspec} 
setmainfont{Linux Libertine O}
usepackage{polyglossia}
setmainlanguage[variant=british]{english}
setotherlanguage{chinese}
newfontfamily{cjkfont}{Source Han Sans}[BoldFont ={* Bold}, ItalicFont={* Light}, BoldItalicFont={* Heavy}]
usepackage[CJK]{ucharclasses}
setDefaultTransitions{defaultfont}{}
setTransitionsForCJK{cjkfont}{}

title{Title}

begin{document}

section{First}

textbf{关键词:}
textchinese{中文摘要写在这里}.

end{document}

Answered by Oni on June 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP