2

After initial setting up emacs with AuCTeX and RefTeX everything worked fine.


may not be the problem, see edit below

Now, for a porject I tried setting up RefTeX to work with markdown-mode with this code snippet. Since these changes my RefTeX seems not be working correct anymore. First I tried it in a markdown file. Emacs asked me to SELECT A CITATION FORMAT and then shows:

[^M] [@%l]
[p] [@%l]
[t] @%l

after that, in the minibuffer the line Regex { && Regex...}: appears, but followed by the previous word of the md file in brackets [word]:. If I then try to search for a bib-key, it says [no match]. When I hit TAB without any character, it inserts the preceding word in brackets. If I then hit enter, it only shows a few (6-8) entries from my bib file which in reality contains hundreds of entries.

So I removed the code from my init.el. But the problem persists.


Even if I try to enter a citation with C-c [ (or running M-x reftex-citation) from a .tex file, emacs now asks me to SELECT A CITATION FORMAT with a list beginning with [^M] \cite[][]{%l} followed by author biblatex citation commands. Thats even weirder since I've not enabled biblatex in the reftex-cite-format variable:

Plus, the problem remains the same: RefTeX inserts the preceding word in brackets, only allows to autocomplete to this word in particular and then shows very few random entries from my bibfile.

In the following with this short MWE:

\documentclass{article}

\usepackage{biblatex}
\addbibresource{~/path/to/my.bib}

\begin{document}
Test
% <here try to enter citation with C-c [ >
\end{document}

After the SELECT A CITATION FORMAT, which I skipped by predding RET for the default value, the Regex line appears with the preceding word Text in bracktes:

I only can choose this particular word with TAB completion:

If I hit RET, only a very small number of entries appear:

I also tried to remove all reftex code from the init.el and reset every reftex variable to the default value (I didn't edit many, only reftex-default-bibliography manually).

But the problem persists

Since I'm relativley new to emacs, I have no idea what the problem is. Did the settings for markdown changed some core values of RefTeX?

Edit

I even tried to remove emacs completley, as well as the .emacs.d folder and reinstall it. But nothing changed. I also tried it at my companies laptop which is running Windows. But the behaviour is the same. Maybe I'm doing something really wrong... Any ideas??

Starting emacs without init emacs --no-init-file results in the same...

1 Answer 1

0

Reg. your first question:

emacs now asks me to SELECT A CITATION FORMAT with a list beginning with [^M] \cite[][]{%l} followed by author biblatex citation commands. Thats even weirder since I've not enabled biblatex in the reftex-cite-format variable

I presume that you're using AUCTeX as well. In this case, AUCTeX loads its support file biblatex.el which has this line:

(reftex-set-cite-format 'biblatex)

Docstring says:

Set the document-local value of reftex-cite-format. When such a value exists, it overwrites the setting given with reftex-cite-format. See the documentation of reftex-cite-format for possible values. This function should be used from AUCTeX style files.

Reg. your second question:

After the SELECT A CITATION FORMAT, which I skipped by predding RET for the default value, the Regex line appears with the preceding word Text in bracktes:

RefTeX just looks back and tries to find something which could make sense, in this case Text: If you hit RET, you accept it, otherwise you enter your search regexp.

This is from RefTeX manual for reftex-citation:

The regular expression uses an expanded syntax: && is interpreted as and. Thus, aaaa&&bbb matches entries which contain both aaaa and bbb. While entering the regexp, completion on knows citation keys is possible. = is a good regular expression to match all entries in all files.

So the question is why completion doesn't work for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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