From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: Composing letters using Org mode and the LaTeX isodoc class Date: Wed, 08 Sep 2010 13:45:23 +0200 Message-ID: <8762ygv4q4.fsf@mundaneum.com> References: <87zkvtn5u7.fsf@mundaneum.com> <81wrqxv1bq.fsf@gmail.com> <87r5h5gwxo.fsf@mundaneum.com> <87iq2huk7u.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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 co= de > 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 t= he >> LaTeX class demands. >> >> Though, it's not just copying, the way Babel actually does with snippets= of >> code "=C3=A0 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. J= ust >> 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 > " > <> > " > #+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 =3D:tangle "AA.tex"=3D for example (with and without quotes=C2=A0;-)). *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 =3D {% <>}, subject =3D {<>}, opening =3D {<>}, closing =3D {<>} } \begin{document} \letter{% <> } \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 " <> " #+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 --=20 S=C3=A9bastien 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