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

parenthesis around equations with \refeq #240

Open
luisberndt opened this issue Jun 3, 2022 · 3 comments
Open

parenthesis around equations with \refeq #240

luisberndt opened this issue Jun 3, 2022 · 3 comments

Comments

@luisberndt
Copy link
Contributor

luisberndt commented Jun 3, 2022

Description

Is there an easy way to get the parenthesis back while using the command \refeq? In the kaorefs style there is a part wich is labeled with Remove parentheses around equations.

But commenting the line below \creflabelformat{equation}{#2\textup{#1}#3} doesnt help. Also using \cref{eq:...} creates a link to the equation without the brackets. I can't find any other part in the code wich could control this. But I also don't know which package controls this: vref, cref, hyperref or the LaTeX standart ref.

Just adding () to the \refeq command like: \newcommand{\refeq}[1]{\hyperref[eq:#1]\eqname\xspace(\ref{eq:#1})} doesnt help etheir because now the backets arent linked to the equation.

I use all kao packages with little to no changes and the few I did shouldn't affect it.

@fmarotta
Copy link
Owner

Hi, if I'm not wrong, \creflabelformat sets the format for the references to equations, so what about modifying to \creflabelformat{equation}{#2(\textup{#1})#3} instead of commenting out? I haven't tried it though, so it may not do the right thing.

@luisberndt
Copy link
Contributor Author

Hey, it kind of works. If I put the brackets before and after \textup, nothing else happens with the \refeq command. When I use the \vrefeq command, the parentheses are correctly placed before and after the equation number. Disadvantage here is that the keyword "equation" is set twice. So with \creflabelformat{equation}{#2(\textup{#1})#3} and using \vrefeq comes out in german: Gleichung Gleichung (8.2). And with \refeq it only displays Gleichung 8.2 wihtout the brackets.

@luisberndt
Copy link
Contributor Author

\creflabelformat{equation}{#2(\textup{#1})#3} and \newcommand{\refeq}[1]{\cref{eq:#1}} does now work fine for me. It let´s me use the old \refeq command, so that i dont have to change all to \cref{eq:...}. If you´ve got some time, you can have a look at this and find maby a better way. Changing the \creflabelfomat doesn't effect they way a equation in presented through the \ref command in the \newcommand{\refeq}[1]{\hyperref[eq:#1]\eqname\xspace\ref{eq:#1}} part, does it?

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

2 participants