Can I use LaTeX to specify cascading style sheet? Can someone enlighten me something about using LaTeX with my website?
Basically to setup layout like how I do for documents, setting up fonts, spacing etc
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.Sign up to join this community
You could also look at Pandoc, which can be used as follows:
pandoc -r latex -w html -o outfile.html infile.tex
This will generate the HTML for you. You will have to specify your own stylesheets, however. Also, Pandoc only supports a subset of LaTeX.
LaTeX2HTML is a powerful TeX compiler to directly render a TeX document into HTML.
However, installation of
LaTeX2HTML involves several intricate steps, but not impossible. Upon compilation, all necessary pages with the corresponding CSS is also created. Note, that the look of your document on the browser is only as good as you have developed it on TeX.
LaTeX2HTML is by far the best way to put your heavily loaded scientific and mathematical content on the web.
I agree with what was already said: you won't get the flexibility of manually playing with css, jquery/ajax, etc. However, as far as structured/markup languages are concerned, you may find the following two projects interesting:
However, note that in general stylesheet as well as layout are specified outside of the core document.
This is not a particularly good idea. While there are tools to convert LaTeX into HTML/CSS, they give a result that is nowhere near as flexible as you could get with HTML directly or other meta-languages.
This is probably not exactly what you need, but I think it might make an interesting addition to the thread nonetheless. A few weeks ago, I stumbled across pdf2htmlEX, which can convert, as the name implies, pdf files to HTML, while maintaining the typography and layout pretty much intact.
I've tried it with some non-trivial LaTeX-generated pdfs of mine, and the results are truly impressive (they have very nice demos in their project page, too). On the other hand, the HTML markup it produces is heavy and not very editing-friendly. The point is that if you have some part of a site that you'd like to layout/typset with TeX, it is now possible to do so.
If you like to use LaTeX equations in your web, you can use MathJax which is commonly used in Wikipedia, arxiv etc. (http://www.mathjax.org/) You can also use Markdown to format your HTML files quickly if you'd like to create on-line documents. You can also find a collection of tools /web templates etc. for creating online articles here:(http://laplace.phas.ubc.ca/People/arman/sg/)