I am using org-mode. when I try to compile a org file into a pdf with minted package enabled, I get a error. for instance,
\documentclass{memoir}
\counterwithout{section}{chapter}
\usepackage{kotex}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{minted}
\author{My name}
\begin{document}
...
\end{document}
then I got an error as follows
! Emergency stop.
<read 3>
l.24 \author
{My name}^^M
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on .//memo.log.
It looks like the statement next to the \usepackage{minted} statement gets the error like the above example.
FYI, if I compile the org file with pdflatex command directly, I get a pdf file without any problem. If I try to compile it in org-mode (Export to LaTeX As PDF file), I got the error.
Thanks in advance.
Related
I'm facing a quite weird failure after I successfully compiled a .chm file with HTML Help Workshop's hhc.exe.
I created a documentation of my source code with Doxygen. Doxygen creates if you enable GENERATE_HTMLHELP in the doxygen file:
If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
additional HTML index files: index.hhp, index.hhc, and index.hhk. The index.hhp
is a project file that can be read by Microsoft's HTML Help Workshop (see:
http://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows.
After Doxygen creates those files, I want to create the .chm file with HTML Help Workshop. For that reason I call hhc.exe in a CMD. After that I can open the .chm file and everything seems fine. But if I ask the CMD for the current errorlevel, it outputs:
"C:\Program Files (x86)\HTML Help Workshop\hhc.exe" index.hhp
Microsoft HTML Help Compiler 4.74.8702
Compiling C:\... folder path ...\index.chm
Compile time: 0 minutes, 0 seconds
37 Topics
346 Local links
12 Internet links
0 Graphics
Created C:\... folder path ...\index.chm, 88,740 bytes
Compression decreased file by 194,682 bytes.
echo %errorlevel%
1
Does anyone have an idea of what the h... is going wrong here and how I can avoid that problem that it's compiled successfully but still returns an error? How can I figure out what's the problem instead of an error "1"?
The problem is that my build server (TFS2015) returns the error and the build is failed.
HTML Help Workshop is installed with 2 main executables:
hhc.exe is the console version of the HTML Help Compiler.
hhw.exe is the Windows GUI version of HTML Help Compiler.
But the compilation of the HTML Help Project (hhp) to Compiled HTML (chm) is not directly done by those two executables.
Both use for compilation hha.dll - the HTML Help Author library - by calling the exported function HHA_CompileHHP.
The exported functions of this library are:
EditHhCtrlObject
EditHhCtrlScript
FreeFilterDIB
HHA_CompileHHP
LoadFilterImage
LoadJpeg
Microsoft has not published any documentation nor the function declarations of those functions as far as I know.
I suppose from some quick tests with hhc.exe that the function HHA_CompileHHP has BOOL as return type which is int and returns on success TRUE, i.e. the value 1, and on failure FALSE, i.e. the value 0. And it looks like hhc.exe uses this return value without inverting the value as exit/return code.
Therefore the errorlevel is 1 on success and 0 on failure.
The tests I made to verify my assumption:
Run HTML Help compiler with name of a project file which does not exist:
hhc.exe index_1.hhp
Unable to open index_1.hhp.
The exit code respectively errorlevel is 0. This error message is printed by hhc.exe because the error message can be found in hhc.exe.
Set read-only file attribute on already existing output file index.chm and run HTML Help compiler:
attrib +r index.chm & hhc.exe index.hhp & attrib -r index.chm
HHC5010: Error: Cannot open "C:... folder path ...\index.chm". Compilation stopped.
The exit code respectively errorlevel is 0. This error message is printed by hha.dll because this error message can be found only in hha.dll.
Rename a *.htm file explicitly specified in index.hhp and run HTML Help Compiler:
ren "file.htm" "renamed file.htm" & hhc.exe index.hhp & ren "renamed file.htm" "file.htm"
Microsoft HTML Help Compiler 4.74.8702
Compiling C:... folder path ...\index.chm
HHC5003: Error: Compilation failed while compiling file.htm.
The following files were not compiled:
file.htm
The exit code respectively errorlevel is 0. This error message is printed also by hha.dll because this error message can be found also only in hha.dll.
All error messages are written to handle STDOUT and not to STDERR as typical for console applications. There was never another value than 0 or 1 assigned to errorlevel which is the reason why I suppose the function HHA_CompileHHP returns a simple boolean value.
Conclusion:
The opposite as usual must be done to evaluate on success/failure of an HTML Help compilation for example by using in the batch file:
"%ProgramFiles(x86)%\HTML Help Workshop\hhc.exe" index.hhp
if not errorlevel 1 exit /B 1
In HTML Help Project file (*.hhp file) in section [OPTIONS] a log file can be specified with Error log file=... into which all messages output by HHA_CompileHHP are written additionally to printing them to STDOUT.
But in this case with Doxygen generating the *.hhp file it would be easier to redirect STDOUT in the batch file to a log file although this is also not really needed because most likely the Team Foundation Server is capturing the messages already to a log. (I don't have Team Foundation Server installed.)
HTML Workshop is a GUI program. When using CMD interactively it does not wait for GUI programs to exit. Therefore there is no error code.
Echo %errorlevel% interactively will never show an error code as well.
This two ways will
Dir && Echo Success || Echo Failure
Dir df:\ & Echo %errorlevel%
[See my answer at Trouble with renaming folders and sub folders using Batch to see what it means]
You will have to read HTML Workshop's documentation to see if it sets an errorlevel. Most GUI programs don't bother.
sorry for my english in my post (it is my first on this forum, and my question is perhaps stupid).
I encounter a problem in converting a html file to pdf file with pandoc.
Here is my code in the console
set Path=%Path%;C:\Users\nicolas\AppData\Local\Pandoc
(redirecting to Pandoc directory)
followed by
pandoc --data-dir=C:\Users\nicolas\Desktop essai.html -o essai.pdf
As indicated, my file is in the Desktop, but I got the following error:
pandoc: essai.html: openFile: does not exist (No such file or directory)
I get the same error if i do (with the file essai.html in the same folder as pandoc.exe):
pandoc essai.html -o essai.pdf
Have you any idea of the cause of my problem? (I precise that the file's name i want to convert is correct).
Remark: My original problem was to create a pdf faithful to the beautiful html file generated by Ipython Notebook via pandoc but I encounter the same kind of problem when i want to convert a .ipynb file in pdf with nbconvert.
I finally solve my problem by adding the full paths to my files (But I have used wkhtmltopdf which is simpler to use for a good result.)
I use Lablgtk and all functions except the function "GdkPixbuf.from_file" work well.
I can compile the code including the function "GdkPixbuf.from_file", but I can't execute it.
When I type the command "./programname" to execute it, I get an error:
Fatal error: exception GdkPixbuf.GdkPixbufError(3, "Couldn't recognize the image file
format for file 'filename.jpg'")
The code which doesn't include the function "GdkPixbuf.from_file" can be executed.
What should I do to make the function "GdkPixbuf.from_file" work well?
It looks like that your GdkPixbuf doesn't support jpg files. You can either convert your image file to another format, like:
convert filename.jpg filename.png
Or you can try to install supporting modules. Some more information can be found here
I'm trying to automate the generation of PDF reports from data in MATLAB.
The reports are created by generating a LaTeX file and calling the LaTeX compiler from MATLAB.
This works like it should on Windows, however on MacOSX I get some strange behaviour.
First, the LaTeX compiler is called:
unix('/usr/texbin/latex -src -interaction=nonstopmode report.tex')
This works like it should, however the dvipdfm command fails:
unix('/usr/texbin/dvipdfm report.dvi')
[1
** WARNING ** Filtering file via command -->rungs -q -dNOPAUSE -dBATCH -dEPSCrop - sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dAutoFilterGrayImages=false - dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='/var/folders/jh/w14pjs0x0njfkdjlmct1rzkr0000gn/T//dvipdfmx.e9988917ae707f285b5230bc0fe87563' './TopView.eps' -c quit<-- failed.
** WARNING ** Image format conversion for "./TopView.eps" failed...
** ERROR ** pdf_ref_obj(): passed invalid object.
Output file removed.
This clearly fails at the first EPS image it encounters
When running in a regular Terminal, the command works as expected:
$ /usr/texbin/dvipdfm report.dvi
report.dvi -> report.pdf
[1][2][3][4][5][6][7][8][9][10]
1803812 bytes written
Does anyone know what MATLAB peculiarity causes this error?
I've tried using the suggestions in this thread to no avail: How to use copyfile when there are spaces in the directory name?. To be clear, the directory I'm using is already in double-quotes, and I've tried escaping the spaces, but still get the same error. This is the error message I get:
Error: Failed to open PDF file:
C:/Documents
Error: Failed to open PDF file:
and
Error: Failed to open PDF file:
Settings/cpengelly/My
Error: Failed to open PDF file:
Documents/Dropbox/theproject/tmp/working/main
Error: Failed to open PDF file:
pdf.pdf
Errors encountered. No output created.
Done. Input errors, so no output created.
What is going on here?
you just need to put your directory name in double quotes. example -
FileUtils.cp("C:\\Program Files\\FileZilla\\dbghelp.dll","c:\\temp")