2

Tex preview does not seem to be working for me? I have tried different libraries and different citations but all I get is the spinning circle for loading, and a blank log.

I have the directories set to the defaults (i.e. /Library/TeX/texbin/pdflatex and similar for bibtex)

All I can think is that maybe my directories are still wrong somehow? I also thought maybe I'm missing pdflatex but I compiled a using pdflatexmk in texshop and had no problem. (note that in texshop I see an option to compile with pdflatexmk, but not pdflatex. Could that perhaps be the problem?)

My other thought is that perhaps the generation is just really slow? But I don't see why it would be so much slower in BibDesk than in TexShop...

majmun
  • 299
  • What TeX distribution are you using? Do you have more than one distribution installed? What do echo $PATH and which pdflatex return when run in Terminal? – Herb Schulz Oct 21 '17 at 12:09
  • @HerbSchulz MacTex 2017 . I believe I have multiple since, in /usr/local/texlive I have folders for 2015, 2016, and 2017. echo $PATH gives /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin and which pdflatex gives /Library/TeX/texbin/pdflatex – majmun Oct 21 '17 at 18:23
  • Also, a quick note: I just tried a simple "Hello World" example using pdflatex from terminal, and while it worked it did not save the pdf, aux,and log files in the same folder as my tex document. Instead, it put them in /Users/<myusernamehere>. – majmun Oct 21 '17 at 18:35
  • Where was the source file? It’s ok to have those multiple distributions since /Library/TeX/texbin points to only one at a time. The PATH looks fine and so is how pdflatex is found along the path. Please check BibDesk’s Preferences again to make sure the settings have the right slashes, etc. Finally, do you have any TeX related environment variables set? – Herb Schulz Oct 21 '17 at 21:26
  • @HerbSchulz The "Hello World" tex file I was compiling with pdflatex was in /Users/<myusername>/Desktop/mwe. The slashes seem fine, again, for pdflatex the path is /Library/TeX/texbin/pdflatex and for bibtex it is /Library/TeX/texbin/bibtex. I don't know what you mean by "TeX related environment variables", so I'm assuming I don't have any set. Where could I check this? Everything for bibdesk is set to default except for a template I have in the bottom pane. Maybe the TexTemplate or style in Bibdesk preference is the problem? (but those are set to default too...) – majmun Oct 21 '17 at 21:45
  • Also, I noted this in the original post but I am mentioning it again since it seems very strange to me: nothing is showing up in the log either (In bibdesk, when I click the "TeX preview" button in the toolbar, I get a popup window with two tags pdf and log. Both of these just show me a white background with the spinning loading sign. – majmun Oct 21 '17 at 22:17

1 Answers1

2

So, I got it to work:

  • The Solution was to change the Tex Template encoding to UTF-8 (TeX Template Encoding can be found under BibDesk -> Preferences -> TeX Preview

It was previously set to Western (ASCII).

If I had to guess why this was causing a problem, perhaps because the library was saved using Unicode (UTF-8) encoding?

If someone could provide a better explanation as to why this was causing a problem, I would appreciate it

majmun
  • 299
  • Did your .bib file have embedded accented characters and was then saved in UTF-8? – Herb Schulz Oct 22 '17 at 16:28
  • I don't know all the details, but it's easy to see that it would be a problem if the TeX template encoding setting in your BibDesk preferences was ASCII and there were non-ASCII characters in your BibTeX file (outside of the set of characters that BibDesk automatically escapes) and/or in BibDesk's TeX template, which is used for generating TeX previews, located at ~/Library/Application Support/BibDesk/previewtemplate.tex. The command /usr/bin/file -I [file] will display the text encoding of any file; you can use it to check the encoding of your BibTeX file and your TeX preview file. – Big Mac Oct 23 '17 at 20:48
  • @HerbSchulz I don't believe so, but I imported the (single) entry in the bib file from google scholar, so perhaps I missed something. (The .bib file was saved in UTF-8 though). heres something interesting I noticed: If I make a new bib file and create an entry, then type blah for the citekey and me for the author, preview using ASCII still won't work. In fact, I can't even save such a .bib file in ASCII, I get an error saying something about Unable to Convert Template String – majmun Oct 24 '17 at 22:38
  • @majmun Perhaps you have a non-ASCII character in ~/Library/Application Support/BibDesk/template.txt or in your username and you have selected "Write template file at the front of every file" in BibDesk's Opening and Saving Preferences? (Try deselecting that option.) When I made a new bibliography in BibDesk and made a new entry with citekey "blah", I could save it with text encoding "Western (ASCII)" without any error. And BibDesk's TeX preview using ASCII works for me, even without saving the bibliography. Due to some aspect of your particular configuration, you may need to use UTF-8. – Big Mac Oct 25 '17 at 16:26