Hi,
I'm new to Flare and am converting legacy FrameMaker documents. In the FrameMaker document are a lot of tables, used to hold computer code listings (all formatted with fixed-width font) and all with captions (using FrameMakers "table caption" facility). Images are also in borderless tables for the same reason.
To save a LOT of trial and error:
* What is the best way to keep images and captions together? Two separate paragraphs then group them into a DIV?
* How would anyone recommend managing code samples? (Currently they tend to wrap themselves, but have leading space... which I can only do with <pre> (I believe) in CSS... does anyone use text boxes?
Thanks in advance,
Alison
SOLVED: Best way to display code listings
SOLVED: Best way to display code listings
Alison
Lone technical author - Flare user since March 2017
Currently using Flare 2020
Lone technical author - Flare user since March 2017
Currently using Flare 2020
Re: SOLVED: Best way to display code listings
This will be very obvious to any experienced Flare users.
It may not be the 'best' way, but after the trial and error I was hoping to avoid I have a solution that works for me. Sharing in the interests of helping out other newbies.
If figures/screenshots are not in steps, they are numbered and have captions. The same is true for listings. They are both classed as "figures" from a numbering perspective. Tables are numbered using a separate numbering sequence.
So to meet my requirements, I created 3 snippets:
It may not be the 'best' way, but after the trial and error I was hoping to avoid I have a solution that works for me. Sharing in the interests of helping out other newbies.
If figures/screenshots are not in steps, they are numbered and have captions. The same is true for listings. They are both classed as "figures" from a numbering perspective. Tables are numbered using a separate numbering sequence.
So to meet my requirements, I created 3 snippets:
- Figure, containing <figure>(image goes here)<figcaption>Figure N: Caption goes here</figcaption></figure>. Figcaption uses autonumbering.
- Listing, containing a div called "Listing" that has a border and a maximum width. Use <pre> tags within it to lay out the code... but I have found I'm better to do that in the text editor than the XML editor.
- Example, which is basically the Figure snippet but with the image replaced by the Listing div. (<figure><div class="Listing"><pre>Code sample</pre></div><figcaption>Figure N: Caption goes here</figcaption></figure>
Alison
Lone technical author - Flare user since March 2017
Currently using Flare 2020
Lone technical author - Flare user since March 2017
Currently using Flare 2020