Tag Info

Hot answers tagged

6

If you want that the line which can't contain the text in typewriter font be broken at the spot, here's a variation of the \filbreak macro in the TeXbook (page 111): \documentclass{article} \newcommand\wtt[1]{% \hfil\penalty0\hfilneg\texttt{#1}% } \begin{document} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean ...


4

Very simple: replace \textwidth with \linewidth. I took the opportunity to improve the vertical spacing of the rows of the table, and to propose a solution without vertical rules, that looks better, in the opinion of many: \documentclass{ieeetran} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{lipsum} ...


4

an environment is a group so your code is like {#1\\#2} which doesn't work, you can define a non-environment that defeats the grouping so the definition is more like {}#1\\#2{} with two spurious empty groups rather than a group around the whole thing. \documentclass{article} \usepackage{mathpartir} \begin{document} \newcommand{\testa}{ This is ...


3

I would use align* which allows to use more lines, if necessary. Also I would use all the textual sentence inside a single \text{} and use $ $ for math contents inside it. \begin{align*} A=\bigl\{\alpha\in \mathbb{Z}G :{}& \text{$\alpha$ is a unit in $\mathbb{Z}G$ with $\varepsilon(\alpha)=1$}\\ & \text{and $\alpha+\Delta(G,G')$ has finite ...


3

As explained in Metafox's answer to your previous question, you can use the paragraph alignment to achieve this effect. For example, \showframe % to visualize the page \starttext \setuplines[align=paragraph] \startlines First line --- should be fully justified Secondline --- should be fully justified \stoplines \stoptext gives Edit Here is one way to ...


3

Here is one option: Using a special (robust) macro \bodyonlynewline as your manual line-breaking technique. This macro will only break the line inside the body text, but not the ToC. \documentclass{book} \usepackage{xparse} \usepackage[explicit]{titlesec} \usepackage{lipsum} \ExplSyntaxOn \seq_new:N \bislist \seq_set_split:Nnn \bislist {;} ...


3

The issue arises because of the way \mkpageprefix is defined. As described in the manual, it inserts \ppspace between the string for 'pp' or similar and the page number/range itself. If you want to disable all prefixing you can do \DeclareFieldFormat[inbook]{pages}{#1} but this of course doesn't work if you want to do it selectively. Turning the string ...


2

You can get this: \documentclass[conference]{IEEEtran} \usepackage{tabularx,lipsum} \begin{document} \lipsum[1-2] \begin{table}[h] \renewcommand{\arraystretch}{1.2} \caption{A table} \begin{tabularx}{\linewidth}{|l|X|} \hline \multicolumn{1}{|c|}{\textbf{Term}} & \multicolumn{1}{c|}{\textbf{Description}} \\ \hline \hline key1 & A very long text. ...


2

\underline can’t be broken across lines, thats why soul exists … if you need a break you have to split the command manually. \item \textbf{\underline{This is a long string} \\ \underline{that I want to break}} I strongly recommend not to use underlines, though! Furthermore you may note that \item doesn’t have an argument …


2

Use multline or split provided by amsmath package. Use multline to split equations without alignment (first line left, last line right) Use split to split equations with alignment Here are examples: The codes are as follows: (i).Use equation: \begin{equation} 1+2+3+4+8x+7=1+2+3+4+4x+35 \\ \Rightarrow x=7 \end{equation} (ii).Use \emph{multline} to ...


2

The suggestion here would be to allow your paragraphs to be a little \sloppy: \documentclass{article} \begin{document} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean \texttt{commodo.ligula.eget} dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, ...


1

You shouldn't use $$ … $$ for dieplay equations: this is a plaintex syntax, and it can give inconsistent vertical spacing. Use \[ … \] instead. The command you're looking for is \substack from amsmath. I replaced amsmath with mathtools, an extension of the latter. It has, among many features, commands for not taking into account the width of the indices in ...


1

Following up on @Aditya LuaTeX reference, here is an alternative solution based on lua: \setuppapersize[A5] \setupindenting[0.2in,yes] % Create an environment that stores everything % between \startpreformatted and \stoppreformatted % in a buffer named 'preformatted'. \def\startpreformatted {\dostartbuffer [preformatted] [startpreformatted] ...


1

Looks like a bug of listings package, because no line breaks should be produced unless you explicitly request them with breaklines=true. Moreover, if you use showspaces=true, then line breaks are not produced (but you have all spaces visible as ␣, of course). This suggested me the following hack: use showspaces=true, but redefine the "visible space" to be ...


1

None of the answers helped me out. My long url was placed in a footnote. After searching around I found a working solution here. In my preamble: \usepackage{hyperref} \def\UrlBreaks{\do\/\do-} The last line instructs the url-package which is loaded with the hyperref-package to additionally break at the characters / and -. The option breaklinks=true in ...


1

There's no good break point, because stretching the interword space would exceed the \tolerance. You'd get the same result trying to typeset \noindent \mbox{First Lastname\hspace{\tabcolsep}\ % \mbox{First Lastname\hspace{\tabcolsep}\ % \mbox{First Lastname\hspace{\tabcolsep}\ % \mbox{First Lastname\hspace{\tabcolsep}\ % \mbox{First ...


1

Change the {0.5\textwidth} to {1\textwidth} Im still not sure exactly what this does, but this fixed the issue \documentclass[a4paper,12pt]{article} \usepackage[demo]{graphicx} \usepackage{subcaption} \usepackage{epstopdf} \begin{document} These captions will look very bad. \begin{figure*}[thp!] \centering \begin{subfigure}[t]{1\textwidth} ...


1

[expunged original answer] Ok. Your new MWE shows another level of difficulty and a promise of future complications. What you need is a full-fledged two column baseline grid. I think your best bets are grid, gridset and ConTeXt.



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