由买买提看人间百态

topics

全部话题 - 话题: usepackage
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
T*******n
发帖数: 493
1
来自主题: TeX版 - 怎么控制表格里行的高度?
Is this what you want? The "m" type columns center text vertically, but
since it allows multiple lines of text, you need to set the column width.
Remove the >{\centering} if you want double-flushed text, or change to
>{\raggedright} for left justification only.
\documentclass{article}
\usepackage{array}
\begin{document}
\begin{tabular}{|>{\centering}m{72pt}|m{72pt}|}
\hline
The long text that is in the first column. &
Second column. \\
\hline
\end{tabular}
\end{document}
T*******n
发帖数: 493
2
来自主题: TeX版 - 怎么控制表格里行的高度?
Also try
\usepackage{array}
\setlength{\extrarowheight}{3pt}
but this will only add space to the top, which I don't think is what you want.
T*******e
发帖数: 47
3
from my experience, the built-in verbatim environment from Latex has
all kinds of strange problems. I always include \usepackage{verbatim}
before using it.
g*****d
发帖数: 35
4
Hi,
I am using the floatflt package. It offers floating figures and tables.
However, for the floating table, I can only put the caption below the table
but not above. How to make it above the table? Thank you very much. I list the
normal usage that may be useful for others also.
\usepackage{floatflt}
The following works for appending the caption below the table
\begin{floatingtable} [r]
{
\begin{tabular}[c]{|l|l|l|l|l|}
\hline
Application & column0 & c1 & c2& c3\\
\hline\hline
good1 & 8 & 7 & 6
a******s
发帖数: 232
5
http://www.devdaily.com/blog/Content/2/18/316/
How to use a strikeout/strikethrough font with LaTeX
It was hard to find out how to use a strikethrough font using LaTeX, and I don
't want to lose it, so here's a simple example.
%
% include the "ulem" package in the header
%
\usepackage{ulem}
%
% use the "sout" tag to "strike through" text
%
\sout{Bill Clinton} G.W. Bush is the pres.
This produces text like this:
Bill Clinton G.W. Bush is the pres.
As you can see, step one is to include the ul
T*******n
发帖数: 493
6
来自主题: TeX版 - How to define a variable in latex?
If you want to make use of boolean type variables, you can try the
"ifthen" package. Without "ifthen", you have to change the category
code of the @ character in order to use LaTeX's internal boolean
types (if you don't know what I mean about the category code of @,
just \usepackage{ifthen} and read the user manual that does with it).
Or do you need other types of variables?
z*****n
发帖数: 7639
7
来自主题: TeX版 - a problem of page layout
Hi,
i use following commands to set the page layout.
well it turned the page landscape, but the contents are
still organized in original direction (from top to down and right to lef
t now). What is wrong?
\documentclass{article}
\usepackage[a4paper,landscape,tmargin=20mm,bmargin=20mm,lmargin=20mm,rma
rgin=20mm]{geometry}
\begin{document}
test it. dflkinf dljfdiljklfdjalksjoio jllkfjdklfjdoio li kfjadklsfjd
\end{document}
a*******x
发帖数: 47
8
来自主题: TeX版 - a problem of page layout
Try the following,
...
\usepackage{landscape}
\def\printlandscape{\special{landscape}}
\special{! TeXDict begin /landplus90{true}store end }
\begin{document}
...
\end{document}
T*******n
发帖数: 493
9
\usepackage{amsmath}
...
\begin{equation}
\begin{bmatrix}
A & \smash[b]{\underbrace{\begin{matrix}B & C\end{matrix}}_{D}}
\end{bmatrix}_i
\end{equation}

C
U***t
发帖数: 98
10
让tex用户转到word下?呵呵,比较难。。。
可以实施
\usepackage[tex2doc]{magicpackage}
不保证一定行。{:o]
b*****i
发帖数: 58
11
来自主题: TeX版 - 插路中文字体一问
\usepackage{CJK}
and sth. like below in the body
\begin{CJK*}{GB}{kai}
他山之石, 可以功玉
\end{CJK*}
T*******n
发帖数: 493
12
来自主题: TeX版 - Latex 引用的一个问题
I don't remember off hand whether natbib does that. Actually
there are numerous packages that will put the reference number
in the superscribed position (e.g., \usepackage{overcite}), but
which one you use will also depend on how you want the
bibliography/reference listing formatted and sorted. Take a look
in The LaTeX Companion---there is a lot of information that
you will find useful.
T*******n
发帖数: 493
13


If they are both figures or both tables, try putting both items in the same
float:
\begin{figure}
\includegraphics[...]{...}
\caption[...]{...}
\label{...}
\addvspace{\bigskipamount}
\includegraphics[...]{...}
\caption[...]{...}
\label{...}
\end{figure}
Try \usepackage{afterpage}, and read the documentation for usage.
T*******n
发帖数: 493
14
来自主题: TeX版 - 如何使公式换行?
To use align, multline, gather, etc. you need to \usepackage{amsmath}.
T*******n
发帖数: 493
15
来自主题: TeX版 - 如何实现这个公式
The following allows you to create an operator
name that typesets the same way as \lim_{x\to\infty}
(the subscribed p shifts positions depending on math
mode).
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator*{\Min}{Minimize}
\begin{document}
in-line math $\Min_p D(p)$ in-line math\par
display math display math display math display math
\begin{equation}
\Min_p D(p)
\end{equation}
\end{document}
T*******n
发帖数: 493
16
来自主题: TeX版 - 关于reference 作者格式一问
The sorting order depend on three things: the language setting, the
bibliography
style, and the way the name is entered into the .bib file.
For example, the following table shows the sorting order for three schemes.
"Van/Vana" means that "van Wood" is sorted between "Van" and "Vana".
"plain" means \bibliographystyle{plain}, and "alpha" means \bibliographystyle{
alpha}.
"German" means \usepackage[german]{babel} plus \bibliographystyle{gerplain}.
\begin{tabular}{cccc}
in .bib file & plain & alpha
T*******n
发帖数: 493
17
\usepackage{multicol}
\begin{document}
one column
\begin{multicols}{2}
two column, floats might not work
\end{multicols}
one column, no page break
\end{document}
T*******n
发帖数: 493
18
\documentclass{article}
\usepackage{listings}
\lstloadlanguages{C}
\begin{document}
\lstset{language=C,keywordstyle=\bfseries,commentstyle=\slshape}
\begin{lstlisting}{}
int i, j, k; /* three integers */
\end{lstlisting}
\end{document}

Please explain in more details what is not working.
a*****j
发帖数: 72
19
来自主题: TeX版 - 问个文献引用的问题
是先\usepackage{cite}
然后~\cite{wang93} ~\cite{zhang94} ~\cite{li98}么,我怎么不行啊
出来的还是[1] [2] [3]
T*******n
发帖数: 493
20
Depending on whether you want to preserve line justification
within the cell, you can use either \linebreak (justification)
or \newline (no justification). Run the example below for
illustration.
\usepackage{array}
\begin{tabular}{|p{1in}|p{1in}|p{1in}|}
\hline
one two three four five six seven eight nine ten &
one two three\linebreak
four five\linebreak
six seven eight\linebreak
nine ten &
one two three\newline
four five\newline
six seven eight\newline
nine ten \\
\hlin
a*****r
发帖数: 443
21
谢谢您的传道授业解惑
我还有一个问题
就是使用supertabular的时候
和我的IEEEtran的sty冲突了
因为如果单单使用supertabular,在article style情况下,table的caption是居中的,
但是当我使用IEEEtran代替article的style的时候,table的caption变成靠左对齐了,
请问这种情况如何解决呢?再次感谢!!
\documentclass{IEEEtran}
%\documentclass{article}
\usepackage{supertabular}
\begin{document}
\begin{center}
\tablecaption{Talbe}\footnotesize
\begin{supertabular}
{|c|} \hline $1$\\\hline
\end{supertabular}
\end{center}
\end{document}
T*******n
发帖数: 493
22
来自主题: TeX版 - Any other way to get a "hat"?
What do you not like about \hat? The alignment or the
shape of the printed hat?
Assuming you are using LaTeX, try \usepackage{amsmath}
which uses a different algorith for aligning the hat.
Or try the accents package, found at
http://www.ctan.org/tex-archive/macros/latex/contrib/bezos/
l*****y
发帖数: 165
23
How to use the command please?
I put \usepackage{slashbox} at the beginning
and try to use \slashbox in table but failed.
Could you give an example of using it please?
Thanks.
j*******a
发帖数: 45
24
来自主题: TeX版 - how to use longtable in latex?
【 以下文字转载自 EE 讨论区 】
发信人: jinghanna (benben), 信区: EE
标 题: how to use longtable in latex?
发信站: BBS 未名空间站 (Tue Sep 20 17:23:31 2005), 转信
I have a very long table. It can not be put within one page. I tried to use
longtable to separate the table and show it on a few pages, but I failed.
What I have done is as follows,
\usepackage{longtable}
\begin{table}
\begin{center}
\begin{tabular}{c|cc}\hline
segment & \textit{EEG1} & \textit{EEG2} \\\hline
A & 1679900 & 407110 \\
B & 576260 & 47203 \\
T*******n
发帖数: 493
25
来自主题: TeX版 - A quick question about page margin
Check it again. Using the same LaTeX you posted, I get
1.5 inch bottom margin on US letter paper, but about 5.5 cm
bottom margin on A4 paper. Check both the PS file and PDF
file to find out where things went wrong.
If you are not using page footers (I see you are using the
empty page style), you should add \setlength{\footskip}{0pt}
before \usepackage{geometry} to get the bottom margin
closer to 1 in.
T*******n
发帖数: 493
26
来自主题: TeX版 - 我在TEX里做不好的事
\usepackage[draft]{showkeys} can also display the labels and
references wherever \label, \ref, \cite, and \bibitem are
called.
T*******n
发帖数: 493
27
来自主题: TeX版 - 请教一个表格问题。
This is the way I'd do it too, but some people might
find \usepackage{multirow} easier (if the table isn't too
complicated).
x*z
发帖数: 1010
28
\usepackage{multimedia}
...
\movie[width=1.0\textwidth]{\includegraphics[width=1.0\textwidth]{figure.jpg}}
{movie.avi}
T*******n
发帖数: 493
29
来自主题: TeX版 - eqnarray 后面的space 的问题
The subscript under the second \sum makes you think that
there is extra space, but if you measure it, there isn't (unless
you have loaded other packages that modify the spacing).
If you insist on adjusting the spacing but only for this
equation, try the following. I also recommend the amsmath
package's split environment instead of eqnarray, which has
known bugs in how spacing is calculated.
\documentclass{article}
\usepackage[tbtags]{amsmath}
\begin{document}
Text text text text text text text
T*******n
发帖数: 493
30
Two solutions:
1. \usepackage{amssymb} and say $\blacksquare$
or \ensuremath{\blacksquare}.
2. \rule[0pt]{1ex}{1ex} creates a black square about
the size of an "x" based on the current font size.
Make 0pt positive to raise the square, negative to
lower it.
If you want to use this in several places, define a
macro such as
\newcommand{\mysquare}[0]{\rule[0pt]{1ex}{1ex}}
and say \mysquare wherever you want it.
T*******n
发帖数: 493
31
You can try this:
\usepackage{amsmath,amssymb}
\begin{equation}
x=y\tag*{$\blacksquare$}
\end{equation}
but you'll lose the equation number.
b*****k
发帖数: 20
32
for a specific line, use \vspace
for the whole document, use \usepackage{setspace}
a**e
发帖数: 5794
33
来自主题: TeX版 - 页眉和页脚 in Latex
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LE,RO]{$\S\:$\leftmark} %双页左、单页右页眉设为章节
\fancyhead[LO,RE]{Alpha's MathNote} %单页左、双页右页眉
\fancyfoot[LE,RO]{\thepage} %双页左、单叶右页脚设为页码
\cfoot{} %中间页脚设为空

.
T*******n
发帖数: 493
34
来自主题: TeX版 - About table
Try the following; note the distinction between
\tabularnewline (to start a new row in the table)
and \\ (to break lines within thesame row).
\usepackage{array}
\begin{tabular}{|>{\centering}p{2in}|}
\hline
text to be centered in a column \tabularnewline
\hline
more text to be centered \tabularnewline
\hline
text\\centered\\on four lines\\in one row \tabularnewline
\hline
\end{tabular}
w******s
发帖数: 35
35
终于搞定了~~ 多谢版主~~!
我用的是MikTex,在按Guide里面的说明把slides转成article时候,没有碰到任何问题。
但是,转成handout的时候,遇到一点麻烦,Guide建议用:
\documentclass[handout]{beamer}
\usepackage{pgfpages}
\pgfpagelayout{2 on 1}[a4paper,border shrink=5mm]
但是编译老是显示\pgfpagelayout这一行是Undefined Control Sequence.
后来看了一下pgfpages.sty文件(版本是2004年底),发现可以用这个:
\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
试了试,果然通过了~!
写在这里只是希望如果有跟我一样的菜鸟也碰到类似问题,可以试试另一个,
也许能省点时间。
T*******n
发帖数: 493
36
\documentclass{article}
\usepackage{amsmath}
\newcommand{\chem}[1]{\ensuremath{\mathrm{#1}}}
\newcommand{\unit}[1]{\unskip\:\ensuremath{\mathrm{#1}}}
\newcommand{\degree}[0]{\ensuremath{{}^\circ}}
\begin{document}
\begin{equation}
x\overset{\text{not enough space to explain}}{=}y
\end{equation}
\begin{equation}
\chem{H_2O}_{(s)}
\xrightarrow[\text{at $T=0\degree\unit{C}$ and $P=1\unit{atm}$}]
{\Delta H_{\text{melt}}}
\chem{H_2O}_{(l)}
\end{equation}
\end{document}
T*******n
发帖数: 493
37
Try \usepackage{fancyhdr}, and take a look at the
examples given in the user manual.
If you don't want to use fancyhdr (fancyhdr has a
few minor problems with line spacing calculations
which could clash with your font size change), you
will have to define a new page style or redefine
\ps@plain or \ps@headings. Try fancyhdr first.
Whatever you do, do not redefine the \thepage macro
to include any font information, especially if you
use hyperref.
l********k
发帖数: 17
38
try
\usepackage{URL}
s***t
发帖数: 195
39
来自主题: TeX版 - about bold face for \mu
\usepackage{bm}
\bm{mu}

mu
T*******n
发帖数: 493
40
来自主题: TeX版 - help on subtable label
Try the following. You need the latest versions of subfig and caption from
ctan.org. Check the documentation subfig.pdf for more details. Don't use
subfigure.sty as it is obsolete and replaced by subfig.sty.
\documentclass{article}
\usepackage{subfig}
\captionsetup[table]{position=top}
\captionsetup[subtable]{position=top}
\begin{document}
See the two parts of Table~\ref{tab:something}, namely Table~\ref{tab:10}
and Table~\ref{tab:something}\subref{tab:20}.
\begin{table}[hbt]
\centering
T*******n
发帖数: 493
41
来自主题: TeX版 - 请教如何摆一个大图
Try \begin{figure}[p] to make it a page float.
Then if it still doesn't stay where you want it to
appear, try \usepackage{afterpage}.
S*********g
发帖数: 5298
42
跟winedt没有关系,
winedt只是一个编辑器。
你用的编译器是什么样的?
最大可能,我觉得是不是你的code有什么问题。
试试最简单的code,看看行不行
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\includegraphics{Item1.eps}
\end{figure}
\end{document}
s***t
发帖数: 195
43
\usepackage{endfloat}
T*********r
发帖数: 11175
44
【 以下文字转载自 Physics 讨论区 】
发信人: TechniColor (坚决服从rourou的领导), 信区: Physics
标 题: Re: What software to draw Feynman graphs ?
发信站: BBS 未名空间站 (Wed Dec 28 11:37:22 2005), 转信
use axodraw under latex
or use other software to generate your diagram into postscript format
then include it like FeyArts (a mathematica package) or MadGraph,.....
Go to google axodraw and put the axodraw.sty file in the same directory as
your tex source file.
include
\usepackage{axodraw}
in your tex file
Then put in the text someth
r*********s
发帖数: 2157
45
try
\usepackage{afterpage}
...
\afterpage{\clearpage}
if other method doesn't work.
J*******r
发帖数: 379
46
☆─────────────────────────────────────☆
realguy (爱我所爱) 于 (Fri Jul 29 03:49:05 2005) 提到:
一直在想如何在论文的上方加上"to appear in the...."(比如在preprint的论文),好象
fancyheader的package可以做这个事情,但好象挺复杂(至少用起来不方便),所以一直没
有figure out出来。哪位兄弟帮忙贴一些sample code. 谢谢。
☆─────────────────────────────────────☆
xyct (洋葱头) 于 (Tue Aug 9 22:44:53 2005) 提到:
我是这么用的:
\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}
\fancyhf{}
\lhead{to appear in the....}
\rhead{My Name}
\rfoot{Page \thepage}
text.
J*******r
发帖数: 379
47
☆─────────────────────────────────────☆
ddyourself (dd) 于 (Tue Nov 8 13:04:09 2005) 提到:
写出相等的原因
☆─────────────────────────────────────☆
TeXnician (毕升) 于 (Tue Nov 8 20:20:32 2005) 提到:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\chem}[1]{\ensuremath{\mathrm{#1}}}
\newcommand{\unit}[1]{\unskip\:\ensuremath{\mathrm{#1}}}
\newcommand{\degree}[0]{\ensuremath{{}^\circ}}
\begin{document}
\begin{equation}
x\overset{\text{not enough space to explain}}{=}y
\end{equation}
\begin{eq
w****j
发帖数: 237
48
来自主题: TeX版 - a simple question about "big" file
hi, for latex, if I want to split a "big" file into several small files, it
can use \include.
But I am wondering what's the requirement of that small file. Do they also
need title, abstract, \usepackage... and how to use the biblography? Thanks
T*******n
发帖数: 493
49
来自主题: TeX版 - 请教关于粗体的问题
The standard way now is
\usepackage{bm}
$\bm{\beta}$
The "bm" package comes with the AMS LaTeX (amsmath) package.
T*******n
发帖数: 493
50
You are including a figure of width \textwidth inside a
minipage of width 0.5\textwidth!
Try something simpler:
\documentclass{article}
\usepackage{subfig}
\begin{document}
\begin{figure}
\centering
\subfloat[]{\includegraphics[width=\textwidth]{fig1.eps}}\par
\subfloat[]{\includegraphics[width=\textwidth]{fig2.eps}}\par
\subfloat[]{\includegraphics[width=\textwidth]{fig3.eps}}
\caption{Caption}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=\textwidth]{fig1.eps} \\ (a)\par\bigski
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)