TeX - LaTeX Asked on October 29, 2020

latex novice here…long story short, I am using apacite package and bibliography style, however I am technically following the AGU format, which is an even more restrictive version of APA 6th….

All of my references are good except for this part “Retrieved from https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2004JB003084” I basically need exactly that but like this “https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2004JB003084” or more clearly, without the “Retrieved from” part, is there a way to do this without messing the format too much? Maybe a workaround?

Thank you for your time :]

P.S.: I was also thinking I could use the doi field, but then again in the bibliography it appears as “doi:10.1029/2004JB003084” and I also would need to get rid of the “doi:” part since it’s considered dated/incorrect for this AGU format 🙁

I understand that you want to remove "Retrieved from" from the url display. This is controlled in apacite by BRetrievedFrom. You can renew that command to eliminate the string. A simpler approach is to use the note = {} entry to hold the URL (see at bottom of this post).

I made a short example (using the article class) to illustrate the first approach. I also included some style commands to approximate the AGU style observed on the link you gave (more work would be needed to precisely match), but these are not important to the question you asked.

documentclass{article}

usepackage[%
pdfborder={0 0 0},%  <=== make some edits toward AGU style links (on the web page mentioned)
citecolor=blue, %
urlcolor=blue,  %
]{hyperref}
usepackage{url}    % <== linebreaking in url

usepackage{apacite}
AtBeginDocument{%
renewcommand{BAstyle}{itshape} % <=== made some other edits toward AGU style...
urlstyle{APACsame}%
renewcommand{BBAA}{and}%
renewcommand{BBOP}{[}%
renewcommand{BBCP}{]}%
}

%% let's have a boldface volume number like AGU
makeatletter
renewcommand{APACjournalVolNumPages}[4]{%
Bem{#1}%             journal
[email protected]#[email protected]
else
unskip, {bfseries #2}%  volume          %%% <=== changed Bem{#2} to {bfseries #2}
fi
[email protected]#[email protected]
else
fi
[email protected]#[email protected]
else
unskip, {#4}%      pages
fi
}%
makeatother

% sample .bib file
begin{filecontents*}{jobname.bib}
@article{aguref,
author  = {Pablo Stackexchanger and Agu Journal},
journal = {Journal of Geophysical Research: Solid Earth},
volume  = {109},
pages   = {1469--1481},
year    = {2004},
title   = {How to include the {URL} without seeing {R}etrieved from'},
url     = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2004JB003084},
}
end{filecontents*}

begin{document}
We can use the URL field of texttt{apacite} as desired by citeA{aguref}.

bibliographystyle{apacite}
bibliography{jobname}

end{document}


2. A very simple way to include a url is through the note = {}, entry, especially for bst styles that do not support url = {}. For example, add to your citation:

note = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2004JB003084}

There is an old AGU bst style (v2.2, 2003) which does not have a url entry, although you could use note as above. Today's AGU Latex template (agujournal2019.cls) is using apacite as the bibliographystyle. The class includes some customization. So, you could make a simpler modification if you are using that class file:

documentclass{agujournal2019}

% sample .bib file
begin{filecontents*}{jobname.bib}
@article{aguref,
author  = {Pablo Stackexchanger and Agu Journal},
journal = {Journal of Geophysical Research: Solid Earth},
volume  = {109},
pages   = {1469--1481},
year    = {2004},
title   = {How to include the {URL} without seeing {R}etrieved from'},
url     = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2004JB003084},
}
end{filecontents*}

begin{document}
We can use the URL field of texttt{apacite} as desired by citeA{aguref}.

%bibliographystyle{apacite} % <==== OMIT, because the class issues this command
bibliography{jobname}

end{document}


Here's the result:

Note that the change to BRetrievedFrom needs to be delayed to the beginning of the document as done here.

Answered by John on October 29, 2020

Partially answered, one can remove the doi prefix using

    renewcommand{doiprefix}{}


Answered by Pablo on October 29, 2020

## Related Questions

### How to draw a picture

1  Asked on May 16, 2021 by the_fox

### How to understand the “v-type” argument error described in xparse package documentation?

1  Asked on May 16, 2021 by david-hans

### equalize distance when using in LaTeX

1  Asked on May 15, 2021 by franco-gotelli

### How to understand behavior of beamercolorbox with regard to width?

0  Asked on May 15, 2021

### Box around the code?

1  Asked on May 15, 2021 by mementomori

### llncs: Upright text in theorems and lemmas

1  Asked on May 15, 2021 by andrepd

### How to format a pseudocode algorithm

1  Asked on May 15, 2021 by user_777

### Tikz matrix node unwanted vskip in first column

2  Asked on May 15, 2021

### pgfplots: nodes near coords placement

2  Asked on May 15, 2021

### How to get new line after subparagraph title?

2  Asked on May 15, 2021 by user1996

### Compilation error after texlive update

1  Asked on May 15, 2021

### What is the best practice for writing large documents?

0  Asked on May 15, 2021

### Complex probability tree

3  Asked on May 15, 2021 by daniel-ortiz

### Usage of different headings with fancyhdr in a thesis

2  Asked on May 15, 2021

### How can I display eastern arabic numbers (in the output) while using pdfLaTeX?

1  Asked on May 15, 2021 by tarantelfaser

### Can’t export SVG image to Tikz file from Inkscape 1.0.1 on Windows using Inkscape2Tikz extension

0  Asked on May 15, 2021 by mcali

### Crossings in tikz knots package

1  Asked on May 15, 2021

### pgfplotstable: Newton’s Method in pgfplotstable

2  Asked on May 15, 2021

### Chinese characters not displayed when using CJK

1  Asked on May 15, 2021

### Symbols from fourier-orns not working

1  Asked on May 15, 2021 by dbmag9