Using FM2015 Publish to HTML5 Responsive: I'm trying to create output that represents programming code, so the characters and spaces should be fixed-width. Any suggestions on how best to do this?
I created a simple test FM doc that contains some fixed pitch text which is supposed to be programming code. Eg:
I created a paragraph format named "SourceCode" and applied it to the programming text. It uses a monospace font "Consolas" and tab stop every .5 inch. Note the tab stops used in the source code for indentation.
In the publish-settings, I mapped the "SourceCode" para format to the HTML "PRE" tag.
When I publish to HTML, the indentation is messed up:
This is what the HTML markup looks like. I drew a box around the weird span that is generated to represent the tabs:
Why is that span in there? Why does it use inline styling to override the font family and size? How are tabs supposed to be handled in the publishing output?
Ideally it would just omit the extraneous span and just output some number of space characters using . Is there a way to control this?
If I change the settings to not map the SourceCode para format to PRE, and instead use "Use Source Style"
Then this is the HTML output:
Which also contains the unwanted span, plus unwanted inline styling for the font-family. Why didn't it put the font-family into the FM_SourceCode CSS class?
Any help would be appreciated! Thanks.