\documentclass[xcolor=svgnames, aspectratio=169]{beamer} \usepackage{ctex}[space, noindent] \usetheme{Warsaw} \useoutertheme[width=.15\paperwidth]{sidebar} \title{版面居中} \usepackage{lmodern} \institute{大学} \author{****} \date{2020年02月02日} \begin{document} \begin{frame}[plain] {} 内容版面居中 \titlepage \end{frame} %%%%%%%%% \begin{frame}[plain] {} \begin{center} 致谢页:内容版面居中 \end{center} \end{frame} \end{document}

1 回答1

1
```tex \documentclass[xcolor=svgnames, aspectratio=169]{ctexbeamer} \usetheme{Warsaw} \useoutertheme[width=.15\paperwidth]{sidebar} \usepackage{lmodern} \title{版面居中} \date{2020年02月02日} \usepackage{xifthen} \usepackage{multido} % copied from https://tex.stackexchange.com/a/423246 \newcommand{\foo}[1]{% \multido{\i=1+1}{#1}{% \i~Foo }% } \makeatletter \newenvironment{myplainframe}[1][]{% \ifthenelse{\isnamedefined{beamer@sidebarwidth}}{% % Customize frametitle (changes from \defbeamertemplate*{frametitle}{sidebar % theme} in `beamerouterthemesidebar.sty' flagged with `% <- !') \setbeamertemplate{frametitle} {% \nointerlineskip% \ifbeamer@plainframe% \hbox{\usebeamercolor[bg]{frametitle}% \@tempdima\paperwidth%\advance\@tempdima-\beamer@sidebarwidth % <- ! \hskip-\beamer@leftmargin\vrule height\beamer@headheight width\@tempdima\hskip-\beamer@rightmargin}% \nointerlineskip% \fi% \vskip-\beamer@headheight% \vbox to \beamer@headheight{% \vfil \leftskip=-\beamer@leftmargin% \advance\leftskip by0.3cm% \rightskip=-\beamer@rightmargin% \advance\rightskip by0.3cm plus1fil% {\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\par}% {\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle\par}% \vbox{}% \vskip-1em% \vfil }% }% \setbeamertemplate{background canvas} {% \ifbeamercolorempty[bg]{background canvas}{}{\color{bg}\vrule width\dimexpr\paperwidth+\beamer@leftsidebar\relax height\paperheight}% } % Customize the geometry (changes from options of geometry package in % `beamer.cls' flagged with `% <- !') \hoffset=-\beamer@leftsidebar \advance\textwidth\beamer@sidebarwidth \hsize\textwidth \columnwidth\textwidth }{% }% % \begin{frame}[plain,#1]% }{% \end{frame}% } \makeatother \begin{document} \begin{frame}[plain]{} 内容版面居中 \titlepage \end{frame} \begin{myplainframe} \centering 致谢页:内容版面居中 \end{myplainframe} \end{document} ``` ![](https://pics.latexstudio.net/data/images/202002/372e7e28f365e11.png)

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。