Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: poster headline and footer #169

Merged
merged 9 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
format(
env.MESSAGE,
steps.contrib_name.outputs.content,
github.event.push.commits[0].author[0],
github.actor,
join(fromJSON(steps.contrib_png.outputs.markdown_urls), ' ')
)
}}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ int main(){
* 之后通过 `latexmk -xelatex main.tex` 命令进行编译即可。
* VSCode 用户可以使用 LaTeX Workshop 中的 “Recipe: latexmk (latexmkrc)” 进行编译。

目前模版最新的稳定版是 v3.0.0。您可以在 [发布页](https://github.com/sjtug/SJTUBeamer/releases) 查看修改日志和更多资料。通常来说,SJTUBeamer 的一个稳定版本包括如下内容:
目前模版最新的稳定版是 v3.1.0。您可以在 [发布页](https://github.com/sjtug/SJTUBeamer/releases) 查看修改日志和更多资料。通常来说,SJTUBeamer 的一个稳定版本包括如下内容:

* `sjtubeamerquickstart.pdf`:SJTUBeamer 快速入门,另见对应 [源代码](https://github.com/sjtug/SJTUBeamer/blob/main/src/doc/sjtubeamerquickstart.tex)。
* `sjtubeamer.pdf`: **强烈推荐在使用前阅读一遍 👍👍👍** SJTUBeamer 用户文档。
Expand Down
2 changes: 1 addition & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Edit `main.tex` and start to use.
* Run `latexmk -xelatex main.tex` to compile
* VSCode LaTeX Workshop: use “Recipe: latexmk (latexmkrc)” to compile

The current stable version is v3.0.0。You could visit [the release page](https://github.com/sjtug/SJTUBeamer/releases) for the changelog and more details. Generally speaking, a release of SJTUBeamer has the following content:
The current stable version is v3.1.0。You could visit [the release page](https://github.com/sjtug/SJTUBeamer/releases) for the changelog and more details. Generally speaking, a release of SJTUBeamer has the following content:

* `sjtubeamerquickstart.pdf`:SJTUBeamer Quick Start. You could also read the [source code](https://github.com/sjtug/SJTUBeamer/blob/main/src/doc/sjtubeamerquickstart.tex) of the document.
* `sjtubeamer.pdf`: SJTUBeamer User Guide.
Expand Down
4 changes: 2 additions & 2 deletions beamercolorthemesjtubeamer.sty

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions beamerfontthemesjtubeamer.sty

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions beamerinnerthemesjtubeamer.sty

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions beamerouterthemesjtubeamer.sty

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions beamerthemesjtubeamer.sty

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion contrib/poster/poster.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
\addbibresource{\getcontribpath{poster}{ref.bib}}
\usepackage{zhlipsum}
\begin{document}
\title{poster 子主题}
% 当标题较长时,可以使用 \\ 换行。
\title{poster 子主题\\使用说明}
\author{作者}
\logo{\zhlogo}
\institute[Test Institute]{测试机构}
Expand Down
45 changes: 28 additions & 17 deletions contrib/poster/sjtubeamerthemeposter.ltx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% ------------------------------------------------------------------------
%% Copyright (C) 2022 LogCreative <[email protected]>
%% Copyright (C) 2022-2024 LogCreative <[email protected]>
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
Expand All @@ -24,6 +24,8 @@
% 设置 headline 颜色跟随亮色/暗色
\setbeamercolor{headline}{parent=palette primary}
\AtBeginDocument{
\newsavebox{\maintitle} % 标题盒子变量
\newlength{\titlebottom} % 标题盒子的高度
% 修改 headline,需要在文档起始处覆盖,防止 default 的行为
\setbeamertemplate{headline}{
\begin{beamercolorbox}[wd=\paperwidth,sep=0.02\paperwidth]{headline}
Expand All @@ -40,17 +42,20 @@
\fi%
\fi%
\end{column}
\savebox{\maintitle}{%
\begin{column}{0.5\textwidth}
\vfill
\centering
\usebeamercolor{title in headline}{%
\color{fg}\textbf{\LARGE{\inserttitle}}\vskip2.5ex
\color{fg}\textbf{\LARGE{\inserttitle}}\vskip2.5ex%
}
\usebeamercolor{author in headline}{%
\color{fg}\large{\insertauthor}
\color{fg}\large{\insertauthor}%
}
\vfill
\end{column}
}
\usebox{\maintitle}
\begin{column}{0.25\textwidth}
\if\EqualOption{poster}{sepinst}{true}
\hfill
Expand All @@ -60,22 +65,23 @@
\resizebox{!}{4cm}{\vphantom{-}\secondaryinstlogo[\insertshortinstitute]{\insertinstitute}{}}
\fi
\hspace*{0.03\paperwidth}
\else
\begin{tikzpicture}[overlay]
\if\EqualOption{poster}{landscape}{true}
\def\stampheight{0.05}
\def\stampsize{60pt}
\else
\def\stampheight{0.03}
\def\stampsize{50pt}
\fi
\usebeamercolor{palette primary}
\stamparray{\stampsize}{(-0.05\paperwidth,-\stampheight\paperheight)}{(\paperwidth,\stampheight\paperheight)}
\fill[bg, path fading=fade right] (-0.05\paperwidth, -\stampheight\paperheight) rectangle (\paperwidth, \stampheight\paperheight);
\end{tikzpicture}
\fi
\end{column}
\end{columns}
\if\EqualOption{poster}{sepinst}{true}\else
\begin{tikzpicture}[overlay, remember picture]
\def\stampsize{60pt}
\if\EqualOption{poster}{landscape}{true}
\def\stampheight{0.08}
\else
\def\stampheight{0.05}
\fi
\usebeamercolor{palette primary}
\setlength{\titlebottom}{\dimexpr\ht\maintitle-0.02\paperwidth\relax}
\stamparray{\stampsize}{(0.75\paperwidth,0.2\paperwidth)}{(\paperwidth,\titlebottom)}
\fill[bg, path fading=fade right] (0.75\paperwidth,0.2\paperwidth) rectangle (1.35\paperwidth, \titlebottom);
\end{tikzpicture}
\fi
\end{beamercolorbox}
}
}
Expand All @@ -90,7 +96,12 @@
% 底栏为空时不会出现
\setbeamercolor{footline}{parent=palette primary}
\setbeamertemplate{footline}{%
\resizebox{\paperwidth}{!}{\sjtugate[cprimary]}\vskip-6cm\par
\resizebox{\paperwidth}{!}{\sjtugate[cprimary]}%
\if\EqualOption{poster}{landscape}{true}%
\vskip-12cm%
\else%
\vskip-6cm%
\fi\par
\posterfootlinetrue
\ifx\posterleftfootline\relax
\ifx\posterrightfootline\relax
Expand Down
2 changes: 1 addition & 1 deletion sjtucover.sty

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sjtuvi.sty

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 11 additions & 15 deletions src/MANIFEST.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/doc/sjtubeamer.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% ------------------------------------------------------------------------
%% Copyright (C) 2021-2023 SJTUG
%% Copyright (C) 2021-2024 SJTUG
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
%% limitations under the License.
%% ------------------------------------------------------------------------

\ProvidesFile{sjtubeamer.tex}[2023/11/25 v3.0.1 User Manual for sjtubeamer (Chinese)]
\ProvidesFile{sjtubeamer.tex}[2024/10/21 3.1.0 User Manual for sjtubeamer (Chinese)]
\documentclass[
UTF8,
heading=true,
Expand Down
6 changes: 3 additions & 3 deletions src/doc/sjtubeamerdevguide.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% ------------------------------------------------------------------------
%% Copyright (C) 2021-2023 SJTUG
%% Copyright (C) 2021-2024 SJTUG
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
%% limitations under the License.
%% ------------------------------------------------------------------------

\ProvidesFile{sjtubeamerdevguide.tex}[2023/11/25 v3.0.1 Development Guide for sjtubeamer (English)]
\ProvidesFile{sjtubeamerdevguide.tex}[2024/10/21 3.1.0 Development Guide for sjtubeamer (English)]
\documentclass{ltxdoc}
\usepackage[scheme=plain]{ctex}
\usepackage[style=ieee]{biblatex}
Expand Down Expand Up @@ -1327,7 +1327,7 @@ \section{Implementation}
\begin{quotation}
\scriptsize

Copyright (C) 2021-2023 SJTUG
Copyright (C) 2021-2024 SJTUG

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
Expand Down
4 changes: 2 additions & 2 deletions src/doc/sjtubeamerquickstart.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% !TeX encoding = UTF-8

%% ------------------------------------------------------------------------
%% Copyright (C) 2021-2023 SJTUG
%% Copyright (C) 2021-2024 SJTUG
%%
%% SJTUBeamer 快速入门
%%
Expand All @@ -14,7 +14,7 @@
%% -----------------------------------------------------------------------

% 本行为文件元数据,可省略。
\ProvidesFile{sjtubeamerquickstart.tex}[2023/11/25 v3.0.1 Quick Start for sjtubeamer (Chinese)]
\ProvidesFile{sjtubeamerquickstart.tex}[2024/10/21 3.1.0 Quick Start for sjtubeamer (Chinese)]

% 加载 ctexbeamer 文档类【第一部分】
% 如遇无法显示的数学符号,尝试对 ctexbeamer 文档类添加 no-math 选项;
Expand Down
4 changes: 2 additions & 2 deletions src/source/beamercolorthemesjtubeamer.dtx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% \iffalse meta-comment --------------------------------------------------
% Copyright (C) 2021-2023 SJTUG
% Copyright (C) 2021-2024 SJTUG
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamercolorthemesjtubeamer}[2023/11/25 v3.0.1 sjtubeamer color theme]
\ProvidesPackage{beamercolorthemesjtubeamer}[2024/10/21 3.1.0 sjtubeamer color theme]
%</package>
% \fi
% \CheckSum{0}
Expand Down
4 changes: 2 additions & 2 deletions src/source/beamerfontthemesjtubeamer.dtx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% \iffalse meta-comment --------------------------------------------------
% Copyright (C) 2021-2023 SJTUG
% Copyright (C) 2021-2024 SJTUG
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerfontthemesjtubeamer}[2023/11/25 v3.0.1 sjtubeamer font theme]
\ProvidesPackage{beamerfontthemesjtubeamer}[2024/10/21 3.1.0 sjtubeamer font theme]
%</package>
% \fi
% \CheckSum{0}
Expand Down
4 changes: 2 additions & 2 deletions src/source/beamerinnerthemesjtubeamer.dtx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% \iffalse meta-comment --------------------------------------------------
% Copyright (C) 2021-2023 SJTUG
% Copyright (C) 2021-2024 SJTUG
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerinnerthemesjtubeamer}[2023/11/25 v3.0.1 sjtubeamer inner theme]
\ProvidesPackage{beamerinnerthemesjtubeamer}[2024/10/21 3.1.0 sjtubeamer inner theme]
%</package>
% \fi
% \CheckSum{0}
Expand Down
4 changes: 2 additions & 2 deletions src/source/beamerouterthemesjtubeamer.dtx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% \iffalse meta-comment --------------------------------------------------
% Copyright (C) 2021-2023 SJTUG
% Copyright (C) 2021-2024 SJTUG
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerouterthemesjtubeamer}[2023/11/25 v3.0.1 sjtubeamer outer theme]
\ProvidesPackage{beamerouterthemesjtubeamer}[2024/10/21 3.1.0 sjtubeamer outer theme]
%</package>
% \fi
% \CheckSum{0}
Expand Down
Loading
Loading