Aprenda! Espaçamento entre linhas no LaTeX / Learn it! Adjust spaces between lines on LaTex.

Uma dica importante para aqueles que trabalham com LaTeX é o uso do pacote “setspace” para ajustar o espaçamento entre linhas do texto.

Para definir espaçamentos simples, 1.5 (um e meio) e duplo, tudo o que você precisa fazer é inserir o pacote setspace no preâmbulo do seu .tex.

\usepackage{setspace}

Depois disto, no corpo do texto (entre \begin{document} e \end{document}, você pode usar os comandos:

\singlespace para espaçamento simples.
\onehalfspace para espaçamento 1.5.
\doublespace para espaçamento duplo.

Exemplo:

\documentclass{xxx}

\usepackage{setspace}

\begin{document}
bla bla bla...

\onehalfspace
Tudo o que estiver escrito aqui, estará formatado com espaçamento 1.5 entre linhas.

\singlespace
Tudo o que estiver escrito aqui, estará formatado com espaçamento simples entre linhas.

\doublespace
Tudo o que estiver escrito aqui, estará formatado com espaçamento duplo entre linhas.

\end{document}

Enjoi it!

——————– English —————————–

An interesting tip for the ones who work with LaTeX is the use of “setspace” package. It allow us to determine the space between the lines of a text.

In order to obtain single, one and half and double space, all you have to do is to insert the setspace package in the preamble of the .tex file.

\usepackage{setspace}

Thereafter, in the text body (between \begin{document} and \end{document}, you can call the follow commands:

\singlespace
\onehalfspace
\doublespace

Example:

\documentclass{xxx}

\usepackage{setspace}

\begin{document}
bla bla bla...

\onehalfspace
All that you write here will appear with 1.5 spacing between lines.

\singlespace
All that you write here will appear with singlespace spacing between lines.

\doublespace
All that you write here will appear with double spacing between lines.

\end{document}

Enjoi it!

Aprenda a instalar arquivos de estilo do LaTeX (.sty) no (Ubuntu) / Learning how to to install .sty (LaTeX Style Files) on Ubuntu Linux

Se você precisar instalar arquivos de estilo do LaTeX (.sty), considerando que você está usando o Ubuntu, siga os passos a seguir:

Pra quem usa o Tetex, os pacotes devem ser instalados em:

/usr/share/texmf-tetex/tex/latex

Pra quem usa o TexLive, os pacotes devem ser instalados em:

/usr/share/texmf-texlive/tex/latex

Primeiro crie um diretório com o nome do pacote que irá instalar (você pode procurar os pacotes em www.ctan.org) e copie o conteúdo do pacote neste diretório (obviamente já descompactado).

Finalmente, rode o programa mktexlsr para criar as bases de dados ls-R.

O exemplo a seguir mostra como instalar o pacote eurosym, considerando o TexLive.

a) Crie um diretório chamado eurosym em /usr/share/texmf-texlive/tex/latex ($ mkdir /usr/share/texmf-texlive/tex/latex/eurosym);
b) Copie o arquivo eurosym.sty e outros arquivos que vêm no pacote para o diretório criado;
c) Digite o comando $sudo mktexlsr.

Agora, para usar o pacote, adicione uma chamada no preâmbulo do seu arquivo .tex (\usepackage{eurosym}).

Enjoy it!

——————— English ——————–
Sometimes we have to install LaTeX Style Files (.sty) to use a new feature.

The directory we should install these .sty LaTeX files, on Ubuntu, depends on the distribution you are using.

For the ones who are using TeTeX, it is:

/usr/share/texmf-tetex/tex/latex

For the ones who are using TeX Live, it is:

/usr/share/texmf-texlive/tex/latex

First of all, create a directory for your new package (that you can download from www.ctan.org) and copy the package’s contents there (untarred/unzipped).

Thereafter, you have to run the program mktexlsr as root to create ls-R databases.

This is an example on how to install the eurosym package, using the TexLive:

a) Create a directory named eurosym on /usr/share/texmf-texlive/tex/latex ($ mkdir /usr/share/texmf-texlive/tex/latex/eurosym);
b) Copy the file eurosym.sty and the other files that come with the package to the directory /usr/share/texmf-texlive/tex/latex/eurosym;
c) run the command $sudo mktexlsr.

To make use of the package, include \usepackage{eurosym} on the .tex file preamble.

Enjoy it!

Aprender a programar com Java e C++ / How to learn programming Java and C++

A Universidade Carnegie Mellon criou um novo método de ensino de programação de computadores. Alice é o nome da ferramenta que promete tornar mais fácil a iniciação à programação.

O melhor de tudo é que a ferramenta é gratuíta, você pode baixar aqui!

——————– ENGLISH —————–

The Carnegie Mellon University developed a new approach to teach computer programing. Alice is the tool that claim to turn the programming task easier.

The tool is free, get your copy here!

Aprenda a criar um atalho (no desktop) com permissão de acesso root no Ubuntu / Learn how to create a shortcut with root permission on Ubuntu desktop

Se por algum motivo você precisar criar um atalho para um programa que precise de acesso root para execução (e você está logado como um usuário diferente), simplesmente crie o atalho como:

gksudo [caminho para o executável]

Ao clicar no atalho, o comando gksudo pedirá a senha de root.

Enjoy it!
———————- English ————————–

If you have to create a shortcut on the Ubuntu desktop, to access a program which requires the root access, you just have to create the shortcut as

gksudo [path to the executable file]

