From: Jambunathan K <kjambunathan@gmail.com>
To: Sebastien Vauban
<public-wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@plane.gmane.org>
Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org
Subject: Re: Custom latex environments using properties
Date: Tue, 30 Aug 2011 12:51:15 +0530 [thread overview]
Message-ID: <81r543cql0.fsf@gmail.com> (raw)
In-Reply-To: <8062lfxuhz.fsf@somewhere.org> (Sebastien Vauban's message of "Tue, 30 Aug 2011 08:51:04 +0200")
> But, the problem asked by Suvayu is different because the "todo" here is a
> macro, not an environment. Hence the expected output:
>
> \todo[inline]{\textbf{\textsf{\textsc{TODO} Provide your last offer.}}\\ }
>
> Except from working in such a fashion:
>
> #+LaTeX: \todo{
> ... your Org text
> is here
> inside ...
> #+LaTeX: }
>
> I don't see (currently) any other way to achieve what you'd like to
> get.
This use case suggests that a latex environment may not be always be
what the user wants and there could be cases where a macro might be the
most appropriate one.
I sure think the special block handler can be taught to surround the
special blocks with
\todo { } instead of \begin{todo} ... \end{todo}.
But the more general solution might be to have the user register
handlers (callbacks) for each of the special "named" blocks and have him
handle it from his end. This way he can sneak the custom arguments to
the macros (is that what you call it?) without mucking too much with
properties etc.
May be Suvayu can re-define the below hook and quickly prototype
something and record his experience in this thread..
--8<---------------cut here---------------start------------->8---
(defun org-special-blocks-convert-latex-special-cookies ()
"Converts the special cookies into LaTeX blocks."
(goto-char (point-min))
(while (re-search-forward "^ORG-\\([^ \t\n]*\\)[ \t]*\\(.*\\)-\\(START\\|END\\)$" nil t)
(replace-match
(if (equal (match-string 3) "START")
(concat "\\begin{" (match-string 1) "}" (match-string 2))
(concat "\\end{" (match-string 1) "}"))
t t)))
--8<---------------cut here---------------end--------------->8---
Jambunathnan K.
>
> Best regards,
> Seb
--
next prev parent reply other threads:[~2011-08-30 7:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-29 22:52 Custom latex environments using properties suvayu ali
2011-08-30 6:05 ` Jambunathan K
2011-08-30 6:51 ` Sebastien Vauban
2011-08-30 7:21 ` Jambunathan K [this message]
[not found] ` <CAMXnza2jN0A3a=uWRetZykQ_OtwjyR47VYC_s6tCcePUb3YHOg@mail.gmail.com>
2011-08-30 17:20 ` Jambunathan K
2011-08-30 18:07 ` Suvayu Ali
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=81r543cql0.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org \
--cc=public-wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@plane.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).