YW 6 or 7 for Win: RTF export with text aligned to the left?

59 views
Skip to first unread message

Patrick Sandymount

unread,
May 28, 2022, 8:44:18 AM5/28/22
to yWriter
Hello,
Thank you for accepting my subscription.
I have looked through the threads with the keyword I have a query about and have not seen so far a conversation on the question I would like to ask. Do let me know if this is in fact a repeat and I will repeat my search by adding query words.
My question is this: in Ywriter 6 (or 7) for Windows 10, is it possible to export a project to RTF without having the text justified on both sides? Is it possible to have it (except where the formatting says centre or right) aligned to the left?
Again I hope this is not a repeat.
I would welcome any hint, element of answer.
Yours sincerely
Patrick

Peter T.

unread,
May 28, 2022, 11:48:07 AM5/28/22
to yWriter
Hi Patrick, 

May I ask with which word processor you open the RTF file?
As far as I can see, yWriter 7.1.3.0 does not set the text alignment of normal paragraphs when exporting RTF. For me, WordPad, LibreOffice, OpenOffice and Word 2007 all left-align the paragraphs.

If you are still using the deprecated .yw5 or .yw6 file format, try switching to .yw7 (project settings) and see whether the RTF export formatting changes.
By the way, on Windows 10, it is best to use the latest yWriter 7 version. 

 
Cheers, 
Peter  

Patrick Sandymount

unread,
May 28, 2022, 9:38:04 PM5/28/22
to yWriter
Hello Peter,
Thanks so much for answering.
I usually open the RTF in MS Word 2003. But I have just tried Wordpad to make sure, and the exact same thing happens: the text is justified in a specific way, which, as far as I can see consists in adding a space at the end of each line and using a character-spacing stretch system/algorithm that is not one MS word "understands". It is as though there was a custom justification built-in to the export to RTF function.
Wordpad recognizes the text as justified, but if you try to mod the text you are still faced with a behaviour of the character spacing that is not the one you find in Wordpad (or word).
I am using YW6. I had tried YW7, but the operation was not as fast and smooth as YW6, so I uninstalled it and switched back to YW6.
I really like YWriter. It's efficient, uncluttered, super-pleasant to use and there's even the lovely touch of the typewriter sounds. Great, robust piece of software overall.
But this unchosen export unchosen and kind of unwieldy formatting thing is a little bit of a problem. Other than that the export process is good, easy and fast. A sharp contrast with, for instance, the nightmare that export still is in the version 3 of Scrivener, which actually caused me to stop using Scrivener permanently.
I am sure there is some parameter that triggers the behaviour I am describing and which you don't seem to be encountering on your computer with similar software.
Could it be because I use a blue background, and therefore a white font, in the editor window?

Patrick Sandymount

unread,
May 28, 2022, 9:56:12 PM5/28/22
to ywr...@googlegroups.com
Just as a follow up, I have tried switching the editor font and background colours back to their default, so black font, white background, and the result is 100% the same as regards the issue I mentioned: space at the end of each line, lines ending at the margin left and right, in other words (unrequested) justification. And yes Word, in tis case, sees the format as justified. But again that type of space-management is not the one word uses to achieve justification. I looked everywhere I could think of in YW for some kind of global parameter I may have activated erroneously, but I just can't see what it could be. I am curious, and pretty sure there is solution. :)

--
You received this message because you are subscribed to a topic in the Google Groups "yWriter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ywriter/emy11C4TYCk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ywriter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ywriter/386c8e2c-d579-4e65-b776-eaf1ee29918bn%40googlegroups.com.

Peter T.

unread,
May 29, 2022, 6:14:01 AM5/29/22
to yWriter
To repeat: The RTF code generated by the current version of yWriter does not adjust normal text paragraphs. I remember that this was different in older versions, that saved the scenes in individual RTF files. That's why I recommend you use the .yw7 file format. 
If you definitely don't want to use the current yWriter version, you can try the HTML export instead of RTF. This was the first step for me when I was dissatisfied with RTF.

Patrick Sandymount

