# Tag Info

0

There are four predefined lengths, which control the vertical whitespace of displayed formulas: \abovedisplayskip=12pt plus 3pt minus 9pt \abovedisplayshortskip=0pt plus 3pt \belowdisplayskip=12pt plus 3pt minus 9pt \belowdisplayshortskip=7pt plus 3pt minus 4pt The "short" version is used for equation, when the last line of text is short.

1

don't leave a blank line between text and any display math -- that adds extra space because you are saying "start a new paragraph here." if you have just a short bit of text between lines of an aligned display, you can use \intertext: text above \begin{align} a &= b + c\\ &= d + e\\ \intertext{because} &= f + g \end{align}

0

My comment last month nagged at me, until I remembered an answer I gave at Rounded box around placeholder text that supports line breaking (in which I was trying to eliminate this gapping effect), and decided it was worth trying to adapt to enhance it. What I do is paint the natural spaces of alternating letters in alternating colors (here cyan!80 and ...

1

This provides both a semi-automatic and a fully automatic solution to the problem... In all cases, it is "automatic" in that all the mdframe parameters necessary to create the color padding are taken directly from the environments without user intervention. If the user opts for the "semi-automatic" solution form, it allows them to manually invoke a macro ...

0

One possibility: \documentclass[11pt,a4paper]{memoir} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2cm,right=2cm]{geometry} \usepackage[ngerman,english]{babel} % select the language \usepackage[utf8]{inputenc} % input encoding \usepackage{mathptmx} % font size extension \usepackage{blindtext} % blindtext ...

0

Update: This appears to be a bug in certain versions of mdframed! mdframed.sty 2013/03/09 1.8: Good mdframed.sty 2013/07/01 1.9b: Bad mdframed.sty 2013/08/18 1.9d: Good Note that you can get the latest version of mdframed from https://github.com/marcodaniel/mdframed

5

