emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: TikZ to separate file (babel?) possible?
Date: Mon, 25 Oct 2010 13:58:41 -0500	[thread overview]
Message-ID: <AANLkTimXMNxUfgMdFQxw=1EAP2UuMrrZTg26uCdDkaCE@mail.gmail.com> (raw)
In-Reply-To: <87r5fet873.fsf@gmail.com>


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

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.


> This is possible by adding the following header argument to the code
> block which will evaluate the latex block when the export target is not
> latex and will just export the code when the target is latex.
>
>  :exports (if latexp "code" "results")
>

When trying C-c C-c after adding this, I get "Symbol's value as variable is
void: latexp" in the minibuffer.

Also, does this assist with my font issue? My main question is how to get
the document font to apply to my babel block. At present, the code shown
above for file_2.org is *perfect* in its behavior (I get a perfectly cropped
PDF of my diagram) except for it not being the right font. I just need to
know to set the font for the TikZ babel output.


Thanks for the assistance,
John


>
> Best -- Eric
>
> John Hendy <jw.hendy@gmail.com> writes:
>
> > Followup question. I have an existing diagram I had already exported to
> PDF
> > via LaTeX, taken a screenshot of, and used in a presentation. I tried the
> > same diagram with the new method and am having issues with the font. The
> > original org file is like this:
> >
> > *---( File_1.org -> embedded LaTeX )---*
> > #+latex_header: \usepackage{tikz}
> \usetikzlibrary{shapes,positioning,arrows}
> > #+latex_header: \usepackage[hmargin=2.5cm,vmargin=2.5cm]{geometry}
> > #+latex_header: \usepackage{lmodern}
> > #+latex_header: \renewcommand{\rmdefault}{cmss}
> >
> > * Section
> >
> > #+begin_latex
> >
> > +++ TikZ code is here +++
> >
> > #+end_latex
> >
> > *---( End File_1.org )---*
> >
> >
> > My file using this new method is like this:
> >
> > *---( File_2.org -> exports TikZ to separate PDF via babel/LaTeX )---*
> > #+latex_header: \usepackage{tikz}
> \usetikzlibrary{shapes,positioning,arrows}
> > #+latex_header: \usepackage[hmargin=2.5cm,vmargin=2.5cm]{geometry}
> > #+latex_header: \usepackage{lmodern}
> > #+latex_header: \renewcommand{\rmdefault}{cmss}
> >
> > * Section
> >
> > #+begin_src latex :file flow-chart.pdf :packages '(("" "tikz")) :border
> 1em
> >
> > +++ TikZ code is here +++
> >
> > #+end_src
> >
> > *---( End File_2.org )---*
> >
> >
> > In my first file, the entire font is latin modern (sans-serif). Header,
> > title, author, *and* all TikZ diagram text.
> >
> > In the second, only the header is (if I export the whole thing), but not
> the
> > text in my TikZ nodes. Why is the babel block ignoring the document font
> > setting?
> >
> >
> > Thanks,
> > John
> >
> >
> > On Sat, Oct 23, 2010 at 12:58 PM, John Hendy <jw.hendy@gmail.com> wrote:
> >
> >> Thanks, Eric F. Got the preview package going and this is *exactly* what
> I
> >> would have been looking for.
> >>
> >> Eric S: yes, ImageMagick will take care of the rest :)
> >>
> >>
> >> Thanks all!
> >> John
> >>
> >> On Fri, Oct 22, 2010 at 6:11 PM, Eric S Fraga <ucecesf@ucl.ac.uk>
> wrote:
> >>
> >>> On Fri, 22 Oct 2010 16:36:10 -0500, John Hendy <jw.hendy@gmail.com>
> >>> wrote:
> >>>
> >>> > This is fantastic. Honestly, I had no idea that one could use LaTeX
> with
> >>> > babel! This is just perfect. I was googling around for "export tikz
> pgf
> >>> jpg"
> >>> > and things like that with no luck. This will do perfectly.
> >>>
> >>> For completeness (and the mailing list archive), if you need to do
> >>> this directly in latex, you will want to use the minimal document
> >>> class and the preview package.  Check out examples on the tikz
> >>> examples web site [1].  The preview package is what babel uses.
> >>>
> >>> Footnotes:
> >>> [1]  http://www.texample.net/tikz/examples/
> >>>
> >>>
> >>> --
> >>> Eric S Fraga
> >>> GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
> >>>
> >>>
> >>
>

[-- Attachment #1.2: Type: text/html, Size: 5724 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-25 19:03 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 [this message]
2010-10-26  8:17               ` Eric S Fraga
2010-10-26 14:34                 ` John Hendy
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='AANLkTimXMNxUfgMdFQxw=1EAP2UuMrrZTg26uCdDkaCE@mail.gmail.com' \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.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).