页面页眉、页脚的修饰:fancyhdr包;选择题的括号右对齐的方法:\hfill

这篇博客介绍了如何使用LaTeX的fancyhdr包来修饰页面页眉和页脚,以及如何通过命令`hfill`实现选择题括号的右对齐。内容包括设置页面边距、调整页面宽度以及展示verbatim环境在显示代码块中的应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考 页面页眉、页脚的修饰:fancyhdr包;选择题的括号右对齐的方法:\hfill - 云+社区 - 腾讯云

1、页面页眉、页脚的修饰:fancyhdr包
调整页面的宽度,以下命令在前
\usepackage{anysize}
\marginsize{2cm}{1.5cm}{1cm}{1cm}
随后,再设计fancyhdr包的其他命令,否则页面的宽度不能设置成功。
即使用命令
\setlength{\textwidth}{17cm}
也不能改变页面的宽度。

2、选择题的括号右对齐的方法:\hfill
目录页码右对齐的方法:\dotfill或\hrulefill
(*)显示命令的方法
引用包
\usepackage{verbatim}
用环境\begin{verbatim}…\end{verbatim}
示例:
\documentclass[11pt]{article}

\usepackage{verbatim}

\begin{document}
This document demonstrates the \verb=verbatim= environment
and \verb=\verbatiminput= command. It also demonstrates the
\verb=comment= environment, but you have to look at the TeX
source to see that (of course).
Here is a short piece of Maple code to demonstrate the
the \verb=verbatim= environment:
\begin{verbatim}
> eqn:=diff(y(t),t,t)+4*y(t)=0:
> inits:=y(0)=1,D(y)(0)=-1:
> dsolve({eqn,inits},y(t));
\end{verbatim}
$$
\mathrm{y}(t)= - \frac{1}{2}\,\sin(2\,t) + \cos(2\,t)
$$

Put a few paragraphs you have not decided about yet here for future
work. They will not appear in the output. You can also put comments
or reminders here. For example, you may want to remind yourself that
Maple has a nice LaTeX export feature which may be more convenient
than the by-hand approach used above.

To demonstrate the \verb=\verbatiminput= command this file will
input itself, which is pretty cool. To make sure
this file can find itself to input, we use the \verb=\jobname=
command in the argument to \verb=\verbatiminput=. Thus everything
will work even if you rename this file.
\end{document}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Wanderer001

ROIAlign原理

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值