6
votes
0answers
35 views

Obtain \badness or glue adjustment for each line

This might be interesting for perfectionists and/or fastidious typesetters who would like to improve the document even further (beyond the beyond the magnificence of a book with zero bad boxes). We ...
4
votes
1answer
87 views

very bad underfull hbox

I would like to include a progress bar in my presentation and, when in draft mode, a page number below the progress bar. I have the code to do this, and it looks great, but I get one instance of this ...
3
votes
1answer
54 views

What spacing/justification change might fix this hbox overfill in an enumerate environment?

I'm planning on cleaning up a large TeX file for viewing on an e-reader (hence, small page size), and as I'm new to TeX I'm practicing on a sample file and following these instructions. However, I'm ...
4
votes
1answer
64 views

Problem with latex box

I defined a new command in order to create an empty box with a title. The code is the following: \newcommand{\mybox}[2]{ \textbf{\emph{#1}} \vspace{2mm} {\centering\fbox{ ...
9
votes
1answer
138 views

How to float something right even if it wraps down a line?

I have a situation where I have some data in section headings (and sometimes normal paragraphs} that needs to be: floated right not split across lines I was able to accomplish this for most cases ...
5
votes
2answers
230 views

Manually break lines like auto-breaking in lstlisting

I would like to decide where the long line should break, but with actions pre-/postbreak and without advancing in line numbering. I've tried that one: \documentclass{article} \usepackage{color, ...
3
votes
1answer
62 views

Make a command start new line in a list if it is not currently at the end of another list

I am trying to typeset a structured proof as demonstrated by Leslie Lamport in his paper How to Write a 21st Century Proof. In particular, I am trying to typeset Figure 3 (shown below). My code and ...
7
votes
1answer
138 views

Automatic line breaking and \hfill

I work on a CV and I would like to write some content (e.g. conference information) on the left side of the page and a date on the right side of the page. Because the content on the left side might ...
3
votes
1answer
72 views

Automatic non-breakable spaces?

Very often I have to manually add non-breakable spaces to make things look better. For instance: see~\cite{Bla98} for all~$x$ see Section~\ref{sect:bla} It looks specific enough so that it could ...
9
votes
2answers
118 views

Preventing line shrinking with raggedright

Sometimes with \raggedright, if a line is too long, but only slighly so, it will be shrunk instead of broken up. Here is an example: \documentclass{article} \raggedright \begin{document} This is a ...
1
vote
0answers
77 views

Spacing between single line paragraph with lettrine

I'm having the following problem with lettrines and paragraph with a single line : \lettrine[lines=2, loversize=0.15, findent=1em, nindent=0em ]{1}{}% First step. \lettrine[lines=2, loversize=0.15, ...
7
votes
1answer
81 views

Reversing the effect of a \newline with the next command?

I'm using the harvard package and the agsm bibliography style. I'm aware that there are alternatives, e.g., natbib plus har2nat, and I will be looking into those in the not-too-distant future, but at ...
15
votes
5answers
245 views

Behavior of \\ inside center environment

While trying to compile a title page for my dissertation I realized that I do not understand the behavior of \\. Consider the following MWE \documentclass{memoir} \begin{document} \begin{center} ...
1
vote
0answers
62 views

Extra spacing before an equation when line nearly breaks

I am having difficulty with producing an MWE, but let me describe the issue. I have a large document with tons of equations and run into issues with spacing. Most of the time it is fine, everything ...
2
votes
1answer
384 views

Linebreak at itemize

My MWE is the following: \documentclass{article} \begin{document} \begin{itemize} \item[about] Foo\\ Lorem ipsum dolor sit amet, consectetur, adipisci velit \item[about] sort rules(...) ...
2
votes
1answer
90 views

multi-line proof using proof package

I have been using the infer from the proof package. I am wondering if there is a way to add line breaks in the proofs? For instance I would like to set: A B C ----- D But I couldn't find a ...
3
votes
1answer
51 views

Using multiple newlines (\\) within LARGE block

I am trying to typeset a long title using a {\LARGE ...}-Block. Here is a minimal example: \documentclass{scrbook} \begin{document} {\LARGE Very \\ Long \\ Title} \end{document} And the ...
3
votes
1answer
86 views

Line break at hyphen in source inserts space in output

I prefer to wrap lines in my LaTeX source, and my editor will often choose a hyphen as a good place to split the line. Unfortunately, if a hyphenated word doesn't appear in the output file at a line ...
1
vote
1answer
65 views

Avoid line break in section

I do have a section name with a pretty long name but which could "nicely" fit on one line. I was wondering, therefore, how I could avoid the line to break, perhaps using some space compression and/or ...
1
vote
1answer
57 views

Preventing space instead of linebreaks

How to prevent space at a line break? a b c produces: a b c I want abc.
3
votes
1answer
240 views

Should I use \\ to end a line or a paragraph? [duplicate]

I am somewhat confused as to how to approach the following issue. In my thesis is have a lot of text and want to group this is using line breaks and paragraphs. Up to now I have been using \\ to ...
8
votes
3answers
244 views

“Fill in the missing words” needs line breaking before a \phantom{word}, and a list of removed words

Apologies for the very long title. I'm writing a "fill in the missing words" document. I have made a makro \fjern{} ("remove" in Norwegian) which underlines the argument and places it in a phantom ...
2
votes
2answers
231 views

paralist package: \setdefaultleftmargin{0em}… doesn't properly align wrapped lines

I am using the paralist package to create very compact lists (for a poster). I'd like to use \setdefaultleftmargin{0em}{2em}{}{}{}{} to set the indentation of itemized lists to zero. This works ...
7
votes
1answer
169 views

Break line only if it's too long, but breaking won't create a new page

I'm the author of the contracard package/class for typesetting calling cards for traditional dances. Currently, if you typeset a particularly long figure on a calling card it wraps like this (look at ...
9
votes
1answer
251 views

How to use less space for ~

In a paper, I need to use the abbreviated form of Figure as in "see Fig. 2". To avoid line breaks between Fig. and the number itself, I place a ~ in between. However in that case, the inserted space ...
1
vote
1answer
456 views

\medskip doesn't seem to work

I've just begun using TeXShop but seem to have come across a problem - I have a centered section that uses a \medskip right after a newline. Like so: \begin{center} Some text \\ Some subheading \#1\\ ...
11
votes
1answer
90 views

remove endashes at linebreaks

I want to typeset a paragraph of endash-separated expressions, like this \documentclass{article} \setlength{\parindent}{0pt} \begin{document} \centering test -- test -- test -- test -- test -- test ...
6
votes
2answers
306 views

Manual linebreak with justification but without empty line afterwards

What do I write at the end of a paragraph if my text is a couple letters short of being flush from left to right and I want the last line stretched slightly so that no empty space is left that the ...
7
votes
2answers
94 views

Why \\ increases interline spacing before the command in center environment?

This is about the effect of the line breaking command "\\" in center environment. It appears that the command has the effect of increasing the interline spacing of text appearing before the command. ...
2
votes
1answer
420 views

When wrapping text around an image, latex fills the bottom line first, not the top. How do I fix this?

I am using the wrapfig package in LaTeX, and in some areas, it is working fine to wrap the text around the image. However here it is breaking the lines in a weird way, and extending the blank area ...
5
votes
2answers
86 views

Boxes of zero height, depth and width unexpectedly affecting document spacing

I was adding some mark up for a roughdraft of a document I'm working on. But when I eliminated the mark up, the spacing and linebreaks came out differ. My intention was to create boxes of zero ...
7
votes
1answer
243 views

Acronym generates abnormal spacing

I'm using the acronym package but I just realized that it has some problem with spacing. It is the last version (2012). Every time an acronym starts a new line, at the end of the previous line there ...
4
votes
1answer
160 views

Latex randomly skips a line (or not)

Consider the following example: \documentclass{article} \RequirePackage{amsthm} \usepackage{lipsum} \RequirePackage[framemethod=tikz]{mdframed} \mdfdefinestyle{proof}{ skipabove = ...
6
votes
1answer
377 views

Is there an alternative to LaTeX which isn't whitespace sensitive?

I have been using LaTeX for about a year now, and I quite like it. However, I like to space out my source code. In most languages, this doesn't cause an issue, as extra newlines don't affect meaning. ...
11
votes
3answers
231 views

How to generate non-blanks between words?

In an otherwise-vanilla latex doc, I have a long list of strings that I need separated by <space> <cdot> <space>. The output needs to look like: Lorem <cdot> ipsum ...
2
votes
1answer
1k views

Line return/spacing after \hrulefill

I'm new to LaTeX and am trying to make a simple resume. I'd like my left-justified name to appear above an \hrulefill line followed by my right-justified address on the next line. However, when I do ...
6
votes
2answers
243 views

Custom verbatim that sets all spaces (“ ”) as visible spaces (“␣”) that can line-break

It makes sense to typeset code in a monospaced font. Sometimes such code needs to be embedded in a paragraph context, and then it will be useful to allow it to linebreak. In order to visualize spaces ...
2
votes
2answers
2k views

\hspace is not working after \newline command

I am currently working on my thesis report and would like to add affirmation to it. Following is the minimal code for the same : \documentclass[]{article} \begin{document} \section*{Affirmation} ...
1
vote
1answer
309 views

How can one produce spaces of arbitrary (fixed or relative) width that (do or don't) linebreak?

Adobe InDesign lets me insert a wide variety of spaces: over half a dozen spaces that allow for a line break (let's assume for the purpose of this question that they disappear in case of a line ...
5
votes
2answers
97 views

How to get autobreaking with sequential tables

So it appears that \hspace is not breakable, but is if it is followed by \allowbreak. Alternatively you can use \hskip1.0em as that is breakable. So, if my understanding is correct, then why do the ...
7
votes
4answers
152 views

Justify long line with no spaces but a lot of hyphens

% !TEX TS-program = xelatex % !TEX encoding = UTF-8 Unicode \documentclass[11pt]{memoir} \usepackage{fontspec} \usepackage{showframe} %%% Book Layout %%% \setstocksize{4in}{5.75in} ...
2
votes
1answer
118 views

Inline math: Line breaking and stretching only in specified places

Is it possible to have document-wide solution for all inline formulas was breakable and stretchable only in pointed positions? Like $longformula1 \/ longformula2 \/ longformula3$ was able to break ...
1
vote
0answers
144 views

Avoiding newline in latex report [closed]

I am writing one auto report in which I need to have some breakline and vertical spacing. I use newline but sometimes it is in horizontal mode. So I have to use \leavevmode before it. \leavevmode ...
5
votes
1answer
781 views

vspace equivalent of newline

I am writing one report using LaTeX and R. I just found \vspace can be used for \newline. May I know how much \vspace == \newline? \vspace{x cm} = \newline x = ?
4
votes
3answers
231 views

How are space tokens and empty lines processed by long commands (as their potential arguments)?

How are spaces and empty lines processed by long commands (i.e., those that do not accept paragraph breaks inside)? Are there different space tokens aside from " " and an empty line? It appears that ...
6
votes
1answer
118 views

en-dash with half-sized space on either the left or the right

I am looking to produce directional variants of the en-dash. A "left en-dash" should have half of ordinary inter-word spacing on its right and allow line-breaks only on its left; a "right en-dash" ...
14
votes
3answers
420 views

How to insert a non-stretching but line-breaking thin space?

How do I insert a small space that looks like the space I get with \, but allows a line break like a normal space does? I.e., I'm looking for a non-stretching, non-non-breaking space whose width is ...
1
vote
1answer
656 views

How to remove line breaks before and after theorems?

By default, in the amsthm package, when you begin a theorem, LaTeX begins on a new line, and when you end the theorem, it also jumps to a new line. How can you prevent this behavior? For example, I ...
22
votes
1answer
7k views

How to typeset a “small” non-breaking space

I can use ~ to produce a non-breaking space. But it is too large for me, and I would like a non-breaking space of the size of \, for example. Is it possible ?
8
votes
1answer
305 views

Identical vertical spacing between paragraphs of different textsize

Something that happens to me very often is that I change the size of certain formula-like material (something close to but not identical to pseudocode in my case) but get inconsistent vertical ...