# Tag Info

30

Answering my own question after much research, experimentation, and testing. stevem's pointer to to the Mac OS X TeX Toolbox approach (store the TeX snippet in a box and write the height, width, and depth to a file) was the crucial key to the puzzle. I followed that approach, made some adjustments and additions, and came up with a solution that is not only ...

21

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

19

This is really a great question, because it's exactly the kind of thing somebody starting out would need to know, but it's very hard to figure out how to ask about or google for. Unfortunately, to do what you're describing you're going to have to make some concessions somewhere to achieve what you're talking about. Double unfortunately, because I think ...

17

DocBook is certainly the standard for XML documentation writing. I've heard of DITA, but couldn't tell you much about it. You can use ConTeXt to process XML. It works by defining a mapping between the XML tags and TeX markup instructions. This should give you the benefits of DocBook (universal, XML-based) and many of the benefits of ConTeXt in the document ...

16

Lot of the things that are on your list are already implemented: tex4ht can produce xhtml with mathml tex4ht can produce SVG figures from tikz/pgf figures METAPOST already outputs SVG out of the box Linking to parts of your documents is done by the hyperref package, for pdf and html/xhtml. Connecting to Wolfram|Alpha is surely not a "web standard", and ...

15

I think that, if you are able to import your html tables in Excel or OpenOffice Calc, these tools are what you need: Excel2LaTeX for MSExcel Calc2LaTeX for OO Calc (this one is my preferred, guess why ;) The first one is a macro you add to your Excel, and provides you with an extra button to create the LaTeX code for the table from a set of selected ...

14

ConTeXt does not directly output XHTML, it outputs XML. However the current browsers (at least Opera, Firefox and Chromium) are able to display XML correctly. The XML can be styled using CSS. When you want real XHTML, you have to transform the XML to XHTML using external tools. ConTeXt standalone ships with an example file: ...

13

I know that you finally have found a solution, but there is solution for tex4ht, if anybody is interested. There are three problems: You run htxelatex bala.tex # generate html - there should be not # generate html, this is just some comment. Correct command is htlatex bala.tex "xhtml, charset=utf-8" " -cunihtf -utf8" in the case of unicode input. It ...

12

To display mathematics on the web, you have a number of options. There is the MathML standard which has the advantage of being endorsed by the same body that maintains the HTML and CSS standards. This isn't however, LaTeX based. There are tools to translate LaTeX code into MathML. texmath LaTeXMathML There is the "heavy duty" MathJax option. You can ...

11

You can use package ifpdf and enclose pdf-specific stuff in \ifpdf ... \fi \usepackage{ifpdf} \ifpdf %pdf specific stuff \fi Alternatively, you can make the pdf-file and convert to html using a tool like pdftohtml.

11

Is there a converter that will convert LaTeX to HTML? Yes. There are lots. But you already knew this, as evidenced by your second "question": I have tried several services but the LaTeX diagrams and some of the maths came out weird. "turning out weird" could mean any number of things: The document fails to compile The document compiles, but is ...

11

Good question—I’m really not sure why not. I really do not like MathJax at all: it interferes with page loading and is vastly inferior (at least on the screen) to a carefully-constructed and aligned PNG image that’s been rendered by TeX. I’ve had very positive experiences lately using the Latin Modern fonts via CSS’s @font-face for program listings. When ...

10

Using PDF as an intermediate format when converting from LaTeX to HTML is not very good idea. LaTeX and HTML are both mostly structural markup langauages, which means you use them to describe the document structure (sections, emphasize, formulas etc.), whereas PDF is mostly about representation of your document on the screen or paper. When converting LaTeX ...

9

(for reference the Adobe Knowledge base entry about pdf from html linking) Checkout section 4.1 in Hypertext capabilities with pdfLaTeX (F. Garcia, TUGBoat, Vol. 28, No. 1, 2007), which describes the hyperdef and hyperref commands. Just a small example: src.tex: \documentclass{article} \usepackage{hyperref} \begin{document} \section{Source a} ...

9

