emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Best diagram, image software?


From: John Hendy
Subject: Re: [O] Best diagram, image software?
Date: Thu, 6 Oct 2016 15:15:47 -0500

On Thu, Oct 6, 2016 at 2:49 PM, Peter Davis <address@hidden> wrote:
>
> On Thu, Oct 6, 2016, at 03:25 PM, Clément Pit--Claudel wrote:
>> On 2016-10-06 15:10, Peter Davis wrote:
>> >> > (add-to-list 'org-latex-packages-alist
>> >> >              '(("AUTO" "inputenc" t)
>> >> >                ("" "color" t)
>> >> >                ("" "minted" t)
>> >> >                ("" "parskip" t)
>> >> >                ("" "tikz" t)))
>>

Maybe I'm dense, but why is everyone recommending changing the alist?
Granted, for future proofing and convenience this is nice... but I do
a fair amount with TikZ and have never done this.

~/org/aux/setupfile.org contains:
#+latex_header: \usepackage{tikz}
#+latex_header: \usepackage[siunitx]{circuitikz}
#+latex_header: \usetikzlibrary{shapes, positioning}

any given .org file contains:
#+setupfile: "~/org/aux/setupfile.org"

I modified your original aim like so, ditching the .png output which
looks like requires imagemagick. Maybe that's in org somehow, but when
you're just starting out I'd suggest eliminating as many other
mechanisms as possible. TikZ is in LaTeX, so just stick to pdf at the
start. This works for me.

#+latex_header: \usepackage{tikz}
#+latex_header: \usetikzlibrary{shapes, positioning}

* test

#+begin_src latex :results raw
% Define block styles
\usetikzlibrary{shapes,arrows}
\tikzstyle{astate} = [circle, draw, text centered, font=\footnotesize,
fill=blue!25]
\tikzstyle{rstate} = [circle, draw, text centered, font=\footnotesize,
fill=red!25]

\begin{tikzpicture}[->,>=stealth', shorten >=1pt, auto, node
distance=2.8cm, semithick]
\node [astate] (1) at (0,0) {1};
\node [astate] (2) at (1,0) {2};
\node [rstate] (3) at (2,0) {3};
\path (1) edge [bend left] node {b} (2)
(2) edge node {b} (3)
(2) edge [bend left] node {a} (1)
(3) edge [loop above] node {(a, b)} (3);
\end{tikzpicture}

#+end_src



John

>> This looks wrong.  You're adding a single list to
>> org-latex-package-alist, instead of adding multiple elements one-by-one.
>>
>
> Ok, I tried changing it to:
>
> (add-to-list 'org-latex-packages-alist '("AUTO" "inputenc" t))
> (add-to-list 'org-latex-packages-alist '("" "color" t))
> (add-to-list 'org-latex-packages-alist '("" "minted" t))
> (add-to-list 'org-latex-packages-alist '("" "parskip" t))
> (add-to-list 'org-latex-packages-alist '("" "tikz"))
> (add-to-list 'org-latex-packages-alist '("" "listingsutf8"))
>
> so now org-latex-packages-alist has the value
>
> (("" "listingsutf8")
>  ("" "tikz")
>  ("" "parskip" t)
>  ("" "minted" t)
>  ("" "color" t)
>  ("AUTO" "inputenc" t))
>
> Still getting the failure on tikz output.
>
> Thanks!
> -pd
>
> --
>   Peter Davis
>   www.techcurmudgeon.com
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]