I am not sure what to do exactly about the underscore and the dueling 
requirements for URL and tex. I am also not completely sure about what tex can 
handle, also combined with the \url command. One option may be to use a tex 
conversion  for the underscore, so it its saved as {\_} in .bib, but in BibDesk 
it turns up as _.

There is no other place to save anything, the database is the .bib file, it is 
the format we save in. 

As for the style options, it is a text field, you can just type anything. The 
list is just a list of suggestions and standard styles. I don’t know what the 
basis is for this list (its made many years ago, and not by me). 

Christiaan

> On 23 May 2024, at 02:12, quark67 via Bibdesk-users 
> <[email protected]> wrote:
> 
> But if we manually change _ to \_ in the doi or url field (for exporting in a 
> .bib file used by LaTeX) BibDesk cannot replace \_ by _ when we click on the 
> "@" at right side of doi or url field so the opened url is correct? (keeping 
> the real value of doi and url field with \_ so the TeX preview can also be 
> used). 
> 
> Seems not to complicated to do for the computer:
> 
> If the user click on "@" in url or doi field, AND there are \_ in the field, 
> I copy the content of the field, I replace all occurrences of \_ by _, and 
> then I paste the resulted string to the browser so it can open the correct 
> URL. 
> 
> Perhaps I'm missing something obvious. Perhaps, the solution of the "_" 
> problem is not for the end user to replace _ by \_ in the url and doi field.
> 
> Perhaps a concrete example about how do you manage an entry with _ character 
> in doi or url field in BibDesk can be instructive. Thanks.
> 
> I also have a suggestion: when we import citations from certains scientific 
> journals, they automatically add an abstract in the abstract field, but often 
> the abstract is text with Unicode characters (for example: greek letters, 
> astronomical symbols). These Unicode characters prevent the TeX Preview to 
> run. It will be great if with a bouton we can keep the abstract for later 
> reading, but without including it in the .bib file, stored in another place. 
> But perhaps this cannot be made with the database structure of BibDesk, if it 
> only uses a .bib file for all the stored information. Try with 
> https://iopscience.iop.org/export?type=article&doi=10.3847/2041-8213/ab0ec7&exportFormat=iopexport_bib&exportType=abs&navsubmit=Export+abstract
>  
> <https://iopscience.iop.org/export?type=article&doi=10.3847/2041-8213/ab0ec7&exportFormat=iopexport_bib&exportType=abs&navsubmit=Export+abstract>.
> 
> Also, what about the very few .bst style available in BibTeX style menu? Why 
> only English, German, Polish .bst style? If only English .bst style are 
> displayed, OK. But making available also German and Polish without other 
> languages is strange. Perhaps this question needs another thread.
> 
>> Le 23 mai 2024 à 01:19, Christiaan Hofman <[email protected]> a écrit :
>> 
>> That is about bibtex, and therefore latex.The TeX preview is generated by 
>> laTeX and bibTeX. BibnDesk is just an app that uses it and to maintain the 
>> database.
>> 
>> Christiaan
>> 
>>> On 23 May 2024, at 01:04, quark67 via Bibdesk-users 
>>> <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> My question is not about LaTeX, it is about BibDesk.
>>> 
>>> Steps to reproduce the problem.
>>> 
>>> Go to settings, TeX preview, enter "elsarticle-num" without quotes in 
>>> BiBTeX style menu/field. Validate.
>>> 
>>> Copy:
>>> 
>>> @book{wigner,
>>>     author = {Eugene Paul Wigner},
>>>     doi = {10.1007/978-3-663-02555-9},
>>>     publisher = {Springer},
>>>     title = {{Gruppentheorie und ihre Anwendung auf die Quantenmechanik der 
>>> Atomspektren}},
>>>     year = {1931}}
>>> 
>>> On BibDesk, add this entry with alt+cmd+L.
>>> 
>>> Select this new entry if necessary.
>>> 
>>> Click on Editing. On "Doi" field, there is a little icon with "@" at the 
>>> right side, if you click, you go to the Springer page about this book. 
>>> Works as expected.
>>> 
>>> Return on BibDesk app, click on TeX Preview.
>>> 
>>> This will work as expected and displays:
>>> 
>>> [1] E. P. Wigner, Gruppentheorie und ihre Anwendung auf die Quantenmechanik 
>>> der Atomspektren, Springer, 1931. doi:10.1007/978-3-663-02555-9.
>>> 
>>> Perfect.
>>> 
>>> Yet, copy this entry:
>>> 
>>> @Inbook{Wigner1931,
>>> author="Wigner, Eugen",
>>> title="Vektoren und Matrizen",
>>> bookTitle="Gruppentheorie und ihre Anwendung auf die Quantenmechanik der 
>>> Atomspektren",
>>> year="1931",
>>> publisher="Vieweg+Teubner Verlag",
>>> address="Wiesbaden",
>>> pages="1--13",
>>> isbn="978-3-663-02555-9",
>>> doi="10.1007/978-3-663-02555-9_1",
>>> url="https://doi.org/10.1007/978-3-663-02555-9_1 
>>> <https://doi.org/10.1007/978-3-663-02555-9_1>"
>>> }
>>> 
>>> On BibDesk, add this entry with alt+cmd+L.
>>> 
>>> Select this new entry if necessary.
>>> 
>>> Click on Editing. On "Doi" field, tere is a little icon with "@" at the 
>>> right side, if you click, you go to the Springer page about the chapter 
>>> "Vektoren und Matrizen" of this book. Works as expected.
>>> 
>>> Return on BibDesk app, click on TeX Preview.
>>> 
>>> No surprise, this don't work, because of the "_" in the doi and the url 
>>> field.
>>> 
>>> So what to do? Replace _ by \_ in the doi and url field?
>>> 
>>> OK, I will try this.
>>> 
>>> doi="10.1007/978-3-663-02555-9\_1",
>>> url="https://doi.org/10.1007/978-3-663-02555-9\_1 
>>> <https://doi.org/10.1007/978-3-663-02555-9/_1>"
>>> 
>>> I click on TeX Preview.
>>> 
>>> It works. The TeX Preview displays:
>>> 
>>> [1] E. Wigner, Vektoren und Matrizen, Vieweg+Teubner Verlag, Wiesbaden, 
>>> 1931, pp. 1–13. doi:10.1007/978-3-663-02555-9_1.
>>> URL https://doi.org/10.1007/978-3-663-02555-9_1 
>>> <https://doi.org/10.1007/978-3-663-02555-9_1>
>>> 
>>> Not sure if this is totally correct, because the _ in the url seems not be 
>>> a displayed with a tt font.
>>> 
>>> But anyway, if you click then on Editing, and the little icon "@" at right 
>>> of the field doi (or url), you go to 
>>> https://doi.org/10.1007/978-3-663-02555-9%5C_1 
>>> <https://doi.org/10.1007/978-3-663-02555-9%5C_1> and this display :
>>> DOI NOT FOUND
>>> 
>>> (displayed on https://www.doi.org/ <https://www.doi.org/> page).
>>> 
>>> So what is the right way to have at the same time:
>>> 
>>> a doi with "_"  which works with the TeX Preview AND which works when we 
>>> click on the "@" icon in the doi field when we are in Editing mode?
>>> 
>>> Does BibDesk need an update, so it understands "\_" in the doi field as 
>>> "_", or does the TeX Preview (more precisely ~/Library/Application 
>>> Support/BibDesk/previewtemplate.tex) be updated so it displays a TeX 
>>> Preview even if the doi field contains a "_" (without a backslash) ?
>>> 
>>> I know that in pure LaTeX, I cannot directly write 
>>> "https://doi.org/10.1007/978-3-663-02555-9_1 
>>> <https://doi.org/10.1007/978-3-663-02555-9_1>", but I can for example load 
>>> the package url and then write 
>>> \url{https://doi.org/10.1007/978-3-663-02555-9_1 
>>> <https://doi.org/10.1007/978-3-663-02555-9_1>}.
>>> 
>>> But here my question is about what to do in the doi field in BibDesk, so 
>>> that:
>>> • click on the "@" icon at right side of the field works ;
>>> • and the TeX preview also works.
>>> 
>>> If this is impossible, the better is to remove the "@" icon in the doi and 
>>> the url field. Or remove the TeX Preview.
>>> 
>>> But I hope there is another solution.
>>> 
>>> Thanks.
>>> 
>>>> Le 22 mai 2024 à 23:03, Christiaan Hofman <[email protected] 
>>>> <mailto:[email protected]>> a écrit :
>>>> 
>>>> Perhaps the discussion in 
>>>> <https://tex.stackexchange.com/questions/383678/underscore-in-bibtex-url 
>>>> <https://tex.stackexchange.com/questions/383678/underscore-in-bibtex-url>> 
>>>> can help.
>>>> 
>>>> Christiaan
>>>> 
>>>>> On 22 May 2024, at 21:48, quark67 via Bibdesk-users 
>>>>> <[email protected] 
>>>>> <mailto:[email protected]>> wrote:
>>>>> 
>>>>> How to manage the underscore in DOI or url specifically in BibDesk?
>>>>> 
>>>>> What is the recommended method?
>>>>> 
>>>>> We cannot replace "_" by "\_" because in the DOI or url field of BibDesk, 
>>>>> there is a little icon which open the browser to the DOI website with the 
>>>>> number in the DOI field, or to the url displayed in the url field, and an 
>>>>> address like https://www.my-example.com/a\_test 
>>>>> <https://www.my-example.com/a/_test> is NOT the same address as the 
>>>>> address https://www.my-example.com/a_test 
>>>>> <https://www.my-example.com/a_test>.
>>>>> 
>>>>> AND if the "_" is not replaced by "\_", the preview TeX for the 
>>>>> bibliography entry cannot be created (a red error is displayed instead).
>>>>> 
>>>>> So, please, what is the recommendation for this problem? A complete guide 
>>>>> to this problem can be useful (on the website or the user help).
>>>>> 
>>>>> If the file ~/Library/Application Support/BibDesk/previewtemplate.tex has 
>>>>> to be edited for this problem, what is the edit to do? I have tried 
>>>>> adding \usepackage[strings]{underscore} in the preamble, but this don't 
>>>>> work (suggested here: https://tex.stackexchange.com/a/523253/132405 
>>>>> <https://tex.stackexchange.com/a/523253/132405>).
>>>>> 
>>>>> I don't understand why the DOI organization has chosen the character "_" 
>>>>> as available character for DOI numbers, as the TeX world uses a lot of 
>>>>> DOI, and "_" is special in the TeX world, but this is another question, 
>>>>> not for here.
>>>>> 
>>>>> For testing, I use in the setting, TeX preview, the "elsarticle-num" 
>>>>> BiBTeX style (manually entered).
>>>>> 
>>>>> By the way, why this above popup menu don't display all available .bst in 
>>>>> the LaTeX installation, a least the .bst in 
>>>>> /usr/local/texlive/2024/texmf-dist/bibtex/bst? If this list is too big, 
>>>>> there is perhaps a middle between the actual situation (it displays only 
>>>>> abbrv, abbrvnat, acm, alpha, amsalpha, amsplain, apalike, gerabbrv, 
>>>>> geralpha, gerapali, gerplain, ieeetr, jurabib, jureco, plabbrv, plalpha, 
>>>>> plplain, plainnat, siam. Not abbrv-fr, plain-fr for the French, for 
>>>>> example).
>>>>> 
>>>>> The help says about the list in the popup menu: "This is a list of 
>>>>> generic styles that may or may not exist on your system." Perhaps, but 
>>>>> why few styles for German or Polish, and not French (and other languages)?
>>>>> 
>>>>> Thanks.

_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

Reply via email to