0

I am designing a two-column page and using tikzfigure to insert my figures. I want to have a wide figure that uses both columns. I tried what suggested in here: Displaying a wide figure in a two-column document the figure* and setting textwidth, the figure takes both columns, but the table on the second column covers it. How can I allocate the space, and prevent overlapping?

The code I use:

\documentclass[25pt, a0paper, portrait, blockverticalspace=-0.6cm]{campProposal}
\usepackage[utf8]{inputenc}
\usetikzlibrary{positioning}
\usepackage{diagbox}
\usepackage{xcolor}
\usepackage{color, colortbl}

\begin{columns} \column{0.46}

\begin{tikzfigure} \includegraphics[width=0.8\textwidth]{example-image} \captionof{figure}{pipeline} \end{tikzfigure} \begin{tikzfigure}

\column{0.54} ... \end{columns}

How it looks: enter image description here

  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – dexteritas Sep 05 '22 at 08:57
  • Thanks for the welcome message. Sure, I added the part. Would it be enough? – yousef yegane Sep 05 '22 at 09:10
  • 1
    No it wold not be enough. You need to make it compilable and you need to use a two column document and it need to show your problem. You can use the example-image included in LaTeX. – hpekristiansen Sep 05 '22 at 09:19
  • It is a cumbersome document. Is there any command/script to generate a template file filled with dummy text and figures? – yousef yegane Sep 05 '22 at 10:01
  • I added some key commands (in my opinions), hopefully, they would be enough. – yousef yegane Sep 05 '22 at 10:10
  • 1
    You can use e.g. lipsum for dummy text. See e.g. https://tex.stackexchange.com/questions/604917/blindtext-vs-lipsum. You really need to make your code compilable. – hpekristiansen Sep 05 '22 at 10:14
  • Thanks, I know the lipsum, I wanted to use a code, e.g. in GitHub to create a template from the source code, so I could easily share it. By the way, I have no clue what you mean by compatible. Do you have a link that I could read, and why should I do it? – yousef yegane Sep 05 '22 at 10:22
  • 2
    Compilable means that you can compile it(run the latex engine) without errors. Link is already provided by @dexteritas. You should do it, because it is your job, if you want help. It is very annoying for other people when they need to debug code before they can add the needed solution. – hpekristiansen Sep 05 '22 at 10:41
  • 1
    I see, so I guess you mean you could copy/paste it into your engine and test it. I am currently using it in overleaf, and I only get warnings. Would it count as compatible? By the way, I found out how to solve my problem, and I will put it in the answer section but thank you for teaching me some points. – yousef yegane Sep 05 '22 at 10:51

1 Answers1

0

It might not be the best solution, but since I used \begin{columns} to create two columns, and when I wanted to extend a figure from column1 to column2, then it does not push the contents from column2.

So I ended the two columns by \end{columns} and again defined two columns after that figure. It worked fine. I suspect if it is needed to have it arranged dynamically, you might need to create columns with another package. If anyone else has a better solution, I will change the solution to that answer.

\begin{columns}
\column{0.5}
...

\column{0.5} ... \end{columns}

\begin{tikzfigure} \includegraphics[width=\textwidth]{example-image} \captionof{figure}{The two-column figure} \end{tikzfigure} \begin{tikzfigure}

\begin{columns} \column{0.5} ...

\column{0.5} ... \end{columns}

  • 1
    You should note that the columns environment is not standard LaTeX and is probably peculiar to campProposal.cls. However, your solution is pretty much how multicols would do it. – John Kormylo Sep 05 '22 at 14:36