emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <eric.schulte@gmx.com>
To: Sebastien Vauban <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [bug] Problem when tangling into LaTeX
Date: Mon, 30 Jan 2012 18:40:58 -0700	[thread overview]
Message-ID: <87aa54y7h1.fsf@gmx.com> (raw)
In-Reply-To: <80wr88zyv8.fsf@somewhere.org> (Sebastien Vauban's message of "Mon, 30 Jan 2012 22:03:55 +0100")

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

> #+TITLE:     Noweb references in LaTeX document
> #+DATE:      2012-01-30
>
> * Summary
>
> ** Problem
>
> I use 3 chunks of LaTeX code which I wanna insert in a LaTeX document.
>
> While 1 of them is correctly tangled into the LaTeX document, the 2 others
> generate errors when C-c C-v C-t'ing:
>
>     "if: reference '<<who' not found in this buffer"
>
> and, if I temporarily replace `<<who()>>' by `<<who>>', I get the next error:
>
>     "if: reference '    <<solde' not found in this buffer"
>
> What I don't understand is that there is no -- sorry, I mean: I don't see --
> the difference between the 3 noweb references. They all seem correctly
> written...
>
> ** Note
>
> Remember that, up to now, such a document *must be first tangled* and then
> post-processed via =PDFLaTeX=. It can not be exported directly to PDF/HTML (=args
> out of range= error).
>
> * Example
>
> ** Part 1
> #+name: who
> #+begin_src org :results latex
> 1111ToMe
> #+end_src
>
> ** Part 2
> #+name: before
> #+begin_src org :results latex
> 2222BeforeDate
> #+end_src
>
> ** Part 3
> #+name: solde
> #+begin_src org :results latex
> 3333Rest
> #+end_src
>
> ** Composed letter
> #+begin_src latex :noweb yes :tangle yes
> \documentclass{article}
> \usepackage[utf8x]{inputenc}
> \usepackage[T1]{fontenc}
>
> \begin{document}
>
> \begin{textblock}{85}(98,35)
> \titlebox{9.4cm}{Foo}{% HERE 1111 <<<<
> <<who()>>
> }
> \end{textblock}
>
> \begin{textblock}{110}(25,195)
>     Some sentence
>     <<before()>> \hfill{}% HERE 2222 <<<<
>     <<solde()>> EUR% HERE 3333 <<<<
> \end{textblock}
>
> \end{document}
> #+end_src
>
> Best regards,
>   Seb

Currently newlines are allowed in noweb reference names causing the
problems you noticed above.  I've just pushed up a change which
disallows newline characters in noweb references and fixes the odd
behavior you describe.

Best,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

  reply	other threads:[~2012-01-31  1:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 21:03 [bug] Problem when tangling into LaTeX Sebastien Vauban
2012-01-31  1:40 ` Eric Schulte [this message]
2012-01-31  8:11   ` Sebastien Vauban
2012-01-31 13:16     ` Eric S Fraga
2012-02-01 17:52       ` Sebastien Vauban
2012-02-01 17:54     ` Sebastien 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=87aa54y7h1.fsf@gmx.com \
    --to=eric.schulte@gmx.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wxhgmqzgwmuf@spammotel.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).