Replies: 3 comments
-
Additional input: https://talk.commonmark.org/t/abbreviations-and-acronyms/890 |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the feature request. I have briefly looked into how we could implement this. I think it is quite challenging to add a fully fledged abbreviation and acronym support similar like in LaTeX. It is great that there already is an established markdown syntax for abbreviations. However, this markdown syntax misses some features such as defining plurals and it does not automatically write out the full definition when an acronym is first used. A big challenge to integrate acronyms into SysReptor is that markdown content is provided in multiple fields (e.g. finding description, finding recommendation, executive summary, etc.) and not in one large markdown document. We should allow defining an acronym once and use it in multiple fields, because it would be annoying to have definitions for common acronyms in many markdown fields. We should also allow to specify a global list of acronyms in designs that are then available in every markdown field. This means, we need to change markdown rendering into multi-pass rendering. In the first rendering step, a list of all acronyms should be collected. In the second rendering step, acronym references in markdown should be detected and formatted correctly. Once we have collected the global list of acronyms from markdown fields, rendering them as a glossary is easy. I do not yet know if it is possible to automatically write out the full definition when an acronym is first used, even if we customize the markdown extension. The problem is to detect the first occurrence of each acronym in the document. We do not simply render the full document from top to bottom, but conditionally re-render or delay some parts in multiple rendering passes. We would need to post-process the HTML after everything else is rendered to insert the written out acronym definition. |
Beta Was this translation helpful? Give feedback.
-
I understand that this can become complex quite fast and probably has a "bad" cost-benefit ration, but I really appreciate that you are considering it and are putting thoughts in it! As far as I understand LaTeX rendering, it can behave similarly and is not simply rendered top to bottom (but I'm not entirely sure about that). Probably inspiration can be gained from its implementation. Concerning the first-use problem, a fair compromise could be to have additional markup for when an acronym should be written out and not have it done automatically. It could also allow for more flexibility, if the acronym should be written out in multiple places. Once I become a little familiar with Sysreptor's code, I'll try to engage and help with this enhancement suggestion. Thanks! |
Beta Was this translation helpful? Give feedback.
-
LaTeX has extensive support for defining acronyms, for example to use for abbreviation management. The corresponding feature is part of glossaries package and loaded with
\usepackage[acronym]{glossaries}
(for reference). This is especially useful for scientific writing but would also come in handy for pentest reports.Features include automatically writing out the full definition when an acronym is first used, generating the acronyms listing, linking the acronym to its definition in the listing for each usage, defining plurals etc.
For example, abbreviations can be defined like this:
\newacronym{iso}{ISO}{International Organization for Standardization}
\newacronym[plural=SDRs,firstplural=Software Defined Radios (SDRs)]{sdr}{SDR}{Software Defined Radio}
... and referenced like this:
\glspl{sdr}
\gls{sdr}
\gls{iso}
Examples for rendered documents with such references can be found online easily. I could also provide an example in private (source + rendered).
Could you add support for a similar solution?
Beta Was this translation helpful? Give feedback.
All reactions