summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-03-08 03:00:44 +0000
committerNorbert Preining <norbert@preining.info>2022-03-08 03:00:44 +0000
commitb1f3f2681b2bf35570ad11f65270777f38c55f7e (patch)
tree095fd002f68133f64deb00574ad4740d1df66859 /support
parent14d9a09517cc5a3a16f279ac3f64c172f8dae030 (diff)
CTAN sync 202203080300
Diffstat (limited to 'support')
-rwxr-xr-xsupport/pmx/OSX/pmxabbin739636 -> 0 bytes
-rwxr-xr-xsupport/pmx/OSX/scor2prtbin118052 -> 0 bytes
-rw-r--r--support/pmx/README2
-rw-r--r--support/pmx/doc/ChangeLog8
-rw-r--r--support/pmx/doc/pmx-install.pdfbin108463 -> 114749 bytes
-rw-r--r--support/pmx/doc/pmx-install.tex4
-rw-r--r--support/pmx/doc/pmx294.pdfbin345417 -> 0 bytes
-rw-r--r--support/pmx/doc/pmx298.pdfbin0 -> 355137 bytes
-rw-r--r--support/pmx/doc/pmx298.tex (renamed from support/pmx/doc/pmx294.tex)31
-rw-r--r--support/pmx/doc/ref294.pdfbin70133 -> 0 bytes
-rw-r--r--support/pmx/doc/ref298.pdfbin0 -> 66121 bytes
-rw-r--r--support/pmx/doc/ref298.tex (renamed from support/pmx/doc/ref294.tex)6
-rw-r--r--support/ps2eps/Changes.txt288
-rw-r--r--support/ps2eps/INSTALL.txt67
-rw-r--r--support/ps2eps/Latest_is_1.680
-rw-r--r--support/ps2eps/README43
-rw-r--r--support/ps2eps/README.md63
-rw-r--r--support/ps2eps/bin/linux/i386/bboxbin12003 -> 0 bytes
-rwxr-xr-xsupport/ps2eps/bin/linux/x86_64/bboxbin16386 -> 0 bytes
-rw-r--r--support/ps2eps/doc/INSTALL.md75
-rw-r--r--support/ps2eps/doc/bbox.html (renamed from support/ps2eps/doc/html/bbox.html)0
-rw-r--r--support/ps2eps/doc/bbox.pdfbin0 -> 18966 bytes
-rw-r--r--support/ps2eps/doc/man/man1/bbox.171
-rw-r--r--support/ps2eps/doc/man/man1/ps2eps.1366
-rw-r--r--support/ps2eps/doc/pdf/bbox.pdfbin4949 -> 0 bytes
-rw-r--r--support/ps2eps/doc/pdf/ps2eps.pdfbin20821 -> 0 bytes
-rw-r--r--support/ps2eps/doc/ps2eps.html (renamed from support/ps2eps/doc/html/ps2eps.html)85
-rw-r--r--support/ps2eps/doc/ps2eps.pdfbin0 -> 41808 bytes
-rwxr-xr-xsupport/ps2eps/scripts/crop-pdfs.sh17
-rwxr-xr-xsupport/ps2eps/scripts/gswrap-ps2eps.sh2
-rwxr-xr-xsupport/ps2eps/scripts/rbpdfcrop2
-rw-r--r--support/ps2eps/src/C/Makefile8
-rw-r--r--support/ps2eps/src/C/bbox.c43
-rw-r--r--support/ps2eps/src/perl/ps2eps (renamed from support/ps2eps/bin/ps2eps)25
34 files changed, 310 insertions, 896 deletions
diff --git a/support/pmx/OSX/pmxab b/support/pmx/OSX/pmxab
deleted file mode 100755
index e582bf38c9..0000000000
--- a/support/pmx/OSX/pmxab
+++ /dev/null
Binary files differ
diff --git a/support/pmx/OSX/scor2prt b/support/pmx/OSX/scor2prt
deleted file mode 100755
index d0c9d3aa05..0000000000
--- a/support/pmx/OSX/scor2prt
+++ /dev/null
Binary files differ
diff --git a/support/pmx/README b/support/pmx/README
index d8c7bb3d22..4102cf4bd8 100644
--- a/support/pmx/README
+++ b/support/pmx/README
@@ -1,4 +1,4 @@
-This is PMX, version 2.94a (2021-01-28). PMX provides a preprocessor for MusiXTeX.
+This is PMX, version 2.98a (2022-03-06). PMX provides a preprocessor for MusiXTeX.
pmxab builds a TeX input file based on a .pmx input file in
a much simpler language, making most of the layout decisions
diff --git a/support/pmx/doc/ChangeLog b/support/pmx/doc/ChangeLog
index 3453c44fc5..e5389c77f5 100644
--- a/support/pmx/doc/ChangeLog
+++ b/support/pmx/doc/ChangeLog
@@ -1,3 +1,11 @@
+2.98
+ Fix beaming in 6/2 time by setting mapfb(5) and (6) = 0 in make1bar(...)
+2.97
+ Fix problem with beaming after new movement command
+2.96 and 2.95
+ replace and '\','/'. and '"' with chax();
+ eliminate do loops with shared last line
+ delete superfluous comments in source
2.94
Allow moving dots on main and chord note in 2-note termolos
Add definitions of \hbp and \hbpp to pmx.tex
diff --git a/support/pmx/doc/pmx-install.pdf b/support/pmx/doc/pmx-install.pdf
index 5538f8db89..86263798a5 100644
--- a/support/pmx/doc/pmx-install.pdf
+++ b/support/pmx/doc/pmx-install.pdf
Binary files differ
diff --git a/support/pmx/doc/pmx-install.tex b/support/pmx/doc/pmx-install.tex
index c6bf78dc6d..12c3b12462 100644
--- a/support/pmx/doc/pmx-install.tex
+++ b/support/pmx/doc/pmx-install.tex
@@ -5,7 +5,7 @@
\RequirePackage{hyperref}
\usepackage{xcolor}
\newcommand{\myurl}[1]{\textcolor{blue}{\underline{\textcolor{black}{\url{#1}}}}}
-\newcommand{\pmxVersion}{2.9.4}
+\newcommand{\pmxVersion}{2.9.8}
\begin{document}
\title{Installation of the CTAN PMX Distribution}
\author{Bob Tennent\\
@@ -52,7 +52,7 @@ and \texttt{scor2prt}, an executable used to produce single-player parts from mu
On Windows
systems, one can install \texttt{pmxab.exe} and
-\texttt{scor2prt.exe} in the \texttt{Windows} 32 bit or 64~bit sub-directories; these are pre-compiled
+\texttt{scor2prt.exe} in the \texttt{Windows} sub-directory; these are pre-compiled
executables and should be copied to any
folder on the PATH of executables.
This might entail creating a suitable folder and adding that folder
diff --git a/support/pmx/doc/pmx294.pdf b/support/pmx/doc/pmx294.pdf
deleted file mode 100644
index 2a0d2d1887..0000000000
--- a/support/pmx/doc/pmx294.pdf
+++ /dev/null
Binary files differ
diff --git a/support/pmx/doc/pmx298.pdf b/support/pmx/doc/pmx298.pdf
new file mode 100644
index 0000000000..ee89215541
--- /dev/null
+++ b/support/pmx/doc/pmx298.pdf
Binary files differ
diff --git a/support/pmx/doc/pmx294.tex b/support/pmx/doc/pmx298.tex
index 69bf5269b8..82e8d24a4e 100644
--- a/support/pmx/doc/pmx294.tex
+++ b/support/pmx/doc/pmx298.tex
@@ -1,6 +1,6 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% pmx294.tex 1/22/2020
+% pmx298.tex 2/4/2022
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[11pt]{article}
@@ -47,7 +47,7 @@
PMX~--~a Preprocessor for \MusiXTeX{}\\
\null\vskip-15pt
\Large\sl
- Version 2.94~--~22 January 2020\\
+ Version 2.98~--~4 February 2022\\
\author{\Large\rm Don \sc Simons\\
\large\sl
Dr. Don's PC and Harpsichord Emporium\\
@@ -66,18 +66,19 @@
\maketitle
\section*{Preface}
-Compared to version 2.84, aside from bug fixes documented in the
-opening comments in the source code, \PMX version 2.94
-enables blank gaps at the end or in the middle of a system (\ref{Gaps}),
-allows virtually
-arbitrary staff jumping beams with multiplicity changes at the jump (\ref{Jumps}),
-allows
-changes to the vertical position of the number for a multibar rest (\ref{MultibarRest}),
-and has more flexibility in setting stem lengths (\ref{Stemlength}).
+Compared to version 2.94, \PMX version 2.98 does not have any new functionality.
+As documented in the opening comments in the source code file pmx298.for,
+it does have several bug fixes, and changes in coding formalism to make it more
+broadly compatible with other FORTRAN compilers beyond GNU, and for translation from
+FORTRAN to C.
\setcounter{page}1
% Need extra line to push last line of TOC to next page
+
+~~
+
~~
+
\tableofcontents
%\setcounter{secnumdepth}1
\pagestyle{headings}
@@ -147,8 +148,8 @@ that defines the score and the individual parts.
The basic \PMX
distribution as of this version of the manual is
-\href{http://icking-music-archive.org/software/pmx/pmx294.zip}
-{\underline{\tt pmx294.zip}}.\NEW{2.94} It
+\href{http://icking-music-archive.org/software/pmx/pmx298.zip}
+{\underline{\tt pmx298.zip}}.\NEW{2.98} It
contains the FORTRAN sources, binaries that will run in a DOS
window on a PC with WINDOWS95 or higher, manuals for usage and for installation
in DOS/Windows, and example typesetting files. Alternatively, the
@@ -158,9 +159,9 @@ for acquiring and installing \MusiXTeX~and \PMX on various platforms
(Windows, Mac-OSX, Unix-like systems) including using automated procedures from
several external \TeX~distribution sites.
The packages from those other sites will
-all eventually incorporate all the upgrades in {\tt pmx294.zip} but will take
-varying amounts of time to do so. \PMX is often upgraded; the most current version will
-always be available directly from the ``News'' paragraph
+all eventually incorporate all the upgrades in {\tt pmx298.zip} but will take
+varying amounts of time to do so. If~\PMX~is upgraded, the most current version will
+be available directly from the ``News'' paragraph
\href{http://www.icking-music-archive.org/software/htdocs/htdocs.html}{\underline{here}}.
\subsection{Conventions for This Manual}
diff --git a/support/pmx/doc/ref294.pdf b/support/pmx/doc/ref294.pdf
deleted file mode 100644
index 6161911998..0000000000
--- a/support/pmx/doc/ref294.pdf
+++ /dev/null
Binary files differ
diff --git a/support/pmx/doc/ref298.pdf b/support/pmx/doc/ref298.pdf
new file mode 100644
index 0000000000..77f7ef2674
--- /dev/null
+++ b/support/pmx/doc/ref298.pdf
Binary files differ
diff --git a/support/pmx/doc/ref294.tex b/support/pmx/doc/ref298.tex
index 28c426f663..af2b40d8bd 100644
--- a/support/pmx/doc/ref294.tex
+++ b/support/pmx/doc/ref298.tex
@@ -1,6 +1,6 @@
%%%%%%%%%%%%%%%%%
%%
-%% ref294.tex (latex)
+%% ref298.tex (latex)
%%
%%%%%%%%%%%%%%%%%
\ifx\documentstyle\undefined
@@ -43,8 +43,8 @@
%\let\blank\ \def\ {\blank\blank}
\centerline{QUICK REFERENCE TABLE FOR {\bf PMX},
-Version 2.94,
-Jan 2020~~~
+Version 2.98,
+Feb 2022~~~
\hfill Don Simons (dsimons@roadrunner.com)}
%\begin{multicols}{2}
diff --git a/support/ps2eps/Changes.txt b/support/ps2eps/Changes.txt
deleted file mode 100644
index ef0c46602c..0000000000
--- a/support/ps2eps/Changes.txt
+++ /dev/null
@@ -1,288 +0,0 @@
-----------------------------
-Detailed Change Log:
-----------------------------
-revision 1.68
-date: 2010-05-07 21:42:35 +0200; author: bless; state: Exp; lines: +3 -3;
-- quoted translate command string
-----------------------------
-revision 1.67
-date: 2009-12-05 23:44:19 +0100; author: bless; state: Exp; lines: +39 -33;
-- quote of tmpfname for coping with spaces in filenames
-- added -a option
-- changed handling of hiresBB (now rounded to hiresprecision, by default 0.5pt)
-----------------------------
-revision 1.66
-date: 2007-10-30 12:04:24 +0100; author: bless; state: Exp; lines: +9 -5;
-- added %%BeginData %%EndData as indicators for Binary Section
-- added new option -b (treat as binary) to prevent filtering CR/LF stuff
-----------------------------
-revision 1.65
-date: 2007-01-24 14:19:42 +0100; author: bless; state: Exp; lines: +3 -3;
-- fixed help/usage formatting output
-----------------------------
-revision 1.64
-date: 2007-01-24 13:32:59 +0100; author: bless; state: Exp; lines: +4 -4;
-- Year (C) update
-----------------------------
-revision 1.63
-date: 2007-01-24 13:29:37 +0100; author: bless; state: Exp; lines: +3 -3;
-- Tried to make DSCfilter command more robust
-----------------------------
-revision 1.62 (not released)
-date: 2007-01-06 23:27:47 +0100; author: bless; state: Exp; lines: +11 -5;
-- better detection for files that have a binary heading stuff containing
- even %! as character sequence
-----------------------------
-revision 1.61
-date: 2006-12-28 17:34:06 +0100; author: bless; state: Exp; lines: +5 -5;
-- changed year in comment and info printout only
-----------------------------
-revision 1.60 (not released)
-date: 2006-12-28 17:31:39 +0100; author: bless; state: Exp; lines: +9 -13;
-- incorporated changes for Windows/Cygwin detection by Karl Berry
-----------------------------
-revision 1.59 (not released)
-date: 2006-04-04 11:04:47 +0200; author: bless; state: Exp; lines: +4 -4;
-- removed surrounding ticks '' for -c $translation in $translatecmd
- (hint by Thomas Riedle)
-- removed useless/unsupported 2>&1 in $bboxver for Windows
-----------------------------
-revision 1.58
-date: 2005/01/19 08:23:12; author: bless; state: Exp; lines: +8 -5
-- fix for two negative offsets in translation (reported by Hans Ecke)
-----------------------------
-revision 1.57
-date: 2005/01/19 07:59:52; author: bless; state: Exp; lines: +10 -3
-- more Windows friendly checking for bbox existence
-----------------------------
-revision 1.56
-date: 2005/01/17 12:32:54; author: bless; state: Exp; lines: +11 -3
-- added -r option to specify a resolution
-----------------------------
-revision 1.55
-date: 2005/01/14 15:28:09; author: bless; state: Exp; lines: +6 -4
-- minor fixes to the -g option (thanks to Koji Nakamaru):
- * suppress info output if quiet option is active
- * more robust parsing of gs call result
-----------------------------
-revision 1.54
-date: 2004/04/23 07:56:54; author: bless; state: Exp; lines: +4 -3
-- added ^pdfIm ^%-EOD- as indicator for binary section
-----------------------------
-revision 1.53
-date: 2004/04/01 19:28:02; author: bless; state: Exp; lines: +6 -2
-- Clipping code used always hiresBB, which gave wrong results when bbox returned no hiresBB
-----------------------------
-revision 1.52
-date: 2004/02/19 20:20:57; author: bless; state: Exp; lines: +90 -10
-- added rotate option -R
-- changed translate in order to avoid negative BB coordinates
-----------------------------
-revision 1.51
-date: 2004/01/25 22:02:04; author: bless; state: Exp; lines: +18 -9
-- removed ^ in parsing for %! heading, because Adobe Photoshop generated a
- binary heading where ^%! did not work
-- added clipping along %%HiResBoundingBox +0.1 points
-- added option --nohires
-----------------------------
-revision 1.50
-date: 2004/01/25 10:04:56; author: bless; state: Exp; lines: +158 -41
-- ps2eps can now use the bbox device of ghostscript (either by option, environment variable or command line)
-- new environment variable PS2EPS_GSBBOX for specifying a default behavior
-- uses implicitly the ghostscript bbox device if external bbox command cannot be found
-- Added %%HiResBoundingBox output
-- now uses gswin32c as default for MSWin32 or cygwin platforms
-- added handling/passing of predefined paper sizes of ghostscript (including validity check and help)
-- added new environment variable PS2EPS_SIZE for default paper size
-- improved format checking for numerically given size
-- shows used page size if given while processing
-- shows whether it uses the bbox device of ghostscript
-- added use POSIX and check for OS
-- moved ps2eps header comment now after %%EndComments
-- removed looseBB option from call of bbox
-----------------------------
-revision 1.49
-date: 2003/11/19 15:08:52; author: bless; state: Exp; lines: +83 -47
-- Added -t|--translate <x,y> option which allows to specify an offset for drawings
-- Existing Bounding Box will now be detected even if negative and fractional values are contained
-- Translation will happen automatically if a Bounding Box comment exists with negative offsets
-- Warning(s) are printed if Bounding Boxes with negative coordinates are detected
-- Built-in wildcard processing is only effective for non-Unix platforms
-----------------------------
-revision 1.48
-date: 2003/11/09 17:47:47; author: bless; state: Exp; lines: +5 -5
-- print help, license and version to stdout instead of stderr (incorporated patch from Rafael Laboissiere <rafael at debian.org>)
-----------------------------
-revision 1.47
-date: 2003/07/09
-- different informational message for -F flag
-----------------------------
-revision 1.46
-date: 2003/07/09
-- now using Getopt::Long::Configure(), because the other way caused problems with module exports
-- fixsearchpat/fixreplacepat now filters initmatrix initclip initgraphics which is more generic
- and will hopefully fix more bad postscript code
-- binary section detection had missing CRLFs
-- binary section detection now includes PScript 4 doNimage end marker
-- improved pattern for ADO detection
-----------------------------
-revision 1.45
-date: 2003/07/04
-- improved processing of images for Pscript_Win_Dib_L2: comment filtering
- will not occur within doNimage,doclutimage,beginjpeg etc.
-----------------------------
-revision 1.44
-date: 2003/07/03
-- looseBB was not initialized
-- disabled use warnings since it may confuse users
-----------------------------
-revision 1.43 (not released)
-date: 2003/07/02
-- deactivated triggered filter and replaced it with search/replace filter
-- new $filtersearchpat,$filterreplacepat combo to filter "initclip"
- for PScript5.dll Version 5.2
-- sanity check never worked, fixed it
-- new option -W --warnings to allow optional sanity check
-- added various comments and reformatted source a little bit
-- changed output within option processing, --help, --version, etc.
-- added use warnings;
-- refined filter expression in $rangefilter_begin
-- added $exclude_rangefilter_begin and $..._end pair to preserve non PPD
- feature code (although DSCs are possibly removed)
- (this feature was integrated from my filterfeatures script)
-----------------------------
-revision 1.42 (not released)
-date: 2003/04/14
-- provided more robustness if Postscript headerline is malformed
-----------------------------
-revision 1.41 (not released)
-date: 2003/03/21
-- converted option processing to Getopt::Long package (based on code from Christophe Druet)
-- rudimentary internal wildcard support (based on code from Christophe Druet)
- (currently only within current directory)
-----------------------------
-revision 1.40 (not released)
-date: 2003/01/30
-- added filter for Orientation: comment in header, see new option -O
-----------------------------
-revision 1.39
-date: 2002/07/10
-- changed new XP filter to triggered filter
-- improved processing of binary files with beginimage endimage
-----------------------------
-revision 1.38 (not released)
-date: 2002/07/09
-- changed comment filtering in order to prevent image distortion
-- new filter for Windows XP PScript5.dll Version 5.2:
- Bad lines are:
- 0 GpPBeg
- NP
- 129 400 m 4629 400 l 4629 6400 l 129 6400 l CP
- eoclip
- 1 1 1 SC
- NP
- 128 400 m 4629 400 l 4629 6400 l 128 6400 l CP
- AF
- GSE
- To avoid the white rectangle deleting all the text above,
- it is sufficient to delete
- "1 1 1 SC" to "AF", however, I used eoclip as indicator
- for the whole sequence.
-----------------------------
-revision 1.37 (not released)
-date: 2001/10/10
-- added "/setpagedevice {pop} def" to prolog in order to fix
- problems with pdf creation, pstricks and nested dvips output
- (thanks to Hans Fredrik Nordhaug <hansfn at mi.uib.no> for
- suggesting this addition)
-----------------------------
-revision 1.36 (not released)
-date: 2001/08/30
-Added filter for Staroffice 5.2 Linux
-revision 1.35
--------------
-date: 2001/08/20 13:32:36
-- Improved removeADO (tolerates more spaces)
-----------------------------
-revision 1.34 (not released)
--------------
-date: 2001/08/20 12:38:22
-- Improved processing of files with leading or trailing binary code
-- Improved processing of files with embedded binary coded images
-- Removes gabby diagnostic output from Adobe Printer Driver (see variable removeADO)
-----------------------------
-revision 1.33 (not released)
--------------
-date: 2001/04/25 22:42:10
-- Corrected %%EOF handling (regex) once again, because of braindead Win-files with _CR_LF
-- Corrected handling of existing %%BoundingBox comments. Now it takes the last one seen.
- Should esp. work with %%BoundingBox: (atend) usage...
-----------------------------
-revision 1.32 (not released)
--------------
-date: 2001/04/06 22:31:27
-- Fixed case sensitiveness when checking for suffix replacement
- (thanks to Erik Jørgensen)
-----------------------------
-revision 1.31
--------------
-date: 2001/02/27 19:45:19
-- Heuristic added for finding end of file by counting %%EOF comments.
- Now correctly treats already embedded EPS, too.
- Usually only trailing garbage (e.g., PCL control sequences) follows
- last %%EOF. However, sometimes the last %%EOF may be missing.
- Therefore, the behavior is switchable by new -E option.
-----------------------------
-revision 1.30 (not released)
--------------
-date: 2001/02/09 16:55:32
-Just forgot the new options in usage line, corrected year in copyright
-----------------------------
-revision 1.29
--------------
-date: 2001/02/09 15:43:28
-- New first line of code for getting rid of the #! comment
-- EOF handling corrected, allowing better handling of already embedded eps files
-- New -P option to allow selective removal of embedded preview images
- (was previously default)
-- Preview images were not filtered in the prolog section (now corrected with -P)
-- New -N option to prevent inclusion of any surrounding postscript code
-----------------------------
-revision 1.28
--------------
-date: 2000/10/13 09:51:55
-\n was missing at altered clipping bounding box
-----------------------------
-revision 1.27 (not released)
-date: 2000/10/13 09:39:07
-Clip option should now also print the enlarged BoundingBox in the
-Postscript header, so it is not cut off if it gets clipped again.
-----------------------------
-revision 1.26
-- just fixed the E-Mail address, because it will not change so often
- in the future
-----------------------------
-revision 1.25 (not released)
-- new -C option clipping added
-- fixed page bounding box search message
-- bbox 1.10 now fixed scanf() which might cause crashes
-----------------------------
-revision 1.24
-date: 2000/07/24 18:52:36;
-- just forgot the new options in usage txt, now fixed
-----------------------------
-revision 1.23
-date: 2000/07/24 18:34:52;
-- ps2eps now uses existing Bounding Box for GS rendering
- (can be switched off with -B option)
-- Original Postscript version from first header line should now be retained
- in output file
-- provide --help and --version with usual meaning for GNU programs
-----------------------------
-revision 1.22
-date: 2000/02/23 14:15:31; author: bless; state: Exp; lines: +12 -6
-ps2eps now draws in color (ppm) by default.
-Monochrome option added.
-Fixing message was not printed for each file.
-----------------------------
-not released before...
diff --git a/support/ps2eps/INSTALL.txt b/support/ps2eps/INSTALL.txt
deleted file mode 100644
index d3ca8d0926..0000000000
--- a/support/ps2eps/INSTALL.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-INSTALLATION
-------------
-
-* Prerequisites
- you need:
- - perl (an interpreter for the perl language, see http://www.perl.com)
- - ghostscript (an interpreter/raster image processor
- for the PostScript language,
- see http://pages.cs.wisc.edu/~ghost/)
- - maybe an ANSI-C compiler if the provided binaries for bbox do not work
- for you. Sorry for the inconvenience, but I tried to write a bbox
- equivalent in perl and it was terribly slow. Therefore I stick to C,
- because of much better performance.
- ALTERNATIVELY you can use ps2eps option -g, then no bbox binary is
- required.
-
-* How to install
-
- Please check that you have working
- perl and ghostscript packages.
-
- Linux/UNIX-based platform
- =========================
- 1.) install bbox
-
- If a bbox binary is included for your platform you simply move it
- into any directory of the system search path. Otherwise, you have
- to compile bbox.c first by invoking
- cc -o bbox bbox.c.
- (sometimes "make bbox" also works).
- Please make sure that bbox is executable (chmod a+x bbox).
- If you already have a working perl and a working ghostscript, you're
- finished here, else you have to install them first.
-
- 2.) install ps2eps
- On Unix platforms you simply move the perl script ps2eps into
- a directory which is included in the system or personal search
- path (e.g., /usr/local/bin, $home/bin). Please make sure that
- ps2eps is executable (chmod a+x ps2eps).
-
- Windows-based platform
- ======================
- Use the command line interpreter:
- Copy bbox.exe from bin/win32/ directory into a directory that is
- in your's or the system's search path for executables. Please try
- to invoke bbox -h afterwards.
-
- The best possibility is to use associated file types under
- Windows NT/2000/XP:
- 1.) rename ps2eps to ps2eps.pl and
- 2.) SET PATHEXT=.pl;%PATHEXT% or use the
- settings -> control panel -> system -> "advanced" tab -> environment variables
- and edit the PATHEXT entry accordingly.
- 3.) then simply typing ps2eps should invoke ps2eps correctly
-
- Another option is to call perl directly:
- perl ps2eps ...
-
- The script assumes that you have "gswin32c" as
- postscript interpreter in your path. Under Windows ps2eps
- can perform wildcard expansion now on its own.
-
-UPDATES
--------
-Possibly you can find the newest version at the
-following URL:
-http://tm.uka.de/~bless/ps2eps
diff --git a/support/ps2eps/Latest_is_1.68 b/support/ps2eps/Latest_is_1.68
deleted file mode 100644
index e69de29bb2..0000000000
--- a/support/ps2eps/Latest_is_1.68
+++ /dev/null
diff --git a/support/ps2eps/README b/support/ps2eps/README
deleted file mode 100644
index 0f9784de35..0000000000
--- a/support/ps2eps/README
+++ /dev/null
@@ -1,43 +0,0 @@
-DOCUMENTATION
-=============
-Please see documentation in the manpage or doc/ sub directory.
-Note that the manpage may have an older version number in it,
-which is nothing to worry about since there may have been minor changes
-incorporated into ps2eps not requiring any update of the
-documentation.
-
-INSTALLATION
-============
-Please see instructions in separate text file INSTALL.txt
-
-UPDATES
-=======
-Possibly you can find the newest version at the
-following URL:
-http://www.ipv6.tm.uka.de/~bless/ps2eps
-
-
-Contact information:
- Roland Bless, roland <at> bless.de
-
- If you have problems, please send a gzipped file of
- relevant postscript code with your error description
- and ps2eps version number.
-
-License:
- 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
----------------------------------------------------------------------------
-End of README.txt
----------------------------------------------------------------------------
diff --git a/support/ps2eps/README.md b/support/ps2eps/README.md
new file mode 100644
index 0000000000..9eb7a0e503
--- /dev/null
+++ b/support/ps2eps/README.md
@@ -0,0 +1,63 @@
+# ps2eps
+ps2eps - calculate correct bounding boxes for PostScript and PDF files
+
+## Description
+
+ps2eps is a tool (written in Perl) to produce Encapsulated PostScript
+Files (EPS/EPSF) from usual one-paged Postscript documents. It
+calculates correct Bounding Boxes for those EPS files and filters some
+special postscript command sequences that can produce erroneous
+results on printers. EPS files are often needed for including
+(scalable) graphics of high quality into TeX/LaTeX (or even Word)
+documents. Included graphics can be clipped to their bounding box.
+
+Nowadays PDF is more widely used, but the original problems
+described below still exist: pdfcrop sometimes does not
+produce the correct bounding box. This program can be used
+together with pdfcrop in order to produce reliable bounding
+boxes for PDF files, too.
+
+Other programs like ps2epsi do not calculate the bounding box
+always correctly (because the values are put on the postscript
+stack which may get corrupted by bad postscript code) or rounded
+it off so that clipping the EPS cut off some part of the image.
+ps2eps uses a double precision resolution of 144 dpi and appropriate
+rounding to get a proper bounding box. The internal bbox device of
+ghostscript generates different values (sometimes even incorrect),
+so using the provided bbox should be more robust.
+However, because normal clipping has only a resolution of 1/72dpi
+(postscript point), the clipping process may still erase parts
+of your EPS image. In this case please use the -l option to add
+an additional point of white space around the tight bounding box.
+
+## Documentation
+
+Please see documentation in the manpage or doc/ sub directory.
+Note that the manpage may have an older version number in it,
+which is nothing to worry about since there may have been minor
+changes incorporated into ps2eps not requiring any update of the
+documentation.
+
+## Installation
+
+see doc/INSTALL.md
+
+## Updates
+
+See the git repository: https://github.com/roland-bless/ps2eps
+
+## License (GNU GPL 2.0)
+
+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
diff --git a/support/ps2eps/bin/linux/i386/bbox b/support/ps2eps/bin/linux/i386/bbox
deleted file mode 100644
index c1d388036f..0000000000
--- a/support/ps2eps/bin/linux/i386/bbox
+++ /dev/null
Binary files differ
diff --git a/support/ps2eps/bin/linux/x86_64/bbox b/support/ps2eps/bin/linux/x86_64/bbox
deleted file mode 100755
index 42052fe2e2..0000000000
--- a/support/ps2eps/bin/linux/x86_64/bbox
+++ /dev/null
Binary files differ
diff --git a/support/ps2eps/doc/INSTALL.md b/support/ps2eps/doc/INSTALL.md
new file mode 100644
index 0000000000..c699dabbda
--- /dev/null
+++ b/support/ps2eps/doc/INSTALL.md
@@ -0,0 +1,75 @@
+# INSTALLATION
+
+## Prerequisites
+
+you need:
+
+* perl (an interpreter for the perl language, see
+ http://www.perl.com)
+
+* ghostscript (an interpreter/raster image processor for the
+ PostScript language, see
+ https://www.ghostscript.com/)
+
+* maybe an ANSI-C compiler if the provided binaries for bbox do not
+ work for you. Sorry for the inconvenience, but I tried to write a
+ bbox equivalent in perl and it was terribly slow. Therefore I stick
+ to C, because of much better performance. *Alternatively* you can
+ use ps2eps option -g, then no bbox binary is required.
+
+## How to install
+
+ Please check that you have working
+ <kbd>perl</kbd> and <kbd>ghostscript</kbd> packages.
+
+### Linux/UNIX-based platform
+
+1. install bbox
+
+ If a bbox binary is included for your platform you simply move it
+ into any directory of the system search path. Otherwise, you have
+ to compile bbox.c first by invoking
+
+ ```
+ cc -o bbox bbox.c.
+ ```
+
+ (sometimes "make bbox" also works).
+ Please make sure that bbox is executable (chmod a+x bbox).
+ If you already have a working perl and a working ghostscript, you're
+ finished here, else you have to install them first.
+
+2. install ps2eps
+
+ On Unix platforms you simply move the perl script ps2eps into a
+ directory which is included in the system or personal search path
+ (e.g., /usr/local/bin, $home/bin). Please make sure that ps2eps is
+ executable (chmod a+x ps2eps).
+
+### Windows-based platform
+
+Use the command line interpreter:
+Copy bbox.exe into a directory that is
+in your's or the system's search path for executables. Please try
+to invoke bbox -h afterwards.
+
+The best possibility is to use associated file types under
+Windows:
+
+1. rename ps2eps to ps2eps.pl and
+
+2. SET PATHEXT=.pl;%PATHEXT% or use the
+ settings -> control panel -> system -> "advanced" tab -> environment variables
+ and edit the PATHEXT entry accordingly.
+
+3. then simply typing ps2eps should invoke ps2eps correctly
+
+ Another option is to call perl directly:
+```
+ perl ps2eps ...
+```
+
+The script assumes that you have "gswin32c" as
+postscript interpreter in your path. Under Windows ps2eps
+can perform wildcard expansion on its own.
+
diff --git a/support/ps2eps/doc/html/bbox.html b/support/ps2eps/doc/bbox.html
index 581d13f7bc..581d13f7bc 100644
--- a/support/ps2eps/doc/html/bbox.html
+++ b/support/ps2eps/doc/bbox.html
diff --git a/support/ps2eps/doc/bbox.pdf b/support/ps2eps/doc/bbox.pdf
new file mode 100644
index 0000000000..91d95d6f57
--- /dev/null
+++ b/support/ps2eps/doc/bbox.pdf
Binary files differ
diff --git a/support/ps2eps/doc/man/man1/bbox.1 b/support/ps2eps/doc/man/man1/bbox.1
deleted file mode 100644
index 64696f3264..0000000000
--- a/support/ps2eps/doc/man/man1/bbox.1
+++ /dev/null
@@ -1,71 +0,0 @@
-.\" This manpage has been automatically generated by docbook2man
-.\" from a DocBook document. This tool can be found at:
-.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
-.\" Please send any bug reports, improvements, comments, patches,
-.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "BBOX" "1" "31 August 2010" "" ""
-
-.SH NAME
-bbox \- prints out the bounding box of a rawppm or rawpbm image
-.SH SYNOPSIS
-
-\fBbbox\fR [ \fB-l\fR ] [ \fB-r\fR ] [ \fB-h\fR ] [ \fB-V\fR ] [ \fB\fIrawpbmfile\fB\fR ]
-
-.SH "DESCRIPTION"
-.PP
-\fBbbox\fR reads a rawppm or rawpbm file
-and prints out the bounding box of the image (as postscript comment and
-in postscript points, i.e. 1/72dpi) as well as the high resolution
-bounding box. Input is read from standard input if no filename is
-specified.
-Example output:
-
-.nf
- %%BoundingBox: 12 253 829 837
- %%HiResBoundingBox: 12.500000 253.000000 828.500000 837.00000
-
-.fi
-.PP
-\fBbbox\fR has only very limited memory requirements
-as it reads the input line by line and thus needs to store only one picture
-line in memory.
-.SH "OPTIONS"
-.TP
-\fB-h | --help \fR
-Show summary of options.
-.TP
-\fB-V \fR
-Show version of program.
-.TP
-\fB-r \fR
-resolution of picture in dpi
-.TP
-\fB-l \fR
-loose bounding box (integer bounding box is expanded by 1
-point, hires bounding box is expanded by 0.5 points)
-.SH "SEE ALSO"
-.PP
-ps2eps (1)
-.SH "AUTHOR"
-.PP
-\fBbbox\fR was written by Roland Bless.
-.SS "ACKNOWLEDGMENTS"
-.PP
-Special thanks goes to Michael Sharpe from UCSD who suggested a lot of improvements for
-bbox to become more precise and robust, especially for small drawings.
-.PP
-An earlier version of this manual page was originally written by
-Rafael Laboissiere <rafael@debian.org> for
-the Debian system. Thank you Rafael! Permission is
-granted to copy, distribute and/or modify this document under
-the terms of the GNU Free Documentation
-License, Version 1.1 or any later version published by the Free
-Software Foundation; with no Invariant Sections, no Front-Cover
-Texts and no Back-Cover Texts.
-.SH "BUGS"
-.PP
-Though the code is quite small and the probability for bugs
-is now small, there may be some left somewhere between the lines.
-In case you find one, please send a short description with
-\fBbbox\fR version number to <roland@bless.de> (please allow some time
-to reply).
diff --git a/support/ps2eps/doc/man/man1/ps2eps.1 b/support/ps2eps/doc/man/man1/ps2eps.1
deleted file mode 100644
index d74e88ca34..0000000000
--- a/support/ps2eps/doc/man/man1/ps2eps.1
+++ /dev/null
@@ -1,366 +0,0 @@
-.\" This manpage has been automatically generated by docbook2man
-.\" from a DocBook document. This tool can be found at:
-.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
-.\" Please send any bug reports, improvements, comments, patches,
-.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "PS2EPS" "1" "31 August 2010" "" ""
-
-.SH NAME
-ps2eps \- convert PostScript to EPS (Encapsulated PostScript) files
-.SH SYNOPSIS
-
-\fBps2eps\fR [ \fB-f\fR ] [ \fB-q\fR ] [ \fB-N\fR ] [ \fB-O\fR ] [ \fB-n\fR ] [ \fB-P\fR ] [ \fB-c\fR ] [ \fB-C\fR ] [ \fB-m\fR ] [ \fB-B\fR ] [ \fB-E\fR ] [ \fB-s \fIpagedim\fB\fR ] [ \fB-t \fIoffset\fB\fR ] [ \fB-r \fIresolution\fB\fR ] [ \fB-R \fI+|-|^\fB\fR ] [ \fB-l\fR ] [ \fB-g\fR ] [ \fB-H\fR ] [ \fB-d\fR ] [ \fB-h|--help\fR ] [ \fB-a\fR ] [ \fB-W\fR ] [ \fB-L\fR ] [ \fB-V|--version\fR ] [ \fB--\fR ] [ \fB\fIpsfile1\fB\fR ] [ \fB\fIpsfile2\fB\fR ] [ \fB\fI\&...\fB\fR ]
-
-.SH "DESCRIPTION"
-.PP
-This manual page documents \fBps2eps\fR version 1.68.
-.PP
-\fBps2eps\fR is a tool (written in Perl) to produce
-Encapsulated PostScript Files (EPS/EPSF) from usual one-paged Postscript
-documents. It calculates correct Bounding Boxes for those EPS files and
-filters some special postscript command sequences that can produce
-erroneous results on printers. EPS files are often needed for including
-(scalable) graphics of high quality into TeX/LaTeX (or even Word) documents.
-.PP
-Without any argument, ps2eps reads from standard input
-and writes to standard output.
-If filenames are given as arguments they are processed
-one by one and output files are written to filenames
-with extension \fI\&.eps\fR\&. If input filenames have the
-extension \fI\&.ps\fR or \fI\&.prn\fR, this extension is replaced with \fI\&.eps\fR\&.
-In all other cases \fI\&.eps\fR is appended to the input filename.
-Please note that PostScript files for input should contain
-only one single page (you can possibly use the \fBpsselect\fR from the
-psutils package to extract a single page from a document that
-contains multiple pages).
-.PP
-If BoundingBox in output seems to be wrong, please try options \fB--size\fR or
-\fB--ignoreBB\fR\&. See also section TROUBLESHOOTING.
-.SH "OPTIONS"
-.PP
-\fBps2eps\fR follows the usual GNU command line syntax,
-with long options starting with two dashes (`-'). A summary of
-options is included below.
-.TP
-\fB-h, --help \fR
-Show summary of options.
-.TP
-\fB-V, --version \fR
-Show version of program.
-.TP
-\fB-f, --force \fR
-Force overwriting existing files. \fBps2eps\fR
-will not overwrite files by default to avoid deleting original EPS
-files accidently.
-.TP
-\fB-q, --quiet \fR
-quiet operation (no output while processing files, except errors).
-.TP
-\fB-N, --noinsert \fR
-do not insert any postscript code. Normally a few postscript
-instructions are added around the original postscript code by
-\fBps2eps\fR which can be turned off by this option.
-.TP
-\fB-O, --preserveorientation \fR
-do not filter %%Orientation: header comment.
-.TP
-\fB-n, --nofix \fR
-do not try to fix postscript code by filtering some instructions.
-.TP
-\fB-P, --removepreview \fR
-remove preview image (smaller file, but no preview anymore).
-.TP
-\fB-F, --fixps \fR
-fix postscript code unconditionally. Otherwise, filtering is
-usually triggered by detection of certain drivers only.
-.TP
-\fB-c, --comments \fR
-preserve document structure comments.
-.TP
-\fB-C, --clip \fR
-insert postscript code for clipping. Unless
-\fB--nohires\fR is specified, the HiResBoundingBox
-(enlarged by 0.1 points) is used for clipping.
-.TP
-\fB-m, --mono \fR
-use black/white bitmap as base for calculation (default: off).
-.TP
-\fB-s, --size=pagedim \fR
-where pagedim is a pre-defined standard page size
-(e.g., a4,a0,b0,letter,...) or explicitly specified in a
-format pagedim:=\fIX\fRx\fIY\fR[cm|in],
-where \fIX\fR and \fIY\fR are numbers (floating points are accepted) followed by
-units centimeter (cm) or inch (in), (default: cm).
-Use \fB--size=list\fR to list pre-defined pagesizes.
-See also environment variable PS2EPS_SIZE\&.
-.TP
-\fB-t, --translate=x,y \fR
-specify an x,y offset (may be negative) in postscript points
-(1/72 dpi) for drawing. This option may be required
-if your drawing has negative coordinates which usually lets ghostscript
-cut the negative part of your picture, because it starts to render
-at positive coordinates. The resulting output will
-also be shifted.
-.TP
-\fB-r, --resolution=dpi \fR
-specify a resolution in dpi (dots per inch) for drawing under
-ghostscript. Default
-resolution is 144 dpi which is the double of the typical 72 dpi.
-This option may help if there is a hardware dependent resolution
-encoded in the postscript, e.g., 600dpi. Example:
-\fBps2eps -l -r 600 test.ps\fR
-.TP
-\fB-R, --rotate=direction \fR
-This option rotates the resulting EPS output.
-The parameter direction determines the direction of
-rotation: + means +90 degrees (clockwise),- means -90 degrees
-(counter-clockwise), and ^ means 180 degrees (up-side down).
-.TP
-\fB-l, --loose \fR
-expand the original tight bounding box by one point in each
-direction.
-.TP
-\fB-B, --ignoreBB \fR
-do not use existing bounding box as page size for
-rendering.
-.TP
-\fB-E, --ignoreEOF \fR
-do not use %%EOF as hint for end of file. Otherwise, \fBps2eps\fR assumes
-that postscript code ends after the last %%EOF comment, because
-some drivers add trailing binary ``garbage'' code which gets deleted
-by \fBps2eps\fR by default.
-.TP
-\fB-g, --gsbbox \fR
-use internal bbox device of ghostscript instead of the external C
-program \fBbbox\fR\&. The internal bbox device of ghostscript
-generates different values (sometimes even incorrect),
-so using the provided \fBbbox\fR should be more robust.
-See also environment variable PS2EPS_GSBBOX\&.
-.TP
-\fB-H, --nohires \fR
-do not generate a %%HiResBoundingBox comment for output.
-.TP
-\fB-a, --accuracy \fR
-increase the accuracy by turning subsample antialiasing on (may be slower)
-.TP
-\fB-L, --license \fR
-show licensing information.
-.TP
-\fB-d, --debuggs \fR
-show ghostscript call. This may be helpful for solving problems that
-occur during a ghostscript call.
-.TP
-\fB-W, --warnings \fR
-show warnings about sanity of generated EPS file. Certain
-postscript commands should not be contained in an EPS file.
-With this option set \fBps2eps\fR will issue a warning if it
-detects at least one of them.
-.SH "TROUBLESHOOTING"
-.PP
-Based on the given postscript source code (in most cases generated by
-some postscript printer driver) there are many potential obstacles or
-problems that may occur when trying to create proper EPS files. Please
-read this section carefully to be aware of common pitfalls.
-.SS "INCOMPLETE/CLIPPED IMAGES"
-.PP
-or how to determine the right size for ghostscript.
-.PP
-If you have documents that are larger than your
-ghostscript default (usually A4 or US letter), you have to
-specify the page dimensions explicitly using the
-\fB-s\fR option. Otherwise your EPS
-might be cut off during rasterizing by ghostscript resulting
-in a wrongly calculated bounding box. You can pass
-all pre-defined page sizes to \fB-s\fR that ghostscript understands. These are
-currently: 11x17, ledger, legal, letter, lettersmall, archA, archB, archC, archD, archE
-a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, isob0, isob1, isob2, isob3, isob4, isob5, isob6,
-b0, b1, b2, b3, b4, b5, c0, c1, c2, c3, c4, c5, c6, jisb0, jisb1,
-jisb2, jisb3, jisb4, jisb5, jisb6, flsa, flse, halfletter.
-Unfortunately, all sizes are currently only available in portrait
-orientation (not landscape).
-.PP
-By default, \fBps2eps\fR uses an already given %%BoundingBox
-from the source file, which often corresponds to the size of
-the physical page format for which the document was
-printed. However, you should be aware that this already
-specified bounding box may be not correct, thus resulting in a
-wrongly cropped (or even no usable) \fI\&.eps\fR-file.
-\fBps2eps\fR can only do as good as ghostscript does in rendering the original
-postscript file (though \fBps2eps\fR even works with negative and
-fractional values are contained in the original bounding box by using
-automatic translation). Therefore, if the given bounding box is to
-small or incorrect anyway, you can ignore the existing bounding box with the \fB-B\fR
-option, which will cause ghostscript to use its internal
-default size (or use \fB-s\fR). However, if the
-BoundingBox has negative coordinates, which is not allowed by
-the specification, \fBps2eps\fR will shift the output to positive values.
-.PP
-Hint: to avoid rotating the picture
-if you have the original drawing in landscape format, you may
-use the ``Encapsulated Postscript'' option in the printer driver
-which should generate an EPS file (but with a bounding box of
-the sheet size!). But some Windows printer drivers are drawing
-the image with an offset from the bottom of the portrait page,
-so that a part of it is drawn outside the landscape oriented
-page. In this case, you'll have to specify a square size of
-the page using the maximum length, e.g., 29.7cm x 29.7cm for
-an A4 page.
-.SS "CLIPPING"
-.PP
-or why gets some of my text deleted above the included \fI\&.eps\fR file?
-.PP
-Some postscript drivers draw a white rectangle from the top left
-corner of the page to the right lower corner of the object. This may
-erase some or even all text above your imported/included EPS file,
-which is very annoying. In order to prevent this, most programs have a
-clipping option for imported \fI\&.eps\fR files (within LaTeX you can use
-\\includegraphics*{}) for this purpose. If this is unfortunately not
-the case, you can use the \fB-C\fR option of \fBps2eps\fR which will (hopefully)
-do it for you. Unfortunately, PScript.dll 5.2 (Windows XP) introduced
-new very badly behaving Postscript code (initclip) which will even
-override the outer clipping! Thus, a new filter had to be installed
-in \fBps2eps\fR which will fix it.
-.PP
-However, because most programs clip directly on the bounding box,
-you still may loose some pixels of your image, because the bounding
-box is described in the coarse resolution of postscript points,
-i.e. 72 dpi. In order to prevent this, you can use the \fB-l\fR
-option or \fB-C\fR option (for the latter, clipping by the importing program
-should be disabled then) to allow for a 1 point larger bounding box.
-\fB-C\fR clips around a 1 point enlarged bounding box and \fB-l\fR enlarges the
-bounding box values by 1 point (you can also combine both options).
-.SS "INCLUDED FILTERS"
-.PP
-Some postscript sequences, e.g., for using specific printer
-features (featurebegin ...), are not working well within an \fI\&.eps\fR
-file, so \fBps2eps\fR tries to filter them out. But please note that
-filters for postscript code may not work properly for your printer
-driver (\fBps2eps\fR was mainly tested with HP and Adobe printer
-drivers, although it may work for all printers using the
-PScript.dll). In this case you can try to turn of filtering by
-using option \fB-n\fR, or try to find the bad sequence in the postscript
-code and adapt the filter rule in the \fBps2eps\fR script (variables
-$linefilter, $rangefilter_begin, $rangefilter_end; linefilter is
-an expression for filtering single lines, rangefilter_... are
-expressions that filter all lines between a pattern matching
-$rangefilter_begin and $rangefilter_end; drop me an e-mail with
-your modifications). However, things may change as the printer
-drivers (e.g., PScript.dll) or postscript language evolve.
-.PP
-Some applications or drivers generate postscript code with leading
-or trailing binary code, which often confuses older postscript
-interpreters. \fBps2eps\fR tries to remove such code, but it may
-sometimes make a wrong guess about start and end of the real
-postscript code (drop me an e-mail with a zipped postscript
-source, see section BUGS).
-.PP
-Comment lines or even blank lines are removed
-(which is the default to make .eps files smaller), which may corrupt your
-output. Please check the next section how to fix this.
-\fBps2eps\fR removes blank lines and also <CR> (carriage ceturn
-``\\r'') at the end of lines. However, nicely formatted postscript code
-gives a hint by using ``%%BeginBinary'' ``%%EndBinary'' comments. When
-\fBps2eps\fR detects these comments it will refrain from any filtering
-action within the marked binary sections.
-.PP
-\fBps2eps\fR filters also %%Orientation: comments by
-default (you can use option \fB-O\fR to turn off filtering),
-because ghostscript may ``automagically'' rotate images when generating PDF
-images, which is not desired in most cases. Hint: you can turn off that
-feature in ghostscript unconditionally by specifying -dAutoRotatePages=/None.
-.SS "CORRUPTED OUTPUT"
-.PP
-Some postscript code may get corrupted when comment lines or even blank
-lines are removed (which is the default to make .eps files smaller),
-because those files may contain encoded images
-which also have a % as first character in a line or use a special
-comment as end of image delimiter. If this is the case, use the \fB-c\fR
-option to prevent filtering comments.
-.SS "COLOR AND MEMORY"
-.PP
-\fBps2eps\fR supports colored postscript, consequently
-letting ghostscript consume more resources for drawing its bitmap
-(roughly 6MBytes for an A4 page). \fBbbox\fR is reading
-the bitmap line by line so it consumes only minimal memory. If you experience problems
-with memory consumption of ghostscript, you may use the \fB-m\fR option
-for using a monochrome image. But this will probably result in wrongly
-determined bounding boxes with colored
-images, because ghostscript has to do black/white dithering and may thus suppress
-objects drawn in light colors.
-.PP
-Another option in case of memory problems and too long run times
-is to use the much more memory efficient internal ghostscript bbox by using the
-\fB-g\fR option.
-.SH "ENVIRONMENT VARIABLES"
-.PP
-Please note that a command line option always takes precedence over
-the related environment variable.
-.PP
-The environment variable PS2EPS_SIZE can be used
-to specify a default page size and take any argument that
-\fB--size\fR accepts. Examples: \fBexport PS2EPS_SIZE=a0\fR (bash-like syntax)
-or \fBsetenv PS2EPS_SIZE letter\fR (csh syntax).
-.PP
-If the environment variable PS2EPS_GSBBOX is set
-the internal bbox device of ghostscript will be used instead of the external
-command \fBbbox\fR\&. Examples: \fBexport PS2EPS_GSBBOX=true\fR (bash-like syntax)
-or \fBsetenv PS2EPS_GSBBOX 1\fR (csh syntax).
-.SH "EXAMPLES"
-.PP
-The usual call is simply:
-\fBps2eps -l \fIfile\fB\fR
-.PP
-A relatively failsafe call would be (if your postscript is smaller
-than iso b0 [100cm x 141.4cm] and you have a fast computer with enough memory):
-\fBps2eps -l -B -s b0 -c -n \fIfile\fB\fR
-.PP
-If output is not correct try:
-\fBps2eps -l -B -s b0 -F \fIfile\fB\fR
-.SH "AUTHOR"
-.PP
-\fBps2eps\fR was written by Roland Bless.
-.SS "WHY?"
-.PP
-Other programs like \fBps2epsi\fR do not calculate the
-bounding box always correctly (because the values are put on the
-postscript stack which may get corrupted by bad postscript code) or
-rounded it off so that clipping the EPS cut off some part of the
-image. \fBps2eps\fR uses a double precision resolution
-of 144 dpi and appropriate rounding to get a proper bounding
-box. The internal bbox device of ghostscript generates different values
-(sometimes even incorrect), so using the provided \fBbbox\fR
-should be more robust.
-However, because normal clipping has only a resolution of 1/72dpi
-(postscript point), the clipping process may still erase parts of your
-EPS image. In this case please use the \fB-l\fR option to add
-an additional point of white space around the tight bounding box.
-.SS "ACKNOWLEDGMENTS"
-.PP
-Some people contributed code or suggestions to improve \fBps2eps\fR\&. Here
-are at least some names (sorry if I forgot your name):
-Christophe Druet, Hans Ecke, Berend Hasselman, Erik Joergensen, Koji Nakamaru, Hans Fredrik Nordhaug, Michael Sharpe.
-Special thanks goes to Michael Sharpe from UCSD who suggested a lot of useful features for ps2eps and
-who fixed bbox to become more precise and robust.
-.PP
-An earlier version of this manual page was originally written by
-Rafael Laboissiere <rafael at debian.org> for
-the Debian system. Thank you Rafael!
-.PP
-Permission is granted to copy, distribute and/or modify this document under
-the terms of the GNU Free Documentation
-License, Version 1.1 or any later version published by the Free
-Software Foundation; with no Invariant Sections, no Front-Cover
-Texts and no Back-Cover Texts.
-.SH "BUGS"
-.PP
-If you experience problems, please check carefully all hints in the section
-TROUBLESHOOTING
-first. Otherwise, check for an updated
-version at <URL:http://www.tm.uka.de/~bless/ps2eps>
-or send a gzipped file of
-relevant postscript source code with your error description
-and \fBps2eps\fR version number to <roland at bless.de> (please allow some time
-to reply).
-.SH "SEE ALSO"
-.PP
-bbox (1), gs (1), ps2epsi (1)
diff --git a/support/ps2eps/doc/pdf/bbox.pdf b/support/ps2eps/doc/pdf/bbox.pdf
deleted file mode 100644
index bff1372088..0000000000
--- a/support/ps2eps/doc/pdf/bbox.pdf
+++ /dev/null
Binary files differ
diff --git a/support/ps2eps/doc/pdf/ps2eps.pdf b/support/ps2eps/doc/pdf/ps2eps.pdf
deleted file mode 100644
index 65b36d2183..0000000000
--- a/support/ps2eps/doc/pdf/ps2eps.pdf
+++ /dev/null
Binary files differ
diff --git a/support/ps2eps/doc/html/ps2eps.html b/support/ps2eps/doc/ps2eps.html
index 505ed26db7..bfc331c233 100644
--- a/support/ps2eps/doc/html/ps2eps.html
+++ b/support/ps2eps/doc/ps2eps.html
@@ -52,6 +52,9 @@ CLASS="OPTION"
>-O</CODE
>] [<CODE
CLASS="OPTION"
+>-X</CODE
+>] [<CODE
+CLASS="OPTION"
>-n</CODE
>] [<CODE
CLASS="OPTION"
@@ -153,7 +156,7 @@ CLASS="REPLACEABLE"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN81"
+NAME="AEN83"
></A
><H2
>DESCRIPTION</H2
@@ -161,7 +164,7 @@ NAME="AEN81"
>This manual page documents <B
CLASS="COMMAND"
>ps2eps</B
-> version 1.68.</P
+> version 1.70.</P
><P
><B
CLASS="COMMAND"
@@ -172,6 +175,15 @@ CLASS="COMMAND"
filters some special postscript command sequences that can produce
erroneous results on printers. EPS files are often needed for including
(scalable) graphics of high quality into TeX/LaTeX (or even Word) documents.
+ It can also be used to calculate correct BoundingBoxes for PDF files by
+ using the option <CODE
+CLASS="OPTION"
+>--BBonly</CODE
+>. However, it cannot produce
+ a PDF file, but it can be used together with <B
+CLASS="COMMAND"
+>pdfcrop</B
+>.
</P
><P
>Without any argument, ps2eps reads from standard input
@@ -218,7 +230,7 @@ CLASS="OPTION"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN97"
+NAME="AEN101"
></A
><H2
>OPTIONS</H2
@@ -325,6 +337,47 @@ CLASS="OPTION"
><DT
><CODE
CLASS="OPTION"
+>-X</CODE
+>, <CODE
+CLASS="OPTION"
+>--BBonly</CODE
+></DT
+><DD
+><P
+>Just print the resulting bounding box(es) to standard error, no output file is written.
+ <B
+CLASS="COMMAND"
+>ps2eps</B
+> will perform a read-only operation. This is highly useful to calculate bounding boxes of
+ PDF files. Can be used with option <CODE
+CLASS="OPTION"
+>--quiet</CODE
+> to suppress other output and
+ also with <CODE
+CLASS="OPTION"
+>--nohires</CODE
+> to suppress output of the HiResBoundingBox.
+ It can be used with <B
+CLASS="COMMAND"
+>pdfcrop</B
+> as follows:
+ <B
+CLASS="COMMAND"
+>pdfcrop --gscmd 'gswrap-ps2eps.sh' file.pdf</B
+>
+ where <B
+CLASS="COMMAND"
+>gswrap-ps2eps.sh</B
+> containts something like
+ <B
+CLASS="COMMAND"
+>ps2eps -l -X -q $BASH_ARGV</B
+>
+ </P
+></DD
+><DT
+><CODE
+CLASS="OPTION"
>-n</CODE
>, <CODE
CLASS="OPTION"
@@ -677,7 +730,7 @@ NAME="TROUBLESHOOTING"
><DIV
CLASS="REFSECT2"
><A
-NAME="AEN277"
+NAME="AEN294"
></A
><H3
>Incomplete/Clipped Images</H3
@@ -760,7 +813,7 @@ CLASS="QUOTE"
><DIV
CLASS="REFSECT2"
><A
-NAME="AEN293"
+NAME="AEN310"
></A
><H3
>Clipping</H3
@@ -820,7 +873,7 @@ CLASS="OPTION"
><DIV
CLASS="REFSECT2"
><A
-NAME="AEN307"
+NAME="AEN324"
></A
><H3
>Included Filters</H3
@@ -912,7 +965,7 @@ CLASS="QUOTE"
><DIV
CLASS="REFSECT2"
><A
-NAME="AEN327"
+NAME="AEN344"
></A
><H3
>Corrupted Output</H3
@@ -931,7 +984,7 @@ CLASS="OPTION"
><DIV
CLASS="REFSECT2"
><A
-NAME="AEN331"
+NAME="AEN348"
></A
><H3
>Color and memory</H3
@@ -967,7 +1020,7 @@ CLASS="OPTION"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN339"
+NAME="AEN356"
></A
><H2
>ENVIRONMENT VARIABLES</H2
@@ -1012,7 +1065,7 @@ CLASS="USERINPUT"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN352"
+NAME="AEN369"
></A
><H2
>EXAMPLES</H2
@@ -1054,7 +1107,7 @@ CLASS="REPLACEABLE"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN363"
+NAME="AEN380"
></A
><H2
>AUTHOR</H2
@@ -1066,7 +1119,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT2"
><A
-NAME="AEN367"
+NAME="AEN384"
></A
><H3
>WHY?</H3
@@ -1101,7 +1154,7 @@ CLASS="OPTION"
><DIV
CLASS="REFSECT2"
><A
-NAME="AEN374"
+NAME="AEN391"
></A
><H3
>ACKNOWLEDGMENTS</H3
@@ -1152,9 +1205,9 @@ NAME="BUGS"
first. Otherwise, check for an updated
version at <A
-HREF="http://www.tm.uka.de/~bless/ps2eps"
+HREF="https://github.com/roland-bless/ps2eps"
TARGET="_top"
->http://www.tm.uka.de/~bless/ps2eps</A
+>https://github.com/roland-bless/ps2eps</A
>
or send a gzipped file of
relevant postscript source code with your error description
@@ -1174,7 +1227,7 @@ HREF="mailto:roland at bless.de"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN389"
+NAME="AEN406"
></A
><H2
>SEE ALSO</H2
diff --git a/support/ps2eps/doc/ps2eps.pdf b/support/ps2eps/doc/ps2eps.pdf
new file mode 100644
index 0000000000..8d06dd71b0
--- /dev/null
+++ b/support/ps2eps/doc/ps2eps.pdf
Binary files differ
diff --git a/support/ps2eps/scripts/crop-pdfs.sh b/support/ps2eps/scripts/crop-pdfs.sh
new file mode 100755
index 0000000000..94b1f5e400
--- /dev/null
+++ b/support/ps2eps/scripts/crop-pdfs.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+for file in *.pdf
+do
+ filebasename="${file%%.*}"
+ if [ "${filebasename}.pptx" -nt "$file" ]; then
+ echo "Need to reprint ${filebasename}.pptx"
+ fi
+ if [ "$file" -nt "../$file" ]; then
+ ~/scripts/rbpdfcrop >/dev/null 2>&1 $file
+ #echo "${filebasename}-crop.pdf"
+ if [ -e "${filebasename}-crop.pdf" ]; then
+ mv -f "${filebasename}-crop.pdf" ../$file
+ echo "Cropped $file"
+ fi
+ fi
+done
+echo "Done."
diff --git a/support/ps2eps/scripts/gswrap-ps2eps.sh b/support/ps2eps/scripts/gswrap-ps2eps.sh
new file mode 100755
index 0000000000..c6e2ff5fec
--- /dev/null
+++ b/support/ps2eps/scripts/gswrap-ps2eps.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+ps2eps -l -X -q $BASH_ARGV
diff --git a/support/ps2eps/scripts/rbpdfcrop b/support/ps2eps/scripts/rbpdfcrop
new file mode 100755
index 0000000000..c8987f5834
--- /dev/null
+++ b/support/ps2eps/scripts/rbpdfcrop
@@ -0,0 +1,2 @@
+#!/bin/bash
+pdfcrop --gscmd gswrap-ps2eps.sh $*
diff --git a/support/ps2eps/src/C/Makefile b/support/ps2eps/src/C/Makefile
new file mode 100644
index 0000000000..9b563f90ca
--- /dev/null
+++ b/support/ps2eps/src/C/Makefile
@@ -0,0 +1,8 @@
+# ==================================================
+# Makefile for bbox C program
+# ==================================================
+
+CFLAGS=-Wall --pedantic -Wunused
+
+bbox: bbox.c
+ $(CC) $(CFLAGS) bbox.c -o bbox
diff --git a/support/ps2eps/src/C/bbox.c b/support/ps2eps/src/C/bbox.c
index a11a393b9b..668f7e97ee 100644
--- a/support/ps2eps/src/C/bbox.c
+++ b/support/ps2eps/src/C/bbox.c
@@ -1,13 +1,13 @@
/********************************************************************/
/** bbox -- calculates Bounding Box of a pbmraw/ppmraw-picture **/
-/** Created: Nov. 1997, revised Feb. 1998, Dec. 1999, June 2009 **/
+/** Created: Nov. 1997, revised 1998, 1999, 2009, 2021 **/
/** Author: Roland Bless <roland -at- bless.de> **/
-/** Copyright (C) 1998-2009 Roland Bless **/
+/** Copyright (C) 1998-2020 Roland Bless **/
/** To compile simply use: **/
/** "cc bbox.c -o bbox" or "make bbox" **/
/********************************************************************/
/*
- * $Id: bbox.c,v 1.18 2009-10-13 15:03:49 bless Exp $
+ * $Id: bbox.c 146 2021-03-12 20:26:23Z bless $
*/
/**
@@ -52,10 +52,11 @@
/**********************
* global variables *
**********************/
-const char *const version= "$Revision: 1.18 $ $Date: 2009-10-13 15:03:49 $";
+const char *const version= "$Rev: 146 $";
const char *const prgname= "bbox";
const double round_precision= 1e-6;
+const short int inputlinelength= 1024;
unsigned char bitval[8]=
{
@@ -100,7 +101,7 @@ void readppm_and_calcbb(const char *name,
const unsigned char tight)
{
FILE *inputfile;
- char inputline[1024];
+ char inputline[inputlinelength];
unsigned char magic_found= 0;
int x,y,byte_x,i;
const double pt_dpi_dbl= 72.0;
@@ -111,7 +112,6 @@ void readppm_and_calcbb(const char *name,
*tmpcolumnbytep;
unsigned int width,height; /* Image Size */
unsigned int byte_width;
- unsigned char stepsize;
unsigned char colormax= 0; /* max color value */
unsigned int ui_colormax= 0; /* max color value */
@@ -127,25 +127,27 @@ void readppm_and_calcbb(const char *name,
{
fprintf(stderr,"%s: ERROR -- could not open file %s\n",
prgname, name);
- return;
+ exit(1);
}
}
/** check for magic number **/
do
{
- fgets(inputline, 1024, inputfile);
+ if (fgets(inputline, inputlinelength, inputfile) == NULL) {
+ fprintf(stderr,"%s: ERROR -- unexpected end of file %s\n", prgname, name);
+ fclose(inputfile);
+ exit(1);
+ }
#ifdef DEBUG
fprintf(stderr,"read:[%s]\n",inputline);
#endif
if ( strcmp(inputline,"P4\n") == 0 )
{
- stepsize= 1;
magic_found= 4;
}
else
if ( strcmp(inputline,"P6\n") == 0 )
{
- stepsize= 3;
magic_found= 6;
}
}
@@ -155,12 +157,17 @@ void readppm_and_calcbb(const char *name,
{
fprintf(stderr,"%s: ERROR -- %s is not in ppmraw or pbmraw format\n",
prgname, name);
- return;
+ fclose(inputfile);
+ exit(1);
}
/** skip comments **/
do
{
- fgets(inputline, 1024, inputfile);
+ if (fgets(inputline, inputlinelength, inputfile) == NULL) {
+ fprintf(stderr,"%s: ERROR -- unexpected end of file %s\n", prgname, name);
+ fclose(inputfile);
+ exit(1);
+ }
#ifdef DEBUG
fprintf(stderr,"read:[%s]\n",inputline);
#endif
@@ -174,8 +181,12 @@ void readppm_and_calcbb(const char *name,
sscanf(inputline,"%u %u",&width,&height);
if ( magic_found == 6 ) /* PPM file has maximum color-component value */
{
- fgets(inputline, 1024, inputfile);
- sscanf(inputline,"%u",&ui_colormax);
+ if (fgets(inputline, inputlinelength, inputfile) == NULL) {
+ fprintf(stderr,"%s: ERROR -- unexpected end of file %s\n", prgname, name);
+ fclose(inputfile);
+ exit(1);
+ }
+ sscanf(inputline,"%u",&ui_colormax);
colormax = (unsigned char) ui_colormax; /* this is safer */
}
#ifdef DEBUG
@@ -348,7 +359,7 @@ void readppm_and_calcbb(const char *name,
/* skip the rest of the file if any data is still present */
while ( !feof(inputfile) )
{
- fgets(inputline, 1024, inputfile);
+ fgets(inputline, inputlinelength, inputfile);
}
/* give out Bounding Box */
@@ -356,7 +367,7 @@ void readppm_and_calcbb(const char *name,
printf("%%%%HiResBoundingBox: %f %f %f %f\n", hllx, hlly, hurx, hury);
}
else
- fprintf(stderr,"%s: ERROR -- not enough memory to read in one row of the picture\n",prgname);
+ fprintf(stderr,"%s: ERROR -- not enough memory to read in one row of the picture\n", prgname);
fclose(inputfile);
free(image_row);
diff --git a/support/ps2eps/bin/ps2eps b/support/ps2eps/src/perl/ps2eps
index f02e5a29cd..1122a81088 100644
--- a/support/ps2eps/bin/ps2eps
+++ b/support/ps2eps/src/perl/ps2eps
@@ -4,9 +4,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $
# {#!/usr/bin/perl}.
# ps2eps - convert PostScript to EPS (Encapsulated PostScript) files
# -------------------------------------------------------------------
-# $Id: ps2eps,v 1.68 2010-05-07 19:42:35 bless Exp $
-# -------------------------------------------------------
-# (C)opyright 1999-2009 Roland Bless
+# (C)opyright 1998-2018 Roland Bless
#
# 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
@@ -58,7 +56,7 @@ else
$bboxver=`bbox >$NULLDEV -V`;
$bboxname= ($?== -1) ? "" : "bbox";
-$version= '$Id: ps2eps,v 1.68 2010-05-07 19:42:35 bless Exp $'; #'
+$version= '$Id: ps2eps,v 1.70 2018-01-09 18:00:00 bless Exp $'; #'
$insertPScode= 1; # Insert surrounding Postscript code
$infhandle = STDIN; # Standard input is the default input file
$outfhandle = STDOUT; # Standard output is default output if STDIN is input
@@ -76,6 +74,7 @@ $trytofixps= 1; # try to fix postscript code
$forcefixps= 0; # fix postscript code unconditionally if eq 1
$filterorientation= 1;# filter Orientation line
$looseBB=''; # default: tight bounding box
+$bboxonly=0; # output Bounding box only, no other output
$clip=0; # do not clip
$warnings=0; # do not print warnings concerning postscript sanity
$debuggs=0; # no debugging of ghostscript call, turn this on if you want to see the gs call
@@ -148,7 +147,7 @@ $licensetxt= "\
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n";
@prgidtxt= ( "$prgname - convert PostScript to EPS (Encapsulated PostScript) files\n",
- "(C)opyright 1998-2009 Roland Bless\n\n" );
+ "(C)opyright 1998-2018 Roland Bless\n\n" );
@helptxt= ("Version: $ver[2]\n",
"Operation:\n",
@@ -164,12 +163,13 @@ $licensetxt= "\
" If BoundingBox in output seems to be wrong, please try options --size or --ignoreBB.\n\n" );
@usagetxt= ("Syntax:\n",
- " $prgname [-f] [-q] [-N] [-O] [-n] [-P] [-c] [-b] [-C] [-m] [-B] [-E] [-s <pagedim>] [-R +|-|^] [-t <x,y>] [-l] [-g] [-d] [-H] [-h|--help] [-g] [-a] [-W] [-L] [-V|--version] [--] [psfile1] [psfile2] [...]\n",
+ " $prgname [-f] [-q] [-N] [-O] [-X] [-n] [-P] [-c] [-b] [-C] [-m] [-B] [-E] [-s <pagedim>] [-R +|-|^] [-t <x,y>] [-l] [-g] [-d] [-H] [-h|--help] [-g] [-a] [-W] [-L] [-V|--version] [--] [psfile1] [psfile2] [...]\n",
"Options:\n",
" -f, --force force overwriting existing files\n",
" -q, --quiet quiet operation (no output while processing files)\n",
" -N, --noinsert do not insert any postscript code\n",
" -O, --preserveorientation do not filter Orientation: header comment\n",
+ " -X, --BBonly print resulting bounding box(es) only, no other output\n",
" -n, --nofix do not try to fix postscript code\n",
" -P, --removepreview remove preview image (smaller file, but no preview)\n",
" -F, --fixps fix postscript code unconditionally\n",
@@ -186,7 +186,7 @@ $licensetxt= "\
" -B, --ignoreBB do not use existing bounding box as page size for rendering\n",
" -E, --ignoreEOF do not use %%EOF as hint for end of file\n",
" -g, --gsbbox use internal bbox device of ghostscript\n",
- " -H, --no-hires do not use a HiResBoundingBox\n",
+ " -H, --nohires do not use a HiResBoundingBox\n",
" -h, --help help information\n",
" -L, --license show licensing information\n",
" -V, --version show version information\n",
@@ -235,6 +235,7 @@ GetOptions('f|force' => \$forceoverwrite,
'C|clip' => \$clip,
'l|loose' => sub { $looseBB = '-l' },
'B|ignoreBB' => \$ignoreBB,
+ 'X|BBonly' => \$bboxonly,
'E|ignoreEOF'=> \$ignoreEOFDSC,
's|size=s' => \$opt_s,
't|translate=s' => \$opt_t,
@@ -421,7 +422,7 @@ while ($infname= (shift @filenames))
{
$BBarg= $1;
# accept even negative and fractional BBs
- if ( $BBarg =~ /(\-?\d+\.?\d*\s+){3,}\d+/ ) # ignore %% BoundingBox: (atend) comments
+ if ( $BBarg =~ /(\-?\d+\.?\d*\s+){3,}\-?\d+\.?\d*/ ) # ignore %% BoundingBox: (atend) comments
{
($eBBllx,$eBBlly,$eBBurx,$eBBury,$dummy)= split /\s/,$BBarg;
#print STDERR "Existing BB: $eBBllx,$eBBlly,$eBBurx,$eBBury\n";
@@ -637,6 +638,14 @@ while ($infname= (shift @filenames))
$boundingbox = "%%BoundingBox: $cBBllx $cBBlly $cBBurx $cBBury\n";
if (!$quiet) { print STDERR "ready. $boundingbox" };
+
+ if ($bboxonly)
+ {
+ print STDERR $boundingbox;
+ if (defined($hiresboundingbox) && !defined($nohires))
+ { print STDERR $hiresboundingbox; }
+ exit 0
+ };
$before_startps= 1;
$inserted_prolog= 0;