APA citation - parenthethical with page number and textual [duplicate]

I need my text as following.

It was raining (De Silva & Lee, 2018). There was a cat (Kahouli & Maktouf, 2015, p. 12). Baier, Yotov, and Zylkin (2019) said that the cat was running.

First, the versions like \citep etc not working. Secondly I got the title of article to all lower case in the bibliography. Moreover, I would like to make the in text citations in blue font and hyperlinked. A lot of guidance available online on this topic but that is confusing or works only partially.

\documentclass[12pt]{article}
\usepackage{comment}
\usepackage[margin=1in]{geometry}
\usepackage[none]{hyphenat}
\usepackage {apacite}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[affil-it]{authblk}
\usepackage[flushleft]{threeparttable}
\usepackage{rotating}
\usepackage[title]{appendix}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot{}
\fancyfoot[C]{\thepage}
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{1.15}

\title {\textbf {This is an interesting title of the article}}
\author[1]{Firstname Lastname}
\affil[1]{ABC University, City, Country}
\begin{document}
\maketitle
\bibliographystyle{apacite}
\pagebreak

\section{Introduction}
It was raining \cite{de2018does}. There was a cat \cite{kahouli2015trade}. \cite{baier2019widely} said that the cat was running.

\bibliography{References}
\end{document}


The reference in the separate Reference.bib file I put here.

@article{baier2019widely,
title={On the widely differing effects of free trade agreements: Lessons from twenty years of trade integration},
author={Baier, Scott L and Yotov, Yoto V and Zylkin, Thomas},
journal={Journal of International Economics},
volume={116},
pages={206--226},
year={2019},
publisher={Elsevier}
}

@article{de2018does,
title={Does the role of observer countries in the regional trade agreement matter for intra-regional trade?},
author={De Silva, Dakshina G and Lee, Soon-Cheul},
journal={Applied Economics},
volume={50},
number={20},
pages={2219--2228},
year={2018},
publisher={Taylor \& Francis}
}

title={Trade creation and diversion effects in the Mediterranean area: Econometric analysis by gravity model},
author={Kahouli, Bassem and Maktouf, Samir},
journal={The Journal of International Trade \& Economic Development},
volume={24},
number={1},
pages={76--104},
year={2015},
publisher={Taylor \& Francis}
}


• If you want to use the \citep and other natbib citation commands, you need to load apacite with the natbibapa option. Lowercasing of titles is what the APA format requires, so this is not a bug. For hyperlinks, you need to load the hyperref package before you load apacite. Since hyperref generally likes to be loaded last, you should therefore load hyperref second last and apacite as the very last package loaded in your preamble. – Alan Munn Oct 23 '20 at 19:19
• Thank @AlanMunn - apacite with natbibapa option worked well. - hyperref also worked. I got that the sequence of the uploading packages matters in certain situation. Thanks! - To keep certain words in the uppercase, I used {} around them as I found this in some other conversations. – Amos Machado Oct 27 '20 at 13:09

I will share my setup for working with APA style references. I do not know if it will answer all your concerns.

1. To keep capital letters in titles, you must enclose them in (double) braces {}. See Referencesx.bib

2. I found the biblatex and biber combination much more convenient and easier to work with.

3. Use \citep.

4. It is strongly recommended to load hyperref as the last package. It is highly configurable. I don't know if my setup is what you wanted, but it will put you on the right track.

\documentclass[12pt]{article}
\usepackage{comment}
\usepackage[margin=1in]{geometry}
\usepackage[none]{hyphenat}
%\usepackage {apacite} %not used
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[affil-it]{authblk}
\usepackage[flushleft]{threeparttable}
\usepackage{rotating}
\usepackage[title]{appendix}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot{}
\fancyfoot[C]{\thepage}
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{1.15}

\title {\textbf {This is an interesting title of the article}}
\author[1]{Firstname Lastname}
\affil[1]{ABC University, City, Country}

\usepackage[style=apa,
backend=biber,
natbib=true,
language=american]
{biblatex}

\usepackage{xcolor}
\usepackage{hyperref}

\colorlet{urlcolour}{blue}

\hypersetup{
bookmarksnumbered=true,
bookmarksopen=true,
bookmarksopenlevel=3,
urlcolor=urlcolour,
filecolor=black,
} % Set up hyperlinks including colors for references, urls and citations

%% **********************************************************************

\begin{document}
\maketitle
%\bibliographystyle{apacite}
\pagebreak

\section{Introduction}
It was raining \citep{de2018does}. There was a cat \citep{kahouli2015trade}. \citep{baier2019widely} said that the cat was running.

%\bibliography{References}

\newpage

\printbibliography
\end{document}


Titles in double braces. Update To avoid incompatibilities that may arise with other styles, it is advisable to use the { } only in words or letters, not the full titles, as in

title = {{NASA} sends {MarsProve} to search for {L}a, {A}c, {T}h {P}a and {U} actinides to the {K}uiper belt},

File: Referencesx.bib

@article{baier2019widely,
title={{On the widely differing effects of free trade agreements: Lessons from twenty years of trade integration}},
author={Baier, Scott L and Yotov, Yoto V and Zylkin, Thomas},
journal={Journal of International Economics},
volume={116},
pages={206--226},
year={2019},
publisher={Elsevier}
}

@article{de2018does,
title={Does the role of observer countries in the regional trade agreement matter for intra-regional trade?},
author={De Silva, Dakshina G and Lee, Soon-Cheul},
journal={Applied Economics},
volume={50},
number={20},
pages={2219--2228},
year={2018},
publisher={Taylor \& Francis}
}

title={{Trade creation and diversion effects in the Mediterranean area: Econometric analysis by gravity model}},
author={Kahouli, Bassem and Maktouf, Samir},
journal={The Journal of International Trade \& Economic Development},
volume={24},
number={1},
pages={76--104},
year={2015},
publisher={Taylor \& Francis}
}


• I'm sorry but this is not the way to deal with capitalization. The APA style requires sentence case for titles, and if that's not the style you want, you shouldn't be using one of the 'official' APA styles (apacite or biblatex-apa), but instead should use a more generic author year style. You should never (need to) make adjustments to your .bib file to adapt to a style. The .bib file should be style neutral, and all formatting done by biblatex. And this does not implement APA style anymore, since it will the title casing wrong if you have a .bib entry with Title Case. – Alan Munn Oct 27 '20 at 13:14
• To preserve the case of particular words in your .bib file, just enclose those words (not the whole title) in {...}. – Alan Munn Oct 27 '20 at 13:17
• Thanks @SimonDispa As I mentioned in my commented I just posted above, the apacite worked with the natbibapa option. But I will try the biblatex and biber combination just to have more understanding. About preserving the case, I read some other ways in some conversations, yet the simplest one is using the {} as you mentioned. Thanks – Amos Machado Oct 27 '20 at 13:17
• @Alan Munn Just to clarify: from APA 7ed section 6.17 apastyle.apa.org/style-grammar-guidelines/capitalization/… APA Style uses two types of capitalization for titles of works (such as paper titles) and headings within works: title case and sentence case. In title case, major words are capitalized, and most minor words are lowercase. Major words: Nouns, verbs (including linking verbs), adjectives, adverbs, pronouns, and all words of four letters or more are considered major words. – Simon Dispa Oct 27 '20 at 17:21
• @SimonDispa This may have changed from v6 to v7, but is irrelevant to the point I'm making. You should not fix capitalization problems by putting whole titles in {...}. Ideally your .bib entries should be in title case, and words that must always be capitalized independent of style should be in {...}, not the whole title. – Alan Munn Oct 27 '20 at 17:26