\newcolumtype
command, and I'm quite confused as to the syntactic construction of these commands - I'd like to know a step-by-step breakdown of the command?I've seen/used for instance, both of these, and I'm not really sure what the difference is, or why I would use one or the other, or indeed, what's going on in the second command.
- Command 1: Here I basically get what's happening - a new column is defined with the name
R
- the>
sign indicates to apply the parameter before the first cell, in this case a ragged left margin, the\arraybackslash
is just required to cancel out the backslash as many Windows users are probably familiar with, and then I believe theX
is indicating the width of the column should be based on the text within it.Code: Select all
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}
- Command 2: By contrast, these types of multi-parameter commands I'm confused, because there is a
[1]
and{#1}
added, plus there are additional commands, which simply are written one after the other with backslashes (\) with no spaces - just "command{parameter}\command{parameter}".
I do understand the flipped caret<
indicating to perform that action after the cell has been dealt with.
[code]\newcolumntype{I}[1]{>{\begin{SomeEnvironment}\raggedright\arraybackslash}p{#1}<{\end{SomeEnvironment}}}%[/code]