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

SAGE bibliography style sageapa #195

Closed
nevrome opened this issue Nov 20, 2018 · 5 comments
Closed

SAGE bibliography style sageapa #195

nevrome opened this issue Nov 20, 2018 · 5 comments

Comments

@nevrome
Copy link

nevrome commented Nov 20, 2018

Besides sageh and sagev some SAGE journals require APA citation. The sagej.cls knows the option sageapa to achieve this. Unfortunately that does not work with the rticles SAGE template.

If you set

bibliographystyle: sageapa

you get a set of errors:

  1. ! LaTeX Error: Command \bibhang already defined.
    Or name \end... illegal, see p.192 of the manual.

This can be "solved" by loading natbib and removing the definition of \bibhang before it's called in line 553 of sagej.cls. I added the following code in the lines 549 and 550:

\usepackage{natbib}
\let\bibhang\relax

Not a nice solution, but it works.

  1. This is BibTeX, Version 0.99d (TeX Live 2018/Arch Linux)
    The top-level auxiliary file: Untitled.aux
    I couldn't open style file sageapa.bst
    ---line 38 of file Untitled.aux
    : \bibstyle{sageapa
    : }
    I'm skipping whatever remains of this command
    I found no style file---while reading file Untitled.aux

This can be "solved" by adding a file sageapa.bst that contains the content of mslapa.bst.

  1. ! Missing = inserted for \ifnum.
    \def
    l.233 \citep{Taylor1937}
    , \citep{Knupp1999, Kamm2000}.

I have no solution for this. Most probably it's caused by the hacks in 1. and 2..

Could you please apply some changes to the rticles SAGE template to make it work with the bibliographystyle: sageapa option? I know that this is a feature request, but on the other hand the template is of limited use if it can't be employed for many SAGE journals.

@yihui
Copy link
Member

yihui commented Nov 20, 2018

Hi @oguzhanogreden, do you have any ideas here? (For the record, SAGE was introduced in #181).

@oguzhanogreden
Copy link
Contributor

The template in the package has the command \usepackage{moreverb,url,natbib,multirow, tabularx} which does not exist in the original sagej.cls file, neither in the example template provided here. This is the cause of the initial error.

I think we should avoid changing sagej.cls as long as possible. I haven't tested it but I'd go for something like modifying the template.tex's initial lines:

% Better to make the line below conditional on $classoption$==sageapa
\let\bibhang\relax
\usepackage{moreverb,url, natbib, multirow, tabularx}
% The line should be conditional too
\setlength{\bibhang}{16pt}

and indeed add mslapa.bst as sageapa.bst.

I hope this is helpful, since I won't have time to try and figure this out, unfortunately.

@nevrome
Copy link
Author

nevrome commented Nov 25, 2018

Thanks for taking a look at this @oguzhanogreden! Unfortunately that doesn't help me much.

Sure it's better to solve this in the template.tex, but I was not even able to figure out how to formulate the conditional in this pandoc markup language. Something like this

$if($classoption$==sageapa)$
\let\bibhang\relax
$endif$

doesn't seem to be allowed.

Even if I would get this to work my actual problem 3. would persist with this solution, wouldn't it?

@yihui
Copy link
Member

yihui commented Mar 14, 2019

Closing since I'm not able to offer any help here. Sorry.

@yihui yihui closed this as completed Mar 14, 2019
@github-actions
Copy link

github-actions bot commented Nov 2, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants