From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: abstract in exported latex and html Date: Sun, 31 Oct 2010 06:42:48 -1000 Message-ID: <348D332D-B38C-49C0-906B-AA42BDD3E0E6@tsdye.com> References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============0252217123==" Return-path: Received: from [140.186.70.92] (port=34941 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCaze-00074M-0w for emacs-orgmode@gnu.org; Sun, 31 Oct 2010 12:42:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PCazc-0007H2-P8 for emacs-orgmode@gnu.org; Sun, 31 Oct 2010 12:42:53 -0400 Received: from oproxy2-pub.bluehost.com ([67.222.39.60]:35676) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PCazc-0007Gv-IC for emacs-orgmode@gnu.org; Sun, 31 Oct 2010 12:42:52 -0400 In-Reply-To: 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: Carsten Dominik Cc: Magnus Nilsson , emacs-orgmode@gnu.org --===============0252217123== Content-Type: multipart/alternative; boundary=Apple-Mail-103-998523743 --Apple-Mail-103-998523743 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Oct 31, 2010, at 5:41 AM, Carsten Dominik wrote: > > On Oct 31, 2010, at 9:47 AM, Magnus Nilsson wrote: > >> Dear all, >> >> Is there a way to include an abstract that suits both LaTeX export >> and html export? >> >> I am thinking in lines of >> #+BEGIN_ABSTRACT: >> My abstract goes here >> #+END_ABSTRACT: >> and have it interpreted differently depending on the export used. > > No, not yet, but I believe this would be useful to have. Make a patch > and I will look at it favorably. > > Cheers > > - Carsten Aloha Magnus, Alternatively, you could use the existing link syntax for this kind of markup. See http://orgmode.org/worg/org-tutorials/org-latex-export.php#sec-12 For example you could define a link type latex-env in your .emacs: (org-add-link-type "latex-env" nil (lambda (path desc format) (cond ((eq format 'html) (format "%s" desc)) ((eq format 'latex) (format "\\begin{%s}%s\\end{%s}" path desc path))))) with this input [[latex-env:abstract][My abstract goes here.]], LaTeX export yields \begin[abstract} My abstract goes here. \end{abstract} You'd have to fiddle with the html part so that it suits your needs, but that might not be too hard. HTH, Tom --Apple-Mail-103-998523743 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
On Oct 31, 2010, = at 5:41 AM, Carsten Dominik wrote:


On = Oct 31, 2010, at 9:47 AM, Magnus Nilsson wrote:

Dear all,

Is there a way = to include an abstract that suits both LaTeX export and html = export?

I am thinking = in lines of
#+BEGIN_ABSTRACT:
= My abstract goes here
#+END_ABSTRACT:
and have it interpreted differently depending on the = export used.

No, not yet, but I believe this would = be useful to have. Make a patch
and I will look at it = favorably.

Cheers

- = Carsten

Aloha = Magnus,

Alternatively, you could use the existing link = syntax for this kind of markup.   See http://orgmode.org/worg/org-tutorials/org-latex-export.php#sec-12

For example you could define a link type latex-env = in your .emacs:
(org-add-link-type
  nil
 ("<span style=3D\"color:grey;\">%s</span>" =
desc))
    ((eq format 'latex)
     (format "\\begin{%s}%s\\end{%s}" path desc =
path)))))
with this input = [[latex-env:abstract][My abstract goes here.]], LaTeX export = yields 

\begin[abstract}
My = abstract goes = here.
\end{abstract} 

You'd have = to fiddle with the html part so that it suits your needs, but that might = not be too = hard.

HTH,
Tom
= --Apple-Mail-103-998523743-- --===============0252217123== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0252217123==--