Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [line-breaking]

{line-breaking} is about how (La)TeX breaks paragraphs into lines and how those breaks can be influenced.

0
votes
1answer
31 views

Line Break in \url in the footnote

There are many Posts about this Topic URL linebreak in footnote Line breaking of URLs at "-" I tried it by myself but it doesn't work oon my Tex-File. I added this in my Code for the url-...
0
votes
1answer
17 views

Avoid breaking inline math insertions [duplicate]

It is not a good idea to break mathematical insertions in text. It happens in this example: \documentclass{report} \begin{document} dfasfsd asdfsdafds asdfsdfds gdsds sfsdd ssfsd wwer sfdsf ggfh dh ...
3
votes
3answers
35 views

How to stack frameboxes one next to another filling all available horizontal space

I'm writting a "cheat sheet" where I put a bunch of formulas and ideas inside frameboxes, stacked one after another. The issue is that paragraph indentation, the framebox separator and the framebox ...
1
vote
2answers
32 views

Beamer: Onslides messes up tcbraster

I have issues with my beamer presentation: I want to have 3 boxes next to each other, they should first appear all at the same time and then I would specify when the boxes should appear. Without \...
0
votes
1answer
39 views

newline begins with dash

Consider this example: \documentclass{report} %\hyphenation{ENCODE} \begin{document} All data used for this study are analysed with a different release of ENCODE \textendash\ the collection of ...
0
votes
1answer
32 views

Break line of long header with pagestyle fancy

I have a class where I define headers and footers with a makemargins command: \newcommand{\makemargins}{ \makenomenclature \pagestyle{fancy} \fancyheadoffset{1cm} \setlength{\headheight}{2cm} \lhead{\...
0
votes
1answer
26 views

protect hyphenated word from breaking

Consider this example: \documentclass{report} \begin{document} bbbb bbbb bbbb ddf hdfhdf hdfhfd hdfhdf ddfgdfg dgdfg ert we Cabibbo-Kobayashi-Maskawa matrix is equal to 1 \end{document} The output ...
1
vote
0answers
24 views

Horizontal list with omitted separator at line end

I have created a new inline list style with enumitem that has no bullets and separates each item with a middle dot: \documentclass{article} \newcommand{\middot}{~\textperiodcentered~} \usepackage[...
2
votes
1answer
25 views

Allow words containing forwards slashes to be broken over lines at the point where the forward slash occurs

Does anyone know how to use the hyphenat package in pdflatex to create an automatic hyphenation rule whereby forwards slashes may be used to break words over lines, or as hyphenation points? I've read ...
2
votes
1answer
43 views

how do i get an empty line in my flashcard

\documentclass[frontgrid,backgrid,a4paper,11pt]{flacards} \usepackage{etoolbox}<br> \pretocmd{\card}{\def\curhint{#1}}{}{}<br> \pagesetup{2}{4} \usepackage{xeCJK}<br> % \...
1
vote
1answer
36 views

How to retain actual input newline/end-of-line (hex 0x0a) in macro definition

I am using filecontents package and want to include it in a macro in order to factorize some complex processing. The problem is that \begin{filecontents} needs be followed by nothing except spaces and ...
1
vote
2answers
40 views

How can I hyphenate words with dots in a \texttt environment in LaTeX?

There is a bunch of discussions online how to enable (or disable) hyphenation in \texttt environments. I found both the options \usepackage[htt]{hyphenat} and \DeclareTextFontCommand{\mytexttt}{\...
2
votes
1answer
33 views

Do line breaks help synctex at indexing?

Do line breaks help synctex? Does it for example help to add hard line breaks after 80 characters instead of writing a paragraph per line?
1
vote
0answers
30 views

Get little endian paragraph title shape

As you can see in the MWE, I customize the chapter titles to be displayed in the center of the page with: \usepackage{titlesec} \titleformat{\chapter}[display] {\normalfont\huge\bfseries\centering}{\...
0
votes
1answer
59 views

Underfull \hbox (badness 10000) in paragraph in bbl bibliography

Just after the word resonance it is getting the above error. underfull. I have tried using \smallskip \bigskip but it does not work. In texstudio the author name until the word resonance in one line. ...
1
vote
1answer
32 views

Problem with Big Curly Brackets in Overleaf

I am trying to make open a big curly bracket with 3 rows and 2 columns in it. This will be used in a Conference Paper that has 2 columns per page, so logically the wideness of each column is ...
0
votes
0answers
42 views

New lines after \ in lstlisting

I have very simple bash listing \begin{lstlisting} $ docker create --name my-nginx \ --network host \ --publish 8080:80 \ nginx:latest \end{lstlisting} It looks fine in PDF, but once I try to ...
0
votes
0answers
16 views

How to break the lines within the list of figures - endfloat package

I am using the package endfloat to provide the tables, the figures and the list of figures at the end of my document. Unfortunately, the figures' captions are longer that just one line, but the ...
0
votes
1answer
55 views

Figure captions line breaks

So I'm working on a TeX document and everything's fine until at some point I realize the captions are doing something weird: whenever the caption spans over multiple lines the new lines start after ...
0
votes
1answer
26 views

Unwanted Line Break after product symbol

I wrote an equation with 3 products involved and it doesn't seem that they want to be written in one line (pic related). My code looks like this: \begin{center} $\psi$ = $$\prod_{i=1}^{x}$$ $\...
0
votes
0answers
22 views

LYX help indenting to the right of the equals sign

I am very new to Lyx and cannot figure out how to shift my equation to the right of the equals sign. I have an equation that long and so goes over two lines (using inline formula) and I would like to ...
2
votes
1answer
36 views

How to automatically prepend space to every line which starts after automatic line-break?

What I need is very first line in the document and every line that follows explicitly-specified break (\\) to have 0 mm space (no space) between its first character and left margin of the page (which ...
6
votes
2answers
248 views

Adjust starting of second line

Question: How can i push the second line in such a way that it will start exactly, where the first line started without disturbing ideal line spacing? My MWE is: \documentclass[12pt, a4paper]{...
2
votes
2answers
38 views

Overfull lines in an enumerated-style paragraph

The last item in my enumerate in my itemize list oversteps the margin. I have tried bounding it in {} but didn't work. My code is as follows: \begin{itemize} \item Hver uafhængig sløjfe tildeles ...
2
votes
1answer
36 views

Prevent line break in title from being displayed in header

I'm writing a document that contains an ampersand in the title that I'd rather not remove, and I've inserted a line break just to make things look a little nicer. However, every odd-numbered page now ...
1
vote
1answer
66 views

Why such odd line breaks in a paper

This may not be a question appropriate to this forum, as I don't have any LaTex code to post. If so, culpa mea! My question: I am seeing some, in my opinion, very awkward hyphenating words for line ...
0
votes
0answers
35 views

Umlauts in wraplines environment breaks the document

Thanks to the user Eric Domenjoud from my previous post Global line breaks for LaTeX documents I am able to break text in my auto-generated reports. See the example form Eric below: \documentclass{...
1
vote
1answer
80 views

Global line breaks for LaTeX documents [duplicate]

I have a problem with line breaking. I wrote a tool to generate reports that contain long lines e.g. URLs or paths. In my resulting PDF these lines should be wrapped. Additionally, the wrapping should ...
0
votes
1answer
34 views

Listings breaklines at predefined places

The code lines I write within a lstlisting sometimes are too long. So at the end a line break occurs. But sometimes these breaks are not well chosen and can make the code much more unreadable. Is ...
4
votes
2answers
78 views

Force linebreak, so that each subsequent line gets longer

Hej guys. Our institute has some special format requirements, and I'm wondering if one of these can be automated by some clever LaTex wizardry: A caption (also sections and subsections) is set ragged-...
0
votes
3answers
58 views

How to get automatic line-breaks using tabularx and makecell?♀

I'm using the tabularx and makecell packages for the aesthetics of my tables. I used the X column type for columns with long texts and \makecell{...} for line-breaks into the cells. But when I try to ...
0
votes
1answer
31 views

How to have underlined text break line in table?

I have a long text in a table which is combined from two commands with a space in between, which has to be underlined. How can I make it wrap while being underlined? The example below shows the ...
1
vote
2answers
82 views

Line break with longtable and multicolumn

I am trying to write up the following table. However, I cannot get a line break to work (needed for Branches and Results column's) and as such the table runs off the side of the page. My attempt is ...
4
votes
3answers
204 views

Auto line break with very long word within table

I am trying to break a very very long number, 128 in length, to fit into a table cell so it won't go over the page. I've looked up methods using longtabu, tabular with p{5cm} commend, \makecell, \...
0
votes
1answer
32 views

remove automatic spacing to fill row

I'm writing my thesis, but I have a problem that I can not solve. Latex when there are few words in a stripe, adds spaces to completely fill the line. How can I remove the spaces to fill the line? NB:...
0
votes
1answer
41 views

Section title running into margin

In the below MWE one can see that the section title runs into the margin of the page. This is due to the use of the \mbox{...}, but the \mbox is unfortunately in the normal case, automatically ...
1
vote
1answer
27 views

Word wrap 64 character hexadecimal strings in verbatim JSON

I'd like to document example requests/replies in our protocol per How to write narrative documentation. We're using the texlive-latex-base on Ubuntu for our documentation, and I'm linting with lacheck ...
7
votes
2answers
97 views

Problem with my understanding of expandafter and newcommand with arguments and sout

I've tried for days to get my head around the expansion of code. Sadly, I don't get it. I try to pass a command with arguments as an argument to sout. \documentclass{article} \usepackage{ulem,lipsum}...
3
votes
1answer
51 views

Line break without page break using `poetry` package

The poetry package overrides \\*, which means that I can't use that to prevent page breaks in the middle of a stanza. Is there another way to create a line break while forbidding a page break at the ...
1
vote
1answer
37 views

Editor breaks line within lstlisting

I'm using an editor that breaks lines after a line length of 80 characters. Whenever I use a long lstinline at the end of a line and the editor continues in a new line I get the error message Package ...
2
votes
1answer
47 views

Line breaks in theorem heads are removed by showkeys package

There are a couple of other questions [1|2] about theorem heads not wrapping properly. I've run across another situation where this happens: \documentclass{article} \usepackage{amsthm} \usepackage{...
4
votes
1answer
46 views

Change default value of the optional argument of \\, also in tikz nodes

I use a lot of \\ in my beamer presentations to force line breaks at nice places, and more often than not, I use \\[5pt] instead of the default value (which feels too cramped). Some trial and error ...
0
votes
0answers
27 views

centering caption not working [on hold]

I'm using this to insert a new line inside of my caption \caption[caption]{This is the caption\\\hspace{\textwidth}This is the second line} When I try to use the \captionsetup{justification=...
1
vote
1answer
44 views

The output of formulas in the latex format with two columns style

I am writing a paper for a springier journal. The latex style of this journal is based on the two columns format. I have some equations in my paper and I want to write these equations in paragraphs ...
1
vote
1answer
54 views

line break in subfigure caption with proper “hang” alignment

I want to insert a manual line break in the subfigures captions. I have achieved this with either \protect\\ or \newline. However, the second lines do not align properly. I want them to start at the ...
2
votes
1answer
23 views

Linebreak composed term with Registered sign and slash

Consider this example: \documentclass{scrreprt} \newcommand{\smlnk}{Simulink\textsuperscript{\textregistered}}% \newcommand{\mtlb}{MATLAB\textsuperscript{\textregistered}}% \newcommand{\...
1
vote
1answer
45 views

Is there a way to insert paragraph breaks inside of \texttt block?

The following source code compiles just fine: \documentclass{minimal} \begin{document} \texttt{ Lorem ipsum dolor sit amet Lorem Lorem } \end{document} However, the following ...
1
vote
1answer
22 views

Listings Package causes normal text to hyphenate at forward slashes

MWE: \documentclass{article} \usepackage{listings} \begin{document} IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII hardware/software \end{document} This results in this ...
0
votes
0answers
61 views

Overfull hbox within an R output

I'm using Sweave to work with R in a LaTeX document and when I compile my script I get the following badbox, as showed in the log file: Overfull \hbox (14.62822pt too wide) in paragraph at lines 127--...
0
votes
0answers
25 views

reledmac: skip newline in eledsection

I am trying to skip the newline in a \eledsection but both \usepackage{titlesec} \titleformat{\section}[runin]{}{}{}{}[] and \RedeclareSectionCommand[beforeskip=-.5\baselineskip,afterskip=-1em]{...