summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-10-03 22:23:01 +0000
committerKarl Berry <karl@freefriends.org>2013-10-03 22:23:01 +0000
commit9334469d545fb017cccf5b7f4075005dc17a4949 (patch)
tree728bc8604653a6f54a0810e200084861a1f3ae0e /Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf
parentd5046892b80eb50260f48053ecb651524bb8fd99 (diff)
pstricks_calcnotes (3oct13)
git-svn-id: svn://tug.org/texlive/trunk@31821 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf')
-rw-r--r--Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/Readme.txt17
-rw-r--r--Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/convert.tex41
-rw-r--r--Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/test.pdfbin0 -> 19361 bytes
3 files changed, 58 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/Readme.txt b/Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/Readme.txt
new file mode 100644
index 00000000000..18c0a961e3d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/Readme.txt
@@ -0,0 +1,17 @@
+Dear friends,
+
+To convert a PSTricks-code picture into a graphic file ".pdf", as doing an exercise, run
+the file "convert.tex" by the following steps:
+
+ 1) latex convert.tex (you automatically get the output file "convert-fig1.tex". Put the definitions in the preamble
+ of the convert.tex file in that of the convert-fig1.tex file).
+ 2) latex convert-fig1.tex
+ 3) dvips convert-fig1.dvi
+ 4) call the file "convert-fig1.ps" by the Ghostview progam to convert this file into its
+ eps version (you can rename the result, say "fig1.eps").
+ 5) use the eps2pdf program to convert the file "fig1.eps" into the file "fig1.pdf".
+
+The file "test.pdf" contains the vector field of the differential equation y'=2xy/(1+y^2).
+Check your file "fig1.pdf" to see this vector field!
+
+Enjoy!
diff --git a/Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/convert.tex b/Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/convert.tex
new file mode 100644
index 00000000000..d7464faaf32
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/convert.tex
@@ -0,0 +1,41 @@
+\documentclass[11pt,a4paper,oneside]{article}
+\usepackage{pdftricks}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\xch{\catcode`\p=12 \catcode`\t=12}\def\ych{\catcode`\p=11 \catcode`\t=11}
+\xch \def\dec#1pt{#1}\ych \def\decimal#1{\expandafter\dec \the#1}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\vecfldnew#1#2#3#4#5#6#7#8{%
+\newcount\intg \newdimen\fx \newdimen\fy \newdimen\slope \newdimen\interm
+\def\fintg{\interm=#8 \interm=\intg\interm \ifdim\ifdim\slope<0pt-\fi\slope>\interm\advance\intg by 1\fintg\fi}
+\multido{#2}{#4}
+{\multido{#1}{#3}
+{\curvepnodes[algebraic,plotpoints=2]{0}{1}{\nx+((#5)*t)*(1/sqrt(1+(#6)^2))|\ny+((#5)*t)*(1/sqrt(1+(#6)^2))*(#6)}{P}
+#7 \slope=10\slope\fintg
+\ifnum\intg>10\psline[linecolor=red]{->}(P0)(P1)\else\ifnum\intg=0\psline[linecolor=red!5]{->}(P0)(P1)\else\multiply\intg by 10
+\psline[linecolor=red!\the\intg]{->}(P0)(P1)\fi\fi
+\intg=0\slope=0pt
+}}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\title{Making files \texttt{.ps} from \texttt{PSTricks}}
+\begin{document}
+\maketitle
+\begin{psinputs}
+\usepackage{pstricks}
+\usepackage[dvips]{geometry}
+\usepackage{pst-plot,pst-coil,multido,pst-xkey,pst-node}
+\usepackage{calculator}
+\usepackage{calculus}
+\usepackage{pst-func}
+\usepackage{pstricks-add}
+\end{psinputs}
+\section{Here is the PSTricks code to be converted}
+\begin{pdfpic}
+\begin{pspicture}(-3,-3)(3,3)
+\psset{unit=28.5pt,dotsize=2.6pt}
+\vecfldnew{\nx=-3.00+0.3}{\ny=-3.00+0.3}{20}{20}{0.3}{2*(\nx)*(\ny)/(1+(\ny)^2)}
+{\fx=\nx pt\SUMfunction{\ONEfunction}{\SQUAREfunction}{\Fncty}
+\Fncty{\ny}{\soly}{\Dsoly}\DIVIDE{\Dsoly}{\soly}{\tempa}\slope=\tempa pt\slope=\decimal\fx\slope}{3pt}
+\psaxes[labelFontSize=$\footnotesize$,Dy=1,Dx=1,ticksize=2.2pt,labelsep=4pt,linewidth=0.7pt]{->}(0,0)(-3,-3)(3,3)
+\end{pspicture}
+\end{pdfpic}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/test.pdf b/Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/test.pdf
new file mode 100644
index 00000000000..8df926c72d2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pstricks_calcnotes/Convert_PstricksCode_To_Pdf/test.pdf
Binary files differ