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 don't like the way the vector with an arrow $\vec{x}$ looks. I would prefer to indicate it with a line underline but when I google it nothing comes up to show me how to do it. Does anyone know?

\documentclass[a4paper,11pt]{article}


\begin{document}

 \vec{x} 

\end{document}
share|improve this question
1  
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. –  Kurt Oct 7 '12 at 19:53
    
I did but someone edited it out. –  Magpie Oct 7 '12 at 20:30
1  
the macro itself is not an MWE. It is customary here to include the simplest document starting from \documentclass{...} ... \end{document} such that users can copy/paste your code and work on it directly. –  percusse Oct 7 '12 at 21:05
add comment

2 Answers

up vote 17 down vote accepted

Here is a comparison of a few techniques to represent a vector (not sure about the \overline, \underline ones as I don't think that that is standard usage):

enter image description here

Code:

\documentclass{article}
\usepackage{amsmath} 


\begin{document}
$\vec{x}$  $\overline{x}$  $\underline{x}$  $\mathbf{x}$

$\vec{\mathbf{x}}$  $\overline{\mathbf{x}}$  $\underline{\mathbf{x}}$ 
\end{document}
share|improve this answer
add comment

You can renew the command \vec.

\renewcommand{\vec}[1]{\underline{#1}}

In this case, if you use \vec your vector will be underlined. If you change mind and you want to use a dot or whatever, you can change the definition and all your \vec on the document will automatically change in the next compilation.

\documentclass{standalone}
\usepackage{amsmath}

\renewcommand{\vec}[1]{\underline{#1}}

\begin{document}
\[
   \vec{x} = \cdots % "x" will be underlined
\]
\end{document}
share|improve this answer
    
@Mico You are right! I edited the question! ;) –  R. M. Oct 8 '12 at 17:10
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.