pandoc-fignos
pandoc-fignos copied to clipboard
New project request: `pandoc-lstnos`
Hi, @tomduck. Could the pandoc-fignos
, pandoc-eqnos
, and pandoc-tablenos
approaches be used to reference source code listings?
Thanks.
That's an interesting thought. Let me look into it and get back to you.
This too is a nice idea, but I don't currently have time to implement it. I am going to mark it as "help wanted" so that developers who would like to contribute can do so.
Hi! I cannot help (at the time being), but I do vote for this project. :+1:
This would be an awesome improvement! I would use it in combination with the plantuml filter and/or other code blocks.
Sadly, I'm not fluent in python to implement such a filter :-(
I was also close to write an issue, asking if it is possible to reference code blocks with fignos, especially codeblocks that actually create graphics with the plantuml filter.
Looks like i'm going to generate the plantuml graphics outside of markdown/pandoc and will incldue them as regular graphics then.
@buehler I understand you are using the plantuml-filter to create plantuml graphics from source within the markdown (to not have separate files), right?
I just tried and tried and tried, and using these, steps, i can use fignos ot reference a plantuml sequence chart.
- In the template I had to add these two lines
\usepackage{hyperref} % for pandoc-fignos
\usepackage{cleveref} % for pandoc-fignos
in the markdown:
The graphic
~~~~{#fig:authprocess13 caption="Sequenzdiagrammtest" label="authprocess" fig="#authprocess" .plantuml width=50% plantuml-filename=images/example.eps}
participant Alice #ff0000
participant Bob #00ff00
Alice -> Bob: Authentication Request/usr/bin/pandoc-plantuml
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
~~~~
and i could reference it with
siehe +@fig:authprocess13
It was rendered (german) as
siehe [Abb. 2]
Pandoc threw some stuff in the console, though... but ... well it works :thinking:
[WARNING] Citeproc: citation fig:authprocess13 not found
pandoc-fignos: Bad reference: @fig:authprocess13.
pandoc-fignos: Wrote the following blocks to header-includes. If you
use pandoc's --include-in-header option then you will need to manually
include these yourself.
%% pandoc-fignos: required package
\usepackage{cleveref}
Could not create directory "plantuml-images"
Could not create directory "plantuml-images"
Maybe it helps you or anybody else... I'll go with this, as long as it works and i can't find something better...
@aslmx the current workflow of mine is:
- create files (
*.puml
) that contain the plantuml definition - have a lua filter (custom) create a png from the definition and hash it
- insert the image into the doc
you can see the process over in (sorry for the self-reference) https://github.com/buehler/mse-project-thesis-2 or https://github.com/buehler/mse-project-thesis-1
Hope this helps :-)