emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* About entering latex code in an org file
@ 2010-12-10 15:17 Curiouslearn
  2010-12-10 15:50 ` Giovanni Ridolfi
  2010-12-10 15:57 ` Pierre de Buyl
  0 siblings, 2 replies; 5+ messages in thread
From: Curiouslearn @ 2010-12-10 15:17 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I am new to both emacs and org-mode. Org-mode sounds really cool and I
am trying to use it to make notes for a project. I have some latex
symbols that I need to enter in the file.
As a background:
(1) I read in the manual that for latex code I do not need to enclose
math inside $ $.
(2) I have many words with "_" in the their names, so as mentioned in
the manual, I added
#+OPTIONS: ^:{}
#+OPTIONS: _:{}
to my .org file.

In fact, the my file is
-----------------------------------------------------------------------------------------------------
#+OPTIONS: ^:{}
#+OPTIONS: _:{}
#+LATEX_HEADER: \setlength{\parskip}{2ex plus 0.5ex minus 0.2ex}
#+LATEX_HEADER: \setlength{\parindent}{0in}

* TODO Write an aspiration_review function
  The function should do the following:
  1. Investigates if \pi_{g}  \geq  0.05  and \bar{\pi} \geq  ASP_LEVEL


** Investigate if

-----------------------------------------------------------------------------------------------------
The problem is that when I export this using 'C-c C- e l' to latex,
some parts that should be enclosed in $ $ sign are not enclosed. This
is the relevant line copied and pasted from the exported .tex file

\item Investigates if $\pi$$_\{g\}$  \geq  0.05  and \bar{\pi} \geq
ASP\_{}LEVEL

Can someone please let me know what is happening?

Thanks very much for all those who have been working on org-mode.

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

* Re: About entering latex code in an org file
  2010-12-10 15:17 About entering latex code in an org file Curiouslearn
@ 2010-12-10 15:50 ` Giovanni Ridolfi
  2010-12-10 16:19   ` Curiouslearn
  2010-12-10 15:57 ` Pierre de Buyl
  1 sibling, 1 reply; 5+ messages in thread
From: Giovanni Ridolfi @ 2010-12-10 15:50 UTC (permalink / raw)
  To: Curiouslearn; +Cc: emacs-orgmode

Curiouslearn <curiouslearn@gmail.com> writes:

>
> I am new to both emacs and org-mode. Org-mode sounds really cool and I
> am trying to use it to make notes for a project.

welcome!

>  I have some latex
> symbols that I need to enter in the file.
> As a background:
> (1) I read in the manual that for latex code I do not need to enclose
> math inside $ $.
> (2) I have many words with "_" in the their names, so as mentioned in
> the manual, I added
> #+OPTIONS: ^:{} _:{}
> to my .org file.
>
> In fact, the my file is
> -----------------------------------------------------------------------------------------------------
> #+OPTIONS: ^:{}
> #+OPTIONS: _:{}
> #+LATEX_HEADER: \setlength{\parskip}{2ex plus 0.5ex minus 0.2ex}
> #+LATEX_HEADER: \setlength{\parindent}{0in}
>
> * TODO Write an aspiration_review function
>   The function should do the following:
>   1. Investigates if \pi_{g}  \geq  0.05  and \bar{\pi} \geq  ASP_LEVEL
>
>
> ** Investigate if
>
> -----------------------------------------------------------------------------------------------------
> The problem is that when I export this using 'C-c C- e l' to latex,
> some parts that should be enclosed in $ $ sign are not enclosed. This
> is the relevant line copied and pasted from the exported .tex file
>
> \item Investigates if $\pi$$_\{g\}$  \geq  0.05  and \bar{\pi} \geq
> ASP\_{}LEVEL
>
> Can someone please let me know what is happening?

You can't have the cake and eat it.

I suggest you to enclose LaTeX parts in \( \) (that are better handled
than $'s) and keep the option 
#+OPTIONS:  ^:{} _:{} 

    1. Investigates if \( \pi_{g}  \geq \) 0.05  and \(\bar{\pi} \geq \) ASP_LEVEL

gives:  
       Investigates if \( \pi_{g}  \geq \) 0.05  and \(\bar{\pi} \geq \) ASP\_{}LEVEL

cheers,
Giovanni

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

* Re: About entering latex code in an org file
  2010-12-10 15:17 About entering latex code in an org file Curiouslearn
  2010-12-10 15:50 ` Giovanni Ridolfi
@ 2010-12-10 15:57 ` Pierre de Buyl
  2010-12-10 16:22   ` Curiouslearn
  1 sibling, 1 reply; 5+ messages in thread
From: Pierre de Buyl @ 2010-12-10 15:57 UTC (permalink / raw)
  To: Curiouslearn; +Cc: emacs-orgmode

Hello,

I am no expert either but I think that the automated detection of  
latex snippets (that is, no explicit $) will only enclose in $ parts  
that cannot be reproduced in text.

I suggest that if you want a complete expression like \pi_{g}  \geq   
0.05 to be translated to $\pi_{g}  \geq  0.05$ instead of $\pi$$_{g} 
$  \geq  0.05 you should do the enclosing manually.

HTH,

Pierre


Le 10 déc. 10 à 10:17, Curiouslearn a écrit :

> Hi,
>
> I am new to both emacs and org-mode. Org-mode sounds really cool and I
> am trying to use it to make notes for a project. I have some latex
> symbols that I need to enter in the file.
> As a background:
> (1) I read in the manual that for latex code I do not need to enclose
> math inside $ $.
> (2) I have many words with "_" in the their names, so as mentioned in
> the manual, I added
> #+OPTIONS: ^:{}
> #+OPTIONS: _:{}
> to my .org file.
>
> In fact, the my file is
> ---------------------------------------------------------------------- 
> -------------------------------
> #+OPTIONS: ^:{}
> #+OPTIONS: _:{}
> #+LATEX_HEADER: \setlength{\parskip}{2ex plus 0.5ex minus 0.2ex}
> #+LATEX_HEADER: \setlength{\parindent}{0in}
>
> * TODO Write an aspiration_review function
>   The function should do the following:
>   1. Investigates if \pi_{g}  \geq  0.05  and \bar{\pi} \geq   
> ASP_LEVEL
>
>
> ** Investigate if
>
> ---------------------------------------------------------------------- 
> -------------------------------
> The problem is that when I export this using 'C-c C- e l' to latex,
> some parts that should be enclosed in $ $ sign are not enclosed. This
> is the relevant line copied and pasted from the exported .tex file
>
> \item Investigates if $\pi$$_\{g\}$  \geq  0.05  and \bar{\pi} \geq
> ASP\_{}LEVEL
>
> Can someone please let me know what is happening?
>
> Thanks very much for all those who have been working on org-mode.
>
> _______________________________________________
> 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] 5+ messages in thread

* Re: About entering latex code in an org file
  2010-12-10 15:50 ` Giovanni Ridolfi
@ 2010-12-10 16:19   ` Curiouslearn
  0 siblings, 0 replies; 5+ messages in thread
From: Curiouslearn @ 2010-12-10 16:19 UTC (permalink / raw)
  To: Giovanni Ridolfi; +Cc: emacs-orgmode

Giovannie, thanks very much for the reply. Your solution works well
for latex export.

Is there a way to make it work for the HTML export too? I thought
MathJax would take care of converting it to appropriate html file.
While \pi_g is appropriately converted, \geq is not. Also, \( \)
remain in the HTML. Perhaps, I am asking for too much and please let
me know if that is so. But if there is a way to write math in such a
way that it is compatible with both html and latex, I would like to
learn it.

Thanks again.



On Fri, Dec 10, 2010 at 10:50 AM, Giovanni Ridolfi
<giovanni.ridolfi@yahoo.it> wrote:
> Curiouslearn <curiouslearn@gmail.com> writes:
>
>>
>> I am new to both emacs and org-mode. Org-mode sounds really cool and I
>> am trying to use it to make notes for a project.
>
> welcome!
>
>>  I have some latex
>> symbols that I need to enter in the file.
>> As a background:
>> (1) I read in the manual that for latex code I do not need to enclose
>> math inside $ $.
>> (2) I have many words with "_" in the their names, so as mentioned in
>> the manual, I added
>> #+OPTIONS: ^:{} _:{}
>> to my .org file.
>>
>> In fact, the my file is
>> -----------------------------------------------------------------------------------------------------
>> #+OPTIONS: ^:{}
>> #+OPTIONS: _:{}
>> #+LATEX_HEADER: \setlength{\parskip}{2ex plus 0.5ex minus 0.2ex}
>> #+LATEX_HEADER: \setlength{\parindent}{0in}
>>
>> * TODO Write an aspiration_review function
>>   The function should do the following:
>>   1. Investigates if \pi_{g}  \geq  0.05  and \bar{\pi} \geq  ASP_LEVEL
>>
>>
>> ** Investigate if
>>
>> -----------------------------------------------------------------------------------------------------
>> The problem is that when I export this using 'C-c C- e l' to latex,
>> some parts that should be enclosed in $ $ sign are not enclosed. This
>> is the relevant line copied and pasted from the exported .tex file
>>
>> \item Investigates if $\pi$$_\{g\}$  \geq  0.05  and \bar{\pi} \geq
>> ASP\_{}LEVEL
>>
>> Can someone please let me know what is happening?
>
> You can't have the cake and eat it.
>
> I suggest you to enclose LaTeX parts in \( \) (that are better handled
> than $'s) and keep the option
> #+OPTIONS:  ^:{} _:{}
>
>    1. Investigates if \( \pi_{g}  \geq \) 0.05  and \(\bar{\pi} \geq \) ASP_LEVEL
>
> gives:
>       Investigates if \( \pi_{g}  \geq \) 0.05  and \(\bar{\pi} \geq \) ASP\_{}LEVEL
>
> cheers,
> Giovanni
>
>

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

* Re: About entering latex code in an org file
  2010-12-10 15:57 ` Pierre de Buyl
@ 2010-12-10 16:22   ` Curiouslearn
  0 siblings, 0 replies; 5+ messages in thread
From: Curiouslearn @ 2010-12-10 16:22 UTC (permalink / raw)
  To: Pierre de Buyl; +Cc: emacs-orgmode

Hi Pierre,

I tried to enclose it manually, however, the conversion inserts its
own $ signs preceded by a slash. There were some stray $ signs left in
the document after conversion.

Thanks.

On Fri, Dec 10, 2010 at 10:57 AM, Pierre de Buyl
<pdebuyl@chem.utoronto.ca> wrote:
> Hello,
>
> I am no expert either but I think that the automated detection of latex
> snippets (that is, no explicit $) will only enclose in $ parts that cannot
> be reproduced in text.
>
> I suggest that if you want a complete expression like \pi_{g}  \geq  0.05 to
> be translated to $\pi_{g}  \geq  0.05$ instead of $\pi$$_{g}$  \geq  0.05
> you should do the enclosing manually.
>
> HTH,
>
> Pierre
>
>
> Le 10 déc. 10 à 10:17, Curiouslearn a écrit :
>
>> Hi,
>>
>> I am new to both emacs and org-mode. Org-mode sounds really cool and I
>> am trying to use it to make notes for a project. I have some latex
>> symbols that I need to enter in the file.
>> As a background:
>> (1) I read in the manual that for latex code I do not need to enclose
>> math inside $ $.
>> (2) I have many words with "_" in the their names, so as mentioned in
>> the manual, I added
>> #+OPTIONS: ^:{}
>> #+OPTIONS: _:{}
>> to my .org file.
>>
>> In fact, the my file is
>>
>> -----------------------------------------------------------------------------------------------------
>> #+OPTIONS: ^:{}
>> #+OPTIONS: _:{}
>> #+LATEX_HEADER: \setlength{\parskip}{2ex plus 0.5ex minus 0.2ex}
>> #+LATEX_HEADER: \setlength{\parindent}{0in}
>>
>> * TODO Write an aspiration_review function
>>  The function should do the following:
>>  1. Investigates if \pi_{g}  \geq  0.05  and \bar{\pi} \geq  ASP_LEVEL
>>
>>
>> ** Investigate if
>>
>>
>> -----------------------------------------------------------------------------------------------------
>> The problem is that when I export this using 'C-c C- e l' to latex,
>> some parts that should be enclosed in $ $ sign are not enclosed. This
>> is the relevant line copied and pasted from the exported .tex file
>>
>> \item Investigates if $\pi$$_\{g\}$  \geq  0.05  and \bar{\pi} \geq
>> ASP\_{}LEVEL
>>
>> Can someone please let me know what is happening?
>>
>> Thanks very much for all those who have been working on org-mode.
>>
>> _______________________________________________
>> 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] 5+ messages in thread

end of thread, other threads:[~2010-12-10 16:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-10 15:17 About entering latex code in an org file Curiouslearn
2010-12-10 15:50 ` Giovanni Ridolfi
2010-12-10 16:19   ` Curiouslearn
2010-12-10 15:57 ` Pierre de Buyl
2010-12-10 16:22   ` Curiouslearn

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