unread,
May 29, 2022, 10:26:44 AM5/29/22
to ywr...@googlegroups.com
Thanks for the hint, going through html seems a to be useable workaround with version 6, and the html code generated is nice and clear, that's always a good point.

I reinstalled version 7. Internal operation very fluid so far. 
Regarding yW7 exports to rtf:
Wordpad
→ opens full projects exports fine (no justification, formatting preserved), but
→ in the case of selected chapter exports I am still getting justified text instead of left-align
Word 2003 (very old version, I know, but just for follow-up)
→ selected chapter export opens but with justification instead of left-align
→ for full project export, file cannot be opened (corrupted file dialogue box) and the open and fix function doesn't mend it.


Peter T.

unread,
May 30, 2022, 2:35:35 AM5/30/22
to yWriter
That sounds better now. Have you converted your project to .yw7 format? Then the export of individual files per chapter should also fit, at least that's how it is with me. But note that the chapter export, via "Report" menu does create justified paragraphs, as seen in the HTML code.

Nevertheless, I don't use RTF export or Word, but OpenOffice/LibreOffice. For those I have published a yWriter converter extension that creates a cleanly structured ODT document. The look can then be defined with document templates.

Patrick Sandymount

unread,
Jun 1, 2022, 2:50:44 PM6/1/22
to ywr...@googlegroups.com

That sounds better now. Have you converted your project to .yw7 format?
No, I did a trial-only project to test yW7. As I said, operation is now fluid, fast zero issues there.
I do however have a more general question regarding version 7 and onward. Is not the fact of having made the location of individual scenes invisible to the user (they appear in the scene list in version 6) a bit of a departure from the philosophy of the type of software yW belongs to (same category as Scrivener, but again yW is overall much more reliable) ? What I mean is having the actual discrete files accessible also outside the software, as RTF in this case, is, to me, an added level of safety, one for instance you don't have -- at least not by default -- in word/open-office/libreOffice with one long (100-page and more) document. To my mind, the very fact of having the full document broken up into smaller units which are actually standard files has , amongst many other advantages, the one of preventing the whole thing (hours of work) from getting accidentally corrupted, erased etc. And being able, if needs be, to open said files in an RTF-compatible/more widespread piece of software, or even possibly google docs, is something I really like.
Then the export of individual files per chapter should also fit, at least that's how it is with me. But note that the chapter export, via "Report" menu does create justified paragraphs, as seen in the HTML code.
Well all my trial files were done within version Seven, including the separate chapter export, and I did get a justified output in that scenario. 
Nevertheless, I don't use RTF export or Word, but OpenOffice/LibreOffice. For those I have published a yWriter converter extension that creates a cleanly structured ODT document. The look can then be defined with document templates.
Interesting! Where can that extension be found and is it a paid product? 

Peter T.

unread,
Jun 1, 2022, 5:16:39 PM6/1/22
to yWriter
On Wednesday, June 1, 2022 at 8:50:44 PM UTC+2 patricks... wrote:
What I mean is having the actual discrete files accessible also outside the software, as RTF in this case, is, to me, an added level of safety

I see your point. In fact, the .yw7 format, which consists of a single XML file, has the advantage that no inconsistencies can arise, for example, when copying, backing up or synchronizing with the cloud. This was discussed here again and again in the past; especially there were problems when a .yw5 project could not be opened at all because of missing, messed up, or broken RTF files. 
With .yw7, in contrast, you can do without the whole structure of automatically generated directories, and really have everything that matters in a single, rather compact file that can be edited with any text editor if necessary.
 
And being able, if needs be, to open said files in an RTF-compatible/more widespread piece of software, or even possibly google docs, is something I really like.

Yes, that is of course understandable. However, as a programmer, I have no problem with the .yw7 format as it is well accessible for scripting. For formatting, Simon came up with a straightforward markup that is easy to process. After all, you have to keep in mind that the .yw7 file format is based on XML and thus tends to be more robust than RTF, which is generated quite differently by all sorts of word processors, and is particularly limited in encoding international character sets.

