Menu

#1567 Empty "Label list" for \cref and \parencite

None
fixed
nobody
1
2015-12-09
2015-11-12
No

I am running version 2.10.4 on the 2015 distribution of MacTeX. Usually when I start a \cref or \parencite / \textcite command, the list of cite keys or labels displays all such keys and labels present in the document. However, this is no longer the case. I have a friend running the same TeXstudio version who experiences the same issue. When the .tex file is correctly compilet, and the output is perfect, but it is time consuming to keep looking up cite keys and figure/table labels when citing and cross-referencing. Here's a MWE illustrating the issue:

\documentclass{article}

\usepackage{cleveref}
\usepackage{filecontents}
\usepackage[backend=biber]{biblatex}
    \addbibresource{refs.bib}

\begin{filecontents}{refs.bib}
@article{importantpaper,
Author = {A. Smith},
Date = {1337},
Journal = {High Impact Journal},
Volume = {13},
Number = {37},
Pages = {13--37},
}
\end{filecontents}

\begin{document}

Important data from \textcite{importantpaper} is presented in \cref{table:important-data}.

\begin{table}[t]
\centering
\caption{Important data}
\label{table:important-data}
\begin{tabular}{c c}
1 & 3 \\
3 & 7
\end{tabular}
\end{table}

\end{document}

Discussion

  • Tim Hoffmann

    Tim Hoffmann - 2015-11-12

    \cref works in the above example (argument ist correctly highlighted and a list of labels is shown for completion).

    Since TXS does not support (parsing) a filecontents environement, the above bibid is not found. If I copy the contents to an external file refs.bib, this works as well.

     
  • Anders Brakestad

    Is there some setting that may have the incorrect value? It is not working for me, nor my girlfriend. I have tried to uninstall and reinstall TXS, but it will not work.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-11-13

    what does the about diaog say about the txs version ?

     
  • Anders Brakestad

    TeXstudio 2.10.4 (hg 5634:52f67737142e)
    Using Qt Version 5.5.1, compiled with Qt 5.5.1 R

     
  • Anders Brakestad

    Okay, so I unchecked the auto-completion for the memoir package, and now the label list is working. Cite key list not working, though.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-11-13

    what cwls do you have activated ?
    You should not change the options here if you are not positively aware about the consequences ...

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-11-13

    @Tim/Benito: maybe we should make the selection of completion lists an advanced option ...
    And probably we should add built-in support for memoir class...

     
  • Anders Brakestad

    The following clw's are currently checked. I just decheck when I don't want completion of the codes within the specific package. I was not aware that serious consequences would follow.

    • amsfonts
    • amsmath
    • biblatex
    • booktabs
    • cancel
    • caption
    • chemfig
    • chemformula
    • chemstyle
    • cleveref
    • color
    • csquotes
    • cuisine
    • fancybox
    • fancyhdr
    • float
    • graphicx
    • hyperref
    • ifthen
    • latex-document
    • latex-mathsymbols
    • lettrine
    • lipsum
    • mathcomp
    • mathdesign
    • mhchem
    • microtype
    • multicol
    • multirow
    • pbox
    • pdfpages
    • rotate
    • siunitx
    • tex
    • textcomp
    • url
    • verbatim
    • wrapfig
     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-11-13

    normally it does not break anything, but now some scanned cwls seem to contain some unwanted code ,namely somthing like \ref{arg} or \label{arg}
    Apart from that, normally it is not necessary to activate cwls by hand as txs reads the usepackage command and activates the apropriate cwls ...

     
  • Anders Brakestad

    How can I fix this? Remove the unwanted codes? Not sure how to do that.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-11-14

    the generated/faulty cwls are in .config/texstudio
    OSX Finder is a mess finding that files but you might use a terminal. (or even better: txs)

     
  • Anders Brakestad

    Could you provide a step-by-step procedure for how to locate the files? I honestly have no idea what to do, and I really want to TeXstudio to work properly again.

     
  • Tim Hoffmann

    Tim Hoffmann - 2015-11-15

    If you don't have manually added own cwl files, it's safe to delete all cwl files from the settings directory. To do so, open a Terminal and run the command

    rm ~/.config/texstudio/*.cwl

     

    Last edit: Tim Hoffmann 2015-11-17
  • Anders Brakestad

    I ran the command, but it did not resolve the issue.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-11-15

    removing the files does not solve the problem as the rescan again creates the problematic entries.
    memoir.cwl and memhfixc.cwl need to be edited

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-11-28

    fixed in repository

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-11-28
    • status: open --> fixed
    • Group: -->
     
  • Anders Brakestad

    How is this fixed? Do I need to do something?

     

    Last edit: Anders Brakestad 2015-11-29
  • Anders Brakestad

    I cannot get it to work in the 2.10.5 development version, either.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-12-09

    you can fllow Tims suggestion again:

    if you don't have manually added own cwl files, it's safe to delete all cwl files from the settings directory. To do so, open a Terminal and run the command

    rm ~/.config/texstudio/*.cwl

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-12-09

    and I assume that you are using default settings ?

     
  • Anders Brakestad

    In terminal: "No such file or directory"

    Yes, pretty sure I am running on default settings, but I cannot find a "Restore to default", so I am not completely sure.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-12-09

    you can remove texstudio.ini in ~/.config/texstudio
    This removes ALL custom settings.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-12-09

    and just to be clear: \cite does not work as expected

     

Log in to post a comment.