fmarotta / kaobook

A LaTeX class for books, reports or theses based on https://github.com/kenohori/thesis and https://github.com/Tufte-LaTeX/tufte-latex.
https://github.com/fmarotta/kaobook
LaTeX Project Public License v1.3c
861 stars 185 forks source link

非常喜欢这个模板,作者是否考虑能支持中文! #188

Open sdsundmu opened 3 years ago

sdsundmu commented 3 years ago

如题! 祝好!

AlexanderZeilmann commented 2 years ago

I like this template very much. Does the author consider supporting Chinese? As the title! good luck! Google Translate

你能更具体地说明问题是什么吗? 如果问题是无法正确呈现中文字符,则必须指定不同的字体来定义这些字符。

Can you be more specific about what the problem is? If the problem is that Chinese characters cannot be rendered correctly, you must specify a different font to define these characters. Google Translate

fmarotta commented 2 years ago

同意。 这是一个最小的工作示例:)

Agreed. See below for a minimal working example :) Google translate&op=translate)

请也看看这个 https://github.com/registor/kaobook-zh

(There is also https://github.com/registor/kaobook-zh)

\documentclass{kaobook}

\usepackage{zhnumber}
\usepackage{xeCJK}

% Use your own fonts
\setCJKmainfont{Noto Sans CJK SC} 
\setCJKmonofont{Noto Sans Mono CJK SC} 
\setCJKsansfont{Noto Sans CJK SC}  

\begin{document}

\renewcommand\contentsname{目录} 
\renewcommand\listfigurename{插图} 
\renewcommand\listtablename{表格} 
\renewcommand\indexname{索引} 
\renewcommand\bibname{参考文献} 
\renewcommand\figurename{图}
\renewcommand\tablename{表}

\title{标题} 
\author{作者} 

\frontmatter
\maketitle
\tableofcontents

\mainmatter
\chapter{章节} 

\section{前言} 
这是一些文字。

\section{关于数学部分} 
数学、中英文皆可以混排。You can intersperse math, Chinese and English (Latin script) without adding extra environments.

這是繁體中文。
\end{document}

image

xuehao commented 2 years ago

Hi there,

I fork this repo and add CJK support via xeCJK. Please check the repo.

https://github.com/xuehao/kaobookCJKsc

lanw0622 commented 3 months ago

@xuehao 无法编译。。。。几台电脑上都试了,,,问题一大堆。