Open mkatliar opened 5 years ago
Commenting out this line makes the issue disappear. I cannot understand however, how a line of an else-branch which doesn't get executed can affect the result. With the following code
\ifpdf
\typeout{Using pdf: yes}
% Load the crop package
\ifadsphd@epub\else
\RequirePackage[center,pdftex]{crop}
\fi
\RequirePackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.pdf, .jpg, .tif, .png}
% Use utf-8 encoding for foreign characters
\ifPDFTeX
\RequirePackage[utf8]{inputenc}
\fi
\else
\typeout{Using pdf: no}
% Load the crop package
% Commenting out the following line fixes the issue.
% However I cannot understand, how a line in an if-branch which is not executed can affect the compilation result.
% \RequirePackage[center,dvips]{crop} % Option [a3] already passed
\RequirePackage[dvips]{graphicx}
\DeclareGraphicsExtensions{.eps, .ps}
\fi
the result changes depending on whether the \RequirePackage[center,dvips]{crop}
line is commented or not. However, "Using pdf: yes" is printed and "Using pdf: no" is never printed.
Command line:
pdflatex -shell-escape -file-line-error test-pstool | grep "Using pdf"
The
adsphd
document class andpstool
package are incompatible with each other. Example:test-pstool.zip
The pstool documentation says:
Compile the example above with the following command
This results in the following .pdf output: result-adsphs.pdf
Instead of a figure, a box with the following text in red appears:![image](https://user-images.githubusercontent.com/8616371/58349781-7e29aa80-7e64-11e9-9de6-ceb7f042d394.png)
Here is the .log file: test-pstool-fig-pstool.log. I don't see any errors in it.
If the document class is changed to
result-article.pdf
article
, a correct output is produced:Compiling without the
result-adsphd-no-shell-escape.pdf
-shell-escape
option produces an output with incorrect text labels:NOTE: To consistently reproduce the results above, clean intermediate files after each build!