emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-mode can not precess some LATEX environment
@ 2009-08-11  8:37 waterloo
  2009-08-11  8:44 ` Carsten Dominik
  0 siblings, 1 reply; 11+ messages in thread
From: waterloo @ 2009-08-11  8:37 UTC (permalink / raw)
  To: emacs-orgmode


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

org-mode can not precess some LATEX environment .
Such as :
\begin{matrix}
\end{matrix}

which is in amslatex.

How to do with it ?

Thanks

[-- Attachment #1.2: Type: text/html, Size: 171 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: 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] 11+ messages in thread

* Re: org-mode can not precess some LATEX environment
  2009-08-11  8:37 org-mode can not precess some LATEX environment waterloo
@ 2009-08-11  8:44 ` Carsten Dominik
  2009-08-11  8:48   ` waterloo
  0 siblings, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2009-08-11  8:44 UTC (permalink / raw)
  To: waterloo; +Cc: emacs-orgmode


On Aug 11, 2009, at 10:37 AM, waterloo wrote:

> org-mode can not precess some LATEX environment .
> Such as :
> \begin{matrix}
> \end{matrix}
>
> which is in amslatex.

Org-mode will handle these environments, but you must require the  
package in the header:


#+LaTeX_HEADER: \usepackage{amslatex}

Or add to org-export-latex-package-alist

- Carsten

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

* Re: org-mode can not precess some LATEX environment
  2009-08-11  8:44 ` Carsten Dominik
@ 2009-08-11  8:48   ` waterloo
  2009-08-11  9:01     ` Carsten Dominik
  0 siblings, 1 reply; 11+ messages in thread
From: waterloo @ 2009-08-11  8:48 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


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

It is `amsmath' , not `amslatex' .
Org include amsmath defaultly .


2009/8/11 Carsten Dominik <carsten.dominik@gmail.com>

>
> On Aug 11, 2009, at 10:37 AM, waterloo wrote:
>
>  org-mode can not precess some LATEX environment .
>> Such as :
>> \begin{matrix}
>> \end{matrix}
>>
>> which is in amslatex.
>>
>
> Org-mode will handle these environments, but you must require the package
> in the header:
>
>
> #+LaTeX_HEADER: \usepackage{amslatex}
>
> Or add to org-export-latex-package-alist
>
> - Carsten
>
>

