我在用着ipython-notebook将我的代码转换为tex
文件,然后再转换为文件pdf
,从生成的文件转换tex
为pdf
(我发布了一个问题这里). 生成的整个tex文件是这里。
然后我尝试找到一些其他工具来转换tex
,并在我的路径下pdf
找到(我在 windows7 上),然后我尝试了一下,再次出现错误:pdftex
cygwin\bin
D:\Documents\Desktop> pdftex CSMATH-hw1.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Cygwin)
restricted \write18 enabled.
entering extended mode
(./CSMATH-hw1.tex
! Undefined control sequence.
l.10 \documentclass
[letterpaper,10pt,english]{d:/Anaconda/lib/site-packa...
?
! Undefined control sequence.
l.13 \usepackage
[utf8]{inputenc}
我搜索了 tex.sx 并找到了这个邮政提到了pdfTeX
和pdfLaTeX
,但我在我的计算机上找不到pdfLaTex.exe
。提前谢谢 ;)
编辑:
我在我的机器上找到文件D:\cygwin\bin\pdflatex
,发现该文件中只有一行:
!<symlink>pdftex.exe
然后我尝试cygwin 终端, 像这样:
zhangxaochen@zhangxaochen-PC /cygdrive/d/Documents/Desktop
$ pdflatex CSMATH-hw1.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Cygwin)
restricted \write18 enabled.
entering extended mode
(./CSMATH-hw1.tex
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 78 languages loaded.
! LaTeX Error: File `d:/Anaconda/lib/site-packages/sphinx/texinputs/sphinxhowto
.cls' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)
Enter file name:
文件"d:/Anaconda/lib/site-packages/sphinx/texinputs/sphinxhowto.cls"
确实存在在我的 PC 上,为什么会出现这样的错误?是因为无法识别 Windows 样式的路径吗?
编辑2:
确实cygwin
需要 *nix 样式路径,我编辑了如下路径:
d:/Anaconda/lib/site-packages/sphinx/texinputs/sphinxhowto
到:
/cygdrive/d/Anaconda/lib/site-packages/sphinx/texinputs/sphinxhowto
现在我可以从 cygwin 终端生成一个 pdf 文件,尽管无法正确显示中文字符:
! Package ucs Error: Unknown Unicode character 19968 = U+4E00,
(ucs) possibly declared in uni-78.def.
(ucs) Type H to see if it is available with options.
See the ucs package documentation for explanation.
Type H <return> for immediate help.
...
l.300 ...e, 浠ュ強鐢熸垚鐨勫甫鍣0鐐逛釜鏁▒ n, }
? h
Unicode character 19968 = U+4E00:
Contained in range 'CJK Ideograph'
Character available with following options:
cjkbg5, cjkgb, cjkjis.
Enter I!<RET> to define the glyph.
? I!<ret>
Please enter definition for unicode character 19968
\definition=