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 >> can't remove <p>...</p> from non-HTML export
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1457467890

Message started by Gregg Williams on Mar 8th, 2016, 3:11pm

Title: can't remove <p>...</p> from non-HTML export
Post by Gregg Williams on Mar 8th, 2016, 3:11pm

Hi--I've been working on this problem for several hours with no effect; also searched the Forum for help.

I created two templates (as children of the /Templates note) to export the plain text of a TBX file as a series of note Title followed by note Text. The export is working fine except that exported Text fields are bracketed by <p> ... </p>.

I am aware of HTMLParagraphBegin and HTMLParagraphEnd, as well as its variants for FirstParagraph and IndentedParagraph variants.

I have blanked out all SIX of these fields, both directly and using the HTML Inspector.

I have blanked them out for both the root of the document and for the two templates used. (I'm exporting the entire document, not a subtree.)

Just to be sure, I've started with a new document, then pasted in my text-to-be-exported subtree and template hierarchy.

I've looked at the result through the menu items for exporting, as well as looking at the result by looking at the HTML subpane of the root note's Text field.

None of these have solved the problem.

This is the kind of problem with Tinderbox that causes me to periodically abandon using it.

Any help would be appreciated. Thanks!

Title: Re: can't remove <p>...</p> from non-HTML export
Post by Mark Anderson on Mar 8th, 2016, 3:58pm

Can you confirm you're using ^value($Text)^ or ^text(plain)^ and not ^text^? The latter is intended for marked up text. The first two do the same thing (the ^value()^ approach being the current way of doing this).

Otherwise, can you post the code of the templates - or better, a link to a small example doc with the templates and test content?


Title: Re: can't remove <p>...</p> from non-HTML export
Post by Mark Bernstein on Mar 9th, 2016, 11:22am

My guess is that you're editing the values of $HTMLParagraphStart/End in the template.

You want to edit those values in the exported note, not the template;  when Tinderbox exports a note, it uses $HTMLParagraphStart/End from this note for each exported note.

Often, you may want to set $HTMLParagraphStart/End for the prototype of the notes you're exporting, or even set the default value.


Title: Re: can't remove <p>...</p> from non-HTML export
Post by Gregg Williams on Mar 10th, 2016, 1:23pm

Hi, Mark A. and Mark B.,

Thanks for both your comments, which helped me solve my problem. For future readers' benefit, here's what I found:

[For cases 1) and 2) below, assume that all six types of 'HTML...Paragraph...' attributes are cleared of all text content at the level of the container holding all the notes to be exported.]

1) When executing File > Export Selected Note, replacing "^text^" with the preferred form "^value($Text)^" in my "print a note's Title and Text" template solved the "prints unwanted '<p> ... </p>'" problem.

In 1), the output is a plain-text file (i.e., no text styles preserved) with blank lines added as given by the template.


----------

2) When executing File > Export > As Text > RTF, replacing "^text^" with "^value($Text)^" in my "print a note's Title and Text" template made no difference.

In 2), the output is as follows:

   -The text of a Title field exports as a plain-text sans-serif font, with the text of a "container" note having a larger font size than the text of a Title field of a container note that is a child of the less-indented container note. The deeper-nested a container note is, the smaller its corresponding text.

   - The text of a Text field exports as a serif font with styles (e.g., italic, bold) included.


----------

Other observations, which may or may not always be true, based on the context of attributes:

* There are *eight* ways to export text:

   - File > Export > as HTML
   - File > Export > as Outline (three ways: RTF, text, doc)
   - File > Export > as Text (three ways: RTF, text, doc)
   - File > Export Selected Note

* Note the differences here:

   - File > Export > as Text > text > Selected Notes: can export multiple notes; does not export children (can attributes make a difference here?)

   - File > Export Selected Note: exports *one* note and its children


------------

For me, the solution to my problem is as follows:

* For the note that contains all the notes I want to export (i.e., the container note), all six types of 'HTML...Paragraph...' attributes are cleared of all text content.

* For styled text output, I must copy the container note to a new TBX document and add my "title and text of each note" template. Then I execute File > Export > as Text > RTF

* For plain-text output, starting with my original document, I must highlight the container note, then execute File > Export Selected Note.

Title: Re: can't remove <p>...</p> from non-HTML export
Post by Mark Anderson on Mar 11th, 2016, 8:46am

I'm confused by your reading of #2. You're trying to export plain [sic] text.  RTF is not plain text so is an inappropriate test for plain text.

Title: Re: can't remove <p>...</p> from non-HTML export
Post by Prem Thomas on Mar 24th, 2016, 4:41pm

Struggled with the same problem for an hour and felt similar frustration. Trekked through the Help and TinderboxRef site before coming here to search. Glad you asked the question, Gregg.

I miss 5.12's Nakakoji view and radio-button export interface. Also 5.12 did not have the same issue with ^text^ being wrapped with <p>. Anyway ^value($Text)^ does the trick for plain text export.

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.