Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support apacite-style citations #30

Closed
johnsmorgan opened this issue Aug 25, 2022 · 3 comments · Fixed by #31
Closed

support apacite-style citations #30

johnsmorgan opened this issue Aug 25, 2022 · 3 comments · Fixed by #31

Comments

@johnsmorgan
Copy link

AGU journals insist on apacite-style citations, which adstex does not appear to recognise. From their latex template:
`
% Reference citation instructions and examples:

% Please use ONLY \cite and \citeA for reference citations.

% \cite for parenthetical references
% ...as shown in recent studies (Simpson et al., 2019)

% \citeA for in-text citations

% ...Simpson et al. (2019) have shown...

%

%

%...as shown by \citeA{jskilby}.

%...as shown by \citeA{lewin76}, \citeA{carson86}, \citeA{bartoldy02}, and \citeA{rinaldi03}.

%...has been shown \cite{jskilbye}.

%...has been shown \cite{lewin76,carson86,bartoldy02,rinaldi03}.

%... \cite <i.e.>[]{lewin76,carson86,bartoldy02,rinaldi03}.

%...has been shown by \cite <e.g.,>[and others]{lewin76}.

%
% apacite uses < > for prenotes and [ ] for postnotes
% DO NOT use other cite commands (e.g., \citet, \citep, \citeyear, \citealp, etc.).
% \nocite is okay to use to add references from your Supporting Information
%`

I am currently using the following workaround to generate a temporary .tex file to run adstex against:
sed 's/citeA/cite/g' ms_grl.tex | sed 's/\\cite<[^>]*>/\\cite/g' > ms_tmp.tex
i.e. replacing \citeA with \cite and removing the <>-delimited prenotes.

@yymao
Copy link
Owner

yymao commented Aug 25, 2022

Thanks for the suggestion @johnsmorgan. I think #31 would fix this. If you are willing to help test it, that would be great. You can download this file and then run adstex using:

python /path/to/downloaded/adstex.py [regular adstex options]

@yymao yymao linked a pull request Aug 25, 2022 that will close this issue
@johnsmorgan
Copy link
Author

Thanks for the very quick response. That appears to fix the issue. Here's the latex fragment I used to test it in case you want to use it / add more tests:

\begin{document}
%Reference citation instructions and examples:
%
% Please use ONLY \cite and \citeA for reference citations.
% \cite for parenthetical references
% ...as shown in recent studies (Simpson et al., 2019)
% \citeA for in-text citations
% ...Simpson et al. (2019) have shown...
%
%
...as shown by \citeA{1993JGR....9818937G}.
...as shown by \citeA{1993JGR....9818937G}, \citeA{1999ApJ...510..485A}, and \citeA{2001ApJ...559..452Z}.
...has been shown \cite{1993JGR....9818937G}.
...has been shown \cite{1993JGR....9818937G,1999ApJ...510..485A,2001ApJ...559..452Z}.
... \cite <i.e.>[]{1993JGR....9818937G,1999ApJ...510..485A}.
...has been shown by \cite <e.g.,>[and others]{1993JGR....9818937G}.
%
% apacite uses < > for prenotes and [ ] for postnotes
% DO NOT use other cite commands (e.g., \citet, \citep, \citeyear, \citealp, etc.).
% \nocite is okay to use to add references from your Supporting Information
%
\end{document}

@yymao yymao closed this as completed in #31 Aug 25, 2022
yymao added a commit that referenced this issue Aug 25, 2022
support apacite-style citations, fix #30
@yymao
Copy link
Owner

yymao commented Aug 25, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants