Open wexew-ware opened 2 months ago
That's something we could do. We'd have to figure out how and where to make that an option.
Ghostwriter uses the figure options because it assumes evidence files are images or text. Are you uploading images of tables? You can insert tables with the WYSIWYG editor, but that doesn't add a caption or table label.
We use both evidence images/charts and tables. For tables, we have a "Table Caption" style and it appears above the table. For evidence/images/charts, we use a "Figure Caption" style and the caption appears below the evidence. I have no idea how widespread this arrangement is in the technical writing world, but our technical editor enforces it and some technical writing guides recommend it.
So, we would have:
Some paragraph explaining the situation that provides data in {{.ref my-super-awesome-table}}
with a proof of concept in {{.ref super-awesome-screenshot}}.
{{.caption my-super-awesome-table}}My Table Header That Should Use a Table Caption Style
<some table>
{{super-awesome-screenshot}}
I was thinking that we could create two new Ghostwriter placeholders such as {{.figure}}
and {{.table}}
, with {{.caption}}
being equivalent to {{.figure}}
for backwards compatibility. They would be configurable to have their own:
Figures would use the current configuration options and tables would be the new config options; again, to maintain backwards compatibility.
So, from the above example, the change in the WYSIWYG would be minimal:
Some paragraph explaining the situation that provides data in {{.ref my-super-awesome-table}}
with a proof of concept in {{.ref super-awesome-screenshot}}.
{{.table my-super-awesome-table}}My Table Header That Should Use a Table Caption Style
<some table>
{{super-awesome-screenshot}}
And, if you wanted to manually create a figure caption with maybe some code block:
The proof of concept code execution is in {{.ref my-code-block}}.
`
code block
code block
code block
`
{{.figure my-code-block}}This is my POC code block
{{.caption}}
could also work for this situation, too.
Implementation wise, I was looking to:
{{.figure}}
placeholder that reuses the current {{.caption}}
code that creates FIGURE
sequence items.{{.table}}
placeholder that creates TABLE
sequence items.
Currently when attaching evidence the caption used is always the "Figure" caption even when the evidence used is a table and not an image. Would it be possible to have an option to choose a "Table" Caption and have it use the 'Label Used for Tables' that is set within the Global Report Configuration menu?