[Tioga-users] Setting absolute size of figure
Bill Paxton
paxton at kitp.ucsb.edu
Fri Jun 30 11:04:17 EDT 2006
Hi,
This email is a comment on the issue of unintentionally getting
multiple copies of additions to the tex_preview_preamble string. I
now think this is simply a bug in Tioga. We get extra copies
appended because the string is not being reset when a file is
reloaded. We do automatically call reset_figures to clear the list
of figures (or else we'd be having the same problem with the list of
figures as well!) -- so my intention is to add to reset_figures so
that it resets the entire figuremaker state to defaults. That fixes
the preview_preamble problem and also eliminates one possible source
of nasty confusion in which a Tioga figure gives different results
depending on how many times the file has been reloaded!
Unless I hear violent objections, that's what I'll do for the next
release.
Cheers,
Bill
On Jun 29, 2006, at 11:48 PM, vincent.fourmond at 9online.fr wrote:
>
> Hello !
>
> > > I discovered a possible bug (or perhaps it is my usage). If I
> > > include the following line in my .rb file:
> > >
> > > t.tex_preview_preamble = t.tex_preview_preamble +
> > > "\n\t\\usepackage{MyCommonStuff}\n" +
> > > "\n\t\\usepackage{mathtime}\n"
> > >
> > > I end up with repeated occurrences (about 20) of the \usepackage
> > > lines in the .tex file.
>
> I would like to have a little more context however. You're using
> irb or the graphical interface and you repeatedly try to plot the
> same things ? Could you send us the file (or an extract) ?
>
> If that really is an annoyance, I propose the creation of a function
>
> def tex_preview_preamble_append(str, unique = true)
> if not unique or tex_preview_preamble.index(str)
> tex_preview_preamble += str
> end
> end
>
> Then, you call it
> tex_preview_preamble_append("your string")
>
> and it will get appended only once.
>
> That's the best I see for now.
>
> Vincent
> _______________________________________________
> Tioga-users mailing list
> Tioga-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/tioga-users
More information about the Tioga-users
mailing list