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

Confusion about draft mode when using \includestandalone #10

Open
m-haug opened this issue Oct 31, 2023 · 1 comment
Open

Confusion about draft mode when using \includestandalone #10

m-haug opened this issue Oct 31, 2023 · 1 comment
Assignees

Comments

@m-haug
Copy link

m-haug commented Oct 31, 2023

I have a basic standalone figure like this:

\documentclass[10pt, tikz]{standalone}

\begin{document}
  \begin{tikzpicture}
    \node[draw, rectangle] {Test};
  \end{tikzpicture}
\end{document}

When I include this into my main document using \includestandalone, I get differing results depending on whether draft mode is active or not:

No draft mode:

\documentclass[10pt, a4paper]{article}

\usepackage{standalone}
\usepackage{tikz}
\usepackage{ifdraft}

\begin{document}
	\ifdraft{DRAFT}{FINAL}
	
	\includestandalone{figure}
\end{document}

grafik

Draft mode:

\documentclass[10pt, a4paper, draft]{article}

\usepackage{standalone}
\usepackage{tikz}
\usepackage{ifdraft}

\begin{document}
	\ifdraft{DRAFT}{FINAL}
	
	\includestandalone{figure}
\end{document}

grafik

So far, this is expected behaviour. But if I deactivate draft mode by using draft = false, \includestandalone seems to think that draft mode is still in effect:

\documentclass[10pt, a4paper, draft = false]{article}

\usepackage{standalone}
\usepackage{tikz}
\usepackage{ifdraft}

\begin{document}
	\ifdraft{DRAFT}{FINAL}
	
	\includestandalone{figure}
\end{document}

grafik

Is this the expected behaviour? I would expect that setting draft = false is equivalent to not specifying draft at all. Alternatively, the standalone package could also provide draft and final package options to change the behaviour of \includestandalone independently of the class option.

@MartinScharrer
Copy link
Owner

Hi, traditionally the opposite of draft is final. A value like false or true are originally not used. standalone is implemented with this in mind, ignoring a value part if given.

However, I can change the implementation accordantly.

@MartinScharrer MartinScharrer self-assigned this Nov 11, 2023
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