2

Using LyX, I am wondering whether it's possible not to have 'references' in the header/contents in a beamer presentation?

Ex:

#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass beamer
\begin_preamble
\usepackage{url}
%\usepackage{hyperref}
\usepackage{tabularx}
%\usepackage[super,sort&compress]{natbib}
\usetheme{Warsaw}
% for beamer version >= 3.5 only
%\setbeamertemplate{page number in head/foot}[totalframenumber]
\usepackage{dsfont}
%\usepackage[table]{xcolor}
%\usepackage{dcolumn}
\addtobeamertemplate{footline}{\insertframenumber/\inserttotalframenumber}
\end_preamble
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package auto
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures true
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine natbib
\cite_engine_type authoryear
\biblio_style plainnat
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 1
\use_minted 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 1
\paragraph_separation indent
\paragraph_indentation default
\is_math_indent 0
\math_numbering_side default
\quotes_style english
\dynamic_quotes 0
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Title (Plain Frame)
Template beamer
\end_layout

\begin_layout Frame
\begin_inset Argument 4
status open

\begin_layout Plain Layout

\end_layout

\end_inset


\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Standard
\begin_inset CommandInset citation
LatexCommand citet
key "king_matrix_2014"
literal "false"

\end_inset


\end_layout

\end_deeper
\begin_layout Standard
\begin_inset Separator plain
\end_inset


\end_layout

\begin_layout Frame
\begin_inset Argument 4
status open

\begin_layout Plain Layout

\end_layout

\end_inset


\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Standard
\begin_inset CommandInset bibtex
LatexCommand bibtex
btprint "btPrintCited"
bibfiles "C:/Users/a.fabre/Google Drive/Economie/Articles/Environment,C:/Users/a.fabre/Google Drive/Economie/Articles/test"
options "plainnatnourl_clean"

\end_inset


\end_layout

\end_deeper
\end_body
\end_document

The .tex exported from LyX:

%% LyX 2.3.0 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{beamer}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{1}
\usepackage[authoryear]{natbib}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
% this default might be overridden by plain title style
\newcommand\makebeamertitle{\frame{\maketitle}}%
% (ERT) argument for the TOC
\AtBeginDocument{%
  \let\origtableofcontents=\tableofcontents
  \def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}
  \def\gobbletableofcontents#1{\origtableofcontents}
}
% plain title style, override default
\renewcommand\makebeamertitle{\frame[plain]{\maketitle}}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{url}
%\usepackage{hyperref}
\usepackage{tabularx}
%\usepackage[super,sort&compress]{natbib}
\usetheme{Warsaw}
% for beamer version >= 3.5 only
%\setbeamertemplate{page number in head/foot}[totalframenumber]
\usepackage{dsfont}
%\usepackage[table]{xcolor}
%\usepackage{dcolumn}
\addtobeamertemplate{footline}{\insertframenumber/\inserttotalframenumber}
\renewcommand{\bibsection}{}

\makeatother

\usepackage{babel}
\begin{document}

\title{Template beamer}
\makebeamertitle
\begin{frame}{}

\citet{king_matrix_2014}
\end{frame}
%
\begin{frame}{}

\bibliographystyle{plainnatnourl_clean}
\bibliography{\string"C:/Users/a.fabre/Google Drive/Economie/Articles/Environment\string",\string"C:/Users/a.fabre/Google Drive/Economie/Articles/test\string"}
\end{frame}

\end{document}

EDIT: the first solution proposed works for the minimal example above, but not for my original file: https://pastebin.com/GxbY3XcZ

  • 1
    Hi, please edit your code to make it complete and compilable. – koleygr Oct 15 '18 at 12:53
  • 1
    Welcome to TeX.SE! It's not really clear what you mean by 'references'. However, the appearance of a Beamer presentation is largely determined by the theme (here: Warsaw), you can change that to get a different look (see, e.g., deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html). – Marijn Oct 15 '18 at 13:00
2

Normally the bibliography creates its own section. To disable this you can add \renewcommand{\bibsection}{} to your preamble (after loading the natbib and babel packages).

%% LyX 2.3.0 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{beamer}
\usepackage[libertine]{newtxmath}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{1}
\usepackage[authoryear]{natbib}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
% this default might be overridden by plain title style
\newcommand\makebeamertitle{\frame{\maketitle}}%
% (ERT) argument for the TOC
\AtBeginDocument{%
  \let\origtableofcontents=\tableofcontents
  \def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}
  \def\gobbletableofcontents#1{\origtableofcontents}
}
% plain title style, override default
\renewcommand\makebeamertitle{\frame[plain]{\maketitle}}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{url}
%\usepackage{hyperref}
%\usepackage{indentfirst}
\usepackage{tabularx}
%\usepackage[super,sort&compress]{natbib}
\usetheme{Warsaw}
\usepackage{dsfont}
%\usepackage[table]{xcolor}
%\usepackage{dcolumn}
\setbeamertemplate{page number in head/foot}[totalframenumber]

\makeatother

\usepackage{babel}
\renewcommand{\bibsection}{}
\begin{document}

\title{Bibliography not working}
\makebeamertitle


\begin{frame}{}
\citet{king_matrix_2014}
\end{frame}

\begin{frame}
\bibliographystyle{plainnat}
\bibliography{test}
\end{frame}

\end{document}

enter image description here

  • Hu, I get two 'references' in the header instead of one by adding this to the latex preambule in LyX. – bixiou Oct 15 '18 at 13:09
  • @bixiou Can you add the .tex file to the question that shows this problem? – user36296 Oct 15 '18 at 13:10
  • I have just done it. – bixiou Oct 15 '18 at 13:14
  • @bixiou Move it after babel like in my answer – user36296 Oct 15 '18 at 13:17
  • 1
    @bixiou Better Idea: I just tell the lyx users to use real tex instead of lyx :) – user36296 Oct 15 '18 at 13:32

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.