Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zref-clever User Manual desperately needs examples of usage #8

Closed
murrayE opened this issue Feb 14, 2022 · 11 comments
Closed

zref-clever User Manual desperately needs examples of usage #8

murrayE opened this issue Feb 14, 2022 · 11 comments

Comments

@murrayE
Copy link

murrayE commented Feb 14, 2022

The User Manual needs considerable expansion written from the viewpoint of, especially, the new user, through inclusion of EXAMPLES of usage!

Its current focus seems to be more from the viewpoint of the author(s), as a reference manual that enumerates exhaustively all the options.

I'm a fairly experienced user of LaTeX, including of hyperref and cleveref, but still I find the zref-cleveref User Manual forbidding

@gusbrs
Copy link
Owner

gusbrs commented Feb 14, 2022

Hi @murrayE , I thank you for your feedback, but that seems unfair. Indeed the manual tries to cover the options, this is intended. But the only shortcoming you mentioned, which is the supposed lack of examples, is simply not true: there's a whole section of "How tos", covering some use cases of configuration I thought would be common. Besides, the basics are the same as the standard referencing system: set a label (with \zlabel in this case), and make a reference (with \zcref). And that's about it, and that is covered in the short "User interface" section.

@murrayE
Copy link
Author

murrayE commented Feb 14, 2022 via email

@gusbrs
Copy link
Owner

gusbrs commented Feb 14, 2022

A "typical" example is just something like:

\documentclass{article}
\usepackage{zref-clever}
\usepackage{hyperref}
\begin{document}
\section{Section 1}
\zlabel{sec:section-1}
A reference \zcref{sec:section-1}
\end{document}

But I don't think this would add much to the documentation. It is just the usual stuff. And it "not being there" certainly is no significant barrier to interested users, in my judgement. Indeed, I would argue that even if the How-tos are a little more elaborate, they also cover the need of supplying examples of what the most basic (and probably the most common) usage is.

And most certainly, it is not granted to say the User manual "desperately needs EXAMPLES of usage"...

@murrayE
Copy link
Author

murrayE commented Feb 14, 2022 via email

@gusbrs
Copy link
Owner

gusbrs commented Feb 14, 2022

P.S. My interest in zref-clever is that, for a book-length project, I’ve been using hyperref + cleveref + crossreftools along with babel-french, which originally caused havoc with my use of colons in labels (e.g., thm:main, lem:first). This required at least two hacks offered on tex.stackexchange.com http://tex.stackexchange.com/ to get around babel-french's making he colon as an active character.

I was trying to see if zref-clever would eliminate the need for those hacks — on the principle that it is safer in general to use packages “as is” rather than hacked — and possibly allow an alternative to crossreftools for my purposes.

But with so few examples, I’m finding it hard to tell.

I'm glad you're interested in the package, and even happier if it happens to solve some of the problems you face. I do hope you find it useful. However, there are trade-offs, and you should ponder them. Do take a look at section 11 "Limitations". Also, depending on the nature of the project you are into, do read section 2 "Warning" and consider it carefully.

I see no reason not to include such a very basic example in the documentation: you never know what experience a potential user may have.

I'll keep your suggestion in mind but, for the time being, I think the "How-tos" section already covers sufficiently basic use cases. So I'm closing this one.

@gusbrs gusbrs closed this as completed Feb 14, 2022
@hpvd
Copy link

hpvd commented Feb 15, 2022

I see no reason not to include such a very basic example in the documentation: you never know what experience a potential user may have.

+1 on this. Examples do always help. The more covering of different experience levels of users, the better for any kind of documentation (for both directions, from beginners to very very experienced users)

@gusbrs
Copy link
Owner

gusbrs commented Feb 15, 2022

+1 on this. Examples do always help. The more covering of different experience levels of users, the better for any kind of documentation (for both directions, from beginners to very very experienced users)

The second how-to currently in the manual is the following:

\documentclass{article}
\usepackage{zref-clever}
\newtheorem{lemma}{Lemma}[section]
\begin{document}
\section{Section 1}
\begin{lemma}\zlabel{lemma-1}
A lemma.
\end{lemma}
\zcref{lemma-1}
\end{document}

It is simple enough, and it does illustrate basic usage. There is really no need to add a how-to on "making a cross-reference to a section". I do hope I'll be able to extend the How-to section one day, but more in the direction of more interesting examples, not in adding even more basic ones than the basic ones already there. The manual presumes basic knowledge on how to use LaTeX cross-references and will continue to do so, it does not intend to replace a "LaTeX Introduction" for which there are plenty and better sources.

@dbitouze
Copy link

A useful addition would be examples which highlight the advantages of zref-clever over cleverref. For instance, there's no obvious difference between:

\documentclass{article}
\usepackage{cleverref}
\newtheorem{lemma}{Lemma}[section]
\begin{document}
\section{Section 1}
\begin{lemma}\label{lemma-1}
A lemma.
\end{lemma}
\cref{lemma-1}
\end{document}

and:

\documentclass{article}
\usepackage{zref-clever}
\newtheorem{lemma}{Lemma}[section]
\begin{document}
\section{Section 1}
\begin{lemma}\zlabel{lemma-1}
A lemma.
\end{lemma}
\zcref{lemma-1}
\end{document}

@gusbrs
Copy link
Owner

gusbrs commented May 13, 2022

Ok, vox populi. I have added to my todo list to add a "zref-clever for the impatient" section to the manual, and will do so when I have some time.

However, @dbitouze , regarding comparisons with cleveref, what I've tried to emphasize in the manual is that zref-clever can reach parity to the standard referencing system in terms of features. Or, at least, near parity, as much as the support for zref allows. And that's what the example you mentioned tried to capture. That's deliberate. I do think cleveref is a great package, I have been its user for several years, and zref-clever itself owes much to it, so I would not like to make the relation between the packages any sort of "contest". Even if, admittedly, this may make the path to information a little longer.

That said, if you have a concrete example (or examples) to suggest for the "How-tos" section within this spirit (that is, something which is interesting on its own), I'd be glad to consider it for inclusion. But, if you do so, please open a separate issue for it, and not revive an issue that was closed for due reason to add further (different) requests.

@dbitouze
Copy link

Thanks for considering!

About "contest", I understand. I rephrase: "A useful addition would be examples which highlight the differences between of zref-clever and cleverref."

About concrete example (or examples) to suggest, the point is that I hoped since a long time to have the time to study zref-clever in details, but I never succeed. And that's why it would be helpful to have a quick overview: it would help to read what follows 😄. If I succeed and find useful examples, I'll open a new issue (sorry to use the current one but opening a new one for my addition would probably be considered as a duplicate).

@gusbrs
Copy link
Owner

gusbrs commented May 13, 2022

About "contest", I understand. I rephrase: "A useful addition would be examples which highlight the differences between of zref-clever and cleverref."

About concrete example (or examples) to suggest, the point is that I hoped since a long time to have the time to study zref-clever in details, but I never succeed. And that's why it would be helpful to have a quick overview: it would help to read what follows 😄.

It sounds like you'd be interested in #9. I'd say this is as far as I'm willing to go with a comparison.

gusbrs added a commit that referenced this issue May 23, 2022
In response to users' demand in issue #8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants