Peter Davis | 15 Nov 23:41

Working on Windows and Mac

I'm trying to set up Muse so I can work on either a Windows 7 machine or a Mac.  One problem I've run into is that on the Mac, when Muse creates a new file (from my clicking on a new link), the file does not have a .muse extension, so C-c C-p doesn't work, etc.


Anyone know a workaround for this?

Thanks!

-pd


--
----
The Tech Curmudgeon


Alex Ott | 16 Nov 07:00
Picon
Gravatar

Re: Working on Windows and Mac

Hi Peter

Which muse version are you using? I think, that I know what is a
problem - when you have project defined, then everything works fine,
and new file is created with correct file extension, while when the
source file isn't in project, then new file is created without this
extension. I'll try to provide workaround for this problem

On Tue, Nov 15, 2011 at 11:41 PM, Peter Davis <pfd <at> pfdstudio.com> wrote:
> I'm trying to set up Muse so I can work on either a Windows 7 machine or a
> Mac.  One problem I've run into is that on the Mac, when Muse creates a new
> file (from my clicking on a new link), the file does not have a .muse
> extension, so C-c C-p doesn't work, etc.
> Anyone know a workaround for this?
> Thanks!
> -pd
>
>
> --
> ----
> The Tech Curmudgeon
> http://www.techcurmudgeon.com
>
>
> _______________________________________________
> Muse-el-discuss mailing list
> Muse-el-discuss <at> gna.org
> https://mail.gna.org/listinfo/muse-el-discuss
>
>

--

-- 
With best wishes,                    Alex Ott
http://alexott.net/
Tiwtter: alexott_en (English), alexott (Russian)
Skype: alex.ott

Alex Ott | 16 Nov 07:21
Picon
Gravatar

Re: Working on Windows and Mac

Please, look onto version at https://github.com/alexott/muse

On Wed, Nov 16, 2011 at 7:00 AM, Alex Ott <alexott <at> gmail.com> wrote:
> Hi Peter
>
> Which muse version are you using? I think, that I know what is a
> problem - when you have project defined, then everything works fine,
> and new file is created with correct file extension, while when the
> source file isn't in project, then new file is created without this
> extension. I'll try to provide workaround for this problem
>
> On Tue, Nov 15, 2011 at 11:41 PM, Peter Davis <pfd <at> pfdstudio.com> wrote:
>> I'm trying to set up Muse so I can work on either a Windows 7 machine or a
>> Mac.  One problem I've run into is that on the Mac, when Muse creates a new
>> file (from my clicking on a new link), the file does not have a .muse
>> extension, so C-c C-p doesn't work, etc.
>> Anyone know a workaround for this?
>> Thanks!
>> -pd
>>
>>
>> --
>> ----
>> The Tech Curmudgeon
>> http://www.techcurmudgeon.com
>>
>>
>> _______________________________________________
>> Muse-el-discuss mailing list
>> Muse-el-discuss <at> gna.org
>> https://mail.gna.org/listinfo/muse-el-discuss
>>
>>
>
>
>
> --
> With best wishes,                    Alex Ott
> http://alexott.net/
> Tiwtter: alexott_en (English), alexott (Russian)
> Skype: alex.ott
>

--

-- 
With best wishes,                    Alex Ott
http://alexott.net/
Tiwtter: alexott_en (English), alexott (Russian)
Skype: alex.ott

Peter Davis | 17 Nov 04:59

Re: Working on Windows and Mac

Thanks, Alex.  I've been using 3.12.  I'll try upgrading and see how that works.


Thanks!

-pd


On Wed, Nov 16, 2011 at 1:21 AM, Alex Ott <alexott <at> gmail.com> wrote:
Please, look onto version at https://github.com/alexott/muse

