emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: [Babel] The first line of the code blocks disappears in the tangled file
Date: Wed, 08 Dec 2010 13:46:11 +0100	[thread overview]
Message-ID: <8062v4l9f0.fsf@missioncriticalit.com> (raw)

#+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

             reply	other threads:[~2010-12-08 12:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 12:46 Sébastien Vauban [this message]
2010-12-08 14:24 ` [Babel] The first line of the code blocks disappears in the tangled file Chris Malone
2010-12-13 20:23   ` Eric Schulte
2010-12-16 13:05     ` Sébastien Vauban

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=8062v4l9f0.fsf@missioncriticalit.com \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).