Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Export the Same Notes to Multiple Formats (Read 2424 times)
Josh Fishburn
Full Member
*
Offline



Posts: 11

Export the Same Notes to Multiple Formats
Oct 04th, 2014, 6:03pm
 
I have a Tinderbox file that currently exports to a Markdown-formatted document via a series of templates and prototypes similar to the ones described in this article on writing an article in Tinderbox: http://decafbad.com/2010/06/tinderbox-article-tutorial/article.html.

I would like to simultaneously export the same set of notes using another set of templates designed for a LaTeX-formatted document, but one can only assign one template to any given note. I'm not sure how to go about this - does anyone have suggestions? I'm willing to accept that I'm going about this entirely the wrong way, but at this point I'm stumped!
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Export the Same Notes to Multiple Formats
Reply #1 - Oct 4th, 2014, 6:51pm
 
Use an envelope template that switches formats depending on a configuration attribute.

   ^if($Latex(/config)) ..... ^else .... ^endif

On the whole, this is not easy.
Back to top
 
 
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Export the Same Notes to Multiple Formats
Reply #2 - Oct 5th, 2014, 3:48am
 
As MB indicates, it's cumbersome of lots of discrete notes need an alternate. If however it is a case of a few discrete branches needing alternate exports, then simply make a note for each alternate export and use an ^include^ to seed the process. To see the latter technique download the source TBX for aTbRef. See how all the content - normally exported as single HTML pages - is also exported as a sitemap. The fact the latter is also HTML isn't the significant as either set of exports could be using other forms of mark-up (or none!).

Note, re the switch technique MB describes, to export in 2 different format changing the master switch between each, 3 times for 3 different formats, etc.

At a more simple level, the default $HTMLExportTemplate - empty by default in v6 - simply tells any exporting note which template to use. This doesn't stop some/all exporting notes (or prototypes) having their $HTMLExportTemplate set different;y.  This allows for the scenario where you don't want the notes to export more than once but some notes need to use different formats or different layouts within the same format.

Or you can mix and match all the above.  When moving beyond basic export a good starting tip is not to rush to concentrate on the outcome but to identify which notes need to use which template(s) and how you will set and control those differences.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print