I have published a yWriter converter extension that creates a cleanly structured ODT document. The look can then be defined with document templates.
Interesting! Where can that extension be found and is it a paid product? 

It's all free and open source. You find everything on GitHub. In any case, the LibreOffice extension manager offers an option "Get more extensions online" which leads to the official Extensions site where my extensions are listed. If you want to improve the typography of your text after importing it from yWriter to LibreOffice, you can try the "curly quotes" extensions for dashes, apostrophes and typographic quotation marks (e.g. guillemets) in different languages.

Patrick Sandymount

unread,
Jun 2, 2022, 11:35:29 AM6/2/22
to ywr...@googlegroups.com
With .yw7, in contrast, you can do without the whole structure of automatically generated directories, and really have everything that matters in a single, rather compact file that can be edited with any text editor if necessary.
As regards XML versus RTF, I say amen to that for sure. As you pointed out, RTF, though it appears as a readable format, is actually not, or not easily, editable. And yes it is frustrating when it comes to using characters other than West-European. To this one must indeed add the issue you also raised of unexpected interpretation by word processors. RTF is at best a failed attempt at a universal file format for formatted text. So I do think XML is the way forward generally speaking.

As regards the specific file-splitting versus all-in-one file question, maybe leave the discrete file approach as an option, with the possibility of generating one XML file per scene as well as the main XML file, for those users who want that? So in practice, something like a "multi-file export before save" option? This would leave the main, master XML file intact. Inevitably then, the question would be which takes precedence over the other. I guess one principle then could be: master-file first, with a dialogue box asking you if subsequent editing in scene files should be integrated in the main file... A bit of extra-programming there. It's an idea, I'm not saying it's the solution. :)

Interesting! Where can that extension be found and is it a paid product? 

It's all free and open source. You find everything on GitHub. In any case, the LibreOffice extension manager offers an option "Get more extensions online" which leads to the official Extensions site where my extensions are listed. If you want to improve the typography of your text after importing it from yWriter to LibreOffice, you can try the "curly quotes" extensions for dashes, apostrophes and typographic quotation marks (e.g. guillemets) in different languages.
Great, thank you! I will take a look once I have  LibreOffice reinstalled as the version I had was a bit dated and was longer functioning, probably due to successive Win 10 updates.

Peter T.

unread,
Jun 3, 2022, 4:27:10 AM6/3/22
to yWriter
On Thursday, June 2, 2022 at 5:35:29 PM UTC+2 patrick wrote:
As regards the specific file-splitting versus all-in-one file question, maybe leave the discrete file approach as an option, with the possibility of generating one XML file per scene as well as the main XML file, for those users who want that? So in practice, something like a "multi-file export before save" option?

In fact, yWriter offers this in the form of ebook export.
 
This would leave the main, master XML file intact. Inevitably then, the question would be which takes precedence over the other. I guess one principle then could be: master-file first, with a dialogue box asking you if subsequent editing in scene files should be integrated in the main file... A bit of extra-programming there. It's an idea, I'm not saying it's the solution. :)

I know of two open source writing software projects that take the distributed files approach, Manuskript and novelWriter. Manuskript zips an entire directory tree full of markdown-formatted text files, while novelWriter creates a project directory containing a base XML document that points to Markdown subdocuments. The purpose of this is to facilitate change tracking when using a version control system.
I've looked closely at both programs and still prefer yWriter.

About a year ago someone here in the forum asked for an exporter that creates ODM/ODT file combinations, i.e. a OpenDocument master document with one sub-document per chapter.
I saw it as a sporting challenge and programmed such an exporter, although to be honest I don't use it myself. Maybe that's something for you? After all, the OpenDocument format consists of zipped XML files.

 

Patrick Sandymount

unread,
Jun 3, 2022, 11:13:39 AM6/3/22
to ywr...@googlegroups.com
Le ven. 3 juin 2022 à 10:27, Peter T. <peter.pape...@gmail.com> a écrit :


