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 see some tables with a horizontal line placed at the middle of a cell, for terms not available or not applicable. For example, how shall I replace the "N.A." below with such a line?

\begin{table}[htbp]
\centering
\caption{Caption}
\begin{tabular}{ccc}
\hline
Auctions of & P\_value &  $\widehat{\theta}$ \\
\midrule
2  & 0.375 & $\underset{(0.230)}{0.354}$ \\
3  & 0.002 & N.A. \\
\bottomrule
\end{tabular}
\end{table}
share|improve this question
    
Is \--- enough? Or maybe \-- or even \verb+-+. –  Sigur May 16 at 23:33
    
@Sigur \--- and \--? Did you mean --- and --? –  egreg May 17 at 8:09
    
@egreg, I always had used that. What is the difference? Non breakable? –  Sigur May 17 at 15:56
    
@Sigur \- gives a discretionary hyphen, so \--- is a discretionary hyphen followed by an en-dash. –  egreg May 17 at 16:56
1  
@Sigur I don't understand what you're saying; \- is a control symbol, so it's already a complete control sequence name; \--- is three tokens: \-, - and -; unless you change the definition of \-, \- is a discretionary hyphen and, at typesetting time, -- is converted to an en-dash. –  egreg May 17 at 17:06

1 Answer 1

I suggest defining a command \NA that holds an em-dash ---:

enter image description here

\documentclass{article}
\usepackage{booktabs,amsmath}
\newcommand{\NA}{---}
\begin{document}

\begin{tabular}{ccc}
  \toprule
  Auctions of & \detokenize{P_value} &  $\widehat{\theta}$ \\
  \midrule
  2  & 0.375 & $\underset{(0.230)}{0.354}$ \\
  3  & 0.002 & \NA \\
  \bottomrule
\end{tabular}

\end{document}

This way, if you don't like it later (in life), just change the definition to something more suitable (perhaps an en-dash --).

share|improve this answer

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.