Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

CASthesis-v0.2.zip

Above is a template for writing thesis in Chinese. (Fortunately, there is not very much Chinese content in this template.) It works well on a Windows machine. But when I run it on a Mac OS machine, there are errors. The error information is shown as below. enter image description here

It says that 'Error: Wrong DVI mode driver option 'dvipdfm', because XeTex is running.' But I was told that this template can support XeTex. Please check it for me if there is anything I should modify or setup.


Update: Above problem is solved by changing the coding environment. But a new problem appear. The error information is as below.

Output written on template.dvi (35 pages, 103108 bytes). SyncTeX written on template.synctex.gz. Transcript written on template.log.

/usr/texbin/dvips -R -Poutline -o /tmp/altpdflatex.5730-1359428424/template.ps template.dvi This is

dvips(k) 5.991 Copyright 2011 Radical Eye Software (www.radicaleye.com) ' TeX output 2013.01.29:1400' -> /tmp/altpdflatex.5730-1359428424/template.ps

kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+123/600 --dpi 723 gbksong41 mktexpk: don't know how to create bitmap font for gbksong41. mktexpk: perhaps gbksong41 is missing from the map file. kpathsea: Appending font creation commands to missfont.log. /usr/texbin/dvips: Font gbksong41 not found; using cmr10

/usr/texbin/dvips: ! invalid char 169 from font gbksong41

FAILED to generate /tmp/altpdflatex.5730-1359428424/template.ps ()

share|improve this question
2  
You need to remove the dvipdfm option from the \documentclass command in the template file. Also make sure that you have reencoded the file as UTF-8. (I did this with iconv in the Terminal): iconv -f GB2312 -t UTF-8 template.tex > newtemplate.tex. –  Alan Munn Jan 29 '13 at 2:31
    
@AlanMunn, Thx. The above mentioned problem was solved when I change the coding environment from "Mac OS Roman" to "GB 18030". And the compiling process can run well. But another problem appeared. After compiling, it fails to generate a ps output. The error information is as I modified in the question. –  datcn Jan 29 '13 at 3:05
1  
@datcn: That's a different problem: dvips can not find the font. See Why isn't dvips finding my Type 1 fonts? –  Martin Schröder Feb 2 '13 at 21:56

1 Answer 1

up vote 6 down vote accepted

The original problem here is that the encoding of the file is incorrect. Make sure that the encoding is UTF-8. (I'm not sure that the GB 18030 encoding is guaranteed to work with XeTeX.) You can change the encoding using iconv:

iconv -f GB2312 -t UTF-8 template.tex > newtemplate.tex

You also need to remove the divpdfm option from the \documentclass command, in the template.tex file.

The second problem based on your edit is different: in this case you need to make sure that you run the file with XeLaTeX and not LaTeX+dvips.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.