Fixes minor typos in referencing equations.
Changes \eqn{} to \eqref{}.
[BFB]
PR Preview Action v1.6.1 :---: |
:rocket: View preview athttps://E3SM-Project.github.io/E3SM/pr-preview/pr-7415/
|
Built to branch gh-pages at 2025-06-04 16:34 UTC.
Preview will be ready when the GitHub Pages deployment is complete.
@peterdschwartz please approve and merge this.
@bishtgautam I'm seeing a few error messages like: "Label 'eqn_xxx' multiply defined"
@peterdschwartz Where are you seeing those errors? I looked at following locations, but could not find the error: https://github.com/E3SM-Project/E3SM/actions/runs/15447672354/job/43481586795 https://github.com/E3SM-Project/E3SM/actions/runs/15447672343/job/43481586787 https://github.com/E3SM-Project/E3SM/runs/43481742534
Oh, I found those errors. They are showing up on the rendered page https://docs.e3sm.org/E3SM/pr-preview/pr-7415/ELM/tech-guide/shortwave_radiation. Let me try to fix them.
This is the error message that I also got:
But, after refreshing the browser, the equations were rendered correctly:
@mahf708, any thoughts on what could be going on here? Is eqnarray not recommended?
I think it is complaining about the fact that \label appears twice in this \begin...\end sequence:
$$
\begin{eqnarray}
\alpha_{gb,\Lambda} &=& \alpha_{b,\Lambda}^{soi} (1 -
f_{sno}) + \alpha_{b,\Lambda}^{sno} f_{sno}
\label{eqn_g_dir} \\[0.5em]
\alpha_{gd,\Lambda} &=& \alpha_{d,\Lambda}^{soi} (1 -
f_{sno}) + \alpha_{d,\Lambda}^{sno} f_{sno}
\label{eqn_g_dif}
\end{eqnarray}
$$
Up to you if you want to reformulate these eqs (by breaking them) or if you want to ignore and just rely on people refreshing the page.
Fwiw, I personally tend to not reference equations in docs I write. I tend to write docs less as a technical manuscript but more as a blog, for a friendly reader. I find equation numbering (and other formal stuff) to be a bit too formal for these types of docs. Obviously this is just a personal opinion. You can see how I tend to write docs in places like https://raw.githubusercontent.com/E3SM-Project/E3SM/refs/heads/master/components/eamxx/docs/user/diags/field_contraction.md and https://raw.githubusercontent.com/E3SM-Project/E3SM/refs/heads/master/components/eamxx/docs/technical/aerocom_cldtop.md. In other words, smaller pages targeting specific concepts, and nothing too complex/sprawling that would require careful eq referencing, etc.
@mahf708, thanks for the comments and links. However, they are two different labels: \label{eqn_g_dir} and \label{eqn_g_dif}. Refreshing the page is not a solution. I will do more Googling regarding this issue. If I can't find a fix for it, I will stop using eqnarray for equations that require labeling multiple equations.
@mahf708, thanks for the comments and links. However, they are two different labels:
\label{eqn_g_dir}and\label{eqn_g_dif}. Refreshing the page is not a solution. I will do more Googling regarding this issue. If I can't find a fix for it, I will stop using eqnarray for equations that require labeling multiple equations.
Yeah, I noticed that. However, I think the error is simply because \label itself is showing up twice (regardless of the content it's carrying --- the \label macro must be triggering some warning elsewhere ...) I will try to reproduce locally and see if there's a good solution besides breaking up the equations; I'd think this is ok, no?
One more thing, try to ensure your markdown renders correctly even in plain markdown... i.e., check this file:
https://github.com/E3SM-Project/E3SM/blob/8537409f7eb5988ed925be5c78bc895d2cb12722/components/elm/docs/tech-guide/shortwave_radiation.md
And you will find this:
Making sure the plain markdown is rendered correctly is a great suggestion.
@peterdschwartz, I'm going to switch all eqnarray to align in a separate PR. When you get a chance, please integrate this.
merged to next and master