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
can't remove <p>...</p> from non-HTML export (Read 2046 times)
Gregg Williams
Full Member
*
Offline



Posts: 23
San Jose CA
can't remove <p>...</p> from non-HTML export
Mar 08th, 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!
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: can't remove <p>...</p> from non-HTML export
Reply #1 - 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?

Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: can't remove <p>...</p> from non-HTML export
Reply #2 - 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.

Back to top
 
 
WWW   IP Logged
Gregg Williams
Full Member
*
Offline



Posts: 23
San Jose CA
Re: can't remove <p>...</p> from non-HTML export
Reply #3 - 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.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: can't remove <p>...</p> from non-HTML export
Reply #4 - 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.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Prem Thomas
Full Member
*
Offline



Posts: 10

Re: can't remove <p>...</p> from non-HTML export
Reply #5 - 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.
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print