From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: Composing letters using Org mode and the LaTeX isodoc class Date: Tue, 07 Sep 2010 18:56:05 -0600 Message-ID: <87iq2huk7u.fsf@gmail.com> References: <87zkvtn5u7.fsf@mundaneum.com> <81wrqxv1bq.fsf@gmail.com> <87r5h5gwxo.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=55471 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ot8xQ-0004zH-7U for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 20:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ot8xO-0006NQ-QN for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 20:56:12 -0400 Received: from mail-pv0-f169.google.com ([74.125.83.169]:58569) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ot8xO-0006NF-DY for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 20:56:10 -0400 Received: by pvc30 with SMTP id 30so3901540pvc.0 for ; Tue, 07 Sep 2010 17:56:09 -0700 (PDT) In-Reply-To: <87r5h5gwxo.fsf@mundaneum.com> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Tue, 07 Sep 2010 21:45:07 +0200") 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@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org Hi, I'll try to answer some of the Babel related portions of this discussion below. I look forward to any potential org->letter export this line of investigation yields. Best -- Eric S=C3=A9bastien Vauban writes: > Hi Jambunathan, > > Jambunathan K wrote: [...] >> I would like to hear why you chose to go down the tangling path. > > For two reasons: > > - 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. > > - 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 "=C3=A0 la Noweb". Hence, I really need at least the body to be in r= eal Org > plain code, and be automatically converted to LaTeX, so that I can make u= se of > the tables, and all the Org markup. > > I'm sure Babel is able of that, mixing raw code with convertable code. Ju= st > needs more thinking. > I've just implemented export of org code blocks to ascii, latex or html, so the following should now (if I understood) allow the tangling behavior you've described --8<---------------cut here---------------start------------->8--- ** 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--- tangles to --8<---------------cut here---------------start------------->8--- " \begin{itemize} \item two \item three \end{itemize} " --8<---------------cut here---------------end--------------->8--- 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. > > >> Personally I feel any sort of markup (this includes babel directives) >> distracting. > > They're much less distracting as soon as they're properly highlighted. > Question of color-theme. I can provide you (all) with mine, if you're > interested. > > >> Btw, your approach set me thinking. I think there is a strong case for >> making headlines act as babel srcnames with their body providing content= for >> noweb expansion [3]. This behaviour could be controlled by a buffer local >> variable. > > That would definitely make sense to me, at least for this particular need. > But, maybe, there is already a parallel way to do such a thing... > > >> Wondering how babel treats srcnames? Can there be spaces? Is upper and l= ower >> cases treated one and the same ... > Spaces are now allowed, I'm honestly not sure that it will successfully distinguish between upper and lower cases in code block names (all of mine are lower-case), but either way I'd say it's poor style to rely on case to distinguish between different code blocks. Best -- Eric > > Being a (tiny) part-time Babel user, I wish I could easily answer such > questions. But, as I always try to take as less risks as possible, these = are > things I never really looked at. > > >> Footnotes:=20 >> [3] It is likely the body of the headline might be run through a custom >> renderer (say latex, html or even emac's own comment-region) before >> finding it's way in to the document generated by tangle. >> >> Thanks once again for referring me to isodoc. > > "When someone shares something of value with you and you benefit from it,= you > have a moral obligation to share it with others." -- Chinese proverb > > I've been as well referred to this excellent package by a friend. Hence, = I do > what I have to do... > > I now would be pleased to hear what others think, and eventually can do a= long > this line! > > Best regards, > Seb