%% %% The LaTeX Companion, 3ed %% %% Example 6-9-1 on page I-496 in "keyvaltable --- Separating table data and formatting". %% %% Copyright (C) 2022 Frank Mittelbach %% %% It 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 https://www.latex-project.org/lppl.txt for details. %% \documentclass{tlc3exa} \pagestyle{empty} \setcounter{page}{6} \setlength\textwidth{165.0pt} \usepackage{keyvaltable} \NewKeyValTable{cities}{ name: align=c, head=city; country: default = ??, format = \textbf; note: align = X, format = \raggedright, default = \ ---; visited: hidden } %StartShownPreambleCommands \usepackage{keyvaltable} % \NewKeyValTable{cities}{...} as defined above %StopShownPreambleCommands \begin{document} \begin{KeyValTable}[nobg]{cities} \Row{name=Mainz, note=Birthplace of Gutenberg} \Row[format=\color{blue}] {name=New York, country=USA, visited=yes} \end{KeyValTable} \end{document}