Verzeichnis macros/latex/contrib/tkz/tkz-fn
tkz-fn — Graphs of functions with LuaLaTeX
Current release: 2026/10/19 version 1.00c
tkz-fn draws graphs of functions with TikZ; every computation is done by Lua. It is the successor of tkz-fct: gnuplot, fp.sty, tkz-base and --shell-escape are no longer needed.
Features
- Curves y = f(x), parametric and polar curves; the curve is interrupted where the function is not defined and at vertical asymptotes.
- Tangent lines and one-sided tangent lines, areas under a curve or between two curves, Riemann sums (left, right, mid, inf, sup).
- Points on a curve, coordinates, texts, vertical and horizontal lines, data.
- Results computed by Lua and written in the text: values, derivatives, integrals, Riemann sums.
- Two coordinate spaces: computations are done in the units of the coordinate system (
xstep,ystep), drawing is done in centimeters. - Numbers written in the American (
3.14,(a, b)) or the French (3,14,]a ; b[) format. - Axes as in school textbooks (arrow at one or both ends) or "box" axes as with pgfplots, chosen with an option (no environment).
- Optional bridge to
tkz-elements: the points defined bytkz-fnare available in the tablez.
Requirements
- LuaLaTeX
- TikZ (loaded by the package, with the library
plotmarks)
tkz-fn does not need tkz-base or tkz-euclide. All its macros begin with \tkzFn, so it can be used together with tkz-fct.
Installation
The package consists of two files: tkz-fn.sty and tkz_fn.lua. Put them in a folder known to TeX, for example texmf/tex/latex/tkz-fn, or in the folder of your document.
Quick start
% !TEX TS-program = lualatex \documentclass{article} \usepackage{tkz-fn} \begin{document} \begin{tikzpicture} \tkzFnInit[xmin=-2,xmax=4,ymin=-3,ymax=6] \tkzFnGrid \tkzFnAxes \tkzFnDef{f}{x^2 - 2*x - 1} \tkzFnDraw[thick,red](f) \tkzFnTangent[blue,kl=1.5,kr=1.5](f,3) \end{tikzpicture} $f'(3) = \tkzFnPrint{diff(f,3)}$ \end{document}
Expressions are Lua expressions: x^2, sin(x), ln(x), exp(x), sqrt(x), pi, e.
Documentation
doc/tkz-fn-en.pdf: documentation in American Englishdoc/tkz-fn-fr.pdf: documentation in French
The sources are in doc/latex-en and doc/latex-fr (class tkz-doc, LuaLaTeX, makeindex).
License
This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or (at your option) any later version. See LICENSE and lppl-1-3c.txt.
This work has the LPPL maintenance status "maintained". The Current Maintainer of this work is Alain Matthes.
Herunterladen des vollständigen Inhalts dieses Pakets in einem Zip-Archiv (1.4M).
Tkz-fn – Draw graphs of functions in 2D, using TikZ and LuaLaTeX
The package draws graphs of functions in 2D as simply as possible,
using TiKZ and Lua. It is the successor of tkz-fct:
gnuplot, fp.sty and
tkz-base are no longer needed; every computation
is done by Lua and the document is compiled with LuaLaTeX. The drawings are the
kind used in high school mathematics; the presentation (French or American conventions,
box
axes as with pgfplots) is
chosen with options.
| Paket | Tkz-fn |
| Version | 1.00c 2026-10-19 |
| Lizenzen | The LaTeX Project Public License 1.3c |
| Copyright | 2026 Alain Matthes |
| Betreuer | Alain Matthes |
| Themen | Grafiken LuaTeX-Verwendung Grafik-Plots PGF/TikZ |
| Siehe auch | tkz-fct |