Tag Info

Hot answers tagged

7

Try \obeylines. \documentclass{article} \usepackage{fontspec} \usepackage{multicol} \begin{document} \begin{multicols}{2} \obeylines JPEG JPEG2000 PDF PNG PPM TIFF XBM ZIP \end{multicols} \end{document}


7

There is no feasible line break point after \ldots You can define your own version of dots with possible line break with \newcommand{\bdots}{\textellipsis\linebreak[0]} Example: \documentclass{memoir} \newcommand{\bdots}{\textellipsis\linebreak[0]} \begin{document} ``It was fine.'' she said, defensively. ``Just\bdots more\bdots and\bdots more\bdots ...


6

Never end a paragraph with \\ it forces a line break after the last word of the paragraph producing an empty line that messes up the space and produces Underfull \hbox (badness 10000) in paragraph at lines... in the log. Note that 10000 is infinitely bad. TeX is telling you that the spacing in this document has been forced to be as bad as it measures. ...


5

Desperate times, desperate measures.. Use \sloppy \documentclass{scrartcl} \usepackage{polyglossia} \begin{document} \fontsize{30}{30}\selectfont \disablehyphenation \sloppy \section{expected} Aquickbrownfoxjumpsoverthelazydog Aquickbrownfoxjumpsoverthelazydog \section{unexpected} Aquickbrownfoxjumpsoverthelazy ...


4

Normally you break after operators in inline math (to show the expression carries over) and before operators in an aligned display, where it is essentially a new expression aligned on the first. Here inline math is being used as a convenience to get automatic breaking but arguably it should align like a display, so make = into an active character that ...


4

You can use url package to allow breaking in file paths, or you can use LaTeX's filename parser to extract just the basename: \documentclass{article} \usepackage{listings,url} \makeatletter \protected\def\basename#1{\filename@parse{#1}\filename@base.\filename@ext} \makeatother \begin{document} ...


4

add \XeTeXlinebreaklocale "bo" after \begin{document} \documentclass{article} \usepackage{fontspec} \setmainfont{Microsoft Himalaya} \usepackage{microtype} \begin{document} \XeTeXlinebreaklocale "bo" །།འདིར་སྨྲས་པ། \begin{quotation} གལ་ཏེ་འདི་དག་ཀུན་སྟོང་ན། །འབྱུང་བ་མེད་ཅིང་འཇིག་པ་མེད།།གང་ཞིག་སྤང་དང་འགོག་པ་ལས། །མྱ་ངན་འདའ་བར་འགྱུར་བར་འདོད། \end{quotation} ...


3

I'm not sure you want a break before (, but rather a possible break after ). \documentclass[a5paper]{ltjsarticle} \usepackage{etoolbox} \usepackage{amsmath, amssymb} \usepackage[math-style=TeX]{unicode-math} \begingroup\lccode`~=`) \AtBeginDocument{% \edef\rparen{\Umathcharnum\the\Umathcodenum`) } \mathcode`)=\string"8000 } ...


3

