Open mdtanker opened 9 months ago
Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:
Thanks for the bug report @mdtanker, it looks like we aren't handling this yet!
Something that would be really helpful if you are game is to give us a few examples to work some test cases out of: e.g. in the sandbox here
The code to modify this it is here if you are feeling like PRs! https://github.com/executablebooks/mystjs/blob/main/packages/myst-to-tex/src/index.ts#L372
@rowanc1 no problem, thanks for the response. I'll try and find some time to make some examples!
Here are some of the main examples from the NatBib reference sheet. I've added what the mystmd command should be, what the latex rendering should be, and what the output should look like for each example. For cases where the mystmd
docs haven't stated a style I've added ??
.
Not sure if that sandbox link is permanent, so I'll add the text below as well.
@rowanc1, does that sandbox use the latest release of mystmd, or the head of the main branch?
# Citation style examples
- needs \usepackage{natbib}
- examples are from [NatBib reference sheet](https://gking.harvard.edu/files/natnotes2.pdf)
## Basic commands
@jon90
% \citet{jon90}
% Jones et al. (1990)
:::{note}
should render as \citet not \cite
:::
@jon90 [chap. 2]
% \citet[chap.~2]{jon90}
% Jones et al. (1990, chap. 2)
:::{note}
should render as \citet not \cite
:::
[@jon90]
% \citep{jon90}
%(Jones et al., 1990)
[@jon90, chap. 2]
% \citep[chap.~2]{jon90}
% (Jones et al., 1990, chap. 2)
[see @jon90]
% \citep[see][]{jon90}
% (see Jones et al., 1990)
[see @jon90, chap. 2]
% \citep[see][chap.~2]{jon90}
% (see Jones et al., 1990, chap. 2)
??
% \citet*{jon90}
% Jones, Baker, and Williams (1990)
??
% \citep*{jon90}
% (Jones, Baker, and Williams, 1990)
## Multiple citations
@jon90; @jam91
% \citet{jon90,jam91}
% Jones et al. (1990); James et al. (1991)
[@jon90; @jam91]
% \citep{jon90,jam91}
% (Jones et al., 1990; James et al. 1991)
[@jon90; @jon91]
% \citep{jon90,jon91}
% (Jones et al., 1990, 1991)
[@jon90a; @jon90b]
% \citep{jon90a,jon90b}
% (Jones et al., 1990a,b)
## Partial citations
??
% \citeauthor{jon90}
% Jones et al.
??
% \citeauthor*{jon90}
% Jones, Baker, and Williams
-@jon90
% \citeyear{jon90}
% 1990
[-@jon90]
% \citeyearpar{jon90}
% (1990)
My in text citations are working fine on the local web server, but when building a PDF, some of the citation options seem to be ignored. For example, none of the prefix or suffixes appear, or options like "-" for only showing the year are ignored.
I've tried add suffix/prefix with both of the following format:
Description
Proposed solution
Additional notes
I'm using mystmd v1.1.37, and I've tried both the
plain_latex
andlapreprint
templates.