发布时间: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/
常见数学公式问题集下载
看图说话:
版面说明,把页眉放在框内部,文本整体内容放在框内部。
用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.
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.
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.
\$+\$ will put a $+$ into a document.
\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.
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.
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.
\$+\$ will put a $+$ into a document.
\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.
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.
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.
\$+\$ will put a $+$ into a document.
\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.
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.
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.
\$+\$ will put a $+$ into a document.
\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}
发表评论 取消回复