#!/usr/bin/perl $header = <<_HEADER_EOF; The TeX showcase

The TeX showcase

This is the TeX showcase, edited by Gerben Wierda. It contains examples of what you can do with TeX, the typesetting engine from Donald Knuth, world famous mathematician, computer scientist and above all well known for TeX. I will try to keep this showcase small. For remarks on submissions, see at the end of this document.

In this showcase, you will not only find examples of material prepared with TeX proper, but also with macro packages like LaTeX, ConTeXt and with related programs like METAPOST. And though TeX is a typesetting language, you will find graphics and even an MPEG movie.

Showcases are mostly PDF files. Some PDF files contain tricks that only work in certain PDF-viewers, e.g. they might contain automatic changes in the page that work in certain versions of Acrobat and only when certain preferences are set. The descriptions will contain special instructions if any.

Most examples come with some sort of source. These sources are not guaranteed to compile, they are only there for visual inspection. Some may compile, but some may have parts missing.

Some of these examples were prepared using proprietary fonts or software that must be purchased. For a discussion of font usage with TeX, including a sampler of available free fonts, please see this separate font page.

One word on the sections. These are generated automatically from a database and their titles speak for themselves. The exception is the section Yannis Haralambous. Yannis is famous in the world of TeX for his work on typesetting several languages (like Greek and Hebrew) with TeX. He donated a series of samples. The Hebrew and Syrian fonts are bitmaps, they might not look perfect in all circumstances.

_HEADER_EOF $footer = <<_FOOTER_EOF;

This showcase does not have very fancy markup. It is created automatically by a perl script and a driver file and I am not an HTML-expert, that is why.

If you want to contribute something that is not already there, or which is better than what is already there, please send me a submission by e-mail. Do not send me URLs or anything that requires work for me to find it or download it, I must set a limit somewhere and I will generally not include items I have to go browsing for. Sorry.

Include the case and make sure it looks good on screen as well as in print (so no bitmap fonts), and if possible some source and a description. If you want, add a JPG or TIFF of 150x200 (width x length) pixels just like the icons above. Preferably, keep your names in sync: foo.pdf for the showcase entry with foo.jpg for the icon. Include source. It does not need to be complete in that it can be compiled and that all necessary support files are there, but it should illustrate how it was done in TeX (or MetaPost or whatever).

E-mail your submissions to tex-showcase at rna.nl.


\$Date\$; contact webmaster; contact TUG; TUG home page. _FOOTER_EOF $tablestart = <<_TABLESTART_EOF; _TABLESTART_EOF $tableend = <<_TABLEEND_EOF;
Case (click for document)SourceWhat it is
_TABLEEND_EOF # The sections file contains lines with entries # name,section # which tell that file name.pdf belongs to section section, or # title, section # which give the title of the section my %section; my %sections; my %sources; open SECTIONS, ") { next if (/\s*[#%;]/); my ($file, $sectionname, @sourceslist) = split( /\s*,\s*/); $file =~ s/^\s+//; $file =~ s/\s+$//; $sectionname =~ s/^\s+//; $sectionname =~ s/\s+$//; if ($file =~ s/^TITLE\s*=\s*// ) { $sectiontitle{$sectionname} = $file; } else { $section{$file} = $sectionname; $sections{$sectionname} = 1; if ($#sourceslist > -1) { $sources{$file} = \@sourceslist; } } } close SECTIONS; opendir(DIR, '.') || die "can't opendir .: $!"; @cases = grep { /\.(pdf|mpg)$/ && -f "$_" } readdir(DIR); closedir DIR; foreach $file (keys %section) { my $linktext; my $link; my $sourcelink; my $description; my $basename = $file; $basename =~ s/\.(pdf|mpg)//; warn "Creating table entry for $file\n"; if (-e "${basename}.tiff" and not -e "${basename}.jpg") { system "convert \"${basename}.tiff\" \"${basename}.jpg\""; } if (-e "${basename}.jpg") { $linktext = "\"${file}\""; } else { $linktext = "Click for ${file}"; } $link = "${linktext}"; if (-e "${basename}.comment.html") { $description = `cat "${basename}.comment.html"`; } else { $description = "No description available"; } if (exists $sources{$file}) { my $sourceslistref = $sources{$file}; $sourcelink = " "; foreach my $srcfile (@{$sourceslistref}) { chomp $srcfile; $sourcelink .= "$srcfile "; } } else { $sourcelink = "No source available"; } warn "Adding entry to array $section{$file}\n"; push( @{$section{$file}}, "${link}${sourcelink}${description}\n"); } open( INDEX, ">index.html") or die "Cannot write to index.html"; print INDEX $header; print INDEX "

Index

\n\n"; foreach my $sectionname (keys %sections) { warn "Creating table for $sectionname\n"; print INDEX "

$sectiontitle{$sectionname}

\n"; print INDEX $tablestart; print INDEX @{$sectionname}; print INDEX $tableend; } print INDEX $footer; close INDEX;