5

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):

\long\def\putgraphic#1{%
\setlength\fboxsep{0pt}
\setlength\fboxrule{0pt}
\fbox{%
\begin{minipage}[b]{0.2\textwidth}%
 \centering
 \vspace{3.8pt}\fbox{%
 \includegraphics[width=0.98\textwidth,height=2.3cm,keepaspectratio]{./images/#1}}%
  \vspace{0.2cm} #1%\captionof{figure}\relax
  \vspace{0.2cm}%
  \end{minipage}}\hfil
}
\DeclareRobustCommand{\putcaption}[1]{\captionof{figure}{#1}}
\makeatletter
\def\alist{0001.eps,0002.eps,0003.eps,0004.eps,0005.eps,0006.eps,0007.eps,0008.eps,0009.eps
,0010.eps}

\@for \i:=\alist\do{%
\expandafter\putgraphic{\i}%
} 
\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:

\documentclass[pdftex,12pt,a4paper]{article}
\usepackage{times}
\usepackage{amsfonts}
\usepackage{amsmath,wasysym}
\usepackage{graphicx}
\usepackage{epstopdf}
\graphicspath{{../pdf/}{F:\...\...\...\...\abc}}
\usepackage{floatrow}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{overpic}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{here}
\usepackage{booktabs}
\usepackage[colon,authoryear]{natbib}
\usepackage{fixltx2e}
\usepackage{float}
\usepackage{tabularx}
\usepackage{siunitx}
\usepackage{fancyhdr}
\usepackage{cleveref}
\usepackage{lscape}
\usepackage{longtable,rotating}
\usepackage{chngcntr}
\usepackage{makeidx}
\makeindex 
\usepackage[refpage]{nomencl}
\makenomenclature
\linespread{1.3}
2
  • 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

8

See this code at github.

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

\def\alist{fig140,fig145,fig161,fig162,fig163,fig164,fig165,fig166,fig167,%
fig168,fig169,fig170,fig171,fig172,fig173,fig174,fig175,fig176,fig177,%
fig180,fig181,fig182,fig183,fig185,fig186,fig187,fig188,fig189}
\@for \i:=\alist\do{%
\expandafter\putgraphic{\i}% 
}

and iterate using a \@for.

enter image description here

2
  • 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 .