Try this configuration file: \Preamble{xhtml} \Configure{graphics*} {pdf} {\Needs{"convert \csname Gin@base\endcsname.pdf \csname Gin@base\endcsname.png"}% \Picture[pict]{\csname Gin@base\endcsname.png}% } \begin{document} \EndPreamble save it as myxhtml.cfg. This ...

9

Update: I am still improving the code style. You can find the latest version here: https://www.writelatex.com/74567mmxwkw - I appreciate anyone who is testing :) After much trial and error and the help of people here from the community I have come to a very attractive result. Screenshot: The code is pretty intense, but it works. It would be nice if ...

8

Have a look at the ideas at The baseline problem corrected. They have been incorporated into mathTeX vertical alignment if you want to use mathTeX to create the images.

7

I'm afraid there's no easy solution. As Marco stated, a CV requires attention and better control. I'll present a solution I use, though it's not totally LaTeX based. Here comes sphinx. According to the website, sphinx is a tool that makes it easy to create intelligent and beautiful documentation, written by Georg Brandl and licensed under the BSD license. ...

7

LuaTeX may well offer some real potential here because you can access the deepest internal structures of TeX: node lists. I'm not 100% sure, but once a mathematical object has been turned into a set of hlists and vlists inside LuaTeX you may not have access to sufficient information to generate MathML, but you do have enough positional and font information ...

6

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.

6

Check out this page http://www.ctan.org/tex-archive/help/Catalogue/entries/datatool.html and tools it links ie csvtools and pgfplotstable. They allow you to keep the data in csv or tsv format and configure typesetting options in .tex source. I have used pgfplotstable and it is very handy.

6

Without considering JavaScript, it is a bit different to compare, because one is then restricted to the features which CSS and the HTML box model provide. Layout-wise, this means that you cannot do automated positioning of characters, which depend on the position of other things of your layout. You cannot, e.g. use proper margin notes or automated footnotes. ...

6

here you found an example for MathJaX: http://latex.userpage.fu-berlin.de/math.html the source code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <title>Mathedemo</title> <script type="text/x-mathjax-config"> MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\$','\$']]}}); ...

6

In ConTeXt, the char-ent.lua file contains the list of all HTML entities. You can access them using the characters.entities table. For example, the following code prints all the entities and their values to screen. \starttext \startluacode local entities = characters.entities for name, value in next, entities do print(name,value) ...

6

Biber aims eventually to deal with such cases. At the moment (as of version 0.9.8), you can use the --bltxml option to ouput a BibLaTeXML file instead of a .bbl. BibLaTeXML is experimental still but it's XML with a defined schema so converting this to HTML is likely to be much easier than from .bib format directly, using XSLT. This is generally a better ...

6

Following code will help you to grab the width and height dimensions of the graphic provided with your \includegraphics command: \makeatletter \Configure{graphics} {\bgroup \Configure{IMG} {\HCode{<img src="}} {\HCode{" alt="}} {" } {\HCode{" }} {}% \Picture+[PIC]{}} ...

6

You can use TeX4ht. It can output math as mathml which can be then displayed with mathjax. You can also configure html header to load mathjax script from mathjax's cdn: \Preamble{xhtml,mathml} \Configure{VERSION}{} \Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}} \Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}} ...

5

There is QuickLaTeX which allows the simple inclusion of (La)TeX math and also TikZ pictures inside WordPress websites. However, this wont help you much if you don't use WordPress. For normal websites you could use the standalone class to convert TikZ pictures to PNG images which can then be included. See Compile a latex document into a png image ...

5

Well, you can do it directly from emacs without having to use AUCTeX: M-x compile and then change the Compile command: to the appropriate latex2html command. If you are going to be doing the .html rendering a lot, you can add the following code to the end of your .tex file: % Local Variables: % compile-command: "latex2html yourfile.tex" From then on, ...

5

There is the DocBook XML format which you can use for books or other form of documentation. There is for example Apache FOP which can compile it to PDF. The advantage is that it can be converted to other formats like HTML much more easily than LaTeX. I know it from the Subversion book which is written in DocBook XML because the publisher O'Reilly Media wants ...

Only top voted, non community-wiki answers of a minimum length are eligible