This file describes some steps that compiling Latex and generating pdf with command.
latex + dvipdfmx
First, we should open Windows command with inputing cmd
. Then, type the following instructions step by step.
> notepad main.tex
result: open new file with notepad.
% Type these sentences into this file.
> \documentclass{article}
\begin{document}
Hello \LaTeX.
\end{document}
% Save and close this file.
> latex main.tex
> dvipdfmx main.dvi
> main.pdf
Now, we finish compiling Latex and generating pdf file.
xelatex
xelatex
supports utf-8
, which meanings that you can write with Chinese. Try the following instructions.
> notepad main.tex
result: open new file with notepad.
% Type these sentences into this file.
> \documentclass{article}
\begin{document}
Hello \LaTeX.
\end{document}
% Save and close this file.
> xelatex main.tex
> main.pdf
- Now we introduce how to write and compile with Chinese.
% Open a new file refer to above mentioned.
% Type these these sentences.
> \documentclass{article}
> \usepackage{ctex}
> \begin{document}
> 你好 \LaTeX.
> \end{document}
% Note that save this file with utf-8 encoding.
> xelatex
> main.tex
The following shows result.
demo.jpg
网友评论