[OS X TeX] A (little) challenge for OS X TeX programmers

Bruno Voisin bvoisin at mac.com
Wed Mar 16 13:28:25 EST 2005


I have been wondering whether TeX could be used to print the contents 
of OS X folders in the same way that was possible from the Finder in OS 
9 and before. I am thinking of what you would get, for example, for a 
Finder window by:

- Hiding the toolbar.

- Selecting icon view (no tree view, no list view).

- Using View Options to set icon size to a size smaller than the 
default 48 x 48 (say, 32 x 32), and ask for the display of icon 
preview.

In OS 9 there was a menu item in the File menu for printing window 
content, yielding a result close to the display so obtained. Alas this 
functionality is gone in OS X AFAIK.

This is probably not possible using TeX in the general case, given file 
icons are not, AFAIK, directly accessible as individual graphics files. 
However, I was willing to do this in the particular case of a folder 
containing only graphics (GIF files, in an icon library for web site 
design), so I assumed with pdfTeX or XeTeX this could be possible with 
a little bit of programming: possibly using shell escape and the 
shell's "ls" to get directory listing, LaTeX's \includegraphics or 
XeTeX's \XeTeXpifile to display each graphics in this listing above its 
name, and LaTeX's tabular environment or plain TeX's \halign to put 
this display in a table to paper size (either imposing the icon size 
and number if icons per row, or having TeX calculate these optimally 
given the total number of icons in the folder).

Of course this could be done by hand with a lot of cut/copy/paste, but 
when the number of files gets large this becomes a bit of nonsense. 
Certainly programming would be better. This is a bit too far-fetched 
for me given my programming abilities, or at least not feasible by me 
in the available time slots, but I thought maybe for some of the 
members of this list the solution would be obvious. If not, please 
don't pay attention to this message.

For lack of a better solution, I have been using the Finder, setting 
the window display as required, maximizing the window size to screen 
height, scrolling the window by hand and taking a screenshot of each 
area so displayed. Not very elegant!

Bruno Voisin

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list