When you click on the shortcut, a pop-up will arise to tip the root password.

Enjoy it!

Concurso para docente – UFOP (Universidade Federal de Ouro Preto/MG)

Estão abertas inscrições para um novo concurso público para o cargo de Professor Assistente para o Instituto de Ciência Exatas e Aplicadas – ICEA da UFOP, campus de João Monlevade-MG.

A vaga é para a área de Sistemas de Informação, subáreas: Sistemas de Informações Aplicados e Desenvolvimento de Sistemas Web, com inscrições de 08 de junho a 08 de julho de 2009.

Clique aqui para acessar o edital.

Enjoy it!

Resolva o problema da Tela preta no Ubuntu 9.04 / Solve the Black screen problem on Ubuntu 9.04

Ao atualizar o Ubuntu para a versão 9.04 (Jaunty) o sistema exibe uma tela preta após o login?

Fique tranquilo, você não é o único a experimentar esse problema. :) Bem, procurando na net existem muitas dicas (que não funcionaram pra mim, mas vou listar abaixo), mas o que funcionou comigo foi:

Reiniciar em modo de recuperação;
Vai aparecer uma tela com as seguintes informações:

Resume – Resume normal boot
root – Drop to root shell prompt
xfix – try to fix X server

Escolhi a terceira (xfix), e depois reiniciei o sistema. Pronto, funcionou!

Agora, se isso não funcionar com o seu sistema, tente isto:

No site NerdCafe.

No site Clube do Hardware.

No site Viva o Linux.
—————————–ENGLISH———————

If you get a black screen when updating to Jaunty version of Ubuntu (9.04). You can try to solve in this way.

Restart your system to recovery;
Once started, it will be shown the following options:

Resume – Resume normal boot
root – Drop to root shell prompt
xfix – try to fix X server

Choose the third one (xfix) and restart your system.

If this tip does not make any effect, try these:

In the Ubuntu Forum.

If you get the solution in another way, please send-me it. I’ll post here with credits to you.

Enjoy it!

Concurso para Docente – UFC Sobral (Ceará)

O curso de Engenharia da Computação da Universidade Federal do Ceará, localizado no campus da cidade de Sobral, estará com inscrições abertas a partir de segunda-feira próxima (11/05/2009) até o dia 09/06/2009, para o concurso público visando o preenchimento das seguintes vagas:

– 01 vaga para Prof. Adjunto na área de Ciência da Computação;

– 01 vaga para Prof. Adjunto na área de Eletrônica e Hardware;

– 01 vaga para Prof. Adjunto na área de Sistemas e Redes de Comunicações;

– 01 vaga para Prof. Adjunto na área de Processamento de Sinais para
Comunicações Digitais.

O edital do concurso pode ser visualizado aqui, e os programas para cada vaga aqui.

Enjoy it!

Installing OPNET on UBUNTU Linux

Installing OPNET in Ubuntu 8.04 LTS

Besides the OPNET inc. say that you should use Red Hat to istall OPNET Transport Planner, I’ve tested in Ubuntu and it works well. My steps of instalation were the following:

(I assume the .bin files are already downloaded)

a) Login as root;
b) Install the OPNET SP GURU Transport Planner:
#./spgtranplan_150A_PL1_8168_linux86_01-Apr-09.bin
obs.: I chose the /usr/opnet as destination folder.

c) Install the documentation:
#./spgtranplan_docs_30-Mar-2009_linux86.bin

d) Set the user’s PATH variable to point to the directory where the SP Guru Transport Planner binary executable files are stored.

# pico /root/.bashrc
and add this line in the file
PATH=$PATH:/usr/opnet/15.0.A/sys/unix/bin:$PATH

e) Changing the default shell for root user. (OPNET requires csh, but the default of Ubuntu is bash).

#chsh (enter)
and change the path to /etc/csh

Finally, I create a shortcut on the Desktop, which the command on launcher is /usr/opnet/15.0.A/sys/unix/bin/spgtranplan

At the first time I started OPNET, I had to configure add a license. After that, all is working fine.

Enjoy it!

Concurso para Docente – UFS (Sergipe)

O núcleo de sistemas de informação da Universidade Federal de Sergipe, Campus Alberto de Carvalho está abrindo concurso para professor efetivo (dedicação exclusiva), categoria assistente. Devido ao feriado de 01/05, as inscrições se encerram no dia 30/04.

Para maiores informações consultem o edital disponível aqui.

Enjoy it!

Margens frente e verso no Latex / Two-sides page margins on Latex

Quando você quiser gerar um arquivo pdf com margens diferentes nas páginas pares e impares (para impressão frente e verso), você pode usar o pacote geometry.

Nas opções do comando “documentclass” você precisa informar que deseja frente e verso. Por isso adicione o parametro “twoside”. Isto feito, como parâmetros do geometry, em vez de usar left e right para margens esquerda e direita, use “inner” e “outer” (interna e externa).

\documentclass[10pt,a4paper,twoside]{article}
\usepackage[inner=35mm,outer=15mm,top=25mm,bottom=25mm]{geometry}

Enjoy it!

——————– ENGLISH ————————–

When you want to write a pdf with margins of different sizes in even and odd pages, you can use the package geometry.

In documentclass, you need to add the parameter “twoside”. After that, in the geometry parameters you have to use inner and outer instead of left and right. See an example below.

\documentclass[10pt,a4paper,twoside]{article}
\usepackage[inner=35mm,outer=15mm,top=25mm,bottom=25mm]{geometry}

Enjoy it!

Próxima Página »