---
title: "texlive使用日记"
author: "coderplay"
date: "2007-12-20T01:42:01Z"
tags: []
slug: "texlive"
draft: false
lastmod: "2007-12-20T01:42:01Z"
id: 149587
url: "https://coderplay.iteye.com/blog/149587"
---

往代码里面插入中文。 这段有时候会出错,编译不了。 但大多时候可以正常运行。

\lstset{escapebegin=\textbraceleft\begin{CJK}{GB}{gbsn},escapeend=\end{CJK}\textbraceright}
\begin{lstlisting}
for i:=maxint to 0 do
begin
{ 中文 }
end;
\end{lstlisting}


以下都可以改中文
\renewcommand\abstractname{摘~~要}
\renewcommand{\contentsname}{目~~录}
\renewcommand{\figurename}{图}
\renewcommand{\refname}{参~考~文~献}

还有一个indexname可以改索引成中文