summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-circ
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-09 18:18:51 +0000
committerKarl Berry <karl@freefriends.org>2010-09-09 18:18:51 +0000
commitca6174f9c4fd4c9f7f8e849d208934db0fcb3fa8 (patch)
treee5639cc3368ca9af1b946f8cdbe59792933caf02 /Master/texmf-dist/doc/generic/pst-circ
parent6f8ad80b630fe27ac6608c9a23305830ac19625b (diff)
pst-circ 1.55 (16aug10)
git-svn-id: svn://tug.org/texlive/trunk@19628 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-circ')
-rw-r--r--Master/texmf-dist/doc/generic/pst-circ/Changes2
-rw-r--r--Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.bib9
-rw-r--r--Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.pdfbin519468 -> 515816 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.tex89
4 files changed, 50 insertions, 50 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-circ/Changes b/Master/texmf-dist/doc/generic/pst-circ/Changes
index 2854398fecd..0172eedfe8d 100644
--- a/Master/texmf-dist/doc/generic/pst-circ/Changes
+++ b/Master/texmf-dist/doc/generic/pst-circ/Changes
@@ -1,3 +1,5 @@
+1.55 2010-08-15 - circledipole with variable radius
+ - added macro \newCircDipole (cb)
1.54 2010-03-29 - fix bug in \Transformer
- allow any coordinate type in \Transformer
1.53 2010-02-13 - add OpenDipol and OpenTripol
diff --git a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.bib b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.bib
index d4c75592e2a..a3084b2e032 100644
--- a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.bib
+++ b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.bib
@@ -108,3 +108,12 @@
address = {Heidelberg/Berlin}
}
+@Book{PSTricksE,
+ author = {Herbert Vo\ss{}},
+ title = {\texttt{PSTricks} -- {G}raphics and {P}ost{S}cript for \LaTeX},
+ edition = {1st},
+ publisher = {UIT},
+ year = {2010},
+ address = {Cambridge -- UK}
+}
+
diff --git a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.pdf b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.pdf
index 9f2510a418a..862f71fcdae 100644
--- a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.tex b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.tex
index c8ec4aa4448..da0d6b4cb95 100644
--- a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-circ-doc.tex 292 2010-02-13 19:55:55Z herbert $
+%% $Id: pst-circ-doc.tex 370 2010-08-15 08:30:39Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
headexclude,footexclude,oneside]{pst-doc}
\usepackage[utf8]{inputenc}
@@ -98,6 +98,7 @@ of having older versions, go to \url{http://www.CTAN.org/} and load the newest v
\begingroup\setlength\emergencystretch{3em}
Thanks to: \\
\mbox{Rafal Bartczuk},
+\mbox{Christoph Bersch},
\mbox{Fran\c{c}ois Boone},
\mbox{Jean-C\^ome Charpentier},
\mbox{Patrick Drechsler},
@@ -2794,60 +2795,30 @@ all is finished.
\end{LTXexample}
-
\section{Adding new components}
-Adding new components is not simple. As a matter of fact, because of the complex
-mechanism of \Lcs{multidipole}, there are multiple steps. Nevertheless, it can take some time\ldots
-
-If you want to modify the code, you need to know the following
-things. For a dipole, you first
-need to define the following items:
+Adding new components is not simple unless you need only a simple dipole. For dipoles a macro is provided that generates all helping macros for a new component so that you need to write only the actual drawing code.
+If you want to add a new dipole component, you only need the following code:
\begin{lstlisting}[language=TeX]
- \def\component_name{\@ifnextchar[{\pst@component_name}{\pst@component_name[]}}
- %
- \def\pst@component/_name[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@component_name
- }\ignorespaces}
- %
- \def\pst@multidipole@component_name{\@ifnextchar[{\pst@multidipole@component_name@}%
- {\pst@multidipole@component_name@[]}}
- %
- \def\pst@multidipole@component_name@[#1]#2{%
- \expandafter\def\csname pst@circ@tmp@\number\pst@circ@count@iii\endcsname{#2}%
- {\psset{#1}%
- \ifPst@circ@parallel\aftergroup\advance\aftergroup\pst@circ@count@i\aftergroup\m@ne\fi}%
- \pst@circ@count@ii=\pst@circ@count@i%
- \advance\pst@circ@count@ii\@ne%
- \toks0\expandafter{\pst@multidipole@output}%
- \edef\pst@multidipole@output{%
- \the\toks0%
- \pst@multidipole@def@coor%
- \noexpand\component_name[#1]%
- (! X@\the\pst@circ@count@i\space Y@\the\pst@circ@count@i)%
- (! X@\the\pst@circ@count@ii\space Y@\the\pst@circ@count@ii)%
- {\noexpand\csname pst@circ@tmp@\number\pst@circ@count@iii\endcsname}%
- }%
- \pst@multidipole@
- }
- %
- \def\pst@draw@component_name{%
+ \newCircDipole{ComponentName}%
+ \def\pst@draw@ComponentName{%
% The PSTricks code for your component
% The center of the component is at (0,0)
\pnode(component_left_end,0){dipole@1}
\pnode(component_right_end,0){dipole@2}}
\end{lstlisting}
+This code can be placed in the core code or somewhere in the respective document in which case it must be surrounded by \lstinline[language=TeX]{\makeatletter...\makeatother}.
-Then, you have to make some changes in the \Lcs{multidipole} core code\dots In the definition
+If your new dipole should also work with \Lcs{multidipole} then you have to make some changes in the \Lcs{multidipole} core code. In the definition
of \Lcs{pst@multidipole}, look for the last \Lcs{ifx} test
\begin{lstlisting}[language=TeX]
% ...
% Extract from \pst@multidipole
- \else\ifx\circledipole#4\let\next\pst@multidipole@circledipole
- \else\ifx\LED #4\let\next\pst@multidipole@LED
+ \else\ifx\OpenDipol #4\let\pscirc@next\pst@multidipole@OpenDipol% 27
+ \else\ifx\OpenTripol #4\let\pscirc@next\pst@multidipole@OpenTripol% 28
\else % Put your modification here
- \let\next\ignorespaces
+ \else\let\pscirc@next\ignorespaces
\fi\fi\fi
% Extract form \pst@multidipole
% ...
@@ -2856,11 +2827,11 @@ and add (marked with \verb+%%%+)
\begin{lstlisting}[language=TeX]
% ...
% Extract from \pst@multidipole
- \else\ifx\circledipole #4\let\next\pst@multidipole@circledipole
- \else\ifx\LED #4\let\next\pst@multidipole@LED
- \else\ifx\component_name#4\let\next\pst@multidipole@component_name%%%
- \else\let\next\ignorespaces
- \fi\fi\fi\fi
+ \else\ifx\OpenDipol #4\let\pscirc@next\pst@multidipole@OpenDipol% 27
+ \else\ifx\OpenTripol #4\let\pscirc@next\pst@multidipole@OpenTripol% 28
+ \else\ifx\ComponentName#4\let\next\pst@multidipole@ComponentName%%%
+ \else\let\pscirc@next\ignorespaces
+ \fi\fi\fi
% Extract form \pst@multidipole
% ...
\end{lstlisting}
@@ -2868,17 +2839,35 @@ Do the same in \verb+\pst@multidipole@+
\begin{lstlisting}[language=TeX]
% ...
% Extract from \pst@multidipole@
- \else\ifx\circledipole#1\let\next\pst@multidipole@circledipole
- \else\ifx\LED #1\let\next\pst@multidipole@LED
- \else\ifx\component_name#1\let\next\pst@multidipole@component_name%%%
- \else\let\next\ignorespaces\pst@multidipole@output
- \fi\fi\fi\fi
+ \else\ifx\OpenDipol#1\let\pscirc@next\pst@multidipole@OpenDipol% 27
+ \else\ifx\OpenTripol#1\let\pscirc@next\pst@multidipole@OpenTripol% 28
+ \else\ifx\ComponentName#1\let\next\pst@multidipole@ComponentName%%%
+ \else\let\pscirc@next\ignorespaces\pst@multidipole@output
+ \fi\fi\fi
% Extract form \pst@multidipole@
% ...
\end{lstlisting}
and that's it! All you have to do then is send your modified \LFile{pst-circ.tex} to
me and it will become part of the official release of \LPack{pst-circ}.
+\bigskip
+\begin{LTXexample}[width=3.5cm]
+ \begin{pspicture}(3,2)
+ \newCircDipole{delayline}
+ \makeatletter
+ \def\pst@draw@delayline{%
+ \psset{linewidth=1.5\pslinewidth}%
+ \psframe(-0.5,-0.3)(0.5,0.3)
+ \psline[arrows=->](-0.2,-0.5)(0.2,0.5)
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}}%
+ \makeatother
+ \pnode(0,1){A}\pnode(3,1){B}
+ \delayline(A)(B){delay}
+ \end{pspicture}
+\end{LTXexample}
+
+
\clearpage