# building a table of images

I seem to have run into an impassable issue that I need help solving, and I am 100% aware that this is impossible just pure LaTeX but I wish it was. So onto the question at hand.

I am wanting to build a table of images, in this case they are eps's of 11,251 kanji. now from the start I looked into how to loop files in LaTex, as I did not want to manually type in all 11,251. And found out that without any help from a shell script its impossible, so I cobbled together this

for f in *.eps; do echo "\includegraphics[scale=0.25]{./Reference/kanji/eps/$f}" >> ../eps.list; done  It was just for a start and it worked amazingly, the only issue now is that LaTeX is not playing nice with that list. it throws errors such as Number too big ...=0.25]{./Reference/kanji/eps/0002e.svg.eps} and Dimension too large ...=0.25]{./Reference/kanji/eps/0002e.svg.eps} they are only 512x512 so Im assuming that means the bounding box is too big, As a note on the eps' they where converted from SVG's with the following script for f in *.svg; do inkscape -f$f -D -E $f.eps -z; done And it only took about 58 minutes to run so my life could be worse. The main thing that i am asking assistance with is how to generate the table. it would need be 6 columns across by N rows down and fill the slots sequentially, that I have no idea about how to go about, so if you would be so kind as to assist me in that. Another issue that i might as well bring up is that i seem to be having mountains of trouble with the CJK package, after several hours of looking here and elsewhere I have completed the fonts and rebuilt the font DB updated everything and it still dies with Undefined control sequence 縲梧律 and a metric nut ton of Undefined control sequence 縲梧律 Errors, the Main file looks like so \documentclass[UTF8,14pt]{book} \usepackage{graphicx} \usepackage{CJK} \newcommand{\bookversion}{v0.0 REV 0} \begin{document} \begin{CJK*}{UTF8}{min} \input{Title} \clearpage 「日本語」 \tableofcontents \include{Introduction/Part.Introduction} \include{Learn/Part.Learn} \include{Reference/Part.Reference} \clearpage \end{CJK*} \end{document}  As mentioned before I am at a loss on multiple ends, my apologies for the huge wall of text and I thank you for any and all help. - ## 1 Answer Well it's hard to know where to start. You say you think the boundingbox is too big. I assume they are all the same, what is the %%BoundingBox line in the EPS (and are they all the same?) It could (I think) be that you are just generating a line that is too long. You appear to be making a list of \includegraphics{} commands 11251 long with no commands in between. To TeX an included graphic is basically like a letter and so it is like going AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....  with one very long non-breakable line. Modify your shell script to write for f in *.eps; do echo "\do\includegraphics[scale=0.25]{./Reference/kanji/eps/$f}" >> ../eps.list; done


so now you have \do in front of each.

If you say \let\do\par before including the image list each image will be in its own paragraph, which is much lighter on TeX memory. That isn't the layout you want but it is a good test to see if the errors change in that case.

To get six images in a row you can define

\newcount\imgcount

\def\do{%