Thursday, November 15, 2012

LaTeX CJK 如何工作

TeX/LaTeX编辑工具

1. WinEdit + LaTeX
  WinEdit和TeX的组合编辑是最常用的,在此不做介绍。WinEdit可在此下载,Windows下的WinEdt+LaTeX+GSView套装可在此下载
 
2. UltraEdit + LaTeX
CTEX 套装自带的LaTeX编辑器是WinEdt。除了对中文spellcheck、自动换行支持不好外,还有很多“智能”的毛病,比如经常一回车,刚敲过的两 行就被WinEdt自动排版了。UltraEdit实在是令人叹为观止的一款文本编辑器,我一直使用其编辑文本文件,如果能用它来编辑LaTeX就好了。 事实上,UE早已为我们准备好这种功能了,拿出来共享一下。

1. LaTeX关键字的自动着色。
   到UltraEdit的官方网站下载Wordfile,具体在
   http://www.ultraedit.com/downloads/additional.html
   打 开UltraEdit目录下的wordfile.txt文件,把你下载下来的wordfile附加在末尾,用copy/paste就行了。另外 wordfile.txt中是以"/L*"来作为一种语言的开始标记,其中"*"代表数字序号,注意latex的序号不要和原先的语言(如C、Perl、 HTML等)冲突就行了。
   这时候你再打开一个.tex文件看看,是不是耳目一新?

2. LaTeX Tag的自动插入。还是在
   http://www.ultraedit.com/downloads/additional.html
   下载latextag.txt,按照对应格式copy/paste到UE目录下的taglist.txt文件中。 记得要在最后的[Group List]里加上对应项目。 然后打开UE,按Ctrl+F8,下面的用法就不用我多说了。

3. 不脱离UltraEdit环境即对TeX文件进行编译和预览。
   这部分实现WinEdt的部分功能,通过几个工具栏按钮来编译、预览LaTex。

   3.1 编译LaTeX
      在UE的菜单项,选择Advanced->Tool Configurations,
       Command Line: Latex "%p%n.tex"
       Working Directory: %p
       Menu Item Name: LaTeX
       Save Active File: 选中
       Show Dos Box: 选中
       Capture Output: 选中
      然后点Insert,这样就加入了一个菜单项。这时用UE打开一个Tex文件,然后在Advanced菜单的最下面多了个菜单项:Latex,点它,就可以编译LaTeX文件了!还可以用UE的自定义工具栏功能,把自定义的菜单项加到工具栏上。
     (补充:在这里,可以通过对话框的ADVANCE选项,添加工具的图表,下同)

   3.2 用YAP预览
      其他的就大同小异了。
       Command Line: yap "%p%n.dvi"
       Working Directory: %p
       Menu Item Name: View with YAP
       Windows Program: 选中
       注,其他皆不选。

   3.3 编译成ps文件
       Command Line: dvips "%p%n.dvi"
       Working Directory: %p
       Menu Item Name: DVIPS
       Windows Program: 不选
       Save Active File: 不选
       Show Dos Box: 选中
       Capture Output: 不选

   3.4 用GSView预览
       Command Line: "gsview32" "%p%n.ps"
       Working Directory: %p
       Menu Item Name: View with GSView
       Windows Program: 选中
       Save Active File: 不选
       Show Dos Box: 不选
       Capture Output: 不选

   3.5 制作 PDF 文件
       Command Line: ps2pdf "%p%n.ps"
       Working Directory: %p
       Menu Item Name: PS2PDF
       Windows Program: 不选
       Save Active File: 不选
       Show Dos Box: 选中
       Capture Output: 不选

   3.6 用Acrobat Reader预览生成的PDF文件    
       Command Line: "AcroRd32.exe" "%p%n.pdf"
       Working Directory: %p
       Menu Item Name: View with Acrobat
       Windows Program: 选中
       Save Active File: 不选
       Show Dos Box: 不选
       Capture Output: 不选

体验一下UltraEdit和LaTeX的完美组合吧 :) 
 
3. The Emacs Editor

  支持 TeX 的强大编辑器: Emacs is the extensible, customizable, self-documenting real-time display editor. This Info file describes how to edit with Emacs and some of how to customize it; it corresponds to GNU Emacs version 21.3.  
 
4. WhizzyTeX

  WhizzyTeX: 一个所见即所得的 LaTeX 编辑环境: http://pauillac.inria.fr/whizzytex/

No comments:

Post a Comment