TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

With reference to the first answer in this: Drawing Mechanical Systems in LaTeX

I want the text x above the arrow, simple as that, also how can I control how high above the arrow it is?

So I tried adding an {$x$} to the "-latex" arrow, like this:

\draw [-latex,ultra thick] (M.east) ++ (0.2cm,0) -- +(1cm,0) node [midway,above] {$x$};

but the x gets boxed, I want it without the box.

Maybe one could show me how to cancel for node style that was set in the beginning, but that would remove the box around m which is important.

share|improve this question
Use node [draw=none,midway,above] {$x$};. – Harish Kumar Sep 11 '12 at 12:38
Use node [draw=none,midway,above=3cm] {$x$};. Change 3cm to whatever you desire. – Harish Kumar Sep 11 '12 at 12:44

You can use the options for draw (draw=none) and above (above=1ex) in

node [draw=none,midway,above=3cm] {$x$};

Hence you have to add

\draw [-latex,ultra thick] (M.east) ++ (0.2cm,0) -- +(1cm,0) node [draw=none,midway,above=3cm] {$x$};

to get rid of the box and control the distance of x from arrow.

share|improve this answer
thank you so much, you helped me in no time, this is great! – user18601 Sep 11 '12 at 13:20
@user18601: If this answer solved your problem, you may consider upvoting and also accepting (by clicking the check mark below vote count) it. This is how we say thanks here in TeX.SX. – Harish Kumar Sep 11 '12 at 13:29

Your Answer


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.