ryankeleti / ega

amateur translation project of Grothendieck's EGA.
https://ryankeleti.com/ega
321 stars 34 forks source link

\eref vs \sref #117

Closed thosgood closed 4 years ago

thosgood commented 4 years ago

I've just noticed that there's now \eref, and equations are labelled as eq:X.a.b.c.d. I've been using (for all I've done) \sref and just labelling equations as X.a.b.c.d. My only problem with what having equations labelled explicitly with eq is that you have to go back and double check to see if (a.b.c.d) was indeed an equation or instead a nested lemma/proposition (which happens every now and then). It's not the most laborious thing, but it does seem like an extra faff (reminds me of how labels were originally e.g. proposition:X.a.b.c but we switched over to just X.a.b.c). What are the reasons for using \eref and eq over just \sref and no eq?

ryankeleti commented 4 years ago

I had intended I think to make it to sanitize label organization to an extent when it came to the web version, but I've put that on the back burner for now and so I think it's fine just to make everything \sref since it makes more sense and is clean (if we reallllly want, we can add another option to \sref to handle equations in a special way).

thosgood commented 4 years ago

ah, i see, i forgot about the web stuff! i'll try to switch everything back over to \sref in a single commit then (and i guess it would be pretty easy with a little regex to find which labels are for equations in the future, should we want to go back :-) )

thosgood commented 4 years ago

just to be clear, do you want to stick with explicitly labelling things eq: then?

ryankeleti commented 4 years ago

for now just get rid of \eref maintain eq: I guess, it's not so much a big deal since like you said a regex can easily swap the two.

ryankeleti commented 4 years ago

I think what I wanted to do with \eref was to input an equation eq:X.a.b.c.d as \eref{X.a.b.c.d}.

ryankeleti commented 4 years ago

Which I can do with \newcommand{\eref}[1]{\hyperref[eq:#1]{\normalfont{(#1)}}}

ryankeleti commented 4 years ago

Hence the separate command

thosgood commented 4 years ago

ok, sure, i'm just still not too sure about the leading eq: since it means having to search around in the original to see whether or not a reference is to an equation or a nested lemma. of course, when everything is already latexed it's easier, because you can search for it, and there won't be a million 'missing reference' warnings

ryankeleti commented 4 years ago

yeah I agree completely, let's remove eq:.

thosgood commented 4 years ago

ok, you sure? (don't wanna steamroll ideas here!) if so, i'll do it now

ryankeleti commented 4 years ago

you're all good, go ahead. closing for now

thosgood commented 4 years ago

(this was https://github.com/ryankeleti/ega/commit/e4825447d1f7d9d5bda79666b0921d0c66a8b6c3)