发布时间:2012-10-24 14:39:56
文章类别:小技巧
原文地址:http://blog.sina.com.cn/s/blog_5e16f1770102f9vw.html

QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载

看图说话:

image

版面说明,把页眉放在框内部,文本整体内容放在框内部。

用fancyheadings包来实现的代码如下:

\documentclass[12pt]{article}
\usepackage{fancyheadings}
\newlength{\gnat}
\setlength{\gnat}{\textheight}
\addtolength{\gnat}{+5\baselineskip}
\newlength{\gwen}
\setlength{\gwen}{\textwidth}
\addtolength{\gwen}{+.15\textwidth}
\pagestyle{fancy}
\lhead{\hspace*{- .10\textwidth}
\fbox{\rule[-\gnat]{0 pt}{0 pt}\hspace*{\gwen}}}
\chead{\raisebox{-.1 in}{\bfseries An Introduction to Simulation}}
\cfoot{\thepage}
\rfoot{}
\lfoot{}
\newcommand{\bs}{\ensuremath{\backslash}}
\begin{document}
\section{\LaTeX\ Characters}
Watch out for the characters:
\&, \#, \$, \%, \_, \^{ }, \~{ }, \{, and \}.
These are special reserved characters in \LaTeX. If you want
to use one of these characters in a document, you will need
to put a \bs{ } in front of them. For example: \bs \$ will put a
\$ into a document. Additionally, you need to put \{\ \}
after \^{ } and \~{ } or these characters get squeezed too much
by the characters around them like this \verb+\~{}+.

The other special characters are:
$+, =, |, <, >$ and \bs.
These special characters are only available in math mode so
you have to put \$'s around them in order to use them. For example:
\$+\$ will put a $+$ into a document. Additionally, since the
\bs{ } is also the symbol for a reserved character, if you actually
want to use a \bs{ } character in a document- besides just being in math
mode you will also need to add the word backslash after the \bs.
This ends up looking like this in a document:
\verb+$\backslash$+ which is a lot of work just to get a \bs.
You're actually encouraged in \LaTeX\ to use the \verb+\newcommand+ command
to make an alias for a group of \LaTeX\ commands that you often use
and that's what people often do for a \bs. For instance, you could
enter in the preamble:
\verb+\newcommand{\bs}{\ensuremath{\backslash}}+
to use \verb+\bs+ for backslash in your document.

Watch out for the characters:
\&, \#, \$, \%, \_, \^{ }, \~{ }, \{, and \}.
These are special reserved characters in \LaTeX. If you want
to use one of these characters in a document, you will need
to put a \bs{ } in front of them. For example: \bs \$ will put a
\$ into a document. Additionally, you need to put \{\ \}
after \^{ } and \~{ } or these characters get squeezed too much
by the characters around them like this \verb+\~{}+.

The other special characters are:
$+, =, |, <, >$ and \bs.
These special characters are only available in math mode so
you have to put \$'s around them in order to use them. For example:
\$+\$ will put a $+$ into a document. Additionally, since the
\bs{ } is also the symbol for a reserved character, if you actually
want to use a \bs{ } character in a document- besides just being in math
mode you will also need to add the word backslash after the \bs.
This ends up looking like this in a document:
\verb+$\backslash$+ which is a lot of work just to get a \bs.
You're actually encouraged in \LaTeX\ to use the \verb+\newcommand+ command
to make an alias for a group of \LaTeX\ commands that you often use
and that's what people often do for a \bs. For instance, you could
enter in the preamble:
\verb+\newcommand{\bs}{\ensuremath{\backslash}}+
to use \verb+\bs+ for backslash in your document.

\section{More of the Same on \LaTeX\ Characters}

Watch out for the characters:
\&, \#, \$, \%, \_, \^{ }, \~{ }, \{, and \}.
These are special reserved characters in \LaTeX. If you want
to use one of these characters in a document, you will need
to put a \bs{ } in front of them. For example: \bs \$ will put a
\$ into a document. Additionally, you need to put \{\ \}
after \^{ } and \~{ } or these characters get squeezed too much
by the characters around them like this \verb+\~{}+.

The other special characters are:
$+, =, |, <, >$ and \bs.
These special characters are only available in math mode so
you have to put \$'s around them in order to use them. For example:
\$+\$ will put a $+$ into a document. Additionally, since the
\bs{ } is also the symbol for a reserved character, if you actually
want to use a \bs{ } character in a document- besides just being in math
mode you will also need to add the word backslash after the \bs.
This ends up looking like this in a document:
\verb+$\backslash$+ which is a lot of work just to get a \bs.
You're actually encouraged in \LaTeX\ to use the \verb+\newcommand+ command
to make an alias for a group of \LaTeX\ commands that you often use
and that's what people often do for a \bs. For instance, you could
enter in the preamble:
\verb+\newcommand{\bs}{\ensuremath{\backslash}}+
to use \verb+\bs+ for backslash in your document.

Watch out for the characters:
\&, \#, \$, \%, \_, \^{ }, \~{ }, \{, and \}.
These are special reserved characters in \LaTeX. If you want
to use one of these characters in a document, you will need
to put a \bs{ } in front of them. For example: \bs \$ will put a
\$ into a document. Additionally, you need to put \{\ \}
after \^{ } and \~{ } or these characters get squeezed too much
by the characters around them like this \verb+\~{}+.

The other special characters are:
$+, =, |, <, >$ and \bs.
These special characters are only available in math mode so
you have to put \$'s around them in order to use them. For example:
\$+\$ will put a $+$ into a document. Additionally, since the
\bs{ } is also the symbol for a reserved character, if you actually
want to use a \bs{ } character in a document- besides just being in math
mode you will also need to add the word backslash after the \bs.
This ends up looking like this in a document:
\verb+$\backslash$+ which is a lot of work just to get a \bs.
You're actually encouraged in \LaTeX\ to use the \verb+\newcommand+ command
to make an alias for a group of \LaTeX\ commands that you often use
and that's what people often do for a \bs. For instance, you could
enter in the preamble:
\verb+\newcommand{\bs}{\ensuremath{\backslash}}+
to use \verb+\bs+ for backslash in your document.

\end{document}


点赞(0)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部