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

Add an entry for cleveref. #7

Open
chengniansun opened this issue Sep 1, 2021 · 0 comments
Open

Add an entry for cleveref. #7

chengniansun opened this issue Sep 1, 2021 · 0 comments

Comments

@chengniansun
Copy link
Contributor

\usepackage{cleveref} % This package must be loaded in the end.

\Crefname{table}{Table}{Tables}
\crefname{table}{Table}{Tables}
\Crefname{figure}{Figure}{Figures}
\crefname{figure}{Figure}{Figures}
% \crefname{figure}{Fig.}{Figs.}
\Crefname{algocf}{Algorithm}{Algorithms}
\crefname{algocf}{Algorithm}{Algorithms}

% https://tex.stackexchange.com/questions/81634/cleveref-configure-symbol-for-all-sectioning-types-once-time
%
% I believe it's customary not to leave a space between the section symbol generated by \S (plural form \S\S) and the associated number (or numbers). To achieve this outcome using cleveref's cross-referencing commands, it's necessary to use the "low-level" controls \crefformat and \crefmultiformat; relying on the "high-level" control \crefname doesn't quite get you there, I think. The following MWE is a modified form of lockstep's example:
\crefformat{chapter}{\S#2#1#3}
\crefmultiformat{chapter}{\S\S#2#1#3}{ and~#2#1#3}{, #2#1#3}{, and~#2#1#3}

\crefformat{section}{\S#2#1#3}
\crefmultiformat{section}{\S\S#2#1#3}{ and~#2#1#3}{, #2#1#3}{, and~#2#1#3}

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

1 participant