We are single sourcing to PDF and HTML5. Most things work fine. One thing that isn't working is code samples where we number the lines of code. See the pics below for the story. Basically, it is working fine in the PDF, but not so in the HTML5. Does anybody know how I can get the HTML5 output to work correctly (that is, the same as in the PDF).
How it looks in Flare:
How it looks in PDF - just fine.
How it looks in HTML5 - no indentation and font changed.
What the source looks like in HTML5.
Code samples with numbers not working as expected in HTML5
-
- Sr. Propeller Head
- Posts: 222
- Joined: Fri Sep 12, 2008 1:57 am
Code samples with numbers not working as expected in HTML5
You do not have the required permissions to view the files attached to this post.
-
- Sr. Propeller Head
- Posts: 222
- Joined: Fri Sep 12, 2008 1:57 am
Re: Code samples with numbers not working as expected in HTM
Interesting. What we have discovered is that our use of auto-numbering on the code sample was leading to Flare creating a table for the HTML5 output. That's why we lose the indentation and the font. Any comments?
-
- Senior Propellus Maximus
- Posts: 2632
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Code samples with numbers not working as expected in HTM
I haven't used it myself, but could you use PRE?
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
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
-
- Sr. Propeller Head
- Posts: 222
- Joined: Fri Sep 12, 2008 1:57 am
Re: Code samples with numbers not working as expected in HTM
The original numbered style we used was a pre style.
-
- Senior Propellus Maximus
- Posts: 2632
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Code samples with numbers not working as expected in HTM
Of course it was, d'oh!Gary Niemen wrote:The original numbered style we used was a pre style.
How about using a p class styled as you require? I have one that I use (in PDF and CHM, so not HTML5) that works for me, though I don't have the numbers at the start. Might be worth taking a look at that approach as an alternative to PRE? Or a div to contain ordinary p?
Here's what I have in my stylesheet (includes both approaches). If you go for the div approach you only need the first two, if you go for the p class approach you only need the second two:
Code: Select all
div.Code
{
margin-bottom: 2%;
margin-top: 0;
background: #E8EEF8;
color: #003399;
padding-left: 10px;
padding-top: 3px;
margin-left: 30px;
margin-right: 30px;
padding-bottom: 3px;
font-family: 'Courier New';
mc-next-tag: p;
}
div.Code p
{
margin-bottom: 0;
margin-top: 0;
background: #E8EEF8;
color: #003399;
margin-left: 0px;
margin-right: 0px;
font-family: 'Courier New';
}
div.Code > p:last-of-type(1)
{
margin-bottom: 2%;
padding-bottom: 10px;
}
p.CodeExplained
{
margin-bottom: 0;
margin-top: 0;
background: #E8EEF8;
color: #003399;
margin-left: 30pt;
margin-right: 30pt;
padding-left: 10px;
padding-top: 2px;
font-family: 'Courier New';
}
p.CodeLastLine
{
margin-bottom: 2%;
margin-top: 0;
background: #E8EEF8;
color: #003399;
margin-left: 30pt;
margin-right: 30pt;
padding: 3px 0 3px 10px;
padding-bottom: 3px;
padding-top: 3px;
font-family: 'Courier New';
mc-next-tag: p;
}
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
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx