Skip to content

Commit

Permalink
Change to biblatex from natbib. Now support APA7.
Browse files Browse the repository at this point in the history
  • Loading branch information
rizauddin committed Apr 26, 2021
1 parent b3a401b commit 1bbdd81
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 9 deletions.
4 changes: 3 additions & 1 deletion main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
\input{mainmatter/chapResults}
\input{mainmatter/chapConclusion}

\bibliography{references/myref}
%\bibliography{references/myref}
%\printbibliography
\printbibliography[title={REFERENCES}]

\begin{appendix}
\appendixpage
Expand Down
16 changes: 13 additions & 3 deletions mainmatter/chapLiterature.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,22 @@ \chapter{LITERATURE REVIEW}

\section{Introduction}

This is a \LaTeX{} book~\citep{urban1986introduction}. \citet{lamport1994latex} wrote a good~\LaTeX{} book. \cite{Knu86book}
This is a \LaTeX{} book~\parencite{urban1986introduction}. \textcite{lamport1994latex} wrote a good~\LaTeX{} book. \textcite{Knu86book} claimed that \ldots

\section{Previous Study on Problem B}

\LaTeX{} minimizes the number of details you absolutely need to know \citep{urban1986introduction,lamport1994latex}.
Three or more authors \parencite{mittelbach2004latex}

\textcite{mittelbach2004latex} has three or more authors.

Two authors \parencite{kopka1995guide}.

\textcite{kopka1995guide} has two authors.

Cite more than one articles \parencite{urban1986introduction,lamport1994latex}.

Newspaper \parencite{afp_covid_2021}.

\section{Improved Method for Problem B}

\lipsum[4-5]
\lipsum[4-5]
25 changes: 25 additions & 0 deletions references/myref.bib
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,28 @@ @book{Knu86book
publisher={Wesley Publishing Co., Reading. Ma}
}

@book{mittelbach2004latex,
title={The LATEX companion},
author={Mittelbach, Frank and Goossens, Michel and Braams, Johannes and Carlisle, David and Rowley, Chris},
year={2004},
publisher={Addison-Wesley Professional}
}

@article{kopka1995guide,
title={A Guide to \LaTeX{} Document},
author={Kopka, H and Daly, PW},
year={1995},
publisher={Citeseer}
}

@online{afp_covid_2021,
title = {Covid patients with sedentary habits more likely to die: {Study}},
shorttitle = {Covid patients with sedentary habits more likely to die},
url = {https://www.nst.com.my/world/world/2021/04/682122/covid-patients-sedentary-habits-more-likely-die-study},
language = {en},
date = {2021-04-14},
urladdon = {NST Online},
author = {AFP},
month = apr,
year = {2021},
}
10 changes: 7 additions & 3 deletions settings.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@

%% References Type
%\usepackage[numbers]{natbib} % enable to use IEEEtran, disable for apalike2
\usepackage{natbib} % enable to use apalike2, disable for IEEEtran
%\usepackage{natbib} % enable to use apalike2, disable for IEEEtran
%% To use IEEEtran, in settings.tex, use \usepackage[numbers]{natbib}
%% To use IEEEtran, need to replace \citet to \cite or \citep everywhere.
\bibliographystyle{apalike2} %IEEEtran,apalike2.
%\bibliographystyle{apalike2} %IEEEtran,apalike2.
%\bibliographystyle{IEEEtran}
\setlength{\bibhang}{0.5in} % set the length of the bibliography hanging indent
%\setlength{\bibhang}{0.5in} % set the length of the bibliography hanging indent
\usepackage{csquotes}
%% APA7: style=apa; IEEE: style=ieee
\usepackage[style=apa,backend=biber]{biblatex}
\addbibresource{references/myref.bib}

\usepackage{memhfixc} % add memhfixc to use hyperref package
\usepackage[bookmarksnumbered,bookmarksdepth=4,hidelinks,bookmarks=true,bookmarksopen=true]{hyperref}
Expand Down
5 changes: 3 additions & 2 deletions uitmthesis.cls
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
%=================================================================%
% CLASS: uitmthesis %
% Version: 1.0.1-2021/03/26 %
% License: LPPL 1.3c %
% Copyright (C) 2021 Rizauddin Saian <rizauddin at gmail dot com> %
% %
Expand All @@ -20,8 +19,10 @@
% by IPSis UiTM. %
% %
% History: %
% 2021/03/16 v1.0 First release. %
% 2021/04/26 v1.1.1 Use REFERENCES instead of BIBLIOGRAPHY %
% 2021/04/14 v1.1 Change to biblatex from natbib. Now support APA7%
% 2021/03/26 v1.0.1 Remove gender bug. %
% 2021/03/16 v1.0 First release. %
%=================================================================%

\NeedsTeXFormat{LaTeX2e}
Expand Down

0 comments on commit 1bbdd81

Please sign in to comment.