emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: Magnus Nilsson <magnus.nilsson@alumni.chalmers.se>,
	emacs-orgmode@gnu.org
Subject: Re: abstract in exported latex and html
Date: Sun, 31 Oct 2010 06:42:48 -1000	[thread overview]
Message-ID: <348D332D-B38C-49C0-906B-AA42BDD3E0E6@tsdye.com> (raw)
In-Reply-To: <A850CECF-5FD8-417D-9D9F-4DB9002D73EE@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1257 bytes --]


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 "<span style=\"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

[-- Attachment #1.2: Type: text/html, Size: 3226 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

  reply	other threads:[~2010-10-31 16:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-31  8:47 abstract in exported latex and html Magnus Nilsson
2010-10-31 15:41 ` Carsten Dominik
2010-10-31 16:42   ` Thomas S. Dye [this message]
2010-11-01 21:47     ` Christian Moe
2010-11-01 22:32       ` Thomas S. Dye
2010-11-02  4:45       ` Carsten Dominik
2010-11-02 11:22         ` Christian Moe
2010-11-02 12:21           ` Carsten Dominik
2010-11-02 16:15           ` Thomas S. Dye

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=348D332D-B38C-49C0-906B-AA42BDD3E0E6@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=magnus.nilsson@alumni.chalmers.se \
    /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).