Gabriel ScalosubDepartment of Communication Systems EngineeringBen-Gurion University of the Negev Alon Building for High-Tech (Building 37), Room 414 P.O.B. 653 Beer-Sheva 8410501 Israel Phone: +972-8-6477230 Fax: +972-8-6472883 Email: press here
"I hear and I forget. I see and I remember. I do and I understand." |
$\stackrel{\mbox{\tiny Lemma 1.2}}{\Rightarrow}$Another example:
$\stackrel{def}{\equiv}$
$\overbrace{x+y}^{sum}=\underbrace{x \cdot y}_{\mbox{product}}$
$$ z = \left\{ \begin{array}{ll} 1 & x >0 \\ 0 & \mbox{otherwise} \end{array} \right. $$
\begin{eqnarray} |O| & \leq & |O \setminus A| + |A| \leq \label{eq:start} \\ & \leq & |A| + |A| \leq \nonumber \\ & \leq & 2|A| \end{eqnarray}Notice the \nonumber on the second line which omits the number. If all lines should be number-less, you can use \begin{eqnarray*} instead of \begin{eqnarray}.
\usepackage{mathtools} \DeclarePairedDelimiter\ceiling{\lceil}{\rceil} \DeclarePairedDelimiter\floor{\lfloor}{\rfloor}And then use the starred version, e.g., \floor*{\frac{1}{x}}.
\addtolength{\voffset}{-1.0cm} \addtolength{\textheight}{3.5cm}
\usepackage[hmargin=2.5cm,vmargin=4cm]{geometry}produces 2.5cm left/right margins, and 4cm top/bottom margins (no need to manipulate any other offsets or heights).
\usepackage{fancyhdr} \pagestyle{fancy} % sets the pagestyle to use fancy headers \fancyhead{} % clear header \fancyfoot{} % clear footer \fancyfoot[CO,CE]{\thepage} % replaces the page number to the [C]enter of the footer, in both [O]dd and [E]ven pages \fancyhead[LO,LE]{ABC} % puts 'ABC' on the header's [L]eft side, on both [O]dd and [E]ven pages \fancyhead[CO,CE]{DEF} % puts 'DEF' on the header's [C]enter, on both [O]dd and [E]ven pages \fancyhead[RO,RE]{GHI} % puts 'GHI' on the header's [R]ight side, on both [O]dd and [E]ven pagesOne can of course distinguish between the header/footer that appears on odd and even pages.
\usepackage[...]{draftcopy}Where instead of [...] use a comma-separated list of parameters taken from the following:
none | Dont print DRAFT across any page | ||
first | Print DRAFT across first page only | ||
firsttwo | Print DRAFT across two first pages only | ||
all | print DRAFT across all pages | ||
bottom | print DRAFT on the bottom of all pages | ||
bottomafter | print DRAFT on the bottom of all pages following the ones who have DRAFT across | ||
light | print DRAFT in light gray | ||
dark | print DRAFT in dark gray |
\draftcopyName{...}{...}where the first argument is the sentence to be printed, and the second argument is the scaling factor (start from about 50). This command should appear before the \begin{document} command.
psnup -r -k presentation.ps presentation_k.ps
% Adds a space between the text and the [T]op \hline \newcommand\T{\rule{0pt}{3.1ex}} % Adds a space between the text and the [B]ottom \hline \newcommand\B{\rule[-1.7ex]{0pt}{0pt}}one can then use \T and/or \B inside a cell in the row, i.e. after some text in the row, to get extra space between the text and the \hline. These commands will not work if placed between rows. E.g.
\begin{tabular}{ll} \hline % \T and \B would not work if it is placed here (needs to go inside cell) Col1 \T \B & Col2 \\ \hline $\sqrt{\frac{1}{2}}$ \T & more space from top \verb+\hline+ \\ $\sqrt{\frac{1}{2}}$ & no added space \\ $\sqrt{\frac{1}{2}}$ \B & more space from bottom \verb+\hline+ \\ \hline \end{tabular}and
\begin{tabular}{ll} \hline Col1 & Col2 \\ \hline $\sqrt{\frac{1}{2}}$ & no extra space from top \verb+\hline+ \\ $\sqrt{\frac{1}{2}}$ & no added space \\ $\sqrt{\frac{1}{2}}$ & no extra space from bottom \verb+\hline+ \\ \hline \end{tabular}
\begin{tabular}{p{1in}p{2in}}
-specialtext -latexfonts -startlatexFont defaultwhen invoking xfig.
\begin{figure}[h] \begin{center} \scalebox{0.5}{\input{fig1.pstex_t}} \caption{This is figure 1} \label{fig:fig1} \end{center} \end{figure}
\documentclass{article} \usepackage{pstricks} \usepackage{pst-plot} \usepackage{epsfig} \begin{document} \begin{figure}[h] \centerline{ \epsfig{file=epsfig.eps, scale=0.5} } \caption{Some EPS figure} \label{fig:fig1} \end{figure} \end{document}
\documentclass{article} \usepackage{pstricks} \usepackage{pst-plot} \usepackage{epsfig} \begin{document} \thispagestyle{empty} % omits page numbers. \input{figfile} \end{document}The \thispagestyle{empty} is necessary for the bounding box to be defined properly by dvips. Then do
latex texfigfile.tex dvips texfigfile.dvi -ENote: the generated file might be a .ps file. However, one can still insert it like any other .eps figure.
#!/bin/csh echo "epstopdf $1.pstex" epstopdf $1.pstex perl -p -i -e "s/.pstex//;" $1.pstex_t
\usepackage{epsfig} \usepackage{graphics}To insert an image, named e.g. pdffig.pdf, use:
\begin{figure}[h] \centerline{ \includegraphics[scale=0.5]{pdffig} } \caption{Some caption} \label{fig:pdffig1} \end{figure}Note that the 'original' files, i.e., the .pstex_t|.pstex|.eps files, should be present in the working directory as well.
\begin{figure}[h] \centerline{ \includegraphics[width=120mm]{image.jpg} } \caption{Some caption} \label{fig:image1} \end{figure}Remember to specify the 'width' argument.
[xpdf-path]\epstopdf.exe -eps input.pdf output.eps
\usepackage{algorithm} \usepackage{algpseudocode}An example of an algorithm is given by:
\begin{algorithm}{} \caption{MyAlgorithmName (...arguments...)} \label{alg:myalgorithmname} \begin{algorithmic}[1] \For{all ...} \State do ... \EndFor \State return ... \end{algorithmic} \end{algorithm}
\floatname{algorithm}{[New Name]}just before the algorithm code. E.g., to produce a Protocol, use
\floatname{algorithm}{Protocol} \begin{algorithm}{} \caption{MyProtocolName (...arguments...)} \label{alg:myprotocolname} \begin{algorithmic}[1] ... \end{algorithmic} \end{algorithm}
... \addtocounter{algorithm}{-1} \begin{algorithmic}[1] ...which would reduce the counter by 1, and display Algorithm 1 (instead of Algorithm 2). Note that the \addtocounter{algorithm}{...} command should immediately precede the \begin{algorithmic} command.
\bibliographystyle{plain} \bibliography{mybib}For different styles, see http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html
\nocite{*}just before the \bibliography{mybib} command, where the bibliography file is mybib.bib.
\setlength{\bibsep}{2pt}determines the space between bib entries.
\renewcommand{\bibfont}{\small}determines the font used for bib entries.
\renewcommand\refname{Bibliography}just before the bibliography section.
nameptr #1 > { namesleft #1 >with the lines
nameptr #1 > { nameptr #XXX #1 + = numnames #YYY > and { "others" 't := #1 'namesleft := } 'skip$ if$ namesleft #1 >where XXX should be the number of authors to show before "et al." whenever there are more than YYY authors.
\documentclass[a4paper,11pt]{article}Use dvips with the switch
-G0 -Ppdf -t A4Sizefollowed by ps2pdf with the switch
-sPAPERSIZE=a4This solves the problem of having incorrect header/footer margins.
epstopdf --outfile="TEMP_OUT.pdf" IN.epsfollowed by
"[ghostscript\bin path]\gswin32c" -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile="OUT.pdf" -f TEMP_OUT.pdfOne can then compile the source with the new figures using pdflatex, as usual.
gs -dNOPAUSE -dNOCACHE -dBATCH -sDEVICE=epswrite -sOutputFile=[output-file-name].eps [input-file-name].pdf
\usepackage{color,soul} ... This text would be \hl{highlighted} now.If one omits the color package, the \hl{...} environment produces an underline.
\newcommand{\myfontsize}{\fontsize{9}{11}\selectfont}where the first argument gives the height of the font (in pt), and the second argument gives the height of the line (in pt).