Jun 20
  • LaTeX and Chemistry – Drawing Reaction Schemes by Clemens Niederberger
  • Efficient Seamless Tiled Backgrounds by Lim Lian Tze
  • Fun with gnuplot and arara by Paulo Roberto Massa Cereda
  • Why should I be using TeX for graphics? by Pieter Belmans
  • Tufte-style Bar Charts with pgfplots by Jürnjakob Dugge
  • Semi-automatic plotting using pgfplots by Joseph Wright
  • Plane affine constructions and the TikZ calc library by Hugues Vermeiren
  • Overcoming some flaws with graphics created using matlab2tikz by Frits Wenneker
  • Drawing with the tikz-3dplot Package by Jeff Hein
  • Pic for expressive LaTeX diagrams by Allan Espinosa
  • Dec 25

    中科院 CASLYXThesis 模板注释非常详细,比较适合我们这些新手使用。但是模板在总目录里面有致谢、目录、插图目录和表格目录,好多以此模板为基础的修改版都没有去掉目录中的目录。在 CTeX 论坛上咨询后得到了解决的办法,现分享出来。

    \def\@schapter#1{
      % \addtocontents \addcontentsline
      %     \addtocontents{toc}{\protect\addvspace{6\p@}}
      \addcontentsline{toc}{chapter}{#1}%
      \@makeschapterhead{#1}%
      \@afterheading
    }
    

    原模板的下载地址为:http://code.google.com/p/cas-lyx-template/

    Oct 04

    如果不愿使用Ctex宏包的话,可以使用CJK宏包达到相似的结果。这个模板实现:

    • 中文支持
    • 中文日期
    • 自动生成标题、导航页
    • 重定义下导航条
    • 定理自动编号
    • 对一张slide顶端对齐, 而非居中

    不过还是建议先从官方的模板入手,一步一步慢慢添加宏包,这样你才知道每个宏包的具体的功能。

    documentclass[CJK]{beamer} %幻灯片宏包
    
    usepackage{CJK,CJKnumb}
    %%主题样式
    usetheme{Madrid}
    %%定理编号
    setbeamertemplate{theorems}[numbered]
    %%重定义下导航条
    useoutertheme[footline=authortitle]{miniframes}
    
    begin{document}
    begin{CJK*}{GBK}{song}
    %%中文日期方式
    renewcommand{today}{numberyear 年 numbermonth 月 numberday 日}
    %%自动编号定理
    newtheorem{thm}{定理}[section]
    
    title[LaTeX~Beamer]{LaTeX~制作幻灯片}
    author{作者}
    date{today}
    
    frame{titlepage}
    frame{tableofcontents}
    
    section{一个例子}
    begin{frame}[t]{测试标题中文}
    begin{thm}
      假设 $f(x)in C[a,b]$, 那么 $int_a^n ¦f(x)¦mathrm{d}x<+infty$.
    end{thm}
    end{frame}
    
    begin{frame}{另一张slide}% 不加[t]看看效果
      这是另一个内容.
    end{frame}
    end{CJK*}
    end{document}

    转自:博客小小泪

    Oct 03

    最近在学习Beamer,listings宏包功能很强大,但是很多语言中的关键词不支持高亮,每次都需要手动添加关键词,太麻烦。通过Linux下的highlight软件可以将代码转换成高亮代码。这种转换主要是将listings中的关键词逐一颜色代码标记出来,实际上插入的还是文本的形式,因此复制粘贴是时候不会生成多余的空格。

    1.安装highlight

    sudo apt-get install highlight
    

    2.转换源代码

    highlight -O latex -i code.sh -o code.tex
    highlight -O latex --syntax=bash -i code -o code.tex
    

    如果不指定参数-O则会生成html代码,不会生成tex代码。

    3.插入代码
    将生成的”code.tex”和”highlight.sty”复制到Tex代码的同一文件夹下,tex源文件的导言部分(Preamble)加入:”input {highlight.sty}”,并把”code.tex”中所有内容全部插入到tex文档中需要显示高亮代码的位置,一般插入到块文件部分比较好。

    转自:http://pt0079.blogspot.com/2011/05/beamer.html

    Jun 10

    1.获取PDF元数据,需要使用poppler库下面的pdfinfo命令:

    D:>pdfinfo test.pdf
    Producer:       Feisty Duck Digital Delivery Service
    CreationDate:   08/19/13 17:40:44
    ModDate:        08/19/13 17:40:44
    Tagged:         no
    Pages:          367
    Encrypted:      no
    Page size:      535.68 x 697.44 pts
    File size:      2101334 bytes
    Optimized:      no
    PDF version:    1.4

    2.查看PDF中所使用到的字体,需要使用poppler库下面的pdffonts命令:

    D:>pdffonts test.pdf
    name                                 type              emb sub uni object ID
    ------------------------------------ ----------------- --- --- --- ---------
    FZPJCT+FreeSans                      CID TrueType      yes yes yes      1  0
    BKUKSQ+NimbusSanL-Regu               Type 1            yes yes no     755  0
    QRYPKX+CMSY10                        Type 1            yes yes no     762  0
    ZLHPUU+CenturySchL-Roma              Type 1            yes yes no     763  0
    ZCSUFP+CenturySchL-Bold              Type 1            yes yes no     764  0
    [none]                               Type 3            yes no  no     765  0
    KSECLT+TradeGothic-CondEighteen      Type 1C           yes yes no       8  0
    WLDBEZ+CenturySchL-Ital              Type 1            yes yes no     768  0
    JGPJSJ+NimbusSanL-Bold               Type 1            yes yes no     773  0
    KINSVY+CenturySchL-BoldItal          Type 1            yes yes no     819  0
    UMGSAF+CMR10                         Type 1            yes yes no     820  0
    GNTWCJ+CMR7                          Type 1            yes yes no     821  0
    MASRIW+CMMI10                        Type 1            yes yes no     824  0
    JEHZIM+CMMI7                         Type 1            yes yes no     861  0
    GBDQPA+CMSY7                         Type 1            yes yes no     862  0
    [none]                               Type 3            yes no  no     935  0
    [none]                               Type 3            yes no  no    1086  0
    [none]                               Type 3            yes no  no    1110  0
    YJJVSC+Helvetica                     Type 1C           yes yes no    2043  0
    [none]                               Type 3            yes no  no    1522  0

    3.抽取PDF中的文本,使用poppler中的pdftotext:

    pdftotext test.pdf

    4.将PDF转换为PS/EPS,使用poppler中的pdftops:

    pdftops test.pdf      # to PS
    pdftops -eps test.pdf # to EPS

    5.将PDF转换为JPEG/PNG,使用poppler中的pdfimages或MuPDF中的mudraw(强烈推荐):

    pdfimages -f 1 -j test.pdf test       # 转换为jpg,但在Windows下有bug
    mudraw -r 600 -o test-%d.png test.pdf # 转换为PNG,分辨率为600

    6.将PDF中嵌入的字体和图片提取出来,使用MuPDF中的mutool(旧版本为mubusy):

    mutool extract test.pdf

    7.解压PDF,需要使用上面的工具,这对开发者优化PDF输出很有帮助:

    mutool clean -d test.pdf

    8.抽取PDF中的某一页,使用pdftk操作:

    pdftk test.pdf cat 1-2 output z.pdf # 抽取1-2页,保存为z.pdf

    9.翻转PDF中的某一页,使用pdftk操作:

    pdftk test.pdf cat 4-4east output z.pdf

    工具下载地址:

    转自:http://zhuanlan.zhihu.com/LaTeX/19771163