debian/0000775000000000000000000000000012254321011007157 5ustar debian/override.Lintian0000664000000000000000000000036012227260650012330 0ustar transfig: capitalization-error-in-description tk Tk transfig: capitalization-error-in-description latex LaTeX transfig: spelling-error-in-binary usr/bin/fig2dev yur your transfig: spelling-error-in-binary usr/bin/fig2dev ReEncode Re-encode debian/copyright0000664000000000000000000000753112227260650011133 0ustar This Debian package was maintained by many different Debian maintainers: joost witteveen , Enrique Zanardi , Edward Betts , and currently by Roland Rosenfeld Upstream Maintainer: Brian V. Smith The upstream source package is available at http://www.xfig.org/xfigdist/transfig.3.2.4.tar.gz ftp://epb.lbl.gov/xfig/alpha/transfig.3.2.5-alpha7.tar.gz http://www.xfig.org/xfigdist http://downloads.sourceforge.net/mcj/transfig.3.2.5e.tar.gz The fig2mpdf extension is available at http://p3f.gmxhome.de/fig2mpdf/fig2mpdf-1.2.tar.gz Copyright: Copyright (c) 1985-1988 Supoj Sutantavibul Copyright (c) 1991-1999 Micah Beck Copyright (c) 1989-2002 by Brian V. Smith Copyright (c) 1988 by Conrad Kwok Parts Copyright (c) 1991 by Paul King Parts Copyright (c) 1995 C. Blanc and C. Schlick Parts Copyright (c) 1993 Anthony Starks Parts Copyright (c) 1992 Uri Blumenthal, IBM Parts Copyright (c) 1992 by Brian Boyter Parts Copyright (c) 1995 Dane Dwyer Parts Copyright (c) 1999 by Philippe Bekaert Parts Copyright (c) 1999 by T. Sato Parts Copyright (c) 1998 by Mike Markowski Parts Copyright (c) 1994-2002 by Thomas Merz Parts Copyright (c) 2002-2006 by Martin Kroeker Parts Copyright (c) 2004-2008 by Eugene Ressler Any party obtaining a copy of these files is granted, free of charge, a full and unrestricted irrevocable, world-wide, paid up, royalty-free, nonexclusive right and license to deal in this software and documentation files (the "Software"), including without limitation the rights to use, copy, modify, merge, publish and/or distribute copies of the Software, and to permit persons who receive copies from any such party to do so, with the only requirement being that this copyright notice remain intact. Parts of fig2dev/dev/readgif.c are copyright: Copyright 1990, David Koblas. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty. Copyright of fig2dev/dev/readxbm.c: Copyright, 1987, Massachusetts Institute of Technology Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Copyright of fig2mpdf: fig2mpdf/pdftex_p and pstex_p driver of fig2dev Copyright (C) 2006 Michael Pfeiffer -- p3fff@web.de This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. The complete GNU General Public License can be found at /usr/share/common-licenses/GPL debian/source/0000775000000000000000000000000012227260651010473 5ustar debian/source/format0000664000000000000000000000001412227260650011700 0ustar 3.0 (quilt) debian/changelog0000664000000000000000000007257312254321011011047 0ustar transfig (1:3.2.5.e-1ubuntu1) trusty; urgency=low * Merge from Debian unstable. Remaining changes: - Mark transfig Multi-Arch: foreign for cross-build-dependencies. -- Adam Conrad Wed, 18 Dec 2013 06:24:23 -0700 transfig (1:3.2.5.e-1) unstable; urgency=low * New upstream version 3.2.5e. * Update all patches to new version. * 23_MAXWIDTH, 24_PIC_precision, 25_PIC_leadspace, 26_gs_fail_doubleclose removed, since they are now incorported upstream. * debian/rules: Change build options to harden binaries. * 30_fprintf_format: Add a format string to fprintf()/sprintf() call instead of directly printing out Err_Mem. This is needed by harding options. * Upgrade to Standards-Version 3.9.4 (no changes). * 31_index_not_static: index() is not static, otherwise transfig is liked with -L/usr/lib. Thanks to YunQiang Su (Closes: #722857) * Update homepage link. -- Roland Rosenfeld Tue, 15 Oct 2013 14:51:30 +0200 transfig (1:3.2.5.d-3ubuntu1) quantal; urgency=low * Mark transfig Multi-Arch: foreign for cross-build-dependencies. -- Adam Conrad Fri, 13 Jul 2012 22:04:02 -0600 transfig (1:3.2.5.d-3) unstable; urgency=low * 28_fix_fig2dev_chmod: Add missing sys/stat.h prototype, which leads to an implicit declaration of fchmod(), which uses signed int while kFreeBSD expects unsigned int, which results in a wrong bitmap, which leads to a build failure. Thanks to Steven Chamberlain for finding out what goes wrong here and providing a patch (Closes: #654767). * Build-Depends on libpng-dev instead of libpng12-0-dev | libpng-dev. -- Roland Rosenfeld Wed, 11 Apr 2012 20:40:32 +0200 transfig (1:3.2.5.d-2) unstable; urgency=low * Update debian/watch. * Migrate from dpatch to 3.0 (quilt) format. * Reformat all patches. * Change build depenency from dpatch to debhelper (>= 7.0.50~). * Change debian/compat to "7". * Remove README.source. * Complete rewrite of debian/rules. * 26_gs_fail_doubleclose: avoid double closing of filedescriptor, if call of ghostscript failed. Thanks to Kamil Dudka from Fedora. (Closes: #426959). * Upgrade to Standards-Version 3.9.2 (no changes). * Undo changes from Ubuntu bug 561458 from 14_fig2mpdf, because that workaround doesn't fit to fig2dev documentation. -- Roland Rosenfeld Thu, 29 Dec 2011 14:29:06 +0100 transfig (1:3.2.5.d-1) unstable; urgency=low * New upstream version 3.2.5d. * Update debian/copyright. * Adapt all patches to new version. * Remove 07_avoid_warnings, incorporated upstream. * Remove 19_cups_workaround, better solution upstream. * 23_MAXWIDTH: Increasese MAXWIDTH of embedded images from 8K to 16K (Closes: #610466) * 24_PIC_precision: Change the precision of PIC floating point output from %.2f to %.3f. Thanks to Roger Leigh . (Closes: #611948). * 25_PIC_leadspace: Avoid wrong leading spaces in PIC text. Thanks to Roger Leigh (Closes: #611977). * 14_fig2mpdf: use list of layers instead of range of layers. See Ubuntu bug https://bugs.launchpad.net/ubuntu/+source/transfig/+bug/561458 Thanks to Manuel López-Ibáñez for providing a patch. * Add debian/source/format 1.0 * Upgrade to Standards-Version 3.9.1 (no changes). -- Roland Rosenfeld Thu, 03 Mar 2011 00:58:52 +0100 transfig (1:3.2.5.c-1) unstable; urgency=low * New upstream version 3.2.5c. * Adapt all patches to the new version. * 04_displaywho: Rewritten, because the new "-a" option for anonymous is not used by xfig at the moment. This patch changes the default to have anonymous mode enabled all the time. * Fix typo in package description (Closes: #557398). * Upgrade to Standards-Version 3.8.4 (no changes). * Added debian/README.source (from dpatch package) to explain how dpatch works. * 22_typos: Fix some spelling errors in the binaries. -- Roland Rosenfeld Wed, 19 May 2010 22:26:17 +0200 transfig (1:3.2.5.a-2.1) unstable; urgency=high * Non-maintainer upload. * High-urgency upload for RC bugfix. * Fix FTBFS: - Build-depend on texlive-font-utils instead of texlive-extra-utils for epstopdf. - debian/patches/14_fig2mpdf.dpatch: don't use -f and --outfile args together, current epstopdf doesn't like this. Thanks to Michael Bienia for the analysis. Closes: #562364, LP: #534298. -- Steve Langasek Thu, 11 Mar 2010 00:52:05 +0000 transfig (1:3.2.5.a-2) unstable; urgency=low * 21_rename_optopt: rename optopt parameter name in getopt.c to make mips/mipsel happy (otherwise their linker fails with the message /usr/bin/ld: non-dynamic relocations refer to dynamic symbol optopt@@GLIBC_2.0 * 13_remove_extralibs: Remove -lz again (was lost in previous patch). -- Roland Rosenfeld Sun, 10 May 2009 11:12:23 +0200 transfig (1:3.2.5.a-1) unstable; urgency=low * New upstream version 3.2.5a (as of 2009-03-16). * Remove patches, that are incorporated upstream: 11_SetFigFont-params, 12_PNG_imagemap, 17_remove_debug. * Replace 08.1_PS-DSC-fix and 08.2_genps_oldpatterns with 08.2_genps_oldpatterns, which reinvents the code from genps_oldpatterns.[hc], that was removed in 3.2.5.a upstream. This new patch brings the old files back and merged the DSC fixes. * After all this the old 08.2_genps_oldpatterns no longer overwrites the changes of 04_displaywho (Closes: #504985). * Adapt all patches to new upstream version. * 19_cups_workaround: Change PS magic string from PS-Adobe-2.0 to PS to work around incompatibilities with CUPS (Closes: #449267). * Remove trailing spaces from debian/patches/00list to make lintian happy. * Stop ignoring "make clean" errors in debian/rules. * Add lintian.overrides to avoid warning about "tk" typo in description (this isn't a typo here but the value of a parameter). * doc-base: Change section from Apps/Graphics to Graphics. * Change all dependencies from gs* to ghostscript. * Upgrade to Standards-Version 3.8.1 (no changes). * Add some more cleanup from #497004 to 07_avoid_warnings. The main patch from #497004 is incorporate upstream now (Closes: #497004). * 20_transfig_pdftex by Jindrich Makovicka Support pdftex output in transfig (Closes: #497167). * Fix spelling mistakes and other English errors in 14_fig2mpdf and 15_fig2mpdf-doc. Thanks to Dylan Thurston (Closes: #504979). * Update debian/copyright. -- Roland Rosenfeld Wed, 25 Mar 2009 20:23:18 +0100 transfig (1:3.2.5-rel-3.1) unstable; urgency=medium * Non-maintainer upload. * Add '18_fig2ps2tex_bashisms.dpatch' to fix bashisms in fig2ps2tex script (Closes: #480615) * Fix debian/watch file (Closes: #449644) * debian/control: - Change "xutils" Build-Depends to required package "xutils-dev" - Bump Standards-Version 3.8.0 - Move upstream URL to Homepage field -- Chris Lamb Sun, 08 Jun 2008 15:12:08 +0100 transfig (1:3.2.5-rel-3) unstable; urgency=low * Build-Depends: gs-gpl (>= 8.56.dfsg.1-1.1), cause older versions of gs-gpl are broken on ia64 (why the hell are all gs verions broken on 64bit?) * 17_remove_debug.dpatch: Remove debug messages on stderr, which irritate xfig (Closes: #427956). -- Roland Rosenfeld Sat, 16 Jun 2007 18:41:53 +0200 transfig (1:3.2.5-rel-2) unstable; urgency=medium * Build-Depends: gs-gpl, Build-Conflicts: gs-esp (<< 8.50), because gs-esp 8.15.3.dfsg.1-1 segfaults based on this gs-esp in ps2pdf on some architectures (Closes: #424977). -- Roland Rosenfeld Fri, 18 May 2007 22:19:56 +0200 transfig (1:3.2.5-rel-1) unstable; urgency=low * New upstream version 3.2.5. * this includes 10_arrow_tip. * 14_fig2mpdf.dpatch by Michael Pfeiffer : creating multilayered or singlelayer PDF or EPS figures for including into LaTeX documents (see http://p3f.gmxhome.de/fig2mpdf/fig2mpdf.html) This is version 1.2 of the extension. * 15_fig2mpdf-doc.dpatch by Michael Pfeiffer : Contains the documentation of the previous patch. * 08.1_PS-DSC-fix by Ronald Lembcke : makes fig2dev produce more correctly structured PostScript. - Files get printed via Cups on PostScript printers. - When viewing a .ps-file in gv you can go to the last page and back and to the last page again without getting PostScript errors (Closes: #205574, #32843, #407302) * 16_backup_makefile: Backup Makefiles, that are overwritten by build process and restore them at the end. Remove some unnecessary files (which shouldn't be in the orig.tar.gz) at the clean target (Closes: #424210). * Depend on texlive-latex-base, texlive-latex-recommended, texlive-fonts-recommended, texlive-extra-utils, texlive-lang-german instead of tetex-base, tetex-extra. -- Roland Rosenfeld Thu, 17 May 2007 17:54:11 +0200 transfig (1:3.2.5-alpha7-5) unstable; urgency=low * Remove unnecessary dependencies on libz and libX11. -- Roland Rosenfeld Sat, 30 Sep 2006 11:26:42 +0200 transfig (1:3.2.5-alpha7-4) unstable; urgency=low * Search for rgb.txt in /etc/X11/rgb.txt and depend on x11-common, which contains this file (Closes: #385655). -- Roland Rosenfeld Sat, 9 Sep 2006 12:41:20 +0200 transfig (1:3.2.5-alpha7-3) unstable; urgency=low * 10_arrow_tip.dpatch: fixes the bug where arrow heads fell short of the intended endpoint. * 11_SetFigFont-params.dpatch: Rename TeX macro \SetFigFont to \SetFigFontNFSS if NFSS ist defined. This should work around problems of users using PSTEX files generated by old and by new fig2dev in the same document (Closes: #288774) * 12_PNG_imagemap.dpatch by Eugen Dedu Use PNG instead of GIF in HTML image maps (Closes: #258375). -- Roland Rosenfeld Sat, 5 Aug 2006 14:48:49 +0200 transfig (1:3.2.5-alpha7-2) unstable; urgency=low * Upgrade to Standards-Version 3.7.2 (no changes). * Upgrade to debhelper >= 5. * Migrate to dpatch build process. * Build-Depends on xpm-dev >= 1:3.5.4.2 now and change include path accordingly (/usr/include/X11 instead of /usr/X11R6/include). * 08_genps_oldpatterns.dpatch: use genps.oldpatterns.[hc] instead of the new one again, because the new one creates "invisible" patterns in PS/EPS output (Closes: #348034). * 09_maxfontsize.dpatch: For fonts >=42pt use the given font size in TeX instead of restricting this to 42pt. This allows to create posters using \usepackage{type1cm} (Closes: #343139). * Add debian/watch. -- Roland Rosenfeld Sun, 23 Jul 2006 15:49:52 +0200 transfig (1:3.2.5-alpha7-1) unstable; urgency=low * New upstream version 3.2.5-alpha7 - fixed radius of circles in SVG output (Closes: #272466). - fixes conversion of latin1 chars in special text (Closes: #275305). - increasese MAXWIDTH of embedded images from 4K to 8K (Closes: #304958). * Upgrade to Standards-Version 3.6.2 (no changes). * Escape '-' in man page transfig.1. * Remove comment "For: @ ()" from PS files (generated in genps.c and genpictex.c), because we won't ship personal information in output files (Closes: #316382). * Add ru_RU.KOI8-R.ps for russion KOI8-R output (Closes: #310738). -- Roland Rosenfeld Sun, 18 Dec 2005 14:55:41 +0100 transfig (1:3.2.5-alpha5-3) unstable; urgency=low * Remove static redefinition of paperspec in genibmgl.c (after non static definition in fig2dev.h), which causes trouble on gcc 4.0 (Closes: #288599). -- Roland Rosenfeld Sun, 17 Jul 2005 22:42:37 +0200 transfig (1:3.2.5-alpha5-2) unstable; urgency=low * Recommend netpbm (>= 2:10.0-4) instead of suggesting netpbm-nonfree, because the GIF support is no longer nonfree but incorporated in the main netpbm package again (Closes: #271684). -- Roland Rosenfeld Tue, 14 Sep 2004 19:19:34 +0200 transfig (1:3.2.5-alpha5-1) unstable; urgency=low * New upstream version 3.2.5-alpha5. - Add \pagestyle{empty} to epic/eepic preamble to avoid page number (Closes: #240327). * Build-Depends on libxpm-dev instead of xlibs-dev. * Escape '-' in man pages transfig.1 and fig2dev.1. -- Roland Rosenfeld Tue, 11 May 2004 21:43:24 +0200 transfig (1:3.2.5-alpha4-1) unstable; urgency=low * New upstream version 3.2.5-alpha4. * Add some quotes to gensvg.c to make gcc 3.3 happy. * Mention fig2dev in the package description, so users may find it with apt-cache search when they get the error message "fig2dev: command not found" (Closes: #212398). -- Roland Rosenfeld Sat, 21 Feb 2004 19:19:38 +0100 transfig (1:3.2.4-rel-6) unstable; urgency=low * Fix standard colors in LaTeX output (Closes: #220728). -- Roland Rosenfeld Sun, 16 Nov 2003 14:47:20 +0100 transfig (1:3.2.4-rel-5) unstable; urgency=low * Rewrote package description (Closes: #201596). * Add missing \smash{} command to eepic output. Thanks to Martin Godisch (Closes: #201645). * Fix format string mismatch in read_eps_pdf(). Thanks to Kalle Olavi Niemitalo (Closes: #200631). * Upgrade to Standards-Version 3.6.1 (no changes). * Convert the manual from PS to PDF (requires a build dependency on gs-common). * Add a doc-base file to reference the PDF version of the manual. * Install LATEX.AND.XFIG.zh_CN and LATEX.AND.XFIG.zh_TW. * Remove \input{transfig} from manual.tex, because this isn't needed and it redefines \SetFigFont in a way that corrupts the figure in this manual. -- Roland Rosenfeld Sat, 30 Aug 2003 14:06:48 +0200 transfig (1:3.2.4-rel-4) unstable; urgency=low * Removed ununsed varargs.h from fig2dev.h (Closes: #196138). * Add some quotes to gensvg.c to make gcc 3.3 happy. * Disable strict-aliasing (which is usually activated with -O2). * Fix format-string type mismatches (Thanks to Kalle Olavi Niemitalo ). * Add cleandir target to doc/manual/Makefile to fix cleanup process. * Upgrade to Standards-Version 3.5.10 (no changes). -- Roland Rosenfeld Tue, 24 Jun 2003 12:26:14 +0200 transfig (1:3.2.4-rel-3) unstable; urgency=low * Build depend on "libpng12-0-dev | libpng-dev" instead "libpng2". * Fix compiler warnings from fig2dev/dev/gentpic.c to compile without problems on hppa, too. -- Roland Rosenfeld Sun, 6 Apr 2003 15:41:37 +0200 transfig (1:3.2.4-rel-2) unstable; urgency=low * Apply patch.zerobounds by upstream maintainer, which fixes the problem where if there are only LaTeX special texts and no other objects in the figure, a bounding box of 0 width was produced (Closes: #184563). * Apply patch.pdf by upstream maintainer, which changes the pdf export to use eps options, in particular to ignore landscape and never rotate the figure (Closes: #185857). * Upgrade to Standards-Version 3.5.9 (no changes). * Upgrade to debhelper 4.0. -- Roland Rosenfeld Mon, 24 Mar 2003 20:02:44 +0100 transfig (1:3.2.4-rel-1) unstable; urgency=low * New upstream release 3.2.4. - Corrected handling of relative paths in embedded files names (Closes: #171536). - Lists of languages in transfig.c and transfig.h synced again (Closes: #170629). * Upgrade to policy 3.5.8 (no changes). -- Roland Rosenfeld Sat, 21 Dec 2002 15:14:16 +0100 transfig (1:3.2.4-beta5-1) unstable; urgency=low * New upstream beta version 3.2.4-beta5. - fixes the problem that importing more than one or two images causes fig2dev to segfault (Closes: #147062). * Update debian/rules to newer debhelper (>=3.0.0) using dh_installman instead of dh_installmanpages. * Upgrade to Standards-Version: 3.5.7 (new DEB_BUILD_OPTIONS behavior). * Do no longer build-depend on libjpeg, because it is no longer used. -- Roland Rosenfeld Sat, 2 Nov 2002 09:38:31 +0100 transfig (1:3.2.3.d-rel-4) unstable; urgency=low * Apply upstream patch.importsegfault, which fixes the problem that importing more than one or two images causes fig2dev to segfault. -- Roland Rosenfeld Fri, 17 May 2002 20:36:22 +0200 transfig (1:3.2.3.d-rel-3) unstable; urgency=medium * XFIG.AND.LATEX, README.Debian: Add a comment that the transfig pstex driver needs \usepackage{color} (Closes: #77516). * Add % sign after the \end{picture} to avoid bad extra spacing when the generated file is \input into a minipage or a framebox (Closes: #135893). * Applied upstream patch.rotatepics, which fixes skewing rotated images (Closes: #145260). -- Roland Rosenfeld Wed, 1 May 2002 01:00:24 +0200 transfig (1:3.2.3.d-rel-2) unstable; urgency=low * Applying patch cluster from upstream maintainer: - patch.depths: fixes a bug in the -D option (export or exclude certain depths). It wouldn't accept 0 as a depth specifier. - patch.jpeg: fixes the problem where fig2dev uses the "transparentimage" code or JPEG images, which is only supposed to be used for GIF (Closes: #106609). - patch.linejoin: fixes the problem where the line join is not set to "miter" and line cap is not set to "butt", in the document importing a Fig file. - patch.patterns: fixes the bug where the lines in the 45degree left/right patterns were closer together than they should have been. - patch.pdftex: adds the pdftex/pdftex_t export options. -- Roland Rosenfeld Wed, 10 Oct 2001 17:21:18 +0200 transfig (1:3.2.3.d-rel-1) unstable; urgency=low * New upstream release 3.2.3d. -- Roland Rosenfeld Sun, 3 Jun 2001 10:39:43 +0200 transfig (1:3.2.3.d-beta2-2) unstable; urgency=low * Add Build-Depends: libpng2-dev (Closes: #94799). -- Roland Rosenfeld Sun, 22 Apr 2001 21:52:14 +0200 transfig (1:3.2.3.d-beta2-1) unstable; urgency=low * New upstream beta(!) version 3.2.3d-beta2. * Upgrade to policy 3.5.2. * Remove dh_suidregister from debian/rules. * Depend on debhelper >=2.1.6 and remove nostrip handling, which is done by dh_strip now. -- Roland Rosenfeld Wed, 18 Apr 2001 19:55:14 +0200 transfig (1:3.2.3.c-3) unstable; urgency=low * Add xutils to build-dependencies, because xmkmf is needed. (Closes: #80182). -- Roland Rosenfeld Thu, 21 Dec 2000 17:58:18 +0100 transfig (1:3.2.3.c-2) unstable; urgency=low * Correct missing floating point conversions in MetaFont driver (Thanks to Dylan Thurston for sending me Brians patch) (Closes: #79357). * Build-Depends: xlib6g-dev, xpm4g-dev => xlibs-dev (for XFree86 4.0.1). -- Roland Rosenfeld Sat, 16 Dec 2000 13:48:50 +0100 transfig (1:3.2.3.c-1) unstable; urgency=low * New upstream version. * Upgrade to new debhepler: - Change to DH_COMPAT=2. * Upgrade to Standards-Version 3.2.1: - Evaluate DEB_BUILD_OPTIONS for -g and strip. - Move binary and manpage from /usr/X11R6/* to /usr/*. -- Roland Rosenfeld Tue, 10 Oct 2000 00:39:50 +0200 transfig (1:3.2.3.b-1) unstable; urgency=low * New upstream version 3.2.3b. * #include in genpdf.c, otherwise this doesn't compile. * Add \usepackage{color} to doc/manual/setup1.tex (needed for using trans.tex created with the latex driver of fig2dev). * Apply patch.latexppi (by Brian) to fix problems with latex driver. -- Roland Rosenfeld Thu, 20 Jul 2000 12:31:13 +0200 transfig (1:3.2.3-rel-0-4) unstable; urgency=low * Handle transparent color "-3" correct (Closes: #66099). -- Roland Rosenfeld Sun, 2 Jul 2000 18:38:13 +0200 transfig (1:3.2.3-rel-0-3) frozen unstable; urgency=low * "fig2dev -Lps" does not support the -P option, so remove this from the man page (Closes: #60724). * Correct documentation of -p option in fig2dev.1 manpage (patch supplied by upstream author). * Fix problem with missing filename "(null)". Thanks for supplying the patch to reiter@netspace.net.au (Closes: #61971). -- Roland Rosenfeld Fri, 7 Apr 2000 17:49:06 +0200 transfig (1:3.2.3-rel-0-2) frozen unstable; urgency=low * This is a pre-release of the new upstream 3.2.3a. It's a bugfix only release, so it should go into frozen! * This fixes the -f segfault (Closes: #58986). -- Roland Rosenfeld Mon, 28 Feb 2000 21:08:11 +0100 transfig (1:3.2.3-rel-0-1) unstable; urgency=low * New upstream version (munged the official 3.2.3 according to packaging manual section 5 to make it bigger than the betas). -- Roland Rosenfeld Fri, 14 Jan 2000 10:39:17 +0100 transfig (1:3.2.3-beta-4-1) unstable; urgency=low * New upstream version. * This version solves the problems with the PS/LaTeX driver on landscape graphics, with PS as landscape and LaTeX as portrait (Closes: #54540). -- Roland Rosenfeld Wed, 12 Jan 2000 21:04:14 +0100 transfig (1:3.2.3-beta-3-1) unstable; urgency=low * New upstream version (Closes: #54024). -- Roland Rosenfeld Wed, 5 Jan 2000 23:26:55 +0100 transfig (1:3.2.3-beta-1-2) unstable; urgency=low * Add tetex-extra to build-depends, because documentation needs times.sty (Closes: #53195). -- Roland Rosenfeld Tue, 21 Dec 1999 18:24:29 +0100 transfig (1:3.2.3-beta-1-1) unstable; urgency=low * New upstream version (incorporates most patches, only Korean is missing upstream and is now applied by Debian diff). * Removed unused #include * Adapt manual to use LaTeX2e and use \usepackage{times}, which makes manual smaller and more readable as Postscript file. -- Roland Rosenfeld Wed, 15 Dec 1999 21:35:09 +0100 transfig (1:3.2.1-14) unstable; urgency=low * Upgrade to Standards version 3.1.0: Add Build-Depends. * Fix problem with arrow heads in combination with ghostscript 5.50 and some postscript printers. Thanks to Brian V. Smith for the patch. (Closes: #34984). -- Roland Rosenfeld Tue, 16 Nov 1999 10:05:52 +0100 transfig (1:3.2.1-13) unstable; urgency=low * Upgrade to Debian Standards version 3.0.1 * Applied Korean support patch provided by Changwoo Ryu (Closes: #45378). * Replaced LANG with LC_CTYPE in Koran patch, otherwise we will have strange effects with LC_NUMERIC creating "," as the decimal separator, which is wrong for postscript code. * Comment out debug output (added by Koran patch) of locale value in genps.c. -- Roland Rosenfeld Thu, 30 Sep 1999 17:14:43 +0200 transfig (1:3.2.1-12) unstable; urgency=low * Use new japanese.ps from http://member.nifty.ne.jp/tsato/xfig/patch/japanese2-ps * Add -I/usr/include/db1 and #include again. This should work with all versions of libc (Closes: #41369). * Make doc/manual/trans.tex writable (it isn't in orig.tar.gz). * Remove #include from genepic.c, which isn't used. * Get rid of redefinition warning of strchr and use string.h instead of strings.h with linux. -- Roland Rosenfeld Thu, 15 Jul 1999 19:18:44 +0200 transfig (1:3.2.1-11) unstable; urgency=low * Merged in patch collection from upstream author Brian V. Smith , which results in an unofficial transfig 3.2.1a with the following patches: - fixes the problem of uninitialized bounding box vars, which only seem to manifest problems with Sun's native Solaris cc. - Fixes problem where box appears in output - This fixes the difference between xfig and fig2dev splines - fig2dev should always write to stdout if no output file is given. This did not work for all output languages (Closes #24724). - Imakefile patch. -- Roland Rosenfeld Wed, 19 May 1999 19:42:51 +0200 transfig (1:3.2.1-10) unstable; urgency=low * New Debian maintainer. * Added japanese.ps from xfig package which is needed by fig2dev. * Added a note to README.Debian, where to find grafbase.mf, which is needed for the metafont driver. (Closes #11050) * Updated copyright file. -- Roland Rosenfeld Wed, 12 May 1999 22:18:21 +0000 transfig (1:3.2.1-9) frozen unstable; urgency=low * Complied against libc6.1 required some small changes. * Lintian warned against compiling using libjpegg-dev, so libjpeg62-dev is used instead * Lintian v1.1 now gives it a clean bill of health. * Fixes bug #32520, files go into /usr/X11R6 not /usr/lib/X11 * Added note about requiring netpbm-nonfree for gif support, fixes 35686. Still need to modify transfig so it complains when an attempt is made to create a gif images if ppmtogif is not present. -- Edward Betts Wed, 5 May 1999 19:07:55 +0100 transfig (1:3.2.1-8) frozen unstable; urgency=low * Really fix Bug#32520 this time. -- Edward Betts Tue, 2 Feb 1999 22:22:23 +0000 transfig (1:3.2.1-7) frozen unstable; urgency=low * Fixes Bug#32520: transfig: puts files in /usr/lib/X11, should use /usr/X11R6/lib/X11. -- Edward Betts Fri, 29 Jan 1999 19:53:56 +0000 transfig (1:3.2.1-6) frozen unstable; urgency=low * Added a number of includes of stdlib.h for malloc() prototype based on a NMU by Paul Slootman -- Edward Betts Tue, 19 Jan 1999 10:20:50 +0000 transfig (1:3.2.1-5) frozen unstable; urgency=low * Passes Lintian v0.9.5 * Added Recommends: netpbm, gs - Needed for ps and other formats * Added Suggests: netpbm-nonfree - Needed for exporting to gif -- Edward Betts Mon, 28 Dec 1998 23:02:43 +0000 transfig (1:3.2.1-4) frozen unstable; urgency=low * Passes Lintian v0.9.4 - Removed csh script, replaced with sh script because W: transfig: csh-considered-harmful usr/X11R6/bin/fig2ps2tex * Removed suggests: c-shell because no more csh code * Removed dh_link from debian/rules, (dh_link is from an unstable version of debhelper not avaliable in slink). It is no longer needed because of the removal of the csh version of the fig2psp2tex script. Thanks to Paul Slootman for spotting this one, and James Troop reminding me that dh_link is only in the unstable version of debhelper that appears in spud. * Fixed the missing DESTDIR in the install rule of fig2dev/Imakefile. Thanks goes to Paul again for spotting this one. * When installing the documentary, the it was assumed that fig2dev was installed, this has been fixed. This completes the fixing of Bug#30753. And a final thanks goes to Paul for spotting this one. * Removed debian/rules.old - it was a bit silly keeping it. -- Edward Betts Sat, 19 Dec 1998 21:05:55 +0000 transfig (1:3.2.1-3) frozen unstable; urgency=low * New maintainer - Please include in slink so that the maintainer field is correct * Converted to debhelper * Updated standards version to 2.5.0.0 * Passes Lintian v0.9.4 - Apart from W: transfig: csh-considered-harmful usr/X11R6/bin/fig2ps2tex - Added suggests: c-shell to make it happy * Added suggests: xfig -- Edward Betts Thu, 3 Dec 1998 16:53:05 +0000 transfig (1:3.2.1-2) unstable; urgency=low * fig2dev now handles output to stdout (it segfaulted before). fixes: #24725 -- Enrique Zanardi Tue, 21 Jul 1998 16:05:10 +0100 transfig (1:3.2.1-1) unstable; urgency=low * New upstream release -- Enrique Zanardi Wed, 15 Jul 1998 14:53:22 +0100 transfig (1:3.2.0-2.2) frozen unstable; urgency=low * non-maintainer upload because Enrique is busy with the boot-floppies * patch from upstream author to fix annoying bug #21474 * corrected binary target in rules; fixes bug #21249 -- Christian Meder Thu, 14 May 1998 23:52:52 +0200 transfig (1:3.2.0-2.1) frozen unstable; urgency=low * non-maintainer upload for Alpha. * First (!) "binary" target in rules changed to binary-arch. -- Paul Slootman Thu, 16 Apr 1998 23:57:44 +0200 transfig (1:3.2.0-2) unstable; urgency=low * Use double constants for M_PI and M_PI_2, instead of long double constants as defined in /usr/include/math.h. (Fixes Bug#13891) -- Enrique Zanardi Mon, 20 Oct 1997 17:31:04 +0100 transfig (1:3.2.0-1) unstable; urgency=low * New maintainer * Pristine sources * Minor tweaks for libc6 -- Enrique Zanardi Sat, 27 Sep 1997 20:05:48 +0100 transfig (3.2.0-beta2-2) unstable; urgency=low * added fig2dev/fig2dev to shilbdep commandline in debian/rules (fixing bug#6752) -- joost witteveen Tue, 21 Jan 1997 22:33:38 +0100 transfig (3.2.0-beta2-1) unstable; urgency=low * new upstream version -- joost witteveen Sun, 19 Jan 1997 14:47:43 +0100 transfig (3.1.2a-4) unstable; urgency=low * Uses new source format * Added a few doc's from the upstream package. -- joost witteveen Sat, 4 Jan 1997 22:22:34 +0100 debian/compat0000664000000000000000000000000212227260650010370 0ustar 7 debian/rules0000775000000000000000000000361212227260647010262 0ustar #!/usr/bin/make -f # # (C) 1999-2011 Roland Rosenfeld # # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 #export DH_OPTIONS=-v DEBDIR=`pwd`/debian/transfig %: dh $@ override_dh_auto_configure: xmkmf -a override_dh_auto_build: $(MAKE) CDEBUGFLAGS="$(shell dpkg-buildflags --get CFLAGS)" \ EXTRA_LDOPTIONS="$(shell dpkg-buildflags --get LDFLAGS)" \ PROJECT_DEFINES="$(shell dpkg-buildflags --get CPPFLAGS)" [ ! -f doc/manual/trans.tex ] || chmod u+w doc/manual/trans.tex $(MAKE) transfig.man (cd doc/manual; ps2pdf manual.ps) # uudecode fig2mpdf documentation: (cd fig2mpdf/doc && perl uudecode *.uue) (cd fig2mpdf/doc && $(MAKE)) override_dh_clean: [ ! -f Makefile ] || $(MAKE) clean rm -f fig2dev/*.man transfig.man rm -f doc/manual/*.aux doc/manual/*.log doc/manual/*.dvi \ doc/manual/*.ps doc/manual/manual.pdf rm -f doc/manual/trans.tex rm -f fig2mpdf/doc/*.gif fig2mpdf/doc/*.pdf fig2mpdf/doc/*.jpg [ ! -f fig2mpdf/doc/Makefile ] || (cd fig2mpdf/doc && $(MAKE) clean) dh_clean override_dh_auto_install: $(MAKE) install DESTDIR=$(DEBDIR) \ BINDIR=/usr/bin LIBDIR=/usr/share mv -f $(DEBDIR)/usr/bin/fig2ps2tex.sh $(DEBDIR)/usr/bin/fig2ps2tex $(MAKE) install.man DESTDIR=$(DEBDIR) \ MANPATH=/usr/share/man MANSUFFIX=1 install -m644 -oroot -groot debian/override.Lintian \ $(DEBDIR)/usr/share/lintian/overrides/transfig # Install fig2mpdf files: install -m755 fig2mpdf/fig2mpdf $(DEBDIR)/usr/bin/ install -m644 fig2mpdf/fig2mpdf.1 $(DEBDIR)/usr/share/man/man1/ for f in fig2mpdf/doc/*.html fig2mpdf/doc/*.css fig2mpdf/doc/*.gif \ fig2mpdf/doc/*.jpg fig2mpdf/doc/*.lfig \ fig2mpdf/doc/sample-flat.pdf \ fig2mpdf/doc/sample-presentation.pdf; do \ install -m644 $$f $(DEBDIR)/usr/share/doc/transfig/fig2mpdf/; \ done override_dh_installchangelogs: dh_installchangelogs -k CHANGES override_dh_compress: dh_compress -X.pdf debian/doc-base0000664000000000000000000000055712227260650010601 0ustar Document: transfig Title: TransFig: Portable Figures for LaTeX Author: Micah Beck Abstract: Manual for the TransFig package. This manual describes the TransFig package and its components fig2dev and transfig as well as related software and the Fig graphics format (in the old V2.1 version). Section: Graphics Format: pdf Files: /usr/share/doc/transfig/manual.pdf debian/dirs0000664000000000000000000000011312227260650010051 0ustar usr/share/xfig usr/share/doc/transfig/fig2mpdf usr/share/lintian/overrides debian/control0000664000000000000000000000222612254320704010574 0ustar Source: transfig Section: graphics Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Roland Rosenfeld Standards-Version: 3.9.4 Build-Depends: debhelper (>= 7.0.50~), ghostscript, libxpm-dev (>= 1:3.5.4.2), xutils-dev, libpng-dev, texlive-latex-base, texlive-latex-recommended, texlive-fonts-recommended, texlive-font-utils, texlive-lang-german, gawk, latex-beamer Homepage: http://xfig.org/ Package: transfig Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, x11-common, gawk Recommends: netpbm (>= 2:10.0-4), ghostscript Suggests: xfig Multi-Arch: foreign Description: Utilities for converting XFig figure files This package contains utilities (mainly fig2dev) to handle XFig (Facility for Interactive Generation of figures) files. . It can convert them to box, cgm, epic, eepic, eepicemu, emf, eps, gif, ibmgl, jpeg, latex, map (HTML image map), mf (MetaFont), mp (MetaPost), mmp (Multi-Meta-Post), pcx, pdf, pdftex, pdftex_t, pic, pictex, png, ppm, ps, pstex, pstex_t, ptk (Perl/tk), sld (AutoCad slide format), textyl, tiff, tk (Tcl/Tk), tpic, xbm and xpm. debian/watch0000664000000000000000000000031012227260650010215 0ustar # See uscan(1) for format # Compulsory line, this is a version 3 file version=3 opts="dversionmangle=s/-rel$//,uversionmangle=s/([a-z])$/.$1/" http://www.xfig.org/art17.html .*/transfig.(.*).tar.gz debian/README.Debian0000664000000000000000000000211612227260647011241 0ustar transfig for DEBIAN ------------------- Metafont support ================ If you want to use the mf (metafont) output language, you need the grafbase.mf (not graphbase.mf!), which is available from CTAN: graphics/mfpic/source/grafbase.mf CGM support =========== To use the -b (binary) option for CGM export, the ralcgm program is required. This is currently not available as a Debian package, but you may download the sources from ftp://ftp.cc.rl.ac.uk/pub/graphics/ralcgm/ pstex ===== There are many people heaving problems with the pstex driver. The problem is, that newer versions of transfig need \usepackage{color} to work with pstex. So simply add \usepackage{graphicx} and \usepackage{color} to your LaTeX file before using pstex and everything should work correct. Big LaTeX fonts =============== If you want to use LaTeX fonts bigger than 42pt, you have to add \usepackage{type1cm} to your LaTeX file, which switches over to the Type1 vector fonts, that are available in all sizes. Roland Rosenfeld $Id: README.Debian,v 1.6 2006/07/23 12:34:40 roland Exp $ debian/docs0000664000000000000000000000010012227260650010034 0ustar LATEX.AND.XFIG NOTES README doc/tpic.spec doc/manual/manual.pdf debian/patches/0000775000000000000000000000000012227260651010622 5ustar debian/patches/06_gen_manual.patch0000664000000000000000000000134612227260650014261 0ustar Author: Roland Rosenfeld Description: Fix generation of postscript manual. --- a/doc/manual/Makefile +++ b/doc/manual/Makefile @@ -2,13 +2,20 @@ # TransFig makefile # -all: trans.tex +all: trans.tex manual.ps # translation into latex trans.tex: trans.fig Makefile ../../fig2dev/fig2dev -L latex trans.fig > trans.tex clean:: - rm -f trans.tex + rm -f trans.tex *.aux *.log *.dvi *.ps cleandir:: + +manual.ps: manual.dvi + dvips -o $@ $^ + +manual.dvi: manual.tex trans.tex + latex manual.tex + latex manual.tex --- a/doc/manual/manual.tex +++ b/doc/manual/manual.tex @@ -6,7 +6,7 @@ % Document Type: LaTeX % \input{setup12.tex} -\input{transfig} +%\input{transfig} % \newcommand{\version}{2.1.5} % debian/patches/28_fix_fig2dev_chmod.patch0000664000000000000000000000076012227260650015524 0ustar Author: Steven Chamberlain Description: The missing sys/stat.h prototype leads to an implicit declaration of fchmod(), which uses signed int while kFreeBSD expects unsigned int, which results in a wrong bitmap, which leads to a build failure. Bug-Debian: http://bugs.debian.org/654767 --- a/fig2dev/dev/genpstex.c +++ b/fig2dev/dev/genpstex.c @@ -37,6 +37,7 @@ * Jose Alberto. */ +#include #include "fig2dev.h" #include "genps.h" #include "genpdf.h" debian/patches/20_transfig_pdftex.patch0000664000000000000000000000522612227260650015337 0ustar Author: Jindrich Makovicka Description: Support pdftex output in transfig --- a/transfig/mkfile.c +++ b/transfig/mkfile.c @@ -34,7 +34,7 @@ argument *a; char *i; enum language to; - int needps, needeps, needpic, needfig; + int needps, needeps, needpic, needfig, needpdf; fprintf(mk, "#\n# TransFig makefile\n#\n"); @@ -48,7 +48,7 @@ i = a->name; to = a->tolang; - needps = needeps = needpic = needfig = 0; + needps = needeps = needpic = needfig = needpdf =0; fprintf(mk, "\n# translation into %s\n\n", lname[(int)to]); @@ -108,6 +108,7 @@ puttarget(mk, i, "tex", "pdf"); fprintf(mk, "\tfig2dev -L pdftex_t -p %s.pdf ", i); putoptions(mk, altfonts, a->f, a->s, a->m, a->o, i, "tex"); + needpdf = 1; break; case pictex: @@ -177,6 +178,21 @@ putclean(mk, i, "ps" ); } + /* conversion to PDF */ + if (needpdf && a->type != i_pdf) { + if ( a->topdf ) { + puttarget(mk, i, "pdf", iname[(int)a->type]); + fprintf(mk, "\t%s %s.%s > %s.pdf\n", a->topdf, i, iname[(int)a->type], i); + } + else { + putfig(mk, (to == pdftex ? pdftex : pdf), + altfonts, a->f, a->s, a->m, a->o, i, "pdf"); + a->interm = mksuff(i, ".pdf"); + needfig = 1; + } + putclean(mk, i, "pdf" ); + } + /* conversion to eps */ if (needeps && a->type != i_eps) { if ( a->tops ) { --- a/transfig/transfig.c +++ b/transfig/transfig.c @@ -249,6 +249,7 @@ a->tofig = NULL; a->topic = NULL; a->tops = NULL; + a->topdf = NULL; a->tolang = tolang; /* PIC */ @@ -268,6 +269,14 @@ return a; } + /* PDF format */ + if (strip(arg, ".pdf")) + { + a->name = mksuff(arg, ""); + a->type = i_pdf; + return a; + } + /* EPS format */ if (strip(arg, ".eps")) { --- a/transfig/transfig.h +++ b/transfig/transfig.h @@ -35,11 +35,11 @@ textyl, tiff, tk, tpic, xbm, xpm}; #define MAXLANG xpm -enum input {i_apg, i_fig, i_pic, i_ps, i_eps}; +enum input {i_apg, i_fig, i_pic, i_ps, i_eps, i_pdf}; #define MAXINPUT xps typedef struct argument{ - char *name, *interm, *f, *s, *m, *o, *tofig, *topic, *tops; + char *name, *interm, *f, *s, *m, *o, *tofig, *topic, *tops, *topdf; enum language tolang; enum input type; struct argument *next; --- a/transfig/txfile.c +++ b/transfig/txfile.c @@ -116,6 +116,11 @@ fprintf(tx, "\\typeout{TransFig: figures in PostScript.}\n"); break; + case pdftex: + fprintf(tx, "\\typeout{TransFig: figure text in LaTeX.}\n"); + fprintf(tx, "\\typeout{TransFig: figures in PDF.}\n"); + break; + case psfig: fprintf(tx, "\\typeout{TransFig: figures in PostScript w/psfig.}\n"); fprintf(tx, "\\%s{psfig}\n",INCLFIG); debian/patches/04_displaywho.patch0000664000000000000000000000173612227260650014337 0ustar Author: Roland Rosenfeld Description: Remove comment "For: @ ()" from PS files (generated in genps.c and genpictex.c), because we won't ship personal information in output files (Closes: #316382). Bug-Debian: http://bugs.debian.org/316382 --- a/fig2dev/dev/genpictex.c +++ b/fig2dev/dev/genpictex.c @@ -51,7 +51,7 @@ static char *linethick = "1pt"; static char *plotsymbol = "\\makebox(0,0)[l]{\\tencirc\\symbol{'160}}"; static int cur_thickness = -1; -static Boolean anonymous = False; +static Boolean anonymous = True; static void genpictex_option(opt, optarg) --- a/fig2dev/dev/genps.c +++ b/fig2dev/dev/genps.c @@ -79,7 +79,7 @@ static char tmpeps[PATH_MAX]; /* temp filename for eps when adding tiff preview */ static char tmpprev[PATH_MAX]; /* temp filename for ASCII or tiff preview */ -static Boolean anonymous = False; +static Boolean anonymous = True; int pagewidth = -1; int pageheight = -1; int width, height; debian/patches/18_fig2ps2tex_bashisms.patch0000664000000000000000000000123612227260650016042 0ustar Author: Chris Lamb Description: Fix Bashisms in fig2ps2tex /bin/sh script --- a/fig2dev/fig2ps2tex.sh.script +++ b/fig2dev/fig2ps2tex.sh.script @@ -14,11 +14,11 @@ xsp=`echo "scale=3; ( $bbox4 - $bbox2 ) / 72" | bc` ysp=`echo "scale=3; ( $bbox5 - $bbox3 ) / 72" | bc` -echo "\makebox[${xsp}in][l]{" -echo " \vbox to ${ysp}in{" -echo " \vfill" -echo " \special{psfile=$1}" -echo " }" -echo " \vspace{-\baselineskip}" -echo "}" +printf "\makebox[${xsp}in][l]{\n" +printf " \\\vbox to ${ysp}in{\n" +printf " \\\vfill\n" +printf " \special{psfile=$1}\n" +printf " }\n" +printf " \\\vspace{-\\\baselineskip}\n" +printf "}\n" debian/patches/08_genps_oldpatterns.patch0000664000000000000000000011703212227260650015710 0ustar Author: Roland Rosenfeld Description: Reinvent the old genps.oldpatterns.[ch] (removed from 3.2.5a), because the new version does not write the patterns correctly into PS and EPS files (Bug #348034). Bug-Debian: http://bugs.debian.org/348034 --- a/fig2dev/dev/genps.c +++ b/fig2dev/dev/genps.c @@ -186,6 +186,31 @@ FILL_PAT21,FILL_PAT22, }; +int patmat[NUMPATTERNS][2] = { + {16, -8}, + {16, -8}, + {16, -8}, + {16, -16}, + {16, -16}, + {16, -16}, + {16, 16}, + {16, -16}, + {16, -8}, + { 8, -16}, + {16, -16}, + {24, -24}, + {24, -24}, + {24, -24}, + {24, -24}, + {16, -8}, + { 8, -8}, + {16, -16}, + {30, -18}, + {16, -16}, + {16, -8}, + { 8, -16}, + }; + static double scalex, scaley; static double origx, origy; static double userorigx, userorigy; @@ -601,11 +626,11 @@ if (gethostname(host, sizeof(host)) == -1) (void)strcpy(host, "unknown-host!?!?"); + (void) time(&when); fprintf(tfp, "%%%%Title: %s\n", (name? name: ((from) ? from : "stdin"))); fprintf(tfp, "%%%%Creator: %s Version %s Patchlevel %s\n", prog, VERSION, PATCHLEVEL); - (void) time(&when); fprintf(tfp, "%%%%CreationDate: %s", ctime(&when)); if ( !anonymous) { who = getpwuid(getuid()); @@ -771,6 +796,10 @@ /* (rotation and y flipping is done in %%BeginPageSetup area */ if (pats_used) { int i; + fprintf(tfp, "\n%s%s%s", FILL_PROLOG1,FILL_PROLOG2,FILL_PROLOG3); + fprintf(tfp, "\n%s%s%s", FILL_PROLOG4,FILL_PROLOG5,FILL_PROLOG6); + fprintf(tfp, "\n%s%s%s", FILL_PROLOG7,FILL_PROLOG8,FILL_PROLOG9); + fprintf(tfp, "\n%s%s", FILL_PROLOG10,FILL_PROLOG11); /* only define the patterns that are used */ for (i=0; ipic->subtype == P_EPS) { - int len; + int i; fprintf(tfp, "%% EPS file follows:\n"); if ((picf=open_picfile(l->pic->file, &filtype, True, realname)) == NULL) { fprintf(stderr, "Unable to open EPS file '%s': error: %s\n", @@ -1663,13 +1671,8 @@ /* use read/write() calls in case of binary data! */ /* but flush buffer first */ fflush(tfp); - while ((len = read(fileno(picf),buf,sizeof(buf))) > 0) { - /* remove any %EOF or %%EOF in file */ - while (removestr(buf,"\n%EOF\n",&len) != 0) - ; - while (removestr(buf,"\n%%EOF\n",&len) != 0) - ; - write(fileno(tfp),buf,len); + while ((i = read(fileno(picf),buf,sizeof(buf))) > 0) { + write(fileno(tfp),buf,i); } close_picfile(picf,filtype); } @@ -2408,27 +2411,20 @@ else { /* one of the patterns */ int patnum = fill-NUMSHADES-NUMTINTS+1; - char colorspace[13], pencolor[25], fillcolor[25]; - if (grayonly) { float grayfill, graypen; grayfill = rgb2luminance(fill_r, fill_g, fill_b); graypen = rgb2luminance(pen_r, pen_g, pen_b); - sprintf(colorspace, "/DeviceGray"); - sprintf(fillcolor, "%.2f", grayfill); - sprintf(pencolor, "%.2f", graypen); + fprintf(tfp, "gs /PC [[%.2f %.2f %.2f] [%.2f %.2f %.2f]] def\n", + grayfill, grayfill, grayfill, graypen, graypen, graypen); } else { - sprintf(colorspace, "/DeviceRGB"); - sprintf(fillcolor, "%.2f %.2f %.2f", fill_r, fill_g, fill_b); - sprintf(pencolor, "%.2f %.2f %.2f", pen_r, pen_g, pen_b); + fprintf(tfp, "gs /PC [[%.2f %.2f %.2f] [%.2f %.2f %.2f]] def\n", + fill_r, fill_g, fill_b, pen_r, pen_g, pen_b); } - - fprintf(tfp, "\n%% Fill with pattern background color\n"); - fprintf(tfp, "gs %s setcolorspace %s setcolor fill gr\n", - colorspace, fillcolor); - fprintf(tfp, "\n%% Fill with pattern pen color\n"); - fprintf(tfp, "gs %s setcolorspace %s P%d setpattern fill gr\n\n", - colorspace, pencolor, patnum); + fprintf(tfp, "%.2f %.2f sc P%d [%d 0 0 %d %.2f %.2f] PATmp PATsp ef gr PATusp ", + THICK_SCALE, THICK_SCALE, patnum, + patmat[patnum-1][0],patmat[patnum-1][1], + (float)ulx/THICK_SCALE, (float)uly/THICK_SCALE); } } --- a/fig2dev/dev/genps.h +++ b/fig2dev/dev/genps.h @@ -77,553 +77,1003 @@ 4 -2 roll mul srgb} bind def\n\ " + +#define FILL_PROLOG1 "\ +% This junk string is used by the show operators\n\ +/PATsstr 1 string def\n\ +/PATawidthshow { % cx cy cchar rx ry string\n\ + % Loop over each character in the string\n\ + { % cx cy cchar rx ry char\n\ + % Show the character\n\ + dup % cx cy cchar rx ry char char\n\ + PATsstr dup 0 4 -1 roll put % cx cy cchar rx ry char (char)\n\ + false charpath % cx cy cchar rx ry char\n\ + /clip load PATdraw\n\ + % Move past the character (charpath modified the\n\ + % current point)\n\ + currentpoint % cx cy cchar rx ry char x y\n\ + newpath\n\ + moveto % cx cy cchar rx ry char\n\ + % Reposition by cx,cy if the character in the string is cchar\n\ + 3 index eq { % cx cy cchar rx ry\n\ + 4 index 4 index rmoveto\n\ + } if\n\ + % Reposition all characters by rx ry\n\ + 2 copy rmoveto % cx cy cchar rx ry\n\ + } forall\n\ + pop pop pop pop pop % -\n\ + currentpoint\n\ + newpath\n\ + moveto\n\ +} bind def\n\ +" +#define FILL_PROLOG2 "\ +/PATcg {\n\ + 7 dict dup begin\n\ + /lw currentlinewidth def\n\ + /lc currentlinecap def\n\ + /lj currentlinejoin def\n\ + /ml currentmiterlimit def\n\ + /ds [ currentdash ] def\n\ + /cc [ currentrgbcolor ] def\n\ + /cm matrix currentmatrix def\n\ + end\n\ +} bind def\n\ +% PATdraw - calculates the boundaries of the object and\n\ +% fills it with the current pattern\n\ +/PATdraw { % proc\n\ + save exch\n\ + PATpcalc % proc nw nh px py\n\ + 5 -1 roll exec % nw nh px py\n\ + newpath\n\ + PATfill % -\n\ + restore\n\ +} bind def\n\ +" +#define FILL_PROLOG3 "\ +% PATfill - performs the tiling for the shape\n\ +/PATfill { % nw nh px py PATfill -\n\ + PATDict /CurrentPattern get dup begin\n\ + setfont\n\ + % Set the coordinate system to Pattern Space\n\ + PatternGState PATsg\n\ + % Set the color for uncolored pattezns\n\ + PaintType 2 eq { PATDict /PColor get PATsc } if\n\ + % Create the string for showing\n\ + 3 index string % nw nh px py str\n\ + % Loop for each of the pattern sources\n\ + 0 1 Multi 1 sub { % nw nh px py str source\n\ + % Move to the starting location\n\ + 3 index 3 index % nw nh px py str source px py\n\ + moveto % nw nh px py str source\n\ + % For multiple sources, set the appropriate color\n\ + Multi 1 ne { dup PC exch get PATsc } if\n\ + % Set the appropriate string for the source\n\ + 0 1 7 index 1 sub { 2 index exch 2 index put } for pop\n\ + % Loop over the number of vertical cells\n\ + 3 index % nw nh px py str nh\n\ + { % nw nh px py str\n\ + currentpoint % nw nh px py str cx cy\n\ + 2 index oldshow % nw nh px py str cx cy\n\ + YStep add moveto % nw nh px py str\n\ + } repeat % nw nh px py str\n\ + } for\n\ + 5 { pop } repeat\n\ + end\n\ +} bind def\n\ +" +#define FILL_PROLOG4 "\ +% PATkshow - kshow with the current pattezn\n\ +/PATkshow { % proc string\n\ + exch bind % string proc\n\ + 1 index 0 get % string proc char\n\ + % Loop over all but the last character in the string\n\ + 0 1 4 index length 2 sub {\n\ + % string proc char idx\n\ + % Find the n+1th character in the string\n\ + 3 index exch 1 add get % string proc char char+1\n\ + exch 2 copy % strinq proc char+1 char char+1 char\n\ + % Now show the nth character\n\ + PATsstr dup 0 4 -1 roll put % string proc chr+1 chr chr+1 (chr)\n\ + false charpath % string proc char+1 char char+1\n\ + /clip load PATdraw\n\ + % Move past the character (charpath modified the current point)\n\ + currentpoint newpath moveto\n\ + % Execute the user proc (should consume char and char+1)\n\ + mark 3 1 roll % string proc char+1 mark char char+1\n\ + 4 index exec % string proc char+1 mark...\n\ + cleartomark % string proc char+1\n\ + } for\n\ + % Now display the last character\n\ + PATsstr dup 0 4 -1 roll put % string proc (char+1)\n\ + false charpath % string proc\n\ + /clip load PATdraw\n\ + neewath\n\ + pop pop % -\n\ +} bind def\n\ +" +#define FILL_PROLOG5 "\ +% PATmp - the makepattern equivalent\n\ +/PATmp { % patdict patmtx PATmp patinstance\n\ + exch dup length 7 add % We will add 6 new entries plus 1 FID\n\ + dict copy % Create a new dictionary\n\ + begin\n\ + % Matrix to install when painting the pattern\n\ + TilingType PATtcalc\n\ + /PatternGState PATcg def\n\ + PatternGState /cm 3 -1 roll put\n\ + % Check for multi pattern sources (Level 1 fast color patterns)\n\ + currentdict /Multi known not { /Multi 1 def } if\n\ + % Font dictionary definitions\n\ + /FontType 3 def\n\ + % Create a dummy encoding vector\n\ + /Encoding 256 array def\n\ + 3 string 0 1 255 {\n\ + Encoding exch dup 3 index cvs cvn put } for pop\n\ + /FontMatrix matrix def\n\ + /FontBBox BBox def\n\ + /BuildChar {\n\ + mark 3 1 roll % mark dict char\n\ + exch begin\n\ + Multi 1 ne {PaintData exch get}{pop} ifelse % mark [paintdata]\n\ + PaintType 2 eq Multi 1 ne or\n\ + { XStep 0 FontBBox aload pop setcachedevice }\n\ + { XStep 0 setcharwidth } ifelse\n\ + currentdict % mark [paintdata] dict\n\ + /PaintProc load % mark [paintdata] dict paintproc\n\ + end\n\ + gsave\n\ + false PATredef exec true PATredef\n\ + grestore\n\ + cleartomark % -\n\ + } bind def\n\ + currentdict\n\ + end % newdict\n\ + /foo exch % /foo newlict\n\ + definefont % newfont\n\ +} bind def\n\ +" +#define FILL_PROLOG6 "\ +% PATpcalc - calculates the starting point and width/height\n\ +% of the tile fill for the shape\n\ +/PATpcalc { % - PATpcalc nw nh px py\n\ + PATDict /CurrentPattern get begin\n\ + gsave\n\ + % Set up the coordinate system to Pattern Space\n\ + % and lock down pattern\n\ + PatternGState /cm get setmatrix\n\ + BBox aload pop pop pop translate\n\ + % Determine the bounding box of the shape\n\ + pathbbox % llx lly urx ury\n\ + grestore\n\ + % Determine (nw, nh) the # of cells to paint width and height\n\ + PatHeight div ceiling % llx lly urx qh\n\ + 4 1 roll % qh llx lly urx\n\ + PatWidth div ceiling % qh llx lly qw\n\ + 4 1 roll % qw qh llx lly\n\ + PatHeight div floor % qw qh llx ph\n\ + 4 1 roll % ph qw qh llx\n\ + PatWidth div floor % ph qw qh pw\n\ + 4 1 roll % pw ph qw qh\n\ + 2 index sub cvi abs % pw ph qs qh-ph\n\ + exch 3 index sub cvi abs exch % pw ph nw=qw-pw nh=qh-ph\n\ + % Determine the starting point of the pattern fill\n\ + %(px, py)\n\ + 4 2 roll % nw nh pw ph\n\ + PatHeight mul % nw nh pw py\n\ + exch % nw nh py pw\n\ + PatWidth mul exch % nw nh px py\n\ + end\n\ +} bind def\n\ +" +#define FILL_PROLOG7 "\ +% Save the original routines so that we can use them later on\n\ +/oldfill /fill load def\n\ +/oldeofill /eofill load def\n\ +/oldstroke /stroke load def\n\ +/oldshow /show load def\n\ +/oldashow /ashow load def\n\ +/oldwidthshow /widthshow load def\n\ +/oldawidthshow /awidthshow load def\n\ +/oldkshow /kshow load def\n\ +\n\ +% These defs are necessary so that subsequent procs don't bind in\n\ +% the originals\n\ +/fill { oldfill } bind def\n\ +/eofill { oldeofill } bind def\n\ +/stroke { oldstroke } bind def\n\ +/show { oldshow } bind def\n\ +/ashow { oldashow } bind def\n\ +/widthshow { oldwidthshow } bind def\n\ +/awidthshow { oldawidthshow } bind def\n\ +/kshow { oldkshow } bind def\n\ +" +#define FILL_PROLOG8 "\ +/PATredef {\n\ + MyAppDict begin\n\ + {\n\ + /fill { /clip load PATdraw newpath } bind def\n\ + /eofill { /eoclip load PATdraw newpath } bind def\n\ + /stroke { PATstroke } bind def\n\ + /show { 0 0 null 0 0 6 -1 roll PATawidthshow } bind def\n\ + /ashow { 0 0 null 6 3 roll PATawidthshow }\n\ + bind def\n\ + /widthshow { 0 0 3 -1 roll PATawidthshow }\n\ + bind def\n\ + /awidthshow { PATawidthshow } bind def\n\ + /kshow { PATkshow } bind def\n\ + } {\n\ + /fill { oldfill } bind def\n\ + /eofill { oldeofill } bind def\n\ + /stroke { oldstroke } bind def\n\ + /show { oldshow } bind def\n\ + /ashow { oldashow } bind def\n\ + /widthshow { oldwidthshow } bind def\n\ + /awidthshow { oldawidthshow } bind def\n\ + /kshow { oldkshow } bind def\n\ + } ifelse\n\ + end\n\ +} bind def\n\ +false PATredef\n\ +" +#define FILL_PROLOG9 "\ +% Conditionally define setcmykcolor if not available\n\ +/setcmykcolor where { pop } {\n\ + /setcmykcolor {\n\ + 1 sub 4 1 roll\n\ + 3 {\n\ + 3 index add neg dup 0 lt { pop 0 } if 3 1 roll\n\ + } repeat\n\ + setrgbcolor - pop\n\ + } bind def\n\ +} ifelse\n\ +/PATsc { % colorarray\n\ + aload length % c1 ... cn length\n\ + dup 1 eq { pop setgray } { 3 eq { setrgbcolor } { setcmykcolor\n\ + } ifelse } ifelse\n\ +} bind def\n\ +/PATsg { % dict\n\ + begin\n\ + lw setlinewidth\n\ + lc setlinecap\n\ + lj setlinejoin\n\ + ml setmiterlimit\n\ + ds aload pop setdash\n\ + cc aload pop setrgbcolor\n\ + cm setmatrix\n\ + end\n\ +} bind def\n\ +" +#define FILL_PROLOG10 "\ +/PATDict 3 dict def\n\ +/PATsp {\n\ + true PATredef\n\ + PATDict begin\n\ + /CurrentPattern exch def\n\ + % If it's an uncolored pattern, save the color\n\ + CurrentPattern /PaintType get 2 eq {\n\ + /PColor exch def\n\ + } if\n\ + /CColor [ currentrgbcolor ] def\n\ + end\n\ +} bind def\n\ +% PATstroke - stroke with the current pattern\n\ +/PATstroke {\n\ + countdictstack\n\ + save\n\ + mark\n\ + {\n\ + currentpoint strokepath moveto\n\ + PATpcalc % proc nw nh px py\n\ + clip newpath PATfill\n\ + } stopped {\n\ + (*** PATstroke Warning: Path is too complex, stroking\n\ + with gray) =\n\ + cleartomark\n\ + restore\n\ + countdictstack exch sub dup 0 gt\n\ + { { end } repeat } { pop } ifelse\n\ + gsave 0.5 setgray oldstroke grestore\n\ + } { pop restore pop } ifelse\n\ + newpath\n\ +} bind def\n\ +" +#define FILL_PROLOG11 "\ +/PATtcalc { % modmtx tilingtype PATtcalc tilematrix\n\ + % Note: tiling types 2 and 3 are not supported\n\ + gsave\n\ + exch concat % tilingtype\n\ + matrix currentmatrix exch % cmtx tilingtype\n\ + % Tiling type 1 and 3: constant spacing\n\ + 2 ne {\n\ + % Distort the pattern so that it occupies\n\ + % an integral number of device pixels\n\ + dup 4 get exch dup 5 get exch % tx ty cmtx\n\ + XStep 0 dtransform\n\ + round exch round exch % tx ty cmtx dx.x dx.y\n\ + XStep div exch XStep div exch % tx ty cmtx a b\n\ + 0 YStep dtransform\n\ + round exch round exch % tx ty cmtx a b dy.x dy.y\n\ + YStep div exch YStep div exch % tx ty cmtx a b c d\n\ + 7 -3 roll astore % { a b c d tx ty }\n\ + } if\n\ + grestore\n\ +} bind def\n\ +/PATusp {\n\ + false PATredef\n\ + PATDict begin\n\ + CColor PATsc\n\ + end\n\ +} bind def\n\ +" #define FILL_PAT01 "\ +% this is the pattern fill program from the Second edition Reference Manual\n\ +% with changes to call the above pattern fill\n\ % left30\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [-2 -4 10 5]\n\ - /XStep 8\n\ - /YStep 4\n\ - /PaintProc\n\ - {\n\ - pop\n\ - newpath\n\ - .7 setlinewidth\n\ - -2 -1 moveto\n\ - 12 6 rlineto\n\ - stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 32 16 true [ 32 0 0 -16 0 16 ]\n\ + {}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P1 exch def\n\ " #define FILL_PAT02 "\ % right30\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [-2 -4 10 5]\n\ - /XStep 8\n\ - /YStep 4\n\ - /PaintProc\n\ - {\n\ - pop\n\ - newpath\n\ - -2 5 moveto\n\ - .7 setlinewidth\n\ - 12 -6 rlineto\n\ - stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 32 16 true [ 32 0 0 -16 0 16 ]\n\ + {<00030003000c000c0030003000c000c0030003000c000c00\n\ + 30003000c000c00000030003000c000c0030003000c000c0\n\ + 030003000c000c0030003000c000c000>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P2 exch def\n\ " #define FILL_PAT03 "\ % crosshatch30\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [-2 -4 10 5]\n\ - /XStep 8\n\ - /YStep 4\n\ - /PaintProc\n\ - {\n\ - pop\n\ - newpath\n\ - .7 setlinewidth\n\ - -2 5 moveto\n\ - 12 -6 rlineto\n\ - stroke\n\ - newpath\n\ - .7 setlinewidth\n\ - -2 -1 moveto\n\ - 12 6 rlineto\n\ - stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 32 16 true [ 32 0 0 -16 0 16 ]\n\ + {<033003300c0c0c0c30033003c000c000300330030c0c0c0c\n\ + 0330033000c000c0033003300c0c0c0c30033003c000c000\n\ + 300330030c0c0c0c0330033000c000c0>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P3 exch def\n\ " #define FILL_PAT04 "\ % left45\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [-1 -1 9 9]\n\ - /XStep 8\n\ - /YStep 8\n\ - /PaintProc\n\ - {\n\ - pop\n\ - newpath\n\ - 1 setlinewidth\n\ - -1 -1 moveto\n\ - 9 9 lineto\n\ - stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 20 20 true [ 20 0 0 -20 0 20 ]\n\ + {<8020004010002008001004000802000401000200\n\ + 8001004000802000401080200040100020080010\n\ + 0400080200040100020080010040008020004010>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P4 exch def\n\ " #define FILL_PAT05 "\ % right45\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [-1 -1 9 9]\n\ - /XStep 8\n\ - /YStep 8\n\ - /PaintProc\n\ - {\n\ - pop\n\ - newpath\n\ - 1 setlinewidth\n\ - -1 9 moveto\n\ - 9 -1 lineto\n\ - stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 20 20 true [ 20 0 0 -20 0 20 ]\n\ + {<0040100080200100400200800401000802001004\n\ + 0020080040100080200000401000802001004002\n\ + 0080040100080200100400200800401000802000>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P5 exch def\n\ " #define FILL_PAT06 "\ % crosshatch45\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [-1 -1 9 9] \n\ - /XStep 8\n\ - /YStep 8\n\ - /PaintProc\n\ - {\n\ - pop\n\ - newpath\n\ - 1 setlinewidth\n\ - -1 9 moveto\n\ - 9 -1 lineto\n\ - stroke\n\ - -1 -1 moveto\n\ - 9 9 lineto\n\ - stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 20 20 true [ 20 0 0 -20 0 20 ]\n\ + {<8020004050102088201104400a02800401000a02\n\ + 8011044020882040501080200040501020882011\n\ + 04400a02800401000a0280110440208820405010>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P6 exch def\n\ " #define FILL_PAT07 "\ % bricks\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [-1 0 17 17] % At least linewidth bigger than Xstep and Ystep\n\ - /XStep 16 % These numbers mimic old Xfig bitmaps\n\ - /YStep 16\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 1 setlinewidth 0 setlinecap\n\ - newpath 0 0 moveto 0 8 lineto stroke\n\ - newpath 8 8 moveto 8 16 lineto stroke\n\ - newpath 0 8 moveto 16 8 lineto stroke\n\ - newpath 0 16 moveto 16 16 lineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 16 16 true [ 16 0 0 -16 0 16 ]\n\ + {<008000800080008000800080\n\ + 0080ffff8000800080008000\n\ + 800080008000ffff>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P7 exch def\n\ " #define FILL_PAT08 "\ % vertical bricks\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [0 -1 17 17] % At least linewidth bigger than Xstep and Ystep\n\ - /XStep 16\n\ - /YStep 16\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 1 setlinewidth 0 setlinecap\n\ - newpath 0 0 moveto 8 0 lineto stroke\n\ - newpath 8 8 moveto 16 8 lineto stroke\n\ - newpath 8 0 moveto 8 16 lineto stroke\n\ - newpath 16 0 moveto 16 16 lineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 16 16 true [ 16 0 0 -16 0 16 ]\n\ + { }\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P8 exch def\n\ " #define FILL_PAT09 "\ % horizontal lines\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [0 0 4 4] % At least linewidth bigger than Xstep and Ystep\n\ - /XStep 4\n\ - /YStep 4\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 1 setlinewidth 0 setlinecap\n\ - newpath 0 3.5 moveto 4 3.5 lineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 16 8 true [ 16 0 0 -8 0 8 ]\n\ + {< ffff000000000000ffff000000000000>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P9 exch def\n\ " #define FILL_PAT10 "\ % vertical lines\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [0 0 4 4]\n\ - /XStep 4\n\ - /YStep 4\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 1 setlinewidth 0 setlinecap\n\ - newpath 3.5 0 moveto 3.5 4 lineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 8 16 true [ 8 0 0 -16 0 16 ]\n\ + {<11111111111111111111111111111111>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P10 exch def\n\ " #define FILL_PAT11 "\ % crosshatch lines\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [0 0 4 4]\n\ - /XStep 4\n\ - /YStep 4\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 1 setlinewidth 0 setlinecap\n\ - newpath 3.5 0 moveto 3.5 4 lineto stroke\n\ - newpath 0 3.5 moveto 4 3.5 lineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 16 16 true [ 16 0 0 -16 0 16 ]\n\ + {}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P11 exch def\n\ " #define FILL_PAT12 "\ % left-shingles\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [0 0 25 24]\n\ - /XStep 24\n\ - /YStep 24\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 1 setlinewidth 0 setlinecap\n\ - newpath 0 0.5 moveto 24 0.5 lineto stroke\n\ - newpath 0 8.5 moveto 24 8.5 lineto stroke\n\ - newpath 0 16.5 moveto 24 16.5 lineto stroke\n\ - newpath 4 24.5 moveto 8 16.5 lineto stroke\n\ - newpath 16 0.5 moveto 12 8.5 lineto stroke\n\ - newpath 20 16.5 moveto 24 8.5 lineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 48 48 true [ 48 0 0 -48 0 48 ]\n\ + {<000000000001000000000001000000000002000000000002\n\ + 000000000004000000000004000000000008000000000008\n\ + 000000000010000000000010000000000020000000000020\n\ + 000000000040000000000040000000000080ffffffffffff\n\ + 000000010000000000010000000000020000000000020000\n\ + 000000040000000000040000000000080000000000080000\n\ + 000000100000000000100000000000200000000000200000\n\ + 000000400000000000400000000000800000ffffffffffff\n\ + 000100000000000100000000000200000000000200000000\n\ + 000400000000000400000000000800000000000800000000\n\ + 001000000000001000000000002000000000002000000000\n\ + 004000000000004000000000008000000000ffffffffffff>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P12 exch def\n\ " #define FILL_PAT13 "\ % right-shingles\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [0 0 25 24]\n\ - /XStep 24\n\ - /YStep 24\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 1 setlinewidth 0 setlinecap\n\ - newpath 0 0.5 moveto 24 0.5 lineto stroke\n\ - newpath 0 8.5 moveto 24 8.5 lineto stroke\n\ - newpath 0 16.5 moveto 24 16.5 lineto stroke\n\ - newpath 4 8.5 moveto 8 16.5 lineto stroke\n\ - newpath 12 0.5 moveto 16 8.5 lineto stroke\n\ - newpath 20 16.5 moveto 24 24.5 lineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 48 48 true [ 48 0 0 -48 0 48 ]\n\ + {<000000000080000000000080000000000040000000000040\n\ + 000000000020000000000020000000000010000000000010\n\ + 000000000008000000000008000000000004000000000004\n\ + 000000000002000000000002000000000001ffffffffffff\n\ + 008000000000008000000000004000000000004000000000\n\ + 002000000000002000000000001000000000001000000000\n\ + 000800000000000800000000000400000000000400000000\n\ + 000200000000000200000000000100000000ffffffffffff\n\ + 000000800000000000800000000000400000000000400000\n\ + 000000200000000000200000000000100000000000100000\n\ + 000000080000000000080000000000040000000000040000\n\ + 000000020000000000020000000000010000ffffffffffff>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P13 exch def\n\ " #define FILL_PAT14 "\ % vertical left-shingles\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [0 0 24 25]\n\ - /XStep 24\n\ - /YStep 24\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 1 setlinewidth 0 setlinecap\n\ - newpath 0.5 0 moveto 0.5 24 lineto stroke\n\ - newpath 8.5 0 moveto 8.5 24 lineto stroke\n\ - newpath 16.5 0 moveto 16.5 24 lineto stroke\n\ - newpath 8.5 4 moveto 16.5 8 lineto stroke\n\ - newpath 0.5 12 moveto 8.5 16 lineto stroke\n\ - newpath 16.5 20 moveto 24.5 24 lineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 48 48 true [ 48 0 0 -48 0 48 ]\n\ + {<000100010001000100010001000100010001000100010001\n\ + 000100010001000100010001000100010001000100010001\n\ + 000180010001000160010001000118010001000106010001\n\ + 000101810001000100610001000100190001000100070001\n\ + 000100010001000100010001000100010001000100010001\n\ + 000100010001000100010001000100010001000100010001\n\ + 000100018001000100016001000100011801000100010601\n\ + 000100010181000100010061000100010019000100010007\n\ + 000100010001000100010001000100010001000100010001\n\ + 000100010001000100010001000100010001000100010001\n\ + 800100010001600100010001180100010001060100010001\n\ + 018100010001006100010001001900010001000700010001>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P14 exch def\n\ " #define FILL_PAT15 "\ % vertical right-shingles\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [0 0 25 25]\n\ - /XStep 24\n\ - /YStep 24\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 1 setlinewidth 0 setlinecap\n\ - newpath 0.5 0 moveto 0.5 24 lineto stroke\n\ - newpath 8.5 0 moveto 8.5 24 lineto stroke\n\ - newpath 16.5 0 moveto 16.5 24 lineto stroke\n\ - newpath 24.5 4 moveto 16.5 8 lineto stroke\n\ - newpath 0.5 16 moveto 8.5 12 lineto stroke\n\ - newpath 16.5 20 moveto 8.5 24 lineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 48 48 true [ 48 0 0 -48 0 48 ]\n\ + {<000100010001000100010001000100010001000100010001\n\ + 000100010001000100010001000100010001000100010001\n\ + 000100010007000100010019000100010061000100010181\n\ + 000100010601000100011801000100016001000100018001\n\ + 000100010001000100010001000100010001000100010001\n\ + 000100010001000100010001000100010001000100010001\n\ + 000100070001000100190001000100610001000101810001\n\ + 000106010001000118010001000160010001000180010001\n\ + 000100010001000100010001000100010001000100010001\n\ + 000100010001000100010001000100010001000100010001\n\ + 000700010001001900010001006100010001018100010001\n\ + 060100010001180100010001600100010001800100010001>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P15 exch def\n\ " #define FILL_PAT16 "\ % fishscales\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [0 -1 17 9]\n\ - /XStep 16\n\ - /YStep 8\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 0.7 setlinewidth 0 setlinecap\n\ - newpath 8 -7 11 43 137 arc stroke\n\ - newpath 0 -3 11 43 137 arc stroke\n\ - newpath 16 -3 11 43 137 arc stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 32 16 true [ 32 0 0 -16 0 16 ]\n\ + {<0007e000000c30000018180000700e0001c003800f0000f0\n\ + 7800001ec0000003600000063000000c180000180e000070\n\ + 038001c000f00f00001e78000003c000>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P16 exch def\n\ " #define FILL_PAT17 "\ % small fishscales\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [0 -0.5 8 8.5]\n\ - /XStep 8\n\ - /YStep 8\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 0.7 setlinewidth 0 setlinecap\n\ - newpath 4 0 4 0 180 arc stroke\n\ - newpath 0 4 4 0 180 arc stroke\n\ - newpath 8 4 4 0 180 arc stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 16 16 true [ 16 0 0 -16 0 16 ]\n\ + {<008000800080014001400220\n\ + 0c187007c001800080004001\n\ + 40012002180c0770>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P17 exch def\n\ " #define FILL_PAT18 "\ % circles\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [-0.35 -0.35 16.35 16.35] % (0, 16) plus 1/2 linewidth\n\ - /XStep 16\n\ - /YStep 16\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 0.7 setlinewidth 0 setlinecap\n\ - newpath 8 8 8 0 360 arc stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 48 48 true [ 48 0 0 -48 0 48 ]\n\ + {<000007f000000000780f000000038000e000000c00001800\n\ + 001000000400006000000300008000000080010000000040\n\ + 020000000020040000000010040000000010080000000008\n\ + 100000000004100000000004200000000002200000000002\n\ + 200000000002400000000001400000000001400000000001\n\ + 400000000001800000000000800000000000800000000000\n\ + 800000000000800000000000800000000000800000000000\n\ + 400000000001400000000001400000000001400000000001\n\ + 200000000002200000000002200000000002100000000004\n\ + 100000000004080000000008040000000010040000000010\n\ + 020000000020010000000040008000000080006000000300\n\ + 001000000400000c0000180000038000e0000000780f0000>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P18 exch def\n\ " #define FILL_PAT19 "\ % hexagons\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 1\n\ - /BBox [-0.5 -0.35 27 17]\n\ - /XStep 26\n\ - /YStep 16\n\ - /PaintProc\n\ - {\n\ - pop\n\ - 0.7 setlinewidth 0 setlinejoin newpath\n\ - 4 0 moveto\n\ - 9 0 rlineto % right\n\ - 4 8 rlineto % up-right\n\ - -4 8 rlineto % up-left\n\ - -9 0 rmoveto % back\n\ - -4 -8 rlineto % down-left\n\ - 4 -8 rlineto 1 0 rlineto stroke % down-right\n\ - newpath 17 8 moveto 9 0 rlineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 60 36 true [ 60 0 0 -36 0 36 ]\n\ + {<008000040000000001000002000000000100000200000000\n\ + 020000010000000002000001000000000400000080000000\n\ + 040000008000000008000000400000000800000040000000\n\ + 100000002000000010000000200000002000000010000000\n\ + 200000001000000040000000080000004000000008000000\n\ + 800000000400000080000000040000000000000003fffff0\n\ + 800000000400000080000000040000004000000008000000\n\ + 400000000800000020000000100000002000000010000000\n\ + 100000002000000010000000200000000800000040000000\n\ + 080000004000000004000000800000000400000080000000\n\ + 020000010000000002000001000000000100000200000000\n\ + 0100000200000000008000040000000000fffffc00000000>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P19 exch def\n\ " #define FILL_PAT20 "\ % octagons\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 2\n\ - /BBox [0 0 16 16]\n\ - /XStep 16\n\ - /YStep 16\n\ - /PaintProc\n\ - {\n\ - pop\n\ - .8 setlinewidth 0 setlinejoin newpath\n\ - 5 0 moveto 6 0 rlineto 5 5 rlineto 0 6 rlineto\n\ - -5 5 rlineto -6 0 rlineto -5 -5 rlineto 0 -6 rlineto closepath stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 32 32 true [ 32 0 0 -32 0 32 ]\n\ + {<003fff000040008000800040010000200200001004000008\n\ + 080000041000000220000001400000008000000080000000\n\ + 800000008000000080000000800000008000000080000000\n\ + 800000008000000080000000800000008000000080000000\n\ + 400000012000000210000004080000080400001002000020\n\ + 0100004000800080>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P20 exch def\n\ " #define FILL_PAT21 "\ % horizontal sawtooth lines\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 1\n\ - /BBox [0 0 8 8]\n\ - /XStep 8\n\ - /YStep 8\n\ - /PaintProc\n\ - {\n\ - pop\n\ - .8 setlinewidth 0 setlinejoin newpath\n\ - -1 3 moveto 1 -1 rlineto 4 4 rlineto 4 -4 rlineto 1 1 rlineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 32 16 true [ 32 0 0 -16 0 16 ]\n\ + {<000000000000000000000000000000000000000000000000\n\ + 000000000100010002800280044004400820082010101010\n\ + 20082008400440048002800200010001>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P21 exch def\n\ " #define FILL_PAT22 "\ % vertical sawtooth lines\n\ -<<\n\ - /PatternType 1\n\ - /PaintType 2\n\ - /TilingType 1\n\ - /BBox [0 0 8.5 8]\n\ - /XStep 8\n\ - /YStep 8\n\ - /PaintProc\n\ - {\n\ - pop\n\ - .8 setlinewidth 0 setlinejoin newpath\n\ - 3 -1 moveto -1 1 rlineto 4 4 rlineto -4 4 rlineto 1 1 rlineto stroke\n\ - } bind\n\ -\n\ ->>\n\ -\n\ -matrix\n\ -makepattern\n\ +11 dict begin\n\ +/PaintType 1 def\n\ +/PatternType 1 def\n\ +/TilingType 1 def\n\ +/BBox [0 0 1 1] def\n\ +/XStep 1 def\n\ +/YStep 1 def\n\ +/PatWidth 1 def\n\ +/PatHeight 1 def\n\ +/Multi 2 def\n\ +/PaintData [\n\ + { clippath } bind\n\ + { 16 32 true [ 16 0 0 -32 0 32 ]\n\ + {<400020001000080004000200010000800100020004000800\n\ + 100020004000800040002000100008000400020001000080\n\ + 01000200040008001000200040008000>}\n\ + imagemask } bind\n\ +] def\n\ +/PaintProc {\n\ + pop\n\ + exec fill\n\ +} def\n\ +currentdict\n\ +end\n\ /P22 exch def\n\ " debian/patches/13_remove_extralibs.patch0000664000000000000000000000073412227260650015523 0ustar Author: Roland Rosenfeld Description: Remove unnecessary dependencies on libz and libX11. --- a/fig2dev/Imakefile +++ b/fig2dev/Imakefile @@ -154,12 +154,12 @@ #ifdef USEPNG DUSEPNG = -DUSE_PNG -PNGLIBS = -L$(PNGLIBDIR) -lpng -L$(ZLIBDIR) -lz +PNGLIBS = -L$(PNGLIBDIR) -lpng #endif /* USEPNG */ #ifdef USEXPM DUSEXPM = -DUSE_XPM -XPMLIBS = -L$(XPMLIBDIR) -lXpm -lX11 +XPMLIBS = -L$(XPMLIBDIR) -lXpm #endif /* USEXPM */ #if defined(NOSTRSTR) debian/patches/02_ru_RU.KOI8-R.patch0000664000000000000000000000072612227260650014114 0ustar Author: Roland Rosenfeld Description: Add ru_RU.KOI8-R.ps for russion KOI8-R output (Closes: #310738). Bug-Debian: http://bugs.debian.org/310738 --- a/fig2dev/dev/Imakefile +++ b/fig2dev/dev/Imakefile @@ -69,5 +69,6 @@ $(LN) cs_CZ.ps hr_HR.ps; $(LN) cs_CZ.ps hu_HU.ps; \ $(LN) cs_CZ.ps ro_RO.ps; $(LN) cs_CZ.ps pl_PL.ps; \ $(LN) cs_CZ.ps sk_SK.ps; $(LN) cs_CZ.ps sl_SI.ps ) + InstallNonExecFile(ru_RU.KOI8-R.ps,FIG2DEV_LIBDIR) #endif debian/patches/21_rename_optopt.patch0000664000000000000000000000234412227260650015023 0ustar Author: Roland Rosenfeld Description: rename optopt parameter name in getopt.c to make mips/mipsel happy (otherwise their linker fails with the message /usr/bin/ld: non-dynamic relocations refer to dynamic symbol optopt@@GLIBC_2.0 --- a/fig2dev/getopt.c +++ b/fig2dev/getopt.c @@ -52,11 +52,11 @@ */ int opterr = 1, /* useless, never set or used */ optind = 1, /* index into parent argv vector */ - optopt; /* character checked for validity */ + fig_optopt; /* character checked for validity */ char *optarg; /* argument associated with option */ #define tell(s) fputs(*nargv,stderr);fputs(s,stderr); \ - fputc(optopt,stderr);fputc('\n',stderr);return(BADCH); + fputc(fig_optopt,stderr);fputc('\n',stderr);return(BADCH); int fig_getopt(nargc,nargv,ostr) @@ -75,7 +75,7 @@ return(EOF); } } /* option letter okay? */ - if ((optopt = (int)*place++) == ARGCH || !(oli = index(ostr,optopt))) { + if ((fig_optopt = (int)*place++) == ARGCH || !(oli = index(ostr,fig_optopt))) { if(!*place) ++optind; tell(": illegal option -- "); } @@ -93,6 +93,6 @@ place = EMSG; ++optind; } - return(optopt); /* dump back option letter */ + return(fig_optopt); /* dump back option letter */ } debian/patches/29_implict-declaration.patch0000664000000000000000000000474511741357331016115 0ustar Author: Roland Rosenfeld Description: Get rid of several "implicit declaration of function" warnings. --- a/fig2dev/fig2dev.c +++ b/fig2dev/fig2dev.c @@ -42,7 +42,6 @@ void help_msg(); void depth_option(); -int depth_filter(int); /* hex names for Fig colors */ char *Fig_color_names[] = { --- a/fig2dev/fig2dev.h +++ b/fig2dev/fig2dev.h @@ -116,6 +116,7 @@ extern void unpsfont(); extern void print_comments(); extern int lookup_X_color(); +extern int depth_filter(int); extern char Err_badarg[]; extern char Err_mem[]; --- a/fig2dev/bound.c +++ b/fig2dev/bound.c @@ -17,6 +17,7 @@ #include "fig2dev.h" #include "object.h" #include "bound.h" +#include "localmath.h" extern int adjust_boundingbox; --- a/fig2dev/dev/gendxf.c +++ b/fig2dev/dev/gendxf.c @@ -40,6 +40,7 @@ #include "fig2dev.h" #include "object.h" +#include "localmath.h" static void set_style(); --- a/fig2dev/dev/genpictex.c +++ b/fig2dev/dev/genpictex.c @@ -27,6 +27,7 @@ #include "genlatex.h" #include "setfigfont.h" #include "texfonts.h" +#include "localmath.h" #define UNIT "cm" /* dip */ #define CONVUNIT 2.54 /* dip */ --- a/fig2dev/dev/genpstex.c +++ b/fig2dev/dev/genpstex.c @@ -43,6 +43,7 @@ #include "genpdf.h" #include "object.h" #include "texfonts.h" +#include "setfigfont.h" extern double rad2deg; --- a/fig2dev/localmath.h +++ b/fig2dev/localmath.h @@ -15,4 +15,5 @@ * */ -void arc_tangent(); +void arc_tangent(double, double, double, double, double *, double *, int); +void arc_tangent_int(double, double, double, double, int *, int *, int); --- a/fig2dev/dev/gentextyl.c +++ b/fig2dev/dev/gentextyl.c @@ -28,6 +28,7 @@ #include "fig2dev.h" #include "object.h" #include "texfonts.h" +#include "localmath.h" static void putline(); --- a/transfig/sys.c +++ b/transfig/sys.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "transfig.h" #define MAXSYS 10000 --- a/transfig/transfig.c +++ b/transfig/transfig.c @@ -26,6 +26,7 @@ #include #include +#include #include "patchlevel.h" #include "transfig.h" --- a/transfig/transfig.h +++ b/transfig/transfig.h @@ -50,8 +50,12 @@ extern char *iname[]; extern char *sysls(), *mksuff(); +extern void sysmv(char *); + extern argument *arglist; extern char *txfile, *mkfile; +extern void texfile(FILE *, char *, argument *); +extern void makefile(FILE *, int, argument *); extern char *optarg; extern int optind; debian/patches/09_maxfontsize.patch0000664000000000000000000000335312227260650014525 0ustar Author: Roland Rosenfeld Description: For fonts >=42pt use the given font size in TeX instead of restricting this to 42pt. This allows to create posters using \usepackage{type1cm}. See http://linuxgazette.vlsm.org/issue96/artime.html and Bug#343139 Bug-Debian: http://bugs.debian.org/343139 --- a/LATEX.AND.XFIG +++ b/LATEX.AND.XFIG @@ -55,7 +55,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LaTeX Preamble %%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\documentstyle[12pt,bezier,amstex]{article} % include bezier curves +\documentclass[12pt,bezier,amstex]{article} % include bezier curves \renewcommand\baselinestretch{1.0} % single space \pagestyle{empty} % no headers and page numbers \oddsidemargin -10 true pt % Left margin on odd-numbered pages. @@ -72,7 +72,9 @@ \usepackage{epsfig} \usepackage{graphicx} % Graphics package - + +\usepackage{type1cm} % Necessary for fonts bigger than 42pt + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Document Beginning %%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- a/fig2dev/dev/texfonts.h +++ b/fig2dev/dev/texfonts.h @@ -83,9 +83,11 @@ #endif #define TEXFONT(F) (texfontnames[((F) <= MAX_FONT) ? (F) : (MAX_FONT-1)]) - +/* #define TEXFONTSIZE(S) (texfontsizes[((S) <= MAXFONTSIZE) ? (int)(round(S))\ : (MAXFONTSIZE-1)]) +*/ +#define TEXFONTSIZE(S) (((S) <= MAXFONTSIZE) ? texfontsizes[(int)(round(S))] : (S)) #define TEXFONTMAG(T) TEXFONTSIZE(T->size*(rigid_text(T) ? 1.0 : fontmag)) void setfigfont( F_text *text ); /* genepic.c */ debian/patches/14_fig2mpdf.patch0000664000000000000000000011717212227260650013655 0ustar Author: Michael Pfeiffer Description: creating multilayered or singlelayer PDF or EPS figures for including into LaTeX documents. Origin: http://p3f.gmxhome.de/fig2mpdf/fig2mpdf.html --- a/doc/fig2dev.1 +++ b/doc/fig2dev.1 @@ -53,8 +53,8 @@ \fBbox, cgm, epic, eepic, eepicemu, emf, eps, gbx (Gerber beta driver), gif, ibmgl, jpeg, latex, map (HTML image map), mf (MetaFont), mp (MetaPost), mmp (Multi-MetaPost), -pcx, pdf, pdftex, pdftex_t, pic, pictex, png, ppm, ps, -pstex, pstex_t, pstricks, ptk (Perl/tk), +pcx, pdf, pdftex, pdftex_t, pdftex_p, pic, pictex, png, ppm, ps, +pstex, pstex_t, pstex_p, pstricks, ptk (Perl/tk), shape (LaTeX shaped paragraphs), sld (AutoCad slide format), svg (beta driver), textyl, tiff, tk (tcl/tk), tpic, xbm and @@ -1062,6 +1062,62 @@ font. Option 1 sets LaTeX font size only. Option 2 issues no font commands at all. +.SH PSTEX_P and PDFTEX_P OPTIONS +The \fBpstex_p\fR language has the same intention as +the combination of \fBpstex\fR and \fBpstex_t\fR. +The only reason to use \fBpstex_p\fR is that you have partially overlayed texts. +\fBpstex_p\fR splits the Fig file concerning the depths of existing texts. Because +of it's necessary to get the resulting size of the figure for the pdf document +you have to specify the target document format +(i.e. using \fBpstex_p\fR rsp. \fBpdftex_p\fR). +.br +Two files results by using this language: +.br +.HP +.3i +1) A bash script for creating and removing the necessary graphics files. +Extension: \fB.create\fR +.HP +.3i +.HP +.3i +2) The latex code which includes all graphics files and special texts. Content is +put to stdout. + +.TP +The \fBpstex_p\fR driver has the following special options: + +.TP +.B \-p basename +specifies the basename of the files to be created (see (1) above). This option +is mandatory. +.TP +.B "\-d dmag" +Set a separate magnification for the length of line dashes to +.I dmag. +.TP +.B \-E num +Set encoding for latex text translation (0 no translation, 1 ISO-8859-1, 2 ISO-8859-2) +.TP +.B "\-l lwidth" +Sets the threshold between LaTeX thin and thick lines to +.I lwidth +pixels. +LaTeX supports only two different line width: \\thinlines and \\thicklines. +Lines of width greater than +.I lwidth +pixels are drawn as \\thicklines. +Also affects the size of dots in dotted line style. +The default is 1. +.TP +.B \-v +Verbose mode. +.TP +.B \-F +Don't set the font face, series, and style; only set it's size and the +baselineskip. By default, fig2dev sets all 5 font parameters when it +puts some text. The disadvantage is that you can't set the font from your +LaTeX document. With this option on, you can set the font from your LaTeX +document (like "\fB\\sfshape \\input picture.eepic\fR"). + + .SH TK and PTK OPTIONS (tcl/tk and Perl/tk) .TP .B \-l dummy_arg @@ -1107,6 +1163,13 @@ .PP Rotated text is only supported in the IBM-GL (HP/GL) and PostScript (including eps) languages. +.PP +In \fBpdftex_p\fR language \fIfig2dev\fR can not determine the exact sizes of +the special texts set by pdflatex afterwards. If these texts are bigger than +expected the calculated bounding box might be too small so that some texts passes +over the figure boundaries. If this happen you have to put an invisible +rectangle (line width 0) around the text or the entire figure. + .SH COPYRIGHT Copyright (c) 1991 Micah Beck .br @@ -1187,3 +1250,7 @@ The GBX (Gerber) driver was written by .br Edward Grace (ej.grace@imperial.ac.uk). +.sp +The PSTEX_P and PDFTEX_P drivers (overlayed LaTeX texts) was written by +.br +Michael Pfeiffer (p3f@gmx.de) --- a/fig2dev/dev/genpstex.c +++ b/fig2dev/dev/genpstex.c @@ -70,7 +70,307 @@ genps_end (); static char pstex_file[1000] = ""; +static int iObjectsRead = 0; +static int iTextRead = 0; +static int iObjectsFileNumber = 0; +static int iStartDepth; +static int iLastDepth; +static FILE * ptCreateFile; +static char szFileName[1000]; +static int iLength; +static int iPdfOutputs = 0; + +#ifdef never +static double unitlength; +static double dash_mag = 1.0; +static int (*translate_coordinates)() = NULL; +static int (*translate_coordinates_d)() = NULL; +#else +extern double unitlength; +extern double dash_mag; + +extern int (*translate_coordinates)(); +extern int (*translate_coordinates_d)(); +#endif + +#define TOP 840 +#define SWAP(x,y) {tmp=x; x=y; y=tmp;} +#define TRANS(x,y) (*translate_coordinates)(&x,&y) +#define TRANS2(x1,y1,x2,y2) (*translate_coordinates)(&x1,&y1); \ + (*translate_coordinates)(&x2,&y2) +#define TRANSD(x,y) (*translate_coordinates_d)(&x,&y) + +static void genpstex_p_finalize_objects(int depth); + +/************************************************************************* + *************************************************************************/ +static +translate2(xp, yp) + int *xp, *yp; +{ + *xp = *xp + 1; + *yp = (double)(TOP - *yp -1); + } + +static +translate1_d(xp, yp) + double *xp, *yp; +{ + *xp = *xp + 1.0; + *yp = *yp + 1.0; + } + +static +translate2_d(xp, yp) + double *xp, *yp; +{ + *xp = *xp + 1.0; + *yp = (double)TOP - *yp -1.0; + } + +/************************************************************************* + *************************************************************************/ +void genpstex_p_option(opt, optarg) +char opt, *optarg; +{ + if (opt == 'p') + { + strcpy(pstex_file, optarg); + } + else + genlatex_option(opt, optarg); +} + + +/************************************************************************* + *************************************************************************/ +void genpstex_p_start(objects) + F_compound *objects; +{ + int tmp; + struct stat tStat; + long lUnitLength; + + if (*pstex_file == '\0') + { + put_msg("Argument -p is mandatory to pstex_p."); + exit(1); + } + + strncpy(szFileName, pstex_file, 900); + iLength = strlen(szFileName); + + sprintf(szFileName + iLength, ".create"); + ptCreateFile = fopen (szFileName, "wb"); + + if ( ! ptCreateFile) + { + put_msg("Couldn't open %s for writing", szFileName); + exit(1); + } + fstat(fileno(ptCreateFile), & tStat); + fchmod (fileno(ptCreateFile), tStat.st_mode | ((tStat.st_mode & (S_IRUSR | S_IRGRP | S_IROTH)) >> 2)); + fprintf(ptCreateFile, "#!/bin/bash\n\n", szFileName); + + fprintf(ptCreateFile, "while getopts \"r\" Option\n"); + fprintf(ptCreateFile, "do\n"); + fprintf(ptCreateFile, " case $Option in\n"); + fprintf(ptCreateFile, " r) iOptRemove=1;;\n"); + fprintf(ptCreateFile, " *) echo \"illegal option -$Option\"\n"); + fprintf(ptCreateFile, " esac\n"); + fprintf(ptCreateFile, "done\n"); + fprintf(ptCreateFile, "shift $(($OPTIND - 1))\n"); + + texfontsizes[0] = texfontsizes[1] = + TEXFONTSIZE(font_size != 0.0? font_size : DEFAULT_FONT_SIZE); + + unitlength = mag/ppi; + dash_mag /= unitlength*80.0; + + translate_coordinates = translate2; + translate_coordinates_d = translate2_d; + + TRANS2(llx, lly, urx, ury); + if (llx > urx) SWAP(llx, urx) + if (lly > ury) SWAP(lly, ury) + + /* LaTeX start */ + + /* print any whole-figure comments prefixed with "%" */ + if (objects->comments) { + fprintf(tfp,"%%\n"); + print_comments("% ",objects->comments, ""); + fprintf(tfp,"%%\n"); + } + + lUnitLength = (long) (round(4736286.72*unitlength)); + fprintf(tfp, "\\setlength{\\unitlength}{%lisp}%%\n", + lUnitLength); + /* define the SetFigFont macro */ + define_setfigfont(tfp); + + sprintf(szFileName + iLength, ".size"); + fprintf(ptCreateFile, "if [ \"$iOptRemove\" == \"\" ]; then\n"); + if (iPdfOutputs) + fprintf(ptCreateFile, " echo \"\\setlength\\pdfpagewidth{%3.2fpt}\\setlength\\pdfpageheight{%3.2fpt}\" > %s\n", + (float) lUnitLength / 65536 * (urx - llx), (float) lUnitLength / 65536 * (ury - lly), szFileName); + else + fprintf(ptCreateFile, "echo -n\"\" > %s\n", szFileName); + fprintf(ptCreateFile, "else\n rm -f %s\nfi\n", szFileName); +} + +/************************************************************************* + *************************************************************************/ +void genpdftex_p_start(objects) + F_compound *objects; +{ + iPdfOutputs = 1; + genpstex_p_start(objects); +} + + +/************************************************************************* + *************************************************************************/ +int genpstex_p_end() +{ + if (iTextRead) + { + fprintf(tfp, "\\end{picture}%%\n"); + iTextRead = 0; + } + if (iObjectsRead) + { + genpstex_p_finalize_objects(iLastDepth); + iObjectsRead = 0; + } + + /* LaTeX ending */ + fprintf(tfp, "\\begin{picture}(%d,%d)\n", urx-llx, ury-lly); + fprintf(tfp, "\\end{picture}%%\n"); + + fclose(ptCreateFile); + + /* all ok */ + return 0; +} + + +/************************************************************************* + *************************************************************************/ +void genpstex_p_finalize_objects(depth) +int depth; +{ + char szFileName[1000]; + int iLength; + + strncpy(szFileName, pstex_file, 900); + iLength = strlen(szFileName); + + + sprintf(szFileName + iLength, "%03d", iObjectsFileNumber++); + fprintf(ptCreateFile, "if [ \"$iOptRemove\" == \"\" ]; then\n"); + if (iPdfOutputs) + { + fprintf(ptCreateFile, " %s -L pstex -D +%d:%d %s", prog, depth, iStartDepth, from, szFileName); + fprintf(ptCreateFile, " | epstopdf -f > %s.pdf\n", szFileName, szFileName); + } + else + fprintf(ptCreateFile, "%s -L pstex -D +%d:%d %s %s.eps\n", prog, depth, iStartDepth, from, szFileName); + fprintf(ptCreateFile, "else\n rm -f %s.", szFileName); + if (iPdfOutputs) + fprintf(ptCreateFile, "pdf"); + else + fprintf(ptCreateFile, "eps"); + fprintf(ptCreateFile, "\nfi\n"); + + fprintf(tfp, "\\begin{picture}(0,0)%%\n"); +/* newer includegraphics directive suggested by Stephen Harker 1/13/99 */ +#if defined(LATEX2E_GRAPHICS) +# if defined(EPSFIG) + fprintf(tfp, "\\epsfig{file=%s.eps}%%\n",szFileName); +# else + fprintf(tfp, "\\includegraphics{%s}%%\n",szFileName); +# endif +#else + fprintf(tfp, "\\special{psfile=%s.eps}%%\n",szFileName); +#endif + fprintf(tfp, "\\end{picture}%%\n"); +} + +/************************************************************************* + *************************************************************************/ +void genpstex_p_object(depth) +int depth; +{ + if (iTextRead) + { + fprintf(tfp, "\\end{picture}%%\n"); + iTextRead = 0; + } + if (iObjectsRead == 0) + { + iStartDepth = depth; + iObjectsRead = 1; + } + iLastDepth = depth; + +} + +void genpstex_p_arc(obj) +F_arc *obj; +{ + genpstex_p_object(obj->depth); +} + + +void genpstex_p_ellipse(obj) +F_ellipse *obj; +{ + genpstex_p_object(obj->depth); +} + +void genpstex_p_line(obj) +F_line *obj; +{ + genpstex_p_object(obj->depth); +} + +void genpstex_p_spline(obj) +F_spline *obj; +{ + genpstex_p_object(obj->depth); +} + + + +/************************************************************************* + *************************************************************************/ +void genpstex_p_text(t) +F_text *t; +{ + + if (!special_text(t)) + genpstex_p_object(t->depth); + else + { + if (iObjectsRead) + { + genpstex_p_finalize_objects(iLastDepth); + iObjectsRead = 0; + } + if (iTextRead == 0) + { + fprintf(tfp, "\\begin{picture}(0,0)(%d,%d)\n", llx, lly); + iTextRead = 1; + } + genlatex_text(t); + } + +} + +/************************************************************************* + *************************************************************************/ void genpstex_t_option(opt, optarg) char opt, *optarg; { @@ -112,6 +412,8 @@ else genlatex_text(t); } +/************************************************************************* + *************************************************************************/ void genpstex_text(t) F_text *t; { @@ -128,6 +430,32 @@ genlatex_option(opt, optarg); } +struct driver dev_pstex_p = { + genpstex_p_option, + genpstex_p_start, + gendev_null, + genpstex_p_arc, + genpstex_p_ellipse, + genpstex_p_line, + genpstex_p_spline, + genpstex_p_text, + genpstex_p_end, + INCLUDE_TEXT +}; + +struct driver dev_pdftex_p = { + genpstex_p_option, + genpdftex_p_start, + gendev_null, + genpstex_p_arc, + genpstex_p_ellipse, + genpstex_p_line, + genpstex_p_spline, + genpstex_p_text, + genpstex_p_end, + INCLUDE_TEXT +}; + struct driver dev_pstex_t = { genpstex_t_option, genpstex_t_start, --- a/fig2dev/drivers.h +++ b/fig2dev/drivers.h @@ -30,8 +30,10 @@ extern struct driver dev_pdf; extern struct driver dev_pdftex; extern struct driver dev_pdftex_t; +extern struct driver dev_pdftex_p; extern struct driver dev_pstex; extern struct driver dev_pstex_t; +extern struct driver dev_pstex_p; extern struct driver dev_pstricks; extern struct driver dev_textyl; extern struct driver dev_tk; @@ -75,6 +77,7 @@ {"pdf", &dev_pdf}, {"pdftex", &dev_pdftex}, {"pdftex_t", &dev_pdftex_t}, + {"pdftex_p", &dev_pdftex_p}, {"pic", &dev_pic}, {"pictex", &dev_pictex}, {"png", &dev_bitmaps}, @@ -82,6 +85,7 @@ {"ps", &dev_ps}, {"pstex", &dev_pstex}, {"pstex_t", &dev_pstex_t}, + {"pstex_p", &dev_pstex_p}, {"pstricks", &dev_pstricks}, {"ptk", &dev_ptk}, {"shape", &dev_shape}, --- a/fig2dev/fig2dev.c +++ b/fig2dev/fig2dev.c @@ -651,6 +651,18 @@ #endif /* NFSS */ printf(" -p name name of the PostScript file to be overlaid\n"); + printf("PSTEX_P and PDFTEX_P Options:\n"); + printf(" -p name basename of the files to be created\n"); +#ifdef NFSS + printf(" -F don't set font family/series/shape, so you can\n"); + printf(" set it from latex\n"); +#endif /* NFSS */ + printf(" -d dmag set separate magnification for length of line dashes to dmag\n"); + printf(" -E num set encoding for text translation (0 no translation,\n"); + printf(" 1 ISO-8859-1, 2 ISO-8859-2)\n"); + printf(" -l lwidth set threshold between thin and thick lines to lwidth\n"); + printf(" -v verbose mode\n"); + printf("SHAPE (ShapePar driver) Options:\n"); printf(" -n name Set basename of the macro (e.g. \"face\" gives faceshape and facepar)\n"); printf("Tcl/Tk (tk) and Perl/Tk (ptk) Options:\n"); @@ -778,6 +790,12 @@ int rec_comp(r1, r2) struct obj_rec *r1, *r2; { + if (r2->depth == r1->depth) + { + if ((r1->gendev == dev->text) ^ (r2->gendev == dev->text)) + return ((r1->gendev == dev->text) * 2 - 1); + return (0); + } return (r2->depth - r1->depth); } --- /dev/null +++ b/fig2mpdf/copyright.txt @@ -0,0 +1,25 @@ +The following files contain copyright and license info for +the code they contain: +fig2mpdf, fig2mpdf.1, transfig.3.2.4.patch, transfig-3.2.5-alpha7.patch + +-- fig2mpdf copyright begins here -- + + fig2mpdf/pdftex_p and pstex_p driver of fig2dev + Copyright (C) 2006 Michael Pfeiffer -- p3fff@web.de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (Author's note: the license is in the file gpl.txt, which is included + in the archive.) --- /dev/null +++ b/fig2mpdf/fig2mpdf @@ -0,0 +1,653 @@ +#!/bin/sh + +unset POSIXLY_CORRECT + +gawk ' +######################################################################### +######################################################################### +BEGIN { + + cmdGawk = "gawk"; + cmdCat = "cat"; + cmdLess = "less"; + cmdRm = "rm" + cmdMv = "mv" + cmdLatex = "latex"; + cmdPdftex = "pdflatex"; + cmdEpsToPdf = "epstopdf"; + cmdDvips = "dvips"; + cmdFig2dev = "fig2dev"; + cmdTouch = "touch"; + + szVersion = "1.1.2"; + iError = 0; + iGapWidth = 1; + + + # get the options + szOptString = "&l%e&m$p%i%I$s$H$g%G%v%V%d"; + getopt(szOptString); + + if (aOptions["d"]) + { + aOptions["v"] = "-"; + for (iI = 0; iI < ARGC; iI++) + printf("ARGV[%d]=%s\n", iI, ARGV[iI]); + + iDim = split(szOptString, aOpts, "[$%&]"); + for (iI = 2; iI <= iDim; iI++) + debug("aOptions[%s] = >%s<\n", aOpts[iI], aOptions[aOpts[iI]]); + } + + + + if (aOptions["V"] != "") + { + printf("fig2mpdf: version %s\n", szVersion); + iError = 1; + exit(0); + } + + szTmpPrefix = "_fig2mpdf" + + iLine = -1; + iInString = 0; + iDepths = 1; + + iInvalidDepth = -2 + iAdminDepth = 2000 + + szBase = ARGV[1]; + szOrigFile = ARGV[1]; + szOrigPath = ARGV[1]; + + # set default switch state + iDoMultiLayer = 0; + iDoLatex = 0; + iDoPdftex = 1; + iIncludeLowestRange = 1; + + # set iDoLatex and iDoMultiLayer concerning the given suffix + match(szBase, /\.[^\.\/]+$/); + if (RLENGTH != -1) + { + szSuffix = substr(szBase, RSTART); + if (szSuffix == ".lfig") + iDoLatex = 1; + else if (szSuffix == ".mfig") + iDoMultiLayer = 1; + else if ((szSuffix == ".mlfig") || (szSuffix == ".lmfig")) + { + iDoLatex = 1; + iDoMultiLayer = 1; + } + } + + ################################ + # evalutate options + + # set toggle latex + if (aOptions["l"] == "-") + iDoLatex = 1; + if (aOptions["l"] == "+") + iDoLatex = 0; + + # set multilayer flag + if (aOptions["m"] == "-") + iDoMultiLayer = 1; + if (aOptions["m"] == "+") + iDoMultiLayer = 0; + + # set toggle pdftex + if (aOptions["e"] == "-") + iDoPdftex = 0; + + # evaluate do not include lowest layer in all figs + iIncludeLowestRange = (aOptions["i"] == "-"); + + # evaluate include all lower ranges in the sub figs + iIncludeAllLowerRanges = (aOptions["I"] != "-"); + + # check consistencies + # if there are ranges given -> do multilayer + if (aOptions["p"] != "") + iDoMultiLayer = 1; + + + if (aOptions["g"] != "") + { + if ( ! match (aOptions["g"], /^[0-9]+$/)) + usage(); + + iGapWidth = aOptions["g"] + 1; + } + + # get the basename of the source + gsub(/\.[^\/]+$/, "", szBase); + gsub(/^.*\//, "", szBase); + + # get the path to the original + gsub(/[^\/]+$/, "", szOrigPath); +} +######################################################################### +######################################################################### + +( iInString != 0) { + aszLine[iLine] = sprintf("%s\n%s", aszLine[iLine], $0); + iInString = (match($0, "\\\\001$") == 0); + iSubLine++; + next; +} + +/^[135][ ]/ { + iCmd = $1; + iSubCmd = -1; + iSubLine = 0; + aiDepth[++iLine] = fnGetDepth($1); + aszLine[iLine] = $0; + next; +} + +/^[2][ ]/ { + iCmd = $1; + iSubCmd = $2; + iSubLine = 0; + aiDepth[++iLine] = fnGetDepth($1); + aszLine[iLine] = $0; + next; +} + + +/^[4][ ]/ { + iCmd = $1; + iSubCmd = $2; + iSubLine = 0; + aiDepth[++iLine] = fnGetDepth($1); + aszLine[iLine] = $0; + iInString = (match($0, "\\\\001$") == 0); + next; +} + +/^(6[ ])|(-6)/ { + iCmd = $1; + iSubCmd = -1; + iSubLine = 0; + next; +} + +/^[^ ]/ { + iCmd = -1; + aiDepth[++iLine] = fnGetDepth("A"); + iSubLine = 0; + aszLine[iLine] = $0; + next; +} + +/^[ ]/ { + iSubLine++; + if ((iCmd == 2) && (iSubCmd == 5) && (iSubLine == 1)) + { + if (match($0, "^\t[01] ")) + { + szFileName = substr($0, RSTART + RLENGTH); + if ( ! match(szFileName, /^\//)) + szFileName = sprintf("%s%s", szOrigPath, szFileName); + aszLine[iLine] = sprintf("%s\n\t%s %s", aszLine[iLine], $1, szFileName); + } + else + aszLine[iLine] = sprintf("%s\n%s", aszLine[iLine], $0); + } + else + aszLine[iLine] = sprintf("%s\n%s", aszLine[iLine], $0); +} + + +END { + iLine++; + iLowestLayer = 0; + iFirstRange = 0; + + if (iError == 0) + { + + + if (iDoMultiLayer) + { + asort(aiDepths, aiSortedDepth); + + # check for ranges as options + if (aOptions["p"] != "") + { + # we have explicit ranges + gsub(/-/, ":", aOptions["p"]); + iRanges = split(aOptions["p"], aszRanges, ","); + } + else + { + if (iDepths < 4) + { + iRanges = 1; + aszRanges[1] = "1:999"; + } + else + { + iRanges = 0; + iLastRange = aiSortedDepth[iDepths - 2] + 0; + iRangeStart = iLastRange; + for (iI = iDepths - 3; iI > 0; iI--) + { + aiSortedDepth[iI] += 0; + if ((aiSortedDepth[iI] < iLastRange - iGapWidth) || (iI == 1)) + { + if (aiSortedDepth[iI] >= iLastRange - iGapWidth) + iLastRange = aiSortedDepth[iI]; + + if (iLastRange != iRangeStart) + aszRanges[++iRanges] = sprintf("%d:%d", iLastRange, iRangeStart); + else + aszRanges[++iRanges] = sprintf("%d", iRangeStart); + iRangeStart = aiSortedDepth[iI]; + + if ((iI == 1) && (aiSortedDepth[iI] < iLastRange - iGapWidth)) + aszRanges[++iRanges] = sprintf("%d", aiSortedDepth[iI]); + } + iLastRange = aiSortedDepth[iI]; + } + } + } + + + # check for a multilayer file with only one range + if ((iRanges == 1) && iIncludeLowestRange) + { + iIncludeLowestRange = 0; + } + + szInitRangeList = " -D "; + szSep = ""; + + if (iIncludeLowestRange) + { + szInitRangeList = sprintf("%s+%s", szInitRangeList, aszRanges[1]); + szSep = ","; + } + szRangeList = szInitRangeList; + + # step through the ranges + for (iI = iIncludeLowestRange; iI < iRanges; iI++) + { + szFileBase = sprintf("%s-%d", szBase, iI - iIncludeLowestRange); + + if (aOptions["I"]) + { + szRangeList = sprintf("%s%s+%s", szRangeList, szSep, aszRanges[iI + 1]); + szSep = ","; + } + else + szRangeList = sprintf("%s%s+%s", szInitRangeList, szSep, aszRanges[iI + 1]); + + + if (iDoLatex) + szTargetFile = fnDoTexFig(szFileBase, szOrigFile, szRangeList, (iDoPdftex != 0)); + else + szTargetFile = fnDoNormalFig(szFileBase, szOrigFile, szRangeList, (iDoPdftex != 0)); + + + if (aOptions["G"]) + { + match(szTargetFile, /\.[^.]*$/); + szCommand = sprintf("%s %s %s.page%d%s", cmdMv, szTargetFile, szBase, iI - iIncludeLowestRange, substr(szTargetFile, RSTART, RLENGTH)); + debug("%s\n", szCommand); + system(szCommand); + } + } + } + else + { + szRangeList = ""; + + if (iDoLatex) + szTargetFile = fnDoTexFig(szBase, szOrigFile, szRangeList, (iDoPdftex != 0)); + else + szTargetFile = fnDoNormalFig(szBase, szOrigFile, szRangeList, (iDoPdftex != 0)); + } + } +} + + + +######################################################################### +######################################################################### +function debug(str, arg0, arg1, arg2, arg3, arg4) +{ + if (aOptions["v"]) + printf (str, arg0, arg1, arg2, arg3, arg4); +} + +######################################################################### +######################################################################### +function fnGetDepth (iControl) +{ + + if (iControl == 1) + { + iReturn = sprintf("%04d", $7); + } + else if (iControl == 2) + { + iReturn = sprintf("%04d", $7); + } + else if (iControl == 3) + { + iReturn = sprintf("%04d", $7); + } + else if (iControl == 4) + { + iReturn = sprintf("%04d", $4); + } + else if (iControl == 5) + { + iReturn = sprintf("%04d", $7); + } + else if ((iControl == 6) || (iControl == -6)) + { + iReturn = sprintf("%04d", iInvalidDepth); + } + else + { + iReturn = sprintf("%04d", iAdminDepth); + } + + if (iReturn >= 0) + { + if (ahDepths[iReturn] == 0) + { + ahDepths[iReturn] = 1; + aiDepths[iDepths++] = iReturn; + } + } + + return (iReturn); + +} + +######################################################################### +######################################################################### +function fnDoNormalFig(szFileNameBase, szFigFile, szRangeList, iPdf, + szEpsFile, szPdfFile, szTargetFile, szCommand) +{ + + debug("FileNameBase >%s< FigFile >%s< Pdf:%d\n", szFileNameBase, szFigFile, iPdf); + + if (iPdf) + szEpsFile = sprintf("%s%s.eps", szTmpPrefix, szFileNameBase); + else + { + szEpsFile = sprintf("%s.eps", szFileNameBase); + szTargetFile = szEpsFile; + } + + szCommand = sprintf("%s -L eps %s %s %s 2> /dev/null", cmdFig2dev, szRangeList, szFigFile, szEpsFile); + debug("%s\n", szCommand); + system(szCommand); + + if (iPdf) + { + szPdfFile = sprintf("%s.pdf", szFileNameBase); + szTargetFile = szPdfFile; + szCommand = sprintf("%s --outfile=%s %s", cmdEpsToPdf, szPdfFile, szEpsFile); + debug("%s\n", szCommand); + system(szCommand); + + + if ( ! aOptions["d"]) + { + szCommand = sprintf("%s -f %s", cmdRm, szEpsFile); + debug("%s\n", szCommand); + system(szCommand); + } + } + + + return (szTargetFile); +} + + +######################################################################### +######################################################################### +function fnDoTexFig(szFileNameBase, szFigFile, szRangeList, iPdf, + szEpsFile, szPdfFile, szTexDoc, szTexPdf, szTexLog, szTexAux, szTexInp, szTmpPs, szTmpPdf, szTexSiz, szTmpEps, szCommand, szHeader) +{ + + debug("FileNameBase >%s< FigFile >%s< Pdf:%d\n", szFileNameBase, szFigFile, iPdf); + + szEpsFile = sprintf("%s.eps", szFileNameBase); + szPdfFile = sprintf("%s.pdf", szFileNameBase); + szTexDoc = sprintf("%s%s_doc.tex", szTmpPrefix, szFileNameBase); + szTexPdf = sprintf("%s%s_doc.pdf", szTmpPrefix, szFileNameBase); + szTexDvi = sprintf("%s%s_doc.dvi", szTmpPrefix, szFileNameBase); + szTexLog = sprintf("%s%s_doc.log", szTmpPrefix, szFileNameBase); + szTexAux = sprintf("%s%s_doc.aux", szTmpPrefix, szFileNameBase); + szTexInpPref = sprintf("%s%s_inp", szTmpPrefix, szFileNameBase); + szTexInp = sprintf("%s.tex", szTexInpPref); + szTexCreator = sprintf("%s.create", szTexInpPref); + szTexSiz = sprintf("%s.size", szTexInpPref); + + if (iPdf) + szCommand = sprintf("%s -L pdftex_p %s -p %s %s %s", cmdFig2dev, szRangeList, szTexInpPref, szFigFile, szTexInp); + else + szCommand = sprintf("%s -L pstex_p %s -p %s %s %s", cmdFig2dev, szRangeList, szTexInpPref, szFigFile, szTexInp); + debug("%s\n", szCommand); + system(szCommand); + + szCommand = sprintf("./%s", szTexCreator); + debug("%s\n", szCommand); + system(szCommand); + + # check if there is an own hederfile to include + if (aOptions["s"] == "") + aOptions["s"] = "times"; + + if (aOptions["H"] == "") + { + szHeader = sprintf("\\documentclass{article}\n\ +\\usepackage{german,amssymb,amsmath}\n\ +\\usepackage{%s}", aOptions["s"]); + } + else + szHeader = sprintf("\\input{%s}\n", aOptions["H"]); + + szHeader = sprintf("%s\n\ +\\usepackage{color}\n\ +\\usepackage{ifpdf}\n\ +\\setlength{\\textwidth}{100cm}\n\ +\\setlength{\\textheight}{100cm}\n\ +\\setlength{\\topmargin}{-1in}\n\ +\\setlength{\\headsep}{0pt}\n\ +\\setlength{\\headheight}{0pt}\n\ +\\setlength{\\oddsidemargin}{-1in}\n\ +\\parindent=0cm\n\ +\\ifpdf\n\ +\\usepackage[pdftex]{graphicx}\n\ +\\DeclareGraphicsExtensions{.pdf,.png,.jpg}\n\ +\\usepackage{epsfig}\n\ +\\input{%s}\n\ +\\else\n\ +\\usepackage{graphicx}\n\ +\\usepackage{epsfig}\n\ +\\fi\n\ +", szHeader, szTexSiz); + + szCommand = sprintf("%s > %s << EOF\n\ +%s\\begin{document}\n\ +\\pagestyle{empty}\n\ +\\input{%s}\n\ +\\end{document}\n\ +EOF", cmdCat, szTexDoc, szHeader, szTexInp); + if (aOptions["d"] != "") + debug("%s\n", szCommand); + system(szCommand); + + if (iPdf) + { + + szCommand = sprintf("%s -interaction batchmode %s", cmdPdftex, szTexDoc); + debug("%s\n", szCommand); + iReturn = system(szCommand); + + if (iReturn) + { + szCommand = sprintf("%s %s | %s +G", cmdCat, szTexLog, cmdLess); + system (szCommand); + } + else + { + szCommand = sprintf("%s %s %s", cmdMv, szTexPdf, szPdfFile); + debug("%s\n", szCommand); + system(szCommand); + } + + } + else + { + szCommand = sprintf("%s -interaction batchmode %s", cmdLatex, szTexDoc); + debug("%s\n", szCommand); + iReturn = system(szCommand); + if (iReturn) + { + szCommand = sprintf("%s %s | %s +G", cmdCat, szTexLog, cmdLess); + system (szCommand); + } + else + { + szCommand = sprintf("%s -q -E %s -o %s 2>&1 > /dev/null", cmdDvips, szTexDvi, szEpsFile); + debug("%s\n", szCommand); + system(szCommand); + } + } + + if ( ! aOptions["d"]) + { + szCommand = sprintf("./%s -r", szTexCreator); + debug("%s\n", szCommand); + system(szCommand); + } + + if ( ! aOptions["d"]) + { + szCommand = sprintf("%s -f %s %s %s %s %s %s %s", cmdRm, szTexDoc, szTexLog, szTexAux, szTexDvi, szTexInp, szTexCreator, szTexPdf); + debug("%s\n", szCommand); + system(szCommand); + } + + if (iPdf) + return (szPdfFile); + else + return (szEpsFile); +} + + +######################################################################### +######################################################################### +function getopt(sOptions, n, m, fHuntParam, iSearchMinus, iSPos, iCLen, iHuntSwitches, szSwChar, szOptChar) { +# Options: Flagoptions: %f +# Parameter: $p + + n = 1; # index in argv + m = 1; # processed entries in argv finally it points to the firs$ + iSearchMinus = 1; # indicate that a switch leading sign minus is expected + + # check for initial -- to separate the gawk switches from the script switches + if (ARGV[n] == "--") + n++; + + + while (n < ARGC) + { + iHuntSwitches = 0; + iCLen = length(ARGV[n]); + + szSwChar = substr(ARGV[n], 1, 1); + if ((szSwChar == "-") || (szSwChar == "+")) + { + if ((iSearchMinus == 0) || fHuntParam) + usage(); + iHuntSwitches = 1; + iSPos = 2; + fHuntParam = 0; + } + else + { + iSPos = 1; + + if (fHuntParam == 0) + iSearchMinus = 0; + } + + while (iSPos <= iCLen) + { + if (iHuntSwitches) + { + szOptChar = substr(ARGV[n], iSPos, 1); + iOPos = index(sOptions, szOptChar); + if (iOPos == 0) + { + printf("unknown option \"%s\"\n", szOptChar); + usage(); + } + if ((substr(sOptions, iOPos - 1, 1) == "&") || ((substr(sOptions, iOPos - 1, 1) == "%") && (szSwChar == "-"))) + { + aOptions[szOptChar] = szSwChar; + iSPos = iSPos + 1; + } + else if ((substr(sOptions, iOPos - 1, 1) == "$") && (szSwChar == "-")) + { + fHuntParam = 1; + iHuntSwitches = 0; + iSPos = iSPos + 1; + } + else + usage(); + + } + else if (fHuntParam) + { + fHuntParam = 0; + aOptions[szOptChar] = substr(ARGV[n], iSPos, iCLen + 1 - iSPos); + iSPos = iCLen + 1; + } + else + { + ARGV[m++] = ARGV[n]; + iSPos = iCLen + 1; + } + } + n = n + 1; + } + ARGC = m; +} + + +######################################################################### +######################################################################### +function usage() { + print "usage: fig2mpdf [-|+lm] [-eiIGvV] [-p ] [-g ] [-s