Menu

plpdftex manual

Dirk Krause
← Previous ↑ Home → Next

plpdftex — Output driver for the GNU Octave pgfplot package

Synopsis

plpdftex

Description

The octpgfpl package for GNU Octave creates 2D diagrams for use with LaTeX/pdfLaTeX. Diagrams are written as PDF+TeX or EPS+TeX file pairs or as PGF files.

PGF files are supported directly by the package, PDF+TeX and EPS+TeX file pairs are created by the plpdftex program.


Options

Option Purpose
‑‑check‑presence Write "1" to output and return exit status 0. This is used by the octpgfpl package to check for the presence of the program.
--help Show short help text.
--manual Show detailed help text.
--license Show license information.

Exit status

0 on success, all other status codes indicate an error.


Files

Input

Input is read from standard input.

The first line specifies a file name combination. It must end on either .pdftex to produce a PDF+TeX combination for inclusion in a LaTeX document or on .pdftexs to produce a PDF+TeX combination for standalone processing.
Use .epstex to produce an EPS+TeX combination for inclusion in a LaTeX document.

The second line contains two unsigned integer numbers, separated by spaces: Image width and height in PS/PDF points (known as bp in LaTeX).

The remaining lines describe the image, there are "t" lines
and "p" lines, i.e.

t   fs      12
t   font-setup  \usepackage[T1]{fontenc}
t   package     \usepackage[intlimit]{amsmath}
t   preamble    \DeclareMathOperator{\intd}{\text{d}}
t   text        10 20 base left black This is a test.
t   text-box    10 20 base left red This is another test.
p   gsave
p   grestore
p   lw      3
p   buttcap
p   miterjoin
p   nodash
p   stroke-color    blue!50!black
p   fill-color  red!80!white
p   prepare-stroke
p   prepare-fill
p   rectangle   5 5 200 80
p   circle      20 30 5
p   moveto      30 80
p   lineto      50 90
p   curveto     50 100 100 100 100 90
p   closepath
p   stroke
p   fill
p   clip

The "t fs" "t font-setup", "t package" and "t preamble" lines are only used when producing a .pdf/.tex file combination for standalone processing, otherwise they are ignored.

Command Contents and purpose
t fs number
Font size for the documentclass line. This line must be used before "t font-setup", "t package", "t preamble", "t text" or "p" lines. The line is optional, by default the documentclass is written without the font size specification.
t font‑setup text
Usepackage and other instructions for font setup. These lines are optional, a default font setup section is used if no "t font-setup" lines are found.
t package text
Usepackage instructions to load further packages. These lines are optional, a default configuration is used if no "t font-setup" lines are found.
t preamble text
Further setup instructions for the preamble, optional.
t text x:number y:number va:string ha:string color text
Text labels to show. The line contains x position, y position, vertical alignment (bottom, base, centered, or top), horizontal alignment (left, centered, or right), color and the text to show.
All color definitions must be LaTeX color strings like "blue!50!white".
t text-box x:number y:number va:string ha:string color text
lines contain text labels to show in a box. The line contains x position, y position, vertical alignment (bottom, base, centered, or top), horizontal alignment (left, centered, or right), color and the text to show.
p gsave Save the current graphics state.
p grestore Restore the graphics state.
p lw number
sets the line width for stroking, floating point number, unit is bp (PDF/PS point).
p buttcap Set line cap style to butted.
p miterjoin Set the line join style to miter.
p nodash Set up contiguous line style.
p stroke‑color color
Set the stroke color.
p fill‑color color
Set the fill color.
p prepare‑stroke Announce the purpose of the next graphics object(s): stroking. For EPS+TeX output plpdftex sets the current color to the stroking color.
p prepare‑fill Announce the purpose of the next graphics object(s): filling. For EPS+TeX output pldpdftex sets the current color to the non-stroking color.
p rectangle x‑left:number y‑bottom:number x‑right:number y‑top:number
Create a rectangular path, specify start x position, start y position, end x position and end y position.
p circle x‑center:number y‑center:number radius:number
Create a circular path, specify center x position, center y position and radius.
p moveto x:number y:number
Start a new path and move the current position to the specified x and y position.
p lineto x:number y:number
Add a line segment from the current position to the specified x and y position to the path.
p curveto x‑c1:number y-c1:number x‑c2:number y‑c2:number x:number y:number
Add a Bezier segment starting at the current position to the path. Specify x and y position of the first control point, x and y position of the second control point and x and y position of the final point.
p closepath Close the current path.
p stroke Stroke the current path.
p fill Fill the current path.
p clip Use the current path as clip path.

Output

The output file names are determined from the first input line.


Versions

The plpdftex program from DK tools 4.14.0 and above can be used with octpgfpl version 1.2.0 and above only.


Restrictions

No full graphics instruction set
The program is not a full text to PDF/TeX converter, only the graphics instructions needed by the pgfplot() function are supported.

Should not be run as root on input provided by users
As the names of the output files to write are configured via input, you should not run the program as root and not on input from untrusted sources.


Notes

This program uses DK libraries version 4.

The plpdftex program from DK tools 4.14.0 and above can be used with octpgfpl version 1.2.0 and above only.


← Previous ↑ Home → Next

Related

Wiki: plpdftex