# Tag Info

69


14

The default positions of sub and superscripts are closer to the baseline in textstyle as TeX tries to maximise the chance that the expression does not disturb the paragraph line spacing. Your first example is the standard setting for inline math, however with the larger scripts caused by the subscripting, TeX has to move them further apart. This is ...

13

The following defines \inlineequation: \inlineequation[<label name>]{<equation>} Optionally <label name> can be given for referencing the equation. \label afterwards keeps the previous referencing behavior like an environment equation would have done. \refstepcounter is called at the beginning of the inline equation, because package ...

13

aligned is intended for this. But also align works if you use \parbox: Text \displaystyle\parbox{2cm}{\begin{align} x &= 1 \\ y &= 0 \end{align}} \quad more text

13

\raisebox will do. The height of the contents of \raisebox is available as \height. The tabular environment puts struts with factor \arraystretch in the rows. Since the first line of your tabular only contains normal text, the strut is very likely larger (and probably larger than the extend of the curly brace). Then the argument of \raisbox can be calculated ...

13

In justified paragraphs TeX tries to fill the lines. But it is very difficult, if the line contain large chunks of unbreakable stuff. Then the remaining stretchable spaces are stretched and TeX gives a Underfull \hbox warning. TeX can break inline math at binary and relational operators unless they are inside a subformula. Curly braces or \left and \right ...

12

\documentclass{article} \usepackage{amsmath} \makeatletter \def\mymacro{\ifinalign@ B\else A\fi} \makeatother \begin{document} $\mymacro$ \begin{align} \mymacro \end{align} \end{document}

12

\everydisplay can be used to make a different setting for displayed equations: \documentclass{article} \medmuskip=0mu % \everydisplay{\medmuskip=10mu\relax} \begin{document} \centering $a+b=c+d$ $a+b=c+d$ \end{document}

12

I'm not sure if this is a good idea or not (imagine a new reader searching for equation 2.1, for example), but the following seems to do what you want; note that I've used refstepcounter to increment the equation counter. \documentclass{article} \usepackage{amsmath} \begin{document} The equation $a+1=b~\refstepcounter{equation}(\theequation)\label{myeq}$ ...

12

If you use the enumitem package, you can pass the option [inline]. Doing this enables starred environments corresponding to the regular ones which produce inline lists (\begin{enumerate*}, \begin{itemize*} etc.): \documentclass{article} \usepackage[inline]{enumitem} \begin{document} Text before list. \begin{enumerate*}[label=(\roman*)] \item My first in ...

11

The Solution Use paralist for the purpose of making horizontal list. At allows you to make lists which can be used within paragraphs. Use inparaenum environment for such a list. The Code \documentclass{article} \usepackage{paralist} \begin{document} Text before list. \begin{inparaenum} \item My first in list. \item My second in list. ...

11

Taking the definitions you make in the other question, here's a way: \mathchoice has four arguments, stating what's to be done in the various situations; \mathop states how the symbol should be considered with respect to spacing and ending with \displaylimits ensures the same behavior as \sum: \documentclass{article} \usepackage{tikz} \newcommand{\osum}{ ...

11

I'd define a new environment and use adjustbox for this. The principle is the same as in Heiko's answer. \documentclass[a4paper]{article} \usepackage{adjustbox,varwidth,xparse} \NewDocumentEnvironment{bracedrows}{m} {\begin{adjustbox}{valign=t}% \$\kern-\nulldelimiterspace\left. \begin{tabular}{@{}l@{}}} {\end{tabular}\right\rbrace ...

10

I was a little bit surprised to discover that this wasn't already catered for by the fancyvrb package. When using that package, the problem would appear to be because the newline character is defined to be an outer macro, which can't then be gobbled into the verbatim command. So here's a little modification that defines a command \VerbLB which converts ...

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