I want to show a thick line on the left and right borders, i found the similar quetion here Right border but just for right border, here is my MWE:
\documentclass{beamer}
\usetheme[secheader]{Madrid}
\author{diabonas}
\title{Frame border}
\setbeamertemplate{background canvas}{%
{\color{black}\hspace*{\dimexpr\paperwidth-3pt\relax}\rule{10pt}{\paperheight}}%
}
\begin{document}
\begin{frame}
content
\end{frame}
\frame{Content}
\begin{frame}
content
\end{frame}
\end{document}
답변1
TYou set the background to be first a space of length \paperwidth-3pt
and then a bar of 10pt
(of which only 3pt is visible). If you start with a bar of 3pt, then a space of length \paperwidth-6pt
and the ending bar, it should be what you want.
\documentclass{beamer}
\usetheme[secheader]{Madrid}
\author{diabonas}
\title{Frame border}
\setbeamertemplate{background canvas}{%
{\color{black}\rule{3pt}{\paperheight}\hspace*{\dimexpr\paperwidth-6pt\relax}\rule{10pt}{\paperheight}}%
}
\begin{document}
\begin{frame}
content
\end{frame}
\frame{Content}
\begin{frame}
content
\end{frame}
\end{document}
답변2
\documentclass{beamer}
% Based on: https://tex.stackexchange.com/questions/48800
\author{diabonas}
\title{Frame border}
\usepackage{tikz}
\begin{document}
{ % only on titlepage
\setbeamertemplate{background canvas}{%
\begin{tikzpicture}
\clip (0,0) rectangle (\paperwidth,\paperheight);
\fill[color=orange] (\paperwidth-10pt,0) rectangle (\paperwidth,\paperheight);
% Added
\fill[color=orange] (0,0) rectangle (10pt,\paperheight);
\end{tikzpicture}}
\maketitle
} % only on titlepage
\frame{Content}
\end{document}
Remove { % only on titlepage
and } % only on titlepage
and it's on every page.