emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* question about org2blog and latex
@ 2012-03-15 15:42 Stephen J. Barr
  2012-03-15 16:51 ` Nick Dokos
  2012-03-15 17:38 ` Yagnesh Raghava Yakkala
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen J. Barr @ 2012-03-15 15:42 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I am working on blogging using org2blog, allowing me to update my
wordpress blog with org-mode. All is working well except latex. I was
expecting latex images but instead just get things like:

$latex z * k^\theta$

The header to my blogpost.org file has

#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:

Am I doing something wrong?

Thanks,
Stephen

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

* Re: question about org2blog and latex
  2012-03-15 15:42 question about org2blog and latex Stephen J. Barr
@ 2012-03-15 16:51 ` Nick Dokos
  2012-03-15 18:51   ` Puneeth Chaganti
  2012-03-15 17:38 ` Yagnesh Raghava Yakkala
  1 sibling, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2012-03-15 16:51 UTC (permalink / raw)
  To: Stephen J. Barr; +Cc: nicholas.dokos, emacs-orgmode

Stephen J. Barr <stephenjbarr@gmail.com> wrote:

> Hello,
> 
> I am working on blogging using org2blog, allowing me to update my
> wordpress blog with org-mode. All is working well except latex. I was
> expecting latex images but instead just get things like:
> 
> $latex z * k^\theta$
> 

Not sure what that latex is doing in there. The following works as normal
HTML for me:

--8<---------------cut here---------------start------------->8---
* foo
Here's a formula


$\int_0^\infty e^{-x^2} dx = {{\sqrt{\pi}}\over{2}}$

$latex z * k^\theta$
--8<---------------cut here---------------end--------------->8---

A few things: the default way to export fragments is through MathJax:
there may be some sort of a setup problem that prevents MathJax from
working with the blogging stuff.  You might want to fall back to
png images and see if that works better for you (you'll need dvipng),
although that's usually seen as a step back.

The preferred way to enter math in latex (and in org) is with \(...\)
for inline formulas and \[...\] for displayed ones. $...$ will work with
certain restrictions noted in the org docs (see below) for the inline
case, $$...$$ does *not* work for the displayed case (it's not even legal
LaTeX).

C-h v org-export-with-LaTeX-fragments RET has the details.

(info "(org) LaTeX fragments") has more on $...$, mathJax etc.

Nick


> The header to my blogpost.org file has
> 
> #+DESCRIPTION:
> #+KEYWORDS:
> #+LANGUAGE:  en
> #+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
> #+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
> #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
> path:http://orgmode.org/org-info.js
> #+EXPORT_SELECT_TAGS: export
> #+EXPORT_EXCLUDE_TAGS: noexport
> #+LINK_UP:
> #+LINK_HOME:
> #+XSLT:
> 
> Am I doing something wrong?
> 
> Thanks,
> Stephen
> 
o

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

* Re: question about org2blog and latex
  2012-03-15 15:42 question about org2blog and latex Stephen J. Barr
  2012-03-15 16:51 ` Nick Dokos
@ 2012-03-15 17:38 ` Yagnesh Raghava Yakkala
  1 sibling, 0 replies; 5+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-03-15 17:38 UTC (permalink / raw)
  To: Stephen J. Barr; +Cc: emacs-orgmode


Hi Stephen,

"Stephen J. Barr" <stephenjbarr@gmail.com> writes:

> Hello,
>
> I am working on blogging using org2blog, allowing me to update my
> wordpress blog with org-mode. All is working well except latex. I was
> expecting latex images but instead just get things like:
>
> $latex z * k^\theta$
>

I don't use org2blog myself. But I see org2blog parse org entry to wordpress
post.

(setq org2blog/wp-latex-to-wp nil)

if you put above may stop org2blog parse the latex bits. However original
author Puneeth will have better answers.

-- 
YYR

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

* Re: question about org2blog and latex
  2012-03-15 16:51 ` Nick Dokos
@ 2012-03-15 18:51   ` Puneeth Chaganti
  2012-03-15 20:46     ` Stephen J. Barr
  0 siblings, 1 reply; 5+ messages in thread
From: Puneeth Chaganti @ 2012-03-15 18:51 UTC (permalink / raw)
  To: Stephen J. Barr; +Cc: nicholas.dokos, emacs-orgmode

