Tag Info

Hot answers tagged

9

Something like this? \documentclass{article} \usepackage{mathtools,amsfonts} \begin{document} \begin{align} \mathbb{E}(\cos²) &= \frac{π (A_{0}\tilde{F}₁(;2;\beta²) +B_{0}\tilde{F}₁(;3;β²))}{16 β},\\ \shortintertext{Where} A &= (2 β (8 (α+1)² β+(2 \alpha+1)²)+3)\notag\\ B &= (β (16 (α+1)² β² -2 (4 α(α+2)+5) β+12 ...


8

LaTeX doesn't hyphenate tt fonts, which makes it hard to set the paragraph. You could use sloppypar to allow white space to stretch more to compensate, or you could reset the hyphen for the tt font (which is a global change, affecting tt for the rest of the document). \documentclass{scrartcl} \begin{document} \section{Test1} This is some text text and ...


7

Please always post complete documents. If you are generating lots of these I'd set it up so line breaking is automatic. Don't over-use \left\right and avoid big fractions: If you are breaking by hand you could do better but if you need automatic solution of output from a CA system or similar... \documentclass{article} \usepackage{amsfonts} ...


6

Unless your document's text block is very wide, I believe it's necessary to split the entire equation twice, i.e., to typeset it across three lines. Note that I would use curly braces and square brackets in addition to the round parentheses in order to help the reader with the parsing of the material. \documentclass{article} \usepackage{amsmath} % for ...


6

Here is how I would do it: \documentclass{article} \usepackage{mathtools,amssymb} \begin{document} \begin{align*} \mathbb{E}(\cos^{2}) &= \frac{\pi}{16\beta} \Bigl\{\bigl[2\beta(8(\alpha + 1)^{2}\beta + (2\alpha + 1)^{2}) + 3\bigr] \mathstrut_{0}\tilde{F}_{1}(;2;\beta^{2})\\ &\hphantom{{}=\frac{1}{16\beta}\Bigl\{} + ...


6

the hyphenation patterns for English do not help here. That's the problem seqsplit is trying to fix, but you are not using it in all the cell. Note it is unrelated to longtable you would get the same behavior in a paragraph on the main page. \documentclass{report} \usepackage[left=65pt,top=28pt,right=65pt,bottom=65pt]{geometry}% ...


5

It all can be displayed on two lines if you use the multlined environment, from mathtools. I also adjusted the size of some pairs of parentheses, and replaced \tilde with \widetilde , that fits better capital letters: \documentclass{article} \usepackage{mathtools} % \usepackage{amssymb} % \usepackage{showframe} \begin{document} \begin{equation} ...


5

\\* adds a penalty of 100000 (infinite) to break at that point but if something else allows breaking, or there is no other choice, it can be overridden. in this case the vertical list looks like ....\glue(\rightskip) 0.0 ...\penalty 10000 ...\penalty 150 ...\glue(\baselineskip) 5.05556 so immediately after the 10000 is a widow penalty of 150 which is ...


5

Using the enumitem package you can define a custom alignment of the label so that it takes the full line width: Notes: The showframe package was used just to show the page margins. It is not needed in your actual use case. Code: \documentclass{article} \usepackage{enumitem} \usepackage{showframe} ...


5

The commands you want are already provided and they are called \linebreak and \pagebreak: \documentclass{scrartcl} \frenchspacing \begin{document} But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great ...


4

\documentclass[11pt]{article} \usepackage{siunitx} \usepackage{amsmath} \begin{document} \begin{align*} \parbox{5cm}{\centering Concentration of unknown sample solution} &= \frac{303 - 0.00227}{0.215} \\[\jot] &= \SI{1.400}{\mg \per \L} \end{align*} \end{document}


4

Because LaTeX doesn't hyphenate words that are typeset in "teletype" font (aka typewriter font, monospaced font), you may need to give up on full justification of the paragraph in question. Instead, you may wish to typeset it in \raggedright mode. To keep the scope of \raggedright local to just one paragraph, be sure to encase it in curly braces, making sure ...


4

The optional argument of \item[] inside a description list is set in a box in bold. This box doesn't care for any of \\, \hfill, \newline, linebreak or \break, hence the output. This may be a special case of your item, so you may want to handle it in that way: \documentclass[12pt]{article} \begin{document} \begin{description} \item[The quick brown ...


3

You're using algpseudocode rather than algorithmicx; redefine \algorithmicreturn to issue \State I've also made some refinements to your code. Note, in particular, that the negation symbol is \lnot, while \not is a different command. \documentclass{article} \usepackage{algpseudocode} \newcommand{\var}[1]{\mathit{#1}} \newcommand{\qt}[1]{\mbox{`#1'}} ...


3

They should be inside separate figure environments like this: \documentclass[12pt]{book} \usepackage{subfig} \usepackage{caption} \usepackage{graphicx} \begin{document} \begin{figure} \centering \subfloat{% \centering \includegraphics[width=435pt]{example-image-a} } \caption{sdfsdfsdf}\label{fig:cont} \end{figure} \begin{figure} \ContinuedFloat ...


2

Don't forget % at ends of lines: \documentclass[10pt,letterpaper]{article} \usepackage[letterpaper,margin=0.75in]{geometry} \usepackage[utf8]{inputenc} \usepackage{tabularx} \usepackage{mdwlist} \usepackage[T1]{fontenc} \usepackage{textcomp} %\usepackage{tgpagella} \pagestyle{empty} \setlength{\tabcolsep}{0em} % format two pieces of text, one left aligned ...


2

This is obtained by setting nonzero \parskip, e.g. \parskip10pt. Please keep in mind that such paragraphs should not be indented (you should set \parindent0pt), because mixing these two is considered a bad style.


2

Loading the enumitem gives you various style options for description. For example unboxed allows multiline labels: \documentclass[a4paper,twoside,10pt]{report} \usepackage[francais]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage{enumitem} \begin{document} \begin{description}[style=unboxed] \item [small ...


2

Here are the options you have rewording the sentence adding \allowbreak at appropriate points in the formula, e.g. P(x,\allowbreak y,\allowbreak z) = q displaying the equation without a number: standard LaTeX \begin{displaymath}...\end{displaymath}, or with the amsmath package use \begin{equation*}...\end{equation*} using the package microtype to give more ...


2

If you really must use a long fractional expression, I would use the \splitfrac macro of the mathtools package to split the long numerator. In order to enhance the readability of your equations, you shouldn't rely on TeX to find "good" line breaks. Instead, parse the equation yourself and find the best place for \splitfrac to introduce the line break. I ...


2

PythonTeX currently doesn't support automatic line breaking. I've recently been adding automatic line breaking at spaces to the development version of minted, and will be adding that to PythonTeX soon. But that won't do what you want, because you want to wrap something that doesn't contain spaces. For now, one solution is to modify pythontex2.py (or ...


2

In order to fix that, you will have to give the \left\{ its counterpart which would be \right. on the same line. The second line would need a \left. ... \right\} . As you do not need auto-sized brackets here, I would leave it all away. Here is your example and my version: % arara: pdflatex \documentclass{article} \usepackage{mathtools} \begin{document} ...


1

Here is a solution similar to LaRiFaRi's but with a different alignment: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{split} R = \{&(S_{1},S_{1}), (S_{1},S_{4}), (S_{4},S_{4}), (S_{4},S_{1}), (S_{2},S_{2}), (S_{2},S_{3}),\\ &(S_{3},S_{3}), (S_{3},S_{2}), (S_{0},S_{0}), (S_{0},S_{5}), ...


1

You also can use the following code, heavily inspired by Sebastien Gouezel's code for \DeclarePairedDelimiter (pp. 28-29 of mathtools documentation), that allows for line breaks in paired delimiters: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{mathtools} \newcommand\MTkillspecial[1]{% helper macro \bgroup \catcode`\&=9 \let\\\relax% ...


1

Your example can't break at the ? because the first definition defines the hyphenchar for cmtt in T1 encoding (and you use lmodern) and the second defines \mytexttt but your document uses \texttt. If you replace \texttt with \mytexttt or drop lmodern and use \usepackage[T1]{fontenc} or drop lmodern and use \DeclareFontFamily{OT1}{cmtt}{\hyphenchar ...


1

It's apparently the ISO 639-1 code that is used. For Khmer the two-letter code is "km" (official source: Language codes - ISO 639).


1

Is this an acceptable solution? The line is not being broken after the item in the trivlist (actually, the solution is stolen from the amsthm) \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath,amsfonts} %% Packages \usepackage{amsmath,amsfonts} \usepackage{amsthm} \usepackage[matha,mathb]{mathabx} ...


1

If you invoke the inline option to enumitem, then using enumerate* instead of enumerate gives you inline lists: Code: \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath,amsfonts} %% Packages \usepackage{amsmath,amsfonts} \usepackage{amsthm} \usepackage[matha,mathb]{mathabx} ...


1

What happens in your case is a simple page break within paragraph. This is not optimal, however, if the whole paragraph is moved to the next page the first one would be too empty (and thus get a penality). What you could do to fix this in your case is to set the penality for the single line on the next page to a large number, cf. How do I prevent widow or ...


1

Looking at the datatool doc (section 5.4) you can have full control over the table column specification if you use \DTLforeach So if your third column needs to be text justified to lines broken to 5cm, you can do something like \begin{longtable}{llp{5cm}} \bfseries heading one & \bfseries heading two & \bfseries heading for long text column% ...



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