Skip to content

Conversation

bishtgautam
Copy link
Contributor

@bishtgautam bishtgautam commented Jun 4, 2025

Changes \eqn{} to \eqref{}.

[BFB]

Copy link

github-actions bot commented Jun 4, 2025

PR Preview Action v1.6.1

🚀 View preview at
https://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.

@bishtgautam bishtgautam marked this pull request as draft June 4, 2025 16:20
@bishtgautam bishtgautam force-pushed the bishtgautam/lnd/fix-solar-technote branch from e7a6323 to c2943ca Compare June 4, 2025 16:23
@bishtgautam bishtgautam force-pushed the bishtgautam/lnd/fix-solar-technote branch from c2943ca to 8537409 Compare June 4, 2025 16:31
@bishtgautam bishtgautam marked this pull request as ready for review August 11, 2025 21:17
@rljacob
Copy link
Member

rljacob commented Aug 13, 2025

@peterdschwartz please approve and merge this.

@peterdschwartz
Copy link
Contributor

@bishtgautam I'm seeing a few error messages like: "Label 'eqn_xxx' multiply defined"

@bishtgautam
Copy link
Contributor Author

@bishtgautam
Copy link
Contributor Author

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.

@bishtgautam
Copy link
Contributor Author

This is the error message that I also got:

label_error

But, after refreshing the browser, the equations were rendered correctly:

no_label_error

@mahf708, any thoughts on what could be going on here? Is eqnarray not recommended?

@mahf708
Copy link
Contributor

mahf708 commented Aug 15, 2025

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.

@bishtgautam
Copy link
Contributor Author

@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
Copy link
Contributor

mahf708 commented Aug 15, 2025

@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:

Screenshot 2025-08-15 at 12 11 09

@bishtgautam
Copy link
Contributor Author

Making sure the plain markdown is rendered correctly is a great suggestion.

@bishtgautam
Copy link
Contributor Author

@peterdschwartz, I'm going to switch all eqnarray to align in a separate PR. When you get a chance, please integrate this.

Copy link
Contributor

@mahf708 mahf708 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endosring integrating

peterdschwartz added a commit that referenced this pull request Aug 21, 2025
@peterdschwartz peterdschwartz merged commit 3719a74 into master Aug 21, 2025
3 checks passed
@peterdschwartz peterdschwartz deleted the bishtgautam/lnd/fix-solar-technote branch August 21, 2025 17:57
@peterdschwartz
Copy link
Contributor

merged to next and master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants