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: Re: Composing letters using Org mode and the LaTeX isodoc class
Date: Wed, 08 Sep 2010 13:45:23 +0200	[thread overview]
Message-ID: <8762ygv4q4.fsf@mundaneum.com> (raw)
In-Reply-To: 87iq2huk7u.fsf@gmail.com

Hi Eric,

"Eric Schulte" wrote:
> I look forward to any potential org->letter export this line of
> investigation yields.

As soon as this is closed, I'm willing to write a Worg page for this.

>> - because I had not the hope of being able to configure the LaTeX export class
>>   and/or code in the right way,
>
> Hmm, I don't know how complex isodoc is to configure, but I'd think that
> defining a custom latex class would be simpler than tangling out LaTeX code
> blocks, however maybe this will change once I've looked at and understood an
> example application.

Isodoc is quite easy to configure, but it's through keyval mappings. I don't
know enough of Org to imagine being able to convert headings and contents to
keys and values, respectively...

That does not mean it really is difficult. Just for me, the only accessible
way remained the Babel route.


>> - because, in a way, that's quite logical. Here and there, you define
>>   stuff. At the end, you just arrange them all in a way that fits well the
>>   LaTeX class demands.
>>
>> Though, it's not just copying, the way Babel actually does with snippets of
>> code "à la Noweb". Hence, I really need at least the body to be in real Org
>> plain code, and be automatically converted to LaTeX, so that I can make use
>> of the tables, and all the Org markup.
>>
>> I'm sure Babel is able of that, mixing raw code with convertable code. Just
>> needs more thinking.
>
> I've just implemented export of org code blocks to ascii, latex or html,

This is brand new, right?  In any case, the real good solution to such a
problem, IMHO...


> so the following should now (if I understood) allow the tangling
> behavior you've described
>
> ** tangle org-mode block
> #+source: org-list
> #+begin_src org :results latex
>   - one
>   - two
>   - three
> #+end_src
>
> #+begin_src emacs-lisp :tangle yes :noweb yes
>   "
>   <<org-list()>>
>   "
> #+end_src
>
> tangles to
>
>
> "
> \begin{itemize}
> \item two
> \item three
> \end{itemize}
>
>
> "

Here, I just don't understand why you're choosing `emacs-lisp' as target
language for LaTeX code. Is there a reason for this, or just a typo?


> note that the () on the end of the code block name in the noweb syntax
> means to insert the results of evaluating the code block (in this case
> latex) rather than the body of the code block itself.

Understood!  Thanks.

FYI, I've git pulled once again 15 minutes ago (13:30 CET). My repo was
already up-to-date, but your code does not work for me...

_Nothing is tangled anymore_... Not even if I explicitly state
=:tangle "AA.tex"= for example (with and without quotes ;-)).

*Extract* of what should be tangled:

--8<---------------cut here---------------start------------->8---
* Letter
#+begin_src latex :noweb yes :tangle yes
\documentclass[11pt]{isodoc}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{isodoc-style}

\setupdocument{
    to = {%
          <<to()>>},
    subject = {<<subject()>>},
    opening = {<<opening()>>},
    closing = {<<closing()>>}
}

\begin{document}
\letter{%
<<body()>>
}
\end{document}
#+end_src

* tangle org-mode block

#+source: org-list
#+begin_src org :results latex
  - one
  - two
  - three
#+end_src

#+begin_src emacs-lisp :tangle yes :noweb yes
  "
  <<org-list()>>
  "
#+end_src
--8<---------------cut here---------------end--------------->8---

Side note: I now have "my" green background for Org code (as in
http://www.mygooglest.com/sva/highlight-whole-ines.png), but I've lost all
fontification of source code blocks...

Thanks again and again.

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

  parent reply	other threads:[~2010-09-08 11:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-07 11:36 Composing letters using Org mode and the LaTeX isodoc class Sébastien Vauban
2010-09-07 18:46 ` Jambunathan K
2010-09-07 19:45   ` Sébastien Vauban
2010-09-08  0:56     ` Eric Schulte
2010-09-08  1:52       ` Thomas S. Dye
2010-09-08  4:39       ` Jambunathan K
2010-09-08 11:48         ` Sébastien Vauban
2010-09-08 15:15         ` Eric Schulte
2010-09-08 16:22           ` [BABEL][PROPOSAL] headlines as executable srcnames Jambunathan K
2010-09-08 21:30             ` Sébastien Vauban
2010-09-09 15:38             ` Jambunathan K
2010-09-09 16:30               ` Jambunathan K
2010-09-10  4:51               ` Jambunathan K
2010-09-20  4:03                 ` Eric Schulte
2010-09-20  7:39                   ` Jambunathan K
2010-09-20  4:15             ` Eric Schulte
2010-09-08 11:45       ` Sébastien Vauban [this message]
2010-09-08 15:38         ` Re: Composing letters using Org mode and the LaTeX isodoc class Eric Schulte
2010-09-08 21:26           ` Sébastien Vauban
2010-09-10  8:51             ` Eric S Fraga
2010-09-10  9:13               ` 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=8762ygv4q4.fsf@mundaneum.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).