ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Taco Hoekwater <taco@bittext.nl>
Subject: Re: Graphviz and ConTeXt
Date: Thu, 23 Jun 2022 15:08:56 +0200	[thread overview]
Message-ID: <EDC9350F-3882-4E84-A6A0-96C718EF1A54@bittext.nl> (raw)
In-Reply-To: <YrRX1Bq09Z3WpIyH@odysseus>

Hi,

You could just convert these separately to pdf/svg/jpg/png and then load them as \externalfigure. 

You could also use the filter module to be able to take them inline into the ConTeXt code:


\usemodule[filter]

\define[1]\ReadFigure{\externalfigure[#1]}
    
\defineexternalfilter[graphviz]
  [cache=yes,
   readcommand=\ReadFigure,
   output={\externalfilterbasefile.pdf},
   filtercommand={dot -Tpdf -o "\externalfilterbasefile.pdf" "\externalfilterinputfile"}]
  
\starttext
\startTEXpage
\startgraphviz
digraph G {
    main -> parse -> execute;
    main -> init;
    main -> cleanup;
    execute -> make_string;
    execute -> printf
    init -> make_string;
    main -> printf;
    execute -> compare;
}
\stopgraphviz
\stopTEXpage
\stoptext


See the filter module documentation for more details about that.

Best wishes,
Taco

> On 23 Jun 2022, at 14:08, juh via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Dear all,
> 
> I have a legacy project that I shall convert to a new ConTeXt project. 
> 
> There are a lot of Graphviz dot-files. What shall I do with these? 
> 
> Any hints?
> juh
> -- 
> Autoren-Homepage: ......... http://literatur.hasecke.com
> Satiren & Essays: ......... http://www.sudelbuch.de
> Privater Blog: ............ http://www.hasecke.eu
> Netzliteratur-Projekt: .... http://www.generationenprojekt.de
> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

— 
Taco Hoekwater              E: taco@bittext.nl
genderfluid (all pronouns)



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2022-06-23 13:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 12:08 juh via ntg-context
2022-06-23 13:08 ` Taco Hoekwater via ntg-context [this message]
2022-06-24 11:05   ` juh+ntg-context--- via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EDC9350F-3882-4E84-A6A0-96C718EF1A54@bittext.nl \
    --to=ntg-context@ntg.nl \
    --cc=taco@bittext.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).