LaTeX技巧一:如何在标题页面上创建背景图像?
2017-09-08 19:16
344 查看
eso-pic package和wallpaper package
我们先来看看eso-pic package。eso-pic package
首先,假设你有一个名为background.png。那么你可以在\begin{document}添加以下代码:
\usepackage{eso-pic} \newcommand\BackgroundPic{% \put(0,0){% \parbox[b][\paperheight]{\paperwidth}{% \vfill \centering \includegraphics[width=\paperwidth,height=\paperheight,% keepaspectratio]{background.png}% \vfill }}}
在
\begin{document}之后添加:
\AddToShipoutPicture*{\BackgroundPic}
其中
*将确保背景图片只会在一个页面上放置。
如果您想在多个页面上使用图片,请跳过
*:
\AddToShipoutPicture{\BackgroundPic}
然后使用此命令停止使用背景图片:
\ClearShipoutPicture
wallpaper package
首先在导言区导入\usepackage{wallpaper}
之后,您可以使用以下命令:
\ThisLRCornerWallPaper{0.5}{somerights.png} \LRCornerWallPaper{0.5}{somerights.png}
其中
LRCorner-command放置在页面右下角。
\ULCornerWallPaper对于其他角落有诸如此类的命令。
\CenterWallPaper以及
\TileWallPaper
用于对中或平铺图像。其中
this为仅在当前页面上放置图像的地方。数值参数
{0.5}将图像缩放为页面大小的0.5。
其中中心命令可选参数为
\ CenterWallPaper {scale} {filename}
有网友反应第一个包不能工作在某些情况下,可参考如下:
\usepackage{transparent} \usepackage{eso-pic} \newcommand\BackgroundPic{% \put(0,0){% \parbox[b][\paperheight]{\paperwidth}{% \vfill \centering {\transparent{0.4} \includegraphics[width=\paperwidth,height=\paperheight,% keepaspectratio]{background.png}}% \vfill }}}
Over!
相关文章推荐
- 如何在Web页面上直接打开、编辑、创建Office文档
- 如何在Web页面上直接打开、编辑、创建Office文档
- HTML--如何实现通过鼠标事件拖动页面图像(代码)
- LaTeX技巧572:如何给表格项添加注释?
- 微信小程序:如何创建一个小程序页面?
- [转]如何在Web页面上直接打开、编辑、创建Office文档
- 如何在Web页面上直接打开、编辑、创建Office文档
- PS教程:如何设计整洁的页面布局与漂亮的背景
- 浏览器兼容之旅第一站:如何在页面中创建IE条件注释
- 如何控制页面技巧----验证码的输入框和验证
- IOS 如何更改导航栏样式及状态栏字体颜色(导航栏背景、前景、标题及返回字体颜色)
- 菜鸡的Django学习笔记(二)如何创建第一个博客页面
- 如何在页面中动态创建控件
- 如何在Web页面上直接打开、编辑、创建Office文档
- ITEXT实例学习与研究(二) 之 创建一个细长的浅黄色背景的页面以及纵向页面与横向页面之间的切换
- LaTeX技巧203:如何实现等号对齐 [转]
- 【MasterPages实用技巧】为模板增加前端控制①——自动生成页面标题
- LaTeX技巧218:LaTeX如何正确输入引号:双引号“”单引号‘’
- Ecshop二次开发:如何创建一个自定义页面(一)
- 如何在Web页面上直接打开、编辑、创建Office文档