gxhints - Graphics conversion hints Wiki
Hints for graphics conversion, gxhconvert script
Brought to you by:
kraused
← TOC | ↑ Home | I+L SVG | → | TeX | TeX | EPS | SVG | PNG | JPEG | ICO | XPM |
This page shows how to convert an SVG file x-il.svg from inkscape containing LaTeX special text into a standalone PDF file.
If the base file name before the extension ends in "-il" the gxhconvert script assumes the file is an SVG file created by the inkscape program requiring LaTeX to process the texts.
gxhconvert -o=pdf x-il.svg
See the [gxhconvert manual] for a full description of the gxhconvert script.
Option | Purpose |
---|---|
--svg-area=area | String. Area to export, one from:
|
--svg-latex | Required, if the file name does not end in "-il" to indicate the texts must be processed by LaTeX. |
inkscape --batch-process --export-type=pdf --export-overwrite --export-filename=x-il.pdf --export-area-drawing --export-latex x-il.svg
The x-il.pdf_tex file sets a unit length in bp, a width factor and a height factor. Multiplication of the factors with the unit length results in width and height in bp. Round both values upwards to the next integer number.
In line 14 and 15 replace the numbers 210 and 58 by the values just calculated.
\documentclass[12pt]{article} % begin font setup \usepackage[T1]{fontenc} \usepackage{mathptmx} \usepackage[scaled=.92]{helvet} \usepackage{courier} % end font setup % begin other packages \usepackage{textcomp} \usepackage[intlimits]{amsmath} % end other packages \usepackage{graphicx} \usepackage{color} \setlength{\paperwidth}{210bp} \setlength{\paperheight}{58bp} \pagestyle{empty} \setlength{\voffset}{-1in} \setlength{\topmargin}{0bp} \setlength{\headheight}{0bp} \setlength{\headsep}{0bp} \setlength{\topskip}{0bp} \setlength{\hoffset}{-1in} \setlength{\oddsidemargin}{0bp} \setlength{\evensidemargin}{0bp} \setlength{\marginparwidth}{0bp} \setlength{\marginparsep}{0bp} \setlength{\textwidth}{\paperwidth} \setlength{\textheight}{\paperheight} \setlength{\parskip}{0bp} \setlength{\parindent}{0bp} \setlength{\pdfpagewidth}{\paperwidth} \setlength{\pdfpageheight}{\paperheight} \begin{document}% \input{x-il.pdf_tex}% \end{document}
pdflatex x
← TOC | ↑ Home | I+L SVG | → | TeX | TeX | EPS | SVG | PNG | JPEG | ICO | XPM |