Page LayoutStopping automatic line breaks in latex

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
eggmanneo
Posts: 10
Joined: Wed Apr 21, 2010 9:03 pm

Stopping automatic line breaks in latex

Post by eggmanneo »

I'm trying to create a math formula sheet for a math test, our professor lets us bring one that's one-paged, double sided. To cram as much stuff into here as possible, I don't want a lot of unnecessary white space. When I put space in the code in latex (to separate chunks of code), it creates a new line in the output file, which I don't want it to do. So I was to have spaces in my code in latex, but in the output I want it all to flow together without any lines ending before they hit the right margin. How do I do this in latex? Thanks!

Here's an example of my code
\documentclass{article}[10pt]
\usepackage{mathrsfs}
\setlength\parindent{0in}
\begin{document}
Then operator T defined in (3) has unique fixed point v$\in H(X)$ in addition $\|T^nv_0 - v\| leq (\alpha\beta)^n\|v_0 -v\| \forall v_0 \in H(X)$ \nolinebreak[2] %%problem: I want to separate the code to make more readible, but I want the line to keep on going without any breaks

\textbf{$\sigma$ algebra} Let S be a set $\mathscr{C}$ be family subset.
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Stopping automatic line breaks in latex

Post by gmedina »

Hi,

your own post contains the answer. Comment out the blank lines in your code:

Code: Select all

\documentclass{article}[10pt]
\usepackage{mathrsfs}
\setlength\parindent{0in}
\begin{document}
Then operator T defined in (3) has unique fixed point v$\in H(X)$ in addition $\|T^nv_0 - v\| leq (\alpha\beta)^n\|v_0 -v\| \forall v_0 \in H(X)$ 
%
\textbf{$\sigma$ algebra} Let S be a set $\mathscr{C}$ be family subset. 
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply