Typesetting mathematics: how do {\em you} convert text into pdf? - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-23T20:30:11Z http://mathoverflow.net/feeds/question/21458 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/21458/typesetting-mathematics-how-do-em-you-convert-text-into-pdf Typesetting mathematics: how do {\em you} convert text into pdf? Sam Nead 2010-04-15T13:24:21Z 2011-03-11T15:58:06Z <p>Prompted by this <a href="http://mathoverflow.net/questions/21424/how-to-draw-knots-with-latex" rel="nofollow">question</a> I would like to ask the community how they convert their mathematics into pdf files. In any given procedure for converting mathematics into pdf I am interested in two issues: first typographical quality of text and of mathematical formulas and second production and placement of figures and labels within figures. </p> <p>As a concrete example my current procedure is: latex and bibtex until the references settle down, dvips -o to produce postscript, and then ps2pdf to produce pdf files. I go through postscript in order to make psfrag labels work. I've never been fully happy with the output - in particular label placement inside of figures is difficult. </p> <p>As a final issue, in the <a href="http://mathoverflow.net/questions/21424/how-to-draw-knots-with-latex" rel="nofollow">question</a> referenced, Tilman suggests that pdftex has typographical improvements over latex. I've looked around <a href="http://www.pragma-ade.com/pdftex/thesis.pdf" rel="nofollow">on-line</a> and these seem to be margin kerning (hanging punctuation) and glyph scaling (font expansion). How does one use these features? Do they make a difference in practice?</p> <p>EDIT: After a bit of pain, I've managed to switch from my previous procedure (described above) to the much simpler procedure of using pdflatex. Instead of psfrag I now use Colin Rourke's pinlabel package. I am very happy with pinlabel -- the fonts are exactly what I expect them to be, and the job of labelling is much easier than it used to be. It is still possible to align labels inside of a figure, and they virtually always show up where I intended. </p> <p>I started using the microtype package, which turns on margin kerning and glyph scaling. I can see that these change the output, but I honestly can't say that the output is better - I guess my eyes aren't that sensitive. One thing to watch out for - pdftex 1.20 threw show-stopping errors when typesetting figure captions. I updated to 1.40 and the problem went away. </p> <p>Thanks for your suggestions - if other people have other latexing procedures I'd be interested to hear about them.</p> http://mathoverflow.net/questions/21458/typesetting-mathematics-how-do-em-you-convert-text-into-pdf/21461#21461 Answer by Scott Carter for Typesetting mathematics: how do {\em you} convert text into pdf? Scott Carter 2010-04-15T13:57:31Z 2010-04-15T13:57:31Z <p>Taking the title, "How do <em>you</em> convert ..." literally [emphasis added], the Mac program TeXShop does this for me. </p> <p>In a unix environment, I have used dvips followed by ps2pdf and experienced some problems but these were long ago. Someone once told me how to embed LaTeX code into xfig files, but I never used it. If you place figures in the tex via a picture environment, then you just have to continue to adjust stuff, or print on graph paper and use coordinates. </p> <p>If you are lazy with xfig and have to label stuff, then always place your labels at magnification 1. Otherwise character placement will be wrong. I found that a 24 point font for characters with an 18 point font for subscripts works about the best in terms of scales. Even so, I have noticed that in published versions of stuff we have written the fonts in figures are too small for my tastes. </p> <p>Then again, I think that figures are meant to communicate an idea instantly, and often a plethora of notation within a figure can be a distraction on first reading. </p> http://mathoverflow.net/questions/21458/typesetting-mathematics-how-do-em-you-convert-text-into-pdf/21465#21465 Answer by Shari for Typesetting mathematics: how do {\em you} convert text into pdf? Shari 2010-04-15T15:04:01Z 2010-04-15T15:04:01Z <p>I'm not sure if this works on a PC, but on a Mac, you can save any file as a PDF within the Print screen. Select the Print option for your document and you should see a pull-down menu titled PDF at the bottom of the print options screen. From there you can select "Save as PDF." Your document, as a PDF, will look exactly like it looked in the application where you created it.</p> http://mathoverflow.net/questions/21458/typesetting-mathematics-how-do-em-you-convert-text-into-pdf/21466#21466 Answer by Antonio E. Porreca for Typesetting mathematics: how do {\em you} convert text into pdf? Antonio E. Porreca 2010-04-15T15:12:27Z 2010-04-15T18:22:07Z <p>You can do margin kerning (aka “protrusion”) and font expansion in pdfLaTeX simply by loading the package <code>microtype</code> (i.e., by adding</p> <blockquote> <p><code>\usepackage{microtype}</code></p> </blockquote> <p>to the preamble). I also suggest using the <code>tracking</code> option for small-caps, which increases the space between letters (which is typographically correct, but <em>only</em> for small-caps and all-caps text):</p> <blockquote> <p><code>\usepackage[tracking=smallcaps]{microtype}</code></p> </blockquote> <p>For further information (and for several fine-tuning options) you can consult the <code>microtype</code> <a href="http://tug.ctan.org/tex-archive/macros/latex/contrib/microtype/" rel="nofollow">manual</a>.</p> <p>Edit: Yes, in my opinion and (I think) in a typographer’s opinion, these features do make a lot of difference. Margin kerning and font expansion help pdfLaTeX typeset the text, producing a lot less over/underfull hboxes. Letterspaced small-caps are also more legible and much more aesthetically pleasing.</p> http://mathoverflow.net/questions/21458/typesetting-mathematics-how-do-em-you-convert-text-into-pdf/21487#21487 Answer by Dmitri Pavlov for Typesetting mathematics: how do {\em you} convert text into pdf? Dmitri Pavlov 2010-04-15T18:08:32Z 2010-04-15T18:08:32Z <p>I recommend using the dvipdfm program, the analog of dvips for PDF. It supports EPS images and other special DVI commands. Files produced by ps2pdf or pdfTeX are known to cause problems.</p> http://mathoverflow.net/questions/21458/typesetting-mathematics-how-do-em-you-convert-text-into-pdf/24005#24005 Answer by supercooldave for Typesetting mathematics: how do {\em you} convert text into pdf? supercooldave 2010-05-09T09:21:44Z 2010-05-09T09:21:44Z <p>I almost always use pdflatex and I "draw" my figures using <a href="http://sourceforge.net/projects/pgf/" rel="nofollow">tikz and pgf</a>. This is a pure latex solution, and the quality of the figures is proportional to the amount of time you are willing to put into them, but by default, the quality is generally quite good. </p> http://mathoverflow.net/questions/21458/typesetting-mathematics-how-do-em-you-convert-text-into-pdf/58158#58158 Answer by Vafa Khalighi for Typesetting mathematics: how do {\em you} convert text into pdf? Vafa Khalighi 2011-03-11T14:50:58Z 2011-03-11T14:50:58Z <p>For the graphics in TeX, I use <a href="http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=mpgraphics" rel="nofollow">mpgraphics</a> package which with only one run of LaTeX, I can see my metapost graphics in the output.</p> <p>For maths, I think breqn package is very useful because it does automatic line breaking for equations and unlike align environment from amsmath package, you do not need to break and align equations manually.</p> http://mathoverflow.net/questions/21458/typesetting-mathematics-how-do-em-you-convert-text-into-pdf/58165#58165 Answer by S. Sra for Typesetting mathematics: how do {\em you} convert text into pdf? S. Sra 2011-03-11T15:10:04Z 2011-03-11T15:58:06Z <p>One package that that I like to use (when quasi-wysiwyg LaTeX in figures seems desirable) is: <a href="http://tclab.kaist.ac.kr/ipe/" rel="nofollow">IPE</a>. It is extremely simple to use, extensible too (I think), and works directly with PDF. If you don't feel like programming Tikz, pgf, etc. in detail, then IPE might prove to be very useful (also easy to install, as it comes as a package for Ubuntu). A link to the <a href="http://lamut.informatik.uni-wuerzburg.de/mediawiki/ipe7/index.php/Main_Page" rel="nofollow">IPE Wiki is here</a> and the <a href="http://en.wikipedia.org/wiki/Ipe_(program)" rel="nofollow">Wikipedia article is here.</a></p>