# “Undefined control sequence” on auto-generated tex files [closed]

I'm using ipython-notebook to convert my code to tex file and then to a pdf file, and an issue occurred when converting from the generated tex file to pdf (I've posted an issue here). The whole generated tex file is here.

Then I tried to find some other tools to convert tex to pdf, and I found pdftex under my cygwin\bin path (I'm on windows7), then I tried it, and again got errors:

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}


I've searched the tex.sx and find this post referred to pdfTeX and pdfLaTeX, but I don't find a pdfLaTex.exe on my machine. Thx in advance ;)

## EDIT:

I found file D:\cygwin\bin\pdflatex on my machine, and find there is only one line in that file:

!<symlink>pdftex.exe


Then I try it in the cygwin terminal, like this:

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

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)

Enter file name:


The file "d:/Anaconda/lib/site-packages/sphinx/texinputs/sphinxhowto.cls" does exist in my pc, so why I get such an error? Is it because of the Windows style path being not recognized?

## EDIT2:

Indeed cygwin needs the *nix style path, I edited the path like:

d:/Anaconda/lib/site-packages/sphinx/texinputs/sphinxhowto


to:

/cygdrive/d/Anaconda/lib/site-packages/sphinx/texinputs/sphinxhowto


and now I can generate an pdf file from cygwin terminal, despite the Chinese characters could not be shown correctly:

! 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, 浠ュ強鐢熸垚鐨勫甫鍣０鐐逛釜鏁▒ 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=

-

## closed as unclear what you're asking by Martin Schröder, Benedikt Bauer, Andrew Swann, Jubobs, Sean AllredApr 3 '14 at 13:18

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

You should really use pdflatex. What TeX distribution do you have? How did you install it? It should be in the same place as pdftex... – mbork Apr 2 '14 at 5:00
@zhangxaochen I can compile your file with pdflatex even though figures can't be shown, and I am on Mac so I don't have the right font but I am sure you be fine with pdflatex. – Aung Apr 2 '14 at 5:22
@mbork pdflatex is simply a !<symlink>pdftex.exe` in cygwin, see my edit plz – zhangxaochen Apr 2 '14 at 7:30
try specifing path using \\ ? – alexises Apr 2 '14 at 7:41
@zhangxaochen although pdflatex is a link to pdftex it matters which you use as the underlyng executable acts differently depending on the name by which it was called. Presumably the class is not in TeX's search path try export TEXINPUTS=/cygdrive/d/Anaconda/lib/site-packages/sphinx/texinputs: ; pdflatex CSMATH-hw1 – David Carlisle Apr 2 '14 at 8:37