| 1 |
% This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04 |
| 2 |
% Example 66 Adding New Columns Using Actions |
| 3 |
% Label: "ex:addcolaction" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: pdfcrop |
| 6 |
\documentclass[12pt]{article} |
| 7 |
\pagestyle{empty} |
| 8 |
\usepackage{datatool} |
| 9 |
\begin{document} |
| 10 |
\DTLaction{new} |
| 11 |
\DTLaction{new row} |
| 12 |
\DTLaction{add column} |
| 13 |
Added column \DTLuse{column} |
| 14 |
(key: \DTLuse{key}; header: \DTLuse{header}) |
| 15 |
to database `\DTLuse{name}'. |
| 16 |
|
| 17 |
\DTLaction[key=quantity]{add column} |
| 18 |
Added column \DTLuse{column} |
| 19 |
(key: \DTLuse{key}; header: \DTLuse{header}) |
| 20 |
to database `\DTLuse{name}'. |
| 21 |
|
| 22 |
\DTLaction[key=price,value=Price (\$)]{add column} |
| 23 |
Added column \DTLuse{column} |
| 24 |
(key: \DTLuse{key}; header: \DTLuse{header}) |
| 25 |
to database `\DTLuse{name}'. |
| 26 |
\end{document} |