Graphics, Figures & TablesHow to ignore the caption positionning information?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ThomasDobrenel
Posts: 2
Joined: Tue Apr 21, 2020 1:53 pm

How to ignore the caption positionning information?

Post by ThomasDobrenel »

Hello

I have to create two documents with the same content but different formats.
I was thinking to create two master documents with different headers and then use \input{} to call the content. But I am struggling with the caption positioning.
In the first file, I need the figures to be incorporated in the text with the legend on the side and have the appendices at the end. And for the other one, I need to have all the figures together at the end of the document with the legends underneath followed by the appendices.
I was thinking to make the input file with the positioning information of the 1st document and try to find a way in the header of the 2nd document to say to ignore the positioning information.
Is it something possible? How?
And how can I specify that I should have the figures not completely at the end of the document but before the appendices?

Let me know if you need further information.

Thanks in advance for your help.

Tom

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

How to ignore the caption positionning information?

Post by Ijon Tichy »

Define your own command to include the figures. A simple one would be

Code: Select all

\newcommand*{\IncludeImage}[3]{%
  \begin{figure}
  \includegrahics[#1]{#2}
  \caption{#3}
  \end{figure}
}
You can define several mandatory and optional arguments using xparse.

Now, you can use different definitions for different documents to have different formatting, but always the same command with the same argument.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply