LaTeX Export

Hello,
I have got two questions.
I am using Org-mode v. 3.16c. I usually use LaTeX but Org has been
really nice. However, I want to export to LaTeX.
Two features are bugging me though.
  1. Timestambs are really nice, but I don't want them in my final
     print (the LaTeX output). Is there an easy way to remove these? 
  2. The interpretation of $ is probably nice for American but for me
     it creates a lot of undesirable results, since a lot of math is
     not recognized as math for unknown reasons. It would be nice to
     be able to turn the $-feature off [1]. When I need a $-sign I
     would much rather use \$. Maybe the universal currency-symbol ¤
     could be used as a replacement, if the user desire.

If either of these are already possible I appoligize. I was not able
to find an answear to my questions in the manual.

[1] "To avoid conflicts with currency specifications, single '$'
     characters are only recognized as math delimiters if the enclosed
     text contains at most two line breaks, is directly attached to
     the '$' characters with no whitespace in between, and if the
     closing '$' is followed by whitespace or punctuation". 
     --From the Org manual.

Thanks,
Rasmus

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
(Continue reading)

Carsten Dominik | 5 Jan 16:29
Favicon

Re: LaTeX Export

Hi Rasmus,

First of all, org 3.16c is very old indeed so *maybe* this
works better in a more recent version?

Second, you could help with an example which demonstrates the problem.

- Carsten

On Jan 5, 2009, at 1:42 PM, Rasmus Pank Roulund wrote:

> Hello,
> I have got two questions.
> I am using Org-mode v. 3.16c. I usually use LaTeX but Org has been
> really nice. However, I want to export to LaTeX.
> Two features are bugging me though.
>  1. Timestambs are really nice, but I don't want them in my final
>     print (the LaTeX output). Is there an easy way to remove these?
>  2. The interpretation of $ is probably nice for American but for me
>     it creates a lot of undesirable results, since a lot of math is
>     not recognized as math for unknown reasons. It would be nice to
>     be able to turn the $-feature off [1]. When I need a $-sign I
>     would much rather use \$. Maybe the universal currency-symbol ¤
>     could be used as a replacement, if the user desire.
>
> If either of these are already possible I appoligize. I was not able
> to find an answear to my questions in the manual.
>
> [1] "To avoid conflicts with currency specifications, single '$'
>     characters are only recognized as math delimiters if the enclosed
(Continue reading)

Re: LaTeX Export


> First of all, org 3.16c is very old indeed so *maybe* this works
> better in a more recent version?
Sorry, it is 6.16c :-) (Thanks Matthew!)
I believe it is the version bundled with the latest Emacsw32 from
ourcomments.org. I am using a Emacsw32 from December 2008.
Since I use win32 I am not able to use the provided update-script. 
Is is okay to overwrite the el files in the Emacs folder and recompile
them?

> Second, you could help with an example which demonstrates the problem.
Sorry. I should have included examples in the first post.
Here is an example from the notes I am working on.
The LaTeX output is:

    \begin{itemize}
    \item Indtegnes i et $x_1/x_2$-diagram, evt. med indifferentkurver.
    \item Kurve, der sammensætte alle de bedste løsninger \$(x_1^{*},
          x_2^{*})$ ved varierende indkomst $m$.
    \end{itemize}

Notice the \$ in the second item. Since I rarely use $ as a symbol but
use it all the time as math delimiter it would be more efficient to use
\$ when I actually need a $-sign.

Here is the corresponding Org code:

    - Indtegnes i et $x_1/x_2$-diagram, evt. med indifferentkurver.
    - Kurve, der sammensætte alle de bedste løsninger $(x_1^{*},
      x_2^{*})$ ved varierende indkomst $m$.
(Continue reading)

Carsten Dominik | 6 Jan 13:00
Favicon

Re: Re: LaTeX Export

Hi Rasmus,

I have tried to fix the issues with dollars, please download the  
latest GIT
version and check if your stuff is now converted better.

I have not yet looked at the issues with the timestamps.

- Carsten

On Jan 5, 2009, at 5:10 PM, Rasmus Pank Roulund wrote:

>
>> First of all, org 3.16c is very old indeed so *maybe* this works
>> better in a more recent version?
> Sorry, it is 6.16c :-) (Thanks Matthew!)
> I believe it is the version bundled with the latest Emacsw32 from
> ourcomments.org. I am using a Emacsw32 from December 2008.
> Since I use win32 I am not able to use the provided update-script.
> Is is okay to overwrite the el files in the Emacs folder and recompile
> them?
>
>> Second, you could help with an example which demonstrates the  
>> problem.
> Sorry. I should have included examples in the first post.
> Here is an example from the notes I am working on.
> The LaTeX output is:
>
>    \begin{itemize}
>    \item Indtegnes i et $x_1/x_2$-diagram, evt. med indifferentkurver.
(Continue reading)

Re: LaTeX Export

> I have tried to fix the issues with dollars, please download the
> latest GIT version and check if your stuff is now converted better.

I have gotten the newest git version from today. I have Org v6.17trans.

There is still something funny with $-signs.

Here are a couple of examples:
------
LaTeX output: 
      \item Hvis en vare har input \$x\$ \dots

Org:
      - Hvis en vare har input $x$ \dots
------
LaTeX output:
       $$M\overline{V}=P\overline{Y}$$
       \$M\$ er bestemt af centralbanken, og det eneste den bestemmer er
       prisniveauet.

Org:
     - Produktionsfunktionen brugt af monetarister:
       $$M\overline{V}=P\overline{Y}$$
       $M$ er bestemt af centralbanken, og det eneste den bestemmer er
       prisniveauet.
------
LaTeX output (this one is particuarily troublesome):
      \item På arbejdsmarkedet bestemmes ligevægten imellem $L_d$ og $L_s\$
       Her ud fra findes ligevægten i udbudet.

(Continue reading)

Carsten Dominik | 8 Jan 22:38
Favicon

Re: Re: LaTeX Export

Hi Rasmus,

please keep testing!

I have fixed the issues you mentioned in you mail - I am
sure there will be more.

Parsing TeX is hard, parsing pseudo-TeX like in Org-mode
is even harder.  Note that this will never be perfect.
In particular, $-parsing is a bitch.  You can elagantly
cheat out by using \(...\) and \[...\] instead.

- Carsten

On Jan 8, 2009, at 6:48 PM, Rasmus Pank Roulund wrote:

>> I have tried to fix the issues with dollars, please download the
>> latest GIT version and check if your stuff is now converted better.
>
> I have gotten the newest git version from today. I have Org  
> v6.17trans.
>
> There is still something funny with $-signs.
>
> Here are a couple of examples:
> ------
> LaTeX output:
>      \item Hvis en vare har input \$x\$ \dots
>
> Org:
(Continue reading)

Rasmus Pank Roulund | 10 Feb 21:46

Re: LaTeX Export

Hello,
Sorry for the late reply. This is regarind a bug in LaTeX export.
The trouble seems to happen when autofill is used. It
might be caused by something else. I am not sure. The thing is
that Org sometimes misintpretate $ as the currency symbolar
rather than "math" as in LaTeX-lingu. IMO the use of $ as a
currency symbol should be optional.

Here is an example of the error:

Org source: 

   - Funktioner findes ved at sætte funktionen lige en given konstant
     $k$. Dermed bestemmes indifferentfunktion. Det ses nemt at
     $u(x_1, x_2)=k$.

LaTeX export: 

   \item Funktioner findes ved at sætte funktionen lige en given konstant
         \$k\$. Dermed bestemmes indifferentfunktion. Det ses nemt at
         $u(x_1, x_2)=k$.

I have pulled the newest revision of Org. The version is 6.22b.

Thanks,
Rasmus

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
(Continue reading)

Giovanni Ridolfi | 11 Feb 10:58

Re: Re: LaTeX Export "$"s

--- Mar 10/2/09, Rasmus Pank Roulund <rasmus.pank <at> gmail.com> ha scritto:
> Sorry for the late reply. This is regarind a bug in LaTeX
> export.
> The trouble seems to happen when autofill is used. It
> might be caused by something else. I am not sure. The thing
> is
> that Org sometimes misintpretate $ as the currency symbolar
> rather than "math" as in LaTeX-lingu. IMO the use
> of $ as a
> currency symbol should be optional.
hi, Rasmus,

you should use \(  \) for a "well-exported" math environment 
and not "$"  ;-)

as stated in the maual:

11.3 LaTeX fragments
====================
Text within the usual LaTeX math delimiters.  To avoid conflicts
     with currency specifications, single `$' characters are only
     recognized as math delimiters 
     if the enclosed text contains at most two line breaks, 
     is directly attached to the `$' characters
     with no whitespace in between, 
     and if the closing `$' is followed
     by whitespace, punctuation or a dash.  For the other delimiters,
     there is no such restriction, so when in doubt, use `\(...\)' as
     inline math delimiters.

(Continue reading)

Carsten Dominik | 11 Feb 11:34
Favicon

Re: Re: LaTeX Export


On Feb 10, 2009, at 9:46 PM, Rasmus Pank Roulund wrote:

Hello,
Sorry for the late reply. This is regarind a bug in LaTeX export.
The trouble seems to happen when autofill is used. It
might be caused by something else. I am not sure. The thing is
that Org sometimes misintpretate $ as the currency symbolar
rather than "math" as in LaTeX-lingu. IMO the use of $ as a
currency symbol should be optional.

Here is an example of the error:

Org source:

  - Funktioner findes ved at sætte funktionen lige en given konstant
    $k$. Dermed bestemmes indifferentfunktion. Det ses nemt at
    $u(x_1, x_2)=k$.

LaTeX export:

  \item Funktioner findes ved at sætte funktionen lige en given konstant
        \$k\$. Dermed bestemmes indifferentfunktion. Det ses nemt at
        $u(x_1, x_2)=k$.

I have pulled the newest revision of Org. The version is 6.22b.

Please remove your customization of org-format-latex-options.
You can do this by doing

M-x customize-variable RET org-format-latex-options RET

and then clicking on "Erase customizations", then
"Set for current session", then "Save for future sessions".

After that, re-make any customizations you want in that variable.

Some time ago I added a new matcher "$1" for single characters
between dollars like in this case.  People who have
customized this option unfortunately do not get to see it.

That said, Giovanni's proposal to use \(....\) is excellent
advice, at least in cases where using $..$ causes trouble.

- Carsten

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode <at> gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Bernt Hansen | 11 Feb 16:56

Re: LaTeX Export

Carsten Dominik <dominik <at> science.uva.nl> writes:

> M-x customize-variable RET org-format-latex-options RET
>
> and then clicking on "Erase customizations", then
> "Set for current session", then "Save for future sessions".

On my version of Emacs

GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2008-11-09 on raven, modified by Debian

if I click on [Save for future sessions] it also sets the current
session data.  I don't need to click on both.

I used to do that but decided one day to figure out if that was really
necessary (since I was messing with lots of configuration variables
through the customize interface and clicking on both buttons was bugging
me :) )

HTH,
-Bernt

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode <at> gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Carsten Dominik | 11 Feb 17:08
Favicon

Re: LaTeX Export


On Feb 11, 2009, at 4:56 PM, Bernt Hansen wrote:

> Carsten Dominik <dominik <at> science.uva.nl> writes:
>
>> M-x customize-variable RET org-format-latex-options RET
>>
>> and then clicking on "Erase customizations", then
>> "Set for current session", then "Save for future sessions".
>
> On my version of Emacs
>
> GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
> 2008-11-09 on raven, modified by Debian
>
> if I click on [Save for future sessions] it also sets the current
> session data.  I don't need to click on both.
>
> I used to do that but decided one day to figure out if that was really
> necessary (since I was messing with lots of configuration variables
> through the customize interface and clicking on both buttons was  
> bugging
> me :) )

Indeed, this is good to know.

- Carsten

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode <at> gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Rasmus Pank Roulund | 12 Feb 19:25

Re: LaTeX Export

Carsten Dominik <dominik <at> science.uva.nl> writes:

> Some time ago I added a new matcher "$1" for single
> charactersbetween dollars like in this case.  People who
> havecustomized this option unfortunately do not get to see it.
That was probably the problem. It works a lot better now! Thanks. 

> That said, Giovanni's proposal to use \(....\) is excellentadvice, at least
> in cases where using $..$ causes trouble.- Carsten

Acctually, at first I used \(...\) but at that time Org had a harder
time picking up \(...\) than $...$ which caused a lot of \($...$\). I
have not checked whether it works better now.

Thanks,
Rasmus

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode <at> gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Matthew Lundin | 5 Jan 16:43
Favicon

Re: LaTeX Export


Hi Rasmus,

Rasmus Pank Roulund <rasmus.pank <at> gmail.com> writes:

> Hello,
> I have got two questions.
> I am using Org-mode v. 3.16c. I usually use LaTeX but Org has been
> really nice. However, I want to export to LaTeX.

I assume you mean org-mode 6.13c?

> Two features are bugging me though.
>   1. Timestambs are really nice, but I don't want them in my final
>      print (the LaTeX output). Is there an easy way to remove these? 

You can control this option either with global settings:

(setq org-export-with-timestamps nil)

or with in-buffer options[1]:

#+OPTIONS: <:nil

As I'm testing this myself, however, I'm finding that this option
works fine for html export, but is not working for LaTeX export in org
6.17a. (Just to be clear: I'm refreshing the buffer settings with C-c
C-c before exporting.)

Strangely, when export with timestamps is turned on, only the last
timestamped item appears in the LaTeX export (e.g., the CLOSED
timestamp on an item that had been scheduled). But when I turn the
timestamp option off, all timestamps appear in the exported LaTeX
(e.g., both SCHEDULED and CLOSED timestamps).

I'm also finding that TODO keywords do not appear in the latex output
with the following option turned on:

#+OPTIONS: todo:t

Can anyone else duplicate this behavior?

Thanks,
Matt

Footnotes (courtesy of the wonderful new org-footnote-action):

[1] http://orgmode.org/manual/Export-options.html#Export-options

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode <at> gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Gmane