Professional Documents
Culture Documents
format=[rgba|rgb|graya|gray]
antialias=[none|fast|good|best]
No spaces are allowed on the left, nor on the right, of the equals
sign inside a setting.
The assignment that would match the compiled-in default setup is:
outputformatoptions := "format=rgba antialias=fast";
however, "outputformatoptions" is initially the empty string.
Some notes on the (new) PNG output formats:
- The 'rgb' and 'gray' subformats have a white background. The
'rgba' and 'graya' subformats have a transparent background.
- Bitdepth is always 8.
- In all cases, the image is initially created in 8-bit RGB
mode. For 'gray' and 'graya', the RGB colors are reduced just
before the actual PNG file is written, using a standard rule:
g = 0.2126*r + 0.7152*g + 0.0722*b
- CMYK colors are always converted to RGB during generation of
the output image using:
r = 1 - (c+k>1 ? 1 : c+k);
g = 1 - (m+k>1 ? 1 : m+k);
b = 1 - (y+k>1 ? 1 : y+k);
- If you care about color conversions, you should be doing a
"within <pic>" loop inside "extra_endfig". The built-in
conversions are more of a fallback.
* A new string-valued internal "outputfilename", which is set by
"shipout" to the value of the just created file name. Until the
first shipout has occurred, it is the empty string.
* Fixed a number of bugs where Metapost loaded the default font map
file multiple times, resulting in lots of "fontmap entry for
`<fontname>' already exists, duplicates ignored" warnings.
* The "glyph <> of <>" operation could crash on fonts with empty
subpaths in the charstrings.
* Fixed a bug in the postscript encoding reader that caused a buffer
overflow (fatal error) for encoding files that do not end with a
newline.
* Sped up png creation a bit by using smarter libpng options.
* In the 'double' numbersystem, lots of precision was lost due to a bad
internal conversion of fractions to scaled values. This affected the
"rotated by", "directiontime", "sind" and "cosd" primitives, as well
as internal dependency calculations.
* In the 'double' numbersystem, an internal rounding error caused
"directiontime" to return bad results for requests near zero.
* There was a big scaling miscalculation while outputting glyphs in SVG
mode with "prologues:=3". The output labels were so big that they
fell completely outside of the generated image.
* A problem resulting in 'This can't happen (endinput)' caused by a
missing "end" at the end of the run was fixed.
----------------------------------------------------------------------
* There are two new primitives for use with picture item objects:
prescriptpart
postscriptpart
* The C API has been extended to allow path control point resolution
without going through the Metapost input language, see
manual/mplibapi.tex for details.
* The C API has been extended with a "math_mode" switch in the options
structure, and the memory size options as well as "ini_mode" have
been removed (the MPlib instance now always starts up in inimp mode)
* The code for picture shipout now uses "double" for all floating point
values. This can give small differences in the actual output files in
traditional mode due to the required scaled -> double conversion, but
was necessary to support the new numerical backend code.
* The Lua API internals have been updated to reflect the C API changes.
* All known crashes in earlier versions of Metapost have been fixed.
Known issues:
* The manual is not up-to-date yet on the metapost input language
changes.
* There are various memory leaks.
---------------------------------------------------------------------What is new in MetaPost version 1.750:
---------------------------------------------------------------------This is an alpha release for testing & debugging only!
* mpost now accepts --math=double as an argument. This switches the
internal arithmetic functions from using a scaled 32-bit data type
to 64-bit floating point.
* With --math=double, the input scanner has been changed to allow
a := 1.0E20
as valid input format for a numerical value
---------------------------------------------------------------------What is new in MetaPost version 1.504:
---------------------------------------------------------------------* Small build system tweaks from TeXLive 2012.
---------------------------------------------------------------------What is new in MetaPost version 1.503:
---------------------------------------------------------------------* String comparisons have been fixed, these were broken in previous
1.50x versions.
* verbatimtex ... etex processing had a horrible bug that is now
fixed.
* A fix has been applied for a bug that made redeclared variable
Bug fixes:
* There was a bug where sometimes the outer contour of a glyph that was
asked for via 'glyph X of' was missing from te output, depending on
the path drawing order inside the Type1 font.
* Handling of MPTEXPRE label prefix files was broken.
* Font subsetting for 8-bit characters in Type1 fonts was broken.
* The use of "%{outputtemplate}" inside "outputtemplate" now generates
an error.
* The first letter of the input file name was swallowed in the log file.
* There is some rudimentary support for infinite recursion trapping now,
to help prevent segfaults&crashes due to C call stack exhaustion.
* An unlucky change in glibc made compilation fail on new GNU/Linux
systems due to multiple incompatible definitions of 'getline()'.
* There was a bug in the handling of quoted external commands for
MPXCOMMAND | MPXMAINCMD | TEX.
* The main input file's opening brace and filename were not shown in
the log file output.
* Non-colored picture objects (clipping and setbounds paths) are now
ignored when the color part is asked from within "within", for
backward compatibility reasons.
* The trip and trap files are now part of the distribution and the
mptrap files have been updated.
* The standard web2c argv[0] mem file mimicri was broken: 1.200 was
always looking for "mpost.mem" even when called under another name.
* The manual pages for "mpost" and "dvitomp" have been updated, and the
old "mp" manual page has been removed.
* The first letter of any missing input file name was not shown in the
terminal error message.
* Output files are now once again written in the current directory even
if an explicit source directory is given. This includes the creation
of mpx files, but some trickery is used so that up-to-date existing
mpx files from the source directory take precedence.
---------------------------------------------------------------------What is new in MetaPost version 1.200:
---------------------------------------------------------------------New features:
* It is now possible to get the actual path drawing routines from a
font glyph. The syntax is :
q := glyph 113 of "cmr10";
In the lua bindings, there is the new figure method "svg()", that
gives back the SVG output string. This is subtly different from the
direct file output: the lua method does not prepend an XML declaration
(this makes embedded use of the generated XML easier).
* The new internal string variable "outputtemplate" replaces
"filenametemplate". The big difference is that "outputtemplate"
is a true 'internal', so that you need a proper assignment.
On the positive side, this means that you can use its current
value with e.g. show and message.
* "outputtemplate" has a new type of replacement: internal variable
names. Instead of the short "%j.%c", you could write:
outputtemplate := "%{jobname}.%{charcode}" ;
this type of replacement works for all internal variables,
including those defined via "newinternal".
* There are two new numeric internals: "hour" and "minute".
(these are a consequence of the outputtemplate change)
* The primitive "jobname" is now a string internal instead of a
special case. This implies you can assign to "jobname", but
such an assignment will only affect the picture output. The
job name for the purposes of log and mem file names is fixed
permanently at startup time and cannot be altered.
* "mpost" can now pretend to be dvitomp. Either copy the executable
to the name "dvitomp", or pass the switch --dvitomp on the command
line.
* The command line option --halt-on-error has been reinstated.
* There is a new -s<internal>=<value> command line switch that can
be used to setup run time values. Such assignment will be executed
after initialization is complete (i.e. after mem file loading) but
before any other code is executed.
This works for all internal variables, including one defined
that may have been defined in the mem file via "newinternal".
* "tracingstats:=1;" now prints the highest and total input levels.
Bug fixes:
* The turningnumber calculation had a rounding error in the internal
arithmetic that could cause incorrect numbers to be calculated
(typically resulting in a 'turning numbers do not match' error).
* The parsing of command line arguments with options was broken.
* Reading of files with 8-bit names has been fixed.
* A patch by Melissa O'Neill fixes inclusion of some special Type1
formats.
* There was a bug where, when "prologues:=3;", the lists of the
DocumentResources/DocumentSuppliedResources could appear in the eps
output partially uncommented.
no longer distributed.
* There is a new manual, mplibapi.pdf, that describes the internal
interface to MPlib.
* The file 'mpintro' is no longer distributed because it is
obsolete (it has been that way for some time).
* The distribution now includes Dan Luecking's mpsproof.tex.
CHANGES compared to the previous beta, 1.091:
* The DVI -> mpx converter was bugged when virtual fonts were used.
* MP could crash when a string was added to the string pool that
was too large to fit.
* The string pool compaction routine was called much too often, thus
preventing unnecessary slowdowns.
* Various problems with uninitialized option settings and missing mem
files or pfb files have been fixed.
* There was a line buffer overrun possible in the file reader.
* mpost now honours --recorder and --file-line-error.
* MP now accepts file names with paths (separator is /) and with
embedded spaces (using " for quoting)
* There could be empty lines in the PS output.
* Full 8-bit fonts (i.e. font using character slot 255) could create
an eternal loop.
* The handling of equations with addition or substractions between two
unknowns in the right hand side was wrong.
* The first line of the PS font encoding output could be broken
inbetween a glyph name and its preceding slash.
* Font inclusion in the PS backend would fail for all fonts that had
glyph ids using the 8th bit.
---------------------------------------------------------------------What is new in MetaPost beta version 1.091:
---------------------------------------------------------------------* Dash lists were interfaced incorrectly by the lua bindings.
* The Type 1 Font inclusion in the previous version produced invalid
subsets.
* The configure script now also checks for sys/time.h
* The error message you get for invalid mem files now mentions the
name of the file as well as the nature of the problem.
* This is the first development release of the new cycle, and contains
all of the functionality of Metapost 1.005. The mpost version is now
1.060, and the special version number for the cweb version has been
removed from the banner.
---------------------------------------------------------------------What is new in the alpha release of MPlib (0.20.0):
---------------------------------------------------------------------* Two bugs in MP 1.002 were fixed by Giuseppe Bilotta, both fixes
are about polygonals pens and will be included in the upcoming
MP 1.003 release also.
* It is now possible to ask for the envelope of a path drawn as
traced by a (non-elliptical) pen:
path p,q;
p = fullcircle scaled 30;
q = envelope pensquare of p;
* There is a lua interface now, and it is already used by luatex.
To play with this, currently the best solution is to fetch the
0.25.0 beta of luatex: http://foundry.supelec.fr/projects/luatex
This embeds MPlib 0.25.0 as well as its documentation.
* Many bugs were fixed.
---------------------------------------------------------------------What is new in the alpha release of MPlib (0.10.0):
---------------------------------------------------------------------* The source is converted to cweb, and split into a library part
(mpdir/lib/*.w) and a frontend executable (mpdir/mpost.w).
* The front end executable is named "newmpost", this takes
care of configuring the MPlib library via C code, and uses
kpathsea for file searching. There is no change file involved,
and the web2c runtime library is not used.
* Some of the internal arrays now grow dynamically when needed:
*
*
*
*
*
*
*
*
the
the
the
the
the
the
the
the
input buffer
string pool and number of strings
font memory and number of fonts
number of "readfrom" and "write" files
path segment size
input nesting stack
number of new internals
TFM writing arrays (but these are limited by TFM format)
Still not doing that (so these can only be changed in --ini mode):
*
*
*
*
the
the
the
the
main memory
hash size
number of simultaneous macro parameters
level of "input" file nesting
-[no-]file-line-error
-halt-on-error
-output-directory=
-[no-]parse-first-line
-recorder
-translate-file=
-8bit
-T
The other web2c command-line options should work as normal.
* the mpware tools are not in this distribution, their functionality
will eventually be assimilated into the frontend application.
* the build process depends on a local "ctangle" command being in the
path, for now. The confiration and building system is not yet complete.
* API documentation is still missing, but the MetaPost input language
has not changed.
---------------------------------------------------------------------What is new in version 1.005:
---------------------------------------------------------------------* In MetaPost 1.004, mpost --version still incorrectly reported 1.003
* C Compilation of MetaPost 1.004 was broken on MacOS X 10.5
* The sources package did not contain mpboxes.pdf
* Some last-minute fixes to the manual
---------------------------------------------------------------------What is new in version 1.004:
---------------------------------------------------------------------* The picture color component commands misbehaved in 1.003:
the current (default) colormodel was not taken into consideration,
so all colors had to be explicit for "redpart" etc. to work.
(this bug is the one broke the graph.mp package)
In 1.004 for "defaulted" colors, the suitable value in the current
(default) colormodel is returned without any errors. This change
also reverts to silently defaulting a 'black' color when asking
for the redpart etc. of an object that cannot be colored at all.
* The picture color component commands misbehaved in 1.003 in
a different manner also: the defaults for uninitialized CMYK
color picture parts were still assuming 'black' was defined as
(1,1,1,1) instead of as (0,0,0,1).
* The macro Gwithpc_ in the graph.mp package did not work properly
with non-rgb colormodel objects.
* plain.mp has a new macro, 'colorpart', that returns the color
parts of a graphical object within a picture in a form suitable
for feeding it back to 'withcolor'.
* Akira Kakuto and Hartmut Henkel found some small issues in mpto
regarding trailing and leading whitespace.
* A fix for the 'Helvetica' entries in trfonts.map was provided by
Werner Lemberg, and Michail Vidiassov supplied two extra font
entries for troff.map (Symbol and ZapfDingbats). Karl Berry
provided the new file troff-updmap.map, to be used by the updmap
tool in texlive.
* Mpost now supports web2c's --output-directory option.
* Any warnings about missing fonts and characters are now always
written to the terminal as well as to the log.
* Now that makempx is a C program, it needed a different install line
in build.sh. Also, Olaf Mersmann contributed a patch to recognize
'gmake' in build.sh
* Luigi Scarso found some typing errors in the web source that prevented
clean weaving of the source.
* Stephan Hennig fixed a number of problems in the manual (mpman.tex)
and the introduction paper (mpintro.tex). He also wrote new sections on
how to preview metapost graphics and on how to use metapost graphics
inside other documents. On top of that, the manual is now hypertext-aware,
and fixes for a whole series of small problems have been applied.
---------------------------------------------------------------------What is new in version 1.000:
---------------------------------------------------------------------* The use of DSC (document structuring) comments has been
been cleaned up, thanks to comments by Michail Vidiassov.
* By setting prologues to 2 or 3, you can ask MetaPost to
reencode and include the used labels fonts in the output,
thus creating proper Encapsulated PostScript files even
if labels are present.
* Support for greyscale and cmykcolor models is added.
* The new drawing options "withprescript" and withpostscript"
allow the user to attach PostSCript special text to a specific
drawing object.
* Setting the new internal "mpprocset" to 1 will make MetaPost
create a somewhat extended preamble that defines shortcuts
for the postscript commands (e..g "l" instead of "lineto").
For big images, this can help shrink the output a bit.
* The pool file is now integrated in the executable, so there
is not separate 'mp.pool' anymore, except at build time.
* Groff support is redone, and dmp now uses kpathsea searching.
Groff related changes are thanks to the efforts of Werner
Lemberg and Michail Vidiassov
* makempx is now a compiled executable on all systems,
thank you Akira Kakuto
as well as %%EndProlog
7. The comments in the Web source have been changed to point out
that on modern machines, acquiring the random seed has actually
become a system-dependant operation (a granularity of whole seconds
is not small enough on new machines).
8. The 'newer' command now accepts more than 2 arguments, testing
each of the files in turn.
---------------------------------------------------------------------Bugfixes in version 0.9:
---------------------------------------------------------------------1. Documentation improvements: all known errata and typos have been
removed, better explanations of e.g. dash patterns and dotlabel have
been provided, and a number of omissions has been rectified.
2. The BoundingBox was not computed correctly when a filldraw command
with a noticeable pen size was used at the edge of the picture.
3. Paths starting with degenerate constructions like (0,0)--(0,0)--(0,0)
could overflow memory.
4. The PostScript output could accidentally contain 8-bit characters
within PostScript strings in previous versions because a test was
shared between terminal printing and PostScript printing.
5. A bug has been found in the assignment of serial numbers to independant
variables in metafont 2.71828. This bug affected MP as well, and the
same patch has been applied.
6. The turningnumber was sometimes wrong in unexpected ways. The new
implementation is still sometimes wrong (when there are strange path
segments involved), but in a much more predictable way: the new code
always draws straight lines between the actual points, and calculates
the turningnumber based on that path instead of the actual path. The
effect is that cusps and loops within segments are now completely
ignored. A more thorough fix of turningnumber is planned for the
next release.
7. There was an 'off by one' error in dvitomp wrt. the interpretation
of virtual fonts.
8. mpto uses a new TeX macro for the generation of labels, making it
more robust wrt. strange user code within the actual label text.
9. A missing colon in boxes.mp has been added
10. A missing save in mfplain.mp has been added
11. The generisize in boxes.mp has been fixed so that it now accepts [[ as
a valid variable name
---------------------------------------------------------------------Version 0.641:
---------------------------------------------------------------------The only change was to fix the code for transforming a picture that
contains a filldraw. Version 0.64 introduced a bug that caused an
inappropriate memory reference in that case.
---------------------------------------------------------------------What is new in Version 0.64:
---------------------------------------------------------------------1. A new primitive command closefrom filename closes a readfrom file
so that subsequent calls to readfrom with that file name will go back
to the beginning of the file.
2. The ^^ notation for unprintable characters is now used only when printing
on the terminal or the log file. Internal computations and the write
command are all 8-bit clean. (This is partly due to material in mp.ch
that changes the initialization of the xchr array. Without these
system-dependent changes, the write command would map all non-ascii
characters to spaces.)
Changes to the MetaPost language between Version 0.50 and Version 0.60
---------------------------------------------------------------------1. New operator `readfrom <filename>' and new command
`write <string expression> to <filename>' do file I/O. Plain defines
a special string EOF that readfrom returns to indicate end-of-file
and write..to understands as well.
2. New iteration type `for p within <picture expression>: <loop text> endfor'
iterates through the interior components of the picture. An `interior
component' is a single pen stroke, filled outline, or piece of typeset
text. A part of the picture enclosed in a clipping or setbounds path
also counts as an interior component. If the whole picture is enclosed
in such a path, the for..within iteration looks inside. Note that a
picture generated by btex..etex is enclosed in a setbounds path.
3. The length operator now applies to pictures. It returns the number of
interior components.
4. New boolean operators stroked, filled, textual, clipped, bounded test
the first component of a picture. A picture enclosed in a clipping or
setbounds path counts as a single component.
5. Part extraction operators now work for pictures. Standard operators
redpart, greenpart, bluepart apply to the color of the first component
and xpart, ypart, xxpart, xypart, yxpart, yypart extract parts of the
tranformation that has been applied to a text component. If `textual p'
is false, the transform components are all zero; if `clipped p' or
`bounded p' is true, the color parts are all zero. Additional operators
fontpart, textpart, pathpart, penpart, dashpart extract other information
from the first component of a picture. They all return null values when
the first component has the wrong type: fontpart and textpart return
null strings; pathpart returns the path (0,0); penpart returns nullpen;
and dashpart returns nullpicture.
6. The construction `dashed nullpicture' is now a no-op. It used to be
an error.
7. The clip and setbounds statements used to ignore operations on empty
pictures. Now they do not.
8. Structuring comments in the PostScript output are now based on EPSF-3.0
as described in the 2nd Edition of the PostScript Reference Manual.
When prologues is 0, some structuring comments are included but the
output is not flagged a `conforming document'. Previous versions of
MetaPost behaved similarly but used slightly different structuring
comments.
9. When warningcheck is 0, numeric tokens and results from the hex and
oct operators can be as large as 32767.99998. The old limit of about
4096 applies only when warningcheck is positive.
10. Various optimizations should make the output a little more compact.
11. For PostScript engines that obey the scan-conversion rules documented
in the 2nd edition PostScript Language Reference Manual, hrules and
vrules in btex..etex blocks should now come out to exactly the right
number of pixels. The change affects all pen strokes drawn in MetaPost
It is implemented via PostScripts dtransform and idtransform operators.
12. A bug involving setbounds and MetaPost's corner operators has been fixed.
13. Degenerate elliptical pens no longer cause PostScript to divide by zero.
14. Fixed a very obscure bug involving readstring and end-of-file.
15. String compaction statistics are now printed correctly when the job
terminates with tracingstats positive.
---------------------------------------------------------------------Changes to the source files between Version 0.50 and Version 0.60
----------------------------------------------------------------------
CHANGES to ./README.MP
The installation instructions should now be clearer. They also explain
how to cope with verious versions of WEB2C.
CHANGES to ./site.h
I removed unused entries and clarified instructions in commentary material.
Confusing comments about possibly merging it with the WEB2C version of site.h
were removed--I think such merging is a bad idea.
CHANGES TO ./Makefile, mp/Makefile, mpware/Makefile:
Improved default settings, simplified the `install' recipe,
fixed a few missing depencies, portability problems, etc.
RENAMED FILES
mp/mp.defines, mpware/mpware.defines, mpware/dvitompext.c
TO mp/mp.def,
mpware/mpware.def,
mpware/dvimpext.c
(The names also changed in the Makefiles and convert scripts)
CHANGES TO mp/mp.web, mp/mp.ch, mp/mp.def, mp/mpext.c:
Lots of new features were added as noted above. The only new systemdependencies are for `readfrom' and `write...to'.
The change file now increases max_read_files; it doesn't bother with
max_write_files, but perhaps it should. There is a new change entitled
"Path selector for..readfrom file". From the web2C sources I borrowed
a change "`logname' is declared in <unistd.h> in some systems". I also
added a PASCAL-like eof() routine to mpext, removed a change entitled
"avoid using eof() in read_psname_table" and added a new change
"[48.1199] `eof'...[in read_mem_file]".
Reorganization of math routines in the mp directory:
I moved the floating-point math routines from mpext.c to mpath.c. A
C-language version of the standard math routines was moved from mpmath.c
to a new file pmath.c for use in mathtest only. This required chages to
mathtest.c and time.c (also used only for mathtest). The point of all
this is that there is now just one copy of the floating-point math routines
and it is used for mathtest and (optionally) for mp itself.
Routines in doc and mp/trapdir:
The output was updated to Version 0.60. Another test file mptrap.mp
tests new features. There have also been minor updates to the manual,
although the new features for Version 0.60 are not included yet.
CHANGES to macros in mplib:
A minor change to boxes.mp should make it more robust. Changed default
setting of tracinglostchars in mfplain.mp and plain.mp. Added a string
constant EOF to plain.mp for use with readfrom and write..to.
Changed mproof.tex to make it more portable as suggested by Knuth.
CHANGES to mpware/dvitomp.web, mpware/dvitomp.ch:
The web file was changed to output rules as horizontal or vertical
penstrokes with butt endcaps. This also affected dvitomp.ch. Also in
dvitomp.ch, put terminal output on stdout instead of stderr and require
the output file to be given on the command line.
CHANGES to mpware/makempx, mpware/troffmpx:
Added comments explaining what path names need fixing. Portability improvements
and dvitomp's output change affect makempx only.
CHANGES to mpware/mptotex.c mpware/mptotr.c mpware/testex.err mpware/testex.mp:
Ignore an initial newline in the TeX (or troff) material to avoid generating
a blank line in the output file. The test file now covers this case.
CHANGE to mpware/newer.c
Minor changes to make it compile in strict ANSI/POSIX environments.