Closed wbuchanan closed 8 years ago
This feature would be nice. Do you think you could program it and add an option for it (string processing reduces the speed...) ? I encourage you to have a look at 2 code files which are sthlp.ado and markdown.ado. These files are responsible for dealing with Stata help files. We can basically update the code to convert SMCL to HTML or LaTeX.
I could support you anyway I can if you are willing to give your codes a try.
As a guide, MarkDoc converts smcl to text to remove the smcl markup. So any conversion to MarkDown, HTML, or LaTeX, should be carried out before translating the log. This could be a separate engine, as I did it for markdown.ado
Do you have a tokenizer for the SMCL element tags already?
no. It's more of a markdown to smcl translator engine which enables users to document their code in Markdown and export sthlp and smcl (or other formats) from script files. as we discussed in the forum... Because my exportation aim was Stata format, I didn't need to parse smcl
Currently, it looks like Markdoc doesn't attempt to decorate these tags in a way that would convey the same information to the reader (e.g., showing the minimal number of characters required to reference an optional argument). It might be good/useful/helpful to adopt some type of standard for handling these:
For example,
{cmdab:rep:lace}
it's a bit difficult to do this with markdown since it seems to want a space token between bold/italic syntax (e.g., can't make part of the word italicized or bolded). But, this could definitely be rendered with HTML replace or replace to prevent information loss.