Math & ScienceVector and temporal Derivative with Dot

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
perku
Posts: 2
Joined: Mon Oct 29, 2012 10:47 am

Vector and temporal Derivative with Dot

Post by perku »

Hi everybody,

We have a problem when we want to write the temporal derivative of a vector with a dot and when in the vector there is a dotted component, for example:

Code: Select all

\dot{\begin{bmatrix}z \\ \dot{z} \end{bmatrix}}
The result is that the second component of the vector is moved up and right. It can be shown in the attached image.

Is there any way to do it correctly?


Thank you very much
Aitor
Attachments
CodeCogsEqn.png
CodeCogsEqn.png (291 Bytes) Viewed 8465 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

Vector and temporal Derivative with Dot

Post by Stefan Kottwitz »

Hi Aitor,

welcome to the board!

The problem here is caused by nesting the \dot command. It can be fixed by using a box. Here's away which defines an outer dot command, which you can use with the normal \dot:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\newsavebox{\dotbox}
\newcommand{\outerdot}[1]{%
  \sbox\dotbox{$#1$}\dot{\usebox\dotbox}}
\begin{document}
\[
  \outerdot{\begin{bmatrix} z \\ \dot{z} \end{bmatrix}}
\]
\end{document}
Stefan
LaTeX.org admin
perku
Posts: 2
Joined: Mon Oct 29, 2012 10:47 am

Re: Vector and temporal Derivative with Dot

Post by perku »

Hi Stefan

Thank you very much, now my equations will be correct.

Aitor
Post Reply