emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: e.fraga@ucl.ac.uk
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: TikZ to separate file (babel?) possible?
Date: Tue, 26 Oct 2010 09:34:03 -0500	[thread overview]
Message-ID: <AANLkTimjQ3khus1ZyxyrtGXtxiehV5n3gfPgW0Q4ShHY@mail.gmail.com> (raw)
In-Reply-To: <87eibdz7tf.wl%ucecesf@ucl.ac.uk>


[-- Attachment #1.1: Type: text/plain, Size: 3110 bytes --]

On Tue, Oct 26, 2010 at 3:17 AM, Eric S Fraga <ucecesf@ucl.ac.uk> wrote:

> On Mon, 25 Oct 2010 13:58:41 -0500, John Hendy <jw.hendy@gmail.com> wrote:
> >
> > [1  <text/plain; ISO-8859-1 (7bit)>]
> >
> > [2  <text/html; ISO-8859-1 (quoted-printable)>]
> > On Mon, Oct 25, 2010 at 1:53 PM, Eric Schulte <schulte.eric@gmail.com>
> wrote:
> >
> >     Hi John,
> >
> >     In the case you describe I would export the *code* of the tikz latex
> >     block rather than the file resulting from evaluating the block.
> >
> > Code = raw LaTeX/TikZ code? If so, I don't really care about that. i just
> want the graphic.
>
> Yes but the point is that, if I understand the processes involved
> correctly, the export and babel routes each generate different latex
> code.  Babel does *not* look at the document wide settings whereas
> export does.  This is why Eric is suggesting you export the babel code
> so that it is interpreted by the latex document that results from
> exporting the whole org document.  Otherwise, make sure the settings
> you want are within the latex source code block?
>

That makes more sense, though if I export the code into the larger LaTeX
document, I'm left where I started, I believe. An 8.5x11 exported PDF with
my diagram in the middle of it.

If it's just getting the right code into the babel block, that's helpful to
know. Perhaps the easiest way to put it is this: what is the best path to
obtain the following:

- a single pdf output of my TikZ diagram, cropped to fit the diagram
- the font used in the TikZ diagram that I desire (preferably from the doc)

Again, my use-case is one in which I have daily notes or a paper with a
diagram but also would like to preserve the diagram for reuse. With babel,
it appears this should be possible -- I can both export normally and have
the graphic in the paper or send the TikZ section alone to export and use
the graphic in a presentation or elsewhere.

I wondered about what you said re. putting the settings in the latex source
code block, and I was actually fiddling around with that yesterday. My font
is simply set like so (present in the examples I posted earlier):

#+latex_header: \usepackage{lmodern}
#+latex_header: \renewcommand{\rmdefault}{cmss}

But I tried putting variations of this in the babel block (without the
#+latex_header part, of course) with no success.

These didn't work for me:

#+begin_src latex :file flow-chart.pdf :packages '(("" "tikz")) :border 1em
\usepackage{lmodern}
\renewcommand{\rmdefault}{cmss}

or

#+begin_src latex :file flow-chart.pdf :packages '(("" "tikz" "lmodern"))
:border 1em
\renewcommand{\rmdefault}{cmss}

or

#+begin_src latex :file flow-chart.pdf :packages '(("" "tikz lmodern"))
:border 1em
\renewcommand{\rmdefault}{cmss}

I haven't found anything at ob-doc-latex covering how to pass package
arguments or include LaTeX settings directly in the babel block. My attempts
at the renewcommand end up with "cmss" ending up in my TIkZ graphic
somewhere...


Thanks for persisting with me!
John





> --
> Eric S Fraga
> GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
>
>

[-- Attachment #1.2: Type: text/html, Size: 4859 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2010-10-26 14:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 20:13 TikZ to separate file (babel?) possible? John Hendy
2010-10-22 20:35 ` Erik Iverson
2010-10-22 21:25 ` Eric Schulte
2010-10-22 21:36   ` John Hendy
2010-10-22 23:11     ` Eric S Fraga
2010-10-23 17:58       ` John Hendy
2010-10-25 18:21         ` John Hendy
2010-10-25 18:53           ` Eric Schulte
2010-10-25 18:58             ` John Hendy
2010-10-26  8:17               ` Eric S Fraga
2010-10-26 14:34                 ` John Hendy [this message]
2010-10-26 21:34                   ` John Hendy
2010-10-26 23:01                     ` Eric Schulte
2010-10-28 21:43                       ` John Hendy
2010-10-28 21:52                         ` John Hendy

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=AANLkTimjQ3khus1ZyxyrtGXtxiehV5n3gfPgW0Q4ShHY@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /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).