# Tag Info

8

You are not missing anything; apparently TikZ adds some padding equal to the line width (you can see this by using different values for line width in your \draw). You can prevent the undesired space using the overlay option (either globally for the whole tikzpicture, or locally for just the \draw): \documentclass{article} \usepackage[a4paper, showframe, ...

8

You can use I\nolinebreak[2] said this To discourage linebreaking at this point (or [1] or [3]) using [4] would essentially be the same as using ~ in this context. You could define a command such as \newcommand\I{I\nolinebreak[2]} and then use \I{} rather than I but you need the {} so that the following space is seen unless you use a non-letter such ...

7

It's important to remember that \hspace and \hfill "collapse to zero" at the beginning of a line. \hspace*, on the other hand, does not. Others have already mentioned this, but there are few more subtleties to take into account. \newcommand\OnRight[1]{% \unskip % (1) \hfill % (2) \penalty100\relax % (3) \hspace*{0.5em}% (4) ...

6

A \fbox doesn't admit line breaks. You have, however, several posiibilities: Use a \parbox (or a minipage) inside the \fbox: \documentclass{beamer} \usepackage{vietnam} \begin{document} \begin{frame} \frametitle{Exhaustive Search} \fbox{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}{\centering One billion searches per second $\Rightarrow$ 36 yrs ...

6

You didn't mention what constitutes "acceptable", in terms of line breaks inside inline math material. The best I can therefore suggest is that you choose a method for highlighting all inline math material with some lurid color. That way, any unfortunate line break will jump out at you immediately. If it's mostly overfull lines you're concerned with, you ...

3

This is by no means ideal, but you could define the breakpoint as a \discretionary{<pre-break>}{<post-break>}{<no-break>}: \documentclass{article} \usepackage{showframe}% Just for this example \newcommand{\AB}{% \textsf{A}% \discretionary{\mbox{ is}}{\mbox{contained in }}{\mbox{${}\subseteq{}$}}% \textsf{B/string}% } ...

3

By default, arguments passed to a command defined by \NewDocumentCommand (which should be preferred to \DeclareDocumentCommand) are short, that is, they shouldn't contain \par (or a blank line, that's the same). You can make any of the argument long by prefixing the argument specifier with +: so \NewDocumentCommand{\WCBlock}{ O{} O{} O{} O{} O{} O{} m +O{} ...

3

The seqsplit package is exactly for this. In the example I use the Bera Mono font, because the default monospaced font doesn't have a boldface version. \documentclass{article} \usepackage[T1]{fontenc} \usepackage{beramono} \usepackage{seqsplit} \begin{document} \noindent\texttt{\seqsplit{% ...

3

The seqsplit package is done for that. Here is a little demo of the possibilities (which probably have nothing to do with what you really need). If you don't know it you also might take a look at the dnaseq package. I also give a demo of it \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[showframe]{geometry}% ...

3

Your hack isn't too bad. But you can do this way faster and without any need of redefining \\. The following solution defines the gobble-version of \maybehide (the one you activate in case you wanna hide the content) with two arguments and checks if the second argument equals \\. If true it will be eaten up, if false it prints whatever the second argument ...

3

\underline does not allow line breaks. Package ulem The text must not hidden in a macro or in curly braces. \documentclass[10pt,a4paper]{article} \usepackage{hyperref} \usepackage{lmodern} \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[normalem]{ulem} \newcommand\lipsumi{Lorem ipsum dolor sit amet, consectetuer adipiscing ...

3

Here's an alternative approach, tweaking the behaviour of \url: \documentclass{article} \usepackage{url} \def\UrlBreaks{\do\@\do\\\do\/\do\!\do\_\do\|\do\;\do\>\do\]% \do\)\do\,\do\?\do\&\do\'\do+\do\=\do\#}% \begin{document} \begin{sloppypar} \noindent\path{C:/Folder/Subfolder/Subsubfolder/EvenMoreSubfoldernames/filename.tex} \end{sloppypar} ...

3

As @AlanMunn has already noted in a comment, you need to use a font encoding other than OT1 (TeX's original font encoding, and still the default for most LaTeX document classes). Assuming you need "only" glyphs that occur in Western and Central European languages, you should probably use the T1 font encoding. Assuming further that one ore more of the long ...

2

This is due to a shortcoming of listings, which prevents it from breaking long sequences of digits and other symbol characters (even when breaklines is set and breakatwhitespace is cleared). Here, an ad-hoc hack is to add literate=::1, in the list of key-value pairs passed to \lstset.

2

As David show, although a more o less strong \nolinebreak discourage the break after "I", exactly as you asked, even with your microtype settings, sometimes this command can only be ignored or produce some overfull \hbox, when this become equivalent to ~. Then, a workaround to hold together two words without causing a overfull \hbox is add some extra ...

2

You can use \intertext or \shortintertext for the left aligned text, depending on the required spacing. \shortintertext gives tighter spacing. For breaking the lines, you can place them in multlined environments from the mathtools package. You can specify the width as an optional argument if that is preferred, and also customize other aspects of the ...

2

Both approaches described here are taken from Stefan Kottwitz's answer to Non-breaking space in \citet using natbib?. The \mbox approach You can redefine \cite to be wrapped in a \mbox with \let\oldcite\cite \renewcommand{\cite}[1]{\mbox{\oldcite{#1}}} Or, even better, do so with the letltxmacro package (See When to use \LetLtxMacro?) ...

2

This is rooted with how you output URLs in \DeclareFieldFormat{url} and \DeclareBibliographyDriver{online}. Effectively this means the last whitespace before a URL is a normal space and biblatex is much less reluctant to break at said space instead of breaking the URL. We can make the last space before the URL non-breaking forcing biblatex to break the URL ...

2

Just suppress in the textttt answer the possibility to have linebreak on .. \documentclass[a4paper]{article} \renewcommand{\texttt}[1]{% \begingroup \ttfamily \begingroup\lccode~=/\lowercase{\endgroup\def~}{/\discretionary{}{}{}}% \begingroup\lccode~=[\lowercase{\endgroup\def~}{[\discretionary{}{}{}}% ...

2

I don't understand why this works either. More precisely, I don't know why you need to put the \discretionary after the number instead of inside the replacement text. \documentclass{article} %\usepackage[utf8]{inputenc}% all it does for me is produce warnings \usepackage[left=6cm,right=7cm]{geometry} \usepackage{parskip} \usepackage{showframe} ...

1

If you're going to insert manual line-breaks, you might as well construct a tabular: \documentclass{beamer} \begin{document} \begin{frame} \frametitle{Exhaustive Search} \centering \fbox{\begin{tabular}{@{}c@{}} One billion searches per second $\Rightarrow 36$ yrs \\ All this to recover only $10$ bits ! \end{tabular}} \end{frame} ...

1

The problem you are having is not directly related to biblatex, but to TeX's paragraph building system. So rather than do something to the citations themselves, it's really best to wait until the very final stages of your document and adjust individual paragraphs. One way to do this is to use the \sloppypar environment, which sets various factors that ...

1

You can get breaking at binary operations at the top level with some tricks. In the equation environment open a minipage Neutralize \$ so it's not interpreted any more The minipage contains an inline formula in \displaystyle, with a \raggedright setting \documentclass{amsart} %{standalone} \usepackage{amsmath} \newcommand{\maximainput}[1]{% ...

1

The code of the Maxima output is dead ugly. The $$can be stripped by reading the file in a macro first (package catchfile) and removing the$$ via package regexpatch. Also the equation can be squeezed into the line via package resizegather. But because of the lengthy equation, the equation is decreased much too much: \documentclass[fleqn]{amsart} ...

1

You could try: \documentclass{article} % set space between paragraphs \setlength{\parskip}{0.5cm} % set indents for paragraphs \setlength{\parindent}{0.0mm} \begin{document} ABC DEF \vspace{2cm} % use vspace (vertical space) when a different spacing is needed. GHI \end{document}

Only top voted, non community-wiki answers of a minimum length are eligible