General ⇒ Terms beside equations
Terms beside equations
I need to write the term of my equations beside the equation number, like [Hz] (Eq. 2.20).
The alignment of the equations must not be affected.
Any ideas?
Thanks
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
Terms beside equations
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\def\tagform@#1{\maketag@@@{(\ignorespaces Eq.~#1\unskip\@@italiccorr)}}
\makeatother
\begin{document}
\begin{gather}
a=b+c \\
d=e+f
\end{gather}
\end{document}
Re: Terms beside equations
I'll just attach an example
- Attachments
-
- help.jpg (4.38 KiB) Viewed 5760 times
Terms beside equations
Code: Select all
\makeatletter
\def\tagform@#1{\maketag@@@{[Hz]\ (\ignorespaces Eq.~#1\unskip\@@italiccorr)}}
\makeatother
Re: Terms beside equations
Terms beside equations
OK about the picture, but you should still complete your answer. Does that term vary from equation to equation? Do you require to control it somehow?rasole wrote:The picture is made in MS Paint (shows what I want the final result to look like). I need help designing the code, so a can place such a term, the ['term'], after an equation, as I like.
Terms beside equations
Code: Select all
\begin{eqnarray}
5 &=& 2 + 3 & [unit]
\end{eqnarray}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Terms beside equations
[1] The PracTeX Journal - TeX Users Group | Lars Madsen: Avoid eqnarray!
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Terms beside equations
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Terms beside equations
Code: Select all
\begin{align}
F&=m\cdot a & \text{[Nm]}
\end{align}
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10