2

I have read the answers to the question How does one type Chinese in LaTeX?.

In my case the solution compiling in xelatex, and the one compiling in pdflatex both manage to compile without errors.

The problem is that when I open the output PDF it only shows question marks: "?????"

This might not be a question strictly about latex, but it is about using latex at least: Does anyone know what might be the problem?

If I understand correctly, I need the fonts required to be installed. I think they are. I can input Mandarin Chinese through keyboard. I have Microsoft Word and it shows Simplified Chinese characters when I copy in it the phrase in the example given in the liked question:

(Interesting! I cannot copy said phrase in the body of this question. It doesn't work as a quote either).

I guess now I also have the question on how to input Chinese characters in this site?

Example:

% UTF-8 encoding, pdflatex or latex+dvipdfmx
% Simplified Chinese fonts should be installed
\documentclass{article}
\usepackage{CJKutf8}
\AtBeginDvi{\input{zhwinfonts}}
\begin{document}
\begin{CJK*}{UTF8}{zhsong}
XXXXX
\clearpage\end{CJK*}
\end{document}

The XXXXX part I can't copy. This website shows a sign saying: Body cannot contain "X", where "X" is the first character of "XXXXX".

I am using Windows 7, TeXnicCenter 2.02 (64 bits), and pdflatex if that is relevant.

Followup: Tried to update MiKTeX, the server was rejecting the connection, uninstalled MiKTeX and installed TexLive. Now it works. My guess is that something was missing in the MiKTeX installation that likely would have been fixed if I had updated.

Second thought: The above followup happened in my home laptop. In my work computer, where I was having the problem for the first time, has a fresh installation of MiKTeX (two weeks old). This makes me unsure about updating MiKTeX as a solution.

  • An example of code? – egreg Aug 5 '15 at 21:00
  • @egreg Couldn't add it. The examples I tried are the 3rd and 4th in the linked page. I don't know why I couldn't add them to the body of this question. That is the second thing I was asking at the end. – Anna Taurogenireva Aug 5 '15 at 21:09
  • Are you talking about the examples in Leo Liu's answer? – egreg Aug 5 '15 at 21:11
  • @egreg yes, those. – Anna Taurogenireva Aug 5 '15 at 21:12
  • Curious: I get a message telling “Body cannot contain U+6587” (with the character instead of the Unicode point). – egreg Aug 5 '15 at 21:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.