I would like to disable the automatic paragraph inside my thesis abstract which is called resumo
. On the question How to disable new paragraph at empty line? they said I could use \let\par\relax
to disable paragraphs, but if I do so:
\documentclass{abntex2}
% How to disable automatic indentation on new paragraphs?
% https://tex.stackexchange.com/questions/14375/how-to-disable-automatic-indentation
%
% Changing font size in an example environment
% https://tex.stackexchange.com/questions/123528/changing-font-size-in-an-example
\expandafter\def\expandafter\resumo\expandafter{\resumo\setlength{\parindent}{0pt}\let\par\relax}
\begin{document}
\begin{resumo}
O texto do resumo deve ser digitado, em um único bloco,
sem espaço de parágrafo. O resumo deve ser significativo,
composto de uma sequência de frases concisas, afirmativas
e não de uma enumeração de tópicos. Não deve conter
citações.
Deve usar o verbo na voz passiva. Abaixo do resumo,
deve-se informar as palavras-chave (palavras ou
expressões significativas retiradas do texto) ou, termos
retirados de thesaurus da área.
\end{resumo}
\end{document}
I got a bunch of errors:
Redoing nameref's sectioning
Redoing nameref's label
LaTeX Info: Redefining \nameref on input line 7.
LaTeX Info: Redefining \ref on input line 7.
LaTeX Info: Redefining \pageref on input line 7.
LaTeX Info: Redefining \nameref on input line 7.
\myptabbox=\box47
\myptabboxwidth=\skip263
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.11 \end{resumo}
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.11 \end{resumo}
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Well, despite the errors, the paragraphs are removed:
Related questions:
- Adding something automatically to every paragraph in an environment
- Best way to add hanging indent to (almost) every paragraph
- What does the \the\everypar do?
- How do I split a command into several lines and have LaTeX read it as only one line?
- Why does \everypar not work?
- Remove par indent from environment
- How to remove indentation for all paragraphs?
- Remove paragraph indent from abstract in article class
- Automatic noindent after quote environment
\let\par\relax
do these errors.\let\par\relax
errors? I am going to edit the question and ask only about it.\resumo
is defined to have an optional argument, so the\expandafter\def\expandafter\resumo\expandafter{\resumo...}
will just do evil.