\section{Special lines}

\subsection{Vertical lines: \tkzcname{tkzFnVLines}}
\begin{NewMacroBox}{tkzFnVLines}{\oarg{\TIKZ\ options}\marg{list}}
\emph{Draws the lines $x=a$ for the values $a$ of the list. The list is written as with \tkzcname{foreach} (\texttt{1,2,...,4}) and its items are Lua expressions (\texttt{1/3}, \texttt{2*pi}). \tkzcname{tkzFnVLine} is a synonym. The style is \tkzname{tkzfn line}.}

\begin{tabular}{lll}
  \toprule
arguments &  example  & definition  \\
\midrule
\TAline{list}{\{1,4\}}{draws the lines $x=1$ and $x=4$}
\bottomrule
\end{tabular}
\end{NewMacroBox}

\subsection{A vertical line}
With \tkzname{tkz-fct}, |1./3| was a problem; with Lua, |1/3| is correct.
\begin{tkzexample}[latex=8cm]
\begin{tikzpicture}[scale=2]
   \tkzFnInit[xmin=0,xmax=3,ymin=0,ymax=2]
   \tkzFnAxes
   \tkzFnVLine[color=blue,dashed,
               line width=1pt]{2}
   \tkzFnVLine[color=red,dashed,
               line width=1pt]{1/3}
\end{tikzpicture}
\end{tkzexample}

\subsection{Vertical lines}

\begin{tkzexample}[latex=7cm]
\begin{tikzpicture}
 \tkzFnInit[xmin=0,xmax=5,ymin=0,ymax=5]
 \tkzFnAxes
 \tkzFnVLines[color=green]{1,2,...,4}
\end{tikzpicture}
\end{tkzexample}

\subsection{Vertical lines at multiples of pi}
\begin{tkzexample}[]
\begin{tikzpicture}
  \tkzFnInit[xmin=-7,xmax=7,ymin=-1,ymax=1]
  \tkzFnAxisY
  \tkzFnAxisX[trig=2]
  \tkzFnVLines[color=red]{-2*pi,-pi,pi,2*pi}
\end{tikzpicture}
\end{tkzexample}

\subsection{Horizontal lines: \tkzcname{tkzFnHLines}}
\begin{NewMacroBox}{tkzFnHLines}{\oarg{\TIKZ\ options}\marg{list}}
\emph{Draws the lines $y=b$. \tkzcname{tkzFnHLine} is a synonym.}
\end{NewMacroBox}

\begin{tkzexample}[latex=7cm]
\begin{tikzpicture}
  \tkzFnInit[xmin=0,xmax=80,xstep=20,
             ymin=0,ymax=2]
  \tkzFnAxes
  \tkzFnHLine[color=red]{e-1}
\end{tikzpicture}
\end{tkzexample}

\subsection{Horizontal asymptote}

\begin{tkzexample}[]
\begin{tikzpicture}[scale=2.5]
  \tkzFnInit[xmin=0,xmax=5,ymin=0.5,ymax=1.5,ystep=0.5]
  \tkzFnGrid
  \tkzFnAxes
  \tkzFnDraw[name=f,domain=0:10]{x*exp(-x)+1}
  \tkzFnHLine[color=red,line width=1.2pt]{1}
  \tkzFnTangent[draw,color=blue](f,1)
  \tkzFnText[draw,fill=brown!20](2,0.75){$f(x)=x \text{e}^{-x}+1$}
\end{tikzpicture}
\end{tkzexample}

\newpage
\subsection{Horizontal lines}

\begin{tkzexample}[]
\begin{tikzpicture}[scale=.5]
 \tkzFnInit[xmin=0,xmax=10,ymin=0,ymax=10]
 \tkzFnAxes
 \tkzFnHLines[color=green]{1,2,...,10}
\end{tikzpicture}
\end{tkzexample}

\newpage
\subsection{Horizontal and vertical asymptotes}

The curve is automatically interrupted at $x=2$: there is no need to draw it in two parts.

\begin{tkzexample}[vbox]
\begin{tikzpicture}[scale=1.25]
 \tkzFnInit[xmin=0,xmax=10,ymin=0,ymax=10]
 \tkzFnGrid
 \tkzFnAxes
 \tkzFnDraw[name=f,color=red,samples=400,domain=1.001:10]{1+1/ln(x-1)^2}
 \tkzFnHLine[line width=1pt,color=red]{1}
 \tkzFnVLine[line width=1pt,color=blue]{2}
 \tkzFnDefPointXY(1,1){A}
 \tkzFnDrawPoints[fill=white,draw=Maroon,size=2pt](A)
 \tkzFnDefPoint[draw](f,{1+e}){B}
 \tkzFnLabelPoint[above right](B){$(1+\text{e}, 2)$}
 \tkzFnText[draw,color=black,fill=brown!20](6,6)
          {$f(x)=\dfrac{1}{\ln^2 (x-1)}+1$}
\end{tikzpicture}
\end{tkzexample}

\endinput
