0
votes

I would like to ask how to write some Chinese characters (simplified) within an English Latex document? I followed some methods suggested online but none of them are working for me. I am using Texworks to compile my document (pdfLatex).

\usepackage{CJKutf8}
\documentclass{article}
\usepackage{CJKutf8}

\begin{document}
\begin{CJK}{UTF8}{bsmi}
你好吗
\end{CJK}     
\end{document}

another method is mentioned here,

\usepackage{CJKutf8}
\newcommand{\zh}[1]{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}

insert whatever Chinese characters you like into the document by typing

 \zh{中文}

The error I receive is as following when using the method of CJKutf8 with pdfLaTeX mentioned here, The log file hopefully contains the information to get MiKTeX going again:

C:\Users\muhd_\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makepk.log ) !pdfTeX error: miktex-pdftex.exe (file bsmiu30): Font bsmiu30 at 600 not found ==> Fatal error occurred, no output PDF file produced!

Log file is attached here.

1
If I remove the first \usepackage{CJKutf8} from your example, it compiles fine for me with pdflatex. What problems do you face with this method? Do you get any error messages? See overleaf.com/read/trgqnffkdnht for the working examplesamcarter_is_at_topanswers.xyz
It's not working if I remove the \usepackage{CJKutf8} for me. Without removing the \usepackage{CJKutf8} line, I get this error; "!pdfTeX error: miktex-pdftex.exe (file bsmiu59): Font bsmiu59 at 720 not found ==> Fatal error occurred, no output PDF file produced!"Jack
If I remove the \usepackage{CJKutf8} Line, then I have this error; ! LaTeX Error: Environment CJK undefined.Jack
Can you please try to compile exactly the document as I have posted in the overleaf link and add the .log file you get to your question?samcarter_is_at_topanswers.xyz
Thanks for the log file. Can you try this answer: tex.stackexchange.com/a/419809/36296samcarter_is_at_topanswers.xyz

1 Answers

1
votes

The first error in the log file

The process terminated due to an access violation.

suggests that there are some problems with permissions while trying to create the necessary files to use the font for the Chinese letters.

Based on this answer https://tex.stackexchange.com/a/419809/36296 the problem can be fixed by either runing updmap from the command line or Refresh font map files from within the miktex console (in user mode).