Skip to Content.
Sympa Menu

texmacs-users - Re: HELP: figures with math writing

Subject: mailing-list for TeXmacs Users

List archive

Re: HELP: figures with math writing


Chronological Thread 
  • From: Javier Arantegui <address@hidden>
  • To: address@hidden
  • Subject: Re: HELP: figures with math writing
  • Date: Mon, 26 May 2003 10:38:26 +0200
  • Organization: Univ. de Lleida

On 26 May 2003 10:27:38 +0200
Alessio Dessi <address@hidden> wrote:

> I'm writing my thesis and i need to put some math writing inside the
> pictures made with xfig, I know that this is possible in latex and i
> suppose it is possible also with texmacs (a least i hope so), but I
> can't figure out how to do that


In Xfig you should put all your formulas between dollar signs. Then, follow
these instructions:

-----

From: "Karl M. Hegbloom" <address@hidden>
Subject: Re: How to insert a Latex formula in a xfig picture?
Date: 24 Mar 2003 07:30:04 -0800

I've been using it to do my math homework. I create a graph with
gnuplot, and «set terminal fig», «set output "graph.fig"». I label all
of the lines with labels surrounded by dollar signs, then open the fig
file with xfig, and use the "edit" tool to set the "special flag" on
them. (I find it annoying that gnuplot doesn't just do that for me.)

The trick is to 1) use dollar signs to get LaTeX math mode, 2) set the
"special flag".

Then, I just run "fig2ps graph.fig graph.eps", and include the .eps in
my Texmacs document.

-----

> just a question ... is available some where the description of the
> parameter of the texmacs tag? i mean for instance the postscript figure
> have severl space where i can write after enter in edit mode in the
> figure, i see that the first and the second place controlthe size of the
> picture ... but what about the others place ?

You can find the answer here:

-----

From: David Allouche <address@hidden>
Date: Tue, 13 May 2003 16:03:26 +0200

To resize an image, you have to edit the parameters of the image node.

First, place the caret just after the image. The left foot of the
editor window should read "postscript image".

Then press backspace. That will _deactivate_ the image allowing you to
access its internal values.

The parameters of a POSTSCRIPT node (i.e. an image are)

1. file name, if the image is linked, or image raw data if
the image is included;

2. width;

3. height

4. left cropping;

5. bottom cropping;

6. width copping;

7. height cropping


File name or raw image data.
----------------------------

Generally, you will not want to change the file name. But there is an
important case where that can be useful: if you link an image inside
an unnamed document (that is document you do not have already saved),
an absolute file name will be used. So if you later rename or move the
linked image file, the image will no longer be displayed by TeXmacs.

In this scenario, you may want to edit the image file name to use a
relative file name instead. Such file names are intepreted relative to
the directory containing the document. Relative file names are used
automatically when linking an image from a named document.

When an image is included, you will not want to edit the raw data
(unless you can read and write binary data or PostScript code in the
text).


Width and height
----------------

The width and height of an image can be specified using any length
unit or a special "zoom factor" syntax. If either one is ommited (left
empty), the other dimension is inferred by preserving the aspect ratio
of the image. If none is specified, TeXmacs will try to guess the
intended size of the image from the EPS headers (and will generally
get it wrong).

For more informatio about lengh units see chapter [?].

You can find some information on the wiki too:

http://www.alqua.com/tmresources/how%20to%20use%20length%20units
http://www.alqua.com/tmresources/length%20units

One especially useful length unit here, at least when dealing with
scalable graphics, is the "par" unit. Setting the image width to
".7par" will make your image occupy 70% of the paragraph width.

The "zoom factor" syntax allows to specify a rational multiplicator to
the EPS specified size of the image. It is best described by examples:

*3 -- multiply <dimension> by 3;

/2 -- divide <dimension> by 2;

*3/2 -- multiply dimension by 1.5;

*1.5 -- same as above.


Cropping
--------

In some situations, you may want texmacs to perform some cropping over
an image. For example, that may be necessary if you want to remove
some borders around an PostScript file you cannot easily edit.

In the following picture, the box in dashed lines represent the
complete image, and the smaller box in filled lines represent the
displayed cropped image.

+ - - - - - - - - - - - - - - - - - -
left cropping |
|-------------------->
. |
| width cropping .
-----------------------------> |
| . .
. . |
| ^.. +--------+
| | | |
| ^................ +--------+
| | |
| | bottom | height
| cropping | cropping |
| | |
- - - - - - - - - - - - - - - - - - +

The cropping values must be absolute length units. They are applied on
the image before scaling, so changing the displayed width or height of
the image will not affect cropping.


Examples
--------

<postscript|/usr/share/pixmaps/texmacs.xpm||||||>

Should display the texmacs icon at intrinsic size if texmacs were
correctly installed.

<postscript|chart.eps||||||>

Display the chart.eps file located in the same directory as the
document.

<postscript|chart.eps|.7par|||||>

Scale it to take 70% of the paragraph width.

<poscript|chart.eps||.5pag||||>

Scale to take 50% of the page height.

<postscript|chart.eps|*4|||||>
<postscript|chart.eps||*4||||>
<postscript|chart.eps|*16/4|||||>

Magnify by a factor 4.

<postscript|chart.eps|/2|||||>
<postscript|chart.eps|*.5|||||>
<postscript|chart.eps||/2||||>
<postscript|chart.eps|*2/4|||||>

Shrink by a factor 2.

<postscipt|archimedes.eps|*22/7||2cm|2cm|3cm|3cm>

Crop out a square image of 1cm on the side locate 2cm from the
lower left border and magnify it by approximately pi.

-----



--
Javier Arántegui | Tel. +34973702595
Dept. Tecnologia de Alimentos | Fax +34973702596
Universitat de Lleida | http://www.tecal.udl.es



Archive powered by MHonArc 2.6.19.

Top of Page