Professional Documents
Culture Documents
Recursos Adicionais
LATEX
Regis
da Silva Santos
rg3915 , yahoo.com.br
2009
1 / 50
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Expressoes
com mesmo tamanho
matematicas
Inserindo sequencia
a partir de macros do Winedt
Inserindo arquivos PDF dentro de um arquivo TEX
MarginPar apenas do lado esquerdo
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
As
compilar arquivos pelo Prompt de Comando do
Esta sequencia
cria o arquivo DVI, converte para PS e depois para PDF.
de renomear o arquivo:
Para o comando ps2pdf temos ainda a opcao
ps2pdf arquivo.ps novoarquivo.pdf
1
serao
4 / 50
e necessario
criar um arquivo BATH que nada mais e que um arquivo
de lotes de comandos do DOS.
crie um arquivo com a extensao
.bat e digite a
Entao,
sequencia
de comandos dentro dele. Exemplo,
latex arquivo01
bibtex arquivo01
makeindex arquivo01
latex arquivo01
dvips arquivo01.dvi
ps2pdf arquivo01.ps
do captulo
Alterando numeracao
6 / 50
Captulo Personalizado
Existem 7 opcoes.
Para escolhe-las basta digitar, por exemplo:
\usepackage[Sonny]{fncychap}
sao:
As opcoes
Bjarne, Bjornstrup, Conny, Glenn, Lenny, Rejne e Sonny
7 / 50
Captulo Personalizado
Package description
CHAPTER
ONE
PACKAGE DESCRIPTION
he package fncychap has been written such that chapter level headings can be altered fast and for me
to learn more about LATEX and TEX. I have no idea if this package is written in a good way. Thus,
if anyone reads and tries FncyChap I would appreciate any feedback. This will help me gain insight in
writing macros.
In any publication it is important to remember that consistency plays a important role. That is, with
this package one can change the appearance of each chapter in the publication. However, this is not
desirable so dont forget modesty and consistency.
1.1
In this chapter a short introduction of the package will be given. The package has been written in order
for me to learn more about LATEX and TEX. I have no idea if this package is written in a good way. Thus,
if anyone reads and tries FancyChapters I would appreciate any feedback, good or bad. The reason is
that it will help me gain insight in writing macros.
In any publication it is important to remember that consistency plays a important role. That is, with
this package one can change the appearance of each chapter in the publication. However, this is not
desirable so don't forget modesty and consistency.
If the option, style, is omitted then the default denition of chapter is used. There are six predened
chapter styles, namely Sonny, Lenny, Glenn, Conny, Rejne and Bjarne. The names corresponds to
Swedish given names, almost surely (a.e.) like IKEA1. Each such style has a default conguration and if
that conguration is sucient, then this is all that is needed.
The package does not rely on any other package. However, for the style Lenny a postscript font is
default, but this font can easily be changed. I encourage the use of the default postscript font since it is
scalable in a truly huge manner, which makes Lenny nice.
The package is invoked by writing the following in the preamble of your document
\usepackage[style]{fncychap}
If the option, style, is omitted then the default definition of chapter is used. Originally, there were
six predefined chapter styles, namely Sonny, Lenny, Glenn, Conny, Rejne and Bjarne. The names
corresponds to Swedish given names, almost surely (a.s.) like IKEA1 . Each such style has a default
configuration and if that configuration is sufficient, then this is all that is needed.
In the present release of fncychap two additional chapter definitions have been included. The first of
these is named PetersLenny, after the author Peter Osborn. This chapter definition is based on Lenny,
Peter has carefully tweaked the measures of the lines individually for each chapter (up to 20) and each
appendix (up to Z). The second chapter head is a new one defined by Jean-Marc Francois and he named
it Bjornstrup.
Originally, fncychap did not rely on any other package. However, for the style Lenny a postscript font
is default, but this font can easily be changed. I encourage the use of the default postscript font since it
is scalable in a truly huge manner, which makes Lenny nice. In the current release and with the use of
Jean-Marcs Bjornstrup the color package from the base distribution will be invoked.
1 reg.
Figura: Bjarne
Figura: Bjornstrup
8 / 50
Captulo Personalizado
CHAPTER 1
CHAPTER 1
PACKAGE DESCRIPTION
PACKAGE DESCRIPTION
I
n this chapter a short introduction of the package will be given. The package has been written in order
for me to learn more about LATEX and TEX. I have no idea if this package is written in a good way. Thus,
if anyone reads and tries FancyChapters I would appreciate any feedback, good or bad. The reason is
that it will help me gain insight in writing macros.
In any publication it is important to remember that consistency plays a important role. That is, with
this package one can change the appearance of each chapter in the publication. However, this is not
desirable so don't forget modesty and consistency.
If the option, style, is omitted then the default denition of chapter is used. There are six predened
chapter styles, namely Sonny, Lenny, Glenn, Conny, Rejne and Bjarne. The names corresponds to
Swedish given names, almost surely (a.e.) like IKEA1. Each such style has a default conguration and if
that conguration is sucient, then this is all that is needed.
The package does not rely on any other package. However, for the style Lenny a postscript font is
default, but this font can easily be changed. I encourage the use of the default postscript font since it is
scalable in a truly huge manner, which makes Lenny nice.
In this chapter a short introduction of the package will be given. The package has been written in order
for me to learn more about LATEX and TEX. I have no idea if this package is written in a good way. Thus,
if anyone reads and tries FancyChapters I would appreciate any feedback, good or bad. The reason is
that it will help me gain insight in writing macros.
In any publication it is important to remember that consistency plays a important role. That is, with
this package one can change the appearance of each chapter in the publication. However, this is not
desirable so don't forget modesty and consistency.
If the option, style, is omitted then the default denition of chapter is used. There are six predened
chapter styles, namely Sonny, Lenny, Glenn, Conny, Rejne and Bjarne. The names corresponds to
Swedish given names, almost surely (a.e.) like IKEA1. Each such style has a default conguration and if
that conguration is sucient, then this is all that is needed.
The package does not rely on any other package. However, for the style Lenny a postscript font is
default, but this font can easily be changed. I encourage the use of the default postscript font since it is
scalable in a truly huge manner, which makes Lenny nice.
Figura: Conny
Figura: Glenn
9 / 50
Captulo Personalizado
Chapter
CHAPTER
In this chapter a short introduction of the package will be given. The package has been written in order
for me to learn more about LATEX and TEX. I have no idea if this package is written in a good way. Thus,
if anyone reads and tries FancyChapters I would appreciate any feedback, good or bad. The reason is
that it will help me gain insight in writing macros.
In any publication it is important to remember that consistency plays a important role. That is, with
this package one can change the appearance of each chapter in the publication. However, this is not
desirable so don't forget modesty and consistency.
If the option, style, is omitted then the default denition of chapter is used. There are six predened
chapter styles, namely Sonny, Lenny, Glenn, Conny, Rejne and Bjarne. The names corresponds to
Swedish given names, almost surely (a.e.) like IKEA1. Each such style has a default conguration and if
that conguration is sucient, then this is all that is needed.
The package does not rely on any other package. However, for the style Lenny a postscript font is
default, but this font can easily be changed. I encourage the use of the default postscript font since it is
scalable in a truly huge manner, which makes Lenny nice.
CHAPTER 1
1
PACKAGE DESCRIPTION
Package description
n this chapter a short introduction of the package will be given. The package has been written in order
for me to learn more about LATEX and TEX. I have no idea if this package is written in a good way. Thus,
if anyone reads and tries FancyChapters I would appreciate any feedback, good or bad. The reason is
that it will help me gain insight in writing macros.
In any publication it is important to remember that consistency plays a important role. That is, with
this package one can change the appearance of each chapter in the publication. However, this is not
desirable so don't forget modesty and consistency.
If the option, style, is omitted then the default denition of chapter is used. There are six predened
chapter styles, namely Sonny, Lenny, Glenn, Conny, Rejne and Bjarne. The names corresponds to
Swedish given names, almost surely (a.e.) like IKEA1. Each such style has a default conguration and if
that conguration is sucient, then this is all that is needed.
The package does not rely on any other package. However, for the style Lenny a postscript font is
default, but this font can easily be changed. I encourage the use of the default postscript font since it is
scalable in a truly huge manner, which makes Lenny nice.
Figura: Lenny
Package description
In this chapter a short introduction of the package will be given. The package has been written in order
for me to learn more about LATEX and TEX. I have no idea if this package is written in a good way. Thus,
if anyone reads and tries FancyChapters I would appreciate any feedback, good or bad. The reason is
that it will help me gain insight in writing macros.
In any publication it is important to remember that consistency plays a important role. That is, with
this package one can change the appearance of each chapter in the publication. However, this is not
desirable so don't forget modesty and consistency.
If the option, style, is omitted then the default denition of chapter is used. There are six predened
chapter styles, namely Sonny, Lenny, Glenn, Conny, Rejne and Bjarne. The names corresponds to
Swedish given names, almost surely (a.e.) like IKEA1. Each such style has a default conguration and if
that conguration is sucient, then this is all that is needed.
The package does not rely on any other package. However, for the style Lenny a postscript font is
default, but this font can easily be changed. I encourage the use of the default postscript font since it is
scalable in a truly huge manner, which makes Lenny nice.
Figura: Rejne
Figura: Sonny
10 / 50
do enumerate
Alterando numeracao
do enumerate? Eu
P: Como eu faco para alterar a numeracao
queria iniciar a partir do numero 5, por exemplo.
R: Use o comando
\setcounter{enumi}{4}
%inicia o contador a partir do 5.
\begin{enumerate}[M1] \setcounter{enumi}{4}
\item quinto
\item sexto
\item s
etimo
\item oitavo
\end{enumerate}
11 / 50
pode ajustar
Voce tambem
\hoffset=-1.0cm
\textwidth=18cm
12 / 50
Uma opcao
e
usando o pacote geometry. Veja o exemplo:
\usepackage[lmargin=2cm,rmargin=2cm,tmargin=3cm,bmargin=1.5cm]{geometry}
left (esquerda), right (direita), top (topo ou superior), bottom (inferior).
13 / 50
oes est
ao em min
usculo.
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhead{} % deleta a configurac
ao do lado direito.
\fancyfoot{} % deleta a configurac
14 / 50
Indice remissivo
do LATEX, o pacote makeidx
Para habilitar o recurso de indexacao
no preambulo
do arquivo de entrada.
O conteudo
do ndice remissivo e especificado com comandos
\index{chave}
onde chave e a entrada do ndice remissivo.
15 / 50
Indice remissivo
\documentclass{report}
\usepackage{makeidx}
\makeindex
\begin{document}
Exemplo \index{Exemplo}.
Espac
o vetorial \index{Espac
o!vetorial}, espac
o m
etrico \index{Espac
o!m
etrico}
\printindex %no final do documento
\end{document}
ao};
No final do documento digite \printindex.
17 / 50
codigo:
%%% Coloca cada letra entre grupos no in
cio da linha
heading_prefix "{\\bfseries "
heading_suffix "}\\nopagebreak\n"
headings_flag 1
% Traduz Symbols
symhead_positive
symhead_negative
numhead_positive
numhead_negative
18 / 50
19 / 50
No preambulo
digite:
\makeatletter
\renewenvironment{theindex}
{\if@twocolumn
\@restonecolfalse
\else
\@restonecoltrue
\fi
\setlength{\columnseprule}{0pt}
\setlength{\columnsep}{35pt}
\begin{multicols}{3}[\section*{\indexname}]
\markboth{\MakeUppercase\indexname}%
{\MakeUppercase\indexname}%
\thispagestyle{plain}
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt plus 0.3pt}
\relax
\let\item\@idxitem}%
{\end{multicols}\if@restonecol\onecolumn\else\clearpage\fi}
\makeatother
www.latex-community.org
21 / 50
matematicas
Expressoes
sempre com mesmo
tamanho
` vezes nao
gostamos quando uma fracao
fica expremida na
As
1
linha de texto, exemplo, 2 . E queremos que ela esteja no seu
1
tamanho natural, .
2
digite $\displaystyle \frac{1}{2}$.
Entao,
Mas se quiser que isto fique em todo o texto, digite:
\everymath\displaystyle
http://aprendolatex.wordpress.com
22 / 50
matematicas
matematica
Caso a expressao
fique muito grande e possvel
reduzir seu tamanho com o comando \scriptstyle. Este
exemplo.
comando deve ser digitado no incio da expressao,
$p(x) = a_0 + a_1 x + a_2 x2 + \ldots + a_n xn$ %normal
$\scriptstyle p(x) = a_0 + a_1 x + a_2 x2 + \ldots + a_n xn$ %menor
$\scriptscriptstyle p(x) = a_0 + a_1 x + a_2 x2 + \ldots + a_n xn$ %menor ainda
Exemplo
p(x) = a0 + a1 x + a2 x2 + . . . + an xn
p(x)=a0 +a1 x+a2 x2 +...+an xn
p(x)=a0 +a1 x+a2 x2 +...+an xn
23 / 50
Inserindo sequencia
a partir de macros do Winedt
O modo padrao
landscape (paisagem).
25 / 50
do lado
Neste caso ira criar um exemplo com autonumeracao
esquerdo da pagina.
26 / 50
Exemplo
ex. 1
ex. 2
Texto texto texto texto texto texto texto texto texto texto texto.
Texto texto texto texto texto texto texto texto texto texto texto.
27 / 50
no manual pgfmanual.pdf.
Mais informacoes
28 / 50
extensao
.png, .pdf, .jpg, .mps (METAPOST) e .tif.
o comando \begin{document} digite:
Logo apos
\DeclareGraphicsExtensions{.jpg,.pdf,.mps,.png}
do comando acima faz com que o LATEX procure por figuras com as exA inclusao
tensoes
declaradas: primeiro jpg, depois pdf, depois mps e por ultimo
png, isto sig
e necessario
como
P: Quando eu tenho uma figura sem nenhuma descricao,
eu faco para tirar os dois pontinhos? Ou seja, normalmente fica
Figura 1.1: mas eu quero Figura 1.1.
R: Requer o pacote caption. Na figura digite:
\begin{figure}
\centering
\input{nome da figura}
\captionsetup{labelsep=none}
\caption{Legenda}\label{fig00}
\end{figure}
30 / 50
Crie um unico
arquivo, a figura PSTricks devera estar no corpo de texto deste arquivo. Salve como, por exemplo,
fig01.tex.
O preambulo
mnimo e:
\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-eps}
\pagestyle{empty}
\begin{document}
\begin{TeXtoEPS}
\begin{pspicture}(-1,-1)(1,1)
...
\end{pspicture}
\end{TeXtoEPS}
\end{document}
Depois abra a linha de comando do DOS e execute os seguintes comandos:
latex fig01
dvips fig01.dvi -E -o fig01.eps
Mais detalhes em C:\Arquivos de programas\MiKTeX 2.7\doc\latex\pst-eps.pdf
EPStoPDF
Para converter de EPS para PDF digite:
epstopdf fig.eps
31 / 50
Crie um preambulo
mnimo como se segue:
\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-pdf}
\begin{document}
\begin{pspicture}(-1,-1)(1,1)
...
\end{pspicture}
\end{document}
Depois abra a linha de comando do DOS e execute os seguintes comandos:
latex fig01.tex
dvips fig01.dvi
ps2pdf fig01.ps
32 / 50
As figuras inseridas no Word devem estar no formato EPS, por oferecer uma melhor
monocromatico;
Clique em Arquivo/Exportar... e salve a figura no mesmo formato EPS;
escolha Fundo transparente, RGBcolor e Texto.
Na caixa de opcoes
Pronto! Agora a figura pode ser inserida no Word. Lembre-se que a qualidade em tela
e muito boa, mas para impressao
fica excelente.
nao
33 / 50
que no processo
Faca os mesmos procedimentos de construcao
anterior, mas no Corel Draw salve clicando em Arquivo/Exportar para o Office....
Otimizado para Impressao
comercial.
E escolha a opcao
Sua figura sera salva no formato PNG, formato ideal para o PowerPoint.
34 / 50
35 / 50
b
Figura: Antes
3
2
1
2
Figura: Depois
36 / 50
Figuras pstricks monocromaticas
37 / 50
Figuras pstricks monocromaticas
No preambulo
do seu arquivo TEX, digite:
\usepackage{PSTricksMonochrome}
E depois de \begin{document}, digite:
\PSTricksMonochrome%
em preto e branco.
Agora todas as figuras pstricks ficarao
38 / 50
Subfiguras
Para subfiguras carregue o pacote subfigure.
\begin{figure}[!h]
\centering
\subfigure[Circunfer
encia]{\label{fig01a}%
\includegraphics[width=3cm]{figuras/figCirc}}\quad
\subfigure[Elipse]{\label{fig01b}%
\includegraphics[width=3cm]{figuras/figElipse}}
\caption{C
onicas}\label{fig01}
\end{figure}
F1
F2
(a) Circunferencia
(b) Elipse
Figura: Conicas
39 / 50
MiniPage
Minipage e um recurso interessante quando se deseja uma figura do lado da outra para economizar espaco na folha
significa que sao
subfiguras). Digite:
(mas nao
\begin{figure}[!h]
\begin{minipage}[t]{0.45\textwidth} %topo e 45% da largura da folha, respec.
\centering
\includegraphics[width=3cm]{figuras/figParabola}
\caption{Par
abola}\label{figParabola}
\end{minipage}
\begin{minipage}[t]{0.45\textwidth}
\centering
\includegraphics[width=3cm]{figuras/figTriangulo}
\caption{Tri
angulo}\label{figTriangulo}
\end{minipage}
\end{figure}
2
1
b
Figura: Parabola
Figura: Triangulo
40 / 50
Onde 5 e o numero
de linhas a serem
Figura: Legenda
41 / 50
P
olo Norte
O
y
Meridiano
principal
x
Equador
P
olo Sul
Figura: Legenda
42 / 50
Figura PSTricks com codigo
do lado
1 \begin{pspicture}[showgrid=true](0,0)(2,2)
2
\psline[linecolor=red,linestyle=dashed](1,1)(1.71,1.71)
3
\pscircle[linecolor=blue](1,1){1}
4
\psdots[linecolor=blue](1,1)
5 \end{pspicture}
b
0
0
rframe={}.
Importante: Para remover o quadro sobre a figura digite a opcao
www.tug.org/PSTricks/ - (group)
43 / 50
ao.
\usepackage[brazil]{babel}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage[explicit]{titlesec}
44 / 50
%continuac
ao
\node[xshift=4cm,yshift=-4.2cm] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
\draw[smooth,samples=100,domain=0.0:2.75,color=blue]
plot(\x,{0.5*sin(2*\x r)-0.3});
\draw[smooth,samples=100,domain=0.0:3.2,color=blue]
plot(\x,{0.5*cos(2*\x r)-0.3});
\end{tikzpicture}
};
\end{tikzpicture}
}
\titlespacing*{\chapter}{0pt}{80pt}{0pt}
sao
feitas dentro do ambiente tikzpicture.
No caso, as ilustracoes
Exemplo:
1 Captulo Personalizado
45 / 50
Como foi feita a tela de apresentacao
deste material.
Veja como foi feita a tela de apresentacao
Requer os pacotes tikz e animate, entre outros do beamer.
\documentclass[svgnames]{beamer}
\usepackage{tikz}
\usepackage{animate}
\usepackage{wasysym} %fonte especial.
%Definic
ao de novas cores.
\definecolor{ciano}{rgb}{0,0.63,0.88}
\definecolor{azul}{rgb}{0.19,0.35,0.69}
\definecolor{azulB}{rgb}{0.27,0.49,0.82}
\definecolor{azulC}{rgb}{0.29,0.56,0.85}
\definecolor{azulD}{rgb}{0.13,0.36,0.87}
\definecolor{azulE}{rgb}{0.14,0.41,0.65}
\begin{document}
\begin{frame}
\begin{center}
...
46 / 50
Como foi feita a tela de apresentacao
47 / 50
Como foi feita a tela de apresentacao
%Tela de apresentac
www-i6.informatik.rwth-aachen.de/dreuw/latexbeamerposter.php#169-slides
49 / 50
informacoes
de curso via exemplos voce encontra
varios
outros links interessantes.
www.ctan.org/tex-archive/info/lshort/portuguese-BR/lshortBR.pdf
www.tex-br.org
varias
50 / 50