anton-vrba / sidenotesplus

Latex package: sidenotesplus
2 stars 1 forks source link

The command `\sidecite` results in a sidenote ending in a comma instead of a period. Is this on purpose? #3

Open xu-jinsheng opened 11 months ago

xu-jinsheng commented 11 months ago

Dear Anton,

As show in the following screenshot, with your package sidenotesplus, the command\sidecite results in a sidenote ending in a comma (,) instead of aperiod. Is this on purpose?

All the best, Xu

Screenshot 2023-12-17 at 00 38 10
anton-vrba commented 11 months ago

That comma is part of BibLaTex and not from the sidenotesplus package.
Try adding the isbn=false option to BibLaTex

something like this:

\PassOptionsToPackage{% %backend=biber,bibencoding=utf8, %instead of bibtex backend=bibtex,bibencoding=ascii,% language=auto,% % style=numeric-comp,% % style=authoryear-ibid, % Author 1999, 2010 style=verbose-ibid, bibstyle=authoryear,dashed=false, % dashed: substitute rep. author with --- % sorting=none, % nyt for name, year, title sorting = anyvt, maxbibnames=10, % default: 3, et al. %backref=true,% natbib=true, % natbib compatibility mode (\citep and \citet still work) urldate=iso,date=iso, isbn=false, doi=false, url=false, eprint=false, }{biblatex} \usepackage{biblatex} \addbibresource[label=mainbib]{myreferences.bib}

xu-jinsheng commented 11 months ago

Hi, Anton. Thank you for the answer. I solved the problem in a slightly different way. I added the following code to my document, since I wanted the \sidecite to have a bit less information than the ending bibliography. At the end of the snippet is the part that replaces the comma. However, I don't think \hspace{-2pt}. is pretty, though.

    \DeclareCiteCommand{\fullcite}
        {\usebibmacro{prenote}}
        {
            \clearfield{url}
            \clearfield{urlyear}
            \clearfield{pages}
            \clearfield{pagetotal}
            % \clearfield{labelyear}
            \clearlist{location}
            \clearlist{language}
            \clearfield{edition}
            \clearfield{issn}
            \clearfield{isbn}
            \clearfield{note}
            \clearlist{publisher}
            \clearfield{eprint}
            \usedriver{}%\DeclareNameAlias{sortname}{default} %\DeclareNameAlias{default}{last-first}
            {\thefield{entrytype}}
        }
        {\multicitedelim} %
        {\hspace{-2pt}.} % \usebibmacro{postnote}  %% This is a quick fix. There must be better ways.
anton-vrba commented 11 months ago

Replace the last two lines with

{} %% {\multicitedelim} % {.} %% {\hspace{-2pt}.} % \usebibmacro{postnote} %% This is a quick fix. There must be better ways.

Thanks for this I will work it into the next release of sidenoteplus.

Regards Anton

xu-jinsheng commented 11 months ago

Using \addperiod is probably better, for the spacing, but I am not sure if this is the encouraged way of biblatex.

{}  %% {\multicitedelim} %
{\addperiod} %% {\hspace{-2pt}.} % \usebibmacro{postnote} %% This is a quick

All the best, Xu

anton-vrba commented 11 months ago

I got it! biblatex.sty defines: \DeclareDelimFormat{postnotedelim}{\addcomma\space}

and all that is required is to add following code:

\DeclareDelimFormat{postnotedelim}{\addperiod}

when no is defined by in \sidecite.

\sidecite{Dirac1930,Heaviside1893} prints both references with semicolon separating them and terminating with a period.

together with above redeclaration then your last two lines revert to {\multicitedelim} % {\usebibmacro{postnote}}

I will let you know when package is updated.

Regards Anton

anton-vrba commented 11 months ago

Version 1.04 published which terminates sidecite with a period and not a comma

Find latest version here: https://github.com/anton-vrba/sidenotesplus/releases

xu-jinsheng commented 11 months ago

I just saw the update. Thank you very much Anton!