GeneralTyping Chinese in TeXnicCenter

General information and discussion about TeXnicCenter
Post Reply
pig456
Posts: 1
Joined: Thu Jul 10, 2008 5:11 am

Typing Chinese in TeXnicCenter

Post by pig456 »

First, this is my situation:
WinXP SP3 Chinese Version
MikTex 2.7 plus CJK packages
Latest TeXnicCenter

Now the TeXnic can read and compile the sample Chinese .tex document
So, I can read the Chinese in the editor and PDF reader(sure the correct printout).

However, I CANNOT type in Chinese through the Chinese Input Method in the WinXP.
I can type Chinese in notepad and then copy to the TeXnic and compile successfully.

Can anyone help pls.??? :cry: :cry: :cry:

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Bala
Posts: 5
Joined: Sun Jul 20, 2008 6:06 am

Re: Typing Chinese in TeXnicCenter

Post by Bala »

Even though I cannot help, I can commiserate, for I am in the same position.

In my case it is Hindi. I have the same configuration as you. And I get ????? when I enter text in Hindi. Just as you, I can type properly in Hindi in notepad, Open Office Writer and all other Window based programs.

I am just one day old with TEX and Teckniccenter. I downloaded protext yesterday with the intention of writing some maths papers in Hindi. But it doesn't seem to work for non English languges.

My research so far indicates that there is this omega package which supports unicode. But there seems to be no documentation on how to make it run in Tecniccenter.

It also appears that TexLive would have been a better choice, but it is a 1 GB package and may take half a day to download. But I will most likely try it out as well.

I shall be watching this post, for any Tex gurus to drop useful tips on how to resolve our problems.

In case you mange any breakthrough, do update this post.
Bala
Posts: 5
Joined: Sun Jul 20, 2008 6:06 am

Re: Typing Chinese in TeXnicCenter

Post by Bala »

There is bad news and good news for us. Tecniccentre does not support unicode :-(

This post clears the issue:

http://www.latex-community.org/viewtopic.php?f=36&t=12

However, it suggests using Texmaker which supports unicode. I just installed it. It is there in the 'unsupported' file of protext installation.

It allows me to type Hindi :-).

It should work for Chinese too.
metric
Posts: 61
Joined: Mon Mar 24, 2008 8:34 am

Typing Chinese in TeXnicCenter

Post by metric »

Bala wrote:There is bad news and good news for us. Tecniccentre does not support unicode :-(

This post clears the issue:

http://www.latex-community.org/viewtopic.php?f=36&t=12

However, it suggests using Texmaker which supports unicode. I just installed it. It is there in the 'unsupported' file of protext installation.

It allows me to type Hindi :-).

It should work for Chinese too.


Can you guide me on on how to type hindi in latex, i use miktex. presently i've no idea of how one can type any other language apart from english in latex
Bala
Posts: 5
Joined: Sun Jul 20, 2008 6:06 am

Typing Chinese in TeXnicCenter

Post by Bala »

I am newbie to Tex. Only downloded it a couple of days ago, but since then have been furiously trying to make it work with Hindi. A couple of hours ago, I succeeded with the following combinations:

-miktex distribution of Tex
-Lyx as the editor
-XeLatex as the pdf generator

In miktex the devanagari package under indic languages in language support must be installed.

This installs the velthius package for Hindi-Sanskrit and its precomplier.

You must also install fontspec package in miktex.

All these package are there in the proTex distribution which you would have used to install mikTex.

Next download and install Lyx. On a new Lyx file, set the document setting as utf8-plain.

Next add the following code as the preamble for Latex in the Lyx file:

\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\fontspec[Script=Devanagari]{Mangal}

You can now start entering your Hindi in the normal way as you enter Hindi text in Word or OpenOfficeWrite.

You will not be able to compile an output of this text through Lyx itself. For this you will need XeLatex.

After you have finished entering text, save it and Export it as Latex(pdflatex). This will generate a .tex file for you in the same directory as the lyx file. Run this file through xelatex with this command from a dos prompt:

c:>xelatex <full absoulte path of the .tex file>

This command will generate a pdf output for your file.

In place of Mangal, you can choose any unicode Hindi font in your computer as your Hindi font, but the script value should be kept devanagari for Hindi.

I am attaching the pdf output for a small Hindi para with this method for your reference.
xetexhindi.pdf
(28.06 KiB) Downloaded 629 times
Daniel Levitan
Posts: 5
Joined: Fri Sep 19, 2008 4:08 pm

Re: Typing Chinese in TeXnicCenter

Post by Daniel Levitan »

Hi guys.

I'm facing the same problem but the language in question is Hebrew. I've tried to use de Texmaker, but although I'm able to right in Hebrew, when generate the dvi or pdf archive, only ??? appears to me.

But when I copy the code I generate using the Texnic Center I can visualize hebrew letters. It seems very odd to me as long as Texmaker can know exactly the character I'm writing but cannot convert it.

Regards,

Daniel
steinchen
Posts: 21
Joined: Thu Oct 29, 2009 12:18 pm

Typing Chinese in TeXnicCenter

Post by steinchen »

The latest alpha version support utf-8, so save each .tex file in this coding.
For typing mixed Chinese & English text:

In Preamble:

Code: Select all

\usepackage{CJKutf8}
\usepackage[overlap, CJK]{ruby}
\newenvironment{SChinese}{%
  \CJKfamily{gbsn}%
  \CJKtilde
  \CJKnospace}{}
% Use macro \cntext{} for short words, one line below for no space
\newcommand{\cntxt}[1]{\begin{CJK}{UTF8}{}\begin{SChinese}#1\end{SChinese}\end{CJK}}
In document:

Code: Select all

\begin{CJK}{UTF8}{}
  \begin{SChinese}
   Your paragraph in Chinese here!
  \end{SChinese}
\end{CJK}
Or you can type:

Code: Select all

Hello in Chinese is \cntxt{你好}.
steinchen
Posts: 21
Joined: Thu Oct 29, 2009 12:18 pm

Re: Typing Chinese in TeXnicCenter

Post by steinchen »

I am still interested how to make Chinese chapter/sections.

and also bookmarks.

Such a mixed text would be too challenge?
Post Reply