I'm wondering about what's the "correct" symbol to use when typesetting standard string concatenation (I've seen How do I typeset the concatenation of strings properly? btw, but it deals with a non-standard variant of concatenation, which I'm not interested in).
Should one use ||
directly or \parallel
? Or maybe something else completely?
I'm not able to make up my mind about the first two. ||
seems to be what I'm after usually, but sometimes it feels like it leaves too little space between the concatenated words. Conversely, \parallel
also seems to work sometimes, but often leaves too much space between words.
So, which one to chose if I were to do this "correctly"?
\parallel
that qualifies as a relation symbol; doing\newcommand{\conc}{\mathbin{\|}}
will give a double bar spaced like a binary operation.\cdot
, as inabc = a \cdot b \cdot c
.\newcommand{\concatenate}{\textdoublepipe}
is what I would go for. After that you can use\concatenate
everywhere. Should you then think that\textdoublepipe
doesn't look nice enough, you can simply replace it by\shortparallel
once in the definition.