# 【latex学习笔记】页面页眉、页脚的修饰：fancyhdr包；选择题的括号右对齐的方法:\hfill

2012-11-04 03:05 阅读 3,281 次 评论关闭

1、页面页眉、页脚的修饰：fancyhdr包

\usepackage{anysize}
\marginsize{2cm}{1.5cm}{1cm}{1cm}

\setlength{\textwidth}{17cm}

2、选择题的括号右对齐的方法:\hfill

（*）显示命令的方法

\usepackage{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}