Re: Why is text-align="left"(and "start") not working for DOCX output?
"ronnie" <[email protected]>
| Newsgroups | gmane.text.xml.xfc.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm using MS-Word 2010 and I don't know if it is XFC bug or not.
It may be an issue with MS-Word version.
Anyway, my concern is that both text-align="start" and text-align="left"
attributes does not affect
DOCX output.
Please refer to attachments:
1. manual_capture.JPG : I have captured the document that you sent me.
As you can see from it, there is a align problem in verbatim block.
2. align_right.zip : text-align="right" attribute inserts "<w:jc
w:val="right"/>" to document.xml
in verbatim.docx file.
3. align_start_or_left.zip : text-align="start" and "left" attributes
never insert
"<w:jc w:val="left"/>" to document.xml in verbatim.docx file.
So, please let me know how to set "<w:jc w:val="left"/>" to document.xml
of DOCX file.
Best regards,
Ronnie
-----Original Message-----
From: Hussein Shafie [mailto:[email protected]]
Sent: Thursday, September 19, 2013 10:22 PM
To: ronnie
Cc: [email protected]
Subject: Re: [XFC] Why is text-align="left"(and "start") not working for
DOCX output?
On 09/19/2013 11:57 AM, ronnie wrote:
>
> XFC : 4.8.2 java version
>
> A RTF output has no problem, but DOCX output always aligns the
> paragraph to 'both'.
>
> Please let me know how to achieve "left alignment" for DOCX output.
>
> The following is a snippet of XSL-FO file.
>
> <fo:block hyphenate="false" wrap-option="no-wrap"
> white-space-collapse="false"
>
> white-space-treatment="preserve" linefeed-treatment="preserve"
> text-align="start">
>
> Let align is required.
>
> </fo:block>
>
--> If you think you have found a bug, then please file a *formal* bug
report. A XSL-FO snippet is not sufficient. This is clearly explained here:
http://www.xmlmind.com/foconverter/support.html#xfc_support_policy
--> Note that we don't have such problems in the .docx files we generate
using our own XSL stylesheets. See for example the following document
(please take the time to open it in Word 2007+ and to browse at least
its first few pages):
http://www.xmlmind.com/ditac/_distrib/doc/manual/manual.docx
In case it helps, the attribute-set we use to for ``verbatim blocks'' is
simply:
---
<xsl:attribute-set name="monospace-block-style"
use-attribute-sets="monospace-style block-style">
<xsl:attribute name="white-space">pre</xsl:attribute>
<xsl:attribute name="text-align">left</xsl:attribute>
<xsl:attribute name="hyphenate">false</xsl:attribute>
</xsl:attribute-set>
---
Nothing special about monospace-style and block-style:
---
<xsl:attribute-set name="monospace-style">
<xsl:attribute name="font-family">monospace</xsl:attribute>
<xsl:attribute name="font-size">90%</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="block-style">
<xsl:attribute name="space-before.optimum">0.75em</xsl:attribute>
<xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
<xsl:attribute name="space-before.maximum">0.9em</xsl:attribute>
<xsl:attribute name="space-after.optimum">0.75em</xsl:attribute>
<xsl:attribute name="space-after.minimum">0.6em</xsl:attribute>
<xsl:attribute name="space-after.maximum">0.9em</xsl:attribute>
</xsl:attribute-set>
---
--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support
align_right.zip
(application/x-zip-compressed, 7.6 KB) - not displayed
align_start_or_left.zip
(application/x-zip-compressed, 7.5 KB) - not displayed
manual_capture.JPG
(application/octet-stream, 106.5 KB) - not displayed