13.11.2015 Views

my Latex and Tex4ht cheat sheet

my Latex cheat sheet - 12000.org

my Latex cheat sheet - 12000.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.4 How to convert pdf to eps?<br />

See http://tex.stackexchange.com/questions/20883/how-to-convert-pdf-to-eps This inkscape input.pdf --e<br />

works ok, but the above comm<strong>and</strong> gives errors such as these on some images:<br />

>inkscape 3d_1.pdf --export-eps=3d_1.eps<br />

** Message: Invalid glyph found, continuing...<br />

** Message: Invalid glyph found, continuing...<br />

** Message: Invalid glyph found, continuing...<br />

** Message: Invalid glyph found, continuing...<br />

** Message: Invalid glyph found, continuing...<br />

** Message: Invalid glyph found, continuing...<br />

** Message: Invalid glyph found, continuing...<br />

** Message: Invalid glyph found, continuing...<br />

While on the same file, pdf2eps below works fine.<br />

To crop pdf also (which can be useful) use this script by Herbert from above link<br />

#!/bin/sh<br />

# $Id: pdf2eps,v 0.01 2005/10/28 00:55:46 Herbert Voss Exp $<br />

# Convert PDF to encapsulated PostScript.<br />

# usage:<br />

# pdf2eps <br />

pdfcrop $2.pdf<br />

pdftops -f $1 -l $1 -eps "$2-crop.pdf"<br />

rm "$2-crop.pdf"<br />

mv "$2-crop.eps" $2.eps<br />

I wrote the following simple script prep which process all the pdf image files <strong>and</strong> generates the needed files<br />

for tex4ht.<br />

#!/bin/bash<br />

for file in $1; do<br />

filename=${file%.*}<br />

pdf2svg "$filename.pdf" "$filename.svg"<br />

pdf2eps 1 "$filename"<br />

done<br />

It is called like this prep "*.pdf" or for one file prep foo.pdf it will generate a .svg <strong>and</strong> .eps for each file.<br />

2.5 How to draw a baseline hairline for an equation?<br />

This is thanks to @egreg from Tex stackexchange:<br />

\newcomm<strong>and</strong>{\rl}{\rlap{\vrule height 0pt depth .1pt width \textwidth}}<br />

<strong>and</strong> then use \rl in the left h<strong>and</strong> sides of the equations.<br />

7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!