Paper Video Cover
Generate a Gemini/SUSTech 16:10 cover from a paper directory. The generator
installs output only after LaTeX compilation and PNG conversion both succeed.
Package and setup
The installed uv project is:
<SKILLS_DIR>/paper-video-cover
It manages its Pillow dependency and includes both required themes:
<SKILLS_DIR>/paper-video-cover/templates/beamerthemegemini.sty
<SKILLS_DIR>/paper-video-cover/templates/beamercolorthemesustech.sty
LuaLaTeX and Poppler pdftoppm are external tools. Both must resolve before
generation. Each tool is resolved in order: explicit CLI flag, LUALATEX or
PDFTOPPM environment variable, then PATH. An invalid higher-priority override
is fatal and is not bypassed.
Run
uv run --project "<SKILLS_DIR>/paper-video-cover" `
"<SKILLS_DIR>/paper-video-cover/scripts/generate_poster.py" `
"<paper_dir>"
Default output is <paper_dir>/poster. Select another directory with:
uv run --project "<SKILLS_DIR>/paper-video-cover" `
"<SKILLS_DIR>/paper-video-cover/scripts/generate_poster.py" `
"<paper_dir>" --output-dir "<output_dir>"
Options:
--data <json>: optional JSON overrides.
--scheme <default|lab|bilibili>: SUSTech colour scheme (default default; 实验室调研 uses bilibili to match the lab-survey deck).
--title-font <points>: override the automatic title size.
--output-dir <directory>: final output directory.
--lualatex <path-or-command>: explicit LuaLaTeX executable.
--pdftoppm <path-or-command>: explicit pdftoppm executable.
PNG generation is mandatory; a successful output contains non-empty
poster.tex, poster.pdf, and poster.png, plus copied themes and converted
figures. The build occurs in a sibling temporary directory, so a failed build
does not replace an existing final output.
Lab survey poster generator (实验室调研, generate_lab_poster.py)
For 实验室调研 surveys use scripts/generate_lab_poster.py instead of the generic
path — it fills the repo poster template
(<TEMPLATE_DIR>/main_template_lab_poster.tex, source of truth;
fallback copy in templates/) with the DECK's 可视化分析 section-divider format:
full-bleed slides-beamer/figures/background.png (REQUIRED — fatal if missing;
if the deck lacks one, build it with
paper-group-to-beamer/scripts/gen_viz_background.py --survey-dir "<LAB_DIR>")
- FOUR white rounded shadow boxes (rows): 实验室调研+date pair / institute
block (brand-colour eyebrow + English line) / Prof. name / title_2+title_3 with
emph rule. NO metric row, NO blurb, NO lab-name line.
NOTE (2026-08-07 default change): the poster is the REQUIRED ARTIFACT for lab
dirs (the uploader fails closed without poster/poster.png), but the Bilibili
UPLOAD COVER defaults to the deck's FIRST SLIDE (video/cover.png) — do NOT
copy the poster over video/cover.png; keep the pipeline's slide-001 render.
See lab-survey-to-bilibili-runbook.
uv run --project "<SKILLS_DIR>/paper-video-cover" \
"<SKILLS_DIR>/paper-video-cover/scripts/generate_lab_poster.py" \
"<LAB_DIR>" --data "<LAB_DIR>/poster_data.json"
--data JSON: title_1_pi is REQUIRED (≤30 chars). Naming convention:
中文名 PI → xxx教授(如 李飞飞教授、刘华平教授); 非教授角色不加
Prof./教授(如 Sergey Levine 等联合创始人); 英文名教授 →
Prof. First Last(如 Prof. Yann LeCun).
title_1_uni optional (width budget 40 units, CJK glyph = 2 units, other =
1, e.g. 纽约大学 = 8, Physical Intelligence = 21; empty → line dropped),
title_1_uni_color optional (#RRGGBB — the institute's LOGO brand colour,
e.g. NYU 57068B, Stanford 8C1515, CMU C41230, Berkeley 003262,
Tsinghua 660874, SUSTech 2C5F7C, HKUST 003366; institutes without a
brand colour default to black 000000),
title_1_uni_en optional (≤40 chars, e.g. NEW YORK UNIVERSITY) — the title
block renders the university as an institute-brand-colour eyebrow (25pt
semibold in title_1_uni_color, 0.25em CJK tracking auto-inserted by the
generator, side dashes 80×3px at 50% of the brand colour), the English small
line (13pt #8A8F98), then the Prof. name (55pt pink bold, single line). title_2/title_3 optional (width budget 30 units each,
e.g. 从卷积网络到世界模型 = 18, IEEE Fellow 2026 = 15; empty parts drop
their line). date (optional, default today) fills the date block. Corpus
stats from papers.json are informational only — a missing file degrades with
a warning, never fails the run. NO lab-name line, NO blurb line, NO metric row,
and NO · separators. Example:
title_1_uni="纽约大学", title_1_uni_en="NEW YORK UNIVERSITY",
title_1_pi="Prof. Yann LeCun", title_2="从卷积网络到世界模型",
title_3="图灵奖得主的40年深度学习谱系". The upload title in
video_meta.json keeps the full {机构缩写} {PI姓名}教授:主题 — Hook format
independently. Poster layout (tikz rounded boxes with drop shadows over the
deck's 可视化分析 background): FOUR rows in a 0.6971\textwidth container,
absolutely centered on the page (fixed top 0.107\textheight / bottom
0.103\textheight offsets; stack ≈ 77% of the page): row 1 =
实验室调研 + 〈DATE〉 pair (0.3092\textwidth text width each, 32pt, height
0.1250\textheight); row 2 = institute block — NYU Purple eyebrow (25pt
semibold, side dashes) + English line 13pt (0.6706\textwidth, height
0.1250\textheight); row 3 = Prof. name block (55pt pink bold single line,
0.6706\textwidth, height 0.1806\textheight); row 4 = title_2/title_3 + rule
at 37pt (height 0.2153\textheight). Gaps: horizontal 0.0258\textwidth /
vertical 0.0417\textheight (60 px both ways in the 2324×1440 reference
canvas).
--scheme default bilibili
(deck-matching); --template/--theme-dir override the repo paths (deck
sustech-theme is copied into the build). Token contract (fatal if unreplaced
on code lines): 〈DATE〉〈TITLE1UNI〉〈TITLE1UNIEN〉〈TITLE1PI〉〈TITLE2〉〈TITLE3〉.
Compiles with xelatex (two passes; the deck theme is xelatex-only) and renders
poster.png at 300 dpi (32×20 cm page → ~3780×2363 px); output <LAB_DIR>/poster/.
Gotcha — spaces in large title text: TikZ nodes + \fontsize{72}{84} under
the sustech theme drop interword spaces (even \ ); the generator therefore
converts plain spaces in title_1/2/3 to \hspace{0.25em} glue (verified via
pdftotext: NYU Prof. Yann LeCun keeps its spaces).
Gotcha — row centering and block widths: (1) an \hbox to \containerwidth
is NOT a paragraph line and \centering will not center it — rows must be
\hbox to \textwidth{\hss … \hss} so the content centers inside the full line.
(2) tikz text width with a \dimexpr-based macro can raise Dimension too large on the 32 cm paper — use literal widths (e.g. 0.44\textwidth). (3) a
tikz node's outer width = text width + 2×inner sep — subtract the sep
padding from the width macros so box edges land exactly on the container.
Gotcha — full-bleed background: the poster geometry MUST be
\geometry{papersize={32cm,20cm},margin=0cm}. Any positive margin offsets
beamer's background-canvas origin to the text-area top, producing a white strip
across the top (~1.1 cm for margin=1.1cm) and clipping the background image's
top edge. Verify after every poster build: top/bottom 3% rows of poster.png
must have ~0 white pixels (PIL scan).
Lab survey posters (实验室调研)
Chinese titles are supported (the generated preamble loads ctex; the beamer
title fallback no longer strips CJK). The poster title follows the upload-title
format {机构缩写} {PI姓名}教授:主题 — Hook (e.g.
NYU 杨立昆教授:从卷积网络到世界模型 — 图灵奖得主的40年深度学习谱系 /
清华刘华平教授:机器人具身智能 — 从视触觉到操作学习). Run with
--scheme bilibili and a --data JSON:
{
"title_1_uni": "纽约大学",
"title_1_uni_en": "NEW YORK UNIVERSITY",
"title_1_uni_color": "57068B",
"title_1_pi": "Prof. Yann LeCun",
"title_2": "从卷积网络到世界模型",
"title_3": "图灵奖得主的40年深度学习谱系",
"date": "2026-08-06"
}
The palette source of truth is <TEMPLATE_DIR>/sustech-theme/beamercolorthemesustech.sty
(default blue / lab red / bilibili pink); the deck theme is copied into the
build and the frame compiles under xelatex (the deck's engine). The background
slides-beamer/figures/background.png must exist (the deck's 可视化分析 divider
background) — the generator fails closed without it.
Example with explicit tools:
uv run --project "<SKILLS_DIR>/paper-video-cover" `
"<SKILLS_DIR>/paper-video-cover/scripts/generate_poster.py" `
"<paper_dir>" `
--lualatex "C:/path/to/lualatex.exe" `
--pdftoppm "C:/path/to/pdftoppm.exe"
Example with environment configuration:
$env:LUALATEX = "C:/path/to/lualatex.exe"
$env:PDFTOPPM = "C:/path/to/pdftoppm.exe"
uv run --project "<SKILLS_DIR>/paper-video-cover" `
"<SKILLS_DIR>/paper-video-cover/scripts/generate_poster.py" `
"<paper_dir>"
Inputs
The generator extracts title, venue, project URL, figures, and metrics from the
first MinerU markdown file under md_output/*/auto/. If caption-based extraction
finds no figures, it searches slides-beamer/figures/, paper-source/image/,
source/image/, Figures/, then md_output/*/auto/images/.
PNG, JPEG, and PDF sources are supported. PDFs use the resolved pdftoppm.
Missing, unsupported, empty, or unconvertible referenced figures are fatal.
All JSON fields are optional. figure_map paths are absolute or relative to the
paper directory:
{
"title": "Override Title",
"venue": "CVPR 2025",
"title_font": 220,
"cards_col1": [],
"cards_col2": [],
"figures": {"col1": ["fig1"], "col2": ["fig2"]},
"figure_map": {
"fig1": "md_output/1234.5678/auto/images/figure-1.png"
}
}
Batch
Use a UTF-8 file with one paper directory per line; start and count are
optional positional arguments:
uv run --project "<SKILLS_DIR>/paper-video-cover" `
"<SKILLS_DIR>/paper-video-cover/scripts/batch_generate.py" `
"<papers_file>" 0 20
The batch uses the uv-selected interpreter, requires all three artifacts for each
paper, and returns nonzero if any item fails.
Failure behavior
The generator returns nonzero if a required executable or packaged theme is
missing, a child command returns nonzero, or a required artifact is missing or
empty. Treat any nonzero result as no publication; the failed temporary build is
removed and the previous final output remains unchanged.
Related skills
- skill://lab-survey-to-bilibili-runbook
- skill://paper-group-to-beamer
- skill://lab-poster-deck-format
- skill://paper-bilibili-uploader
- skill://paper-lab-survey-to-bilibili
- skill://paper-to-bilibili
Ver el texto completo de la licencia (Apache-2.0)
Copyright (c) 2026 杨昊波 (Haobo Yang)
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the
copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other
entities that control, are controlled by, or are under common control with
that entity. For the purposes of this definition, "control" means (i) the
power, direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
(50%) or more of the outstanding shares, or (iii) beneficial ownership of
such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.
"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled
object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form,
made available under the License, as indicated by a copyright notice that is
included in or attached to the work (an example is provided in the Appendix
below).
"Derivative Works" shall mean any work, whether in Source or Object form,
that is based on (or derived from) the Work and for which the editorial
revisions, annotations, elaborations, or other modifications represent, as a
whole, an original work of authorship. For the purposes of this License,
Derivative Works shall not include works that remain separable from, or
merely link (or bind by name) to the interfaces of, the Work and Derivative
Works thereof.
"Contribution" shall mean any work of authorship, including the original
version of the Work and any modifications or additions to that Work or
Derivative Works thereof, that is intentionally submitted to Licensor for
inclusion in the Work by the copyright owner or by an individual or Legal
Entity authorized to submit on behalf of the copyright owner. For the
purposes of this definition, "submitted" means any form of electronic,
verbal, or written communication sent to the Licensor or its representatives,
including but not limited to communication on electronic mailing lists,
source code control systems, and issue tracking systems that are managed by,
or on behalf of, the Licensor for the purpose of discussing and improving the
Work, but excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on
behalf of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this
License, each Contributor hereby grants to You a perpetual, worldwide,
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
reproduce, prepare Derivative Works of, publicly display, publicly perform,
sublicense, and distribute the Work and such Derivative Works in Source or
Object form.
3. Grant of Patent License. Subject to the terms and conditions of this
License, each Contributor hereby grants to You a perpetual, worldwide,
non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
section) patent license to make, have made, use, offer to sell, sell, import,
and otherwise transfer the Work, where such license applies only to those
patent claims licensable by such Contributor that are necessarily infringed
by their Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You institute
patent litigation against any entity (including a cross-claim or counterclaim
in a lawsuit) alleging that the Work or a Contribution incorporated within
the Work constitutes direct or contributory patent infringement, then any
patent licenses granted to You under this License for that Work shall
terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or
Derivative Works thereof in any medium, with or without modifications, and in
Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a
copy of this License; and
(b) You must cause any modified files to carry prominent notices stating
that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You
distribute, all copyright, patent, trademark, and attribution notices from
the Source form of the Work, excluding those notices that do not pertain to
any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution,
then any Derivative Works that You distribute must include a readable copy
of the attribution notices contained within such NOTICE file, excluding
those notices that do not pertain to any part of the Derivative Works, in at
least one of the following places: within a NOTICE text file distributed as
part of the Derivative Works; within the Source form or documentation, if
provided along with the Derivative Works; or, within a display generated by
the Derivative Works, if and wherever such third-party notices normally
appear. The contents of the NOTICE file are for informational purposes only
and do not modify the License. You may add Your own attribution notices
within Derivative Works that You distribute, alongside or as an addendum to
the NOTICE text from the Work, provided that such additional attribution
notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may
provide additional or different license terms and conditions for use,
reproduction, or distribution of Your modifications, or for any such
Derivative Works as a whole, provided Your use, reproduction, and
distribution of the Work otherwise complies with the conditions stated in
this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any
Contribution intentionally submitted for inclusion in the Work by You to the
Licensor shall be under the terms and conditions of this License, without any
additional terms or conditions. Notwithstanding the above, nothing herein
shall supersede or modify the terms of any separate license agreement you may
have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names,
trademarks, service marks, or product names of the Licensor, except as
required for reasonable and customary use in describing the origin of the
Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
writing, Licensor provides the Work (and each Contributor provides its
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied, including, without limitation, any
warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining
the appropriateness of using or redistributing the Work and assume any risks
associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in
tort (including negligence), contract, or otherwise, unless required by
applicable law (such as deliberate and grossly negligent acts) or agreed to
in writing, shall any Contributor be liable to You for damages, including any
direct, indirect, special, incidental, or consequential damages of any
character arising as a result of this License or out of the use or inability
to use the Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all other
commercial damages or losses), even if such Contributor has been advised of
the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work
or Derivative Works thereof, You may choose to offer, and charge a fee for,
acceptance of support, warranty, indemnity, or other liability obligations
and/or rights consistent with this License. However, in accepting such
obligations, You may act only on Your own behalf and on Your sole
responsibility, not on behalf of any other Contributor, and only if You agree
to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "[]" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification
within third-party archives.
Copyright [yyyy] [name of copyright owner]
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 License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SUPPLEMENTARY PERMISSION — Additional permission (not part of the Apache License 2.0 text above)
论文分享场合补充许可:在论文分享、组会汇报、课堂展示、个人学习等**非分发**场合
(不对外发布、传播或进行商业分发)使用本软件,免于 Apache-2.0 第 4 条关于保留
版权声明与许可文本的义务,可自由使用、修改。分发行为(含公开传播)仍按上述
Apache License 2.0 条款执行。
Paper-sharing supplementary permission: use of this software in non-distribution
contexts (internal group meetings, classroom presentation, personal study — no
public release or commercial distribution) is exempt from the Apache-2.0
Section 4 obligations to retain copyright notices and license text. Distribution
(including public dissemination) remains governed by the Apache License 2.0 above.