LyXcitation prefix unavailable

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
pvogel2
Posts: 3
Joined: Sun Jan 31, 2016 3:46 pm

citation prefix unavailable

Post by pvogel2 »

Hello everyone,

I try to add citations to the lyx document. I use biblatex as described in the lyx documentation (adding stuff to the preamble, putting the bibliography inside comment to be recognized by lyx editor,
biber is set as processor in the lyx settings).

I can not add any 'Text before' item in the citation editor. The Field Formatting -> Citation Style allways shows [#ID, <my given Text after>]

The field Text before: is allways disabled. Any idea why I can not access this field?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: citation prefix unavailable

Post by Johannes_B »

Welcome,

i am not a LyX user, right now i don't even know if you are talking about the LyX interface or the final pdf.

Can you explain in more detail, maybe even give a screenshot (if LyX is making trouble) or post a minimal example LyX-file that reproduces the output pdf?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
pvogel2
Posts: 3
Joined: Sun Jan 31, 2016 3:46 pm

citation prefix unavailable

Post by pvogel2 »

Hi Johannes_B, thanks for your reply.

I mean the lyx editor. When I choose the editor function
Insert->Citation...
the following popup is opening:
Insert Citation popup in lyx editor
Insert Citation popup in lyx editor
lyxeditor.jpg (106.49 KiB) Viewed 3499 times
I have marked the fields which I can not edit. It is not possible to enter a text inside the input field 'Text before' and I have no idea how to get it working. I guess it is related o the select box 'Citation style' but I could not figure out yet how it is working.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

citation prefix unavailable

Post by Johannes_B »

I am not a LyX user, so i cnot really give a useful hint, but ... where woould you expect the before text to appear?

With usual Author date styles, you can add something like see also before the reference, which will also work when the whole thing is in parenthesis. For an alphabetic style, this would go outside of the brakets, meaning, you can just add it in your regular text and then add the citation.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
pvogel2
Posts: 3
Joined: Sun Jan 31, 2016 3:46 pm

Re: citation prefix unavailable

Post by pvogel2 »

Hi again,
I would expect the 'before text' to appear before the citation text generated from the bibliography entry.
My special needs are: The citation should appear as footnote on the page with the citation text, not only the reference to the bib entry.

Therefore I put the citation inside a footnote.

There is no other way I know to use the citation dialog in lyx and get the citation as footnote on the same page.

In plain tex it works out of the box to put the prefix to the citation like this \cite[before text][after text]{key}, but not with the lyx citation dialog.

Of course I can put the 'text before' as simple text before the citation. But this way I loose the possibility to restyle the citation afterwards as the 'text before' is not part of the citation. biblatex offers you the possibility to customize the styling completely by use of the \DeclareCiteCommand. Using this command you also have access to the 'text before' element.

The point is: I can not add the [text before] as part to the citation text using the lyx dialog. So far I have not found a way to go arround this limitiation inside lyx. This is bad. Using plain tex instead offers me all I need but then I have to deal with editing plain tex (what is not so bad at all, but it would be nice to have lyx for editing)
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

citation prefix unavailable

Post by Johannes_B »

pvogel2 wrote:The point is: I can not add the [text before] as part to the citation text using the lyx dialog. So far I have not found a way to go arround this limitiation inside lyx. This is bad. Using plain tex instead offers me all I need but then I have to deal with editing plain tex (what is not so bad at all, but it would be nice to have lyx for editing)
:-) You spotted exactly the right thing: LyX limits your available choices. It has to. Look at how powerful biblatex alone is. Imaging some menu item for all possible things. Keep in mind that there are over 5000 packages available. You cannot support them all.

Since you are ok with writing LaTeX (not plain TeX), just use that with an editor that feels comfortable. Or keep using LyX and use those red ERT boxes.

Code: Select all

\documentclass{article}
\usepackage[style=authoryear,backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
i bet there is something interesting\footcite[as seen in][12]{springer}
\printbibliography
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply