0

I was working without any problem on a Latex document. I have just upgraded to the latest version of TexStudio but now the file will not build - it complains that it cannot (now!) find the bst file that is installed in the same place in the texlive tree. It was all working fine before I upgraded TexStudio - I have not changed anything to do with texlive. What has happened to mean that the bst file cannot now be found? Is there some change in the configuration of the new version of TexStudio?

FWIW: If I copy the bst file into the same directory as the tex file, it all works again.

(Using Linux Mint 20.3 and Texlive 2020.)

Peter

user57115
  • 1
  • 2
  • 1
    Welcome to TeX.SE. LaTeX will always find any file in the same folder. Is the newest version of TeXstudio 4.3.1? I'd suggest to post the question at TeXstudio GitHub issues. I use MikTeX, when I update my own packages I need to Refresh file name database, unfortunately I don't exactly how to proceed in TeXlive. – FHZ Sep 08 '22 at 20:53
  • Yep. TexStudio 4.3.1. And good idea: will post on TexStudio github. The bst file in question is not newly installed - I have used it successfully many times before - so the comments about refreshing the database won't apply. The only thing to change in my setup is TexStudio. – user57115 Sep 08 '22 at 21:44
  • 1
    Does kpsewhich filename.bst in the terminal find it/return anything? Where is the bst file in the file system? Is it in one of the folders listed by kpsepath bst? – frabjous Sep 08 '22 at 22:28
  • Also look to see if there's a .blg (BibTeX log) file that gets generated and if it complains about not being able to find the bst file. Does bibtex filename.aux from the command line work? – frabjous Sep 08 '22 at 22:30
  • You might also look in TeXStudio under Options > Configure TeXstudio in the "Commands" and "Build" options to see if anything there looks funny. – frabjous Sep 08 '22 at 22:34
  • "Does kpsewhich filename.bst in the terminal find it/return anything? Where is the bst file in the file system?" I get /usr/local/texlive/2020/texmf-dist/bibtex/bst/IEEEtran/IEEEtran.bst – user57115 Sep 10 '22 at 09:57
  • I can see "...:!!/usr/local/texlive/2020/texmf-dist/bibtex/bst//:.." in the output from kpsepath bst. Does that look correct? – user57115 Sep 10 '22 at 10:00
  • "Does bibtex filename.aux from the command line work?" Yep. It all still works from the shell. Just no longer from within TexStudio after I upgraded – user57115 Sep 10 '22 at 10:01
  • The blg file generated by the TexStudio build contains the line "I couldn't open style file IEEEtran.bst" whereas building from the shell I see the line "The style file: IEEEtran.bst" – user57115 Sep 10 '22 at 10:08
  • "You might also look in TeXStudio under Options > Configure TeXstudio in the "Commands" and "Build" options to see if anything there looks funny." What would you expect? I have "txs:///compile | txs:///view". And what about the repeat buttons? – user57115 Sep 10 '22 at 10:17

2 Answers2

1

I had the same problem for Mac and after many tests, in the end, I installed a previous version (TexStudio 4.3.0). Now it runs "smooth" as always.

(PS: I cannot write a comment because I don't have 50 reputation points, so this is why I wrote an answer.)

0

Ah-hah! Cracked it. It turns out that a second version of texlive had become installed, presumably because something else I installed either had or has added texlive as a dependency, and I hadn't noticed it go through. (I know already that two versions of texlive cause problems so I am usually very vigilant.)

Having found the second, repo version of texlive, I removed it and TexStudio is back to working properly. Big thanks to Jan Sundermeyer @ TexStudio for spotting this from the log files I posted.

Edit: In fact, having thought about this, the obvious way of avoiding TXS picking up spurious versions of texlive is to add the full paths to the Latex tools in the Options->Configure TexStudio->Commands configuration.

P.

user57115
  • 1
  • 2
  • How exactly did you add the other latex installation to your system? In general it is usually not needed to change TexStudio if you have setup your PATH variable correctly and in the right places. – daleif Sep 14 '22 at 15:48
  • I used the standard Texlive installer which places it in /usr/local/texlive/... – user57115 Sep 15 '22 at 18:12
  • The fundamental problem here is that sometimes, the default repo (usually very out-of-date) version of Texlive gets installed due to side-effects. In that situation, /usr/bin gets added to the head of PATH and so executables on this path gets selected first. – user57115 Sep 15 '22 at 18:17
  • In fact, maybe the solution is to install the up-to-date version of texlive in /usr/bin where the repo would put it instead of the default /usr/local/texlive location. In that case, any spurious dependencies/recommendations on package updates would not try to install the older repo version. Hmmm... Will try that out. – user57115 Sep 15 '22 at 18:21
  • /usr/local/texlive/<path>/bin/<path> is not in the default PATH. So I'm asking how exactly did you add it? If you add it to the front of PATH for example in you .profile (log out and in for it to take effect). Then no changes to /usr/bin affects your TeXLive. Note that we in general do not recommend installing upstream TeXLive with softlinks into bin paths. Users tend to forget they did so and this creates other problems. – daleif Sep 16 '22 at 08:16
  • Sorry, misunderstood. I have pre-prended /usr/local/texlive/2020/bin/x86_64-linux to PATH in .bashrc. AFAIU, .profile invokes .bashrc when it runs; definitely no soft links. I see your point: assuming PATH is searched from L-to-R, why does the existence of TexLive in /usr/bin switch to that? That is what I am trying to understand and suppress! – user57115 Sep 17 '22 at 10:51