On Wed, Nov 16, 2011 at 7:00 AM, Alex Ott <alexott <at> gmail.com> wrote:
> Hi Peter
>
> Which muse version are you using? I think, that I know what is a
> problem - when you have project defined, then everything works fine,
> and new file is created with correct file extension, while when the
> source file isn't in project, then new file is created without this
> extension. I'll try to provide workaround for this problem
>
> On Tue, Nov 15, 2011 at 11:41 PM, Peter Davis <pfd <at> pfdstudio.com> wrote:
>> I'm trying to set up Muse so I can work on either a Windows 7 machine or a
>> Mac.  One problem I've run into is that on the Mac, when Muse creates a new
>> file (from my clicking on a new link), the file does not have a .muse
>> extension, so C-c C-p doesn't work, etc.
>> Anyone know a workaround for this?
>> Thanks!
>> -pd
>>
>>
>> --
>> ----
>> The Tech Curmudgeon
>> http://www.techcurmudgeon.com
>>
>>
>> _______________________________________________
>> Muse-el-discuss mailing list
>> Muse-el-discuss <at> gna.org
>> https://mail.gna.org/listinfo/muse-el-discuss
>>
>>
>
>
>
> --
> With best wishes,                    Alex Ott
> http://alexott.net/
> Tiwtter: alexott_en (English), alexott (Russian)
> Skype: alex.ott
>



--
With best wishes,                    Alex Ott
http://alexott.net/
Tiwtter: alexott_en (English), alexott (Russian)
Skype: alex.ott

_______________________________________________
Muse-el-discuss mailing list
Muse-el-discuss <at> gna.org
https://mail.gna.org/listinfo/muse-el-discuss



--
----
The Tech Curmudgeon


Leo Butler | 18 Nov 22:21

Muse and mathjax

Hi,
I am a muse-mode newbie. 95% of my work is done with LaTeX, and I have
been looking around to see if I could find a system that offers a 2nd
language extension of the La/TeX macro languages as well as build
html as easily as dvi or pdf. So far, I have found Muse satisfies these
needs nicely. A big thanks to the developers.

Here's my question: at the moment, when publishing to html, material in
<math> or <latex> environments are rendered as images. However, MathJaX
offers a nicer alternative: it uses Javascript to render mathmode La/TeX
code in the browser.

Is there existing code that lets one take advantage of this? 

In case not, there is really not much to be done here, as the La/TeX
code in a MathJaX-enabled page is just 'raw text' delimited by \[ \] or
\( \).

http://www.mathjax.org/demos/tex-samples/
http://www.mathjax.org/

Cheers,
Leo

Michael Olson | 18 Nov 23:43
Picon
Picon

Re: Muse and mathjax

Very cool stuff.  You could probably modify lisp/muse-latex2png.el,
the muse-publish-math-tag function, to get <math> working with
MathJax.  Instead of '$', insert '\[' and '\]', and drop the
muse-latex2png-region call, replacing with
muse-publish-mark-read-only.  If you want it to work with either
LaTeX/ConTeXt or HTML (which would be necessary to get the patch
included with Muse), conditionally insert either '$' or the usual
MathJax delimiters depending on the derived style, perhaps making a
new mathjax-html style or similar to handle the default header.

On Fri, Nov 18, 2011 at 1:21 PM, Leo Butler <l.butler <at> cmich.edu> wrote:
> Hi,
> I am a muse-mode newbie. 95% of my work is done with LaTeX, and I have
> been looking around to see if I could find a system that offers a 2nd
> language extension of the La/TeX macro languages as well as build
> html as easily as dvi or pdf. So far, I have found Muse satisfies these
> needs nicely. A big thanks to the developers.
>
> Here's my question: at the moment, when publishing to html, material in
> <math> or <latex> environments are rendered as images. However, MathJaX
> offers a nicer alternative: it uses Javascript to render mathmode La/TeX
> code in the browser.
>
> Is there existing code that lets one take advantage of this?
>
> In case not, there is really not much to be done here, as the La/TeX
> code in a MathJaX-enabled page is just 'raw text' delimited by \[ \] or
> \( \).
>
> http://www.mathjax.org/demos/tex-samples/
> http://www.mathjax.org/
>
> Cheers,
> Leo
>
>
> _______________________________________________
> Muse-el-discuss mailing list
> Muse-el-discuss <at> gna.org
> https://mail.gna.org/listinfo/muse-el-discuss
>

--

-- 
Michael Olson  |  http://mwolson.org/

_______________________________________________
Muse-el-discuss mailing list
Muse-el-discuss <at> gna.org
https://mail.gna.org/listinfo/muse-el-discuss
Leo Butler | 21 Nov 13:55

Re: Muse and mathjax

Michael Olson <mwolson <at> gnu.org> writes:

> Very cool stuff.  You could probably modify lisp/muse-latex2png.el,
> the muse-publish-math-tag function, to get <math> working with
> MathJax.  Instead of '$', insert '\[' and '\]', and drop the
> muse-latex2png-region call, replacing with
> muse-publish-mark-read-only.  If you want it to work with either
> LaTeX/ConTeXt or HTML (which would be necessary to get the patch
> included with Muse), conditionally insert either '$' or the usual
> MathJax delimiters depending on the derived style, perhaps making a
> new mathjax-html style or similar to handle the default header.

Thanks for the encouragement, I cloned Alex Ott's github repo (which I
think is the project's repo), and worked from HEAD. I am not sure how this
project accepts patches, but I have included it below. 

Comments:

-I have pulled the logic for choosing math delimiters out of
 muse-publish-math-tag and added 4 customizable variables to help set
 the delimiters depending on the style. The function
 muse-publish-latex-delimiters chooses the correct delimiters.

-I have also added a variable muse-publish-latex-tag-as-is that lists
 which styles publish latex code as-is, and a function of the same name
 to query this list. The removes some hard-coded constants in
 muse-publish-{latex,math}-tag.

-The MathJaX source url and configuration are set in customizable
 variables, and these are added to the standard html header.

See
http://pe120.mth.cmich.edu/~lbutler/demo.html
for an example (the document includes its own Muse source).

Leo

Attachment (diff.patch): text/x-diff, 8 KiB
Leo Butler | 21 Nov 15:35

Re: Muse and mathjax

I forked Alex Ott's github repository and created a mathjax branch on
the fork with my contribution:

git://github.com/leo-butler/muse.git

Leo

Michael Olson | 21 Nov 16:29
Picon
Picon

Re: Muse and mathjax

You may want to put the content of muse-latex2mathjax.el inside of
muse-latex.el instead, and drop the new file.  I don't know why I put
latex2png in its own separate file to begin with.  Also, it looks like
the changes aren't yet present in the github repo; may need to push
them.  Otherwise looks good.

On Mon, Nov 21, 2011 at 4:55 AM, Leo Butler <l.butler <at> cmich.edu> wrote:
> Michael Olson <mwolson <at> gnu.org> writes:
>
>> Very cool stuff.  You could probably modify lisp/muse-latex2png.el,
>> the muse-publish-math-tag function, to get <math> working with
>> MathJax.  Instead of '$', insert '\[' and '\]', and drop the
>> muse-latex2png-region call, replacing with
>> muse-publish-mark-read-only.  If you want it to work with either
>> LaTeX/ConTeXt or HTML (which would be necessary to get the patch
>> included with Muse), conditionally insert either '$' or the usual
>> MathJax delimiters depending on the derived style, perhaps making a
>> new mathjax-html style or similar to handle the default header.
>
> Thanks for the encouragement, I cloned Alex Ott's github repo (which I
> think is the project's repo), and worked from HEAD. I am not sure how this
> project accepts patches, but I have included it below.
>
> Comments:
>
> -I have pulled the logic for choosing math delimiters out of
>  muse-publish-math-tag and added 4 customizable variables to help set
>  the delimiters depending on the style. The function
>  muse-publish-latex-delimiters chooses the correct delimiters.
>
> -I have also added a variable muse-publish-latex-tag-as-is that lists
>  which styles publish latex code as-is, and a function of the same name
>  to query this list. The removes some hard-coded constants in
>  muse-publish-{latex,math}-tag.
>
> -The MathJaX source url and configuration are set in customizable
>  variables, and these are added to the standard html header.
>
> See
> http://pe120.mth.cmich.edu/~lbutler/demo.html
> for an example (the document includes its own Muse source).
>
> Leo
>
>
>
> _______________________________________________
> Muse-el-discuss mailing list
> Muse-el-discuss <at> gna.org
> https://mail.gna.org/listinfo/muse-el-discuss
>
>

--

-- 
Michael Olson  |  http://mwolson.org/

_______________________________________________
Muse-el-discuss mailing list
Muse-el-discuss <at> gna.org
https://mail.gna.org/listinfo/muse-el-discuss
Leo Butler | 21 Nov 19:17

Re: Muse and mathjax

Michael Olson <mwolson <at> gnu.org> writes:

> You may want to put the content of muse-latex2mathjax.el inside of
> muse-latex.el instead, and drop the new file.

mathjax-html is a style derived from html, so it probably makes sense to
put the style & header bits into muse-html.el. On the other hand, the
delimiters and associated functions could go into muse-latex2png.el,
since they directly affect the operations there. Although that file
would be ill-named.

