3

I have equations like this:

\documentclass[DVI=17]{scrartcl}
\usepackage{amsmath}
\usepackage{cleveref}
\DeclareMathOperator{\FA}{FA}
\DeclareMathOperator{\RA}{RA}
\DeclareMathOperator{\MD}{MD}
\DeclareMathOperator{\RD}{RD}
\DeclareMathOperator{\AD}{AD}
\newcommand{\eqname}[1]{\tag*{#1~(\theequation)}\refstepcounter{equation}}

\begin{document}

\begin{equation}
  \ln\left[ \frac{A(2\tau)}{A(0)} \right] =  -D \gamma^2 \delta^2 \left( \Delta - \frac13\delta \right)G^2 \eqname{Stejskal-Tanner}
  \label{eq:st}
\end{equation}

\newcommand{\FASUMI}[1]{\left(\lambda_{#1} - \MD\right)^2}
\newcommand{\FASUM}{\FASUMI{1} + \FASUMI{2} + \FASUMI{3}}
\begin{align}
  \AD &= \lambda_{\parallel} = \lambda_1 {\eqname{Axial Diffusivity}} \\
  \RD &= \lambda_{\perp} = \frac{\lambda_2 + \lambda_3}{2} \eqname{Radial Diffusivity} \\
  \MD &= \frac{1}{3}\sum \lambda_i \eqname{Mean Diffusivity} \\
  \FA &= \sqrt{\frac{3}{2}} \frac{\sqrt{\FASUM}}{\sqrt{\sum \lambda_i^2}} \eqname{Fractional Anisotropy}\label{eq:fa} \\
  \RA &= \sqrt{\frac{1}{3}} \frac{\sqrt{\FASUM}}{\MD} \eqname{Relative Anisotropy}
\end{align}

In text we refer \Cref{eq:st} and \Cref{eq:fa}.
\end{document}

which renders to:

enter image description here

While the rendering of the equations is exactly what I am searching, the referencing is not. I want to use cleveref to save the "Equation" word. Ideally I want to have such a text: we refer Equation (1).. best with \Cref. Therefore I just need to find a way to put the equation name not into the tag but at the same place. It should work for align and equation the same way. So, what I am really asking is, how to put the eq. name next to its number, but without using \tag.

3

I use fleqn package to achieve it.

\documentclass[DVI=17]{scrartcl}
\usepackage{amsmath}
\usepackage{cleveref}
\usepackage{fleqn}
\DeclareMathOperator{\FA}{FA}
\DeclareMathOperator{\RA}{RA}
\DeclareMathOperator{\MD}{MD}
\DeclareMathOperator{\RD}{RD}
\DeclareMathOperator{\AD}{AD}

\begin{document}

\begin{flalign}
\phantom{\text{Stejskal-Tanner}}&&
  \ln\left[ \frac{A(2\tau)}{A(0)} \right] =  -D \gamma^2 \delta^2 \left( \Delta - \frac13\delta \right)G^2 
&&\text{Stejskal-Tanner}
  \label{eq:st}
\end{flalign}

\newcommand{\FASUMI}[1]{\left(\lambda_{#1} - \MD\right)^2}
\newcommand{\FASUM}{\FASUMI{1} + \FASUMI{2} + \FASUMI{3}}
\begin{flalign}
&&  \AD &= \lambda_{\parallel} = \lambda_1 & \text{Axial Diffusivity} \\
&&  \RD &= \lambda_{\perp} = \frac{\lambda_2 + \lambda_3}{2} &\text{Radial Diffusivity} \\
&&  \MD &= \frac{1}{3}\sum \lambda_i &\text{Mean Diffusivity} \\
&&  \FA &= \sqrt{\frac{3}{2}} \frac{\sqrt{\FASUM}}{\sqrt{\sum \lambda_i^2}} &\text{Fractional Anisotropy}\label{eq:fa} \\
&&  \RA &= \sqrt{\frac{1}{3}} \frac{\sqrt{\FASUM}}{\MD} &\text{Relative Anisotropy}
\end{flalign}

In text we refer \Cref{eq:st} and \Cref{eq:fa}.
\end{document}

enter image description here

Note: in equation 1, I used a \phantom of the label to demonstrate how to center the equation relative to the page centerline. One could achieve the actual result in your question, by eliminating the \phantom, and just leaving a && prior to the equation itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.