Index of /graphics/gapfill
      Name                    Last modified       Size  Description

[DIR] Parent Directory 13-Jun-2021 22:07 - [   ] GaPDoc1.pdf 13-Jan-2015 05:44 332k [TXT] GaPDoc1.tex 01-Apr-2006 07:51 66k [   ] GaPDoc2.pdf 18-Aug-2009 03:58 145k [TXT] GaPDoc2.tex 18-Aug-2009 03:58 23k [DIR] Mac_OS_only/ 13-Jan-2015 05:15 - [DIR] Various_OSs/ 13-Jan-2015 05:21 -

% for the GaPFilL method ("Graphics as PostScript Filtered for LaTeX"),
% Version 1.1, January 2006; version 1.6, January 2015
% Changes: April 2006, October 2006, August 2009, April 2011, January 2015

Author: H. Moeller
Address: Department of Mathematics and Computer Science
         University of Muenster
         Einsteinstr. 62
         D-48149 Muenster


Using geometry software or a drawing program ("geometry program") LaTeX picture environments may be constructed in the following way:

  i) Generating the desired figure with the geometry program;
  ii) "Printing" (or exporting) the construction as a PostScript file;
  iii) Applying a Perl filter program to the PostScript text;
  iv) Copying the resulting code or parts of it into a LaTeX document.

On account of this structure the method is called "GaPFilL" (Graphics as PostScript Filtered for LaTeX).

Since the steps i) and ii) and the packages used in the LaTeX document may vary, it is necessary to apply different filter programs.

Therefore the GaPFilL folder in the CTAN may collect open-source Perl filter programs for many combinations of geometry programs, PostScript versions, and LaTeX packages on different platforms.

The first two Perl filter programs in the folder 'Mac_OS_only' are written for the "dynamic" geometry software 'Cabri-gˇom¸tre II', the PostScript driver 'Virtual Printer', and the LaTeX packages 'ebezier' and 'pict2e'.

Both have been well tested using a Macintosh G4 and Mac OS 9.2. The package pict2e with LaTeX code generated by '' could only be used with PDFTeX.

Together with the documentation 'GaPDoc1.pdf' these programs may serve as prototypes for those who will write or modify Perl filter programs for GaPFilL.

Added in 2009: A new Perl filter program '' is added for the powerful free drawing software 3 Draw which has its own PostScript generator not depending on the operating systems supplied by, namely Linux, Mac OS, Unix and Windows.


  i) A geometry program,
  ii) a PostScript driver (,
  iii) the Perl interpreter (,
  iv) a TeX/LaTeX installation.


  README -- this file,
  GaPDoc1.tex -- tex file of the GaPFilL documentation,
  GaPDoc1.pdf -- pdf version of the GaPFilL documentation,
  Mac_OS_only/ -- Perl filter for Cabri-gˇom¸tre II and the LaTeX package 'ebezier',
  Mac_OS_only/ -- Perl filter for Cabri-gˇom¸tre II and the LaTeX packages 'ebezier' and 'pict2e'.
  Added in 2009:
  GaPDoc2.tex -- tex file of the GaPFilL documentation for 3 Draw,
  GaPDoc2.pdf -- pdf file of the GaPFilL documentation for 3 Draw,
  Various_OSs/ -- Perl filter for 3 Draw and the LaTeX package 'pict2e' (2008) or the packages 'ebezier' and 'pict2e' (2003).


Each of the four systems in (2) has its own installation mode depending on the platform. In general with the respective software you get an installer or an explanation how to install it.


If you are familiar with your geometry program, you are able to generate even complicated drawings without using any manual. For the assignment of colors you only need the two tables on pages 4 and 5 of the documentation GaPDoc1.pdf.

Added in 2009: With you have to use the table of colors on page 6 of the documentation GaPDoc2.pdf.

The Perl filter programs need to be placed where your Perl interpreter can find them.

With Mac OS you may select the PostScript text in your text editor and run the desired filter of the Perl filters list.

The use of Perl filter programs in Unix/Linux and with MS-Windows is explained for example in the README.TXT of CTAN/graphics/pictex/mathspic/Perl.

If there are difficulties between 64-bit Windows 7 and the text editor you may use the command line of Windows with the eps-file as parameter.

April 2006: The German documentation has been substituded by an English translation of it.

October 2006: In the Perl filter Mac_OS_only/ on line 111 "and ($co0 ne $violet)) " has been added.

August 2009: In the Perl filter Mac_OS_only/ the subprocedure 'best' is corrected taking into account that Perl has a greatest integer.

April 2011: In the PostScript file of 3 Draw rectangles consist of five lines. These are reduced to the ordinary four ones. The length of arrow shafts is corrected. Dotted lines and curves are shifted half a dot to the left. The letter 'D' in the subprocedure 'best' is replaced by 'd'.

June 2011: The subprocedure 'best' of is simplified on lines 269 to 300.

January 2015: The Perl filter program can also be used with the free drawing programs Apache OpenOffice Draw and LibreOffice Draw, which belong to the office suits succeeding To get the correct colors, the "standard" color list must be replaced by the "web" color list: From the menue/submenue "Format/Area..." choose "Colors" and load the color list "standard.soc" clicking the left icon on the lower right side of the window. Save it with the other icon as "standard0.soc". Then, load the color list "web.soc" and replace the numbers in the Name field. Using A for 0, B for 128 and C for 255, the color names should be: black for AAA, navy for AAB, green for ABA, teal for ABB, maroon for BAA, purple for BAB, olive for BBA, blue for AAC, lime for ACA, cyan for ACC, red for CAA and magenta for CAC. Save this list as "standard.soc".


These programs are free software; you can redistribute them and/or modify them under the conditions of the LaTeX Project Public License.

These programs are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.