New answers tagged

1

I suggest you proceed as follows. Find the file abbrvnat.bst in your TeX distribution. Make a copy of this file and call the copy, say abbrvnat-reverse.bst. Don't edit an original file of the TeX distribution directly. Open the file abbrvnat-reverse.bst in a text editor. The editor you use to edit your tex files will do fine. In the file abbrvnat-reverse....


2

(too long for a comment, hence posted as an answer) I can only surmise that you either have corrupted versions of the apalike2 and authordate3 bibliography styles on your system or have code somewhere in the document that modifies the hard-coded string "et al." to "etal.". For sure, the following minimalist working example produces no "etal" output. On my ...


1

To cite a chapter within a book, you should use the inbook entry type. MWE \documentclass{article} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @inbook{khalil2002, author = {Khalil, Hassan K.}, title = {Gain-Scheduling}, booktitle = {Nonlinear Systems}, publisher = {Prentice Hall, Inc.\isdot}, date = {2002} } \end{filecontents} \...


0

To add the period after the booktitle content to separate it from the next field content, FUNCTION {format.in.ed.booktitle} { booktitle empty$ { "In: " } { "In: " editor empty$ { " " * booktitle emphasize * ". " * } { " " * format.editors * " " * booktitle emphasize * ". " * } if$ } if$ }


1

Use the following setting \hypersetup{citecolor=black} Working example: \documentclass{article} \usepackage[backend=bibtex,style=authoryear,natbib=true,maxbibnames=2]{biblatex} \addbibresource{bibliography.bib} \DeclareCiteCommand{\citep} {\usebibmacro{prenote}} {\usebibmacro{citeindex}% \printtext[bibhyperref]{\usebibmacro{cite}}} {\...


0

Replace \usepackage[authoryear,longnamesfirst]{natbib} with \usepackage[authoryear]{natbib}.


1

Well, in your code you have several issues ... You have not added package graphicx resulting in error messages for used comands \includegraphics. I added the package in the following mwe ... I used images from package mwe, for example example-image, which must be installed but not loaded ... Wrap your used urls with command \url{}, then you can use package ...


1

I ran into this issue as well and emailed the maintainer of natbib to report the bug, using the contact email provided in the documentation. Here is the most relevant part of the reply: I will submit a new version shortly […]. For now you can make the following fix: On line 494 of natbib.sty, replace \else \NAT@nm with \else \NAT@nmfmt{\NAT@nm}%...


0

This error occurs because of the conflict in how you define the citation style and the bibliography style. In your case, note that \usepackage[authoryear]{natbib} is same as \usepackage{natbib}. While, the 'biblographystyle' is defined as \bibliographystyle{apalike} meaning it is plain, basically 'numbers'. Therefore, just change \usepackage{natbib} to ...


0

In addition to the answer by Torjørn T., given that the "e.g., Author, year" format is quite common, one can conveniently define a \citeg command (to be inserted before the \begin{document}) as \newcommand{\citeg}[1]{\citep[e.g.,][]{#1}} which automatically produces the prenote "e.g.,".


0

Based on the answer by @coffeetable, I've found the solution below. This is slightly different (rather than defining the colors in the sideboxinner-part, I do so higher up), in order not to indent the first line of the sidebox-content. Adding %-signs and/or removing linebreaks (based on this thread) didn't solve that problem. In any case, this removes the ...


2

Not change hypersetup, but define new color which can be changed: \documentclass[12pt]{report} \usepackage[colorlinks=true, citecolor=blue]{hyperref} \usepackage{natbib} \usepackage{filecontents} \usepackage{xpatch} \usepackage[most]{tcolorbox} \colorlet{citeauthor}{black} \colorlet{citeyear}{black} \colorlet{citep}{blue} \colorlet{citet}{blue} \...


2

The term for "et al." (in citations) is saved in apacite's \BOthers macro. We can temporarily redefine it to say "and colleagues" or something else. It might be convenient to pack up this redefinition in a new macro called \etalchange. We keep the redefinition local by enclosing it and the \cite it should refer to in curly braces, like {\etalchange\citet*{...


1

If you want to simplify the redefinition syntax you can also use the xpatch package, which takes care of the lower level implementation details. The package defines (among other things) a command \xpretocmd, which has four arguments: the command you want to change (here: \citep), the code you want to put in front (here: \hypersetup{citecolor=Teal}, code that ...


2

You can use the #{ argument to grab everything until the first {, and then pass that to \oldcitep. You also need an extra set of braces to contain the color change to that citation only: \let\oldcitep=\citep \def\citep#1#{\INNERcitep{#1}} \def\INNERcitep#1#2{{\hypersetup{citecolor=Teal}\oldcitep#1{#2}}} MWE: \documentclass{article} \usepackage{natbib} ...


Top 50 recent answers are included