emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Defining new structural markup element
@ 2011-12-14 17:33 Levy, Roger
  2011-12-14 17:47 ` Nick Dokos
  2011-12-14 18:08 ` Viktor Rosenfeld
  0 siblings, 2 replies; 4+ messages in thread
From: Levy, Roger @ 2011-12-14 17:33 UTC (permalink / raw)
  To: Org-mode

Hi,

I'm a relative org newbie and I expect that this question is answered somewhere in the manual, but I've searched and I can't find the answer.

I would like to define a new structural markup element for an org file and specify its translation into latex.  e.g., I'd like to be able to put in my document

#+begin_foo
bar
#+end_foo

and have this translated into LaTeX as something like 

\em
bar
\em

but I'd like to be able to flexibly specify the LaTeX commands inserted at the beginning and end of the "foo" block.  Is there an easy way to do this?

Best & many thanks in advance!

Roger

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

* Re: Defining new structural markup element
  2011-12-14 17:33 Defining new structural markup element Levy, Roger
@ 2011-12-14 17:47 ` Nick Dokos
  2011-12-14 18:08 ` Viktor Rosenfeld
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Dokos @ 2011-12-14 17:47 UTC (permalink / raw)
  To: Levy, Roger; +Cc: nicholas.dokos, Org-mode

Levy, Roger <rlevy@ucsd.edu> wrote:

> Hi,
> 
> I'm a relative org newbie and I expect that this question is answered somew=
> here in the manual, but I've searched and I can't find the answer.
> 
> I would like to define a new structural markup element for an org file and =
> specify its translation into latex.  e.g., I'd like to be able to put in my=
>  document
> 
> #+begin_foo
> bar
> #+end_foo
> 
> and have this translated into LaTeX as something like=20
> 
> \em
> bar
> \em
> 
> but I'd like to be able to flexibly specify the LaTeX commands inserted at =
> the beginning and end of the "foo" block.  Is there an easy way to do this?
> 

Not sure I understand completely what you are trying to do, but you can
do something like this:

--8<---------------cut here---------------start------------->8---

* foo

#+LATEX: \begin{foo}
bar
#+LATEX: \end{foo}

--8<---------------cut here---------------end--------------->8---

to insert arbitrary LaTeX markup at the indicated places when exporting
to latex. Other exporters will just omit the markup.

Nick

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

* Re: Defining new structural markup element
  2011-12-14 17:33 Defining new structural markup element Levy, Roger
  2011-12-14 17:47 ` Nick Dokos
@ 2011-12-14 18:08 ` Viktor Rosenfeld
  2011-12-14 19:06   ` Levy, Roger
  1 sibling, 1 reply; 4+ messages in thread
From: Viktor Rosenfeld @ 2011-12-14 18:08 UTC (permalink / raw)
  To: Levy, Roger; +Cc: Org-mode

Hi,

the Worg page on LaTeX publishing covers this under "Block-level Markup"
and "Inline Markup":

http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-10-2
http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-10-3

Haven't tried it myself so far (but planning to do so).

Cheers,
Viktor

Levy, Roger wrote:

> Hi,
> 
> I'm a relative org newbie and I expect that this question is answered somewhere in the manual, but I've searched and I can't find the answer.
> 
> I would like to define a new structural markup element for an org file and specify its translation into latex.  e.g., I'd like to be able to put in my document
> 
> #+begin_foo
> bar
> #+end_foo
> 
> and have this translated into LaTeX as something like 
> 
> \em
> bar
> \em
> 
> but I'd like to be able to flexibly specify the LaTeX commands inserted at the beginning and end of the "foo" block.  Is there an easy way to do this?
> 
> Best & many thanks in advance!
> 
> Roger
> 
> 

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

* Re: Defining new structural markup element
  2011-12-14 18:08 ` Viktor Rosenfeld
@ 2011-12-14 19:06   ` Levy, Roger
  0 siblings, 0 replies; 4+ messages in thread
From: Levy, Roger @ 2011-12-14 19:06 UTC (permalink / raw)
  To: Viktor Rosenfeld; +Cc: Org-mode

Thanks so much, Viktor, this is exactly what I wanted!

Best

Roger

On Dec 14, 2011, at 1:08 PM EST, Viktor Rosenfeld wrote:

> Hi,
> 
> the Worg page on LaTeX publishing covers this under "Block-level Markup"
> and "Inline Markup":
> 
> http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-10-2
> http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-10-3
> 
> Haven't tried it myself so far (but planning to do so).
> 
> Cheers,
> Viktor
> 
> Levy, Roger wrote:
> 
>> Hi,
>> 
>> I'm a relative org newbie and I expect that this question is answered somewhere in the manual, but I've searched and I can't find the answer.
>> 
>> I would like to define a new structural markup element for an org file and specify its translation into latex.  e.g., I'd like to be able to put in my document
>> 
>> #+begin_foo
>> bar
>> #+end_foo
>> 
>> and have this translated into LaTeX as something like 
>> 
>> \em
>> bar
>> \em
>> 
>> but I'd like to be able to flexibly specify the LaTeX commands inserted at the beginning and end of the "foo" block.  Is there an easy way to do this?
>> 
>> Best & many thanks in advance!
>> 
>> Roger
>> 
>> 

--

Roger Levy                      Email: rlevy@ucsd.edu
Assistant Professor             Phone: 858-534-7219
Department of Linguistics       Fax:   858-534-4789
UC San Diego                    Web:   http://idiom.ucsd.edu/~rlevy

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

end of thread, other threads:[~2011-12-14 19:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-14 17:33 Defining new structural markup element Levy, Roger
2011-12-14 17:47 ` Nick Dokos
2011-12-14 18:08 ` Viktor Rosenfeld
2011-12-14 19:06   ` Levy, Roger

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