public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Inserting  extra class attribute in <span class="math inline">latex </span> (notranslate for eg.)
@ 2017-01-26 13:53 Federer Fanatic
       [not found] ` <8c5a97e3-2603-4aa5-a820-7180a4b008b2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Federer Fanatic @ 2017-01-26 13:53 UTC (permalink / raw)
  To: pandoc-discuss


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

I had originally posted the topic below 
in: https://github.com/jgm/pandoc/issues/3381, for convenience i repeat it 
here

                   AND 

I asked a question on the email list of luatex:

=================================== mail to luatex list ================
Basically have complete mathml markup or some other kind of html math output
that is completely capable of doing what is now done for pdf output. This 
would 

elminate the need for the clumsy workarounds that mathjax, for example, 

provides---there appears to be no easy way to convert arbitarilly/personally

written latex packages/classes into something that mathjax can understand. 

Obviously the original latex code could still remain in the resulting 
html/math

output so that people would still have access to the "original" source code.

One of my motivations is to allow for google translate to work on html
math documents...


    it WORKS provided you add 'notranslate' to the 'class' option of the 
spans:


  <class="math display">latex math commands/span>


similarly for "math inline"


However LaTeX commands that mathjax is not familiar
with are not rendered ... I regard that project, while laudable, wrong

headed as the real problem should be solved by a proper TeX engine such as 
luatex?

===================== end of email to the luatex dev list 
-------------------------------------


Someone on the the luatex  list suggested that ConTeXt might be the way to 
go via a TeXlike engine...


---------------- Getting back to a solution via pandoc 
-----------------------------------



I succeeded in getting this to work with --mathjax option of pandoc to get 
a nicely rendered
document in html/mathjax, however as noted above when one does this with, 
say, a french
latex file with the goal to translate this into english while preserving 
the latex google translate

mangles the math, unless one does the "notranslate" argument as described 
above.


Is this the best solution?


One of my primary goals is then translate LaTeX/heavy math document into 
LaTeX/English/Math documents.


So to summarise I have done:


   LaTeX file in Language A --> convert to html/js/mathjax using pandoc---> 
Edit resulting file and put in 'no translate'

   argument of <span> -----> Put into  Google translate


  I have not tried the final step (which is obviously easy) of converting 
the result of Google translate into English.


Using Pandoc I suspect constructing a filter would achieve the goal (it's 
easy enough to create a oneline perl -ne command, but...)


So is  http://pandoc.org/scripting.html 
<https://github.com/jgm/pandoc/issues/url> ?


On a different tangent .....

===============================================================================


Someone on the pandoc the dev list of luatex suggests that ConTeXt can 
achieve my goals directly?



-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8c5a97e3-2603-4aa5-a820-7180a4b008b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Inserting  extra class attribute in <span class="math inline">latex </span> (notranslate for eg.)
       [not found] ` <8c5a97e3-2603-4aa5-a820-7180a4b008b2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-01-27  8:49   ` John MacFarlane
       [not found]     ` <20170127084935.GA43985-BKjuZOBx5Kn2N3qrpRCZGbhGAdq7xJNKhPhL2mjWHbk@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2017-01-27  8:49 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I'm not sure what you're getting at here, but do you
know about the --mathml option of pandoc?  You can have
pandoc produce mathml for math in HTML5, instead of
using MathJax.  Unfortunately this is not very well
supported by browsers.

