Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse Search

Direc­tory tex-archive/graphics/tpic2pdftex

Converting tpic \special's into \pdfliteral's by awk
====================================================

The experimental awk-script tpic2pdftex builds one bridge between the
"pic" graphics language and pdfTeX.

What tpic2pdftex does:

We start from one or more graphics described by the venerable pic language
(see e. g., file example.pic), embedded inline within pdfTeX or pdfLaTeX
code, and limited by classical .PS and .PE markers as known from groff.
The pic graphics might be annotated by TeX or LaTeX text.  This pic/TeX
language-mix file is piped through the (groff-)pic preprocessor and the
tpic2pdftex script.  The result is a TeX file with inline \pdfliteral{}
sections, for further processing by pdftex or pdflatex.


Usage
-----

  $ export LANG="C"
  $ pic -t somefile.pic | tpic2pdftex > somefile.tex

Process somefile.tex by pdftex or pdflatex.


Files
-----

tpic2pdftex
  The executable awk-script for converting tpic specials into pdfliterals
  for further processing by pdftex.  For usage see head of this file.

tpic2pdftex.1
  The man-page for tpic2pdftex.

example.pic
  A small pic sample file (plain-TeX), as input.

example.pdf
  The resulting example PDF file (the dotted and dashed ellipses are
  part of gpic from version 1.19.1 on).

beamerexample.pic
  Another small pic sample file (pdfLaTeX), which shows that images
  created by pic can be incrementally built up in the beamer class.

beamerexample.pdf
  The resulting PDF file from beamerexample.pic.

Makefile
  The Makefile used to produce file example.pdf and beamerexample.pdf
  from the input files.

README
  This file.


Portability
-----------

This awk-script should be useable on all systems on which a working awk
program (e. g., awk, gawk, mawk) is installed.

The script has been tested with GNU pic (groff), versions 1.18.1 and
1.19.3, and pdftex, versions 1.40.9 and 1.50.0 on a debian lenny (5.0)
x86_64 PC.


Remarks
-------

1. If more than a single .pic file provide the source for the .tex file,
there are two options: Either separately run all .pic files through the
pic -t | tpic2pdftex pipe and combine them by TeX's \input statements
as usual.  Or make one big .pic file by using the soelim program from
groff (with option -t), and then run the resulting .pic file through pic,
tpic2pdftex, and TeX.  File embedding by soelim is done by the request:

  .so somefile.pic

The process call then could look like e. g.:

  $ soelim -t somefile.pic | pic -t | tpic2pdftex > somefile.tex

2. Depending on the awk version, "locale" settings might have influence
on the separator in floating point numbers. PDF requires decimal _dots_
(e. g., 3.14 rather than 3,14) which is checked by tpic2pdftex at the
begin of the run. If you get an ERROR message, set LANG="C", so that
decimal dots are used as float separators.


Literature
----------

Brian W. Kernighan: PIC -- A Graphics Language for Typesetting, User
Manual, Revised, May, 1991. File cstr116.ps.

Eric S. Raymond: Making Pictures With GNU PIC. File gpic.raymond.ps.

Both files are available online from various places.


Comments welcome. Have fun!

Hartmut

$Id: README,v 1.11 2010/01/16 12:38:21 hahe Exp hahe $

======================================================================


CTAN SOURCE TREE INFORMATION


This CTAN source tree has been automatically extracted from the TeXLive
Subversion repository at svn://tug.org/texlive/trunk/Build/source/utils/.

It is not possible to use the supplied configure script.
In fact, if you call it; you will be told as such.

This source can only be compiled in a texk build environment.
You will need to download the whole environment, please refer to
http://www.tug.org/texlive/svn/.

It all boils down to a Subversion checkout of
svn://tug.org/texlive/trunk/Build/source
This will be the source tree that you can use for compilation. The
CTAN directory is there for archival and informational purpose.

For your convenience, the original configure script from the source
tree is available in this directory as configure.texk.

For the CTAN team,

    Joachim Schrod <jschrod@acm.org>

Direc­to­ries

Name Notes
ac

Files

Name Size Date Notes
ChangeLog 1492 2014-06-18 02:12
Makefile.am 989 2014-06-18 02:12
Makefile.in 34995 2014-06-18 02:12
README 4100 2010-01-17 12:59
aclocal.m4 43699 2013-12-25 04:37
beamerexample.exp 11087 2009-05-07 11:39
beamerexample.pic 2359 2007-01-14 03:10
configure 705 2011-06-15 09:19
configure.ac 602 2013-10-01 01:09
configure.texk 148387 2013-10-01 01:09
example.exp 24090 2009-05-07 11:39
example.pic 3951 2007-01-14 03:10
tpic2pdftex 12627 2013-03-28 12:56
tpic2pdftex.1 1775 2010-01-17 12:59
tpic2pdftex.test 363 2013-03-28 12:54

Down­load the con­tents of this pack­age in one zip archive (83.9k).

tpic2pdf­tex – Use tpic com­mands in PDFTeX

The AWK script con­verts pic lan­guage, em­bed­ded in­line (de­lim­ited by .PS and .PE mark­ers), to \pdflit­eral com­mands.

Pack­age De­tailstpic2pdf­tex
Ver­sion1.97
Li­censeGNU Gen­eral Public Li­cense
Copy­right2002-2010 Hart­mut Henkel
Main­tainerHart­mut Henkel
Con­tained inTeXlive as tpic2pdf­tex
Topics pre­pare graph­ics for use with *TeX
Guest Book Sitemap Contact