PlotNeuralNet icon indicating copy to clipboard operation
PlotNeuralNet copied to clipboard

Importing layers in a latex project will affect captions on all figure boxes

Open rdednl opened this issue 6 years ago • 3 comments

Importing the 'layers' folder in a latex project will affect captions in every figure and table boxes. Basically, every caption will not have anymore the text "Figure X"/"Table X" where X is a index as soon as you add the lines \subimport{layers/}{init} .

Minimum example (correct):

\documentclass{article}

\usepackage{graphicx}
% \usepackage{tikz}
% \usepackage{import}
% \subimport{layers/}{init}
% \usetikzlibrary{positioning}

\begin{document}

\begin{figure}
    \centering
    \includegraphics[height=5cm]{cats.jpg}
    \caption{This is a caption.}
    \label{test2}
\end{figure}

\end{document}

This produces: image

Importing layers:

\documentclass{article}

\usepackage{graphicx}
\usepackage{tikz}
\usepackage{import}
\subimport{layers/}{init}
\usetikzlibrary{positioning}

\begin{document}

\begin{figure}
    \centering
    \includegraphics[height=5cm]{cats.jpg}
    \caption{This is a caption.}
    \label{test2}
\end{figure}

\end{document}

Produces: image

Issues so are: not displaying anymore the count of captions and not keeping the correct alignment.

rdednl avatar Jun 28 '19 15:06 rdednl

Searching in layers/*.sty for \caption and replacing all occurrences with another name fix the problem. \caption defined in *.sty clashes with the figure caption command.

Dev-XYS avatar May 23 '21 12:05 Dev-XYS

This issue should be made more visible imo

Zeta611 avatar Jun 22 '23 18:06 Zeta611