I'm still on my way to my key:value table, and this time, I'm trying to alias [\normalbaselineskip] to \\. I still want to use the standard \\. What I want is to consider \\ as [\normalbaselineskip] only if it follows directly (without space) another \\. Typically, if I type \\\\ in the tabularx environment below, the first needs to be interpreted as a standard \\ and the second as [\normalbaselineskip]. Where things goes tricky is that I want, if possible, to restrict the scope of that \\\\ alias only to this tabularx (keyvalue) environment.
\documentclass{report}
\usepackage[margin=2cm]{geometry}
\linespread{1.2}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{float}
\newenvironment{keyvalue}
{\tabularx{\textwidth}{X@{ : }X}}
{\endtabularx}
\begin{document}
\begin{keyvalue}
Foo bar lorem ipsum & Lorem ipusm que \\
Some number & 12 3456 789 8 \\
\multicolumn{2}{l}{This is some comment} \\[\normalbaselineskip]
Yet some number & 987 65432 1 \\
Foo bar & 163883495778 \\[\normalbaselineskip]
Bar lorem ipsum & 2013-04-12 \\
\end{keyvalue}
\end{document}
Thanks in advance for your help.
:, correct? – Werner Feb 09 '15 at 00:09\newcommand{\wget}{\\[\normalbaselineskip]}.... – jon Feb 09 '15 at 00:09\newcommand{\wgetbreak}{\addlinespace[\normalbaselineskip]}and add\wgetbreakafter\\where you want more space. – egreg Feb 09 '15 at 00:14\multicolumn{2}{l}{This is some comment}is to avoid the colon:to be printed when there is only one element in the row. – wget Feb 09 '15 at 07:50\wgetor\wgetbreakwhich I could have defined by myself, but\\instead which doesn't conflict with the existing\\meaning. – wget Feb 09 '15 at 07:55\\) and either (a) any number of letters, or (b) only one non-letter. since you can't redefine\to be a letter, trying to redefine\\\\is simply impossible. – barbara beeton Feb 09 '15 at 13:21\\or\\\\, then might she not then want\\\\\\? (or, why not:\\\\\?) Macros can have relatvely intuitive and meaningful names likebooktabs'\addlinespace-- which is also useful when you revisit a file several years later because\addlinespacehas a pretty unambiguous meaning that your collection of slashes mostly lacks. – jon Feb 10 '15 at 03:31