How to insert a paragraph tag in a header tag?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Rene Severens
Sr. Propeller Head
Posts: 210
Joined: Mon Sep 19, 2011 2:06 am
Location: Netherlands - Zoetermeer
Contact:

How to insert a paragraph tag in a header tag?

Post by Rene Severens »

Hi,

Case: A topic, for target PDF, has a title that spans 2 lines. Using h1.topictitle for the title and a p.normal for the text, in which h1.topicttitle only defined mc-auto-number-format = "CH:{chapnum} " and p.normal only definies a margin-left = "120px", the output in the xml editor as in the PDF is as shown next: (Please imagen the "......" do not exist.)

1 This is a title that is very long and thus spans
multiple lines


........Here start the first paragraph with normal
........text.
........And this is the second paragraph with
........normal text.

The idea is to have the text title start at the same 120px from the left margin. This can be accomplished very simple by positioning the defined p.normal tag around the title-text. Doing this in the text-editor gives a perfect result:

1......This is a title that is very long and thus spans
........multiple lines


........Here start the first paragraph with normal
........text.
........And this is the second paragraph with
........normal text.

However in the xml editor is seems not to be possible to add the paragraph tag inside the header tag. Instead the header tag is replaced by the paragraph tag.

Why is this not possible?

Rene Severens
"The numbers are strange today; they somehow do not seem to add up."
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: How to insert a paragraph tag in a header tag?

Post by NorthEast »

I think it may be invalid HTML to have a paragraph tag inside a header tag; or at the very least it isn't good practice.

Why not just add a margin/padding to the header tag, so that it's aligned with the paragraph?
Rene Severens
Sr. Propeller Head
Posts: 210
Joined: Mon Sep 19, 2011 2:06 am
Location: Netherlands - Zoetermeer
Contact:

Re: How to insert a paragraph tag in a header tag?

Post by Rene Severens »

Hi,

If added margin/padding to the header tag, the automatic chapter number starts at the same level as the text flow:

........1This is a title that is very long and thus spans
........multiple lines

........Here start the first paragraph with normal
........text.
........And this is the second paragraph with
........normal text.

and this is not the expected result.

Greetings,

Rene Severens
"The numbers are strange today; they somehow do not seem to add up."
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: How to insert a paragraph tag in a header tag?

Post by lacastle »

I worked through something like this a for lining up my paragraph numbers (but you could use it for heading numbers i think) on the left and putting the text all lined up next to it (not under the number). see these topics:
http://forums.madcapsoftware.com/viewto ... 788#p69788
http://forums.madcapsoftware.com/viewto ... &sk=t&sd=a
Rene Severens
Sr. Propeller Head
Posts: 210
Joined: Mon Sep 19, 2011 2:06 am
Location: Netherlands - Zoetermeer
Contact:

Re: How to insert a paragraph tag in a header tag?

Post by Rene Severens »

Hi,

Thanks for getting me on the right track. I now have the long text lines lined out perfectly at the same level as the text flow, using just the h1 class with the next properties set:

margin-left: 120px;
mc-auto-number-format: {chapnum}
mc-auto-number-offset: 100px;
mc-auto-number-position: outside-head

The mc-auto-number-offset represent the distance between the chapternumber and the defined margin-left. So seen from the defined margin-left, that is where the text flow starts, towards the chapternumber, it is -100px; .

At least this saves using the text editor to insert <p>-tags within header tags, though that also worked.

Greetings, Rene Severens
"The numbers are strange today; they somehow do not seem to add up."
Post Reply