2
votes
0answers
49 views

Is it possible to check if I am inside a float environment? [duplicate]

I have a class file that I am writing (it's my first one and I am new to LaTeX). I have a situation where I'd like to know if I am inside a float so that I can prevent attempting to create a nested ...
2
votes
1answer
77 views

Section outside multicols environment if section contains a table

I am using \begin{multicols*}{2} to split my text in two columns on the landscape format paper. Now if I have a tabular, it resizes the tabular to \linewidth. What I want is to ask if there is a ...
12
votes
2answers
256 views

Can I detect whether LaTeX is in vertical mode?

I am writing a command that creates a margin paragraph. This requires that this command is only used in vertical mode, which is fine. If the command is used in a float, LaTeX gives a "not in outer par ...
15
votes
2answers
220 views

Is there a way to determine if there is a float on a page?

I am busy developing some code to draw layouts. Part of the code overlays the layout as shown in the images below: The black arrows to the side of the images, denote the \topfraction and ...
13
votes
1answer
213 views

Formatting floats differently based on placement

I'm interested in changing how floats are formatted depending on whether they are placed at the top, bottom, or middle of a page, or on a float page. One package I am aware of that does something like ...
12
votes
2answers
194 views

\if@minipage purpose in floats

In floating environments such as the captions of figures, LaTeX has a \global\@minipagefalse, why is this necessary and what does this switch do? \long\def\@makecaption#1#2{% ...
11
votes
1answer
426 views

biblatex: How to suppress back references for certain citations?

When using BibTeX's standard citation commands, such as \cite, typically back references are generated (if enabled) in the bibliography pointing back to the place of citation. That's a nice feature. ...
6
votes
3answers
191 views

How to conditionally control the width of a figure with minimal code duplication?

I am using \iftoggle to switch between a for-review (doublespaced, onecolumn) and photo-ready (singlespaced, twocolumn) layout. I want to change the width of figures to be optimal for both, depending ...
18
votes
2answers
339 views

How can I detect if I'm inside or outside of a float environment?

I am trying to detect whether I am inside or outside a float. I know the way how caption works. It uses the internal \@captype. But in the example below you see that this test failed by using ...