I am programming a website on the subject of chemistry and for obvious reasons I also have to include structural and molecular formulas on that site. I want to have as few images as possible on the side and would therefore like to know how I can compile LaTeX code on my website, so I can show everything I could do in LaTeX itself.
Thanks in advance.
As outlined in a previous comment, Chemistry.SE has enabled mhchem in MathJax to allow the rendering of simple formula and reaction equations. The MathJax documention actually gives some directions.
As far as structures of organic molecules are concerned, I'm usually draw them using BkChem and export them as the png images.
If I understand you correctly, you would like to avoid the images themselves and not just the act of drawing. Therefore, the idea to generate the drawings from a linear representation (InChi, SMILES) using openbabel will probably not convince you.
As a matter of fact, it is possible to create structure in LaTeX using chemfig and there have been requests to support this package in MathJax. However, it seems that so far, the strong dependance of chemfig on TikZ has prevented this.
Related
I'm creating a simple blog using ruby on rails 4. I want to be able to write mathematical equations with it. I'd appreciate if you could help me with any of these questions:
Is there a gem/plugin/etc which I can use to add an editor for mathematical equations to my app? Just like Mathmatical editor in MS word I could use to create an equation and it could give me the MathML code as output?
Let's assume that I have a form where I write the equations in Latex. Is there a gem/plugin/etc (not javascript because it will probably be a huge code and it might cause conflicts and some problems) to convert the equations from Latex/Tex to MathML before saving them to the database?
Thanks.
You can use Equation Editor www.codecogs.com
This is designed to be physically integrated within a websites, allowing your users to create equations without leaving your website. There are two approaches to integrating the editor: either as a popup that can be activated from a button on your site, or as an object embedded directly a page. A range of plugins for popular editors are also available, e.g. CK Editor, Tiny MCE.
I want to build a website where people can create tests with questions and answers . I want people can type in math equation/symbol and equations in a textbox or something like that, and they will be store in database, it'also displayed on the web like image.
My idea is i will store the text user input in latex syntax and store it, then display it using MathJax, i don't know it's possible or will have better way to do this.
And a problem is in user input will have normal text with "math text" (latex), so how can i separate them and only save the latex text? Please give me some idea or suggest the way to solve it, thanks.
p/s: i'm building this site in ruby on rails, i found the gem mathjax-rails but it seem not working.
Consider building off Gollum. It is the backend for the wiki system Github uses and works fairly well with LaTex equations (currently their is a very irritating bug with less/greater than symbols, but is documented and likely will be fixed in the next release). I start using it this summer to take notes in a math classes, an example of a full page of rendered LaTex equations notes is here here.
Note: You must be logged into Github in order for the equation to render.
Looking through docs on the TeX website, it seems like almost all documentation for TeX and LaTeX are tutorials on how to use them, how to install fonts, how to get graphics working, etc.
What should I look at if I want to know more about how TeX works? For instance, I want to know about its parser grammar. I want to know how its text engine works, how it decides hyphenation, how it flows text, how it decides on box layouts.
It seems like TeX and LaTeX are built up on several layers of different technologies. (Metafont, etc.) Is there any resources that describe step by step the TeX system from the ground up? How it goes from parsing a text file, into how this is represented and transformed, and finally how it ends up in a particular page layout?
There are essentially two resources on TeX itself: one is the TeXbook by Don Knuth, along with the typeset documented sourcecode itself (Vol's A and C of Computers and Typesetting), the other one is Victor Eijkhout's TeX by Topic, which is available for download.
http://www.cs.umass.edu/~mccallum/papers/acm-queue-ie.pdf
I want to write a document that has the style like this one.
Like having a light colored background on a page, having a big header (like the EXTRACTION) shown in this link. Do you think it is possible to something like this in Latex?
I am comfortable with doing normal things in latex.
If you download and look at the document properties, it was made with InDesign CS3. Could you do this in LaTeX? Yes. The cover page is... just a cover page. If you use fancyhdr and make a page header, you can increase the header height, then lay the page header in there as an image. Try eso-pic for page backgrounds. But in all honesty, that document is kind of ugly. :D
Your best bet for a document like this is to use a desktop publishing system. A Free/Open Source Software solution would be Scribus Desktop Publishing.
Off the top of my head:
-- check out ConTeXt, strictly speaking an alternative to LaTeX but one designed for something closer to DTP than LaTeX itself;
-- LaTeX has lots of facilities for DTP-like work, a good place to start would be the newsletter on link text
-- investigate packages such as PGF/TKZ, eso-pic, newspaper.
That document smell like made with InDesign or QuarkXPress ... I guess there is a way to do it in latex but will not be straightforward at all ...
Actually it's quite feasible using LaTeX, it's just a pity that the learning curve and the technical involvement are higher than when using DTP tools like Adobe InDesign.
This explains why few people are willing to involve the required amount of time and energy into mastering LaTeX for such kind of projects, and consequently why few introductory material is available on the subject.
One notable exception is the recent workshop given by Dominik Wagenführ at Ubucon 2009 in Göttingen. Its proceedings are freely available a the bottom of the page, as well as the related source code. It's all in German but fairly easy to understand and very educational, so I'd recommand you to study it.
I want to use LaTex to write equations faster and if it is possible to export the result as a png or jpg so that it can be used on a website.
Wikipedia (and its opensource wiki engine) uses LaTeX for that, maybe there are some resources available (at least in the code, as it is opensource).
Your question is very broad. You could start with Amazon's List of Latex Books.
You might want to investigate the StackExchange site mathoverflow.net solution - you can read about here. It uses jsMath which supports a lot of LaTeX syntax.
Assuming you already know a little LateX and your primary goal is to get images, a good high-level tool is mathTeX; there are even public servers that will convert to images for you.
If you want to do everything yourself, all the tools use dvipng at bottom.
I like both MathBin.net and Roger's Online Equation Editor. The latter lets you control the quality of the output. See also this question.
try this: http://hausheer.osola.com/latex2png
Here is a small symbol reference for LaTeX. If you are looking for something more as a general introduction, you can look at "The Not So Short Introduction To LaTeX2e". If you use Inkscape, there is built in support for rendering LaTeX and there are also extensions that do the same. You can read some commentary about it here. There are also things like LaTeX to HTML converters; However, at the time I was looking at them, they were somewhat limited in what formulas they could display.
I taught myself LaTeX using the wikibook. It's fairly comprehensive as an initial guide. I've since bought The LaTeX Companion, which is a more advanced guide to in depth typesetting in LaTeX
I use http://www.artofproblemsolving.com/LaTeX/AoPS_L_TeXer.php when I need a quick equation for a web site.
There are packages that will automatically produce images from LaTeX source, but these are often either buggy or used incorrectly. Many people install them on their blogs, for example, and the images show up if you visit the blog directly but they don't show up if you view the page via a blog reader. I'm not saying these problems can't be fixed. They can, but it often takes a few tries.
I prefer just to make a gif and stick it in the page. It's low tech and reliable.
One more tip: it's a good idea to put the LaTeX source in the alt tag of the image. This helps people using screen readers. It helps you too if you need to modify the equation later.
Detextify is a great site that lets you draw a symbol, and it will pop up a list of latex commands that may match your drawing. It's quite accurate! http://detexify.kirelabs.org/classify.html