From paxton at kitp.ucsb.edu Thu Oct 5 15:10:00 2006 From: paxton at kitp.ucsb.edu (Bill Paxton) Date: Thu, 5 Oct 2006 12:10:00 -0700 Subject: [Tioga-users] proposed Tioga housecleaning Message-ID: <1BA12263-93B6-477A-8E5C-5500FD8FDA19@kitp.ucsb.edu> Hi, Here's what I'm thinking about for Tioga housecleaning to take advantage of the new page_setup approach. Absent loud screams from users, these changes will happen in the next release. Cheers, Bill keep these, but delete "preview_" from name: tex_preview_fontfamily tex_preview_fontseries tex_preview_fontshape tex_preview_fontsize tex_preview_preamble delete these as they are made obsolete by page_setup: set_default_font_size tex_preview_documentclass tex_preview_figure_height tex_preview_figure_width tex_preview_fullpage tex_preview_hoffset tex_preview_minwhitespace tex_preview_pagestyle tex_preview_paper_width tex_preview_paper_height tex_preview_tiogafigure_command tex_preview_voffset set_A4_landscape set_A4_portrait set_A5_landscape set_A5_portrait set_B5_landscape set_B5_portrait set_JB5_landscape set_JB5_portrait set_USLetter_landscape set_USLetter_portrait set_USLegal_portrait set_USLegal_landscape set_aspect_ratio_relative_to_frame set_physical_aspect_ratio set_aspect_ratio set_landscape landscape set_portrait portrait set_golden_ratio golden_ratio From ifinvers at ucalgary.ca Tue Oct 24 19:02:32 2006 From: ifinvers at ucalgary.ca (Ivars Finvers) Date: Tue, 24 Oct 2006 17:02:32 -0600 Subject: [Tioga-users] Using the new pdf preview features in 1.2 Message-ID: <677A4885-84AC-485D-AEEE-FE8966D81509@ucalgary.ca> Hi, 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? Thanks, Ivars From paxton at kitp.ucsb.edu Wed Oct 25 12:29:53 2006 From: paxton at kitp.ucsb.edu (Bill Paxton) Date: Wed, 25 Oct 2006 09:29:53 -0700 Subject: [Tioga-users] Using the new pdf preview features in 1.2 In-Reply-To: <677A4885-84AC-485D-AEEE-FE8966D81509@ucalgary.ca> References: <677A4885-84AC-485D-AEEE-FE8966D81509@ucalgary.ca> Message-ID: 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?): ? 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/tioga-users/attachments/20061025/3410df43/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: vasemy1.gif Type: image/gif Size: 1792 bytes Desc: not available Url : http://rubyforge.org/pipermail/tioga-users/attachments/20061025/3410df43/attachment-0001.gif From ifinvers at ucalgary.ca Wed Oct 25 14:28:07 2006 From: ifinvers at ucalgary.ca (Ivars Finvers) Date: Wed, 25 Oct 2006 12:28:07 -0600 Subject: [Tioga-users] Using the new pdf preview features in 1.2 In-Reply-To: References: <677A4885-84AC-485D-AEEE-FE8966D81509@ucalgary.ca> Message-ID: 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?): > > > > 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 > >