<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Neuromancer in Savannah &#187; Search Results  &#187;  latex</title>
	<atom:link href="http://zhangw.com/wp/search/latex/feed/rss2/" rel="self" type="application/rss+xml" />
	<link>http://zhangw.com/wp</link>
	<description>My Wordpress Blog</description>
	<lastBuildDate>Sat, 26 Nov 2011 03:49:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Use XeTeX with latexmk</title>
		<link>http://zhangw.com/wp/2010/05/use-xetex-with-latexmk/</link>
		<comments>http://zhangw.com/wp/2010/05/use-xetex-with-latexmk/#comments</comments>
		<pubDate>Thu, 27 May 2010 23:28:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[latexmk]]></category>
		<category><![CDATA[texshop]]></category>
		<category><![CDATA[xelatex]]></category>
		<category><![CDATA[xelatexmk]]></category>
		<category><![CDATA[xetex]]></category>

		<guid isPermaLink="false">http://www.zhangw.com/wp/?p=859</guid>
		<description><![CDATA[Just find out that it is easy to set XeTex to work with latexmk. From TeX on Mac OS X mailing list by Herb Schulz: Move the engine files from ~/Library/TeXShop/Engines/Inactive/Latexmk/ two directories up, to ~/Library/TeXShop/Engines/ to activate them. Once that is done restart TeXTShop. To use the xelatexmk engine simply put the line % [...]]]></description>
			<content:encoded><![CDATA[<p>Just find out that it is easy to set <a href="http://scripts.sil.org/xetex" class="liexternal">XeTex</a> to work with <a href="http://www.phys.psu.edu/~collins/software/latexmk-jcc/" class="liexternal">latexmk</a>. From <a href="http://permalink.gmane.org/gmane.comp.tex.macosx" class="liexternal">TeX on Mac OS X</a> mailing list by <a href="http://permalink.gmane.org/gmane.comp.tex.macosx/36206" class="liexternal">Herb Schulz</a>:</p>

<p>Move the engine files from
~/Library/TeXShop/Engines/Inactive/Latexmk/ two directories up, to ~/Library/TeXShop/Engines/
to activate them. Once that is done restart TeXTShop.</p>

<p>To use the xelatexmk engine simply put the line</p>

<p>% !TEX TS-program = xelatexmk</p>

<p>at the top of the source file.</p>
]]></content:encoded>
			<wfw:commentRss>http://zhangw.com/wp/2010/05/use-xetex-with-latexmk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XeTeX 与 Emacs Notes Mode</title>
		<link>http://zhangw.com/wp/2005/09/xetex-%e4%b8%8e-emacs-notes-mode/</link>
		<comments>http://zhangw.com/wp/2005/09/xetex-%e4%b8%8e-emacs-notes-mode/#comments</comments>
		<pubDate>Thu, 22 Sep 2005 14:42:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.zhangw.com/wp/?p=350</guid>
		<description><![CDATA[Emacs rules. 我用 Emacs 写 Wiki，做计划，也用它作笔记。当然了，偶尔也用它玩俄罗斯方块。最近用 Notes Mode 作笔记时有个麻烦，就是 notes mode 不支持生成中文的PDF文件。可 Mac 上却有个如此方便的 XeTeX 来用，不能看中文实在不爽。我就把生成PDF的脚本文件－parsenotes 作了些简单修改来满足中文需求。下面就是我修改后的 parsenotes（你也可以点击这里下载）。 ﻿#!/usr/bin/env python """ Convert a notes-mode file to pdf (via latex, etc.) @todo: support for \epsfig """ """ Character codes: \0 = backslash \1 = open brace \2 = close brace \3 = &#95; """ import sys, [...]]]></description>
			<content:encoded><![CDATA[<p>Emacs rules.</p>

<p>我用 Emacs <a href="http://repose.cx/emacs/wiki/" class="liexternal">写 Wiki</a>，<a href="http://sacha.free.net.ph/notebook/wiki/PlannerMode.php" class="liexternal">做计划</a>，也用它<a href="http://www.cis.upenn.edu/~edloper/programs/notesmode/index.html" class="liexternal">作笔记</a>。当然了，偶尔也用它<a href="http://www.emacswiki.org/cgi-bin/wiki/TetrisMode" class="liexternal">玩俄罗斯方块</a>。最近用 <a href="http://www.cis.upenn.edu/~edloper/programs/notesmode/index.html" class="liexternal">Notes Mode</a> 作笔记时有个麻烦，就是 notes mode 不支持生成中文的PDF文件。可 Mac 上却有个<a href="http://www.zhangw.com/wp/?p=295" class="liinternal">如此方便</a>的 <a href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&#038;item_id=xetex" class="liexternal">XeTeX</a> 来用，不能看中文实在不爽。我就把生成PDF的脚本文件－<a href="http://www.cis.upenn.edu/~edloper/programs/notesmode/parsenotes" class="liexternal">parsenotes</a> 作了些简单修改来满足中文需求。下面就是<a href="http://zhangw.com/scripts/parsenotes" class="liinternal">我修改后的 parsenotes</a>（你也可以点击<a href="http://zhangw.com/scripts/parsenotes" class="liinternal">这里</a>下载）。</p>

<p><span id="more-350"></span>
<pre>
﻿#!/usr/bin/env python</p>

<p>"""
Convert a notes-mode file to pdf (via latex, etc.)</p>

<p>@todo: support for \epsfig
"""</p>

<p>"""
Character codes:
  \0 = backslash
  \1 = open brace
  \2 = close brace
  \3 = &#95;
"""</p>

<p>import sys, re, os, shutil, os.path</p>

<h1>Latex header.</h1>

<p>HEADER = r"""
\documentclass{article}
\usepackage{fontspec}
\setromanfont{STSong}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt
\usepackage{fullpage}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{alltt}
\usepackage{epsfig}
\usepackage[dvipdfm, pagebackref, colorlinks=true,
            pdftitle={%s},
            pdfauthor={%s},
            bookmarks=true, bookmarksopen=false,
            pdfpagemode=UseOutlines]{hyperref}</p>

<p>\setlength{\parskip}{1ex}
\setlength{\parindent}{0ex}
\setlength{\topsep}{0.3em}
\setlength{\partopsep}{0em}</p>

<p>%% This is used to reduce spacing in bulleted lists.
\def\nogap{
    \setlength{\itemsep}{0em}
    \setlength{\parskip}{0em}}</p>

<p>%% Declare some symbols that x-emacs believes exists.
\DeclareTextSymbol{\textbackslash}{T1}{92}
\newcommand{\nsubset}{\not\subset}
\renewcommand{\textflorin}{\textit{f}}
\newcommand{\setB}{{\mathord{\mathbb B}}}
\newcommand{\setC}{{\mathord{\mathbb C}}}
\newcommand{\setN}{{\mathord{\mathbb N}}}
\newcommand{\setQ}{{\mathord{\mathbb Q}}}
\newcommand{\setR}{{\mathord{\mathbb R}}}
\newcommand{\setZ}{{\mathord{\mathbb Z}}}
\newcommand{\coloncolon}{\mathrel{::}}
\newcommand{\lsemantics}{\mathopen{\lbrack\mkern-3mu\lbrack}}
\newcommand{\rsemantics}{\mathclose{\rbrack\mkern-3mu\rbrack}}
\newcommand{\lcata}{\mathopen{(\mkern-3mu\mid}}
\newcommand{\rcata}{\mathopen{\mid\mkern-3mu)}}</p>

<p>\begin{document}
"""</p>

<p>FOOTER = r"""
\end{document}
"""</p>

<p>DEBUG=0</p>

<p>def dolists(notes):
    """
    Convert notes-style lists to LaTeX enum/itemize lists.
    """
    _BULLET_RE = re.compile(r'^([ \t]<em>)([</em>]|[-]|\d+&#46;)(.*)', re.MULTILINE)</p>

<pre><code>indent = [-1]
bullets = []
out = ''
verbatim = 0
for line in notes.split('\n'):
    # Skip verbatim areas..
    if re.search(r'\\begin{alltt}', line): verbatim = 1
    if re.search(r'\\end{alltt}', line): verbatim = 0
    if verbatim:
        out += line + '\n'
        continue

    m = _BULLET_RE.match(line)
    if m:
        spaces = len(m.group(1).replace('\t', '        '))
        bullet = m.group(2)

        # Start a new (sub)list.
        if spaces &gt; indent[-1]:
            if bullet in ('*', '-'):
                bullets.append('itemize')
            else:
                bullets.append('enumerate')
            out += '\n\\vspace{-1ex}\\begin{%s}\\nogap\n' % bullets[-1]
            indent.append(spaces)

        # End one or more sublists.
        while spaces &lt; indent[-1]:
            out += '\\vspace{-1ex}\\end{%s}\n\n' % bullets.pop()
            indent.pop()

        # List item.
        out += (' '*spaces) + '\\item{}' + m.group(3) + '\n'

    else:
        # End the last sublist..
        m = re.match('([ \t]*)', line)
        spaces = len(m.group(1).replace('\t', '        '))
        # End one or more sublists.
        while spaces &lt;= indent[-1]:
            out += '\\vspace{-1ex}\\end{%s}\n\n' % bullets.pop()
            indent.pop()

        out += line + '\n'

return out
</code></pre>

<p>def do_timestamps(notes):
    """
    Convert notes-style timestamps to headings.  I put a timestamp at
    the beginning of each day's class, so this puts each day on its
    own page.  The timestamp can optionally be followed (on the same
    line) by a title for that day's lecture.
    """
    import time
    _TIMESTAMP_RE = re.compile(r'^&#91;(\d\d/\d\d/\d\d) \d\d:\d\d [AP]M&#93;(.*)$')
    just_did_timestamp = 0
    out = ''
    for line in notes.split('\n'):
        m = _TIMESTAMP_RE.match(line)
        if m is None:
            if just_did_timestamp and line.strip() != '':
                just_did_timestamp = 0
                if not re.match(r'>>?>?\s', line):
                    out += '&#92;vspace{2em}\n'
            out += line+'\n'
            continue</p>

<pre><code>    (date,text) = m.groups()
    datestr = time.strftime('%A, %B %e, %Y',
                            time.strptime(date, '%m/%d/%y'))
    out += '\\newpage\n'
    if text:
        out += '\\begin{centering}\\LARGE %s\\\\' % text
        out += '\\end{centering}\\vspace{4mm}\n'
    out += '\\hrule\\hrule\\hrule\n'
    out += '\\begin{raggedleft}\\Large \\it \\hfill %s' % datestr
    out += '\\\\ \\end{raggedleft}\n\n\n'
    just_did_timestamp = 1
return out
</code></pre>

<p>_VERB1_RE_A = re.compile(r'((\n[#]([ \t][^\n]<em>)?)+)', re.MULTILINE)
_VERB2_RE_A = re.compile(r'((\n[%]([ \t][^\n]</em>)?)+)', re.MULTILINE)
_VERB3_RE_A = re.compile(r'((\n[!]([ \t][^\n]<em>)?)+)', re.MULTILINE)
_VERB4_RE_A = re.compile(r'((\n[</em>]([ \t][^\n]*)?)+)', re.MULTILINE)
_VERB1_SUB_A = r"""</p>

<p>&#92;begin{tabular}{||l}
&#92;begin{minipage}{0.9&#92;textwidth}
&#92;begin{alltt}&#92;small\1
&#92;end{alltt}
&#92;end{minipage}
&#92;end{tabular}</p>

<p>"""
_VERB2_SUB_A = _VERB3_SUB_A = r"""</p>

<p>&#92;begin{tabular}{|l}
&#92;begin{minipage}{0.9&#92;textwidth}
&#92;begin{alltt}&#92;rmfamily\1
&#92;end{alltt}
&#92;end{minipage}
&#92;end{tabular}</p>

<p>"""
_VERB4_SUB_A = r"""</p>

<p>&#92;begin{tabular}{|l|}
\hline
&#92;begin{minipage}{0.9&#92;textwidth}
&#92;begin{alltt}&#92;bfseries&#92;rmfamily&#92;itshape&#92;large\1
&#92;end{alltt}
&#92;end{minipage}&#92;&#92;
\hline
&#92;end{tabular}</p>

<p>"""</p>

<h1>Subscript or superscript.  \1=open brace, \2=close brace.</h1>

<p><em>SCRIPT = r'(%s|%s|%s)' % ((r'%s[^%s]+%s' % ('\1','\1\2','\2')),
                           '\0[a-zA-Z0-9]+', r'[^{}</em>^&#92;]')</p>

<p>_FIGURE_RE = re.compile('^::FIGURE::(\d+)::FIGURE::$', re.MULTILINE)
_FIGURE_SUB = r"""&#92;end{alltt}
&#92;epsfig{file=figure\1.eps}
&#92;begin{alltt}"""</p>

<p>def notes2latex(notes, **headervars):
    """
    Convert a notes file to a LaTeX file.</p>

<pre><code>@type notes: C{string}
"""
# Change backslashes to \0s, so we can tell our backslashes from theirs.
notes = re.sub(r'\\', '\0', notes)
notes = re.sub(r'\{', '\1', notes)
notes = re.sub(r'\}', '\2', notes)
notes = re.sub('\0_', '\3', notes)

#notes = re.sub('\0epsfig\1([^\2]*file=)([^\2]+)\2',
#               r'\\epsfig{\1%s/\2}' % os.curdir, notes)

# In the case of expressions like {\'o} (for o with an accent), we
# want to keep the {, }, and \ characters; change them back, to
# prevent them from being rendered literally.
notes = re.sub("\1\0(['\"c`]? ?\w)\2", r'{\\\1}', notes)

# Timestamps.
notes = do_timestamps(notes)

# Headings.
H1_RE = re.compile(r'^&gt; (.*)$', re.MULTILINE)
notes = H1_RE.sub('\n'+r'\\section{\1}'+'\n', notes)
H2_RE = re.compile(r'^&gt;&gt; (.*)$', re.MULTILINE)
notes = H2_RE.sub('\n'+r'\\subsection{\1}'+'\n', notes)
H3_RE = re.compile(r'^&gt;&gt;&gt; (.*)$', re.MULTILINE)
notes = H3_RE.sub('\n'+r'\\subsubsection*{\1}'+'\n', notes)

# Emphasis.
notes = re.sub(r'!!(.*)!!', r" \\emph{\1} ", notes)

# Some characters need to be in math mode.
# (do this before verb, since verb introduces |'s)
notes = re.sub(r'([&lt;&gt;|])', r'\\(\1\\)', notes)

notes = _VERB1_RE_A.sub(_VERB1_SUB_A, notes)
notes = _VERB2_RE_A.sub(_VERB2_SUB_A, notes)
notes = _VERB3_RE_A.sub(_VERB3_SUB_A, notes)
notes = _VERB4_RE_A.sub(_VERB4_SUB_A, notes)

# Get rid of the verbatim markers.
VERB_RE_B = re.compile(r'^[#%!*][ \t]?', re.MULTILINE)
notes = VERB_RE_B.sub('', notes)

# Handle sub &amp; super scripts.  Run these regexps repeatedly, since
# sub &amp; superscripts might be nested.
MATH_RE_A = re.compile(r'\^(%s)' % _SCRIPT)
MATH_RE_B = re.compile(r'_(%s)' % _SCRIPT)
while 1:
    notes2 = notes

    # Replace _ and ^ with \sb and \sp
    notes2 = MATH_RE_A.sub(r"\\(\\sp{\\text{\1}}\\)", notes2)
    notes2 = MATH_RE_B.sub(r"\\(\\sb{\\text{\1}}\\)", notes2)

    # Get rid of excess { and }s
    notes2 = re.sub("\\\\text{\1([^\1\2{}]*)\2}",
                    r'\\text{\1}', notes2)

    if notes2 == notes: break
    else: notes = notes2

# Put appropriate elements in math mode.
notes = re.sub('\0([a-zA-Z0-9]+)', r"\\(\\\1\\)", notes)

# Get rid of any remaining ^s and _s (from nested use)
notes = re.sub(r'\^', r'\\textasciicircum', notes)
notes = re.sub(r'_', r'\\_', notes)

# Some characters need to be backslashed
notes = re.sub('([#$&amp;%])', r'\\\1', notes)

# Some commands are *not* supposed to be in math mode.
notes = re.sub((r'(\\text(?!width)[a-zA-Z0-9]+|'+
                r'\\l(?!\w)|\\o(?!\w))'),
               r'\\textrm{\1}', notes)

# Is this necessary?
notes = re.sub('~', r'{\\textasciitilde}', notes)

# If they backslashed braces, then unbackslash them.
notes = re.sub('\0\1', '\1', notes)
notes = re.sub('\0\2', '\2', notes)

# Change any remaining backslashes to textbackslash, etc.
notes = re.sub('\0', r'{\\textbackslash}', notes)
notes = re.sub('\1', r'\\{', notes)
notes = re.sub('\2', r'\\}', notes)
notes = re.sub('\3', r'\\_', notes)

# Handle figures
notes = _FIGURE_RE.sub(_FIGURE_SUB, notes)
notes = re.sub(r'\\begin{alltt}\n\\end{alltt}\n', '', notes)

# Handle lists.
notes = dolists(notes)

# Get rid of 2 consecutive blank lines..
notes = re.sub(r'\n([ \t]*\n)+', '\n\n', notes)

# Fill in header variables.
author = headervars.get('author', 'Edward Loper')
title = headervars.get('title', '')
header = HEADER % (author, title)

return header+notes+FOOTER
</code></pre>

<p>def tree2ps(tree_str, outfile):
    # Use square braces.
    tree_str = re.sub(r'&#91;', '(', tree_str)
    tree_str = re.sub(r'&#93;', ')', tree_str)</p>

<pre><code># Undo some of our earlier changes.. :-/
tree_str = tree_str.strip()
tree_str = re.sub(r'\\_', '_', tree_str)
</code></pre>

<h1>THE TREE2IMAGE VERSION:</h1>

<pre><code>import tree2image
tree = tree2image.parse_treebank_tree(tree_str, '()', 1)
tree2image.tree2ps(outfile, tree, ('times', 9))
</code></pre>

<h1>THE NLTK VERSION:</h1>

<h1>from nltk.tree import parse_treebank</h1>

<h1>import nltk.draw.tree</h1>

<h1># Hack to make tree sizes more reasonable:</h1>

<h1>nltk.draw.tree.TreeView._Y_SPACING = 8</h1>

<h1>nltk.draw.tree.TreeView._X_SPACING = 4</h1>

<p>#</p>

<h1>tree = parse_treebank(tree_str)</h1>

<h1>nltk.draw.tree.print_tree(tree, outfile, <img src='http://zhangw.com/wp/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> </h1>

<p>_FIGURE_NUMBER = 0
def do_figures(str, dir, type, show_original=None):
    if type == 'trees': braces = '[]'
    elif type == 'graphs': braces = '{}'
    elif type == 'plots': braces = ';;' # (no braces; plots are 1-line)
    else: raise ValueError('bad type')</p>

<pre><code># By default, show originals for trees but not graphs or plots.
if show_original is None:
    show_original = (type == 'trees')

brace_count = 0
fig = ''
out = ''

verbatim = 0
sys.stdout.write('Converting %s' %type)
for line in str.split('\n'):

    # Skip non-verbatim areas..
    if line[:2] != '# ':
        out += line + '\n'
        brace_count = 0
        fig = ''
        continue

    stripline = line[2:].strip()

    if (fig or (type == 'trees' and stripline[:1] == braces[0]) or
        (type == 'graphs' and stripline[:8] == 'digraph ') or
        (type == 'plots' and stripline[:5] == 'plot ' and
         stripline[-1] == ';')):
        fig += stripline + '\n'
        if show_original:
            out += line + '\n'
    else:
        out += line + '\n'

    if fig:
        brace_count += (stripline.count(braces[0]) -
                        stripline.count(braces[1]))
        if brace_count == 0 and stripline[-1:] == braces[1]:
            sys.stdout.write('.'); sys.stdout.flush()
            # We have a figure!
            global _FIGURE_NUMBER
            _FIGURE_NUMBER += 1
            epsname = 'figure%d.eps' % _FIGURE_NUMBER
            if type == 'trees':
                try: tree2ps(fig, epsname)
                except: print 'BAD TREE:\n'+fig; continue
            elif type == 'graphs':
                figname = 'figure%d.fig' % _FIGURE_NUMBER
                figfile = open(os.path.join(dir, figname), 'w')
                figfile.write(fig)
                figfile.close()
                if os.system('dot %s -Tps -o %s' %
                             (figname, epsname)) != 0:
                    print 'BAD DOT GRAPH:\n'+fig; continue
            elif type == 'plots':
                if os.system("echo 'set term postscript eps;"+
                             " set size 0.5,0.5;"+
                             (' set output "%s";' % epsname) +
                             fig + "' |gnuplot") != 0:
                    print 'BAD PLOT: %s\n' + fig; continue
            else:
                assert 0, 'Bad type'
            out += '# ::FIGURE::%d::FIGURE::\n' % _FIGURE_NUMBER
            brace_count = 0
            fig = ''
print
return out
</code></pre>

<p>def latex2pdf(notes_str, outfile, trees=0, graphs=0, plots=0):
    olddir = os.path.abspath('.')</p>

<pre><code># Make a temp directory
tempdir = os.tempnam()
while os.path.exists(tempdir): tempdir = os.tempnam()

try:
    os.mkdir(tempdir)
    os.chdir(tempdir)

    # Special handling: figures.  Do this *before* we do other
    # latex conversions, because the text within the figure should
    # be literal..
    if trees:
        notes_str = do_figures(notes_str, tempdir, 'trees')
    if graphs:
        notes_str = do_figures(notes_str, tempdir, 'graphs')
    if plots:
        notes_str = do_figures(notes_str, tempdir, 'plots')

    # Convert the notes file to latex.
    latex_str = notes2latex(notes_str, title=outfile.replace('.pdf',''))

    # Write the latex file
    texfile = open("file.tex", 'w')
    texfile.write(latex_str)
    texfile.close()

    # Run latex twice (for bookmarks &amp; x-refs)
    command = 'xelatex file.tex'
    print command
    if os.system(command) != 0:
        os.system('less file.tex')
        raise ValueError('Warning: latex failed')
    #command = 'latex file.tex &gt;/dev/null'
    #print command
    #if os.system(command) != 0:
    #    os.system('less file.tex')
    #    raise ValueError('Warning: latex failed')

    #if DEBUG:
    #    os.system('xdvi file.dvi')
    #    return

    # Run dvips
    #command = 'dvips -q file.dvi -o file.ps -G0 -Ppdf'
    #print command
    #if os.system(command) != 0:
    #    raise ValueError('Warning: dvips failed')
    #os.system('cp file.ps /tmp/genomics.ps')

    # Run ps2pdf
    #command = ('ps2pdf -sPAPERSIZE=letter -dMaxSubsetPct=100 '+
    #           '-dCompatibilityLevel=1.2 -dSubsetFonts=true '+
    #           '-dEmbedAllFonts=true file.ps file.pdf')
    #print command
    #if os.system(command) != 0:
    #    raise ValueError('Warning: ps2pdf failed')

#Run dvi2pdf
#command = 'dvipdfm file.dvi'
#print command
#if os.system(command) != 0:
#    raise ValueError('Warning: dvipdfm failed')

    # Read the pdf
    pdffile = open("file.pdf", 'r')
    pdf_str = pdffile.read()
    pdffile.close()

    # Write the output.
    os.chdir(olddir)
    outfile = open(outfile, 'w')
    outfile.write(pdf_str)
    outfile.close()

finally:
    os.chdir(olddir)
    shutil.rmtree(tempdir)
</code></pre>

<p>def usage():
    print "usage: parsenotes [-trees] file.notes"
    #sys.exit(-1)</p>

<p>def main():
    trees = graphs = plots = 0
    infile = None
    for arg in sys.argv[1:]:
        if arg[:1] == '-':
            if arg in ('-trees', '-tree'): trees = 1
            elif arg in ('-graphs', '-graph'): graphs = 1
            elif arg in ('-plots', '-plot'): plots = 1
            else:
                return usage()
        else:
            if infile is None: infile = arg
            else: return usage()
    if infile is None: return usage()</p>

<pre><code>outfile = re.sub('.notes$', '.pdf', infile)
if infile == outfile:
    print 'Expected a notes file'

notes = '\n'+open(infile, 'r').read()+'\n'
print '%s --&gt; %s' % (infile, outfile)
latex2pdf(notes, outfile, trees, graphs, plots)
</code></pre>

<p>if <strong>name</strong> == '<strong>main</strong>': main()
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://zhangw.com/wp/2005/09/xetex-%e4%b8%8e-emacs-notes-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>my .emacs</title>
		<link>http://zhangw.com/wp/my-emacs/</link>
		<comments>http://zhangw.com/wp/my-emacs/#comments</comments>
		<pubDate>Tue, 20 Sep 2005 07:54:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.zhangw.com/wp/?page_id=348</guid>
		<description><![CDATA[I&#8217;m using AquaEmacs with Emacs-Wiki (EmacsWiki中文FAQ) (set-language-environment "Chinese-GB") (prefer-coding-system 'utf-8) ;;TAB (setq-default indent-tabs-mode nil) (setq default-tab-width (setq tab-stop-list ()) (loop for x downfrom 40 to 1 do (setq tab-stop-list (cons (* x 4) tab-stop-list))) ;;sentence and Chinese (setq sentence-end "&#92;([。！？]&#92;&#124;……&#92;&#124;[.?!][]\"')}]&#92;($&#92;&#124;[ \t]&#92;)&#92;)[ \t\n]") (add-to-list 'load-path "~/elisp/emacs-wiki") ;;load-path (add-to-list 'load-path "~/elisp/") ;;(require 'gnuserv) ;;(gnuserv-start) (setq mac-option-modifier 'meta) [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using <a href="http://aquamacs.org/" class="liexternal">AquaEmacs</a> with Emacs-Wiki (<a href="http://liyu2000.nease.net/webpage/EmacsWikiZhFAQ.html" class="liexternal">EmacsWiki中文FAQ</a>)</p>

<p><pre>
(set-language-environment "Chinese-GB")
(prefer-coding-system 'utf-8)
;;TAB
(setq-default indent-tabs-mode nil)
(setq default-tab-width <img src='http://zhangw.com/wp/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> (setq tab-stop-list ())
(loop for x downfrom 40 to 1 do
      (setq tab-stop-list (cons (* x 4) tab-stop-list)))
;;sentence and Chinese
(setq sentence-end "&#92;([。！？]&#92;|……&#92;|[.?!][]\"')}]<em>&#92;($&#92;|[ \t]&#92;)&#92;)[ \t\n]</em>")</p>

<p>(add-to-list 'load-path "~/elisp/emacs-wiki") ;;load-path
(add-to-list 'load-path "~/elisp/")</p>

<p>;;(require 'gnuserv)
;;(gnuserv-start)</p>

<p>(setq mac-option-modifier 'meta) ;;Sets the alt/opetion key as Meta</p>

<p>;;use safari
;;(setq browse-url-browser-function 'browse-url-safari)
;;  (defun browse-url-safari (url &amp;optional new-window)
;;   "Open URL in a new Safari window."
;;   (interactive (browse-url-interactive-arg "URL: "))
;;   (unless
;;       (string= ""
;;             (shell-command-to-string
;;              (concat "open -a Safari " url)))
;;     (message "Starting Safari...")
;;     (start-process (concat "open -a Safari " url) nil "open -a Safari " url)
;;     (message "Starting Safari... done")))
;;  (defun report-emacs-bug-externally-p () t)</p>

<p>;;Transparency</p>

<p>;;(modify-frame-parameters (selected-frame) '((active-alpha . 0.8)))
;;(modify-frame-parameters (selected-frame) '((inactive-alpha . 0.4)))</p>

<p>;;emacs-wiki
(require 'emacs-wiki)
;;(require 'emacs-wiki-menu)
(require 'emacs-wiki-table)</p>

<p>(setq emacs-wiki-publishing-directory "~/Sites/Wikiwiki")
(setq emacs-wiki-maintainer "mailto:wwzhang@gmail.com")
(setq emacs-wiki-directories '("~/emacs/WiKi"))
(setq emacs-wiki-meta-charset "gb2312")</p>

<p>(defun sacha-emacs-wiki-auto-publish ()
  (when (derived-mode-p 'emacs-wiki-mode)
    (unless emacs-wiki-publishing-p
      (let ((emacs-wiki-publishing-p t)
            (emacs-wiki-after-wiki-publish-hook nil))
  (emacs-wiki-publish-this-page)))))</p>

<p>(add-hook 'emacs-wiki-mode-hook
  (lambda () (add-hook 'after-save-hook 'sacha-emacs-wiki-auto-publish nil t)))</p>

<p>(setq emacs-wiki-style-sheet "<link rel=\"stylesheet\" type=\"text/css\" href=\"./core.css\">")
(setq emacs-wiki-meta-charset "UTF-8")
;;end</p>

<p>;;flyspell
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
(autoload 'flyspell-delay-command "flyspell" "Delay on command." t)
(autoload 'tex-mode-flyspell-verify "flyspell" "" t)
(add-hook 'LaTeX-mode-hook 'flyspell-mode) ;;LaTeX</p>

<p>;;todo-mode
(autoload 'todo-mode "todo-mode"
                    "Major mode for editing TODO lists." t)
(autoload 'todo-show "todo-mode"
                    "Show TODO items." t)
(autoload 'todo-insert-item "todo-mode"
                    "Add TODO item." t)
(setq todo-file-do "~/emacs/todo-do")
(setq todo-file-done "~/emacs/todo-done")
(setq todo-file-top "~/emacs/todo-top")</p>

<p>;;planner mode
(add-to-list 'load-path "~/elisp/planner")
(add-to-list 'load-path "~/elisp/remember")
(require 'planner)
(require 'remember)
(require 'planner-id)
(require 'planner-deadline)
(require 'planner-notes-index)
(require 'planner-diary)
(setq planner-carry-tasks-forward t)</p>

<p>;;  (global-set-key (kbd "<f9> p") 'planner-create-task-from-buffer)
(planner-option-customized 'planner-directory "~/emacs/plans")
  (setq planner-publishing-directory "~/Sites/Wikiwiki/plan" )
;;calendar
(planner-calendar-insinuate)
  ;;(setq planner-calendar-show-planner-files t)
(require 'remember-planner)
(setq remember-handler-functions '(remember-planner-append))
(setq remember-annotation-functions planner-annotation-functions)
;;publish calendar
;;(require 'planner-calendar)
;;(add-hook 'emacs-wiki-mode-hook
;;             (lambda ()
;;               (add-hook 'emacs-wiki-after-file-publish-hook
;;                         'planner-calendar-create-today-link nil t)))
;;end of publis calendar
;;publish iCal
;;(planner-ical-export-file
;; (planner-today)
;; (expand-file-name "tasks.ics"
;;                   planner-publishing-directory))
;;end</p>

<p>;;del.icio.us-planner
;;(add-to-list 'load-path "~/elisp/delicious-el/")
;;(setq delicious-api-user "mcwolf"
;;        delicious-api-password "D974082"
;;        delicious-api-from "wwzhang@gmail.com")
;;(require 'delicious)</p>

<p>;;planner-browser
(load "planner-browser")</p>

<p>;;Notes Mode
(load "notesmode.el")</p>

<p>;;frame
;;(setq one-buffer-one-frame nil)</p>

<p>;;shell with ansi color
(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)</p>

<p>;;default dir
(setq default-directory "~/emacs/")</p>

<p>;;tabbar mode
(require 'tabbar)
(tabbar-mode)
(global-set-key [M-S-left] 'tabbar-backward)
(global-set-key [M-S-right] 'tabbar-forward)
(global-set-key [M-S-up] 'tabbar-forward-group)
(global-set-key [M-S-down] 'tabbar-backward-group)
(setq tabbar-buffer-groups-function 'tabbar-buffer-ignore-groups)
(defun tabbar-buffer-ignore-groups (buffer)
;;Return only one group for each buffer."
  (with-current-buffer (get-buffer buffer)
    (cond
     ((or (get-buffer-process (current-buffer))
          (memq major-mode
                '(comint-mode compilation-mode)))
      '("Process")
      )
     ((member (buffer-name)
              '("<em>scratch</em>" "<em>Messages</em>"))
      '("Common")
      )
     ((eq major-mode 'dired-mode)
      '("Dired")
      )
     ((memq major-mode
            '(help-mode apropos-mode Info-mode Man-mode))
      '("Help")
      )
     ((memq major-mode
            '(rmail-mode
              rmail-edit-mode vm-summary-mode vm-mode mail-mode
              mh-letter-mode mh-show-mode mh-folder-mode
              gnus-summary-mode message-mode gnus-group-mode
              gnus-article-mode score-mode gnus-browse-killed-mode))
      '("Mail")
      )
     (t
      (list
       "default"  ;; no-grouping
       (if (and (stringp mode-name) (string-match "[^ ]" mode-name))
           mode-name
         (symbol-name major-mode)))
      )</p>

<pre><code> )))
</code></pre>

<p>;;end of conf
;;Chinese font
(require 'carbon-font)</p>

<p>;;(require 'color-theme)</p>

<p>;;
(setq calendar-latitude +31.2477)
(setq calendar-longitude +121.4726)
(setq calendar-location-name "Shanghai")</p>

<p>;;Dired
(require 'dired)
(require 'dired-x)
(setq dired-recursive-copies 'top)
(setq dired-recursive-deletes 'top)
(define-key dired-mode-map "o" 'wenzhang-dired-open-mac)
(defun wenzhang-dired-open-mac ()
    (interactive)
    (let ((file-name (dired-get-file-for-visit)))
      (if (file-exists-p file-name)
          (shell-command (concat"open " file-name nil )))))
;;end of Dired</p>

<p>;;
(show-paren-mode t)
(setq show-paren-style 'parentheses)</p>

<p>;;emms Music
(add-to-list 'load-path "~/elisp/emms/")
(require 'emms)
(require 'emms-default)
(emms-setup 'default "~/Music/music")
;;open planner to get reminded
(plan)
;;(planner-update-wiki-project)
;;(calendar)
;;(color-theme-billw)
</f9></link></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://zhangw.com/wp/my-emacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My XeLaTeX Template</title>
		<link>http://zhangw.com/wp/my-xelatex-template/</link>
		<comments>http://zhangw.com/wp/my-xelatex-template/#comments</comments>
		<pubDate>Mon, 25 Jul 2005 12:50:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.zhangw.com/wp/?page_id=300</guid>
		<description><![CDATA[\documentclass[a4paper,dvipdfm]{article} \usepackage{fontspec} \setromanfont{STSong} \XeTeXlinebreaklocale "zh" \XeTeXlinebreakskip = 0pt plus 1pt \usepackage[dvipdfm]{graphicx} \usepackage[usenames,dvipsnames]{color} \usepackage{xcolor} \usepackage{threeparttable} \usepackage[left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm]{geometry} \DeclareGraphicsExtensions{.eps,.ps,.eps.gz,.ps.gz,.eps.Z,.EPS,.pdf,.PDF} \usepackage{caption2} %\usepackage[rightcaption]{sidecap} \usepackage{colortbl} \arrayrulecolor{black} \usepackage{booktabs} \usepackage{multirow} \usepackage{textcomp} \usepackage{amsfonts} \usepackage[section]{placeins} \usepackage{fancyhdr} \pagestyle{fancy} \lhead{Happy \LaTeX{ing}} \chead{} \rhead{\bfseries } \lfoot{Wen Zhang} \cfoot{\textcolor[rgb]{0.50,0.00,0.50}{\bfseries \thepage}} \rfoot{Personal Use} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt} %\usepackage{CJK} \usepackage[dvipdfm,a4paper,CJKbookmarks,bookmarks=true,bookmarksopen=true]{hyperref} \hypersetup{ pdftitle={}, pdfauthor={Wen Zhang}, pdfkeywords={}, bookmarksnumbered, pagebackref=true, breaklinks=true, % pdfview=FitH, % Or try [...]]]></description>
			<content:encoded><![CDATA[<p><pre>
\documentclass[a4paper,dvipdfm]{article}
\usepackage{fontspec}
\setromanfont{STSong}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt
\usepackage[dvipdfm]{graphicx}
\usepackage[usenames,dvipsnames]{color}
\usepackage{xcolor}
\usepackage{threeparttable}
\usepackage[left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm]{geometry}
\DeclareGraphicsExtensions{.eps,.ps,.eps.gz,.ps.gz,.eps.Z,.EPS,.pdf,.PDF}
\usepackage{caption2}
%\usepackage[rightcaption]{sidecap}
\usepackage{colortbl}
\arrayrulecolor{black}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{textcomp}
\usepackage{amsfonts}
\usepackage[section]{placeins}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Happy \LaTeX{ing}}
\chead{}
\rhead{\bfseries }
\lfoot{Wen Zhang}
\cfoot{\textcolor[rgb]{0.50,0.00,0.50}{\bfseries \thepage}}
\rfoot{Personal Use}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
%\usepackage{CJK}
\usepackage[dvipdfm,a4paper,CJKbookmarks,bookmarks=true,bookmarksopen=true]{hyperref}
\hypersetup{
    pdftitle={},
    pdfauthor={Wen Zhang},
    pdfkeywords={},
    bookmarksnumbered,
    pagebackref=true,
    breaklinks=true,
%    pdfview=FitH,       % Or try pdfstartview={FitV}, This lead to uncorrect bookmarks
    urlcolor=cyan,
    colorlinks=true,
    citecolor=magenta,          %citeref's color
    linkcolor=magenta,
        }</p>

<p>\title{}
\author{}
\date{} % delete this line to display the current date</p>

<p>\begin{document}
%\begin{CJK*}{GB}{kai,song,hei,fs,li,you}</p>

<p>\newpage
\small
\bibliographystyle{elsart-num}
%\bibliographystyle{wen}
\bibliography{}
%\end{CJK*}
\end{document}
 </pre></p>
]]></content:encoded>
			<wfw:commentRss>http://zhangw.com/wp/my-xelatex-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XeTeX template</title>
		<link>http://zhangw.com/wp/xetex-template/</link>
		<comments>http://zhangw.com/wp/xetex-template/#comments</comments>
		<pubDate>Tue, 19 Jul 2005 15:55:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.zhangw.com/wp/?page_id=296</guid>
		<description><![CDATA[\documentclass{article} \usepackage{fontspec} \setromanfont{STSong} \XeTeXlinebreaklocale "zh" \XeTeXlinebreakskip = 0pt plus 1pt Link: 用Mac的好处：中文LaTeX用户的惊天喜讯]]></description>
			<content:encoded><![CDATA[<p><pre>
\documentclass{article}
\usepackage{fontspec}
\setromanfont{STSong}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt</pre></p>

<p>Link: <a href="http://www.newsmth.org/bbscon.php?board=Apple&#038;id=64087" class="liexternal">用Mac的好处：中文LaTeX用户的惊天喜讯</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zhangw.com/wp/xetex-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joi Ito seeded a TeX Live BitTorrent seed</title>
		<link>http://zhangw.com/wp/2005/06/joi-ito-seeded-a-tex-live-bittorrent-seed/</link>
		<comments>http://zhangw.com/wp/2005/06/joi-ito-seeded-a-tex-live-bittorrent-seed/#comments</comments>
		<pubDate>Sun, 05 Jun 2005 12:16:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.zhangw.com/wp/?p=263</guid>
		<description><![CDATA[For all of you who are facinated by LaTeX as I am, this is good news. The down side, he is seeding the CD file, not the DVD one.]]></description>
			<content:encoded><![CDATA[<p>For all of you who are facinated by <a href="http://tug.org/" class="liexternal">LaTeX</a> as I am, this is good news. The down side, he is seeding the CD file, not the DVD one.</p>
]]></content:encoded>
			<wfw:commentRss>http://zhangw.com/wp/2005/06/joi-ito-seeded-a-tex-live-bittorrent-seed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run LaTeX for TeXLive or MikTeX 2.4 CD</title>
		<link>http://zhangw.com/wp/2004/11/run-latex-for-texlive-or-miktex-24-cd/</link>
		<comments>http://zhangw.com/wp/2004/11/run-latex-for-texlive-or-miktex-24-cd/#comments</comments>
		<pubDate>Thu, 18 Nov 2004 01:32:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.zhangw.com/wp/?p=131</guid>
		<description><![CDATA[Since I don&#8217;t want to leave large disk space for CTeX to enjoy LaTeXing in Windows, I just downloaded TeXLive and MikTeX 2.4 for test. But I found using CJK package to processing Chinese can&#8217;t produce Chinese at all, so I digged into texmf directories of both and found the gbsn font map. And this [...]]]></description>
			<content:encoded><![CDATA[<p>Since I don&#8217;t want to leave large disk space for <a href="http://www.ctex.org" class="liexternal">CTeX</a> to enjoy LaTeXing in Windows, I just downloaded TeXLive and MikTeX 2.4 for test. But I found using CJK package to processing Chinese can&#8217;t produce Chinese at all, so I digged into texmf directories of both and found the gbsn font map. And this is the solution, use \begin{CJK}{GB}{gbsn}</p>
]]></content:encoded>
			<wfw:commentRss>http://zhangw.com/wp/2004/11/run-latex-for-texlive-or-miktex-24-cd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ease your config of Chinese Fonts using texmf-zh on Linux</title>
		<link>http://zhangw.com/wp/2004/10/ease-your-config-of-chinese-fonts-using-texmf-zh-on-linux/</link>
		<comments>http://zhangw.com/wp/2004/10/ease-your-config-of-chinese-fonts-using-texmf-zh-on-linux/#comments</comments>
		<pubDate>Thu, 14 Oct 2004 18:38:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.zhangw.com/wp/?p=121</guid>
		<description><![CDATA[软件包：texmf-zhNew: 是状态: 已安装Automatically installed: no版本号：0.1-6优先级：可选部分：tex维护者：Zhan Jian 未压缩尺寸：106k依赖于: gbkfonts, tetex-bin建议: cjk-latex描述：TEXMF for CJK-LaTeX including Chinese fonts installer. install-gbkfonts: convert TrueType fonts in GBK encoding into Type1 format and generate config files. update-gbkfonts: update fonts cache and regenerate config files. remove-gbkfonts: remove installed fonts for texmf-zh. All Chinese fonts and config files will be installed into /usr/share/texmf-zh]]></description>
			<content:encoded><![CDATA[<p>软件包：texmf-zh<br />New: 是<br />状态: 已安装<br />Automatically installed: no<br />版本号：0.1-6<br />优先级：可选<br />部分：tex<br />维护者：Zhan Jian <zhanjian @ustc.edu><br />未压缩尺寸：106k<br />依赖于: gbkfonts, tetex-bin<br />建议: cjk-latex<br />描述：TEXMF for CJK-LaTeX including Chinese fonts installer.<br /> install-gbkfonts: convert TrueType fonts in GBK encoding into Type1 <br />                  format and generate config files.<br /> update-gbkfonts:  update fonts cache and regenerate config files.<br /> remove-gbkfonts:  remove installed fonts for texmf-zh. <br /> <br /> All Chinese fonts and config files will be installed into /usr/share/texmf-zh</zhanjian></p>
]]></content:encoded>
			<wfw:commentRss>http://zhangw.com/wp/2004/10/ease-your-config-of-chinese-fonts-using-texmf-zh-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rant on Comp.text.tex</title>
		<link>http://zhangw.com/wp/2004/09/rant-on-comptexttex/</link>
		<comments>http://zhangw.com/wp/2004/09/rant-on-comptexttex/#comments</comments>
		<pubDate>Thu, 16 Sep 2004 03:32:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://www.zhangw.com/wp/?p=90</guid>
		<description><![CDATA[Peter Flynn on comp.text.tex\begin{rant}Spaces in filenames and directory names are evil. They make your teethfall out, give you spots, cause global warming, nuclear war, etc.\end{rant}///PeterHave fun on LaTeX]]></description>
			<content:encoded><![CDATA[<p><a href="http://groups-beta.google.com/group/comp.text.tex/msg/fa479aa9aaa077d0" class="liexternal">Peter Flynn</a> on <a href="http://groups-beta.google.com/group/comp.text.tex" class="liexternal">comp.text.tex</a><br /><br />\begin{rant}<br />Spaces in filenames and directory names are evil. They make your teeth<br />fall out, give you spots, cause global warming, nuclear war, etc.<br />\end{rant}<br /><br />///Peter<br /><br />Have fun on <a href="http://www.latex-project.org/" class="liexternal">LaTeX</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zhangw.com/wp/2004/09/rant-on-comptexttex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Threeparttable package in LaTeX</title>
		<link>http://zhangw.com/wp/2004/07/using-threeparttable-package-in-latex/</link>
		<comments>http://zhangw.com/wp/2004/07/using-threeparttable-package-in-latex/#comments</comments>
		<pubDate>Tue, 13 Jul 2004 13:40:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://www.zhangw.com/wp/?p=57</guid>
		<description><![CDATA[Using this package in LaTeX the creation of tables in LaTeX will not bother you more about the width of the text.A minimal example is offered below:&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;\begin{threeparttable}\caption{} \label{put_a_lable_here}\begin{tabular}Table contents hereyou can add tnote{put_a_sign_here} for some thing\end{tabular}\begin{tablenotes}\item[]\item[put_a_sign_here]\end{tablenotes}\end{threeparttable}&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;So it is easy to do. Isn&#8217;t it?]]></description>
			<content:encoded><![CDATA[<p>Using this package in LaTeX the creation of tables in LaTeX will not bother you more about the width of the text.<br /><br />A minimal example is offered below:<br /><br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />\begin{threeparttable}<br />\caption{} \label{put_a_lable_here}<br />\begin{tabular}<br />Table contents here<br />you can add tnote{put_a_sign_here} for some thing<br />\end{tabular}<br />\begin{tablenotes}<br />\item[]<br />\item[put_a_sign_here]<br />\end{tablenotes}<br />\end{threeparttable}<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br /><br />So it is easy to do. Isn&#8217;t it?</p>
]]></content:encoded>
			<wfw:commentRss>http://zhangw.com/wp/2004/07/using-threeparttable-package-in-latex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: www.zhangw.com @ 2012-02-09 08:07:03 -->
