* [Babel] The first line of the code blocks disappears in the tangled file
@ 2010-12-08 12:46 Sébastien Vauban
2010-12-08 14:24 ` Chris Malone
0 siblings, 1 reply; 4+ messages in thread
From: Sébastien Vauban @ 2010-12-08 12:46 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
#+TITLE: Isodoc letter (to be tangled to LaTeX file)
#+DATE: 2010-12-08
#+LANGUAGE: fr_FR
Right now, this letter *must be tangled* and post-processed via =PDFLaTeX=. It
can't be exported directly to PDF/HTML (=args out of range= error).
The problem I'm reporting here is visible *in the tangled file* (TeX). So, to
reproduce it, just do =C-c C-v C-t= on this file, and look at the tangled one.
* To
#+begin_src csv :tangle addresses.csv
FirstName,LastName,Address,PostCode,Town
Anybody,Kind Enough,to look,at,this
#+end_src
* Subject
#+srcname: subject
#+begin_src org :results latex
This is my subject line
#+end_src
* Opening
#+srcname: opening
#+begin_src org :results latex
Dear,
#+end_src
* Body
#+srcname: body
#+begin_src org :results latex
This example was working for me in the past but is having problems now (at
least, on my new Windows machine -- after the Ubuntu one died): the first line
of every block of text is simply eaten when being tangled.
The second paragraph does not exhibit any particular trouble, so it really is
the first line of every code block. Notice, *in the TeX tangled file*, that:
- the one-liner subject becomes void
- the one-liner opening becomes void
- the body looses its first line
- the one-liner closing becomes void
#+end_src
* Closing
#+srcname: closing
#+begin_src org :results latex
Can you reproduce this?
#+end_src
* Letter composition
#+begin_src latex :noweb yes :tangle yes
\documentclass[11pt]{isodoc}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{datatool}
\DTLloaddb{addresses}{addresses.csv}
\usepackage[scorpios]{isodoc-style}
\setupdocument{
subject = {%
<<subject()>>},
opening = {%
<<opening()>>},
closing = {%
<<closing()>>}
}
\begin{document}
\DTLforeach{addresses}{%
\firstname=FirstName,%
\lastname=LastName,%
\addressi=Address,%
\postcode=PostCode,%
\town=Town%
}{%
\letter[to={\firstname~\lastname\\\addressi\\\postcode~\town}]{%
<<body()>>
}}
\end{document}
#+end_src
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Babel] The first line of the code blocks disappears in the tangled file
2010-12-08 12:46 [Babel] The first line of the code blocks disappears in the tangled file Sébastien Vauban
@ 2010-12-08 14:24 ` Chris Malone
2010-12-13 20:23 ` Eric Schulte
0 siblings, 1 reply; 4+ messages in thread
From: Chris Malone @ 2010-12-08 14:24 UTC (permalink / raw)
To: Sébastien Vauban; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 2894 bytes --]
Hi Seb,
I can't say that I understand the problem, but I can reproduce it - any line
right after the #+begin_src org :results latex is being stripped upon
tangle. Not sure if it helps or not, but I'm using org-mode version 7.3
=release_7.3.89.g97f4c.dirty= with emacs 22.2.1.
Chris
2010/12/8 Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>
> #+TITLE: Isodoc letter (to be tangled to LaTeX file)
> #+DATE: 2010-12-08
> #+LANGUAGE: fr_FR
>
> Right now, this letter *must be tangled* and post-processed via =PDFLaTeX=.
> It
> can't be exported directly to PDF/HTML (=args out of range= error).
>
> The problem I'm reporting here is visible *in the tangled file* (TeX). So,
> to
> reproduce it, just do =C-c C-v C-t= on this file, and look at the tangled
> one.
>
> * To
> #+begin_src csv :tangle addresses.csv
> FirstName,LastName,Address,PostCode,Town
> Anybody,Kind Enough,to look,at,this
> #+end_src
>
> * Subject
> #+srcname: subject
> #+begin_src org :results latex
> This is my subject line
> #+end_src
>
> * Opening
> #+srcname: opening
> #+begin_src org :results latex
> Dear,
> #+end_src
>
> * Body
> #+srcname: body
> #+begin_src org :results latex
> This example was working for me in the past but is having problems now (at
> least, on my new Windows machine -- after the Ubuntu one died): the first
> line
> of every block of text is simply eaten when being tangled.
>
> The second paragraph does not exhibit any particular trouble, so it really
> is
> the first line of every code block. Notice, *in the TeX tangled file*,
> that:
>
> - the one-liner subject becomes void
> - the one-liner opening becomes void
> - the body looses its first line
> - the one-liner closing becomes void
> #+end_src
>
> * Closing
> #+srcname: closing
> #+begin_src org :results latex
> Can you reproduce this?
> #+end_src
>
> * Letter composition
> #+begin_src latex :noweb yes :tangle yes
> \documentclass[11pt]{isodoc}
> \usepackage[utf8x]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage{datatool}
> \DTLloaddb{addresses}{addresses.csv}
>
> \usepackage[scorpios]{isodoc-style}
>
> \setupdocument{
> subject = {%
> <<subject()>>},
> opening = {%
> <<opening()>>},
> closing = {%
> <<closing()>>}
> }
>
> \begin{document}
> \DTLforeach{addresses}{%
> \firstname=FirstName,%
> \lastname=LastName,%
> \addressi=Address,%
> \postcode=PostCode,%
> \town=Town%
> }{%
> \letter[to={\firstname~\lastname\\\addressi\\\postcode~\town}]{%
> <<body()>>
> }}
> \end{document}
> #+end_src
>
> Best regards,
> Seb
>
> --
> Sébastien Vauban
>
>
> _______________________________________________
> 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
>
[-- Attachment #1.2: Type: text/html, Size: 3554 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Babel] The first line of the code blocks disappears in the tangled file
2010-12-08 14:24 ` Chris Malone
@ 2010-12-13 20:23 ` Eric Schulte
2010-12-16 13:05 ` Sébastien Vauban
0 siblings, 1 reply; 4+ messages in thread
From: Eric Schulte @ 2010-12-13 20:23 UTC (permalink / raw)
To: Chris Malone; +Cc: Sébastien Vauban, emacs-orgmode
I am able to reproduce this error when evaluating a latex code block, so
for example
#+begin_src org :results latex :results replace
,- eric
,- schulte
#+end_src
#+results:
#+BEGIN_LaTeX
\begin{itemize}
\item schulte
\end{itemize}
#+END_LaTeX
This is due to the fact that org mode code blocks in the presence of
":results latex" or ":results html" will actually convert their contents
to the requested language using Org-mode's export mechanism. I believe
that in this case the latex exporter wants the first line of the code
block to be used as a title. I've just pushed up a patch which pads the
first line of org-mode code blocks with an empty title during latex
export.
Best -- Eric
Chris Malone <chris.m.malone@gmail.com> writes:
> Hi Seb,
>
> I can't say that I understand the problem, but I can reproduce it - any line right after the #+begin_src org :results latex is being
> stripped upon tangle.? Not sure if it helps or not, but I'm using org-mode version 7.3 =release_7.3.89.g97f4c.dirty= with emacs
> 22.2.1.
>
> Chris
>
> 2010/12/8 S?bastien Vauban <wxhgmqzgwmuf@spammotel.com>
>
> #+TITLE: ? ? Isodoc letter (to be tangled to LaTeX file)
> #+DATE: ? ? ?2010-12-08
> #+LANGUAGE: ?fr_FR
>
> Right now, this letter *must be tangled* and post-processed via =PDFLaTeX=. It
> can't be exported directly to PDF/HTML (=args out of range= error).
>
> The problem I'm reporting here is visible *in the tangled file* (TeX). So, to
> reproduce it, just do =C-c C-v C-t= on this file, and look at the tangled one.
>
> * To
>
> #+begin_src csv :tangle addresses.csv<br>
> FirstName,LastName,Address,PostCode,Town<br>
> Anybody,Kind Enough,to look,at,this<br>
> #+end_src<br>
>
> * Subject
> #+srcname: subject
>
> #+begin_src org :results latex<br>
> This is my subject line<br>
> #+end_src<br>
>
> * Opening
> #+srcname: opening
>
> #+begin_src org :results latex<br>
> Dear,<br>
> #+end_src<br>
>
> * Body
> #+srcname: body
>
> #+begin_src org :results latex<br>
> This example was working for me in the past but is having problems now (at<br>
> least, on my new Windows machine -- after the Ubuntu one died): the first line<br>
> of every block of text is simply eaten when being tangled.<br>
> <br>
> The second paragraph does not exhibit any particular trouble, so it really is<br>
> the first line of every code block. Notice, *in the TeX tangled file*, that:<br>
> <br>
> - the one-liner subject becomes void<br>
> - the one-liner opening becomes void<br>
> - the body looses its first line<br>
> - the one-liner closing becomes void<br>
> #+end_src<br>
>
> * Closing
> #+srcname: closing
>
> #+begin_src org :results latex<br>
> Can you reproduce this?<br>
> #+end_src<br>
>
> * Letter composition
>
> #+begin_src latex :noweb yes :tangle yes<br>
> \documentclass[11pt]{isodoc}<br>
> \usepackage[utf8x]{inputenc}<br>
> \usepackage[T1]{fontenc}<br>
> \usepackage{datatool}<br>
> \DTLloaddb{addresses}{addresses.csv}<br>
> <br>
> \usepackage[scorpios]{isodoc-style}<br>
> <br>
> \setupdocument{<br>
> subject = {%<br>
> <<subject()>>},<br>
> opening = {%<br>
> <<opening()>>},<br>
> closing = {%<br>
> <<closing()>>}<br>
> }<br>
> <br>
> \begin{document}<br>
> \DTLforeach{addresses}{%<br>
> \firstname=FirstName,%<br>
> \lastname=LastName,%<br>
> \addressi=Address,%<br>
> \postcode=PostCode,%<br>
> \town=Town%<br>
> }{%<br>
> \letter[to={\firstname~\lastname\\\addressi\\\postcode~\town}]{%<br>
> <<body()>><br>
> }}<br>
> \end{document}<br>
> #+end_src<br>
>
> Best regards,
> ?Seb
>
> --
> S?bastien Vauban
>
> _______________________________________________
> 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
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Babel] The first line of the code blocks disappears in the tangled file
2010-12-13 20:23 ` Eric Schulte
@ 2010-12-16 13:05 ` Sébastien Vauban
0 siblings, 0 replies; 4+ messages in thread
From: Sébastien Vauban @ 2010-12-16 13:05 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Eric,
"Eric Schulte" wrote:
> This is due to the fact that org mode code blocks in the presence of
> ":results latex" or ":results html" will actually convert their contents to
> the requested language using Org-mode's export mechanism. I believe that in
> this case the latex exporter wants the first line of the code block to be
> used as a title. I've just pushed up a patch which pads the first line of
> org-mode code blocks with an empty title during latex export.
TESTED -> FIXED -> CLOSED
Thanks!
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-16 13:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-08 12:46 [Babel] The first line of the code blocks disappears in the tangled file Sébastien Vauban
2010-12-08 14:24 ` Chris Malone
2010-12-13 20:23 ` Eric Schulte
2010-12-16 13:05 ` Sébastien Vauban
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.