wolfrain wrote:
...Could you explain what's the difference of compilation options between TeXnicCenter and MikTex (Texworks)??
For TeXnicCenter, it hasLaTeX => DVI, LaTeX => PDF, LaTeX => PS, LaTeX => PS => PDF; on the other hand, MikTex has pdfTex, pdfLaTex, XeTex, XeLaTex. (and I think MakeIndex and BibTex are specifically for Contents of Table and Bibliography respectively)
TeXnicCenter profiles:
1) LaTeX => DVI: uses latex to compile the document and produces a .dvi file from your .tex code.
2) LaTeX => PDF: uses pdflatex to compile the document and produces a .pdf file directly from your .tex code.
3) LaTeX => PS: uses latex to compile the document, internally uses dvips, and produces a .ps file from your .tex code.
4) LaTeX => PS => PDF: same as before, but aditionally calls ps2pdf internally, and produces a .pdf file from your .tex code.
wolfrain wrote:
...EDIT: Provided that I am using pstricks, if I want to directly import PDF graphic into my work, what should I do??
Here are the instructions to be able to compile directly with pdflatex when using PS-Tricks code and EPS images, with the help of the
pdftricks (link provided in my previous response) package :
1) In the preamble, load the package:
2) In the preamble, load the
epstopdf package (to convert on the fly the EPS figures to PDF format):
3) In the preamble, enclose all the
\usepackage commands associated with PS-Tricks packages using
\begin{psinputs}...
\end{psinputs} (see example below)
4) Enclose each
pspicture environment along with any macro code within a
pdfdisplay environment.
5) Compile using pdflatex: if shell scape is active in your system (most surely it is not), the compilation will produce the desired result; if not, you'll get a warning like this one:
Code: Select all
Package pdftricks Warning: ****************************************
(pdftricks) No \write 18 capability.
(pdftricks) You'll have to run a script by yourself!
(pdftricks)
in that case, you will have to compile from a terminal, using
Code: Select all
pdflatex -shell-scape your-file.tex
A sample code:
Code: Select all
\documentclass{article}
\usepackage{pdftricks}
\begin{psinputs}
\usepackage{pst-all}
\end{psinputs}
\begin{document}
\begin{pdfdisplay}
\begin{pspicture}(-6,-6)(6,6)
\psaxes{<<->>}(0,0)(-6,-6)(6,6)
\psset{arrows=->>}
\multido{\ia=-5+1}{11}{%
\multido{\ib=-5+1}{11}{%
\pstVerb{/x \ia\space def
/y \ib\space def
y 0 eq
{/ValueTempA 0 def
/ValueTempB 0.5 def}
{/ValueTempZ 2 1 x x mul y y mul div add sqrt mul def
/ValueTempA 1 ValueTempZ div def
/ValueTempB x y ValueTempZ mul div def}
ifelse}
\psline(! x ValueTempA sub y ValueTempB sub)
(! x ValueTempA add y ValueTempB add)}}
\end{pspicture}
\end{pdfdisplay}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...