Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I know it is a little unorthodox, but it would save me quite some time if I would be able to print a character instead of a vertical line in a table:

| a | b | c | -> | a | b $\sim$ c |

any clues?

share|improve this question
    
Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Marco Daniel May 11 '13 at 14:22
add comment

1 Answer 1

You can use the column separator @{}:

\begin{tabular}{|l|l|l@{$\rightarrow$}l|l@{${}\sim{}$}l|}

Here a complete minimal working example:

\documentclass{article}
\begin{document}
\begin{tabular}{|l|l|l@{${}\rightarrow{}$}l|l@{${}\sim{}$}l|}
 a & b &c & a &  b & c \\
\end{tabular}
\end{document}

enter image description here

See also the documentation of array.

share|improve this answer
    
I've added the missing backslash, but also two empty items for getting the spacing right. –  egreg May 11 '13 at 14:26
    
Thank you. Exactly what I need! –  user30534 May 11 '13 at 14:30
    
array package is not necessary –  Leo Liu May 11 '13 at 15:04
    
@LeoLiu: Indeed. –  Marco Daniel May 11 '13 at 16:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.