adsabs / export_service

Export service to output ADS records with various formats including BibTex, AASTex, and multiple tagged and xml options
MIT License
3 stars 5 forks source link

Escape double quotes to avoid TeX errors #35

Closed aaccomazzi closed 6 years ago

aaccomazzi commented 6 years ago

If a tex field includes double quotes, make sure they are properly escaped using the appropriate sequence of TeX forward and back ticks.

Example:

@INPROCEEDINGS{2009arad.workE..32A,
   author = {{Accomazzi}, A. and {Murray}, S.~S. and {Kurtz}, M.~J.},
    title = "{Towards a Resource-Centric Data Network for Astronomy}",
booktitle = {``Proceedings of the special session ''Accelerating the Rate of Astronomical Discovery`` of the 27th IAU General Assembly. August 11-14 2009. Rio de Janeiro, Brazil. Published online at <A href=''http://pos.sissa.it/cgi-bin/reader/conf.cgi?confid=99``>http://pos.sissa.it/cgi-bin/reader/conf.cgi?confid=99</A>, id.32''},
     year = 2009,
archivePrefix = "arXiv",
   eprint = {1005.1886},
 primaryClass = "astro-ph.IM",
      eid = {32},
    pages = {32},
   adsurl = {http://adsabs.harvard.edu/abs/2009arad.workE..32A},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
golnazads commented 6 years ago

We are using utf8tolatex to encode to latex, which replaces double quotes with two single quotes. Please see https://github.com/dfm/cv/blob/master/utf8totex.py#L62 Also, it does not escape ~, which according to the following it should: https://tex.stackexchange.com/questions/34580/escape-character-in-latex

golnazads commented 6 years ago

Proceedings of the special session "Accelerating the Rate of Astronomical Discovery" of the 27th IAU General Assembly. August 11-14 2009. Rio de Janeiro is now encoded to Proceedings of the special session ‘’Accelerating the Rate of Astronomical Discovery‘’ of the 27th IAU General Assembly. August 11-14 2009. Rio de Janeiro

golnazads commented 6 years ago

implemented in v2.0.29