You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When your bibliography relies on the "thebibliography" environment and you write the entries on several lines such as
\begin{thebibliograhy}{2}
\bibitem{AE1905}
\newblock Albert Einstein,
\newblock \"Uber die von der molekularkinetischen Theorie der W\"arme geforderte Bewegung von in ruhenden Fl\"ussigkeiten suspendierten Teilchen,
\newblock Annalen der Physik, vol. 17, no 8, 1905, p. 549–560.
\bibitem{AE1945}
\newblock Alfred Einstein,
\newblock Mozart, His Character, His Work,
\newblock Oxford University Press, 1945.
\end{thebibliograhy}
then when you trigger the "Citation Based on Current Word / Selection…" command, the menu only displays the citation keys ("AE1905", "AE1945"), and not the contents (author/title).
I believe that the reason is that the "recursive_scan" method in "/lib/Ruby/latex.rb" scans the file line by line. I think that a workaround would be to change
text = File.read(@root)
into
text = File.read(@root)
text2 = text.gsub(/^\s*\\bibitem\{([^\}]*)\}\s*/, '\n\\bibitem{\1} ')
text = text2.gsub(/\s*\\newblock\s*/, ' -- ')
I have tested it, and it works so far. But I am far from being an expert in Ruby and I do not understand the bundle's code in details, so this comes without guarantee...
The text was updated successfully, but these errors were encountered:
When your bibliography relies on the "thebibliography" environment and you write the entries on several lines such as
then when you trigger the "Citation Based on Current Word / Selection…" command, the menu only displays the citation keys ("AE1905", "AE1945"), and not the contents (author/title).
I believe that the reason is that the "recursive_scan" method in "/lib/Ruby/latex.rb" scans the file line by line. I think that a workaround would be to change
into
I have tested it, and it works so far. But I am far from being an expert in Ruby and I do not understand the bundle's code in details, so this comes without guarantee...
The text was updated successfully, but these errors were encountered: