0

So my text is following:

Input Latex:

texttext

ugly linebreak

Output:

texttext
  ugly linebreak

Desired Output:

texttext
ugly linebreak

how do I delete this space (at the points ...)? I know that when I write my latex code face-to-face, without adding any spaces, these linebreaks wont occur, but I would like not to do that. I tried the \nolinebreak fuction but it doesnt seem to work.

11
  • 2
    Your question does not make much sense. What ugly line break? What does your actual code look like
    – daleif
    Commented Apr 12, 2021 at 21:29
  • 2
    Welcome to TeX.SX! It's quite difficult to interpret your question. TeX doesn't insert random line breaks, so there should be something in your code that causes it. Without seeing an example of code it's very hard to tell something more.
    – egreg
    Commented Apr 12, 2021 at 21:32
  • @daleif well it is hard to insert a linebreak here too, there is a blank space at the beginning of the word "ugly", just remove the dot and you will see that it doesnt start from the edge, but there is some white space added. how do I remove this space?
    – user239654
    Commented Apr 12, 2021 at 21:42
  • you can mark a code block by highlight and use {} in the editor here so we can see what your input looks like. Tex only breaks a line short of th text width if you instruct it to do so, so it is impossible to understand your question currently Commented Apr 12, 2021 at 21:46
  • if the text in your question is your input file, you have texttext the end of a paragraph, . then a word space, then ugly linebreak so the output you get will be ugly and weird but exactly what you specified. Commented Apr 12, 2021 at 21:49

1 Answer 1

2

The default layout uses indented paragraphs

enter image description here

\documentclass{article}

\begin{document}

texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 

ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 


\end{document}

If you would rather have a layout using vertical space rather than indentation to mark paragraphs, then the parskip package may be used.

enter image description here

\documentclass{article}
\usepackage{parskip}
\begin{document}

texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 

ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 


\end{document}
2
  • thanks, the \noindent also helped me for local use
    – user239654
    Commented Apr 12, 2021 at 22:01
  • 1
    @user239654 if you find yourself using \noindent then something is wrong. The whole point of latex is to separate global style considerations from the actual text content. Choice of paragraph style should be a document-level choice. If you place \noindent in individual paragraphs your document becomes that much less flexible or usable with different document classes. Commented Apr 12, 2021 at 22:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .