Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New project request: pandoc-lstnos #21

Open
samueldodson opened this issue Jul 17, 2016 · 7 comments
Open

New project request: pandoc-lstnos #21

samueldodson opened this issue Jul 17, 2016 · 7 comments

Comments

@samueldodson
Copy link

samueldodson commented Jul 17, 2016

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

Thanks.

@tomduck
Copy link
Owner

tomduck commented Jul 24, 2016

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

@tomduck tomduck changed the title Feature Request: pandoc-lstnos New project request: pandoc-lstnos Nov 17, 2016
@tomduck
Copy link
Owner

tomduck commented Aug 7, 2018

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.

@mrkwjc
Copy link

mrkwjc commented Dec 12, 2018

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

@buehler
Copy link

buehler commented Mar 9, 2021

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

@aslmx
Copy link

aslmx commented Feb 28, 2022

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
Copy link

aslmx commented Feb 28, 2022

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


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

@buehler
Copy link

buehler commented Feb 28, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants