Tag Info

Hot answers tagged

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. ...


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 ...


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 ...


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

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 ...


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}


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

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 ...


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 ...


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}{ ...


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 \\ ...


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 ...


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 ...


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.\\ ...


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 ...


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} ...


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} ...


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}


1

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.



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