oBook‎ > ‎WinFig‎ > ‎

Fig2PDF

posted Aug 28, 2014, 9:58 PM by Javad Taghia   [ updated Aug 28, 2014, 10:25 PM ]
Unfortunately there is no direct way to export a fig as a pdf with correct special char. management. So we need to actually do the next steps via running latex to have the symbols sort out.
I assume we are going to export our fig file as pstex (export both files). Then we can create a batch file in Windows as:

@echo off
set /p input= "Enter Fig File Name: " 
echo %input%
ECHO  \documentclass[]{article} > out.tex
ECHO \usepackage[a4paper,portrait,scale=1.0,margin=0pt]{geometry} >> out.tex
ECHO  \usepackage[dvips]{graphicx,color} >> out.tex
ECHO  \usepackage{mathrsfs} >> out.tex 
ECHO  \usepackage{amsmath,amssymb}>> out.tex 
ECHO  \thispagestyle{empty}>> out.tex 
ECHO  \begin{document}>> out.tex
ECHO  \input{%input%.pstex_t}    >> out.tex
ECHO   \end{document}>>out.tex
latex out.tex
dvips out.dvi
ps2pdf out.ps
del out.log 
del out.dvi
del out.ps
del out.tex
del out.aux

to ask the user for entering the figure name and then we have a pdf resulted from the figure. 

File and example is attached.
ċ
fig2pdf.zip
(28k)
Javad Taghia,
Aug 28, 2014, 10:25 PM
Comments