3 ms·
Good news for the OP: The OP seems to want more output options than just paper or PDF. It appears that the OP also wants HTML output. Okay. TeX and LaTeX sa
by graycat 12y ago
Good news for the OP: The OP seems to
want more output options than just
paper or PDF. It appears that the OP
also wants HTML output. Okay.
TeX and LaTeX say next to
nothing about the final physical form of the document
and, instead, leave all that to an appropriate
device driver. Or, TeX (and likely LaTeX)
puts out a file called device independent
with three letter file name extension DVI.
Basically a DVI file says, put this character
here on the page, then put the next character
there on the page, etc. Then move to a new page.
Well, then, it would appear
that there could be a device driver that would
convert a DVI file to HTML. And there should be
a way to have the HTML file make use of suitable
fonts and the special math symbols. Besides,
now Unicode has a lot of characters and symbols.
It appears that the OP feels that typing a paper into
TeX or LaTeX somehow locks him into
TeX in a bad way. But, TeX is fully
open source with some of the best and
most beautiful software documentation
ever written.
- andreasvc 12y agoThere are latex to HTML converters and they only work for a subset of latex functionality. It is not as simple as defining a driver that outputs HTML. Latex and HTML work in fundamentally different ways: latex typesets for a fixed paper size, and specifies its coordinates in physical dimensions. HTML is free flowing; if the user resizes the window the layout should adapt, they layout has to work on mobile devices, etc. The HTML way asks for a completely different way of designing layout, and Latex is simply not the right tool for that job. Incidentally I believe that the Latex way of typesetting for a specific paper size is superior, because it allows the typesetter to manually arrange everything until it looks just right, whereas with HTML there are x number of browsers, with y number of screen sizes, and you have much less control over the final look.
- DanBC 12y ago>HTML is free flowing; if the user resizes the window the layout should adapt, they layout has to work on mobile devices, etc. The HTML way asks for a completely different way of designing layout, and Latex is simply not the right tool for that job. I agree that HTML should re-flow. Let's try with the OP article. <http://imgur.com/LWrS6pn> http://imgur.com/LWrS6pn>
- graycat 12y agoLet me be more clear: Long ago a friend kept suggesting that I write a converter from TeX (maybe also LaTeX) to HTML. I kept telling him that that was essentially impossible because TeX is a programming language, likely Turing machine equivalent, complete with if-then-else, allocate-free, file read-write, while HTML is just a text markup language. No doubt JavaScript is Turning machine equivalent, but I'd have a tough time believing that HTML is. So, my suggestion here was not to convert TeX input to HTML. Instead my suggestion was just to convert TeX output, that is, a DVI file, to HTML. Why? Because a DVI file is essentially just text, or, as I outlined, it specifies put this character at these coordinates on the page, put that character there on the page, go to a new page, etc. To be more clear, say, about the file reading-writing, that happens when the TeX program reads the user's TeX input and before the DVI file is generated. Given only the DVI file and displaying it, there is no file reading-writing. So, it looks like could convert TeX DVI output to HTML. You pointed out that maybe HTML with a browser has more flexibility than TeX output. Okay, maybe. But I didn't claim that, given an HTML file, there would be a TeX input file and a corresponding TeX DVI output file that my envisioned converter would convert to the given HTML file. Instead, I just claimed that for a given TeX and DVI file, the converter would generate an HTML file. Or the converter would be a function from the set of all TeX DVI files to the set of all HTML files. That is, for each TeX DVI file there would be a corresponding HTML file from the converter. But the function would not be onto the set of HTML files, that is, not all HTML files would be a value of the converter; not all HTML files could be obtained by using TeX input, the TeX program, the DVI file and the envisioned converter. You also mentioned some ways in which HTML, say, with <div>, is more flexible than TeX. Fine. But I was discussing just converting TeX DVI to HTML. And, again, I see no way to convert TeX input, which is a programming language, to HTML, which is not a programming language. Whew! More clear now?
- Leszek 12y agoThe point isn't to convert a TeX program into an equivalent HTML program, it's to be HTML an output of a TeX program. For example, make \emph{foo} output "<i>foo</i>" instead of "/Times-Italic 12 selectfont (foo) show" or whatever the PS output would be.
- 12y ago