Latex Html

Latex Html




🔞 ALL INFORMATION CLICK HERE 👈🏻👈🏻👈🏻

































Latex Html




Docs »

TeX and LaTeX Support »

TeX and LaTeX in HTML documents






Edit on GitHub










... we have ` \( x_ 1 = 132 \) ` and ` \( x_ 2 = 370 \) ` and so ...

... we have $ x \_ 1 = 132 $ and $ x \_ 2 = 370 $ and so ...

\\ begin { array }{ cc }
a & b \\\\
c & c
\\ end { array }



Versions

latest

stable

v1.0

v3.2-latest

v3.1-latest

v3.0-latest

v2.7-latest

v2.6-latest

v2.5-latest

v2.4-latest

v2.3-latest

v2.2-latest

v2.1-latest

v2.0-latest

v1.1-latest



Downloads

pdf

html

epub



On Read the Docs

Project Home


Builds



Free document hosting provided by Read the Docs .


Keep in mind that your mathematics is part of an HTML document, so you
need to be aware of the special characters used by HTML as part of its
markup. There cannot be HTML tags within the math delimiters (other
than , , and HTML comments) as TeX-formatted math
does not include HTML tags. Also, since the mathematics is initially
given as text in the page, you need to be careful that your
mathematics doesn’t look like HTML tags to the browser, which parses
the page before MathJax gets to see it. In particular, that means
that you have to be careful about things like less-than and
greater-than signs ( < and > ), and ampersands ( & ), which
have special meaning to web browsers. For example,
will cause a problem, because the browser will think in the document (typically the end of the next
actual tag in the HTML file), and you may notice that you are missing
part of the text of the document. In the example above, the “ using TeX-like syntax:
Again, keep in mind that the browser interprets your text before
MathJax does.
Another source of difficulty is when MathJax is used in
content-management systems that have their own document processing
commands that are interpreted before the HTML page is created. For
example, many blogs and wikis use formats like Markdown to allow you
to create the content of your pages. In Markdown, the underscore is
used to indicate italics, and this usage will conflict with MathJax’s
use of the underscore to indicate a subscript. Since Markdown is
applied to the page first, it may convert your subscript markers into
italics (inserting or tags into your mathematics,
which will cause MathJax to ignore the math).
Such systems need to be told not to modify the mathematics that
appears between math delimiters. That usually involves modifying the
content-management system itself, which is beyond the means of most
page authors. If you are lucky, someone else will already have done
this for you, and you may be able to find a MathJax plugin for your
system using a web search.
If there is no plugin for your system, or if the plugin doesn’t handle
the subtleties of isolating the mathematics from the other markup that
it supports, then you may have to “trick” the content-management
system into leaving your mathematics untouched. Most
content-management systems provide some means of indicating text that
should not be modified (“verbatim” text), often for giving code
snippets for computer languages. You may be able use that to enclose
your mathematics so that the system leaves it unchanged and MathJax
can process it. For example, in Markdown, the back-tick ( ` ) is
used to mark verbatim text, so
may be able to protect the underscores from being processed by
Markdown.
Alternatively, some content-management systems use the backslash
( \ ) as a special character for “escaping” other characters, and
you may be able to use that to prevent it from converting underscores
to italics. That is, you might be able to use
to avoid the underscores from making 1 = 132$ and $x into italics.
If your system uses backslashes in this way, that can help with
italics, but it also causes difficulties in other ways. Because TeX
uses this character to indicate a macro name, you need to be able to
pass a backslash along to the page so that MathJax will be able to
identify macro names; but if the content-management system is using
them as escapes, it will remove the backslashes as part of its
processing, and they won’t make it into the final web page. In such
systems, you may have to double the backslashes in order to obtain a
single backslash in your HTML page. For example, you may have to do
to get an array with the four entries a , b , c , and d in two
rows. Note in particular that if you want \\ you will have to
double both backslashes, giving \\\\ .
That may also affect how you enter the math delimiters. Since the
defaults are \(...\) and \[...\] , if your system uses \ as
an escape of its own, you may need to use \\(...\\) and
\\[...\\] instead in order to get \(...\) and \[...\] into
the page where MathJax can process it.
Finally, if you have enabled single dollar signs as math delimiters
and you want to include a literal dollar sign in your web page (one
that doesn’t represent a math delimiter), you will need to prevent
MathJax from using it as a math delimiter. If you also enable the
processEscapes configuration parameter (it is enabled by default),
then you can use \$ in the text of your page to get a dollar sign
(without the backslash) in the end. Alternatively, you can use
something like $ to isolate the dollar sign so that
MathJax will not use it as a delimiter.

© Copyright 2021 The MathJax Consortium


Revision 95612702 .





Frequently Asked Question List for TeX
TeX and LaTeX are well suited to producing electronically publishable
documents. However, it is important to realize the difference
between page layout and functional markup. TeX is capable of
extremely detailed page layout; HTML is not, because HTML is a
functional markup language not a page layout language. HTML’s exact
rendering is not specified by the document that is published but is, to
some degree, left to the discretion of the browser. If you require your
readers to see an exact replication of what your document looks like
to you, then you cannot use HTML and you must use some other
publishing format such as PDF. That is true for any HTML
authoring tool.
TeX’s excellent mathematical capabilities remain a challenge in the
business of conversion to HTML. Originally there were only two generally
reliable techniques for generating mathematics on the web: creating
bitmaps of bits of typesetting that can’t be translated, and using
symbols and table constructs. Neither technique is entirely
satisfactory. Bitmaps lead to a profusion of tiny files, are slow to
load, and are inaccessible to those with visual disabilities. The
symbol fonts offer poor coverage of mathematics, and their use
requires configuration of the browser.
Today, with native MathML rendering in some browsers
and high quality math rendering available via JavaScript and CSS
in all modern graphical browsers there are several possibilities.
The LaTeX to HTML convertors listed below all handle mathematics
to some extent, and further math-specific details are discussed
in Math on the Web .
TeX4ht a compiled program that supports either
LaTeX or Plain TeX, by processing a DVI file; it uses
bitmaps for mathematics, but can also use other technologies where
appropriate. Written by Eitan Gurari, it parses the DVI
file generated when you run (La)TeX over your file with
tex4ht s macros included. As a result, it’s pretty
robust against the macros you include in your document, and it’s
also pretty fast. CTAN .
Configuring and calling TeX4ht can be quite complicated,
Michal Hoftich’s make4ht system provides an alternative
easier calling convention, using the tex4ht convertor internally.
LaTeXML From NIST is a perl program
that can parse most TeX code, including complicated macro definitions.
It was used for generating the web version of DLMF
from LaTeX sources. Currently it is distributed from the NIST site, and is not
in standard TeX distributions.
lwarp by Brian Dunn is a recent TeX to HTML convertor that uses
TeX to parse the input document. Documents may be produced by LaTeX, LuaLaTeX, or XeLaTeX.
A texlua script removes the need for system utilities such as make and gawk,
and also supports xindy and latexmk. CTAN .
LaTeX2HTML a Perl script package that
supports LaTeX only, and generates mathematics (and other
“difficult” things) using bitmaps. The original version was
written by Nikos Drakos for Unix systems, but the package now sports
an illustrious list of co-authors and is also available for Windows
systems. Michel Goossens and Janne Saarela published a detailed
discussion of LaTeX2HTML , and how to tailor it, in
TUGboat 16(2). CTAN .
A mailing list for users may be found via
TUG .
Hevea a compiled program that supports LaTeX
only, and uses the font/table technique for equations (indeed its
entire approach is very similar to TtH ). It is written
in Objective CAML by Luc Maranget. Hevea isn’t
archived on CTAN; details (including download points) are
available via INRIA .
TtH a compiled program that supports either LaTeX
or Plain TeX, and uses the font/table technique for representing
mathematics. It is written by Ian Hutchinson, using
flex . The distribution consists of a single C
source (or a compiled executable), which is easy to install and very
fast-running. However the resulting HTML does not really reach
modern standards, and only very simple mathematics can be converted.
plasTeX a Python-based LaTeX document processing
framework. It gives DOM-like access to a LaTeX document, as
well as the ability to generate mulitple output formats
(e.g. HTML, DocBook, tBook, etc.).
TeXpider a commercial program from
Micropress , which is
described on the Micropress web site ;
it uses bitmaps for equations.
FAQ ID: Q-LaTeX2HTML
Last updated: 2018-5-25




Sign up or log in to customize your list.

more stack exchange communities

company blog


The best answers are voted up and rise to the top


Stack Overflow for Teams
– Start collaborating and sharing organizational knowledge.



Create a free Team
Why Teams?



1,687 2 2 gold badges 11 11 silver badges 27 27 bronze badges


2,181 3 3 gold badges 17 17 silver badges 15 15 bronze badges



Sorted by:


Reset to default





Highest score (default)


Date modified (newest first)


Date created (oldest first)




38k 9 9 gold badges 93 93 silver badges 91 91 bronze badges


61.2k 3 3 gold badges 125 125 silver badges 260 260 bronze badges


453 5 5 silver badges 10 10 bronze badges


571k 123 123 gold badges 1344 1344 silver badges 2184 2184 bronze badges


6,887 1 1 gold badge 27 27 silver badges 34 34 bronze badges


2,747 23 23 silver badges 35 35 bronze badges


TeX - LaTeX

Tour
Help
Chat
Contact
Feedback



Company

Stack Overflow
Teams
Advertising
Collectives
Talent
About
Press
Legal
Privacy Policy
Terms of Service
Cookie Settings
Cookie Policy



Stack Exchange Network



Technology




Culture & recreation




Life & arts




Science




Professional




Business





API





Data






Accept all cookies



Customize settings



Stack Exchange network consists of 182 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Connect and share knowledge within a single location that is structured and easy to search.
I would like a way to convert a document from HTML to LaTeX, on a Windows platform.
A main motivation of mine is for ways to display books from Project Gutenberg . such as, Wells' The Invisible Man .
What your best option would be depends on a lot on what your needs are. Are you only trying to import the structure, or exact look, or what? How important is it that the resulting document really be done properly?
Anyway, here are a number of things to try.
AbiWord : an open source word processor that can import HTML or similar formats and export LaTeX. (Be sure to install the extra export plugins when installing; the default install doesn't include a LaTeX export, but it can easily be chosen.)
Writer2LaTeX : An openoffice plugin for exporting to LaTeX; Open office supports HTML import of course (Though W2L can handle .odt to .tex even without Open Office installed; but then converting .html to .odt might be trickier.)
rtf2latex2e : as its name implies, converts RTF to LaTeX; so you'd need some way to convert HTML to RTF (though that's relatively easy, can be done with most any word processor).
pandoc : Haskell program for converting between various mark-up languages, including HTML and LaTeX
html2latex : Perl script for such conversions (I've never tried it but plan on doing so soon)
htmltolatex Java program along similar lines (Again, I haven't tried it.)
Even with all those options, however, personally, if it was something I truly cared about doing right, simply transferring over the plain text and redoing everything manually would still be my solution of choice. The above are just quick fixes for a document of relatively little importance, or when having it in LaTeX in addition to HTML is just a matter of convenience.
If the document is XHTML (rather than HTML), then it can be processed directly in ConTeXt. See http://dl.contextgarden.net/myway/tas/xhtml.pdf for a tutorial and http://dl.contextgarden.net/myway/tas/ for the sample files.
I'm not thrilled by the results but it's a start.
(Sorry I know this isn't a windows-friendly result but this question appears high in Google search results for a more generic search too)
The following sed script is meant to convert HTML to (La)TeX ( source ):
There is also HTML to TeX , written in C, that produces LaTeX output.
This is why Project Gutenberg should've used sensible markup from the beginning. Fortunately, things are getting marked up now, so one can use:
to convert to Text Encoding Initiative (TEI) and then use Dima's answer at: How can I efficiently convert TEI documents into LaTeX?
For a page from a typical website, the best way is probably to simply:
(Of course, if you actually have a well-structured page, which e.g. uses H1 for the document title and properly nests H2- and H3-headed sections, it might be worth trying a converter program. You'll still need to add markup for the things that HTML does not provide markup for, of course.)
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!

By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2022 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2022.9.9.42970


By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your
Brunette Babe Lisa Ann Finds A Gloryhole
Girl Does Anal
Teen Young Yo Pussy

Report Page