Here are four strategies. The first is what I like the best. \documentclass{article} \usepackage{amsmath} \newcommand{\su}[1]{% \text{\thickmuskip=3mu$#1$}% } \begin{document} \begin{alignat*}{2} &\text{Normal: } && \sum_{k=1}^{m}a_{k}\\ &\text{Modified: } && \sum_{\text{$k=1$}}^{m}a_{k}\\ &\text{Thin space: } && ...

5

as stated by Werner in a comment, \mathop is intended to define operators like lim et al., while = is a relation. as for the spacing, that was determined through knuth's examination of numerous examples published in the most carefully typeset journals of the early 20th century. these publications are cited in various writings by knuth. i recommend ...

6

TeX sets \thickmuskip between the relational operator and most other math atoms in styles \displaystyle and \textstyle, but no space in script styles \scriptstyle and \scriptscriptstyle. A \thinspace is also inserted in script styles between an operator atom (\mathop) and an ordinary atom (\mathord). Thus \sum_{n \mathop{=} 1} gets you the desired ...

2

Another layout with different types of "X" columns, and a better vertical spacing with the help of the cellspace package: \documentclass[a4paper, 11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{graphicx}%[draft] \usepackage{array, booktabs, multirow} \usepackage{tabularx} \newcolumntype{Y}{ ...

3

You can simply use the standard command multicolumn to achieve this. Then you choose which of the columns of the top tables should span more than one column of the lower table. Then do this in each row of the top table. \begin{tabular}{|l|l|l|l|l|l|} \hline \multicolumn{2}{|l|}{ parameter } & value & \multicolumn{2}{l|}{ parameter } & value ...

5

Here's one option using tabularx: \documentclass{book} \usepackage{tabularx} \newcolumntype{C}{>{\centering\arraybackslash}X} \begin{document} \begin{table} \small \centering \begin{tabularx}{.7\linewidth}{|X|C|X|C|} \hline parameter & value & parameter & value \\ \hline blah blah & a & blah blah & 2 \\ blah blah ...

2

A first trial without equal widths, but I am not sure whether I understand the request correctly... ;-) \documentclass{scrbook} \begin{document} \begin{table}[ht] \small \centering \begin{tabular}{l|l|c|l|c|l} \cline{2-5} & parameter & value & parameter & value \\ \cline{2-5} & blah blah & a & blah blah & 2 \\ ...

7

I introduce \widow which uses the \widowpenalty to prevent a hanging single line (unless the whole paragraph only took a single line). You insert \widow as the last word of the paragraph. In this way, it doesn't apply to your whole document, but is applied locally to resolve a local problem. This same approach applies outside of mdframed, as well. ...

2

If you do not have vertical lines, then this can be solved by \noalign{\vspace{6pt}} Full example: \documentclass{article} \begin{document} \begin{tabular}{p{4cm}p{4cm}} Lorem ipsum dolor sit amet consectetur & adipisicing elit\\ \noalign{\vspace{6pt}}% sed do eiusmod tempor incididunt ut labore & et dolore magna aliqua.\\ ...

2

The \\ mechanism can be used, but one has to account for the height of the \parbox, either manually or automatically. The other option, if all rows are to be adjusted, is to use the \extrarowheight parameter of the array package, or else \arraystretch as was mentioned in the comments. \documentclass{article} \usepackage{array} \begin{document} ORIGINAL ...

5

You could put a strut in the first column. \documentclass{article} \begin{document} \begin{tabular}{p{4cm}p{4cm}} Lorem ipsum dolor sit amet consectetur\rule[-6pt]{0pt}{6pt} & adipisicing elit \\ sed do eiusmod tempor incididunt ut labore & et dolore magna aliqua.\\ \end{tabular} \end{document}

1

Below I present two possibilities; in the first one, the object is treated as a floating object; in the second one, the object is static. One option using a minipage inside the figure environment; the minipage has fixed height equal to \textheight; the object is treated as a float: \documentclass{article} \usepackage{showframe} \usepackage{subfig} ...

4

Another instance of problems with material in vertical mode; use \leavevmode: \documentclass{article} \usepackage[framemethod=tikz]{mdframed} \parskip=32pt \begin{document} \begin{mdframed}[suppressfirstparskip=false,frametitle={Theorem 1.}] Text \label{Yeah} \end{mdframed} \begin{mdframed}[suppressfirstparskip=false,frametitle={Theorem 2.}] ...

3

First of all, I've adjusted your code not to have bad boxes. If you omit the tabu length then it uses \linewidth. If you use all columns of type X then the space is divided into the columns depending on the first parameter you give to the column. So, specifying X[5] is not the same as specifying p{5cm}. Moreover, the right way to specify an X column is ...

1

You can have the same result with the enumitempackage, which is much more versatile. Here are two examples, in which I chose to make the label indentation equal to paragraph indentation: \documentclass[12pt, a4paper]{report} \usepackage[utf8]{inputenc} \usepackage[textheight = 24cm]{geometry} \pagestyle{empty} \usepackage{lipsum} \usepackage{enumitem} ...

2

We used \plparsep=0.2in and negative value in \plitemsep: \plitemsep=-0.2in. For now this is our result. %! *latex mal-spacing.tex \documentclass[12pt]{report} \pagestyle{empty} \usepackage{paralist} \plparsep=0.2in \plitemsep=-0.2in \begin{document} Text before. \begin{compactenum} \item foo\par bar1\par bar2\par \item foo \item bar ...

3

Just close math mode and reopen it: \documentclass{article} \usepackage{stmaryrd} \newcommand{\sem}[2][]{% \mbox{$\llbracket$\bfseries #2$\rrbracket^{#1}$}% } \begin{document} Here are \sem{Two words} and here is \sem[1]{One}. \end{document}

2

memoir provides its own interface for caption management, and there may be some clashes when using it in conjunction with caption (see section 10.13 The class versus the caption package (and its friends), p 206 of the memoir user manual). However, you can update \caption to grab its contents, evaluate whether the argument is empty/not, and condition ...

1

If you really don't use captions anywhere, redefine \caption to do nothing. \renewcommand{\caption}{} Which I think will do what you want.

6

The space is controlled by the parameter \doublerulesep which you can set at any point in the document \setlength\doublerulesep{2cm} Either in the preamble for the whole document or if just this table, inside the table environment alongside \centering and any other local declarations.

0

I changed to class article so that I could work with it. One of the primary things was to change the width of all three subfigures to be the same. Also, subfigures were invoked with top, not bottom, alignment. Once that was done, the middle figure's width/height, when expressed as a fraction of \textwidth, had to be changed (I also used \hfil and \hfill ...

4

< and > are relational operators ("less than" and "greater than"). They can be used as delimiters, but TeX needs to know it (the traditional way with \langle and \rangle are added for comparison): \documentclass{article} \begin{document} $\mathopen< a, b, c \mathclose> \times T = \langle a, b, c \rangle \times T$ \end{document} ...

2

You may also put the binary operator > between braces: \documentclass{article} \usepackage{mathtools} \begin{document} ${>} \times T$ \end{document} Edit. Sorry, > is in fact a relational operator, as Heiko Oberdiek noticed. Putting it into a pair of braces makes the binary operator \times consider it as an operand, and so there is ...

2

This occurs because both > and \times are binary operators. If you use \mathord> \times T the > will not be treated as a binary operator, and the spacing will be as you desire.

4

\addvspace only inserts vertical space up to some maximum: \documentclass{article} \usepackage{lipsum} \newenvironment{myenv} {\par\addvspace{\baselineskip}}% \begin{myenv} {\par\addvspace{\baselineskip}}% \end{myenv} \begin{document} \lipsum[4] \begin{myenv} \lipsum[4] \end{myenv} \begin{myenv} \lipsum[4] \end{myenv} \lipsum[4] \end{document} ...

4

I'd suggest you to use a \list (as many of the standard LaTeX2e environments do): \documentclass{article} \usepackage{lipsum}% just to generate text for the example \newenvironment{myenv} {\list{}{\leftmargin=0pt}\item\relax}{\endlist} \begin{document} \lipsum[4] \begin{myenv} \lipsum[4] \end{myenv} \begin{myenv} \lipsum[4] \end{myenv} \lipsum[4] ...

-1


3

Surely you are using a document class (like the standard book) where the bibliography starts a new page since a \chapter* command is issued (or similar). A solution could be to redefine \clearpage (the command responsible of the new page) locally to the bibliography, so that the latter doesn't start a new page, something like \begingroup ...

2

I enclose a small Lua snippet which add spaces after letters except commas, colons and semicolons. It adds space after spaces. This is a small example. %! lualatex mal-words.tex \documentclass[11pt]{article} \pagestyle{empty} %\newcommand{\spreadletters}[2]{\makebox[#2][s]{#1}} % 1. approach %\usepackage{seqsplit} % 2. approach \usepackage{luatextra} ...

13

Using Paul Stanley's answer to your question Conditions for fancy chapter title, here's a way: \documentclass{book} \usepackage[explicit]{titlesec} \usepackage{lipsum} \usepackage[T1]{fontenc} \usepackage{lmodern} \newcommand{\chaptercolor}{blue} \usepackage{tikz} \usepackage{xparse} \titleformat{\chapter}[display] {\normalfont\filcenter} ...

Top 50 recent answers are included