pandoc-fignos icon indicating copy to clipboard operation
pandoc-fignos copied to clipboard

New project request: `pandoc-lstnos`

Open samueldodson opened this issue 8 years ago • 7 comments

Hi, @tomduck. Could the pandoc-fignos, pandoc-eqnos, and pandoc-tablenos approaches be used to reference source code listings?

Thanks.

samueldodson avatar Jul 17 '16 20:07 samueldodson

That's an interesting thought. Let me look into it and get back to you.

tomduck avatar Jul 24 '16 21:07 tomduck

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.

tomduck avatar Aug 07 '18 14:08 tomduck

Hi! I cannot help (at the time being), but I do vote for this project. :+1:

mrkwjc avatar Dec 12 '18 20:12 mrkwjc

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 :-(

buehler avatar Mar 09 '21 13:03 buehler

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.

aslmx avatar Feb 28 '22 13:02 aslmx

@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.

  1. 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 avatar Feb 28 '22 14:02 aslmx

@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 :-)

buehler avatar Feb 28 '22 14:02 buehler