1

I used to make tree diagrams with dot in orgmode.

  #+BEGIN_SRC dot :file hallo1_1_1.png 
     digraph hallo1_1_1 {
        A [shape = "circle",style=filled, fillcolor=yellow]
     }
  #+END_SRC

Now, to pass latex commands (\def\mycommand{args})to my diagrams I would like to use dot2tex. (the usepackages are in ~/.emacs)

             \\usepackage[utf8]{inputenc}
             \\usepackage[T1]{fontenc}
             \\usepackage{graphicx}
             \\usepackage{longtable}
             \\usepackage{listings}
             \\usepackage{xcolor}
             \\usepackage{float}
             \\usepackage{soul}
             \\usepackage{amssymb}
             \\usepackage{hyperref}
             \\usepackage{sectsty}
             \\usepackage{tabularx}
             \\usepackage{pbox}
             \\usepackage{tikz}
             \\usepackage{stackengine} 
             \\usepackage{verbatim}
             \\usepackage{changepage}
             \\usepackage{dot2texi}
             \\usepackage[pdf]{graphviz}
             \\usetikzlibrary{shapes,arrows}

After using in my test.org:

    #+headers: :cmdline latex -shell-escape
    #+BEGIN_SRC latex


   \digraph[scale=0.5]{MyGraph}{rankdir=LR; a->b; b->c}
  #+END_SRC

I got the warning:

    The file MyGraph.pdf hasn’t been created from MyGraph.dot yet.
    Run ‘dot -Tpdf -o MyGraph.pdf MyGraph.dot’ to create it.
    Or invoke LATEX with the -shell-escape option to have this done     
    automatically.

Is it possible to add the commandline arguments in the file correctly? I would like the commandline arguments in the file for workflow reasons. Thank you.

Peter-TI
  • 91
  • 8
  • It looks to me that the :cmdline arg in the latex block did not get recognized. You might have to use a different method to pass `-shell-escape` to the latex invocation, probably `org-latex-pdf-process`. – NickD Apr 12 '17 at 15:42
  • Unfortunately it didn't work. I looked for other possebillities but I already lost too much time. I'll rather use emacs-yasnippets for workflow and reuseability. – Peter-TI Apr 13 '17 at 08:26

0 Answers0