Re: Bibtex style files
Giovanni Piredda <[email protected]>
| Newsgroups | gmane.editors.texmacs.user |
|---|---|
| Message-ID | <[email protected]> |
Since that output looks ok (to me), I would debug step by step by adding
some display statements in the code. I think this is best done in the
forum (forum.texmacs.cn) rather than in the mailing list. So if you want
open a thread there and we can try. Maybe in your program line 328 ,
(bib-generate prefix (string-drop style 3) doc)), runs (I do not yet
know whether it should or not) your style variable is "acs" and dropping
3 characters it becomes the empty string.
Of course someone else may have a better idea.
Giovanni
On 17/12/23 13:16, Bimal Gaudel wrote:
>
> Thank you for following up.
>
> I got this (I truncated the citation keys inside the parentheses):
>
> |TeXmacs] Generating bibliography [bib, acs, ] Compile acs,
> ("bellman1957" ...), (<url
> /Applications/Mogan.app/Contents/Resources/share/Xmacs/misc/bib/texmacs.bib>)
> ;string->symbol argument, "", is a string but should be a non-null
> string ; (string->symbol style) ; style: "" ; ((string->symbol style))
> ; ((r (cpp-get-preference which (if s? def ... ; ((inclusions-gc)
> (wait-update-current-buf... TeXmacs] Generating bibliography [bib,
> acs, ] Compile acs, ("bellman1957" ...), (<url
> /Applications/Mogan.app/Contents/Resources/share/Xmacs/misc/bib/texmacs.bib>)
> ;string->symbol argument, "", is a string but should be a non-null
> string ; (let ((m (list-values 'bibtex... ;
> /Applications/Mogan.app/Contents/Resources/share/Xmacs/progs/database/bib-manage.scm,
> line 300, position: 11855 ; (let ((m (list-values 'bibtex
> (string->sy... ; style: "", prefix: "bib" ; doc: (document (bib-entry
> "article" ... ; ((string->symbol style)) ; ((r (cpp-get-preference
> which (if s? def ... ; ((inclusions-gc) (wait-update-current-buf...
> TeXmacs] Generating bibliography [bib, acs, ] Compile acs,
> ("bellman1957" ...), (<url
> /Applications/Mogan.app/Contents/Resources/share/Xmacs/misc/bib/texmacs.bib>)
> ;string->symbol argument, "", is a string but should be a non-null
> string ; (let ((m (list-values 'bibtex... ;
> /Applications/Mogan.app/Contents/Resources/share/Xmacs/progs/database/bib-manage.scm,
> line 300, position: 11855 ; (let ((m (list-values 'bibtex
> (string->sy... ; style: "", prefix: "bib" ; doc: (document (bib-entry
> "article" ... ; ((string->symbol style)) ; ((r (cpp-get-preference
> which (if s? def ... ; ((inclusions-gc) (wait-update-current-buf... |
>
> Bimal
>
>
> On Sun, Dec 17, 2023 at 6:24 AM Giovanni Piredda <[email protected]>
> wrote:
>
> If you do not mind putting the hands inside the code, I would
> uncomment line 348 of progs/database/bib-manage.scm, which in the
> commented state is
>
> ;;(display* "Compile " style ", " names ", " bib-files "\n")
>
> and then see what TeXmacs displays in the terminal when updating
> your bibliography (make a backup copy of bib-manage.scm if you
> think it is good to have one :-) ).
>
> The output should be
>
> Compile acs, (list of references), <tree of bib files>
>
> I think you have to restart TeXmacs for your change to have an effect.
>
> Giovanni
>
>
>
> On 17/12/23 04:08, Bimal Gaudel wrote:
>>
>> I figured out that |TEXMACS_HOME_PATH/system/bib| is considered
>> when looking for |.bst| files. I put the |acs.bst| file in that
>> directory. Running TeXMacs (technically Mogan but I believe that
>> is irrelevant) from the terminal, I encountered the following.
>> Looks like a bug in source code (|bib-manage.scm|).
>> Unfortunately, I do not (yet) know Scheme. I am relying on you
>> folks’ mercy.
>>
>> |TeXmacs] Generating bibliography [bib, acs, ] ;string->symbol
>> argument, "", is a string but should be a non-null string ;
>> (string->symbol style) ; style: "" ; ((string->symbol style)) ;
>> ((r (cpp-get-preference which (if s? def ... ; ((inclusions-gc)
>> (wait-update-current-buf... TeXmacs] Generating bibliography
>> [bib, acs, ] ;string->symbol argument, "", is a string but should
>> be a non-null string ; (let ((m (list-values 'bibtex... ;
>> /Applications/Mogan.app/Contents/Resources/share/Xmacs/progs/database/bib-manage.scm,
>> line 300, position: 11855 ; (let ((m (list-values 'bibtex
>> (string->sy... ; style: "", prefix: "bib" ; doc: (document
>> (bib-entry "article" ... ; ((string->symbol style)) ; ((r
>> (cpp-get-preference which (if s? def ... ; ((inclusions-gc)
>> (wait-update-current-buf... TeXmacs] Generating bibliography
>> [bib, acs, ] ;string->symbol argument, "", is a string but should
>> be a non-null string ; (let ((m (list-values 'bibtex... ;
>> /Applications/Mogan.app/Contents/Resources/share/Xmacs/progs/database/bib-manage.scm,
>> line 300, position: 11855 ; (let ((m (list-values 'bibtex
>> (string->sy... ; style: "", prefix: "bib" ; doc: (document
>> (bib-entry "article" ... ; ((string->symbol style)) ; ((r
>> (cpp-get-preference which (if s? def ... ; ((inclusions-gc)
>> (wait-update-current-buf... |
>>
>> Bimal
>>
>>
>> On Sat, Dec 16, 2023 at 4:11 PM Giovanni Piredda
>> <[email protected]> wrote:
>>
>>
>> On 16/12/23 21:17, Bimal Gaudel wrote:
>>> Thanks for your response.
>>>
>>> How to make sure that bibtex/biblatex is available for
>>> TeXMacs? I do have it in my path as seen from the output of
>>> `which bibtex` within my shell (zsh).
>>
>>
>> I think that if you have it in your path, it is enough. The
>> error that you get when trying biblatex _might_ be
>> misleading. In my test with the acs style that you posted, it
>> did not work when I put acs.bst under
>>
>> ${TexMacs user directory}/progs/bibtex, but it worked when I
>> put it in the local TeX directory (bibtex/bst subdirectory).
>> Maybe someone more expert can confirm/correct.
>>
>> Also, if it still does not work, the error messages that
>> possibly appear in the terminal might be helpful (you have to
>> run TeXmacs from the terminal).
>>
>> Giovanni
>>
>>
>>> I am not sure if this is enough because when I tried
>>> `biblatex` for the conversion of BibTeX from TeXMacs, I got
>>> the error that says: bibtex not installed on my system,
>>> defaulting to integrated style.
>>>
>>> Bimal
>>>
>>>
>>> On Sat, Dec 16, 2023 at 12:18 PM Giovanni Piredda
>>> <[email protected]> wrote:
>>>
>>>
>>> On 16/12/23 05:10, Bimal Gaudel wrote:
>>> >
>>> >
>>> > I copied that to ${TexMacs user
>>> directory}/progs/bibtex/acs.bst
>>> >
>>> >
>>> It might be that the style file goes into the personal
>>> bibtex directory,
>>> which you get exempli gratia in texlive as explained in
>>> https://tug.org/pipermail/tex-live/2018-March/041211.html
>>>
>>> I tried the TEXMFLOCAL directory and issued the texhash
>>> command and it
>>> worked. For issuing the texhash command I had to sudo it
>>> and also
>>> specify its full path. Perhaps TEXMFHOME is easier.
>>>
>>> Giovanni
>>>
>>>