latex3 / babel

The multilingual framework to localize LaTeX, LuaLaTeX and XeLaTeX
https://latex3.github.io/babel/
LaTeX Project Public License v1.3c
130 stars 35 forks source link

Way to redefine \@citex #67

Closed xtotdam closed 4 years ago

xtotdam commented 4 years ago

I am trying to make missing citations in my document more visible using the following scheme (a bit simplified). This code is inside my class inherited from article

\RequirePackage{fixme}
\RequirePackage{etoolbox}

\makeatletter
\patchcmd{\@setref}{\bfseries ??}{\fxerror{Ref}}{}{}
\patchcmd{\@citex}{\bfseries ?}{\fxerror{Cite}}{}{}
\makeatother

While \@setref is redefined by me successfully, I have a problem with \@citex. After a bit of investigation I found out that this command is redefined by natbib and babel. Following the recommendations in babel docs, I load it after natbib.

Is there an easy (or not so easy) way to redefine \@citex? I know that biblatex redefines question mark to bold citation keys, but it is a bit inconvenient to use it since I use a custom .bst file.

xtotdam commented 4 years ago

Well, I have found a solution. Here it is. I am pretty sure it is a dirty hack but it works and I am happy (for now at least).

The question about \@citex redefinition still persists, but if there is no easy way to do it (I mean independently of whether babel or natbib is being used) then so be it.

I am a bit sorry for turning this issue into StackOverflow:)

jbezos commented 4 years ago

Please, keep in mind the issue tracker is not intended as a general support forum, but for reporting bugs and feature requests. For other type of questions, consider asking at https://tex.stackexchange.com/ . I'm closing this issue because this is neither a bug nor a feature request.