emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Peter Davis <pfd@pfdstudio.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Best diagram, image software?
Date: Thu, 6 Oct 2016 15:15:47 -0500	[thread overview]
Message-ID: <CA+M2ft8HM5vKpFUeZN0GNFu7DYAHM-5+Af=Hgw1HnV=qSEYsUA@mail.gmail.com> (raw)
In-Reply-To: <1475783345.3885031.748189065.2F10B3EC@webmail.messagingengine.com>

On Thu, Oct 6, 2016 at 2:49 PM, Peter Davis <pfd@pfdstudio.com> 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	other threads:[~2016-10-06 20:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04 13:11 Best diagram, image software? Lawrence Bottorff
2016-10-04 13:45 ` Rainer M Krug
2016-10-11 21:03   ` Eduardo Mercovich
2016-10-04 13:52 ` Fabrice Popineau
2016-10-04 13:54 ` Peter Davis
2016-10-04 15:12   ` David A. Gershman
2016-10-04 14:06 ` Russell Adams
2016-10-05 20:14 ` Jeremie Juste
2016-10-06 16:48   ` Peter Davis
2016-10-06 17:59     ` John Kitchin
2016-10-06 18:23       ` Peter Davis
2016-10-06 22:05         ` John Kitchin
2016-10-06 18:15     ` Nick Dokos
2016-10-06 18:26       ` Peter Davis
2016-10-06 18:59         ` Nick Dokos
2016-10-06 19:10           ` Peter Davis
2016-10-06 19:25             ` Clément Pit--Claudel
2016-10-06 19:49               ` Peter Davis
2016-10-06 20:15                 ` John Hendy [this message]
2016-10-06 20:15                 ` Peter Davis
2016-10-06 23:23                   ` John Kitchin
2016-10-06 19:32             ` Martin Schöön
2016-10-07  6:38     ` Robert Klein
     [not found] <c3be170e3fe74232a0a9f5d5ed3981f2@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-10-04 13:46 ` Eric S Fraga

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to='CA+M2ft8HM5vKpFUeZN0GNFu7DYAHM-5+Af=Hgw1HnV=qSEYsUA@mail.gmail.com' \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=pfd@pfdstudio.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).