From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: [patch] two bugs: one with comments and with exporting inline tasks Date: Thu, 04 Nov 2010 17:32:10 +0100 Message-ID: <80y6993vao.fsf@mundaneum.com> References: <87iq0gknpg.fsf@pinto.chemeng.ucl.ac.uk> <87pqunv83v.wl%n.goaziou@gmail.com> <87iq0fla93.fsf@ucl.ac.uk> <8739rjl3s6.fsf@ucl.ac.uk> <87mxppcz8r.wl%n.goaziou@gmail.com> <87lj59cyrz.wl%n.goaziou@gmail.com> <87k4ktcyax.wl%n.goaziou@gmail.com> <878w19gzdq.fsf@ucl.ac.uk> <87iq0dchfm.wl%n.goaziou@gmail.com> <87wrotgoer.fsf@ucl.ac.uk> <87hbfxcfq2.wl%n.goaziou@gmail.com> <878w19azbv.fsf@ucl.ac.uk> <87eib1cdm4.wl%n.goaziou@gmail.com> <87vd4d9i7r.fsf@ucl.ac.uk> 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 Eric, Eric S Fraga wrote: > In terms of what to actually do with inline tasks on export, what I would > love to see would be to have an inline task converted to a footnote with a > marginpar note, along the lines of: > > #+begin_src org > ***************************** TODO figure out why this doesn't work > Some text in the body of the inline task. > ***************************** END > #+end_src > > being converted to, say: > > #+begin_src latex > \footnote{\textbf{<>}: <>}\marginpar{\fbox{\the= footnote}} > #+end_src > > i.e. where <> would be replaced by "TODO figure out why th= is > doesn't work" and <> by all the text between the ****** lines. > This is roughly the type of construct I use when I annotate latex documen= ts > directly. What do you think? ... that we need this. > We could make this a two argument latex function: > > #+begin_src latex > \newcommand{\processinlinetask}[2]{% > \footnote{\textbf{#1}: #2}\marginpar{\fbox{\thefootnote}}% > } > #+end_src > > which is defined in the org latex preamble and which a user could > customise through =3D\renewcommand=3D if desired (or through an org emacs > variable, of course). It would be invoked as > > #+begin_src latex > \processinlinetask{<>}{<>} > #+end_src > > We'd have to escape {}s maybe and it could be > somewhat fragile if there are multiple paragraphs in the inline body > text... > > For HTML, you could convert to end notes maybe or some type of box > inline with the text... (well, customisable by the user through CSS I > guess) > > Thanks, > eric In exactly the same line of sight, I'm using the following already for (pur= e) LaTeX -- I mean, not yet integrated within Org --: #+begin_src latex % must be loaded after url and hyperref \RequirePackage[colorinlistoftodos]{todonotes}% (not in medium TeX Live ins= tallation) \renewcommand{\@todonotes@backgroundcolor}{my-color-brand} \renewcommand{\@todonotes@linecolor}{my-color-brand} \newcounter{mycomment} \newcommand{\mycomment}[2][]{% initials of the author + note in the margin \if@mycomment \refstepcounter{mycomment} {\setstretch{0.7}% spacing \todo[color=3D{red!100!green!33},size=3D\small]{% \textbf{Comment [\uppercase{#1}\themycomment]:}~#2}} \else \relax \fi } \newcommand{\mytodo}[2][]{% title in bold + note \refstepcounter{mycomment} {\todo[inline,color=3Dblue!20]{ \textbf{TODO [\uppercase{#1}\themycomment]:}~#2}}} #+end_src This is using the package =3Dtodonotes=3D which is, euh, excellent! Just h= ave a look, and you see that, with the above chunk of code, we can easily manage: - mycomment :: margin notes (more for a comment, IMHO) and - mytodo :: inlined notes (more for "inline tasks", IMHO). Of course, this should now be automagically used by Org, as you do explain above. 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