Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am doing a literature review. And I want to put references about a certain topic inside the table.

My question is very similar to: Sort but do not compress numeric citations in BibLaTeX

However, I want only to disable the compression inside a table but keep sorting. Is that possible?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

Add the following to your preamble.

\makeatletter
\newbibmacro*{cite:reinit}{%
  \ifnumequal{\value{citecount}}{1}{}{\setcounter{cbx@tempcntb}{0}}}
\makeatother

\newtoggle{cite:comp}
\AtEveryCitekey{\iftoggle{cite:comp}{}{\usebibmacro{cite:reinit}}}
\toggletrue{cite:comp}

Inside the table environment you can disable compact citations with:

\togglefalse{cite:comp}
share|improve this answer
    
That worked. Thanks! I am wondering if it is possible to do the same using the package cite.sty only. There is a line \let\@compress@cite\@empty but I cannot put it working. \makeatletter \newcommand{\citeu}[1]{ \let\@compress@cite\@empty % disable compression \citenum{#1} % remove brackets around numbers } \let\cite\citeu \makeatother Does not work :( –  cacamailg Sep 11 '12 at 13:51
    
@cacamailg Ask a new question. The cite package bundle has nothing to do with biblatex. –  Audrey Sep 11 '12 at 14:18
add comment

Numeric-comp seems to have some fairly complicated stuff in it, and it's not my usual hunting ground, but I think this will work.

What I've done is create a new cite command (\citeu for "cite uncompressed"): citations with \cite are compressed as normal; citations with \citeu are uncompressed, but still sorted. (In fact, the macros for them are just taken from the "ordinary" numeric.cbx style.)

For a cleaner interface you might like to set up an environment for your tables which would (within a group, of course) let\cite\citeu.

(The MWE is largely ... borrowed ... from the answer you have referenced).

\documentclass{article}
\usepackage[backend=biber,style=numeric-comp]{biblatex}
\newbibmacro*{cite:uncomp}{%
  \printtext[bibhyperref]{%
    \printfield{prefixnumber}%
    \printfield{labelnumber}%
    \ifbool{bbx:subentry}
      {\printfield{entrysetcount}}
      {}}}
\DeclareCiteCommand{\citeu}[\mkbibbrackets]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:uncomp}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{knuth:ct:b}
\cite{sigfridsson}
\cite{worman}
\cite{almendro}
\cite{kowalik}
\cite{loh}
\cite{worman, kowalik,loh,almendro,knuth:ct:b}
\citeu{worman, kowalik,loh,almendro,knuth:ct:b}
\printbibliography
\end{document}
share|improve this answer
    
That worked. Thanks! –  cacamailg Sep 11 '12 at 13:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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