+++ Federer Fanatic [Jan 26 17 05:53 ]:
>   I had originally posted the topic below
>   in: https://github.com/jgm/pandoc/issues/3381, for convenience i repeat
>   it here
>                      AND
>
>   I asked a question on the email list of luatex:
>
>   =================================== mail to luatex list
>   ================
>   Basically have complete mathml markup or some other kind of html math
>   output
>   that is completely capable of doing what is now done for pdf output.
>   This would
>
>   elminate the need for the clumsy workarounds that mathjax, for
>   example,
>
>   provides---there appears to be no easy way to convert
>   arbitarilly/personally
>
>   written latex packages/classes into something that mathjax can
>   understand.
>
>   Obviously the original latex code could still remain in the resulting
>   html/math
>
>   output so that people would still have access to the "original" source
>   code.
>
>   One of my motivations is to allow for google translate to work on html
>   math documents...
>
>       it WORKS provided you add 'notranslate' to the 'class' option of
>   the spans:
>
>     <class="math display">latex math commands/span>
>
>   similarly for "math inline"
>
>   However LaTeX commands that mathjax is not familiar
>   with are not rendered ... I regard that project, while laudable, wrong
>
>   headed as the real problem should be solved by a proper TeX engine such
>   as luatex?
>
>   ===================== end of email to the luatex dev list
>   -------------------------------------
>
>   Someone on the the luatex  list suggested that ConTeXt might be the way
>   to go via a TeXlike engine...
>
>   ---------------- Getting back to a solution via pandoc
>   -----------------------------------
>
>   I succeeded in getting this to work with --mathjax option of pandoc to
>   get a nicely rendered
>   document in html/mathjax, however as noted above when one does this
>   with, say, a french
>   latex file with the goal to translate this into english while
>   preserving the latex google translate
>
>   mangles the math, unless one does the "notranslate" argument as
>   described above.
>
>   Is this the best solution?
>
>   One of my primary goals is then translate LaTeX/heavy math document
>   into LaTeX/English/Math documents.
>
>   So to summarise I have done:
>
>      LaTeX file in Language A --> convert to html/js/mathjax using
>   pandoc---> Edit resulting file and put in 'no translate'
>
>      argument of <span> -----> Put into  Google translate
>
>     I have not tried the final step (which is obviously easy) of
>   converting the result of Google translate into English.
>
>   Using Pandoc I suspect constructing a filter would achieve the goal
>   (it's easy enough to create a oneline perl -ne command, but...)
>
>   So is  [1]http://pandoc.org/scripting.html ?
>
>   On a different tangent .....
>
>   =======================================================================
>   ========
>
>   Someone on the pandoc the dev list of luatex suggests that ConTeXt can
>   achieve my goals directly?
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [2]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [3]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [4]https://groups.google.com/d/msgid/pandoc-discuss/8c5a97e3-2603-4aa5-
>   a820-7180a4b008b2%40googlegroups.com.
>   For more options, visit [5]https://groups.google.com/d/optout.
>
>References
>
>   1. https://github.com/jgm/pandoc/issues/url
>   2. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   4. https://groups.google.com/d/msgid/pandoc-discuss/8c5a97e3-2603-4aa5-a820-7180a4b008b2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   5. https://groups.google.com/d/optout


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

* Re: Inserting  extra class attribute in <span class="math inline">latex </span> (notranslate for eg.)
       [not found]     ` <20170127084935.GA43985-BKjuZOBx5Kn2N3qrpRCZGbhGAdq7xJNKhPhL2mjWHbk@public.gmane.org>
@ 2017-01-27 11:35       ` Federer Fanatic
  0 siblings, 0 replies; 3+ messages in thread
From: Federer Fanatic @ 2017-01-27 11:35 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi, I am familiar. So you're suggesting I do -mathml instead and then apply 
translation to that
and then hopefully convert the mathml doc into LaTeX again? I think I tried 
this and encountered a
problem in that some of the LaTeX commands are NOT converted into mathml. 
the MathJax facility
seems to do a better job. I will try posting some tiny examples.

FF

ps. My stated goal is my post below: Latex Math in Language A ---> Latex 
Math in Language B.



Question: How do I incorporate expanding my macro packages

On Friday, 27 January 2017 03:50:23 UTC-5, John MacFarlane wrote:
>
> I'm not sure what you're getting at here, but do you 
> know about the --mathml option of pandoc?  You can have 
> pandoc produce mathml for math in HTML5, instead of 
> using MathJax.  Unfortunately this is not very well 
> supported by browsers. 
>
> +++ Federer Fanatic [Jan 26 17 05:53 ]: 
> >   I had originally posted the topic below 
> >   in: https://github.com/jgm/pandoc/issues/3381, for convenience i 
> repeat 
> >   it here 
> >                      AND 
> > 
> >   I asked a question on the email list of luatex: 
> > 
> >   =================================== mail to luatex list 
> >   ================ 
> >   Basically have complete mathml markup or some other kind of html math 
> >   output 
> >   that is completely capable of doing what is now done for pdf output. 
> >   This would 
> > 
> >   elminate the need for the clumsy workarounds that mathjax, for 
> >   example, 
> > 
> >   provides---there appears to be no easy way to convert 
> >   arbitarilly/personally 
> > 
> >   written latex packages/classes into something that mathjax can 
> >   understand. 
> > 
> >   Obviously the original latex code could still remain in the resulting 
> >   html/math 
> > 
> >   output so that people would still have access to the "original" source 
> >   code. 
> > 
> >   One of my motivations is to allow for google translate to work on html 
> >   math documents... 
> > 
> >       it WORKS provided you add 'notranslate' to the 'class' option of 
> >   the spans: 
> > 
> >     <class="math display">latex math commands/span> 
> > 
> >   similarly for "math inline" 
> > 
> >   However LaTeX commands that mathjax is not familiar 
> >   with are not rendered ... I regard that project, while laudable, wrong 
> > 
> >   headed as the real problem should be solved by a proper TeX engine 
> such 
> >   as luatex? 
> > 
> >   ===================== end of email to the luatex dev list 
> >   ------------------------------------- 
> > 
> >   Someone on the the luatex  list suggested that ConTeXt might be the 
> way 
> >   to go via a TeXlike engine... 
> > 
> >   ---------------- Getting back to a solution via pandoc 
> >   ----------------------------------- 
> > 
> >   I succeeded in getting this to work with --mathjax option of pandoc to 
> >   get a nicely rendered 
> >   document in html/mathjax, however as noted above when one does this 
> >   with, say, a french 
> >   latex file with the goal to translate this into english while 
> >   preserving the latex google translate 
> > 
> >   mangles the math, unless one does the "notranslate" argument as 
> >   described above. 
> > 
> >   Is this the best solution? 
> > 
> >   One of my primary goals is then translate LaTeX/heavy math document 
> >   into LaTeX/English/Math documents. 
> > 
> >   So to summarise I have done: 
> > 
> >      LaTeX file in Language A --> convert to html/js/mathjax using 
> >   pandoc---> Edit resulting file and put in 'no translate' 
> > 
> >      argument of <span> -----> Put into  Google translate 
> > 
> >     I have not tried the final step (which is obviously easy) of 
> >   converting the result of Google translate into English. 
> > 
> >   Using Pandoc I suspect constructing a filter would achieve the goal 
> >   (it's easy enough to create a oneline perl -ne command, but...) 
> > 
> >   So is  [1]http://pandoc.org/scripting.html ? 
> > 
> >   On a different tangent ..... 
> > 
> >   
> ======================================================================= 
> >   ======== 
> > 
> >   Someone on the pandoc the dev list of luatex suggests that ConTeXt can 
> >   achieve my goals directly? 
> > 
> >   -- 
> >   You received this message because you are subscribed to the Google 
> >   Groups "pandoc-discuss" group. 
> >   To unsubscribe from this group and stop receiving emails from it, send 
> >   an email to [2]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To post to this group, send email to 
> >   [3]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To view this discussion on the web visit 
> >   [4]
> https://groups.google.com/d/msgid/pandoc-discuss/8c5a97e3-2603-4aa5- 
> >   a820-7180a4b008b2%40googlegroups.com. 
> >   For more options, visit [5]https://groups.google.com/d/optout. 
> > 
> >References 
> > 
> >   1. https://github.com/jgm/pandoc/issues/url 
> >   2. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >   3. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >   4. 
> https://groups.google.com/d/msgid/pandoc-discuss/8c5a97e3-2603-4aa5-a820-7180a4b008b2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer 
> >   5. https://groups.google.com/d/optout 
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6419b7c3-2095-40d1-b7c2-bae42245fedf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2017-01-27 11:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-26 13:53 Inserting extra class attribute in <span class="math inline">latex </span> (notranslate for eg.) Federer Fanatic
     [not found] ` <8c5a97e3-2603-4aa5-a820-7180a4b008b2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-01-27  8:49   ` John MacFarlane
     [not found]     ` <20170127084935.GA43985-BKjuZOBx5Kn2N3qrpRCZGbhGAdq7xJNKhPhL2mjWHbk@public.gmane.org>
2017-01-27 11:35       ` Federer Fanatic

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 NNTP newsgroup(s).