emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Positioning Latex diagram on PDF output
@ 2009-08-08 18:29 Graham Smith
  2009-08-08 20:05 ` Leo
  0 siblings, 1 reply; 7+ messages in thread
From: Graham Smith @ 2009-08-08 18:29 UTC (permalink / raw)
  To: emacs-orgmode

I am experimenting with a TiKZ/pgf mindmap in orgmode.  Although it
looks as if it should fit on the (A4) PDF page, it is offset to the
right and cut off, even though there seems to plenty of room on the
page to left of the diagram.

The code is just the example from the manual, which I have modified a
bit, and is shown below.

Is there some way of moving it across to the left a bit, so it will
fit on the page?

Many thanks,

Graham

\begin{tikzpicture}
  \path[mindmap,concept color=black,text=white]
    node[concept] {Ecological Impact Assessment}
    [clockwise from=0]
    child[concept color=green!50!black] {
      node[concept] {Ecology}
      [clockwise from=90]
      child { node[concept] {theory} }
      child { node[concept] {field skills} }
      child { node[concept] {methods} }
      child { node[concept] {software engineer\-ing} }
    }
    child[concept color=blue] {
      node[concept] {Legislation}
      [clockwise from=-30]
      child { node[concept] {EIA} }
      child { node[concept] {Policy and Planning} }
    }
    child[concept color=red] {
      node[concept] {Data Analysis}
      [clockwise from=-30]
      child{node[concept]{Statistics}}
      child{node[concept]{GIS}}
      child{node[concept]{Decision Science}}
    }
    child[concept color=orange] {
      node[concept] {Professional Practice}
      [clockwise from=-75]
      child{node[concept]{Business skills}}
      child{node[concept]{Presentation skills}}
      child{node[concept]{EcIA best practice}}
      };
\end{tikzpicture}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Positioning Latex diagram on PDF output
  2009-08-08 18:29 Positioning Latex diagram on PDF output Graham Smith
@ 2009-08-08 20:05 ` Leo
  2009-08-08 21:14   ` Graham Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Leo @ 2009-08-08 20:05 UTC (permalink / raw)
  To: emacs-orgmode

On 2009-08-08 19:29 +0100, Graham Smith wrote:
> I am experimenting with a TiKZ/pgf mindmap in orgmode.  Although it
> looks as if it should fit on the (A4) PDF page, it is offset to the
> right and cut off, even though there seems to plenty of room on the
> page to left of the diagram.

I think this is due to the geometry of your document. There's a left
margin that pushes the tikz picture to the right.

> The code is just the example from the manual, which I have modified a
> bit, and is shown below.
> 
> Is there some way of moving it across to the left a bit, so it will
> fit on the page?

You can use the preview package to trim the output so that it leaves,
for example, 1pt on all sides of the tikz pictures. Here is a compilable
example.

%% ================================
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{1pt}

\begin{document}
\begin{tikzpicture}
  \path[mindmap,concept color=black,text=white]
    node[concept] {Ecological Impact Assessment}
    [clockwise from=0]
    child[concept color=green!50!black] {
      node[concept] {Ecology}
      [clockwise from=90]
      child { node[concept] {theory} }
      child { node[concept] {field skills} }
      child { node[concept] {methods} }
      child { node[concept] {software engineer\-ing} }
    }
    child[concept color=blue] {
      node[concept] {Legislation}
      [clockwise from=-30]
      child { node[concept] {EIA} }
      child { node[concept] {Policy and Planning} }
    }
    child[concept color=red] {
      node[concept] {Data Analysis}
      [clockwise from=-30]
      child{node[concept]{Statistics}}
      child{node[concept]{GIS}}
      child{node[concept]{Decision Science}}
    }
    child[concept color=orange] {
      node[concept] {Professional Practice}
      [clockwise from=-75]
      child{node[concept]{Business skills}}
      child{node[concept]{Presentation skills}}
      child{node[concept]{EcIA best practice}}
      };
\end{tikzpicture}
\end{document}

> Many thanks,
> 
> Graham

Are you developing a mindmap exporter for org? If so, I am very
interested ;)

Best,
Leo

-- 
Emacs uptime: 1 day, 3 hours, 44 minutes, 23 seconds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: Positioning Latex diagram on PDF output
  2009-08-08 20:05 ` Leo
@ 2009-08-08 21:14   ` Graham Smith
  2009-08-08 22:17     ` Leo
  0 siblings, 1 reply; 7+ messages in thread
From: Graham Smith @ 2009-08-08 21:14 UTC (permalink / raw)
  To: emacs-orgmode

leo

Thanks, this was useful, but...


> %% ================================
> \documentclass{article}
> \usepackage{tikz}
> \usetikzlibrary{mindmap}
> \usepackage[active,tightpage]{preview}
> \PreviewEnvironment{tikzpicture}
> \setlength\PreviewBorder{1pt}

Based on this I have altered the headers in orgmode to

#+LATEX_HEADER: \usepackage{tikz}
#+LATEX_HEADER: \usetikzlibrary{mindmap,trees}
#+LATEX_HEADER: \usepackage[active,tightpage]{preview}
#+LATEX_HEADER: \PreviewEnvironment{tikzpicture}
#+LATEX_HEADER: \setlength\PreviewBorder{20pt}

This has certainly solved the mindmap position problem, but now the
resultant pdf loses all the text from the original orgmode file. :-(

I assume I don't need to add the document class line?

Graham

P.S. I'm not working on a Mindmap exporter just trying some pgf graphics.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Positioning Latex diagram on PDF output
  2009-08-08 21:14   ` Graham Smith
@ 2009-08-08 22:17     ` Leo
  2009-08-09  7:33       ` Graham Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Leo @ 2009-08-08 22:17 UTC (permalink / raw)
  To: emacs-orgmode

On 2009-08-08 22:14 +0100, Graham Smith wrote:
> Based on this I have altered the headers in orgmode to
>
> #+LATEX_HEADER: \usepackage{tikz}
> #+LATEX_HEADER: \usetikzlibrary{mindmap,trees}
> #+LATEX_HEADER: \usepackage[active,tightpage]{preview}
> #+LATEX_HEADER: \PreviewEnvironment{tikzpicture}
> #+LATEX_HEADER: \setlength\PreviewBorder{20pt}
>
> This has certainly solved the mindmap position problem, but now the
> resultant pdf loses all the text from the original orgmode file. :-(
>
> I assume I don't need to add the document class line?

In that case, you can use geometry package or scale your tikz picture so
that it fits into the textwidth.

-- 
Emacs uptime: 1 day, 5 hours, 57 minutes, 35 seconds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: Positioning Latex diagram on PDF output
  2009-08-08 22:17     ` Leo
@ 2009-08-09  7:33       ` Graham Smith
  2009-08-09  9:58         ` Leo
  0 siblings, 1 reply; 7+ messages in thread
From: Graham Smith @ 2009-08-09  7:33 UTC (permalink / raw)
  To: emacs-orgmode

Leo,

Thanks again, it seems the answer lies in Latex, rather than OrgMode,
so I will work  away at that.

having said that, the commands you gave me are extremely useful for
making a stand alone diagram to insert as a graphic into some other
document. So well worth knowing.

Graham

2009/8/8 Leo <sdl.web@gmail.com>:
> On 2009-08-08 22:14 +0100, Graham Smith wrote:
>> Based on this I have altered the headers in orgmode to
>>
>> #+LATEX_HEADER: \usepackage{tikz}
>> #+LATEX_HEADER: \usetikzlibrary{mindmap,trees}
>> #+LATEX_HEADER: \usepackage[active,tightpage]{preview}
>> #+LATEX_HEADER: \PreviewEnvironment{tikzpicture}
>> #+LATEX_HEADER: \setlength\PreviewBorder{20pt}
>>
>> This has certainly solved the mindmap position problem, but now the
>> resultant pdf loses all the text from the original orgmode file. :-(
>>
>> I assume I don't need to add the document class line?
>
> In that case, you can use geometry package or scale your tikz picture so
> that it fits into the textwidth.
>
> --
> Emacs uptime: 1 day, 5 hours, 57 minutes, 35 seconds
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Positioning Latex diagram on PDF output
  2009-08-09  7:33       ` Graham Smith
@ 2009-08-09  9:58         ` Leo
  2009-08-10 12:11           ` Graham Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Leo @ 2009-08-09  9:58 UTC (permalink / raw)
  To: emacs-orgmode

On 2009-08-09 08:33 +0100, Graham Smith wrote:
> Leo,
>
> Thanks again, it seems the answer lies in Latex, rather than OrgMode,
> so I will work  away at that.
>
> having said that, the commands you gave me are extremely useful for
> making a stand alone diagram to insert as a graphic into some other
> document. So well worth knowing.

You're welcome, Graham.

Leo

-- 
Emacs uptime: 1 day, 17 hours, 41 minutes, 13 seconds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: Positioning Latex diagram on PDF output
  2009-08-09  9:58         ` Leo
@ 2009-08-10 12:11           ` Graham Smith
  0 siblings, 0 replies; 7+ messages in thread
From: Graham Smith @ 2009-08-10 12:11 UTC (permalink / raw)
  To: emacs-orgmode

leo

2009/8/9 Leo <sdl.web@gmail.com>:
> On 2009-08-09 08:33 +0100, Graham Smith wrote:
>> Leo,
>>
>> Thanks again, it seems the answer lies in Latex, rather than OrgMode,
>> so I will work  away at that.
>>
>> having said that, the commands you gave me are extremely useful for
>> making a stand alone diagram to insert as a graphic into some other
>> document. So well worth knowing.
>
> You're welcome, Graham.
>
> Leo

Just for completeness, and should anyone search the forum with a
similar problem,the answer lay in the wide margins used by default in
the article class, so new headers are:

#+LATEX_HEADER: \usepackage{tikz}
#+LATEX_HEADER: \usetikzlibrary{mindmap,trees}
#+LATEX_HEADER: \usepackage[a4paper, left=3cm,right=2cm]{geometry}

Plus you can scale the tikz drawing using

\begin{tikzpicture}[scale=0.85]

However, it doesn't scale very well and the different elements do not
scale proportionally, so while it works fine for a small tweak, it is
useless for the large changes.

Graham

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-08-10 12:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-08 18:29 Positioning Latex diagram on PDF output Graham Smith
2009-08-08 20:05 ` Leo
2009-08-08 21:14   ` Graham Smith
2009-08-08 22:17     ` Leo
2009-08-09  7:33       ` Graham Smith
2009-08-09  9:58         ` Leo
2009-08-10 12:11           ` Graham Smith

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).