Pages: 1
Print
Author Topic: Paragraphing problem  (Read 3499 times)
linjinwei
Member

Posts: 65


« on: December 22, 2008, 01:27:25 AM »

Why is it that paragraphs are remove when you display in HTML or pdf. What I mean is how do u maintain the spacing every time you press Enter in pdf or html output?

As you can see In XMetal, I've created some paragraphs:




But it is not displayed in pdf:




I've tried setting the style in ditabase-derived.css
Code:
/* spacer {*/
[class~="hi-d/spacer"] {
line-height:40px;
}

It didnt work. What should I do?
« Last Edit: December 22, 2008, 08:34:50 PM by syeo » Logged
Su-Laine Yeo
Solutions Consultant
Member

Posts: 260


« Reply #1 on: December 22, 2008, 06:56:38 PM »

The code that generates PDF and HTML must be using logic that ignores empty paragraphs. If a structured authoring and publishing system is set up properly to meet the needs of the organization, authors don't have to deliberately use empty paragraphs to optimize the layout of their text.

What you should do is start by making sure you fully understand the paradigm of separating content and formatting, and then make sure you're using the right element types. Some of the following articles might help: http://justwriteclick.com/2008/08/15/darwin-information-typing-architecture-dita-reading-list/ . Or you can talk to a structured authoring consultant.

Any changes made to the ditabase-base.css file only affect how things look in XMetaL Author views, not in HTML or PDF output.

Regards,
Su-Laine
Logged

Su-Laine Yeo
Solutions Consultant
JustSystems Canada, Inc.
linjinwei
Member

Posts: 65


« Reply #2 on: December 22, 2008, 07:51:32 PM »

Yes I understand that changes in ditabase-base.css  will only affect XMetal output, and I've also figured out how where to change to enable pdf output.

Now I only need to know where is the file to change so that it will also affect HTML output.
Logged
lizaugustine
Member

Posts: 1


« Reply #3 on: December 23, 2008, 11:05:57 AM »

Why not use one of the tags that supports empty line breaks, such as <lines>?

-- liz
Logged
linjinwei
Member

Posts: 65


« Reply #4 on: December 23, 2008, 09:15:15 PM »

Well i explored <lines> and it doesnt seems to do anything, so I customized it.
It can display in pdf, but not in XMetal.

PDF output
From: C:\Program Files\Common Files\XMetaL Shared\DITA_OT\demo\xmfo\Customization\fo\attrs\xm-cfg\commons-attr.xsl
Code:
    <xsl:attribute-set name="lines">
            <xsl:attribute name="space-before">20pt</xsl:attribute>
    </xsl:attribute-set>


XMetal interface
From: C:\Program Files\XMetaL 5.1\Author\DITA\XACs\shared\ditabase-derived.css
Code:
/* lines {*/
[class~="topic/lines"] {
line-height: 20pt;
}

I dont know the EXACT coding to create spacing in css, so can anybody tell me?
==============================================================
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1546



WWW
« Reply #5 on: January 05, 2009, 06:38:09 PM »

For CSS (which affects on TagsOn and Normal views in XMetaL) you can use the margin-top property in this case, though you may wish to use padding-top depending on your exact needs / preferences.
Logged
linjinwei
Member

Posts: 65


« Reply #6 on: January 05, 2009, 07:47:08 PM »

Ok i have managed to edit the commons-attr.xsl
[Path = C:\Program Files\Common Files\XMetaL Shared\DITA_OT\demo\xmfo\Customization\fo\attrs\xm-cfg]

Code:
   
Line 197
<xsl:attribute-set name="p">
            <xsl:attribute name="padding-top">10pt</xsl:attribute>
</xsl:attribute-set>

It works fine as what I wanted in PDF. Now I need to know how I do the same thing for HTML. Where do I change?
Logged
Pages: 1
Print
Jump to: