Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Exporting from Tinderbox >> Export first paragraph only w/specific markup
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1220983562

Message started by russ lipton on Sep 9th, 2008, 2:06pm

Title: Export first paragraph only w/specific markup
Post by russ lipton on Sep 9th, 2008, 2:06pm

What I want to do:

Export the first paragraph of a note and define it in a template as italicized.

Export the rest of a note's paragraphs as-is.

This seems useful for the first paragraph: "^paragraphs( n ) exports the first n paragraphs of the text."

Can I then use some magic to export the rest of the paragraphs for a given note without repeat-exporting the first one?

Or is there an easier way to approach this altogether, given that I have a set of notes and would rather not hardwire HTML into them for this task?

Title: Re: Export first paragraph only w/specific markup
Post by Mark Anderson on Sep 9th, 2008, 5:44pm

Using ^paragraphs(item,N)^ the answer is no as N always starts at the first paragraph.  Instead use an action to set HTMLFirstParagraphStart and HTMLFirstParagraphEnd. Change the default <p> and </p> to <p><i> and </i></p> or use <em> instead of <i> to set the italics. You could also simply set a class name for the start <p class="firstpara'> and define the format in CSS.

A method needing more expertise would be to leave the existing default values for the above attributes and then use HTMLExportCommand with command line tools to fine the first <p> and change it to <p class="firstpara'> or the like.

Title: Re: Export first paragraph only w/specific markup
Post by russ lipton on Sep 9th, 2008, 6:01pm

Thank you - helpful in its own (sic) write and also for pointing towards greater mastery of Tinderbox.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.