[Tioga-users] Using the new pdf preview features in 1.2
Ivars Finvers
ifinvers at ucalgary.ca
Wed Oct 25 14:28:07 EDT 2006
Bill (and Vincent),
Thanks for the example. I had looked sample files (and documentation)
but had missed the entry_page function.
The new approach is definitely simpler to use (at least for me). Just
what I needed.
Ivars
On 25-Oct-06, at 10:29 AM, Bill Paxton wrote:
>
> On Oct 24, 2006, at 4:02 PM, Ivars Finvers wrote:
>
>> I saw a message saying the Tioga 1.2.x has the ability to directly
>> produce a "final" version of a figure's pdf. A quick browse of the
>> documentation didn't reveal how to do this (or even, exactly what the
>> new commands are).
>>
>> For those of us who aren't intimate with the details of Tioga, would
>> it be possible to provide an example of using the new pdf mode?
>
>
> Hi Ivars,
>
> Thanks for the email. It seems that the releases have gotten out
> in front of the documentation again!
>
> Before going into details of commands, please allow me to take
> another shot at explaining this talk about "final" versions of a
> figure's pdf means. For me, there's been a change of view not
> unlike the famous visual illusion (is it a vase or is it a
> reflected profile?):
>
> <vasemy1.gif>
>
> In the "old days", I thought of Tioga as producing intermediate
> files (the *_figure.tex and *_figure.txt files) that would at some
> later time be combined by TeX to create a figure in a TeX
> document. So, in that view, the "final" figure PDF was created by
> TeX as part of typesetting a document. However, I naturally wanted
> to see what the figure looked like while I was debugging it, and so
> there was a "preview" ability in Tioga as well. And before long it
> became clear that I was looking at things in the "wrong" way.
>
> So there was a reversal in my image, and now I think of the process
> as Tioga producing the final PDF for the figure and, as part of
> that, calling TeX as a subroutine to get the job done. Then the
> figure PDF can be used however you wish -- as part of a TeX
> document of course, but for anything else as well. There is no
> longer any need for a "preview" and the *_figure files can be
> deleted immediately since they're now just temporaries created to
> drive TeX.
>
> There wasn't too much needed to provide better support for this new
> view of things. Mainly, you need to be able to specify exact sizes
> for figure and fonts.
>
> Now for specifics. Please take a quick look at tioga samples/plots/
> plots.rb that is part of the download. At the end of the
> initialize routine, at line 63, there is a new addition:
>
> t.def_enter_page_function { enter_page }
>
> This tells tioga that whenever it is about to create a new PDF
> page, it should call the 'enter_page' method which is defined in
> the next few lines of the file:
>
> def enter_page
> t.page_setup(11*72/2,8.5*72/2)
> t.set_frame_sides(0.15,0.85,0.85,0.15) # left, right, top,
> bottom in page coords
> end
>
> The page_setup routine takes the desired width and height in "big
> points" (72 per inch). So in this case, the PDF will be 5.5
> inches wide and 4.25 inches high. The set_frame_sides routine
> takes fractional positions on the page (i.e., page coordinates).
> If you wanted to change the fonts, you could do that in the
> enter_page routine as well by adding a line like this:
>
> t.set_default_font_size(14)
>
>
> I hope this helps to clarify things.
>
> Cheers,
> Bill
>
>
More information about the Tioga-users
mailing list