I'll make whichever changes you prefer.

> I don't know why I put
> latex2png in its own separate file to begin with.  Also, it looks like
> the changes aren't yet present in the github repo; may need to push
> them.

They are there, or at least I can see them. Did you change to the
mathjax branch?

> Otherwise looks good.

Thanks.

Leo

Michael Olson | 21 Nov 20:05
Picon
Picon

Re: Muse and mathjax

On Mon, Nov 21, 2011 at 10:17 AM, Leo Butler <l.butler <at> cmich.edu> wrote:
> Michael Olson <mwolson <at> gnu.org> writes:
>
>> You may want to put the content of muse-latex2mathjax.el inside of
>> muse-latex.el instead, and drop the new file.
>
> mathjax-html is a style derived from html, so it probably makes sense to
> put the style & header bits into muse-html.el. On the other hand, the
> delimiters and associated functions could go into muse-latex2png.el,
> since they directly affect the operations there. Although that file
> would be ill-named.
>
> I'll make whichever changes you prefer.

That's true.  Maybe a muse-mathjax.el file is called for instead,
then, instead of "latex2mathjax".  I think I'd prefer for the
delimiter vars/fun to be in muse-latex.el.

>> I don't know why I put
>> latex2png in its own separate file to begin with.  Also, it looks like
>> the changes aren't yet present in the github repo; may need to push
>> them.
>
> They are there, or at least I can see them. Did you change to the
> mathjax branch?

Ah, I thought they would be in master.

--

-- 
Michael Olson  |  http://mwolson.org/

_______________________________________________
Muse-el-discuss mailing list
Muse-el-discuss <at> gna.org
https://mail.gna.org/listinfo/muse-el-discuss
Leo Butler | 22 Nov 17:27

Re: Muse and mathjax

Michael Olson <mwolson <at> gnu.org> writes:

> On Mon, Nov 21, 2011 at 10:17 AM, Leo Butler <l.butler <at> cmich.edu> wrote:
>> Michael Olson <mwolson <at> gnu.org> writes:
>>
>>> You may want to put the content of muse-latex2mathjax.el inside of
>>> muse-latex.el instead, and drop the new file.
>>
>> mathjax-html is a style derived from html, so it probably makes sense to
>> put the style & header bits into muse-html.el. On the other hand, the
>> delimiters and associated functions could go into muse-latex2png.el,
>> since they directly affect the operations there. Although that file
>> would be ill-named.
>>
>> I'll make whichever changes you prefer.
>
> That's true.  Maybe a muse-mathjax.el file is called for instead,
> then, instead of "latex2mathjax".  I think I'd prefer for the
> delimiter vars/fun to be in muse-latex.el.

I have made the changes you suggested. The HEAD of the mathjax branch
at git://github.com:leo-butler/muse.git has those changes in it. I have
also put in some documentation, too.

Attached are patch files to add this code and the documentation to the
current HEAD of master. Leo

Attachment (diff.patch): text/x-diff, 9 KiB
Attachment (doc.patch): text/x-diff, 3087 bytes
Phillip Lord | 21 Nov 10:53
Picon
Picon
Favicon
Gravatar

Re: Muse and mathjax


Leo Butler <l.butler <at> cmich.edu> writes:
> Here's my question: at the moment, when publishing to html, material in
> <math> or <latex> environments are rendered as images. However, MathJaX
> offers a nicer alternative: it uses Javascript to render mathmode La/TeX
> code in the browser.
>
> Is there existing code that lets one take advantage of this? 
>
> In case not, there is really not much to be done here, as the La/TeX
> code in a MathJaX-enabled page is just 'raw text' delimited by \[ \] or
> \( \).
>
> http://www.mathjax.org/demos/tex-samples/
> http://www.mathjax.org/

I wrote mathjax support for Wordpress a while, and it's pretty trivial
to do. Pretty much all that you need is to stop muse doing anything
clever with the maths and pass it straight-through. Then add a single
line to the footer, pointing to mathjax and you are done. 

The only disadvantage with mathjax is that you can't inline it in a
meaningful way. Also mathjax is pretty large, so ideally you need to
detect maths usage in a page and only inject the JS if you need to. This
was not hard in wordpress and should be straight-forward for muse also. 

Phil


Gmane