emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* LaTeX source block problems
@ 2013-01-25 13:42 Rainer M Krug
  2013-01-25 17:35 ` Thomas S. Dye
  0 siblings, 1 reply; 5+ messages in thread
From: Rainer M Krug @ 2013-01-25 13:42 UTC (permalink / raw)
  To: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I want ti include a gantt chart into my org document by using pgfgantt.

I use the following:

#+LATEX_HEADER: \usepackage{pgfgantt}

* The gantt chart I
#+BEGIN_src LaTeX
  \begin {ganttchart} [hgrid=true, vgrid=true]{36}
    \gantttitlelist {1,...,3}{12} \\
    \gantttitlelist {1,...,12}{1} \\

    \ganttgroup {Modelling (France)}{1}{36} \\
  \end {ganttchart}
#+END_src

* The gantt chart II
#+BEGIN_LaTeX
  \begin {ganttchart} [hgrid=true, vgrid=true]{36}
    \gantttitlelist {1,...,3}{12} \\
    \gantttitlelist {1,...,12}{1} \\

    \ganttgroup {Modelling (France)}{1}{36} \\
  \end {ganttchart}
#+END_LaTeX

Gantt I  produces
 - syntax highlighting
 - not exported to pdf as gantchart
 - editing in indirect buffer (C-')
 - no preview of the LaTeX fragment via C-c C-x C-l have dvipng installed).
 - C-c c results in "org-babel-execute-src-block: No org-babel-execute function for LaTeX!"

Gantt II produces
 - no syntax highlighting
 - exported as chart to pdf
 - no editing in indirect buffer
 - no preview of the LaTeX fragment
 - C-c c results in "user-error: C-c C-c can do nothing useful at this location"

Can I have a block in which I have the following:

 - syntax highlighting
 - editing in indirect buffer
 - preview of the result
 - export to pdf as gannt chart?

Thanks,

Rainer

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRAovbAAoJENvXNx4PUvmC46sIAIWYl/qSBDU9QICrUUcoaETo
SbX2i3TPjGsgHujYkyCj8/ZgPFFCriwGMqx2EpaWYEi1ZUN+zw1GeHLDbpDHl1MS
JisIxxfrrjTh6wxfCgyydt08KB2FwKkpfDjs6HDU+xW4iyU+TIbORMXCC6+8WEH2
P2UasHDaQlHFA/W+dGVsHcbOp4zSufOLXVCQxlkXeuC/rosAfbRpf6SSr0ZmkyBQ
6bUdqa6nIWsATGuQWXKk9iMZX+ehdbShwmOvNt1AAd9NYlHLIgLV7ZAGuzKwplGw
IUQlCXCbpca1LcFesLM9lr3RGslzqGtEnj7NF3csyOrId8Sg3a6tncvuHY/vyMY=
=sbWV
-----END PGP SIGNATURE-----

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

* Re: LaTeX source block problems
  2013-01-25 13:42 LaTeX source block problems Rainer M Krug
@ 2013-01-25 17:35 ` Thomas S. Dye
  2013-01-28  8:49   ` Rainer M Krug
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas S. Dye @ 2013-01-25 17:35 UTC (permalink / raw)
  To: Rainer; +Cc: emacs-orgmode

Hi Rainer,

Rainer M Krug <r.m.krug@gmail.com> writes:

>  - C-c c results in "org-babel-execute-src-block: No org-babel-execute function for LaTeX!"

Do you have something like this in .emacs?

(org-babel-do-load-languages
      'org-babel-load-languages
      '((latex . t)))

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: LaTeX source block problems
  2013-01-25 17:35 ` Thomas S. Dye
@ 2013-01-28  8:49   ` Rainer M Krug
       [not found]     ` <CA+M2ft_KF_XqgaVti-Acgd5QULxQC19YQTBcUtpxs+qHp3MzTw@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Rainer M Krug @ 2013-01-28  8:49 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Rainer, emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 25/01/13 18:35, Thomas S. Dye wrote:
