MakeIndex, Nomenclature, Glossaries and Acronymswrong direction to an equation below a tagged one

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
marcin_marcin
Posts: 1
Joined: Mon Nov 15, 2021 1:45 pm

wrong direction to an equation below a tagged one

Post by marcin_marcin »

Hi,

I put a tag into an equation for example:

\begin{equation} \label{eq1} \tag{A}
a = b
\end{Equation}

Below this equation I have other numbered equations, lets call one of them \label{eq2}.

On the next pages, when I click a reference to eq2, it shows the text below eq1.
How to deal with that?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

wrong direction to an equation below a tagged one

Post by Ijon Tichy »

Unfortunately your code is neither a Infominimal working example nor correct nor marked as code. So I was not able to test it in the online compiler or to use the online editor to test my own ideas. So I can test the following example only after submitting it. So please wait at least 10 minutes, to give me the time to click to the "Run LaTeX here" button an do maybe fix some typos.

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{mwe}
\usepackage{hyperref}

\makeatletter
\newcommand*{\equationnumbering}[2][0]{%
  \setcounter{equation}{#1}%
  \gdef\theequation{\csname @#2\endcsname \c@equation}%
  \gdef\theHequation{\csname @#2\endcsname \c@equation}%
}
\makeatother
\begin{document}
\section{Test}

\blindtext

\equationnumbering{Alph}
\begin{equation}
  a = b
  \label{eq1} 
\end{equation}

\blindtext

\equationnumbering{arabic}
\begin{equation}
  c=d
  \label{eq2}
\end{equation}

\blindtext

\equationnumbering[1]{Alph}
\begin{equation}
  e=f
  \label{eq3}
\end{equation}

\blindtext

\equationnumbering[1]{arabic}
\begin{equation}
  g=h
  \label{eq4}
\end{equation}

\blindtext

See \eqref{eq1}, \eqref{eq2}, \eqref{eq3}, \eqref{eq4}

\end{document}
Edit: OK, seems to work. You can try it now.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply