惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
罗磊的独立博客
SecWiki News
SecWiki News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
IT之家
IT之家
博客园 - 聂微东
T
The Exploit Database - CXSecurity.com
Recorded Future
Recorded Future
大猫的无限游戏
大猫的无限游戏
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Vercel News
Vercel News
G
GRAHAM CLULEY
D
DataBreaches.Net
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
SegmentFault 最新的问题
博客园_首页
雷峰网
雷峰网
T
Tenable Blog
Spread Privacy
Spread Privacy
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
Cisco Talos Blog
Cisco Talos Blog
V
Visual Studio Blog
J
Java Code Geeks
博客园 - Franky
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes
T
Threatpost
Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
Recent Announcements
Recent Announcements
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
U
Unit 42
M
MIT News - Artificial intelligence
Y
Y Combinator Blog
K
Kaspersky official blog
有赞技术团队
有赞技术团队
B
Blog
腾讯CDC

智朋的个人博客

Anki 笔记读取器 使用 PyQt 制作简易软件简明笔记 制作 Anki 插件简明笔记 残余应力 文件树目录 Excel 操作指南 Word 操作指南 Mermaid 甘特图 QHUMaster 使用指南 QHUMaster 使用指南
LaTeX 图片背景 eso-pic 宏包
coffeelize · 2024-06-21 · via 智朋的个人博客

参考资料

用法

  • \AddToShipoutPictureBG:为每一页添加背景
  • \AddToShipoutPictureBG*:仅为当前页面添加背景
  • \AddToShipoutPictureFG:类似于 BG,但只作用于文档内容部分

一些预定于好的位置命令

  • AtPageUpperLeft
  • AtPageLowerLeft
  • AtPageCenter
  • AtTextUpperLeft
  • AtTextLowerLeft
  • AtTextCenter
  • AtStockUpperLeft
  • AtStockLowerLeft
  • AtStockCenter

案例分析

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
\documentclass{ctexart}
\usepackage{graphicx}
\usepackage{zhlipsum}
\usepackage{eso-pic}
\begin{document}
\zhlipsum[1-3]
\clearpage
\AddToShipoutPictureBG{
\includegraphics[width=\paperwidth,height=\paperheight]{example-image-duck}
}
\clearpage
\zhlipsum[1]
\clearpage
\zhlipsum[1]
\section{第一部分}

\end{document}

插入长宽和当前页面长宽一致的鸭子的背景图片

image.png

如果我们有比较好的背景图片,比如四角带有阴影的 png 图片或者设计好的图片,那么使用该宏包还是挺有效果的

部分说明

1
width=\paperwidth,height=\paperheight

表示图片的长宽和页面的长宽一致,将图片强制拉伸至页面长宽

1
2
3
example-image-duck
example-image-a
example-grid-100x100bp

这几个图片名称经常用于插入示范图片,分别代表 鸭子字母A长宽为10个单元格的网格表

注意使用 graphics 宏包(正常应为 graphicx 宏包)插入 includegraphics 命令时 texstudio 不会出现红色背景提示,但是编译出来老是报错 \end{document}

image.png