Instead of hardcoding theorem in citations such as \cite[theorem xyz]{reference}, I would like to insert the cleveref theorem format, for consistency with references to theorems in the current document. I suppose this would require retrieving the (possibly default) value of \crefname. Is this possible?


It seems that the name is stored in \cref@<type>@name etc.




  author       = {Knuth, Donald E.},
  title        = {The {\TeX} book},
  date         = 1984,
  maintitle    = {Computers \& Typesetting},
  volume       = {A},
  publisher    = {Addison-Wesley},
  location     = {Reading, Mass.},
  langid       = {english},
  langidopts   = {variant=american},
  sortyear     = {1984-1},
  sorttitle    = {Computers & Typesetting A},
  indexsorttitle= {The TeXbook},
  indextitle   = {\protect\TeX book, The},
  shorttitle   = {\TeX book}






\cite[\theoname{} xyz]{knuth}



enter image description here

  • samcarter, reversed roles today! tex.stackexchange.com/q/414281/105447 :-) – gusbrs Dec 17 '18 at 23:17
  • @gusbrs Oh, nice coincidence! :) Always fun to see the different approaches answers can use! – user36296 Dec 17 '18 at 23:25
  • This is exactly what I was looking for and more, thank you! – Rastapopoulos Dec 18 '18 at 9:16
  • @Rastapopoulos You're welcome! – user36296 Dec 18 '18 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.