May be you are trying to type some kind of code and in that case you should be using listings or tcblisting (from tcolorbox) This is an option: \documentclass{article} \usepackage{varwidth} \begin{document} \noindent {%%<-- begin a group to make \fboxsep=0pt local \fboxsep=0pt \fbox{% \begin{varwidth}{\textwidth} \# Description of the data \\ ...


3

Does this look good to you? \documentclass{article} \usepackage{enumitem} \setlist[enumerate]{label=\textbf{\arabic*)}} \usepackage{mwe} \begin{document} \lipsum[1] \begin{enumerate} \item \texttt{Some} text I have written. \item \texttt{some} other text that I have written \end{enumerate} \lipsum[2] \end{document}


3

You can't use \left and \right across& which limits the scope. Also, it is not a good idea to use \left and \right, use \big brothers family from amsmath. These need not be balanced. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{split} \left\{\right.&(a,b) \mid \\ &\left. a \in A, b \in B\right\} ...


2

\documentclass{article} \usepackage{xcolor,listings} \begin{document} \begin{lstlisting}[basicstyle=\ttfamily,breaklines,prebreak={\space\hbox{\textcolor{teal}{!}}},postbreak={\hbox{\textcolor{blue}{!}}\space}] This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is another long line. This is another ...


2

You can prevent the breaks after \ by making this a letter, via alsoletter={\\}. However, arbitrary breaks before \ are dangerous and can give the wrong syntax from tex TeX point of view. \def\a{\b} is not the same as \def\a{ \b} which is equivalent to \def\a{ \b} On the other hand \def\a{\b\c} \def\a{\b \c} \def\a{\b \c} are equivalent. I ...


2

Breaking lines are easily done in the text mode. So if it doesn't matter splitting the code into math and text part, this can be used. \noindent$\alpha = {}$(190476.9; 265284.6; 262604.6; 1051346.9; 228362.3; 230331.0; 238756.5 ; 469647.5; 390560.8; 344014.0) \noindent$\beta = {}$(1.0000000; 2.4906065; 2.6086442; 8.4893781; 1.4392259; 0.9334028; ...


2

By default ; is of class \mathpunct which does not allow line breaks, you can make it "math active" whith a definition that allows breaks and allows quite flexible space. Note you should never end a paragraph with \\ so I deleted those from the example. \documentclass[a4paper,12pt]{report} \DeclareMathSymbol{\semicolon}{\mathpunct}{operators}{"3B} ...


2

I believe the \ldots command is eating the following space. You can replace your \ldots with \ldots{}. sample\ldots{} text


2

Use align, not gather: \documentclass{article} \usepackage{amsmath} \newcommand{\suchthat}{\mid} \begin{document} \begin{subequations} \label{eq:omegai} % \begin{align} \label{eq:omega0} \Omega_0 ={}& \{(\omega_{12},\omega_{23}) \suchthat \hat{\omega}_{12} > \omega_t,\ \hat{\omega}_{23} > \omega_t,\ \hat{\omega}_{31} > \omega_t \} \\ % ...


2

You need to pass \PassOptionsToPackage{hyphens}{url} before the url package is loaded for the first time - which in your case is by biblatex. So if you change your code to: \documentclass[11 pt, letterpaper, oneside, openright]{book} \listfiles \usepackage[spanish]{babel} % Manejo de idiomas} \usepackage[utf8]{inputenc} \usepackage{csquotes} ...


2

To break lines started with ${$ use "\right." and to start the next line use "\left." if ending that line with $}$. This is used in the example. \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \usepackage{amssymb} \begin{document} \begin{enumerate} \item Problem 1 $\varnothing \times B= \varnothing$ because $\varnothing ...


2

Using a fixed size is the correct approach here, perhaps you want \bigg which is between \Big and \Bigg but you should use \biggl\{ and \biggr\} to get the correct open and close spacing.


2

I (sort of accidentally) discovered that simply using \item immediately after \begin{theorem} can achieve the desired effect. For example, try \begin{theorem}[Name of Theorem] \item This is a theorem with multiple parts. \begin{enumerate} \item stuff here. \item and here. \item and here, as well. \end{enumerate} \end{theorem} I haven't ...


2

150 sounds like a lot, so first you should see if there is a generic construct that you are using that is preventing good breaks. Possible culprits include: regular use of monospace or otherwise unbreakable inline fragments Use of any kind of boxed material or inline math that does not have infix operators at the top level Use of a language with ...


1

I gave an answer above yesterday. Through a new research of Polyglossia Package, I find out a new solution to Tibetan line-breaks. In fact, Polyglossia is supporting Tibetan now and I was totally misled by Tom who commented on this question. This is my example. \documentclass{article} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{eledmac} ...


1

Limit the scope of \sloppy by wrapping the section containing \category-ies inside a group: {\sloppy % A category with the (minimum) three required fields \category{K.4.0}{Computers and Society}[General] \category{K.4.1}{Computers and Society}{Public Policy Issues}[Ethics] \category{K.6.0}{Management of Computing and Information Systems}{General}[Economics] ...


1

Try \usepackage[hyphens]{url} ... \path {http://www.firstclass.cz/2014/03/odmitl-prodat-googlu-svuj-napad-za-tri-ctvrte-miliardy-ted-na-nem-sam-vydelava/#sthash.JkwV1KGY.nzfkNxcQ.dpbs} Note the "hyphens" option. This usually works fine with the plain old article class.


1

\Return doesn't issue a new line in the algorithm. You could force this through a redefinition: \documentclass{article} \usepackage{algorithm,algpseudocode} \newcommand{\vars}{\texttt} \newcommand{\func}{\textrm} \let\oldReturn\Return \renewcommand{\Return}{\State\oldReturn} \begin{document} \begin{algorithm} \caption{Compute index of nearest grid point ...


1

I have "fixed" the problem using the \vspace{7} command. I will of course accept an Answer which has a better solution but for anyone with the same problem this is a temporary... let´s call it "fix".


1

You can only add a newline after the end of a paragraph, not on "the middle of nothing". Since you didn't provide an MWE, I will only paste part of your text with a possible solution to the problem. As you said, you want a newline after the bold item, so you can add \\ immediately after the command (as my code shows below). Pay attention to the \\ with [] ...



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