brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
915 stars 96 forks source link

support sort option for natbib.sty #2382

Open BalajiCM24 opened 1 month ago

BalajiCM24 commented 1 month ago

When converting from LaTeX to HTML, my input is: Citations: \citep{sigurd_word_2004,bybee_frequency_2007,ernestus_introduction_2011}.

Converted output: (Sigurd et al., 2004; Bybee, 2007; Ernestus & Warner, 2011)

PDF output: (Bybee, 2007; Ernestus & Warner, 2011; Sigurd et al., 2004)

How shall I sort the reference citation in alphabetical order?

dginev commented 1 month ago

Are you using the sort option of the natbib package? On a quick check, latexml doesn't support that yet, will mark the issue as a package enhancement.

Existing code is at: https://github.com/brucemiller/LaTeXML/blob/40e9fa89efbf4006ddf06ecb57da4588aa661b4e/lib/LaTeXML/Package/natbib.sty.ltxml#L68-L69

BalajiCM24 commented 1 month ago

Thanks for your response. Yes, I tried, it sorts only by year in chronological order, not alphabetically.