> Hi Rainer,
> 
> Rainer M Krug <r.m.krug@gmail.com> writes:
> 
>> - C-c c results in "org-babel-execute-src-block: No org-babel-execute function for LaTeX!"
> 
> Do you have something like this in .emacs?
> 
> (org-babel-do-load-languages 'org-babel-load-languages '((latex . t)))

I have

  (require 'ob-latex)

which I remember reading somewhere is equivalent.

I also only have
  (require 'ob-R)

to enable language execution and R works.

Rainer

> 
> hth, Tom
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRBjuuAAoJENvXNx4PUvmC76kIAJHjI9IODCWT1MynK3k8qxbK
POWEywC6SeUR36tS+t2zEbY7VtqgjFhUQL7lyqfcAxEwjCsHrNDxFXyhGbkVZ6Ip
k4vpMJ4j7Uq0nvPM2h75wBspFhrJ5B0jDcKB0RaX8UXLwYIPmKzzkKa8OR2g/+Wa
DlXw15UezDP77THCiya8BFsbLYFACraWmjIZRUjsaeLlIikAzAf6audBaD4xpmAN
s3qVQN9D0/VjvhNNh4ZTiWEJRfG5e+YF6fnGTbHhApS9eR3iLWPajYRpsX1YdPk3
+qQSAcLBgdP79fTrksKL/+o0odbm+q52lNuq+vqdX2WrWeBDEI3Qp7ZdahpOSaY=
=zh9E
-----END PGP SIGNATURE-----

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

* Re: LaTeX source block problems
       [not found]     ` <CA+M2ft_KF_XqgaVti-Acgd5QULxQC19YQTBcUtpxs+qHp3MzTw@mail.gmail.com>
@ 2013-01-28 13:30       ` Rainer M Krug
  2013-01-28 14:13         ` SOLVED: " Rainer M Krug
  0 siblings, 1 reply; 5+ messages in thread
From: Rainer M Krug @ 2013-01-28 13:30 UTC (permalink / raw)
  To: John Hendy, emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28/01/13 14:10, John Hendy wrote:
> 
> On Jan 28, 2013 2:50 AM, "Rainer M Krug" <r.m.krug@gmail.com <mailto:r.m.krug@gmail.com>>
> wrote:
>> 
> On 25/01/13 18:35, Thomas S. Dye wrote:
>> Hi Rainer,
> 
>> Rainer M Krug <r.m.krug@gmail.com <mailto:r.m.krug@gmail.com>> writes:
> 
>>> - C-c c results in "org-babel-execute-src-block: No org-babel-execute function for LaTeX!"
> 
>> Do you have something like this in .emacs?
> 
>> (org-babel-do-load-languages 'org-babel-load-languages '((latex . t)))
> 
> I have
> 
> (require 'ob-latex)
> 
> 
>> This is the old style. Could you try re-defining your Babel setup according to the current 
>> manual/Worg instructions to see if that helps?

Ok - I have changed it, but still the same.

Rainer

> 
>> John
> 
> which I remember reading somewhere is equivalent.
> 
> I also only have (require 'ob-R)
> 
> to enable language execution and R works.
> 
> Rainer
> 
> 
>> hth, Tom
> 
> 
>> 
> 

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRBn18AAoJENvXNx4PUvmCmJUH/RnQvWLyIpb9cWcvtiayR9MU
UEoLrY8Szgtd+arYtJQCgYf19tNrT/MJDg7QI5/5DSDBml5WrDTWdyCMpbR1FOJN
47p/T6642BGMjUWwvDhncnWdFMWBhnrTDaAl7lWdXQe+Gz/3nJu+s+bTkbbhTz5t
AyME9G9AZlDgb8RNKoqgM+myzS2or6FrhKrnUa6dRoxwIeZePZ3SlnIwGmULvZyT
uw+j6nCImd3Je+6TaOsyzB/yMy7HJS0AEag+dqyUqCJ4ml8EUnWCu0W1QRD9g/Us
madMp+a+bgj46o1qZG7gFo23vgZMVyI6EB0+qDYOoPNX8YpxPEJLLoEvAniBiuk=
=X3Td
-----END PGP SIGNATURE-----

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

* SOLVED: LaTeX source block problems
  2013-01-28 13:30       ` Rainer M Krug
@ 2013-01-28 14:13         ` Rainer M Krug
  0 siblings, 0 replies; 5+ messages in thread
From: Rainer M Krug @ 2013-01-28 14:13 UTC (permalink / raw)
  To: Rainer; +Cc: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I solved it bu using the examples on
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html especially the tkz example.

So it looks no as follow:


* The gantt chart
#+header: :fit yes :noweb yes :headers '("\\usepackage{pgfgantt}")
#+BEGIN_SRC latex :exports results :file timeline.pdf
  \begin {ganttchart} [hgrid=true, %
     vgrid={ *{11}{blue, dotted}, *1{red} } %
     ]{36}
    \gantttitlelist {1,...,3}{12} \\
    \gantttitlelist
{1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12}{1} \\
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \ganttgroup [inline, group label inline anchor/.style=above right, group label shape
anchor=left] {Modelling}{1}{36} \\
  \end {ganttchart}
#+END_SRC


and C-c in latex gives me:

#+RESULTS:
#+BEGIN_LaTeX
[[file:timeline.pdf]]
#+END_LaTeX

Thanks,

Rainer




On 28/01/13 14:30, Rainer M Krug wrote:
> On 28/01/13 14:10, John Hendy wrote:
> 
>> On Jan 28, 2013 2:50 AM, "Rainer M Krug" <r.m.krug@gmail.com <mailto:r.m.krug@gmail.com>> 
>> wrote:
>>> 
>> On 25/01/13 18:35, Thomas S. Dye wrote:
>>> Hi Rainer,
> 
>>> Rainer M Krug <r.m.krug@gmail.com <mailto:r.m.krug@gmail.com>> writes:
> 
>>>> - C-c c results in "org-babel-execute-src-block: No org-babel-execute function for
>>>> LaTeX!"
> 
>>> Do you have something like this in .emacs?
> 
>>> (org-babel-do-load-languages 'org-babel-load-languages '((latex . t)))
> 
>> I have
> 
>> (require 'ob-latex)
> 
> 
>>> This is the old style. Could you try re-defining your Babel setup according to the current
>>>  manual/Worg instructions to see if that helps?
> 
> Ok - I have changed it, but still the same.
> 
> Rainer
> 
> 
>>> John
> 
>> which I remember reading somewhere is equivalent.
> 
>> I also only have (require 'ob-R)
> 
>> to enable language execution and R works.
> 
>> Rainer
> 
> 
>>> hth, Tom
> 
> 
>>> 
> 
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRBod6AAoJENvXNx4PUvmCJBgH/3i6vVVz1KmUCDDYz/ybuphR
mflp67kaaxzUs2yIacTruG2jP/5UpuaAUYN/Y88UwvWjANHb+B/B2QSFNwwaWcjN
+oco756zMmtfDlARQm/ZlIgpJSl522d5lufnGPCy0mtIHfFFfbdVmDyYmiRp56kO
aCEtJ6+7Gy1AYaAQAJHCmnnPIaBdSxWltifCMe+pEkVG5ZnMhMGv3iFCpF2kLikP
2s/gcDGIfzF0Ez1TI+Rj/n8c0+tSKsu0x69+kRmAR/0ksV+EC+D0lUZljwzSzvp9
ZPvMjxiVAjN3k5XwKjERzyM372/wL+1eLZT/of5ktYg7NoprxsYFrtrLiypKC20=
=bV2F
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2013-01-28 14:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25 13:42 LaTeX source block problems Rainer M Krug
2013-01-25 17:35 ` Thomas S. Dye
2013-01-28  8:49   ` Rainer M Krug
     [not found]     ` <CA+M2ft_KF_XqgaVti-Acgd5QULxQC19YQTBcUtpxs+qHp3MzTw@mail.gmail.com>
2013-01-28 13:30       ` Rainer M Krug
2013-01-28 14:13         ` SOLVED: " Rainer M Krug

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