On Thu, Mar 15, 2012 at 10:21 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Stephen J. Barr <stephenjbarr@gmail.com> wrote:
>
>> Hello,
>>
>> I am working on blogging using org2blog, allowing me to update my
>> wordpress blog with org-mode. All is working well except latex. I was
>> expecting latex images but instead just get things like:
>>
>> $latex z * k^\theta$
>>
>
> Not sure what that latex is doing in there. The following works as normal
> HTML for me:
>
> --8<---------------cut here---------------start------------->8---
> * foo
> Here's a formula
>
>
> $\int_0^\infty e^{-x^2} dx = {{\sqrt{\pi}}\over{2}}$
>
> $latex z * k^\theta$
> --8<---------------cut here---------------end--------------->8---
>
> A few things: the default way to export fragments is through MathJax:
> there may be some sort of a setup problem that prevents MathJax from
> working with the blogging stuff.  You might want to fall back to
> png images and see if that works better for you (you'll need dvipng),
> although that's usually seen as a step back.

I'd like to clarify that the initial implementation of org2blog, IIRC,
did make use of the png images and upload them to the blog.  Sometime,
later support was added to support Wordpress's LaTeX plugin. To render
your LaTeX using this, in your wordpress blog, just set the variable
`org2blog/wp-use-wp-latex`.  [Btw, I hope you are indeed talking about
org to wordpress org2blog. There's another one that publishes to
blogspot, with the same name.]

> The preferred way to enter math in latex (and in org) is with \(...\)
> for inline formulas and \[...\] for displayed ones. $...$ will work with
> certain restrictions noted in the org docs (see below) for the inline
> case, $$...$$ does *not* work for the displayed case (it's not even legal
> LaTeX).
>
> C-h v org-export-with-LaTeX-fragments RET has the details.
>
> (info "(org) LaTeX fragments") has more on $...$, mathJax etc.

Also, all of these ways which do work with HTML export should work
with the org2blog.  Also, thanks Nick for the detailed answer. :)

HTH,
Puneeth

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

* Re: question about org2blog and latex
  2012-03-15 18:51   ` Puneeth Chaganti
@ 2012-03-15 20:46     ` Stephen J. Barr
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen J. Barr @ 2012-03-15 20:46 UTC (permalink / raw)
  To: Puneeth Chaganti; +Cc: nicholas.dokos, emacs-orgmode

Thanks for the help. I just checked the variables and
org2blog/wp-use-wp-latex was set, but the wp-latex plugin was not
installed :) All is working now, although it is definitely a little
grainy. But, it'll certainly lead to an awesome series of blog posts
nonetheless. Puneeth, thank you so much for the fantastic plugin.

One other quick question: Does org-mode and org2blog work with
numbered equations and equation references? If so, could someone
provide a simple example?

Thanks,
Stephen

On Thu, Mar 15, 2012 at 2:51 PM, Puneeth Chaganti <punchagan@gmail.com> wrote:
> On Thu, Mar 15, 2012 at 10:21 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
>> Stephen J. Barr <stephenjbarr@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I am working on blogging using org2blog, allowing me to update my
>>> wordpress blog with org-mode. All is working well except latex. I was
>>> expecting latex images but instead just get things like:
>>>
>>> $latex z * k^\theta$
>>>
>>
>> Not sure what that latex is doing in there. The following works as normal
>> HTML for me:
>>
>> --8<---------------cut here---------------start------------->8---
>> * foo
>> Here's a formula
>>
>>
>> $\int_0^\infty e^{-x^2} dx = {{\sqrt{\pi}}\over{2}}$
>>
>> $latex z * k^\theta$
>> --8<---------------cut here---------------end--------------->8---
>>
>> A few things: the default way to export fragments is through MathJax:
>> there may be some sort of a setup problem that prevents MathJax from
>> working with the blogging stuff.  You might want to fall back to
>> png images and see if that works better for you (you'll need dvipng),
>> although that's usually seen as a step back.
>
> I'd like to clarify that the initial implementation of org2blog, IIRC,
> did make use of the png images and upload them to the blog.  Sometime,
> later support was added to support Wordpress's LaTeX plugin. To render
> your LaTeX using this, in your wordpress blog, just set the variable
> `org2blog/wp-use-wp-latex`.  [Btw, I hope you are indeed talking about
> org to wordpress org2blog. There's another one that publishes to
> blogspot, with the same name.]
>
>> The preferred way to enter math in latex (and in org) is with \(...\)
>> for inline formulas and \[...\] for displayed ones. $...$ will work with
>> certain restrictions noted in the org docs (see below) for the inline
>> case, $$...$$ does *not* work for the displayed case (it's not even legal
>> LaTeX).
>>
>> C-h v org-export-with-LaTeX-fragments RET has the details.
>>
>> (info "(org) LaTeX fragments") has more on $...$, mathJax etc.
>
> Also, all of these ways which do work with HTML export should work
> with the org2blog.  Also, thanks Nick for the detailed answer. :)
>
> HTH,
> Puneeth

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

end of thread, other threads:[~2012-03-15 20:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 15:42 question about org2blog and latex Stephen J. Barr
2012-03-15 16:51 ` Nick Dokos
2012-03-15 18:51   ` Puneeth Chaganti
2012-03-15 20:46     ` Stephen J. Barr
2012-03-15 17:38 ` Yagnesh Raghava Yakkala

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