Fonts & Character SetsChinese Font

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
nashay
Posts: 8
Joined: Thu Jul 16, 2009 9:20 am

Chinese Font

Post by nashay »

I am using Texmaker to create a document. I want to type in Chinese fonts, but it doesn't seem to be working. I changed the font encoding of the software UTF-8, but I still can't get anything. Here is my code

Code: Select all

\documentclass{article}
\usepackage{CJK}
\begin{document}
\begin{CJK}{UTF8}{song}
你好
\end{CJK}
\end{document}
I also tried to use the statements \begin{SChinese} and \end{SChinese}, but that also didn't work.,

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
spiegboy
Posts: 120
Joined: Thu Dec 06, 2007 9:58 am

Re: Chinese Font

Post by spiegboy »

you could refer to the ctex forum
http://bbs.ctex.org/
which is specialized in chinese latex tech.
nashay
Posts: 8
Joined: Thu Jul 16, 2009 9:20 am

Re: Chinese Font

Post by nashay »

For anyone interested, I downloaded CTex (It may be possible that other programs will also work, but CTex seems to be more compatable with Chinese inputs)

Then I changed the document class to ctexart.

\documentclass{ctexart}
gosha
Posts: 16
Joined: Mon Nov 24, 2008 2:48 pm

Chinese Font

Post by gosha »

If it's not solved already, this works for me:

Code: Select all

\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{CJKutf8}
\usepackage[overlap, CJK]{ruby}
\usepackage{CJKulem}
\usepackage{longtable}
\renewcommand{\rubysep}{-0.2ex}
\newenvironment{SChinese}{%
  \CJKfamily{gbsn}%
  \CJKtilde
  \CJKnospace}{}
\begin{document}
\parskip 3ex
\parindent 0pt
\begin{CJK}{UTF8}{}\begin{SChinese}你好\end{SChinese}\end{CJK}
\end{document}
Make sure the .tex file is in UTF-8
steinchen
Posts: 21
Joined: Thu Oct 29, 2009 12:18 pm

Re: Chinese Font

Post by steinchen »

Thanks, Gosha!

I just tried with TexMakerX. It works!

That is exactly what I am looking for!
Post Reply