Math & Science ⇒ Same label for two different placed equation?
Same label for two different placed equation?
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Same label for two different placed equation?
Code: Select all
\documentclass[english]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{amsmath}
\begin{document}
\section{First Section}
An equation in the document seen as
\begin{equation}\label{eqn:einstein}
E=mc^2
\end{equation}
Followed by some equations just for demonstration
\begin{subequations}\label{eqn:binomi}
\begin{align}
(a+b)^2 &= a^2+2ab+b^2 \label{subeqn-1:binomi} \\
(a+b)^2 &= a^2-2ab+b^2 \label{subeqn-2:binomi} \\
(a+b)(a-b) &= a^2-b^2 \label{subeqn-3:binomi}
\end{align}
\end{subequations}
\appendix
\section{First Appendix Section}
And now the same equation again
\begin{equation}
E=mc^2 \tag{\ref{eqn:einstein}}
\end{equation}
tagged with the same number.
\end{document}
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Same label for two different placed equation?
Can I use \include{appendix} in my main document and make a new page called appendix.tex and start that page with \appendix?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Same label for two different placed equation?
Be precise and show concrete error messages from the log.Yue wrote:[...] but my document gives errors [...]
Of course. You only need one more compiler. In the first run the file »appendix.aux« is created. In the second run the compiler will retrieve all necessary information from that file to get the references right.Yue wrote:[...] Can I use \include{appendix} in my main document and make a new page called appendix.tex and start that page with \appendix?
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Same label for two different placed equation?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Same label for two different placed equation?
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Same label for two different placed equation?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Same label for two different placed equation?
[1] Creating a LaTeX Minimal Example
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Same label for two different placed equation?
\appendix
\include{butter}
\include{bibliographi}
etc.
Thx for your patience, it appears the Appendix only changes nummeration of the chapters and sections