[-- Attachment #1.2: Type: text/html, Size: 1015 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: 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] 11+ messages in thread

* Re: org-mode can not precess some LATEX environment
  2009-08-11  8:48   ` waterloo
@ 2009-08-11  9:01     ` Carsten Dominik
  2009-08-11  9:29       ` waterloo
  0 siblings, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2009-08-11  9:01 UTC (permalink / raw)
  To: waterloo; +Cc: emacs-orgmode

So then, what do you mean by

   "org-mode can not precess some LATEX environment"

Please, if you want us to spend the time giving you the
answer, put in the time to explain yourself clearly, if
possible already in the initial post and not after two
mails back and forth.  This will allow the experts in the
group to spend their time efficiently, and it will also
create better records in the mailing list archives.

- Carsten

On Aug 11, 2009, at 10:48 AM, waterloo wrote:

> It is `amsmath' , not `amslatex' .
> Org include amsmath defaultly .
>
>
> 2009/8/11 Carsten Dominik <carsten.dominik@gmail.com>
>
> On Aug 11, 2009, at 10:37 AM, waterloo wrote:
>
> org-mode can not precess some LATEX environment .
> Such as :
> \begin{matrix}
> \end{matrix}
>
> which is in amslatex.
>
> Org-mode will handle these environments, but you must require the  
> package in the header:
>
>
> #+LaTeX_HEADER: \usepackage{amslatex}
>
> Or add to org-export-latex-package-alist
>
> - Carsten
>
>

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

* Re: org-mode can not precess some LATEX environment
  2009-08-11  9:01     ` Carsten Dominik
@ 2009-08-11  9:29       ` waterloo
  2009-08-11  9:34         ` Scot Becker
  2009-08-11 13:41         ` Nick Dokos
  0 siblings, 2 replies; 11+ messages in thread
From: waterloo @ 2009-08-11  9:29 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


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

Excuse me .
I put the following latex code in an org file , and put point in it ,C-c
C-x  C-l.  It don't produce the correct image. There is only an square
appearing . The latex environment is include in amsmath package, which is
include in Org Format Latex Header defautly.


\begin{matrix}
1&d\\
d&d\\
\end{matrix}


Another question, I cannot understand the sentence.
`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. '

Thanks

2009/8/11 Carsten Dominik <carsten.dominik@gmail.com>

> So then, what do you mean by
>
>  "org-mode can not precess some LATEX environment"
>
> Please, if you want us to spend the time giving you the
> answer, put in the time to explain yourself clearly, if
> possible already in the initial post and not after two
> mails back and forth.  This will allow the experts in the
> group to spend their time efficiently, and it will also
> create better records in the mailing list archives.
>
> - Carsten
>
>
> On Aug 11, 2009, at 10:48 AM, waterloo wrote:
>
>  It is `amsmath' , not `amslatex' .
>> Org include amsmath defaultly .
>>
>>
>> 2009/8/11 Carsten Dominik <carsten.dominik@gmail.com>
>>
>> On Aug 11, 2009, at 10:37 AM, waterloo wrote:
>>
>> org-mode can not precess some LATEX environment .
>> Such as :
>> \begin{matrix}
>> \end{matrix}
>>
>> which is in amslatex.
>>
>> Org-mode will handle these environments, but you must require the package
>> in the header:
>>
>>
>> #+LaTeX_HEADER: \usepackage{amslatex}
>>
>> Or add to org-export-latex-package-alist
>>
>> - Carsten
>>
>>
>>
>

[-- Attachment #1.2: Type: text/html, Size: 2670 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: 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] 11+ messages in thread

* Re: org-mode can not precess some LATEX environment
  2009-08-11  9:29       ` waterloo
@ 2009-08-11  9:34         ` Scot Becker
  2009-08-11 13:41         ` Nick Dokos
  1 sibling, 0 replies; 11+ messages in thread
From: Scot Becker @ 2009-08-11  9:34 UTC (permalink / raw)
  To: waterloo; +Cc: emacs-orgmode, Carsten Dominik

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

This lists a series of conditions for recognizing $ as a math
delimiter, instead of as a dollar sign.

Basically, if you want it recognized as a math delimiter:
1.  don't make the text you enclose have more than two linebreaks
2.  don't put whitespace between your math and the $
3.  don't follow your $ with anything but whitespace or punctuation.

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

* Re: org-mode can not precess some LATEX environment
  2009-08-11  9:29       ` waterloo
  2009-08-11  9:34         ` Scot Becker
@ 2009-08-11 13:41         ` Nick Dokos
  2009-08-11 14:34           ` Carsten Dominik
  1 sibling, 1 reply; 11+ messages in thread
From: Nick Dokos @ 2009-08-11 13:41 UTC (permalink / raw)
  To: waterloo; +Cc: emacs-orgmode, Carsten Dominik

[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]

waterloo <waterloo2005@gmail.com> wrote:

> Excuse me .
> I put the following latex code in an org file , and put point in it ,C-c
> C-x  C-l.  It don't produce the correct image. There is only an square
> appearing . The latex environment is include in amsmath package, which is
> include in Org Format Latex Header defautly.
> 
> 
> \begin{matrix}
> 1&d\\
> d&d\\
> \end{matrix}
> 

I cannot be sure whether "waterloo" sees the same problem (from his
description, it seems that he gets just an empty square which indicates
additional/different problems - maybe missing the dvipng program?), but
I do see a problem.  Here is the org file:

,----
| #+LaTeX_HEADER: \usepackage{amsmath}
| 
| * foo
| 
| \[
| \begin{matrix}
| 1&d\\
| d&d\\
| \end{matrix}
| \]
| 
`----

I can export this to LaTeX just fine (and I need the additional header,
at least in that case - I have not tried without it). But when I try the
preview C-c C-x C-l on the fragment, I get the preview of the matrix
twice with an empty square separating the two instances.  I attach a PNG
image of the result. I checked the image that is produced in the ltxpng
subdirectory: it's just the image of the matrix, no problem there.

Thanks,
Nick



[-- Attachment #2: Preview of LaTeX matrix environment. --]
[-- Type: image/png, Size: 24812 bytes --]

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: 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] 11+ messages in thread

* Re: org-mode can not precess some LATEX environment
  2009-08-11 13:41         ` Nick Dokos
@ 2009-08-11 14:34           ` Carsten Dominik
  2009-08-11 14:50             ` waterloo
  2009-08-11 14:53             ` Nick Dokos
  0 siblings, 2 replies; 11+ messages in thread
From: Carsten Dominik @ 2009-08-11 14:34 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, waterloo


On Aug 11, 2009, at 3:41 PM, Nick Dokos wrote:

> waterloo <waterloo2005@gmail.com> wrote:
>
>> Excuse me .
>> I put the following latex code in an org file , and put point in  
>> it ,C-c
>> C-x  C-l.  It don't produce the correct image. There is only an  
>> square
>> appearing . The latex environment is include in amsmath package,  
>> which is
>> include in Org Format Latex Header defautly.
>>
>>
>> \begin{matrix}
>> 1&d\\
>> d&d\\
>> \end{matrix}
>>
>
> I cannot be sure whether "waterloo" sees the same problem (from his
> description, it seems that he gets just an empty square which  
> indicates
> additional/different problems - maybe missing the dvipng program?),

Yes, this seems to be a different problem.  Maybe the problem is  
thatthe matrix environment must be inside a math environment?


> but
> I do see a problem.  Here is the org file:
>
> ,----
> | #+LaTeX_HEADER: \usepackage{amsmath}

This is actually not necessary, I was mistaken here.

> |
> | * foo
> |
> | \[
> | \begin{matrix}
> | 1&d\\
> | d&d\\
> | \end{matrix}
> | \]
> |
> `----
>
> I can export this to LaTeX just fine (and I need the additional  
> header,
> at least in that case - I have not tried without it). But when I try  
> the
> preview C-c C-x C-l on the fragment, I get the preview of the matrix
> twice with an empty square separating the two instances.  I attach a  
> PNG
> image of the result. I checked the image that is produced in the  
> ltxpng
> subdirectory: it's just the image of the matrix, no problem there.

Hmm, another fun and interesting bug!

Fixed now.  Thanks.

- Carsten

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

* Re: org-mode can not precess some LATEX environment
  2009-08-11 14:34           ` Carsten Dominik
@ 2009-08-11 14:50             ` waterloo
  2009-08-11 16:42               ` Carsten Dominik
  2009-08-11 14:53             ` Nick Dokos
  1 sibling, 1 reply; 11+ messages in thread
From: waterloo @ 2009-08-11 14:50 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


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

The manual says math environment need not be in \[ \].
\[
\begin{matrix}
1&d\\
d&d\\
\end{matrix}
\]
When I put mouse point on `begin' , I can get preview image through C-c C-x
C-l.
When I put mouse point on `matrix' , I get two identical matrix with a
square between them.
When I put mouse point on `1&d' , I get a square and \[ at above \] at below
.

Thanks



2009/8/11 Carsten Dominik <carsten.dominik@gmail.com>

>
> On Aug 11, 2009, at 3:41 PM, Nick Dokos wrote:
>
>  waterloo <waterloo2005@gmail.com> wrote:
>>
>>  Excuse me .
>>> I put the following latex code in an org file , and put point in it ,C-c
>>> C-x  C-l.  It don't produce the correct image. There is only an square
>>> appearing . The latex environment is include in amsmath package, which is
>>> include in Org Format Latex Header defautly.
>>>
>>>
>>> \begin{matrix}
>>> 1&d\\
>>> d&d\\
>>> \end{matrix}
>>>
>>>
>> I cannot be sure whether "waterloo" sees the same problem (from his
>> description, it seems that he gets just an empty square which indicates
>> additional/different problems - maybe missing the dvipng program?),
>>
>
> Yes, this seems to be a different problem.  Maybe the problem is thatthe
> matrix environment must be inside a math environment?
>
>
>  but
>> I do see a problem.  Here is the org file:
>>
>> ,----
>> | #+LaTeX_HEADER: \usepackage{amsmath}
>>
>
> This is actually not necessary, I was mistaken here.
>
>  |
>> | * foo
>> |
>> | \[
>> | \begin{matrix}
>> | 1&d\\
>> | d&d\\
>> | \end{matrix}
>> | \]
>> |
>> `----
>>
>> I can export this to LaTeX just fine (and I need the additional header,
>> at least in that case - I have not tried without it). But when I try the
>> preview C-c C-x C-l on the fragment, I get the preview of the matrix
>> twice with an empty square separating the two instances.  I attach a PNG
>> image of the result. I checked the image that is produced in the ltxpng
>> subdirectory: it's just the image of the matrix, no problem there.
>>
>
> Hmm, another fun and interesting bug!
>
> Fixed now.  Thanks.
>
> - Carsten
>
>

[-- Attachment #1.2: Type: text/html, Size: 3291 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: 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] 11+ messages in thread

* Re: org-mode can not precess some LATEX environment
  2009-08-11 14:34           ` Carsten Dominik
  2009-08-11 14:50             ` waterloo
@ 2009-08-11 14:53             ` Nick Dokos
  1 sibling, 0 replies; 11+ messages in thread
From: Nick Dokos @ 2009-08-11 14:53 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, waterloo

Carsten Dominik <carsten.dominik@gmail.com> wrote:

> > but
> > I do see a problem.  Here is the org file:
> >
> > ,----
> > | #+LaTeX_HEADER: \usepackage{amsmath}
> 
> This is actually not necessary, I was mistaken here.
> 

It may not be necessary for preview, but it seems to be necessary for
export: no element of org-export-latex-classes includes
\usepackage{amsmath} and when I process the LaTeX file, I get errors
without it:

(./waterloo.out) (./waterloo.toc)
! Misplaced alignment tab character &.
l.28 1&
       d\\
! Misplaced alignment tab character &.
l.29 d&
       d\\
[1] (./waterloo.aux) )
(see the transcript file for additional information)

Thanks,
Nick

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

* Re: org-mode can not precess some LATEX environment
  2009-08-11 14:50             ` waterloo
@ 2009-08-11 16:42               ` Carsten Dominik
  0 siblings, 0 replies; 11+ messages in thread
From: Carsten Dominik @ 2009-08-11 16:42 UTC (permalink / raw)
  To: waterloo; +Cc: emacs-orgmode


On Aug 11, 2009, at 4:50 PM, waterloo wrote:

> The manual says math environment need not be in \[ \].

No, this is not what the manual says.

> \[
> \begin{matrix}
> 1&d\\
> d&d\\
> \end{matrix}
> \]
> When I put mouse point on `begin' , I can get preview image through  
> C-c C-x C-l.

Yes

> When I put mouse point on `matrix' , I get two identical matrix with  
> a square between them.

Not anymore after you update

> When I put mouse point on `1&d' , I get a square and \[ at above \]  
> at below .

Not anymore, I think.

But yes, this is in fact ambiguous since org parses out from point to  
see if it is inside a latex fragment.  So you need to put point to the  
right place in this case.  Or, to be on the safe side, do the whole  
subtree with `C-u C-c C-x C-l'.

- Carsten



>
> Thanks
>
>
>
> 2009/8/11 Carsten Dominik <carsten.dominik@gmail.com>
>
> On Aug 11, 2009, at 3:41 PM, Nick Dokos wrote:
>
> waterloo <waterloo2005@gmail.com> wrote:
>
> Excuse me .
> I put the following latex code in an org file , and put point in  
> it ,C-c
> C-x  C-l.  It don't produce the correct image. There is only an square
> appearing . The latex environment is include in amsmath package,  
> which is
> include in Org Format Latex Header defautly.
>
>
> \begin{matrix}
> 1&d\\
> d&d\\
> \end{matrix}
>
>
> I cannot be sure whether "waterloo" sees the same problem (from his
> description, it seems that he gets just an empty square which  
> indicates
> additional/different problems - maybe missing the dvipng program?),
>
> Yes, this seems to be a different problem.  Maybe the problem is  
> thatthe matrix environment must be inside a math environment?
>
>
>
> but
> I do see a problem.  Here is the org file:
>
> ,----
> | #+LaTeX_HEADER: \usepackage{amsmath}
>
> This is actually not necessary, I was mistaken here.
>
>
> |
> | * foo
> |
> | \[
> | \begin{matrix}
> | 1&d\\
> | d&d\\
> | \end{matrix}
> | \]
> |
> `----
>
> I can export this to LaTeX just fine (and I need the additional  
> header,
> at least in that case - I have not tried without it). But when I try  
> the
> preview C-c C-x C-l on the fragment, I get the preview of the matrix
> twice with an empty square separating the two instances.  I attach a  
> PNG
> image of the result. I checked the image that is produced in the  
> ltxpng
> subdirectory: it's just the image of the matrix, no problem there.
>
> Hmm, another fun and interesting bug!
>
> Fixed now.  Thanks.
>
> - Carsten
>
>

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

end of thread, other threads:[~2009-08-11 16:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-11  8:37 org-mode can not precess some LATEX environment waterloo
2009-08-11  8:44 ` Carsten Dominik
2009-08-11  8:48   ` waterloo
2009-08-11  9:01     ` Carsten Dominik
2009-08-11  9:29       ` waterloo
2009-08-11  9:34         ` Scot Becker
2009-08-11 13:41         ` Nick Dokos
2009-08-11 14:34           ` Carsten Dominik
2009-08-11 14:50             ` waterloo
2009-08-11 16:42               ` Carsten Dominik
2009-08-11 14:53             ` Nick Dokos

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