Open tux-mind opened 6 years ago
Hi, first of all, thank you for this project, it is a great tool to save precious time.
I would like to ask a new feature: referencable fenced code blocks.
When a fenced code block is translated into latex, it has neither a caption nor a label.
I solved this by using this hack, which includes those two latex parameters into the lstlisting command arguments:
lstlisting
\```Ruby,label={such_code},caption={Very\,listing} puts("WOW") \```
backslash are needed to escape GitHub markdown fenced code blocks. \, inserts a space in latex, as whitespace would stop the parsing of the code language
\,
You can reference the code using [](#such_code).
[](#such_code)
I hope that this helps, best regards, tux_mind.
I'll have to think about this one. I'm not sure it directly translates into HTML, and I worry about overloading the fenced code block syntax too much.
I'll leave this open for anyone else to comment if they choose.
Hi, first of all, thank you for this project, it is a great tool to save precious time.
I would like to ask a new feature: referencable fenced code blocks.
When a fenced code block is translated into latex, it has neither a caption nor a label.
I solved this by using this hack, which includes those two latex parameters into the
lstlisting
command arguments:You can reference the code using
[](#such_code)
.I hope that this helps, best regards, tux_mind.