Has anybody worked out how to style the text in a code snippet for PDF and Word output yet? It doesn't seem like I can affect the font family and size from the MadCap|codeSnippetBody for PDF output (although, oddly, I CAN affect the font weight).
From the look of the Word output the code snippet is converted to a table, which is also suggested by viewtopic.php?f=10&t=32525. But I can't work out what styles I should be changing to affect the text. (On the assumption that I only want to affect this text and not that in my other tables.)
Styling the Text in Code Snippets
-
- Sr. Propeller Head
- Posts: 290
- Joined: Mon Aug 26, 2019 2:11 pm
Styling the Text in Code Snippets
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
-
- Senior Propellus Maximus
- Posts: 2630
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Styling the Text in Code Snippets
You may have identified exactly the way to change the font in your code snippets in that thread you quoted. I suggest you try adding "font-family: xxx;" to the first of these two additions to your CSS, as helpfully suggested by klees in that thread, and see what happens.doloremipsum wrote:Has anybody worked out how to style the text in a code snippet for PDF and Word output yet? It doesn't seem like I can affect the font family and size from the MadCap|codeSnippetBody for PDF output (although, oddly, I CAN affect the font weight).
From the look of the Word output the code snippet is converted to a table, which is also suggested by viewtopic.php?f=10&t=32525. But I can't work out what styles I should be changing to affect the text. (On the assumption that I only want to affect this text and not that in my other tables.)
klees in the linked thread wrote:Update:
Just in case anyone else runs into this issue, I resolved it by adding the following to my stylesheet (manually).
MadCap|codeSnippetBody table td
{
border-right: solid 1px none;
border-top: solid 1px none;
border-bottom: solid 1px none;
padding: 0.0em;
}
MadCap|codeSnippetBody table
{
border: none;
}
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: 290
- Joined: Mon Aug 26, 2019 2:11 pm
Re: Styling the Text in Code Snippets
My reading comprehension obviously wasn't great yesterday arvo! The problem was actually being caused by some unnecessary formatting I had on my table and td tags, which was overriding the styles on the codeSnippetBody tag for CSS inheritance reasons. I can either delete that table/td formatting, or override it with a more specific selector (MadCap|codeSnippetBody td).
Cheers Mx Muffin!
Cheers Mx Muffin!
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.