Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-14 Thread Rasmus
Eric S Fraga  writes:

> On Wednesday, 14 Oct 2015 at 14:58, Rasmus wrote:
>> Eric S Fraga  writes:
>>
>
>>> I don't believe the default is to export to mathml.  At least, for me,
>>> this doesn't happen.
>>
>> For me, when I eval the following from emacs -q I get odt.
>>
>> (require 'ox-odt)
>> (setq org-latex-to-mathml-convert-command
>>   "latexmlmath \"%i\" --presentationmathml=%o")
>>
>> E.g. export: \(x\).
>
> I get:
>
> ,
> | LaTeX to MathML converter not available.
> | Formatting LaTeX using verbatim
> `

This is triggered if (org-format-latex-mathml-available-p) returns nil.
Go through each step of this function (in org.el).  My guess is that
latexmlmath is not in your PATH, at least according to Emacs...

-- 
Together we will make the possible totay impossible!



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-14 Thread Eric S Fraga
On Wednesday, 14 Oct 2015 at 16:18, Rasmus wrote:
> This is triggered if (org-format-latex-mathml-available-p) returns nil.
> Go through each step of this function (in org.el).  My guess is that
> latexmlmath is not in your PATH, at least according to Emacs...

Got it!  org-latex-to-mathml-convert-command is one of those variables
that has to be either set globally (which I don't want) or I have to use
#+bind:.  Setting it locally is no good!

Works very well now!

Thanks for all the help,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-14 Thread Eric S Fraga
On Monday, 12 Oct 2015 at 09:34, Rasmus wrote:

[...]

> I haven't followed the thread, but ox-odt should export to mathml by
> default.  I use this to produce mathml:
>
> (setq org-latex-to-mathml-convert-command
> "latexmlmath \"%i\" --presentationmathml=%o")
>
> Rasmus

Hi Rasmus,

thanks for the above.

I don't believe the default is to export to mathml.  At least, for me,
this doesn't happen.  But, to be brutally honest, I'm more than a little
confused about what is possible or not in ODT export.  I don't use it
often, mostly because almost all of my documents have some maths in
LaTeX form, but there are indeed cases where it would be nice to have
the capability of exporting maths to ODT.

Setting the variable mentioned above doesn't work for me either.  I had
to install the latexml package (on Ubuntu) to have the command available
but I don't know where to get the jar file that may be needed
(cf. org-latex-to-mathml-jar-file).  Any help in this regard would be
welcome.  Searching the mailing list doesn't bring up anything useful.

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-14 Thread Rasmus
Eric S Fraga  writes:

> I don't believe the default is to export to mathml.  At least, for me,
> this doesn't happen.

For me, when I eval the following from emacs -q I get odt.

(require 'ox-odt)
(setq org-latex-to-mathml-convert-command
  "latexmlmath \"%i\" --presentationmathml=%o")

E.g. export: \(x\).

> But, to be brutally honest, I'm more than a little confused about what
> is possible or not in ODT export.  I don't use it often, mostly because
> almost all of my documents have some maths in LaTeX form, but there are
> indeed cases where it would be nice to have the capability of exporting
> maths to ODT.

It’s getting better.  I exported a large document recently, and Nicolas
fixed a lot of bugs.

> Setting the variable mentioned above doesn't work for me either.  I had
> to install the latexml package (on Ubuntu) to have the command available
> but I don't know where to get the jar file that may be needed
> (cf. org-latex-to-mathml-jar-file).

None.  At least two methods are supported: latexmlmath and some .jar file,
perhaps mathtoweb.jar or something like that?

> Any help in this regard would be welcome.  Searching the mailing list
> doesn't bring up anything useful.

Run from emacs -q and check your *messages*.  You should see something
like this in the buffer:

 Formatting LaTeX using mathml
 Creating MathML snippet 1...
 Wrote /tmp/ltxmathml-in5102GLn
 Running latexmlmath "\(x\)" --presentationmathml=ltxmathml-out5102TVt
 Using vacuous schema
 Wrote 
/tmp/ltxmathml/test-formula-27f4fea30995c43e0894e19929353bf9fa8957cb.mathml
 Embedding 
/tmp/ltxmathml/test-formula-27f4fea30995c43e0894e19929353bf9fa8957cbm.

Rasmus

-- 
Spil noget med Slayer!



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-14 Thread Eric S Fraga
On Wednesday, 14 Oct 2015 at 14:58, Rasmus wrote:
> Eric S Fraga  writes:
>
>> I don't believe the default is to export to mathml.  At least, for me,
>> this doesn't happen.
>
> For me, when I eval the following from emacs -q I get odt.
>
> (require 'ox-odt)
> (setq org-latex-to-mathml-convert-command
>   "latexmlmath \"%i\" --presentationmathml=%o")
>
> E.g. export: \(x\).

I get:

,
| LaTeX to MathML converter not available.
| Formatting LaTeX using verbatim
`

I do not get:

> Run from emacs -q and check your *messages*.  You should see something
> like this in the buffer:
>
>  Formatting LaTeX using mathml
>  Creating MathML snippet 1...
>  Wrote /tmp/ltxmathml-in5102GLn
>  Running latexmlmath "\(x\)" --presentationmathml=ltxmathml-out5102TVt
>  Using vacuous schema
>  Wrote
> /tmp/ltxmathml/test-formula-27f4fea30995c43e0894e19929353bf9fa8957cb.mathml
>  Embedding
> /tmp/ltxmathml/test-formula-27f4fea30995c43e0894e19929353bf9fa8957cbm.

I am using org from git, fairly recent version.

There must be some other configuration setting, maybe something outside
org that enables latexml to work?

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-12 Thread Rasmus
Eric S Fraga  writes:

> On Monday, 12 Oct 2015 at 08:49, Enzo Chi wrote:
>
> [...]
>
>> Thanks Eric, that solved the preview issue. But when export it to ODT
>> file, the image is still as bad as the one I post before. (Export to PDF
>> is fine). 
>
> One step forward at least...  with respect to ODT export, I'm not best
> placed to answer this.  Maybe somebody else can chime in?  My equations
> come out fine when I export to ODT but I don't have anything customised
> that I can see.  Maybe check the org-odt- variables?

I haven't followed the thread, but ox-odt should export to mathml by
default.  I use this to produce mathml:

(setq org-latex-to-mathml-convert-command
"latexmlmath \"%i\" --presentationmathml=%o")

Rasmus

-- 
Governments should be afraid of their people




Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-12 Thread Eric S Fraga
On Monday, 12 Oct 2015 at 08:49, Enzo Chi wrote:

[...]

> Thanks Eric, that solved the preview issue. But when export it to ODT
> file, the image is still as bad as the one I post before. (Export to PDF
> is fine). 

One step forward at least...  with respect to ODT export, I'm not best
placed to answer this.  Maybe somebody else can chime in?  My equations
come out fine when I export to ODT but I don't have anything customised
that I can see.  Maybe check the org-odt- variables?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3beta-1229-ge900eb



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-11 Thread Enzo Chi
Eric S Fraga  writes:

> On Friday,  9 Oct 2015 at 09:25, Enzo Chi wrote:
>> I tried that "\begin{align}...\end{align}" code with "C-c C-x C-l", it
>>  generate a very back quality image like this:
>
> What settings do you have for image creation in org?  What is
> org-latex-create-formula-image-program?  
>
> For instance, I have the following settings:
>
> #+begin_src emacs-lisp :results none
>   (setq org-format-latex-options '(:foreground "white" :background "black" 
> :scale 3 :html-foreground "Black" :html-background "Transparent" :html-scale 
> 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
> org-latex-create-formula-image-program 'imagemagick
> )
> #+end_src
>
> and I get something along these lines:
>
>
>
>
> You'll probably not want to change the foreground and background colours
> if you have a light background emacs theme.
>
> The quality of the image may also be a function of your LaTeX default
> packages and fonts.

Thanks Eric, that solved the preview issue. But when export it to ODT
file, the image is still as bad as the one I post before. (Export to PDF
is fine). 




Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-09 Thread Eric S Fraga
On Friday,  9 Oct 2015 at 09:25, Enzo Chi wrote:
> I tried that "\begin{align}...\end{align}" code with "C-c C-x C-l", it
>   generate a very back quality image like this:

What settings do you have for image creation in org?  What is
org-latex-create-formula-image-program?  

For instance, I have the following settings:

#+begin_src emacs-lisp :results none
  (setq org-format-latex-options '(:foreground "white" :background "black" 
:scale 3 :html-foreground "Black" :html-background "Transparent" :html-scale 
1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
org-latex-create-formula-image-program 'imagemagick
)
#+end_src

and I get something along these lines:


You'll probably not want to change the foreground and background colours
if you have a light background emacs theme.

The quality of the image may also be a function of your LaTeX default
packages and fonts.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25


Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-08 Thread Enzo Chi
I tried that "\begin{align}...\end{align}" code with "C-c C-x C-l", it
generate a very back quality image like this:



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-09-30 Thread Andreas Leha
Rainer M Krug  writes:
> Eric S Fraga  writes:
>
>> On Monday, 28 Sep 2015 at 21:10, Rainer M Krug wrote:
>>> Hi
>>>
>>> I would need in a document several equations which are aligned as in 
>>> http://tex.stackexchange.com/a/167908/6941
>>
>> I use align all the time.
>>
>>> How can I use the following latex formula in orgmode?
>>>
>>> \begin{proof} The proof is a follows: 
>>> \begin{align}
>>> (x+y)^3&=(x+y)(x+y)^2\\
>>>&=(x+y)(x^2+2xy+y^2)\\
>>>&=x^3+3x^2y+3xy^3+x^3.\qedhere
>>> \end{align}
>>> \end{proof}
>>
>> Where is proof defined? You may need to add specific packages to
>> org-latex-packages-alist.
>
> The proof and the ".\qedhere"
>
> Stupid typos.
>
>>
>> In any case, I find that it is safer generally to enclose all LaTeX
>> fragments in a LaTeX block: #+begin_latex ... #+end_latex.
>
> Good idea - but then the preview does not work anymore?
>

see http://orgmode.org/worg/org-hacks.html#orgheadline91

Best,
Andreas




[O] SOLVED: LaTeX equation align in orgmode?

2015-09-29 Thread Rainer M Krug
Eric S Fraga  writes:

> On Monday, 28 Sep 2015 at 21:10, Rainer M Krug wrote:
>> Hi
>>
>> I would need in a document several equations which are aligned as in 
>> http://tex.stackexchange.com/a/167908/6941
>
> I use align all the time.
>
>> How can I use the following latex formula in orgmode?
>>
>> \begin{proof} The proof is a follows: 
>> \begin{align}
>> (x+y)^3&=(x+y)(x+y)^2\\
>>&=(x+y)(x^2+2xy+y^2)\\
>>&=x^3+3x^2y+3xy^3+x^3.\qedhere
>> \end{align}
>> \end{proof}
>
> Where is proof defined? You may need to add specific packages to
> org-latex-packages-alist.

The proof and the ".\qedhere"

Stupid typos.

>
> In any case, I find that it is safer generally to enclose all LaTeX
> fragments in a LaTeX block: #+begin_latex ... #+end_latex.

Good idea - but then the preview does not work anymore?

Sorry for the noise and thanks,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature