backtracking / bibtex2html

Other
98 stars 27 forks source link

unknown macro \rq (apostrophe) #14

Open pierre-haessig opened 7 years ago

pierre-haessig commented 7 years ago

I have trouble processing a BibTex file which contains {\rq} macro instead of plain text apostrophes. I believe those macros are inserted automatically by kbibtex, because when I look at the "source view" of kbibtex, these \rq are not visible but replaced by the actual character ’ ("right single quotation mark", which is the same as apostrophe).

bibtex2html outputs the warning message Unknown macro: \rq and this macro is erased in output html file.

I believe the expected behavior would be to replace{\rq} by the html entity ’ (cf. https://en.wikipedia.org/wiki/Apostrophe#Entering_apostrophes)

Example:

@inbook{Multon:2013:TIBE8100,
author = "Multon, Bernard and Aubry, Judica{\"e}l and Haessig, Pierre and {Ben Ahmed}, Hamid",
booktitle = "{Technique de l{\rq}Ing{\'e}nieur}",
month = apr,
pages = "BE8100",
title = "{Syst{\`e}mes de stockage d{\rq}{\'e}nergie {\'e}lectrique}",
year = "2013"

}

This yields a title in html "Systèmes de stockage dénergie électrique" (instead of "...d’énergie...")

versions: I'm using bibtex2html version 1.98, compiled on Thu Oct 27 07:47:01 UTC 2016 from Debian stretch, which is calling BibTeX, Version 0.99d (TeX Live 2016/Debian).

pierre-haessig commented 7 years ago

as a workaround, thanks to the -m option to load a LaTex macro file, I get the correct behavior with a file containing the following line:

\newcommand{\rq}{’}
backtracking commented 7 years ago

Thanks for reporting this. It is fixed.

Jean-Christophe

On 12/09/2017 11:43, Pierre Haessig wrote:

I have trouble processing a BibTex file which contains |{\rq}| macro instead of plain text apostrophes. I believe those macros are inserted automatically by kbibtex, because when I look at the "source view" of kbibtex, these \rq are not visible but replaced by the actual character ’ ("right single quotation mark", which is the same as apostrophe).

bibtex2html outputs the warning message |Unknown macro: \rq| and this macro is erased in output html file.

I believe the expected behavior would be to replace|{\rq}| by the html entity |’| (cf. https://en.wikipedia.org/wiki/Apostrophe#Entering_apostrophes)

Example:

|@inbook{Multon:2013:TIBE8100, author = "Multon, Bernard and Aubry, Judica{\"e}l and Haessig, Pierre and {Ben Ahmed}, Hamid", booktitle = "{Technique de l{\rq}Ing{\'e}nieur}", month = apr, pages = "BE8100", title = "{Syst{`e}mes de stockage d{\rq}{\'e}nergie {\'e}lectrique}", year = "2013" |

}

This yields a title in html "Systèmes de stockage dénergie électrique" (instead of "...d’énergie...")

versions: I'm using |bibtex2html version 1.98, compiled on Thu Oct 27 07:47:01 UTC 2016| from Debian stretch, which is calling |BibTeX, Version 0.99d (TeX Live 2016/Debian)|.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/backtracking/bibtex2html/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWLtlhTvZJWGvH304CQRUUXvKkNJ0haks5shlJPgaJpZM4PUYPz.

backtracking commented 7 years ago

that's indeed a workaround

Jean-Christophe

On 12/09/2017 11:51, Pierre Haessig wrote:

as a workaround, thanks to the |-m| option to load a LaTex macro file, I get the correct behavior with a file containing the following line:

|\newcommand{\rq}{’} |

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/backtracking/bibtex2html/issues/14#issuecomment-328802848, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWLtj7U1aCNegxm52-kHkUJhlhkiaaWks5shlQYgaJpZM4PUYPz.

MLopez-Ibanez commented 1 year ago

This was fixed in 98d551dbb01cf586ac284cb8e9dd45d1dfdb708e