README file for doc/info/figures

View: New views
2 Messages — Rating Filter:   Alert me  

README file for doc/info/figures

by Robert Dodier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I wonder how to generate a figure for inclusion in the reference manual.
Maybe someone who knows how to do that can write a README
for doc/info/figures/. I can sort of puzzle it out from inspecting the
existing files, but I'm guessing there will be details that I would miss
by doing that. So I'm hoping someone can fill the gap here.

Thanks for your help & all the best,
Robert
_______________________________________________
Maxima mailing list
Maxima@...
http://www.math.utexas.edu/mailman/listinfo/maxima

Re: README file for doc/info/figures

by Jaime E. Villate-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2006-11-15 at 22:53 -0700, Robert Dodier wrote:
> I wonder how to generate a figure for inclusion in the reference manual.
> Maybe someone who knows how to do that can write a README
> for doc/info/figures/.

Hi Robert,
sorry for the late reply. I created all the figures currently
in that directory. For each figure to be included in the manual
you need to create two versions: PDF and GIF. For example,
figure_name.pdf and figure_name.gif

To add that image to the manual, you use, in the info file:

@ifnotinfo
@image{figures/figure_name,8cm}
@end ifnotinfo

in the translations that should be
@ifnotinfo
@image{../figures/figure_name,8cm}
@end ifnotinfo

The PDF manual will use the PDF file and the HTML manual will
use the GIF file.

To create the PDF files I created a PostScript image file from
Maxima, and then made a few changes to make the Gnuplot images
more readable.
I used the Python script that I send you in an attachment, in the
following way:
  fixgnuplot.py old_file.ps > new_file.ps
but different graphs needed different manual adjustments. I put
the modified PostScript files in the repository so you can see
the changes using diff with the file created by Maxima/Gnuplot.

To transform the PostScript files into PDF I used ps2pdf, and
to obtain GIF from PS I used convert, from Imagemagik.

I hope this answers your question. If you think it is worth publishing
this information somewhere, let me know.

Regards,
Jaime


[fixgnuplot.py]

#! /usr/bin/env python

import sys
filename=sys.argv[1]

import sys
filename=sys.argv[1]

f = open(filename)
for line in f:
   if line.startswith('%%BoundingBox'):
      bb = line.split(' ')
      dx = int(bb[3]) - int(bb[1])
      dy = int(bb[4]) - int(bb[2])
      bb[3] = str(int(bb[1]) + 4*dx/5)
      bb[4] = str(int(bb[2]) + 4*dy/5)
      print ' '.join(bb)
   else:
      line = line.replace('gnulinewidth 5.000 def','gnulinewidth 20.000 def')
      line = line.replace('1 0 0 DL','0.7 0 0 DL')
      line = line.replace('0 1 0 DL','0 0.5 0 DL')
      line = line.replace('0 0 1 DL','0 0 0.7 DL')
      line = line.replace('(Helvetica) 240.0','(Helvetica) 360.0')
      line = line.replace('0.050 0.050 scale','0.040 0.040 scale')
      print line,

f.close()


_______________________________________________
Maxima mailing list
Maxima@...
http://www.math.utexas.edu/mailman/listinfo/maxima