I'm trying to convert latex to pdf of CherryPy docs for offline usage. After I generated the latex I changed into build/latex directory and run "make all-pdf" and error happened. Sorry I don't know to fix this.
I attached the error log here http://errorpaste.appspot.com/logs/1001/sphinx-convert-latex-to-pdf-error
[Tex/LaTex] Sphinx error in converting latex to pdf
documentationerrorspython
Related Solutions
The problem was due to one of citations, in which I've used "Text before" parameter and inserted a n-dash in it. LyX put it in the code as \citet[pp. 5–10]{author2000title}
and that prevented LyX even from launching verification procedure, i.e., it couldn't report that was the mistake.
Sorry for bothering you.
You have to use \setlength
after the \par
. The following LaTeX code seems to produce the correct output:
\documentclass{article}%
\usepackage[T1]{fontenc}%
\usepackage[utf8]{inputenc}%
\usepackage{lmodern}%
\usepackage{textcomp}%
\usepackage{lastpage}%
\usepackage[head=1pt,margin=0.3in,bottom=0.3in,includeheadfoot=False]{geometry}%
\usepackage{graphicx}%
\usepackage{hyperref}%
%
\usepackage{helvet}%
\usepackage[utf8]{inputenc}%
\usepackage{needspace}%
\newlength{\measurepage}%
%
\begin{document}%
\normalsize%
\begin{figure}[h!]%
\centering%
\includegraphics[width=\linewidth]{example-image-duck}%
\end{figure}
%
\noindent%
\rule{\linewidth}{1pt}%
\linebreak%
Welcome to our MOOC our Massively Online Open Course on Basic Steps in Magnetic Resonance. That is the subject of chapter 4 of Peter Hore's book. The author has chosen an example of chemical exchange for the title page of his book so it is safe to assume that he found this subject particularly interesting. Like many other basic aspects of magnetic resonance the effects of chemical exchange were discovered in the 1950s. The name of Herbert Gutowsky is often associated with this discovery. The theory was developed by Felix Bloch and Harden McConnell. As we shall see chemical reactions that occur during the observation of NMR spectra lead to characteristic effects: line broadening coalescence and line narrowing all of which allow us to determine the rates of reactions. Typically one can study rates that are comparable with differences in chemical shifts. The range of applications is truly staggering. From simple conformational equilibria to internal mobility of biomolecules such as proteins.%
\newline%
\noindent%
\rule{\textwidth}{1pt}%
\newline%
Notes: %
\newline%
\par%
\setlength{\measurepage}{\dimexpr\pagegoal-\pagetotal-\baselineskip}%
\begin{Form}
\noindent
\TextField[name=multilinetextbox,multiline=true,width=\linewidth,height=\measurepage]{}
\end{Form}%
\newpage%
\begin{figure}[h!]%
\centering%
\includegraphics[width=\linewidth]{example-image-duck}%
\end{figure}
%
\noindent%
\rule{\linewidth}{1pt}%
\linebreak%
So the word âchemical exchangeâ has a particular meaning for NMR spectroscopists which is not shared by the entire community of chemists. To explain this point let's consider some simple examples. All of us in first year chemistry must have learned that cyclohexane normally looks like this if it is drawn as a static molecule and that we have protons or generally speaking substituents sticking out from the ring in axial positions and other ones that are in equatorial positions. Now we also know that these can interchange to give another conformation which again has axial and equatorial positions. Now what is curious is that in the static molecule if we could stop it from exchanging we would expect a different chemical shift for the axial position and the equatorial position. One would expect them to have different chemical shifts. Let's not talk about the fact that they are also coupled which is not of interest here. Now it turns out that the chemical shift of the axial proton will be transformed into the chemical shift of an equatorial proton. Whereas the equatorial proton will find itself in the position of an axial proton. Consequently there is an interchange between their chemical shifts. It turns out that this process is extremely fast and therefore difficult to measure with NMR unless we find some way of slowing it down which is actually still a topic of interest. I can take another example of a true chemical reaction. Let's consider some carboxylic acid which looks like this in the acid form. And we have all learned that this can be transformed into the conjugate base by giving a proton to the environment. Now if we think of this carbon{-}13 we can expect its chemical shift to be different from the chemical shift in the conjugate base. And indeed it is. Again such a process tends to be very fast and therefore not easy to measure by NMR. But it turns out that such processes can be slowed down considerably. For example if this carboxylic acid is hidden in the heart of a protein if it belongs to the side{-}chain of a protein to one of the amino{-}acids in the protein the exchange can be slowed down and can become measurable which is of great interest to NMR spectroscopy.%
\newline%
\noindent%
\rule{\textwidth}{1pt}%
\newline%
Notes: %
\newline%
\par%
\setlength{\measurepage}{\dimexpr\pagegoal-\pagetotal-\baselineskip}%
\begin{Form}
\noindent
\TextField[name=multilinetextbox,multiline=true,width=\linewidth,height=\measurepage]{}
\end{Form}%
\newpage%
\end{document}
The only changes I made was replacing the image file I don't have and changing the order of \par
and \setlength{\measurepage}
.
If you want to include this snippet multiple times, it might be a good idea to define a command such like:
\newcommand*\MeasurePage{\par\setlength{\measurepage}{\dimexpr\pagegoal-\pagetotal-\baselineskip}}
And then use that one instead of the same code all over again.
Best Answer
The line
! LaTeX Error: File 'fancybox.sty' not found.
indicates that you are missing the fancybox LaTeX package. If you are using the Debian/Ubuntu TeXLive package this (and other missing packages) can be installed as follows: