0

I would like to use author-year citation but its length can be distracting for the reader. I still want to mention author names and dates explicitly because this shows the chronological progress of the literature. Thus, I would like to place the author-year citation to the left with (say) 2mm margin where each reference being numbered on its own line.

enter image description here

\documentclass[aspectratio=169, xcolor={x11names}]{beamer}

\usecolortheme{seahorse}
\useoutertheme{miniframes}
\usefonttheme[onlylarge]{structurebold}
\useinnertheme{inmargin}

\newlength{\widthTextMarginLeft}
\setlength{\widthTextMarginLeft}{1.5mm}
\newlength{\widthTextMarginRight}
\setlength{\widthTextMarginRight}{2mm}
\setbeamersize{text margin left=\widthTextMarginLeft, text margin right=\widthTextMarginRight}
\newlength{\widthSideBar}
\setlength{\widthSideBar}{0.3\paperwidth}
\setbeamersize{sidebar width left=\widthSideBar, sidebar width right=0cm}

        % ===== Custom margin codes for pagewide frames =====
% BEGIN_FOLD

            % Set margins
            \newlength{\widthTextMarginLeftPageWide}
            \setlength{\widthTextMarginLeftPageWide}{5mm}
            \newlength{\widthTextMarginRightPageWide}
            \setlength{\widthTextMarginRightPageWide}{5mm}

            % Command to change margins for a page wide
            \makeatletter
            \newcommand{\framePageWide}{
                    \def\Gm@lmargin{\widthTextMarginLeftPageWide}%
                    \def\Gm@rmargin{\widthTextMarginRightPageWide}%
                    \textwidth=\dimexpr\paperwidth-\Gm@lmargin-\Gm@rmargin\relax
                    \hsize\textwidth
                    \columnwidth\textwidth
                    \setlength{\linewidth}{\textwidth}
                    \hoffset=\dimexpr-\beamer@leftsidebar+\Gm@lmargin-\widthTextMarginLeft\relax % IMPORTANT: \widthTextMarginLeft is not to be changed to \widthTextMarginLeftPageWide
                                        }
            \makeatother

% END_FOLD

\usepackage{natbib}

\hypersetup{citecolor=SlateBlue2, citebordercolor=SlateBlue2, 
    linkcolor=DodgerBlue3, linkbordercolor=DodgerBlue3, urlcolor=Blue1, colorlinks=true}


\begin{document}


\begin{frame}

    Cite \cite{wu2017,MRITS-Grant2014,earnest2015}

    Cite \textsuperscript{\color{SlateBlue2} 1,} \textsuperscript{\color{SlateBlue2} 2,} \textsuperscript{\color{SlateBlue2} 3}

\end{frame}


{\framePageWide

\begin{frame}[allowframebreaks=0.9]{Referencing}



\bibliographystyle{elsarticle-harv}

\bibliography{sample_margin}

\end{frame}

}



\end{document}

Contents of the .bib file

@book{earnest2015,
  title={Wind Power Technology},
  author={Joshua Earnest},
  year={2015},
  publisher={PHI Learning}
}

@techreport{MRITS-Grant2014,
     title = {{Report in the Matter of Integration and Transmission Study for the Future Renewable Energy Standard}},
     author = {Grant},
     group = {Minnesota Department of Commerce},
     year = {2014},
     institution = {Minnesota Department of Commerce},
     month = {Nov},
     Date-Added = {2014},
     Date-Modified = {2014}
}

@ARTICLE{wu2017,
  title={{Assessing Impact of Renewable Energy Integration on System Strength Using Site-Dependent Short Circuit Ratio}},
  author={Wu, Di and Li, Gangan and Javadi, Milad and Malyscheff, Alexander M and Hong, Mingguo and Jiang, John Ning},
  journal={IEEE Transactions on Sustainable Energy},
  year={2017},
  publisher={IEEE}
}
2

Some starting point, but you'll have to make sure yourself, that you only use one \inmargin command per line.

\documentclass[aspectratio=169, xcolor={x11names}]{beamer}

\usecolortheme{crane}
\useoutertheme{miniframes}
\usefonttheme[onlylarge]{structurebold}
\useinnertheme{inmargin}

\newlength{\widthSideBar}
\setlength{\widthSideBar}{0.3\paperwidth}
\setbeamersize{sidebar width left=\widthSideBar, sidebar width right=0cm}

\usepackage{natbib}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{earnest2015,
  title={Wind Power Technology},
  author={Joshua Earnest},
  year={2015},
  publisher={PHI Learning}
}

@techreport{MRITS-Grant2014,
     title = {{Report in the Matter of Integration and Transmission Study for the Future Renewable Energy Standard}},
     author = {Grant},
     group = {Minnesota Department of Commerce},
     year = {2014},
     institution = {Minnesota Department of Commerce},
     month = {Nov},
     Date-Added = {2014},
     Date-Modified = {2014}
}

@ARTICLE{wu2017,
  title={{Assessing Impact of Renewable Energy Integration on System Strength Using Site-Dependent Short Circuit Ratio}},
  author={Wu, Di and Li, Gangan and Javadi, Milad and Malyscheff, Alexander M and Hong, Mingguo and Jiang, John Ning},
  journal={IEEE Transactions on Sustainable Energy},
  year={2017},
  publisher={IEEE}
}
\end{filecontents*}

\makeatletter
\newcommand{\inmargin}[1]{\beamer@putleft{\cite{#1}}{2.5ex}\vspace*{-\baselineskip}}
\makeatother


\begin{document}


\begin{frame}

    \inmargin{MRITS-Grant2014}Cite \textsuperscript{\color{SlateBlue2} 1,}\linebreak\inmargin{wu2017}Cite \textsuperscript{\color{SlateBlue2} 2,}


\end{frame}

\begin{frame}[allowframebreaks=0.9]{Referencing}
\bibliographystyle{elsarticle-harv}
\bibliography{\jobname}
\end{frame}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.