# Spaces between words

I have this piece of code and I'm getting a really weird formatation.

\newpage
\section{Modelo Relacional}

Acidente(\underline{acidenteID}, data, responsavel, custo, $veiculoID \rightarrow Veiculo$, $tipoAcidenteID \rightarrow tipoAcidente$)
Cliente(\underline{clienteID}, nome, NIF, morada, telefone, email, $localidadeID\rightarrow Localidade$)\linebreak
Cobertura(\underline{coberturaID}, nome)\linebreak
Contrato(\underline{contratoID}, nome, preço, dataInicio, dataFim, valorFranquia, $tipoSeguroID\rightarrow tipoDeSeguro$, $veiculoID\rightarrow Veiculo$) \linebreak
Extras(\underline{extrasID}, nome)\linebreak
TipoDeSeguroCobertura(coberturaID, tipoDeSeguroID)\linebreak
VeiculoExtras(extrasID, veiculoID)\linebreak
Marca(\underline{marcaID}, nome)\linebreak
Modelo(\underline{modeloID}, nome, anoProducao, peso, consumo, cilindrada,  $modeloID\rightarrow Modelo$, $marcaID\rightarrow Marca$)\linebreak
Pagamento(\underline{pagamentoID}, dataPagamento, montante, $contratoID\rightarrow Contrato$)\linebreak
Proprietario(\underline{proprietarioID}, proprietario, $clienteID\rightarrow Cliente$, $contratoID\rightarrow Contrato$)\linebreak
TipoAcidente(\underline{tipoAcidenteID}, nome, descricaoAcidente)\linebreak
tipoDeSeguro(\underline{tipoDeSeguroID}, nome)\linebreak
Veiculo(\underline{veiculoID}, matricula, nomeMatricula, mesMatricula, chassi, $modeloID\rightarrow Modelo$)


how do I get rid of those spaces?

Best regards

• Not using \linebreak but an empty line between to entries? The \underline{...} does not look really nice – user31729 Apr 21 '16 at 20:55
• This should be rather typeset in tabular, in my point of view – user31729 Apr 21 '16 at 20:59

By default, \linebreak ends the current line but does not create a new paragraph. The lines of paragraphs are justified, so the word spacing is stretched to make the lines filling the text width.

You can either replace the \linebreak command by \par or simply add a blank line between each of the current lines. You can also create a list or a table. It really depends on the data you want to present.

\linebreak stretches the horizontal space too much, leading to this weird void spacings in between.

Use empty lines or a \par instead.

I don't recommend the usage of \underline{...} here and the whole setup should be done in a tabular etc rather than inline.

\documentclass{article}

\usepackage[spanish]{babel}

\begin{document}

\section{Modelo Relacional}

\parindent=0em

Acidente(\underline{acidenteID}, data, responsavel, custo, $veiculoID \rightarrow Veiculo$, $tipoAcidenteID \rightarrow tipoAcidente$)

Cliente(\underline{clienteID}, nome, NIF, morada, telefone, email, $localidadeID\rightarrow Localidade$)

Cobertura(\underline{coberturaID}, nome)

Contrato(\underline{contratoID}, nome, preço, dataInicio, dataFim, valorFranquia, $tipoSeguroID\rightarrow tipoDeSeguro$, $veiculoID\rightarrow Veiculo$)

Extras(\underline{extrasID}, nome)

TipoDeSeguroCobertura(coberturaID, tipoDeSeguroID)

VeiculoExtras(extrasID, veiculoID)

Marca(\underline{marcaID}, nome)

Modelo(\underline{modeloID}, nome, anoProducao, peso, consumo, cilindrada,  $modeloID\rightarrow Modelo$, $marcaID\rightarrow Marca$)

Pagamento(\underline{pagamentoID}, dataPagamento, montante, $contratoID\rightarrow Contrato$)

Proprietario(\underline{proprietarioID}, proprietario, $clienteID\rightarrow Cliente$, $contratoID\rightarrow Contrato$)

TipoAcidente(\underline{tipoAcidenteID}, nome, descricaoAcidente)

tipoDeSeguro(\underline{tipoDeSeguroID}, nome)

Veiculo(\underline{veiculoID}, matricula, nomeMatricula, mesMatricula, chassi, $modeloID\rightarrow Modelo$)

\end{document}

• I replaced the linebreaks for \* and it seems to be working now. What can I use instead of \underline? – Perseverance Apr 21 '16 at 21:03
• \underlining is taken to be bad typography, that's why I commented on it. – user31729 Apr 21 '16 at 21:04
• Yes. But how do I underline without \underline? – Perseverance Apr 21 '16 at 21:06
• @Perseverance: Oh my -- I mean you should not underline at all ;-) – user31729 Apr 21 '16 at 21:07
• Oh, sorry, got you now. But it's part of the terminology of relational models. It represents the primary key :) – Perseverance Apr 21 '16 at 21:10