emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [new exporter] latex: why does {{}} become \{\{\}\} ?
@ 2012-10-16 15:29 Myles English
  2012-10-16 19:21 ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Myles English @ 2012-10-16 15:29 UTC (permalink / raw)
  To: emacs-orgmode


Hi,

Org-mode version 7.9.2 (release_7.9.2-441-gf287ab @ /home/myles/.emacs.d/plugins/org-mode/lisp/)

Can anyone tell me please why (in the examples below) {} exports fine
but {{}} exports as \{\{\}\} ?  Am I meant to wrap these in
#+begin_latex blocks?

In my .org file:

\tikzset{help lines/.style=very thin}
\tikzset{help grid/.style={help lines,color=blue!50}}

In the resulting .tex file

\tikzset{help lines/.style=very thin}
\tikzset\{help grid/.style=\{help lines,color=blue!50\}\}

Thanks,

Myles

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

* Re: [new exporter] latex: why does {{}} become \{\{\}\} ?
  2012-10-16 15:29 [new exporter] latex: why does {{}} become \{\{\}\} ? Myles English
@ 2012-10-16 19:21 ` Nicolas Goaziou
  2012-10-16 21:26   ` Myles English
  2012-10-16 21:35   ` Sebastien Vauban
  0 siblings, 2 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2012-10-16 19:21 UTC (permalink / raw)
  To: Myles English; +Cc: emacs-orgmode

Hello,

"Myles English" <mylesenglish@gmail.com> writes:

> Can anyone tell me please why (in the examples below) {} exports fine
> but {{}} exports as \{\{\}\} ?  Am I meant to wrap these in
> #+begin_latex blocks?

You're writing LaTeX code in an Org buffer. This is only possible to
a limited extent. In particular, these lines should indeed go within
a LaTeX block. Otherwise, they will be protected to appear as-is in the
output.


Regards,

-- 
Nicolas Goaziou

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

* Re: [new exporter] latex: why does {{}} become \{\{\}\} ?
  2012-10-16 19:21 ` Nicolas Goaziou
@ 2012-10-16 21:26   ` Myles English
  2012-10-16 21:35   ` Sebastien Vauban
  1 sibling, 0 replies; 9+ messages in thread
From: Myles English @ 2012-10-16 21:26 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode


Nicolas Goaziou writes:

> You're writing LaTeX code in an Org buffer. This is only possible to
> a limited extent. In particular, these lines should indeed go within
> a LaTeX block. Otherwise, they will be protected to appear as-is in the
> output.

Thanks, just confirming that was helpful, me and my emacs were confused
somehow and #+begin_latex was coming out as \begin{latex}, it may have
been a missing bracket.

Myles

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

* Re: [new exporter] latex: why does {{}} become \{\{\}\} ?
  2012-10-16 19:21 ` Nicolas Goaziou
  2012-10-16 21:26   ` Myles English
@ 2012-10-16 21:35   ` Sebastien Vauban
  2012-10-17 12:03     ` Nicolas Goaziou
  1 sibling, 1 reply; 9+ messages in thread
From: Sebastien Vauban @ 2012-10-16 21:35 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello Nicolas,

Nicolas Goaziou wrote:
> "Myles English" <mylesenglish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
>> Can anyone tell me please why (in the examples below) {} exports fine
>> but {{}} exports as \{\{\}\} ?  Am I meant to wrap these in
>> #+begin_latex blocks?
>
> You're writing LaTeX code in an Org buffer. This is only possible to
> a limited extent. In particular, these lines should indeed go within
> a LaTeX block.

Within a LaTeX block (#+begin_latex) or within a Babel block for LaTeX
language (#+begin_src latex)?  Do you make a difference?

Best regards,
Seb

-- 
Sebastien Vauban

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

* Re: [new exporter] latex: why does {{}} become \{\{\}\} ?
  2012-10-16 21:35   ` Sebastien Vauban
@ 2012-10-17 12:03     ` Nicolas Goaziou
  2012-10-19 13:05       ` Sebastien Vauban
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2012-10-17 12:03 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> Hello Nicolas,
>
> Nicolas Goaziou wrote:
>> "Myles English" <mylesenglish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>
>>> Can anyone tell me please why (in the examples below) {} exports fine
>>> but {{}} exports as \{\{\}\} ?  Am I meant to wrap these in
>>> #+begin_latex blocks?
>>
>> You're writing LaTeX code in an Org buffer. This is only possible to
>> a limited extent. In particular, these lines should indeed go within
>> a LaTeX block.
>
> Within a LaTeX block (#+begin_latex) or within a Babel block for LaTeX
> language (#+begin_src latex)?  Do you make a difference?

There's a big difference.

#+begin_latex means "paste this code unmodified in the latex back-end,
and only in the latex back-end". Nothing is evaluated.

With a #+begin_src latex block, depending on :exports parameter, you can
produce something (in this case, probably an image file) and create
a link valid in any back-end, as long as it supports the file format.

Both are possible.


Regards,

-- 
Nicolas Goaziou

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

* Re: [new exporter] latex: why does {{}} become \{\{\}\} ?
  2012-10-17 12:03     ` Nicolas Goaziou
@ 2012-10-19 13:05       ` Sebastien Vauban
  2012-10-21 18:47         ` Charles Berry
  0 siblings, 1 reply; 9+ messages in thread
From: Sebastien Vauban @ 2012-10-19 13:05 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban"
>> Within a LaTeX block (#+begin_latex) or within a Babel block for LaTeX
>> language (#+begin_src latex)?  Do you make a difference?
>
> There's a big difference.
>
> #+begin_latex means "paste this code unmodified in the latex back-end,
> and only in the latex back-end". Nothing is evaluated.
>
> With a #+begin_src latex block, depending on :exports parameter, you can
> produce something (in this case, probably an image file) and create
> a link valid in any back-end, as long as it supports the file format.
>
> Both are possible.

I realize having taken the bad habit of only using #+begin_src latex blocks
even for code that only matters for the LaTeX back-end (such as TikZ
decorations). By carefully using the Babel options, it comes down to the same
effect/behavior, but, OK, that's NOT the Right Way To Do!

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [new exporter] latex: why does {{}} become \{\{\}\} ?
  2012-10-19 13:05       ` Sebastien Vauban
@ 2012-10-21 18:47         ` Charles Berry
  2012-10-21 19:14           ` cberry
  0 siblings, 1 reply; 9+ messages in thread
From: Charles Berry @ 2012-10-21 18:47 UTC (permalink / raw)
  To: emacs-orgmode

Sebastien Vauban <wxhgmqzgwmuf@...> writes:

> 
> Hi Nicolas,
> 
> Nicolas Goaziou wrote:
> > "Sebastien Vauban"
> >> Within a LaTeX block (#+begin_latex) or within a Babel block for LaTeX
> >> language (#+begin_src latex)?  Do you make a difference?
> >
> > There's a big difference.
> >
> > #+begin_latex means "paste this code unmodified in the latex back-end,
> > and only in the latex back-end". Nothing is evaluated.

I guess I do not understand.

Using git pull today,

(org-export-to-buffer 'e-latex "scratch.tex") exports this


#+begin_latex
  \begin{displaymath}
    \mbox{a}=\frac{b}{1 + c}
  \end{displaymath}
#+end_latex 

 
as this

\begin{latex}
\begin{displaymath}
  \mbox{a}=\frac{b}{1 + c}
\end{displaymath}
\end{latex}

So how do I get rid of the enclosing lines:

\begin{latex} 
\end{latex} 

??

Chuck

> >
> > With a #+begin_src latex block, depending on :exports parameter, you can
> > produce something (in this case, probably an image file) and create
> > a link valid in any back-end, as long as it supports the file format.
> >
> > Both are possible.
> 
> I realize having taken the bad habit of only using #+begin_src latex blocks
> even for code that only matters for the LaTeX back-end (such as TikZ
> decorations). By carefully using the Babel options, it comes down to the same
> effect/behavior, but, OK, that's NOT the Right Way To Do!
> 
> Best regards,
>   Seb
> 

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

* Re: [new exporter] latex: why does {{}} become \{\{\}\} ?
  2012-10-21 18:47         ` Charles Berry
@ 2012-10-21 19:14           ` cberry
  2012-10-21 19:51             ` Myles English
  0 siblings, 1 reply; 9+ messages in thread
From: cberry @ 2012-10-21 19:14 UTC (permalink / raw)
  To: emacs-orgmode

Charles Berry <ccberry@ucsd.edu> writes:


NEVER MIND.

I just restarted my emacs and the export went as it should without the
offending

\begin{latex}
\end{latex}

lines.

Likely someting weird in my setup caused this.

Sorry for the noise.

Chuck

> Sebastien Vauban <wxhgmqzgwmuf@...> writes:
>
>> 
>> Hi Nicolas,
>> 
>> Nicolas Goaziou wrote:
>> > "Sebastien Vauban"
>> >> Within a LaTeX block (#+begin_latex) or within a Babel block for LaTeX
>> >> language (#+begin_src latex)?  Do you make a difference?
>> >
>> > There's a big difference.
>> >
>> > #+begin_latex means "paste this code unmodified in the latex back-end,
>> > and only in the latex back-end". Nothing is evaluated.
>
> I guess I do not understand.
>
> Using git pull today,
>
> (org-export-to-buffer 'e-latex "scratch.tex") exports this
>
>
> #+begin_latex
>   \begin{displaymath}
>     \mbox{a}=\frac{b}{1 + c}
>   \end{displaymath}
> #+end_latex 
>
>  
> as this
>
> \begin{latex}
> \begin{displaymath}
>   \mbox{a}=\frac{b}{1 + c}
> \end{displaymath}
> \end{latex}
>
> So how do I get rid of the enclosing lines:
>
> \begin{latex} 
> \end{latex} 
>
> ??
>
> Chuck
>
>> >
>> > With a #+begin_src latex block, depending on :exports parameter, you can
>> > produce something (in this case, probably an image file) and create
>> > a link valid in any back-end, as long as it supports the file format.
>> >
>> > Both are possible.
>> 
>> I realize having taken the bad habit of only using #+begin_src latex blocks
>> even for code that only matters for the LaTeX back-end (such as TikZ
>> decorations). By carefully using the Babel options, it comes down to the same
>> effect/behavior, but, OK, that's NOT the Right Way To Do!
>> 
>> Best regards,
>>   Seb

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

* Re: [new exporter] latex: why does {{}} become \{\{\}\} ?
  2012-10-21 19:14           ` cberry
@ 2012-10-21 19:51             ` Myles English
  0 siblings, 0 replies; 9+ messages in thread
From: Myles English @ 2012-10-21 19:51 UTC (permalink / raw)
  To: cberry; +Cc: emacs-orgmode


cberry@tajo.ucsd.edu writes:

> Charles Berry <ccberry@ucsd.edu> writes:
>
>
> NEVER MIND.
>
> I just restarted my emacs and the export went as it should without the
> offending
>
> \begin{latex}
> \end{latex}
>
> lines.
>
> Likely someting weird in my setup caused this.

That happend to me too but I don't know what caused it.

Myles

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

end of thread, other threads:[~2012-10-21 19:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-16 15:29 [new exporter] latex: why does {{}} become \{\{\}\} ? Myles English
2012-10-16 19:21 ` Nicolas Goaziou
2012-10-16 21:26   ` Myles English
2012-10-16 21:35   ` Sebastien Vauban
2012-10-17 12:03     ` Nicolas Goaziou
2012-10-19 13:05       ` Sebastien Vauban
2012-10-21 18:47         ` Charles Berry
2012-10-21 19:14           ` cberry
2012-10-21 19:51             ` Myles English

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