Math & Science\dot{vec{v}} formatting.

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
utesfan100
Posts: 3
Joined: Sun Jan 02, 2011 7:59 am

\dot{vec{v}} formatting.

Post by utesfan100 »

I am having difficulties formatting a series of equations of the form listed below. I am using TeXnicCenter on a Windows 7 system.

I have distilled the issue I am having down to the following code fragment.

Code: Select all

\documentclass[12pt,leqno]{book}

%\usepackage{amsmath}         % LINE A
                                      
\title{Dot Vector Test}
\begin{document}
%\begin{subequations}
\begin{equation}
\dot{\left(a\vec{b}c\right)}  % LINE B
\end{equation}
%\end{subequations}           % LINE C
\end{document}
As written this code formats correctly, but does not have subequation numbering I desire.

Removing the comments in front of lines A, B and C properly handles sub-numbering, but then formats incorrectly, with the b dislocated to the far right of the entire \dot fragment, as shown here:
The erroneous formatting
The erroneous formatting
Error.gif (1.51 KiB) Viewed 2913 times
Removing the comments in front of lines B and C indicates subequations is not recognized.

I am new to TeX, and any help on this issue would be appreciated.
Last edited by utesfan100 on Wed Jan 12, 2011 6:55 pm, edited 1 time in total.

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

\dot{vec{v}} formatting.

Post by frabjous »

Seems like a bug in amsmath to me. Not sure what do about it other than kludge your way around it. Here's one possible kludge:

Code: Select all

\documentclass[12pt,leqno]{book}
\usepackage{amsmath}         % LINE A
\newsavebox{\innerdotpart}
\savebox{\innerdotpart}{$\left(a\vec{b}c\right)$}
          
\title{Dot Vector Test}
\begin{document}
\begin{subequations}
\begin{equation}
\dot{\usebox{\innerdotpart}}
\end{equation}
\end{subequations}  
\end{document}
utesfan100
Posts: 3
Joined: Sun Jan 02, 2011 7:59 am

\dot{vec{v}} formatting.

Post by utesfan100 »

Thank you! That kludge works!

The following change works too, allowing the save box to be a much smaller and more likely to be used again portion of this issue.

Code: Select all

\documentclass[12pt,leqno]{book}

\usepackage{amsmath} 
\newsavebox{\vecb}
\savebox{\vecb}{$\vec{b}$}
                                      
\title{Dot Vector Test} 
\begin{document}
\begin{subequations}
\begin{equation}
\dot{\left(a\usebox{\vecb}c\right)}
\end{equation}
\end{subequations}
\end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

\dot{vec{v}} formatting.

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic (not the last post) accordingly as clearly written in the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.


Best regards and welcome to the board
Thorsten
utesfan100
Posts: 3
Joined: Sun Jan 02, 2011 7:59 am

Re: \dot{vec{v}} formatting.

Post by utesfan100 »

Fixed, and my apologies for originally failing to follow the icon customs of the forum.

The AMS technical support staff verified this is a bug. Are there maintained compilations of known bugs in the standard packages?
Post Reply