sketch-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WARMread (for LaTeX) & sketch


From: Romain Bossart
Subject: WARMread (for LaTeX) & sketch
Date: Thu, 5 Dec 2002 13:47:45 +0200

        Hello Sketch dev,

        I'd like an add-on to be developped for Sketch.

        Short story
        -----------
        When creating a figure with Sketch, would it be possible to
create
        a file which gives coordinates of some points (here 3) and
associated
        arbitrary labels ? Those points should have their own layer,
        and be called 'Marked Objects'. Normally, they should not appear
in the
        exported figures, but only in this file.

        %%Creator: MyName, Sketch 0.6.14
        %%Title: Coor.sk
        %%Date: 12/05/02
        %%BoundingBox: 0 0 216 180
        %%HiResBoundingBox: 0.000000 0.000000 215.284668 179.639648
(don't mind this line)
        %%Coordinates: LL
        %%StartMarkedPoints
        %%MarkedPoint:(4,18)   : point(0,0) : label_for_x %comment for
'x'
        %%MarkedPoint:(211,66) : point(0,0) : label_for_y %comment for
'y'
        %%MarkedPoint:(65,179) : point(0,0) : label_for_z %comment for
'z'
        %%EndMarkedPoints

        This file could be used by a set of (La)TeX macros for labelling
figures.
        For those of you who are interested in knowing more, this is a
longer story.

        Longer story
        ------------
        Some people at Caltech have developped a LaTeX set of macros
(called WARMreader)
        to powerfully replace the psfrag package. If you don't know what
the psfrag
        package is, this is for you. 

        + When creating (La)TeX documents with figures, you may want the
figures 
          to have nicely LaTeX-typeset labels in it, instead of the
arial/times fonts.
          psfrag allows you to replace some text-labels *that appear in
the figure*
          by your own (La)TeX replacements. The internal mechanism is
actually based on the 
          postscript language : psfrag intercepts the postscript
commands 'show' for 
          the text-labels you want to replace, and it replaces them by
your nice (La)TeX
          typeset things. The drawbacks are (i) that it only works for
eps figures, 
          and (ii) that the figures *must* be psfrag-oriented.

        WARMreader is a new set of macros, designed to do much better
than psfrag. 
        The developpers' idea is to avoid any modification of the figure
to be labelled.
        This figure does not need to contain any visible text label and
can be any format
        that your (La)TeX distribution can handle       (eps, pdf, jpg,
etc..).

        For each figure, WARMreader needs a separate text file (called
'.bb'-file)
        which includes the coordinates of your desired (La)TeX
replacements.
        The name 'bb' stands for 'bounding box'. Using this in (La)TeX
is just as
        easy as using psfrag. You just need to put some psfrag-like
replacement
        lines in your (La)TeX code : something like
'\xyMarkedPos{x}+!C{$\vec{e}_x$}'
        presuming you have associated 'x' to some coordinates in your
'.bb'-file 
        as shown in the introduction. 

        What's interesting is that WARMreader places the labels within
the figure's
        bounding box (relative coordinates of the figure) so it is
scalable. 
        It can also allow some fine tunings : small placement
adjustements, and much more.

        What's also interesting is that you can generate as many labels
as you want,
        using, for instance, calculus results to place them on your
figure.
        You just need to tell LaTeX to print what you want at those
locations
        (check
http://www-texdev.mpce.mq.edu.au/WARM/WARMhome/node6.html).

        You can have more information on WARMreader at 
        http://www-texdev.mpce.mq.edu.au/WARM/WARMhome/ or ask me for
examples.


        Well, why do I put this on the sketch devel list ?
        --------------------------------------------------
        For the moment, the creation of the bb-file under Unix is a real
pain, because
        you have to     create it by hand : i.e. writing the exact
coordinates of where you
        want (La)TeX to print your replacements. You can do this by
copying the 
        coordinates given by ghostview or Sketch for instance. A guy
from TUGIndia
        has a web page explaining that :
        http://www.cds.caltech.edu/WARM/WARMhome/help_warmread_unix.html
        
        For Windows/Mac users, the WARMreader developpers at Caltech
have made
        Adobe create a plugin for Illustrator to do this job
automatically.
        My bb-file was actually created with it. But I'm wondering how
to have
        Sketch do such a job, because it could be interesting for lots
of people
        in the Unix area. This way of labelling images is really
powerful.
        By the way, the WARMreader is compatible with LaTeX, pdfLaTeX,
and TeX,
        because it relies on the Xy-PiC package.

        Whatever your creation method is, an ordinary bb-file should
look like
        the one shown in the introduction.


        For the development team...
        ---------------------------
        The said Illustrator (9 & 10) plugin actually defines a layer
for the
        coordinates of your replacements. Those locations are called
Marked Objects
        in Illustrator. They may be recorded in the bb-file as shown
above
        (more information in this file : 
        
http://www-texdev.mpce.mq.edu.au/WARM/PLUGIN/TUG2001/TUGadobe.pdf)



        Is anyone interested in implementing that add-on for Sketch ?
        I can help a bit, but not too much since I'm not a Sketch/python
expert.

        Sincerely,
        Romain Bossart






reply via email to

[Prev in Thread] Current Thread [Next in Thread]