| 1 |
# pas-tableur |
| 2 |
|
| 3 |
**Version 2.07 – 2026/05/11** |
| 4 |
**Author:** Stéphane Pasquet |
| 5 |
|
| 6 |
A LaTeX package that uses TikZ to imitate the appearance of spreadsheets. |
| 7 |
|
| 8 |
> *Thanks to Susumu Tanimura for his contribution to the improvement of this package.* |
| 9 |
> *Thanks to Emiel van Miltenburg for his contribution with the `\multimultiSelec` macro.* |
| 10 |
|
| 11 |
--- |
| 12 |
|
| 13 |
## Description |
| 14 |
|
| 15 |
`pas-tableur` allows you to draw spreadsheet-like tables in LaTeX documents. It does **not** perform any spreadsheet calculations — it only reproduces the visual appearance of a spreadsheet. |
| 16 |
|
| 17 |
--- |
| 18 |
|
| 19 |
## Dependencies |
| 20 |
|
| 21 |
This package automatically loads the following packages: |
| 22 |
|
| 23 |
- `tikz` (with the `calc` library) |
| 24 |
- `xkeyval` |
| 25 |
- `xstring` |
| 26 |
|
| 27 |
--- |
| 28 |
|
| 29 |
## Installation |
| 30 |
|
| 31 |
Decompress `pas-tableur.zip` so that the files are placed as follows: |
| 32 |
|
| 33 |
**Ubuntu / Linux:** |
| 34 |
``` |
| 35 |
./texlive/texmf-local/tex/latex/pas-tableur/pas-tableur.sty |
| 36 |
./texlive/texmf-local/doc/latex/pas-tableur/pas-tableur.tex |
| 37 |
./texlive/texmf-local/doc/latex/pas-tableur/pas-tableur.pdf |
| 38 |
./texlive/texmf-local/doc/latex/pas-tableur/doc.codes.tex |
| 39 |
./texlive/texmf-local/doc/latex/pas-tableur/doc.styles.tex |
| 40 |
``` |
| 41 |
|
| 42 |
**Windows:** |
| 43 |
``` |
| 44 |
C:\texmf\latex\pas-tableur\pas-tableur.sty |
| 45 |
C:\texmf\doc\pas-tableur\pas-tableur.tex |
| 46 |
C:\texmf\doc\pas-tableur\pas-tableur.pdf |
| 47 |
C:\texmf\doc\pas-tableur\doc.codes.tex |
| 48 |
C:\texmf\doc\pas-tableur\doc.styles.tex |
| 49 |
``` |
| 50 |
|
| 51 |
After installation, run `texhash` in the terminal to update the package database. |
| 52 |
|
| 53 |
--- |
| 54 |
|
| 55 |
## Usage |
| 56 |
|
| 57 |
The main commands are: |
| 58 |
|
| 59 |
| Command | Description | |
| 60 |
|---|---| |
| 61 |
| `\tableur[n]{A-F}` | Draw a spreadsheet with `n` rows and columns A to F | |
| 62 |
| `\tableur[n]{A,B,C}` | Draw a spreadsheet with `n` rows and named columns | |
| 63 |
| `\tableur*[n]{A/2cm,B/5cm}` | Draw a spreadsheet with columns of different widths | |
| 64 |
| `\celtxt[options]{col}{row}{text}` | Insert text or a formula into a cell | |
| 65 |
| `\celtxt*[options]{col}{row}{text}` | Insert text in math mode | |
| 66 |
| `\selecCell{A}{1}` | Highlight cell A1 as selected | |
| 67 |
| `\multiSelec{A-1}{C-2}` | Highlight a range of cells from A1 to C2 | |
| 68 |
| `\multimultiSelec{A-1}{A-3}{A-6}` | Visualise cell stretching from A1–A3 extended to A6 | |
| 69 |
| `\renumLine{5}{text}` | Replace row label 5 with custom text (grey background) | |
| 70 |
| `\renumLineSelect{5}{text}` | Replace row label 5 with custom text (blue background) | |
| 71 |
|
| 72 |
### Quick example |
| 73 |
|
| 74 |
```latex |
| 75 |
\begin{tikzpicture} |
| 76 |
\tableur[2]{A,B,C} |
| 77 |
\celtxt[align=center]{A}{1}{=B1^2} |
| 78 |
\celtxt[align=right]{B}{2}{Some text} |
| 79 |
\end{tikzpicture} |
| 80 |
``` |
| 81 |
|
| 82 |
--- |
| 83 |
|
| 84 |
## Documentation |
| 85 |
|
| 86 |
The full documentation (in French) is available: |
| 87 |
|
| 88 |
- In the ZIP archive, under the `/doc/` directory |
| 89 |
- Online: https://mirrors.ctan.org/macros/latex/contrib/pas-tableur/doc/pas-tableur.pdf |
| 90 |
|
| 91 |
--- |
| 92 |
|
| 93 |
## Licence |
| 94 |
|
| 95 |
This package may be redistributed and/or modified under the terms of the |
| 96 |
[LaTeX Project Public License (LPPL)](https://www.latex-project.org/lppl/), |
| 97 |
as distributed from CTAN archives in `macros/latex/base/lppl.txt`. |