Re: stessa numerazione per figure (xymatrix) e equazioni?

#7816
Up
0
Down
::

Il mio problema è il seguente (vi scrivo il codice del mio programma latex per farmi capire meglio)

`\documentclass[a4paper,10pt]{report}

\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{amssymb}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amscd}
\usepackage{makeidx}
\linespread{1.6}
\usepackage[all]{xy}
\usepackage{verbatim}
\usepackage[labelformat={parens},labelsep=space, hang]{caption}
\usepackage[bf, hang]{subfigure}

\begin{document}

\theoremstyle{definition}
\makeatletter %per scrivere 1.1.1 nelle caption delle figure
\renewcommand{\thefigure}{\thesection.\arabic{figure}}
\renewcommand{\figurename}{}
\makeatother

\chapter{}
\section{Hopf Algebra}
\numberwithin{equation}{section}

\begin{figure}[htbp]
\begin{minipage}{.45\textwidth}
\centering
\[\xymatrix{
M \ar[d]_m & M \otimes M \ar[l]_{m} \\
M \otimes M & M \otimes M \otimes M \ar[l]^{\tau \otimes m} \ar_{m \otimes I}
}\]
\caption{(The associative law)}
\end{minipage}

\hspace{7mm}
\begin{minipage}{.45\textwidth}
\centering
\[\xymatrix{
R \otimes M \ar[r]^{\eta \otimes I} \ar[dr]_{\cong} & M \otimes M \ar[d]_m & M \otimes R \ar[l]_{I \otimes \eta} \ar[dl]^{\cong} \\
& M &
}\]
\caption{(The unitary Property)}
\end{minipage}
\end{figure}

\begin{equation}
%ad esempio scrivo x_t
x_t
\end{equation}
\end{document}
`

Non riesco a dare la stessa numerazione alle figure e alle equazioni. Come potete vedere facendo girare il programma si ha che le figure sono (1.1.1) e (1.1.2), quando poi scrivo l’equazione ho di nuovo 1.1.1 mentre io vorrei che sia (1.1.3.)
Ho cercato sul forum e non mi sembra ci sia un problema di questo tipo.
Come si può risolvere. Vi ringrazio già da ora.

[Edit – e.vavassori] Per una volta tanto che qualcuno pensa di usare il BBcode, si sbaglia slash e non si legge nulla lo stesso… Buona l’azione, un po’ meno il tiro 🙂 Corretto.[/Edit]

È un modo barbarissimo di risolvere il tuo problema. Si può fare, ma ti do un altro suggerimento.`\begin{gather}
\begin{gathered}
\xymatrix{…};
\end{gathered}\\*
\text{(The associative law)}\notag\\[2ex]
\begin{gathered}
\xymatrix{…}
\end{gathered}
\text{(The unitary property)}\notag
\end{gather}`Così avrai i numeri al posto giusto; altrimenti il lettore non sa dove andarli a beccare. In ogni caso “figure” non è per niente adatto a qualcosa che deve andare proprio lì.
I due “gathered” servono per centrare i numeri rispetto alla xymatrix.

Ciao
Enrico

Go to top