When you are creating graphics using psfrag, you cannot use PDFLatex directly, instead you can just compile the document into DVI and convert it into *.ps file (use the DVIPS).
Then open the *.ps file using GsView or you can use the ghostscript command line to CONVERT the *.ps file into *.pdf. (Convert it! not to print it!)
Take care
Showing posts with label documents. Show all posts
Showing posts with label documents. Show all posts
Saturday, November 22, 2008
Use inkscape and psfrag for including vector graphics in Latex
1. Draw your vector graphics on inkscape . Put text variables (using text tool, for example var_1, var_2, anything!) Save it as *.eps file (don't forget to UN-CHECK all the options of the EPS output).
2. A latex file example
\usepackage{psfrag}
\usepackage{graphicx}
\documentclass{article}
\begin{document}
\begin{figure}[h]
\begin{center}
\psfrag{var_1}{$var_1$}
\psfrag{var_2}{$var_2$}
\includegraphics[width=8cm]{images\your_vector_graphics.eps}
\caption{Test\label{fig:test}}
\end{center}
\end{figure}
\end{document}
3. Compile it!
2. A latex file example
\usepackage{psfrag}
\usepackage{graphicx}
\documentclass{article}
\begin{document}
\begin{figure}[h]
\begin{center}
\psfrag{var_1}{$var_1$}
\psfrag{var_2}{$var_2$}
\includegraphics[width=8cm]{images\your_vector_graphics.eps}
\caption{Test\label{fig:test}}
\end{center}
\end{figure}
\end{document}
3. Compile it!
Xe-{TeX,LaTeX}
Recently, I found Xe-{TeX,LaTeX} to be very cool way of adopting "local fonts" to experience neat layout on .pdf files. Really cool!
An example of xelatex document:
\documentclass{article}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Batang}
\begin{document}
\section{Batang}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent non mauris eget
\section{한국어}
인구는 약 142만명이다. 광주광역시는 인구가 약 500만명인 호남 지방의 유일한 광역시이며, 호남 지방의
\end{document}
compile it with xelatex (available in MikTex 2.7 package)
An example of xelatex document:
\documentclass{article}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Batang}
\begin{document}
\section{Batang}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent non mauris eget
\section{한국어}
인구는 약 142만명이다. 광주광역시는 인구가 약 500만명인 호남 지방의 유일한 광역시이며, 호남 지방의
\end{document}
compile it with xelatex (available in MikTex 2.7 package)
Subscribe to:
Posts (Atom)