Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add \ifpsfragfig conditional #27

Open
wspr opened this issue Feb 18, 2016 · 3 comments
Open

Add \ifpsfragfig conditional #27

wspr opened this issue Feb 18, 2016 · 3 comments

Comments

@wspr
Copy link
Owner

wspr commented Feb 18, 2016

While you can use \ifpdf to check what mode you're in, this isn't very self-documenting and might cause problems with code portability. For convenience it would be good to add a specific conditional for preamble code, etc., when psfragfig is processing an external figure.

@wspr
Copy link
Owner Author

wspr commented Feb 18, 2016

Thanks @yo' on tex.sx

@wspr
Copy link
Owner Author

wspr commented Feb 18, 2016

Yo comments additionally: "Actually… not 100% helpful; with \ifpdf or \pdfoutput, I could do the check for the documentclass as well, which is impossible with \ifpsfragfig since it won't be defined before \usepackage{pstool} in the main document"

@tohecz
Copy link

tohecz commented Feb 18, 2016

Hello it's yo' here :) Thanks for considering this! As I said, there's a problem with \ifpsfragfig being defined everywhere, but as long as you can load pstool before \documentclass, all should be fine. Like this:

\RequirePackage{pstool}
\ifpsfragfig
  \documentclass[standalone]{myclass}
\else
  \documentclass{myclass}
\fi
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants