Reply to topic  [ 4 posts ] 
Rogue empty paragraphs before tables, when opening in Word 
Author Message
User avatar

Joined: 2011-12-23 08:02:54
Posts: 15
Location: Europe
In an attempt to further shift my work away from MS-Word while still guaranteeing (some) editing compatibility for my mostly Windowish clients I’m migrating some of my templates to Nisus.

I stumbled upon a weird problem:

One of my templates begins with a table in the main body as well as in the header.

In NWP 2.1.2 this is displayed fine, however when I open the rtf file in Word (for Mac 14.5.1) I get an additional empty paragraph before each of the tables. Obviously this will often shift the whole content and you had to delete the rogue paragraphs to make the document display the same way as in Nisus.

A look into the markup showed me that Nisus is doing something I don’t understand:

When the body (or the header) begins with a table Nisus will add a group like this before the table:

Code:
{\pard \s3513 \par }


Basically this is a grouped empty paragraph, only calling a style – if I’m interpreting it correctly.

As expected, if I delete the group (or just the '\par '), everything still seems to be fine in Nisus – and in Word the empty paragraph is gone.

Of course this is not a solution, since the group gets recreated the next time I save the document.

I doubt that it’s Word that is misbehaving here. Expanding a paragraph sounds correct to me, even if it hasn’t any printable content. (TextEdit and LibreOffice do the same.)

On the other hand I don’t understand why Nisus insists in inserting this group, since it seems to affect literally nothing. Not the following table, nor any following bodytext.

Probably there’s a reason for this, which is not obvious to me. But in that case I think a better solution should be researched. A high degreee of compatibility is the main argument for using rtf, after all.

ATM I only found a very ugly workaround: Adding some content (e.g. a space) just before the table and reducing the line height to 1pt gives the same output in Word as in Nisus (a 1pt-heigh empty line).


To reproduce the problem:

  1. Create a new rtf document in Nisus.
  2. Place the cursor in the body and create a table
  3. Write 'XXX' into the first table cell
  4. Save the document as rtf and open it in Word: you should see an additional paragraph (empty line) before the table
  5. Open the file in your text editor (e.g. BBEdit) and search for 'XXX'
  6. One line above the 'XXX' you’ll see a group like '{\pard \s3810 \par }'. Delete the group or just the '\par ', save.
  7. Open it in Word: no additional paragraph.


Thanks,

Tom


2015-12-11 18:59:29
Profile WWW
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Hello Tom:

Thank you very much for the detailed information and even RTF sleuthing. This does appear to be an anomaly of Nisus Writer, and is something we'll need to fix. In the meantime, I'm sorry about the nuisance of seeing extra lines or using tiny fonts.


2015-12-11 20:10:39
Profile WWW
User avatar

Joined: 2011-12-23 08:02:54
Posts: 15
Location: Europe
Thanks for the swift reply.

Two additional observations:

  • The described additional-paragraph-before-table issue sometimes also happens with tables that are not at the very beginning. But in these cases the rogue paragraph somehow seems to go away when doing some reformatting or re-applying styles. I didn’t invest time to reproduce it reliably, and I guess/hope it will also be fine once the described main issue is solved.
  • A table at the end of the header also forces an additional paragraph after the table. This is less grave because the paragraph is already visible in Nisus, so no surprises when opening the file in another app. But maybe this is an “anomaly”, too (?)


2015-12-12 09:05:05
Profile WWW
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
axolotl wrote:
A table at the end of the header also forces an additional paragraph after the table. This is less grave because the paragraph is already visible in Nisus, so no surprises when opening the file in another app. But maybe this is an “anomaly”, too (?)

It's a quirk that tables in Nisus Writer are always followed by a newline. In most cases it's a non-issue, but at the end of any text area, the extra newline could be a nuisance. I would say this issue isn't as important to fix as superfluous newlines appearing when opening files in Word, but it's something we might consider adjusting as well. Thank you!


2015-12-14 15:28:43
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: Baidu [Spider] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software