[Blindmath] LaTeX to MathML (was IOS7 and math support)

Godfrey, Jonathan A.J.Godfrey at massey.ac.nz
Sun Oct 6 21:44:53 UTC 2013


OK, here it is for anyone that wants it. The content below is in a batch file that is in the same folder as my document. I alter the MySourceFile to be the name of the document file of course. Please note there are a lot of files that aren't needed in the long run so they get cleaned up at the end. I'll put some explanations at the end.

<starts>

latex MySourceFile
bibtex MySourceFile
latex MySourceFile
latex MySourceFile
dvips MySourceFile
ps2pdf MySourceFile.ps
htlatex MySourceFile.tex "html,1"
echo body{font-family: arial, helvetica, sans-serif;} >> MySourceFile.css


del *.4ct
del *.4tc
del *.tmp
del *.lg
del *.idx
del *.idv
del *.xref

del *.dvi
del *.ps
del *.aux
del *.out
del *.toc

<ends>

The echo line adds an extra line to the css file so that he font changes. This was the only problem I found with the default tex4ht output. A css file can have as many of the same command as you like, but only the last one gets used.

Yes, I know the process above has some overkill in it, but it works for all situations I need it for.

This file generates a single html document for the entire document. There is a value of 1 in the command to generate he html that can be changed to suit your needs. My warning is though that there's then a lot of html files floating around in your working folder. When I do this I also move all html and css files off to a new folder. 

Jonathan
-----Original Message-----
From: Blindmath [mailto:blindmath-bounces at nfbnet.org] On Behalf Of Kevin Fjelsted
Sent: Monday, 7 October 2013 10:29 a.m.
To: Blind Math list for those interested in mathematics
Subject: Re: [Blindmath] LaTeX to MathML (was IOS7 and math support)

In my CSCI classes I am experiencing a mixture of sources composed of Latex and MathType via word documents that I must read.

Jonathan, would you be willing to share your header files for converting  Latex?
Has anyone found a solution for taking word files that have MathType equations in them and converting the file to HTML with the equations being converted to MathML?
-Kevin

On Oct 6, 2013, at 4:22 PM, "Godfrey, Jonathan" <A.J.Godfrey at massey.ac.nz> wrote:

> Morning all,
> 
> Responding to Susan's comments about tex4ht:
> 
> Thanks to pointers from Susan J and Michael W, I found it fairly simple to add creation of html documents from raw latex to my workflow.
> 
> I now routinely process a lot of documents into both pdf and html from the same source files. Usually, the html files are for my own personal use but I have created a number of documents that are now available in both pdf and html for use by my sighted students.
> 
> To get the best outcomes, I have two header files which have different preambles. One for the pdf, one for the html. The body of these header files just imports the other files for the content which is of course the same for all formats. 
> 
> I've been quite satisfied with the default settings of tex4ht. I'd like to work out how to add alt tags to images one day, but at present the use of informative captions for figures is sufficient.
> 
> 
> Jonathan
> 
> 
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Blindmath [mailto:blindmath-bounces at nfbnet.org] On Behalf Of Susan Jolly
> Sent: Monday, 7 October 2013 10:05 a.m.
> To: blindmath at nfbnet.org
> Subject: [Blindmath] LaTeX to MathML (was IOS7 and math support)
> 
> This is sort of off-topic but I wanted to remind everyone that converting certain subsets of LaTeX, such as itex, to MathML is MUCH easier than converting any arbitrary valid LaTeX document to MathML.  (The same comment applies if the target is braille math rather than MathML.) One major reason is that LaTeX includes a macro language. To my knowledge tex4ht is the only application which is designed to convert general LaTeX documents and even it isn't perfect.  I've never tried to use tex4ht myself but I understand using it requires some investment of time to acquire the necessary expertise.
> 
> SusanJ 
> 
> 
> _______________________________________________
> Blindmath mailing list
> Blindmath at nfbnet.org
> http://nfbnet.org/mailman/listinfo/blindmath_nfbnet.org
> To unsubscribe, change your list options or get your account info for Blindmath:
> http://nfbnet.org/mailman/options/blindmath_nfbnet.org/a.j.godfrey%40massey.ac.nz
> 
> _______________________________________________
> Blindmath mailing list
> Blindmath at nfbnet.org
> http://nfbnet.org/mailman/listinfo/blindmath_nfbnet.org
> To unsubscribe, change your list options or get your account info for Blindmath:
> http://nfbnet.org/mailman/options/blindmath_nfbnet.org/kfjelsted%40gmail.com


_______________________________________________
Blindmath mailing list
Blindmath at nfbnet.org
http://nfbnet.org/mailman/listinfo/blindmath_nfbnet.org
To unsubscribe, change your list options or get your account info for Blindmath:
http://nfbnet.org/mailman/options/blindmath_nfbnet.org/a.j.godfrey%40massey.ac.nz




More information about the BlindMath mailing list