I have generated a large number of figures (about 400) and I'd like to place, for example, 20 figures per page (4*5). I've looked for the solution on the Web but all I've found is solutions for small number of figures (13 figs.) and they all use the \includegraphics command for every single figure which in my case that would be ridiculously time consuming. I'd like to ask if there is any other way I can build my final document (in PDF). Also, my figures have *.ps extension which latex shows the error message

! LaTeX Error: Unknown graphics extension: .ps.

even by using \usepackage{epstopdf} command. I'll appreciate your help in advance.

I read the github page (introduced by this user) but, honestly, I didn't get it. I just compiled the following lines (as a test for the first 10 figures):

  \vspace{0.2cm} #1%\captionof{figure}\relax

\@for \i:=\alist\do{%
\putcaption{Weaving and pottery artifacts from Arizona.}

but I get the

! Undefined control sequence

error message and then it addresses a curly bracket (the lonely one before the last line). I'm new with LaTeX, so I'd be thankful if you could walk me through this step by step. Oh, by the way, I found this page but I couldn't figure the solution. I hope by preamble you mean the followings:

  • Welcome to TeX.SX. Please provide a little minimal working example to play around with and upload one of your .ps-files! Please give us the reference for the 13 (?) figures inclusion.
    – LaRiFaRi
    Sep 14, 2013 at 8:40
  • Can you post your preamble as well?
    – yannisl
    Sep 16, 2013 at 14:23

1 Answer 1


See this code at github.

You can automate most of it. You will still need to put the figures in a list such as:

\@for \i:=\alist\do{%

and iterate using a \@for.

enter image description here

  • Hi Lazarides, Could you help me regarding my multi figs. question. I just added some more details. Thanks
    – zhuser
    Sep 16, 2013 at 6:06
  • I hope I posted what you asked.
    – zhuser
    Sep 16, 2013 at 16:25

You must log in to answer this question.

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