diff options
author | Karl Berry <karl@freefriends.org> | 2015-03-18 22:18:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-03-18 22:18:56 +0000 |
commit | 3f21ad1106c152aa75655ef3ff6c9079047cef55 (patch) | |
tree | 2ca3a90a6adbb62866a196ce79cf53a60f3d38a2 | |
parent | a38b370bf53c20d0c435281ec6704366554873aa (diff) |
tikz-palattice (18mar15)
git-svn-id: svn://tug.org/texlive/trunk@36554 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-palattice/elsa.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-palattice/tikz-palattice_documentation.pdf | bin | 457132 -> 464598 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-palattice/tikz-palattice_documentation.tex | 78 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-palattice/tikz-palattice.sty | 30 |
4 files changed, 93 insertions, 23 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-palattice/elsa.tex b/Master/texmf-dist/doc/latex/tikz-palattice/elsa.tex index 335ab469c65..4d619144c97 100644 --- a/Master/texmf-dist/doc/latex/tikz-palattice/elsa.tex +++ b/Master/texmf-dist/doc/latex/tikz-palattice/elsa.tex @@ -32,10 +32,10 @@ \def\scale{0.5} -\tikzset{biggestlabel/.style={font=\bfseries\Huge,scale=2.5, align=center}} -\tikzset{biglabel/.style={font=\bfseries\Huge,scale=2, align=center}} -\tikzset{mediumlabel/.style={font=\huge,scale=2, align=center}} -\tikzset{smalllabel/.style={font=\Large,scale=2.2, align=center}} +\tikzset{biggestlabel/.style={font=\bfseries\Huge,scale=2.5, align=center,faded}} +\tikzset{biglabel/.style={font=\bfseries\Huge,scale=2, align=center,faded}} +\tikzset{mediumlabel/.style={font=\huge,scale=2, align=center,faded}} +\tikzset{smalllabel/.style={font=\Large,scale=2.2, align=center,faded}} diff --git a/Master/texmf-dist/doc/latex/tikz-palattice/tikz-palattice_documentation.pdf b/Master/texmf-dist/doc/latex/tikz-palattice/tikz-palattice_documentation.pdf Binary files differindex d218b6d24b9..41b362c0424 100644 --- a/Master/texmf-dist/doc/latex/tikz-palattice/tikz-palattice_documentation.pdf +++ b/Master/texmf-dist/doc/latex/tikz-palattice/tikz-palattice_documentation.pdf diff --git a/Master/texmf-dist/doc/latex/tikz-palattice/tikz-palattice_documentation.tex b/Master/texmf-dist/doc/latex/tikz-palattice/tikz-palattice_documentation.tex index 201c4e44d7c..1d557bd4edf 100644 --- a/Master/texmf-dist/doc/latex/tikz-palattice/tikz-palattice_documentation.tex +++ b/Master/texmf-dist/doc/latex/tikz-palattice/tikz-palattice_documentation.tex @@ -41,7 +41,7 @@ \newcommand{\tikzlabel}{Ti\textit{k}Z} \author{Jan Schmidt <schmidt@physik.uni-bonn.de>} -\date{v2.2 (March 01, 2015)} +\date{v2.21 (March 18, 2015)} \title{tikz-palattice - draw particle accelerator lattices with \tikzlabel} \hypersetup{ @@ -203,7 +203,7 @@ the default value of "scale" is 1. To draw a lattice just add \begin{lstlisting} -\usepackage{lattice} +\usepackage{tikz-palattice} \end{lstlisting} to your preambel and use the lattice environment with \begin{lstlisting} @@ -405,7 +405,7 @@ sets the text label font size. Default is \lstinline+\normalsize+. -\subsubsection{Colors} +\subsection{Colors} \label{sec:colors} The colors can be changed at any point of the lattice. A setting is valid until the next color command. The reset commands set the according default color. Use a \lstinline+scope+ @@ -430,6 +430,10 @@ for all element types. Set \optiondef{gradient color}{white} equal to \option{co for textlabels. Set to background color to hide text labels. + +\subsection{Fade Out} +\label{sec:fade-out} + \begin{lstlisting} \begin{fade}[(*\optiondef{opacity}{0.25}*)] ... @@ -437,8 +441,63 @@ for textlabels. Set to background color to hide text labels. \end{lstlisting} reduces the opacity of all elements within the environment and sets all colors to gray. So you can fade out regions of the lattice - e.g. for presentations. - This can also be used to completely hide regions by setting \optiondef{opacity}{0.25} to zero. + This can also be used to completely hide regions by setting \optiondef{opacity}{0.25} to + zero. + Custom drawings and annotations (see section \ref{sec:coords}) can also be faded out + automatically. The tikz style \lstinline{faded} provides the appropriate settings: Add + \lstinline{faded} to the style of any tikz drawing or node within the \lstinline{lattice} + environment. If it is drawn within a \lstinline{fade} environment, it is faded out. Else + its style is not changed: + +\begin{minipage}[c]{0.6\textwidth} +\begin{lstlisting} + \begin{lattice} + \tikzset{mynode/.style={ + anchor=west,xshift=7mm,font=\bf,red}} + \setangle{-90} + \drift{0.2} + \sextupole{S1}{0.2} + \drift{0.267} + \begin{fade}[0.4] + \quadrupole{Q1}{0.4} + \savecoordinate{Q1}[center] + \node[mynode,faded] at (Q1) {a quadrupole!}; + \drift{0.29} + \end{fade} + \kicker{VC1}{0.1} + \savecoordinate{kick}[center] + \node[mynode,faded] at (kick) {a kicker!}; + \drift{0.2} + \dipole{M1}{0.8}{30} + \drift{0.29} + \end{lattice} +\end{lstlisting} +\end{minipage} +% +\begin{minipage}[c]{0.4\textwidth} + \begin{center} + \begin{lattice} + \tikzset{mynode/.style={anchor=west,xshift=7mm,font=\bf,red}} + \setangle{-90} + \drift{0.2} + \sextupole{S1}{0.2} + \drift{0.267} + \begin{fade}[0.4] + \quadrupole{Q1}{0.4} + \savecoordinate{Q1}[center] + \node[mynode,faded] at (Q1) {a quadrupole!}; + \drift{0.29} + \end{fade} + \kicker{VC1}{0.1} + \savecoordinate{kick}[center] + \node[mynode,faded] at (kick) {a kicker!}; + \drift{0.2} + \dipole{M1}{0.8}{30} + \drift{0.29} + \end{lattice} + \end{center} +\end{minipage} @@ -572,6 +631,7 @@ exact place of the element. \textit{east} and \textit{center} are available (see +\clearpage \section{Changelog} \label{sec:changelog} v2.1 from 2015/02/23 is the first published version. @@ -583,6 +643,13 @@ v2.1 from 2015/02/23 is the first published version. \item minor documentation improvements \end{itemize} +\paragraph{v2.21 from 2015/03/18} +\begin{itemize} +\item added \lstinline+faded+ style (apply fade out to custom annotations) +\item fixed sector dipole drawing +\item documentation fixes +\end{itemize} + \section{TODO} \label{sec:todo} @@ -604,6 +671,9 @@ bunch of macros. So there is: \paragraph{Known issues:} \begin{itemize} +\item A circular lattice can have a significant offset (no closed circle), if the dipole + bending angles are not integer. Probably, this is due to rounding or calculation + accuracy. \item Please report bugs! \end{itemize} diff --git a/Master/texmf-dist/tex/latex/tikz-palattice/tikz-palattice.sty b/Master/texmf-dist/tex/latex/tikz-palattice/tikz-palattice.sty index 44511f240e2..064d990b97f 100644 --- a/Master/texmf-dist/tex/latex/tikz-palattice/tikz-palattice.sty +++ b/Master/texmf-dist/tex/latex/tikz-palattice/tikz-palattice.sty @@ -18,7 +18,7 @@ % and the 5 example files example1_linear.tex, example2_circular.tex, % example3_coordinates.tex, example4_labels.tex and elsa.tex -\ProvidesPackage{tikz-palattice}[2015/03/01 v2.2] +\ProvidesPackage{tikz-palattice}[2015/03/18 v2.21] \RequirePackage{tikz} \RequirePackage{ifthen} \RequirePackage{siunitx} @@ -102,15 +102,15 @@ \newcommandx{\setelementcolor}[3][3=white]{% \tikzset{#1/.append style={bottom color=#2, top color=#3, fadeElement}}} \newcommand{\resetelementcolor}[1]{\tikzset{#1/.style={default_#1}}} -\newcommand{\setlinecolor}[2]{\tikzset{#1/.append style={#2, fade}}} +\newcommand{\setlinecolor}[2]{\tikzset{#1/.append style={#2, faded}}} \newcommand{\resetlinecolor}[1]{\tikzset{#1/.style={default_#1}}} \newenvironmentx{fade}[1][1=0.25]{% -\tikzset{fade/.style={opacity=#1, color=gray}} -\tikzset{fadeElement/.style={fade, color=gray,bottom color=gray,top color=white}} +\tikzset{faded/.style={opacity=#1, color=gray}} +\tikzset{fadeElement/.style={faded, color=gray,bottom color=gray,top color=white}} }{% -\tikzset{fade/.style={opacity=1.0}} % color not set -\tikzset{fadeElement/.style={fade}} +\tikzset{faded/.style={opacity=1.0}} % color not set +\tikzset{fadeElement/.style={faded}} } @@ -350,7 +350,7 @@ \ifthenelse{\equal{#4}{s}}{% \draw[dipole] (east\i) -- ++ (0,-\elementheight/2) arc (-90:(-90+\winkel):\ra) -- ++(\winkel+90:\elementheight) arc - ((-90+\winkel):-90:\ri) --++ (0,-\elementheight); + ((-90+\winkel):-90:\ri) -- cycle; \angleinc{0.5*\winkel} }{ % [b]end[r]ectangle @@ -497,12 +497,12 @@ % ----- styles ----- -%fade (for global fade setting) -\tikzset{fade/.style={ +%faded (for global fade setting) +\tikzset{faded/.style={ opacity=1 }} \tikzset{fadeElement/.style={ -fade +faded }} %element (for all, except drift) @@ -611,7 +611,7 @@ valve/.style={default_valve} %drift \tikzset{default_drift/.style={ line width=0.8pt*10*\scal, draw=black, -fade %must be last to overwrite other settings +faded %must be last to overwrite other settings }, drift/.style={default_drift} } @@ -622,13 +622,13 @@ text=\labelcolor, font=\labelfont, rotate=\labelrot, anchor=\labelanchor, -fade %must be last to overwrite other settings +faded %must be last to overwrite other settings }} %marker (line) \tikzset{default_marker/.style={ red, densely dashed, -fade %must be last to overwrite other settings +faded %must be last to overwrite other settings }, marker/.style={default_marker} } @@ -637,7 +637,7 @@ marker/.style={default_marker} \tikzset{rule/.style={ draw=black, fill=black, -fade %must be last to overwrite other settings +faded %must be last to overwrite other settings }} %start @@ -645,5 +645,5 @@ fade %must be last to overwrite other settings draw=none, anchor=center, scale=0.1, -fade %must be last to overwrite other settings +faded %must be last to overwrite other settings }} |