0

I would like to add all my certificates in my LaTeX document as pictures. Is there any way that lets me insert multiple images without captions as follows:

  • Each image fits on one page
  • for example if i have 6 images and I name them 1 2 3 4 5 and 6 I would like to add them in command like \Insert{1,2,3,4,5,6}

Is there any possible way to create that? I’ll appreciate it.

1 Answer 1

1

\foreach by the tikz package will do this. I’ve created a new command that takes a list of numbers (or a pattern with ,..., in it), and spits out figures that can only go on float pages ([p]). You can use the running index \x (or however you define it) inside for file names and caption text. The \clearpage after each figure makes it so that only one figure is placed on a page. You can also reference the figures normally.

\documentclass{article}
\usepackage{tikz}

\newcommand\Insert[1]{
    \foreach \x in {#1} {
        \begin{figure}[p]
        % \includegraphics{\x} etc.
        \caption{Graphic~\x}
        \label{figGraphic\x}
        \end{figure}
        \clearpage
    }
}

\begin{document}
\Insert{1,...,6}
Reference:~\ref{figGraphic2}
\end{document}
4
  • could you make it center
    – Educ
    Commented Apr 17, 2018 at 20:37
  • yoiu can remove the caption
    – Educ
    Commented Apr 17, 2018 at 21:11
  • I tried to use '\centerline{} ' but still not center it should be above the counter of the page
    – Educ
    Commented Apr 17, 2018 at 21:30
  • @Educ: \centering before \includegraphics would center the graphic in the textblock. I’m not sure what you want to do with the caption, though. The pagenumber is at the bottom by default.
    – lblb
    Commented Apr 18, 2018 at 8:13

You must log in to answer this question.

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