emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* abstract in exported latex and html
@ 2010-10-31  8:47 Magnus Nilsson
  2010-10-31 15:41 ` Carsten Dominik
  0 siblings, 1 reply; 9+ messages in thread
From: Magnus Nilsson @ 2010-10-31  8:47 UTC (permalink / raw)
  To: emacs-orgmode


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

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.

Thanks

[-- Attachment #1.2: Type: text/html, Size: 295 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: abstract in exported latex and html
  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
  0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2010-10-31 15:41 UTC (permalink / raw)
  To: Magnus Nilsson; +Cc: emacs-orgmode


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: abstract in exported latex and html
  2010-10-31 15:41 ` Carsten Dominik
@ 2010-10-31 16:42   ` Thomas S. Dye
  2010-11-01 21:47     ` Christian Moe
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas S. Dye @ 2010-10-31 16:42 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Magnus Nilsson, emacs-orgmode


[-- 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: abstract in exported latex and html
  2010-10-31 16:42   ` Thomas S. Dye
@ 2010-11-01 21:47     ` Christian Moe
  2010-11-01 22:32       ` Thomas S. Dye
  2010-11-02  4:45       ` Carsten Dominik
  0 siblings, 2 replies; 9+ messages in thread
From: Christian Moe @ 2010-11-01 21:47 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Magnus Nilsson, emacs-orgmode, Carsten Dominik

Use org-special-blocks

>> 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.

If I'm not overlooking a hitch, you can do that now with the 
contributed package org-special-blocks. Just put

(require 'org-special-blocks)

in your .emacs.

The HTML abstract won't look like anything special until you style it, 
it will just be wrapped in a <div class="abstract"> element. Here are 
some sample style lines for your org document header (without line wraps):

#+STYLE: <style>.abstract {margin: 1em; padding: 1em; border: 1px 
solid black}
#+STYLE: .abstract:before {content: "ABSTRACT: ";}</style>

Thomas S. Dye wrote:
> 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

I'm all for using custom links to extend inline markup, but this is 
block-level, and thus handily extensible with org-special-blocks.

Cheers,
Christian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: abstract in exported latex and html
  2010-11-01 21:47     ` Christian Moe
@ 2010-11-01 22:32       ` Thomas S. Dye
  2010-11-02  4:45       ` Carsten Dominik
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas S. Dye @ 2010-11-01 22:32 UTC (permalink / raw)
  To: mail; +Cc: Magnus Nilsson, emacs-orgmode, Carsten Dominik


On Nov 1, 2010, at 11:47 AM, Christian Moe wrote:

> Use org-special-blocks
>
>>> 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.
>
> If I'm not overlooking a hitch, you can do that now with the  
> contributed package org-special-blocks. Just put
>
> (require 'org-special-blocks)
>
> in your .emacs.
>
> The HTML abstract won't look like anything special until you style  
> it, it will just be wrapped in a <div class="abstract"> element.  
> Here are some sample style lines for your org document header  
> (without line wraps):
>
> #+STYLE: <style>.abstract {margin: 1em; padding: 1em; border: 1px  
> solid black}
> #+STYLE: .abstract:before {content: "ABSTRACT: ";}</style>
>
> Thomas S. Dye wrote:
>> 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
>
> I'm all for using custom links to extend inline markup, but this is  
> block-level, and thus handily extensible with org-special-blocks.
>
> Cheers,
> Christian

Aloha Christian,

Thanks for pointing out org-special-blocks.  This will be very  
useful.  Looks perfect for the OP.

All the best,
Tom

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: abstract in exported latex and html
  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
  1 sibling, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2010-11-02  4:45 UTC (permalink / raw)
  To: mail; +Cc: Magnus Nilsson, emacs-orgmode

This is great and should be in the FAQ or another good place on Worg.

Thanks!

- Carsten

On Nov 1, 2010, at 10:47 PM, Christian Moe wrote:

> Use org-special-blocks
>
>>> 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.
>
> If I'm not overlooking a hitch, you can do that now with the  
> contributed package org-special-blocks. Just put
>
> (require 'org-special-blocks)
>
> in your .emacs.
>
> The HTML abstract won't look like anything special until you style  
> it, it will just be wrapped in a <div class="abstract"> element.  
> Here are some sample style lines for your org document header  
> (without line wraps):
>
> #+STYLE: <style>.abstract {margin: 1em; padding: 1em; border: 1px  
> solid black}
> #+STYLE: .abstract:before {content: "ABSTRACT: ";}</style>
>
> Thomas S. Dye wrote:
>> 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
>
> I'm all for using custom links to extend inline markup, but this is  
> block-level, and thus handily extensible with org-special-blocks.
>
> Cheers,
> Christian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: abstract in exported latex and html
  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
  0 siblings, 2 replies; 9+ messages in thread
From: Christian Moe @ 2010-11-02 11:22 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Magnus Nilsson, emacs-orgmode

Hi,

Written up, with an added note about org-exp-blocks, and pushed to:

http://orgmode.org/worg/org-faq.php#include-abstract-in-export-to-latex-and-html
http://orgmode.org/worg/org-tutorials/org-latex-export.php#sec-12

In the latter, BTW, I have also made a small change in the 
"semantic-markup" src block: the example now sets a class rather than 
style on HTML export, keeping it semantic. The debate on extensible 
markup solutions continues, I think, but I'm glad some people find the 
custom-link idea useful, in the interim at least.

Yours,
Christian


On 11/2/10 5:45 AM, Carsten Dominik wrote:
> This is great and should be in the FAQ or another good place on Worg.
>
> Thanks!
>
> - Carsten
>
> On Nov 1, 2010, at 10:47 PM, Christian Moe wrote:
>
>> Use org-special-blocks
>>
>>>> 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.
>>
>> If I'm not overlooking a hitch, you can do that now with the
>> contributed package org-special-blocks. Just put
>>
>> (require 'org-special-blocks)
>>
>> in your .emacs.
>>
>> The HTML abstract won't look like anything special until you style
>> it, it will just be wrapped in a <div class="abstract"> element.
>> Here are some sample style lines for your org document header
>> (without line wraps):
>>
>> #+STYLE: <style>.abstract {margin: 1em; padding: 1em; border: 1px
>> solid black}
>> #+STYLE: .abstract:before {content: "ABSTRACT: ";}</style>
>>
>> Thomas S. Dye wrote:
>>> 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
>>
>> I'm all for using custom links to extend inline markup, but this is
>> block-level, and thus handily extensible with org-special-blocks.
>>
>> Cheers,
>> Christian
>
>


-- 

Christian Moe
E-mail:  mail@christianmoe.com
Website: http://christianmoe.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: abstract in exported latex and html
  2010-11-02 11:22         ` Christian Moe
@ 2010-11-02 12:21           ` Carsten Dominik
  2010-11-02 16:15           ` Thomas S. Dye
  1 sibling, 0 replies; 9+ messages in thread
From: Carsten Dominik @ 2010-11-02 12:21 UTC (permalink / raw)
  To: mail; +Cc: Magnus Nilsson, emacs-orgmode

Hi Christian,

thank you very much!

- Carsten

On Nov 2, 2010, at 12:22 PM, Christian Moe wrote:

> Hi,
>
> Written up, with an added note about org-exp-blocks, and pushed to:
>
> http://orgmode.org/worg/org-faq.php#include-abstract-in-export-to-latex-and-html
> http://orgmode.org/worg/org-tutorials/org-latex-export.php#sec-12
>
> In the latter, BTW, I have also made a small change in the "semantic- 
> markup" src block: the example now sets a class rather than style on  
> HTML export, keeping it semantic. The debate on extensible markup  
> solutions continues, I think, but I'm glad some people find the  
> custom-link idea useful, in the interim at least.
>
> Yours,
> Christian
>
>
> On 11/2/10 5:45 AM, Carsten Dominik wrote:
>> This is great and should be in the FAQ or another good place on Worg.
>>
>> Thanks!
>>
>> - Carsten
>>
>> On Nov 1, 2010, at 10:47 PM, Christian Moe wrote:
>>
>>> Use org-special-blocks
>>>
>>>>> 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.
>>>
>>> If I'm not overlooking a hitch, you can do that now with the
>>> contributed package org-special-blocks. Just put
>>>
>>> (require 'org-special-blocks)
>>>
>>> in your .emacs.
>>>
>>> The HTML abstract won't look like anything special until you style
>>> it, it will just be wrapped in a <div class="abstract"> element.
>>> Here are some sample style lines for your org document header
>>> (without line wraps):
>>>
>>> #+STYLE: <style>.abstract {margin: 1em; padding: 1em; border: 1px
>>> solid black}
>>> #+STYLE: .abstract:before {content: "ABSTRACT: ";}</style>
>>>
>>> Thomas S. Dye wrote:
>>>> 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
>>>
>>> I'm all for using custom links to extend inline markup, but this is
>>> block-level, and thus handily extensible with org-special-blocks.
>>>
>>> Cheers,
>>> Christian
>>
>>
>
>
> -- 
>
> Christian Moe
> E-mail:  mail@christianmoe.com
> Website: http://christianmoe.com
>

- Carsten

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: abstract in exported latex and html
  2010-11-02 11:22         ` Christian Moe
  2010-11-02 12:21           ` Carsten Dominik
@ 2010-11-02 16:15           ` Thomas S. Dye
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas S. Dye @ 2010-11-02 16:15 UTC (permalink / raw)
  To: mail; +Cc: Magnus Nilsson, emacs-orgmode, Carsten Dominik

Aloha Christian,

On Nov 2, 2010, at 1:22 AM, Christian Moe wrote:

> Hi,
>
> Written up, with an added note about org-exp-blocks, and pushed to:
>
> http://orgmode.org/worg/org-faq.php#include-abstract-in-export-to-latex-and-html
> http://orgmode.org/worg/org-tutorials/org-latex-export.php#sec-12
>
> In the latter, BTW, I have also made a small change in the "semantic- 
> markup" src block: the example now sets a class rather than style on  
> HTML export, keeping it semantic. The debate on extensible markup  
> solutions continues, I think, but I'm glad some people find the  
> custom-link idea useful, in the interim at least.
>
> Yours,
> Christian
>

These are very helpful.  I'm learning a lot and have more to explore.   
Thanks!

All the best,
Tom

>
> On 11/2/10 5:45 AM, Carsten Dominik wrote:
>> This is great and should be in the FAQ or another good place on Worg.
>>
>> Thanks!
>>
>> - Carsten
>>
>> On Nov 1, 2010, at 10:47 PM, Christian Moe wrote:
>>
>>> Use org-special-blocks
>>>
>>>>> 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.
>>>
>>> If I'm not overlooking a hitch, you can do that now with the
>>> contributed package org-special-blocks. Just put
>>>
>>> (require 'org-special-blocks)
>>>
>>> in your .emacs.
>>>
>>> The HTML abstract won't look like anything special until you style
>>> it, it will just be wrapped in a <div class="abstract"> element.
>>> Here are some sample style lines for your org document header
>>> (without line wraps):
>>>
>>> #+STYLE: <style>.abstract {margin: 1em; padding: 1em; border: 1px
>>> solid black}
>>> #+STYLE: .abstract:before {content: "ABSTRACT: ";}</style>
>>>
>>> Thomas S. Dye wrote:
>>>> 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
>>>
>>> I'm all for using custom links to extend inline markup, but this is
>>> block-level, and thus handily extensible with org-special-blocks.
>>>
>>> Cheers,
>>> Christian
>>
>>
>
>
> -- 
>
> Christian Moe
> E-mail:  mail@christianmoe.com
> Website: http://christianmoe.com
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-11-02 16:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).