On Thursday, June 2, 2022 at 5:35:29 PM UTC+2 patrick wrote:
As regards the specific file-splitting versus all-in-one file question, maybe leave the discrete file approach as an option, with the possibility of generating one XML file per scene as well as the main XML file, for those users who want that? So in practice, something like a "multi-file export before save" option?

In fact, yWriter offers this in the form of ebook export.
That would be an option to achieve the same ends. However, it's part the general export function, as opposed to be the way files exist by default.

But again the one-file approach has many plus sides. For one, a single file is easy to duplicate, especially if is compact, and the XML generated by yW7 is clearly smaller in size than a bunch of RTFs. It's just I am used to the idea of the separate files since I started using yWriter at version 6, perhaps even 5 when I first discovered it. So for me it's about rethinking a little and finding ways to achieve file backup using the XML file method.

One thing that could be interesting, eventually, if there are no legal hurdles, would be export to Docx, and/or to ODT, as opposed to RTF,  directly within yWriter.
 
I know of two open source writing software projects that take the distributed files approach, Manuskript and novelWriter. Manuskript zips an entire directory tree full of markdown-formatted text files, while novelWriter creates a project directory containing a base XML document that points to Markdown subdocuments. The purpose of this is to facilitate change tracking when using a version control system.
I've looked closely at both programs and still prefer yWriter.
Thanks for for those links. I suspect, actually I am pretty sure already I too would still prefer wWriter for its simplicity, reliability, and fast operation.
Manuskript seems to be pretty directly attempting to emulate Scrivener, and I actually wish the developer good luck 
with that endeavour. The guys at Literature and Latte do have good ideas here and there, I mean individual functionalities and ergonomics. But the export in Scrivener is a catastrophe, and they don't seem to be getting that. This is namely what everything hinges on if one is to use such a piece of software professionally (ie with a deadline) : the export to the format of delivershould in no case be a headache or a time-consuming task, both of which are the case with Scrivener 3. So I think some competition is very welcome.
Novel Writer seems to be stressing the cross-OS aspect, also laudable in itself. However I think I will let these projects gain a bit of maturity before trying them out, if I do.
 
About a year ago someone here in the forum asked for an exporter that creates ODM/ODT file combinations, i.e. a OpenDocument master document with one sub-document per chapter.
I saw it as a sporting challenge and programmed such an exporter, although to be honest I don't use it myself. Maybe that's something for you? After all, the OpenDocument format consists of zipped XML files.
That's interesting for sure. I typically would use the word processor more for the final full-text file, but it's great that you have made such a multiple-file-plus-master-doc export possible. Again, will give it a look one I have the LibreOffice suite up and running again.

 

--
You received this message because you are subscribed to a topic in the Google Groups "yWriter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ywriter/emy11C4TYCk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ywriter+u...@googlegroups.com.

Peter T.

unread,
Jun 3, 2022, 2:28:22 PM6/3/22
to yWriter
On Friday, June 3, 2022 at 5:13:39 PM UTC+2 patrick wrote:

One thing that could be interesting, eventually, if there are no legal hurdles, would be export to Docx, and/or to ODT, as opposed to RTF,  directly within yWriter. 
 
There should be no legal hurdles here, for they are both ISO formats. The thing is, there is quite a lot of work behind the file generation. And since these formats are very capable, there are also a lot more options with potential for endless special requests. After all, that's what makes exporting so complex in Scrivener, where all degrees of freedom are at the user's.

In contrast, RTF is the format that, if I'm not mistaken, is used internally in yWriter's rich text control, so exporting RTF might be virtually for free. However, this feature isn't really maintained; in fact, some of the more specific things like suppressing comments or <RTF /RTF> markup don't work properly for me.

The main focus for yWriter's export is clearly on ebooks and LaTeX, and might be intended for serious self-publishing, where you also need to get your system right first to have less work later in case of repetition. Simon's yWriter 7 sample project shows this in an impressive way. 

However, since this does not correspond to my way of working, I have programmed my own utilities and am quite satisfied with them. That's what I love about yWriter: it has a simple but flexible basic concept and with .yw7 a file format that reflects this concept in a comprehensible way.
Reply all
Reply to author
Forward
0 new messages