1

I'm creating my block diagram with tikzpicture, but I'm facing an issue where, despite my attempts to position it to span two columns and place it to the bottom of the page, LaTeX consistently places it at the bottom of the entire document. While, when I position it at the top of the page, LaTeX correctly aligns it within the top of the page.

I tried to use

\usetikzlibrary{external} \tikzexternalize[prefix=Figures/,optimize command away=\includepdf]

but I'm getting this error (I'm using Overleaf)

Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "Figures/output-figure0" "\def\tikzexternalrealjob{output}\input{output}"' did NOT result in a usable output file 'Figures/output-figure0' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in 'Figures/output-figure0.log'. If you continue now, I'll try to typeset the picture.

According to their guide on how to use the https://www.overleaf.com/learn/latex/Questions/I_have_a_lot_of_tikz%2C_matlab2tikz_or_pgfplots_figures%2C_so_I%27m_getting_a_compilation_timeout._Can_I_externalise_my_figures%3F I've done it correctly, so I shouldn't get this error.

Any help is appreciated, since I need to submit.

   \documentclass[conference]{IEEEtran}

\usepackage{tikz}
\usetikzlibrary{arrows, positioning, backgrounds, fit, calc}
\usepackage{lipsum}
\title{Some Title} % Random title
\author{Your Name}
\date{}
\usepackage{float}
\restylefloat{figure}
\usepackage{afterpage}

\renewcommand{\floatpagefraction}{.8}%  Allow page with floats to cover up to 80% of the page
\renewcommand{\topfraction}{.85}      % Maximum top space for float is 85% of page
\renewcommand{\bottomfraction}{.85}   % Maximum bottom space for float is 85% of page
\renewcommand{\textfraction}{.15}     % Minimum text required 
\begin{document}
\maketitle
\lipsum[1-8]
\begin{figure*}[!b]
    \centering
    \begin{tikzpicture}[arr/.style = {cap=round,-Straight Barb},minimum width=3.35cm,minimum height=0.65cm]
        \pgfdeclarelayer{background}
        \pgfdeclarelayer{foreground}
        \pgfsetlayers{background,main,foreground}
        \tikzset{%
            block/.style    = {draw, thick, rectangle,fill=white,
                anchor=west,
                rounded corners,align=center}
        }

        % First column
        \node [block, align=center,rotate=90](fig2)at (0,0) {Any Figure};
        
    \end{tikzpicture}
    \caption{Some Caption}
\end{figure*}
\lipsum[1-8]
\end{document}
8
  • by default latex does not implement spanning figures at the bottom of a page Commented May 5 at 9:29
  • This means that {figure*}[!b] wouldn't work
    – Diana
    Commented May 5 at 10:15
  • This question is different than the other one, it's the use of Tikz picture that introduces the problem.
    – Diana
    Commented May 5 at 12:39
  • well yes/no you have two issues one the question in the title about [b] which is a duplicate of the linked question, and a second issue generating the error message you show. I could re-open if you want but maybe you should clarify the question and only ask about tikz if you get the same error without the [b] Commented May 5 at 14:48

1 Answer 1

0

You should consider all above comments ...

Regarding tikz picture:

  • in picture code you have error. In style you define arr style˛ which has Straight Bar arrow head, but you not load library, which define it (arrows.meta)
  • use of minimum width=3.35cm,minimum height=0.65cm works, but better is included them to some style, for example to block ...
  • definitions for picture layers are usual in document preamble that they are available for all images in document.
  • It is advisable to use one way to define styles for pictures: as options to picture or by \tikzset:
\documentclass[conference]{IEEEtran}

\usepackage{tikz}
\usetikzlibrary{arrows, backgrounds, calc, fit, positioning}
    \pgfdeclarelayer{background}
    \pgfdeclarelayer{foreground}
    \pgfsetlayers{background,main,foreground}
    
\begin{document}
    \begin{figure*}[!b]
    \centering
    \begin{tikzpicture}[
  arr/.style = {cap=round,-Straight Barb},
block/.style = {rectangle,draw, thick, rounded corners,fill=white, 
                mnimum width=3.35cm, minimum height=0.65cm,    
                anchor=west, align=center}
                        ]                 
% First column
\node [block, align=center,rotate=90](fig2)at (0,0) {Any Figure};
    \end{tikzpicture}
    \caption{Some Caption}
\end{figure*}
\end{document}

Regarding float positioning: As mentioned in comments, figure* will always appear on the top of the next page from point of its insertion. However, if you like to have it at bottom of thee same page where is inserted, than package stfloats may help you.

Using stfloats package the figure should be inserted in the first column on the page and after this point should be enough space for image on the page. For example:

\documentclass[conference]{IEEEtran}
\title{Some Title} % Random title
\author{Your Name}
\date{}

\usepackage{stfloats}
\usepackage{tikz}
\usetikzlibrary{arrows, backgrounds, calc, fit, positioning}
    \pgfdeclarelayer{background}
    \pgfdeclarelayer{foreground}
    \pgfsetlayers{background,main,foreground}
\usepackage{lipsum}
    
\begin{document}
\maketitle
\lipsum[1-2]
    \begin{figure*}[b]
    \centering
    \begin{tikzpicture}[
  arr/.style = {cap=round,-Straight Barb},
block/.style = {rectangle,draw, thick, rounded corners,fill=white, 
                mnimum width=3.35cm, minimum height=0.65cm,    
                anchor=west, align=center}
                        ]                 
% First column
\node [block, align=center,rotate=90](fig2)at (0,0) {Any Figure};
    \end{tikzpicture}
    \caption{Some Caption}
\end{figure*}
\textcolor{red}{\lipsum[1-8]}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .