Conditions inside H1 that includes mc:autonum

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
LarsLyhne
Propeller Head
Posts: 25
Joined: Tue Nov 01, 2011 6:55 am
Contact:

Conditions inside H1 that includes mc:autonum

Post by LarsLyhne »

Hi Fellow Propellers
I'm working to publish my documentation both as PDF and HTML5. That works almost like a breeze. Only real issue is that I'm using chapter numbers for PDF. In HTML5 the numbers mustn't show.

My issue is that my current heading H1 contains a MadCap:autonum, which looks like this:

<h1 MadCap:autonum="1 &#160;">REST API structure</h1>

Is it possible to wrap "autonum" in the condition (MadCap:conditions="Default.ScreenOnly")? And then incorporate it into my CSS?

Br / Lars
Kind regards

~ Lars Lyhne ~
www.retext.dk
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Conditions inside H1 that includes mc:autonum

Post by ChoccieMuffin »

The autonum bit should be part of your h1 style in your PDF medium, so yes, it's definitely possible. I'm in the middle of stuff so can't give you details, but you might want to look in that area.

Also, have you generated your HTML5 target? It's possible that things are set up correctly and your XML Editor is just showing how things appear in your PDF because your PDF target is the primary, so it may be that there simply isn't a problem! Generate your HTML5 target and check, then come back here if you're getting numbers. (I'm hoping you won't.)

If you don't get numbers, but don't want that stuff in your XML Editor window, I suggest you change your primary target to your HTML5 target rather than PDF.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
trent the thief
Propellus Maximus
Posts: 613
Joined: Wed Feb 01, 2006 6:21 am
Location: Off in the dark....

Re: Conditions inside H1 that includes mc:autonum

Post by trent the thief »

Hi Lars,

Verify that you are in fact using the H1 in the default section for your html output.

Now look for "@media print" and find the h1 in there. That's the where the H1 containing autonum info should live.

If you have the autonum statements in the Default section's H1, you'll see the secnum chapnum stuff in the html.

This is from my @media print

h1
{
font-size: 25pt;
line-height: 27pt;
margin-bottom: 20px;
auto-number: inherit;
mc-auto-number-position: inside-head;
page-break-after: avoid;
column-break-after: avoid;
}


This is from my Default:

h1,
h2,
h3,
h4,
h5,
h6
{
color: var(--Brand1);
font-weight: bold;
}

h1
{
font-size: 24.0pt;
margin: 18pt 0 18pt 24pt;
}
Trent.

Certifiable.

Image

umm...
I meant MAD Certified.

Official Propeller Beanie Owner :-)

:flare: Are you on Flare's Slack channels? PM me for an invitation! :flare:
LarsLyhne
Propeller Head
Posts: 25
Joined: Tue Nov 01, 2011 6:55 am
Contact:

Re: Conditions inside H1 that includes mc:autonum

Post by LarsLyhne »

ChoccieMuffin wrote: Thu Oct 05, 2023 4:23 am The autonum bit should be part of your h1 style in your PDF medium, so yes, it's definitely possible. I'm in the middle of stuff so can't give you details, but you might want to look in that area.
I looked to the CSS.
I just changed which output type to use. And then changed the heading not to include chapnum.

So thank you for the pointer, ChoccieMuffin :)
Kind regards

~ Lars Lyhne ~
www.retext.dk
LarsLyhne
Propeller Head
Posts: 25
Joined: Tue Nov 01, 2011 6:55 am
Contact:

Re: Conditions inside H1 that includes mc:autonum

Post by LarsLyhne »

ChoccieMuffin wrote: Thu Oct 05, 2023 4:23 am The autonum bit should be part of your h1 style in your PDF medium, so yes, it's definitely possible. I'm in the middle of stuff so can't give you details, but you might want to look in that area.
Hi Trent,

Thanks for the pointers. It did the trick.
Kind regards

~ Lars Lyhne ~
www.retext.dk
Post Reply