Tagged Questions
8
votes
1answer
43 views
How to make a conditional reference to a text label
I would like to make a conditional reference to an optional label in my latex document, see the Minimum Working Example below. Hence, IF the label exists somewhere in the document, THEN a reference ...
6
votes
1answer
54 views
Decide whether a label occurs in the current chapter
I want to decide if some label occurs in the same chapter as the current one. I use the zref package as suggested in Chapter ref with LaTeX to find out in which chapter a label occurs, and compare ...
6
votes
1answer
85 views
How can I test if a label has been marked?
I have a long document which includes several files. In some cases I may want to include those files in different orders. In some cases, I may want to adapt the text depending on whether a specific ...
4
votes
2answers
89 views
How to test if a given reference belongs to a list of labels?
This question is a prolongation of my previous question How to choose from a list for using result in \ref?. I got really good and interesting answers. Unfortunately I can not implement them for my ...
2
votes
2answers
95 views
Reference Page of Float Object only if Page isn't actual page
Is it possible to tell LaTeX only use \pageref if the referenced object isn't on actual page?
if \pageref{fig:hello_world} != self.page then
\pageref{fig:hello_world}
end
5
votes
1answer
84 views
How can I conditionally include the page number in a cross-reference (when the object referenced is on a different page)?
When a cross-reference to a figure is not on the same page as the figure, I would like to include the page number in the figure. But when they are on the same page, this is redundant--and I want to ...
3
votes
3answers
237 views
Show “Page X of Y” only if there are multiple pages?
I'm trying to add a line in the header to be "Page X of Y", but only if there are multiple pages. My main problem is how to format the if statement. So far I have
\ifx \pageref{LastPage} 1
...
5
votes
2answers
770 views
Figure numbering without the figure
It is quite common for academic journals to require article submissions to not include the figures, which are submitted separately. Then the journal staff position the figures in the text manually. ...
6
votes
1answer
173 views
Asserting reference inequality
Is there a way for including assertions in a LaTeX document? I want to check that some condition is true, and only allow compilation of the document if it is (or at least complain otherwise).
...