Pages: 1
Print
Author Topic: Verify XMetal, PDF and HTML customization files  (Read 9154 times)
linjinwei
Member

Posts: 65


« on: January 20, 2009, 08:36:42 PM »

Alright I know I have asked this question many times. But it is not properly answered. There is a reason why I am doing this, thus I need to clarify my doubts first. I will post my actual question after this has been answered.

XMetal, PDF and HTML all uses different files to generate their look and feel. These files are independent to each other, meaning that any changes made in a file will NOT affect the display of all other outputs (Refering to XMetal, PDF and HTML)
I understand that there are actually many files involved, but I will only talk about the mean ones;

=============================================================
XMetal interface = ditabase-base-override.css
Path = C:\Program Files\XMetaL 5.1\Author\DITA\XACs\ditabase
=============================================================

pdf - Meanly all under
Path = C:\Program Files\Common Files\XMetaL Shared\DITA_OT\demo\xmfo\Customization\...
         
=============================================================

html - commonltr.css
Path = C:\Program Files\Common Files\XMetaL Shared\DITA_OT\resource

=============================================================


Please just tell me if I am right or wrong.


Regards
Logged
mag3737
XMetaL Evangelist
Administrator
Member

Posts: 117

I even use XMetaL to write my business letters.


« Reply #1 on: January 21, 2009, 12:00:21 PM »

You are right (although this oversimplifies some things).
Logged

Tom Magliery
JustSystems Canada, Inc.
linjinwei
Member

Posts: 65


« Reply #2 on: January 21, 2009, 09:28:58 PM »

Alright Thanks mag3737

The mean problem lies with the HTML output. I did go through the Help section on "Appendix A: Configuring XHTML and CHM output". I have copied the commontlr.css file and created a custom one on my desktop which I named it "commontlr_custom.css".

I removed everything inside, leaving only the <p> element because I wanted to do some testing first, to see if the custom file works. So I tried setting everything embeded within <p> to have RED font color

Code:
.p {color: red}



================================================================
Next, I created a Concept Topic, type in some text, which is within the <p> tag.


================================================================

After that, I displayed it in Multiple HTML file. But before that, I clicked on [Configure Output] first, and under Deliverable Types, I set the stylesheet path to my commonltr_custom.css.



================================================================
Finally I run the file. I even Right Click and View Source to see if the stylesheet is linked.



================================================================

Well as you can see, the text isn't red. I have also tried doing the same thing to <bold> element, but nothing changes. Can anybody point out the mistake I have done?


Regards
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #3 on: January 23, 2009, 12:29:07 PM »

When you view the source of the output HTML does it contain the proper <link> element that references your CSS?
« Last Edit: January 23, 2009, 12:30:50 PM by Derek Read » Logged
ghkrause
Member

Posts: 62


« Reply #4 on: January 26, 2009, 10:29:39 AM »

Playing wit css:
I rendered my sample topic without changing the defaults. The commonltr.css is copied locally and I did my edits and checked in browser. I did never delete everything but rather added and modified.
There are books and online resources to learn CSS.

Aligning formats in XMetaL and XHTML
My formats are in an spreadsheet with rows for class attribute values and columns for those CSS settings I use. This helps me to get a consistent formatting by filtering and comparing values entered. I wrote some short macros to export to CSS. My spreadsheet is my single source which helps to align the formatting. Of course, with specialization I altered the xslt, too, to get the CSS working as intended.
I would not expect a non-programmer to master this easily.

I do not use XSL-FO for PDF rendition but I assume that at least some formatting code could be generated from the same spreadsheet.

In a nutshell: it's not designed as single source but you can make it to be.
Logged

Gunnar H. Krause, TechDoc Manager, Nuremberg Area, Germany
linjinwei
Member

Posts: 65


« Reply #5 on: January 27, 2009, 07:21:17 PM »

When you view the source of the output HTML does it contain the proper <link> element that references your CSS?

Are you refering to this line of code? If you look back to my last image, the code is there.
Code:

<link href= "[b]commonltr_custom.css[/b]" type="text/css" rel="stylesheet" />



Playing wit css:
I rendered my sample topic without changing the defaults. The commonltr.css is copied locally and I did my edits and checked in browser. I did never delete everything but rather added and modified.

So did it work for you. You didnt mention if the browser shows according to what you modified in commonltr.css
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #6 on: January 29, 2009, 03:42:51 PM »

<link href= "commonltr_custom.css" type="text/css" rel="stylesheet" />

Assuming your CSS file called commonltr_custom.css is in the same folder as your HTML file then your browser should load it and use it to style your HTML. I think this all comes down to file management at this point as you will be delivering them to the reader in some fashion (via a website in many cases). Might be a good time to check with your website design team, webmaster, etc, to find out how they wish this to be done.
Logged
ghkrause
Member

Posts: 62


« Reply #7 on: January 31, 2009, 02:28:18 PM »

Most of my CSS code works as expected, but it took me iterations to get satisfied. Especially in cases where inline elements overwrite block settings I have still some open issues. I know that I have to add additional lines with more precise structure description (like specialized phrase in title) with expected formatting to solve it. The more elements you use the more tricky it can get ...
Logged

Gunnar H. Krause, TechDoc Manager, Nuremberg Area, Germany
Pages: 1
Print
Jump to: