Tag Info

Hot answers tagged

9

The following example defines \blackleq by putting \blacktriangleleft over the minus sign and vertically centers the result: \documentclass{article} \usepackage{amssymb} \usepackage{color} \makeatletter \newcommand*{\blackleq}{% \mathrel{% \mathpalette\@blackleq{}% }% } \newcommand*{\@blackleq}[2]{% % #1: math style % #2: unused \vcenter{% ...


7

Here's the \ooalign black magic: \documentclass{article} \usepackage{amssymb} \newcommand{\bleq}{\mathrel{\mathpalette\bleqinn\relax}} \newcommand{\bleqinn}[2]{% \ooalign{% \raisebox{.2ex}{$#1\blacktriangleleft$}\cr $#1\leq$\cr }% } \begin{document} $a\bleq b\leq c$ $\bleq_{\bleq_{\bleq}}$ \end{document}


7

The equation is way to wide. \maxdimen is 16383.99998 pt = 1073741823 sp = (230 - 1) sp≈ 5.76 m. I can fit the equation to \maxdimen only, if the font size is reduced dramatically: \documentclass[12pt]{article} \usepackage{fix-cm}% to provide smooth tiny font sizes \usepackage{amsmath,mathtools} \usepackage[ paperwidth=\maxdimen,% normal paper ...


5

Figured it out thanks to the comment by Sigur. \verb#\[# \verb#\]# or alternatively, thanks to Sigur as well, \verb+\[ \]+. I read this question previously, which seemed to suggest to me that I always needed to use texttt, but it looks like I was wrong.


4

\documentclass{article} \usepackage{mathtools} \begin{document} \boldmath \begin{align} \begin{aligned} x_t &= f_t(x_{t-1},u_t)\\ y_t &= g_t(x_t,v_t) \end{aligned}\label{eq:state-space&obs-equ} \end{align} \unboldmath \begin{align} x_t &= f_t(x_{t-1},u_t) & y_t &= g_t(x_t,v_t) \end{align} \end{document} However, it is not a ...


4

\documentclass[border=12pt,preview]{standalone} % change it back to your document class \usepackage{mathtools} \begin{document} \section*{side-by-side} \begin{align} x_{t} &= f_{t}(x_{t-1},u_{t}) & y_{t} &=g_{t}(x_{t},v_{t}) \label{eq:label1} \end{align} Please see equation~\ref{eq:label1} on page~\pageref{eq:label1}. \section*{split with ...


4

Use parboxes (change the width parameters in the following as appropriate). \documentclass{article} \begin{document} \[ \parbox{0.2\textwidth}{\centering Node power consumption} + ...


3

Here's a solution that uses just the basic tabular environment. By "wrapping" the tabulars in \textit directives you can typeset the letters in italics. \documentclass{article} \begin{document} \[ \begin{tabular}{c} Node\\ power\\ consumption \end{tabular} = \begin{tabular}{c} dynamic\\ consumption \end{tabular} + \begin{tabular}{c} static\\ consumption ...


3

Since you mention "inline", I will point out that \verb will not break across lines. However, if that is needed, then this approach, using \detokenize could work if you don't have unbalanced braces, and if you don't need to print % or # signs in the string. \documentclass{article} \usepackage[T1]{fontenc} \begin{document} \texttt{\detokenize{\[ This is a ...


3

I'd define my own environment for this. \documentclass{article} \usepackage{amsmath} \newcommand{\diff}{\mathop{}\!d} \newenvironment{subst} {\renewcommand{\arraystretch}{1.2}% \left\|\begin{array}{l}} {\end{array}\right\|} \begin{document} \begin{equation*} \int x\sqrt{x-1}\diff x \begin{subst} t=\sqrt{x-1}, t^2=x-1,\\ x=t^2+1, \diff x=2t\diff t ...


3

This should work, placed in the preamble: \let\NOLIMITS\nolimits \let\nolimits\limits \let\displaylimits\limits \usepackage{amsmath} This prohibits completely limits to the right, the only way how to impose them now is using \NOLIMITS. It is necessary to use the tweaks before loading amsmath and it is necessary to load amsmath since amsmath redefines all ...


3

If you load amsmath you can get the behavior you want with just two definitions: \documentclass{article} \usepackage{amsmath} \makeatletter \renewcommand{\slimits@}{\limits} \renewcommand{\nmlimits@}{\limits} \makeatother \begin{document} \( \sum_{i=0}^{3} \int_{-5}^{5} \lim_{n\to\infty} \prod_{j=0}^{n} \max_{j}\log_{2} x_{j} \) \[ \sum_{i=0}^{3} ...


3

I would use aligned rather than array here, because semantically it's not really a cases situation nor an array: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \left\{ \begin{aligned} a^{3} + b^{3} &= -q \\ ab &= \dfrac{-1}{3} \, p \end{aligned} \right. \end{equation*} \end{document}


3

Here I use stackengine to add a stacking gap on the argument of \hat. I also use scalerel package to preserve the math style, and to express the stacking gap, .3\LMpt, in terms of a unit that scales with the math style (as an argument to \ThisStyle{}, \LMpt is a scalable version of 1pt, that will scale with smaller math styles). The hat kerning is lost, ...


3

Instead of using the mathpazo package, which is (a) quite old and (b) well known for having various font metric problems, you could use the newpxtext and newpxmath packages. These are derived from the mathpazo package but have much better font metrics. In particular, these packages produce well-spaced hat symbols. If you use these packages instead of ...


2

When I tried using cases, it aligned nicely and worked just fine: \[ \begin{cases} a^3+b^3 &= -q \\ ab &= -\dfrac{1}{3}\,p. \end{cases} \] If that isn't an answer and you really are stuck with using the array, you might try to change the column separator to an equals sign with a bit of space around it, and then put @{} before the ...


1

I suggest using the empheq package for a simpler syntax, with option overload. It loads mathtools, which in turn loadsamsmath. I also usenccmath` for its mediumsized fractions, that look better here, in my opinion: \documentclass{article} \usepackage[overload]{empheq} \usepackage{nccmath} \begin{document} \begin{align*}[left = \empheqlbrace] a^{3} + ...


1

The column separation specification @{<stuff>} inserts <stuff> between the columns, so the result is as expected in your case. If you want a 2.5pt gap, then you need to insert @{\hspace{2.5pt}}. However, if your main aim is to align the parts at the = sign, then you can use \documentclass{article} \usepackage{amsmath} \begin{document} ...


1

kpfonts has a nomath option for precisely this purpose. It will load all Kepler text fonts, but not modify any mathematics fonts. The \usepackage[math]{blindtext} and \blindmathpaper in the example are just for some sample text with mathematics; they are not needed for your actual document. Code: \documentclass{article} \usepackage[nomath]{kpfonts} % load ...


1

% arara: pdflatex \documentclass{article} \usepackage{blkarray} \newcommand{\mLabel}[1]{\mbox{$\scriptstyle{#1}$}} \begin{document} \[ \begin{blockarray}{c@{}ccc@{\hspace{4pt}}cl} & \mLabel{C_1} & \mLabel{C_2} & \mLabel{C_3} & & \\ \begin{block}{[c@{\hspace{5pt}}ccc@{\hspace{5pt}}c]l} & 1 & 2 & 7 & & ...


1

If you need it only for the 2x3 matrix: \documentclass{article} \usepackage{array} \let\SC\scriptstyle \def\Biggg#1{\makebox(0,0){\put(0,-20){\bigg#1}}} \begin{document} $ \begin{array}{r@{\kern5pt}ccc@{}l>{\SC}l} & \SC C_1 &\SC C_2 &\SC C_3\\ \Biggg[ & 1 & 2 & 7 & \Biggg] & R_1 \\ & 2 ...


1

It may be nice for your readers if you state the substitution steps one by one. Using the idea suggested in @egreg's answer to use a dedicated environment -- called substitutions, say -- that lists the steps one at a time, one might typeset your equation as follows: \documentclass{article} \usepackage{amsmath} % provides 'aligned' environment ...


1

As I suggest idb here is meant to be a three-character variable. If this is the case you can write it in math mode as follows: $\mathit{idb}$ Then you get the correct spacing because LaTex assumes idb is just i times db here and db is treated as a differential term. If you mean the multiplication just write it as follows: $idb$ An image is provided for ...


1

The stackengine package has a parameter \def\useanchorwidth{} that when set to T, ignores the stacked-on or -under content when determining the width of the stack. The optional argument provides the stacking gap. A {}={} had to be used to get the stacked equal sign to act as a math relation. \documentclass{article} \usepackage{stackengine} \stackMath ...


1

Less is sometimes more. Consider this merely a suggestion: \documentclass{article} \begin{document} It is obvious that \[ LHS \stackrel{*}{=} RHS \] where $\stackrel{*}{=}$ denotes an equality based on the fact that $t = x^n\!$. \end{document}


1

It's never a good idea to use two consecutive display math environments with nothing in between (because the spacing will be wrong). Using align, the alignment characters can go before the beginning of the bmatrix environments. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} &\begin{bmatrix} -1 & 0 & -1 ...


1

Here is another solution using tikz package with math fonts also: \documentclass[tikz]{standalone} \usetikzlibrary{positioning} \begin{document} \sffamily \begin{tikzpicture}[node distance=.5ex,every node/.style={align=center}] \node (con) at (0,0) {Node\\power\\consumption}; \node (eq) [right=of con]{$=$}; \node (dy) [right=of eq]{dynamic\\consumption}; ...


1

Teh stackengine package helps doing that without having to compute whatever with the Centerstack command: \documentclass{article} \usepackage{stackengine} \setstackEOL{\\} \begin{document} \[ \Centerstack{Node power\\consumption} = \Centerstack{dynamic\\consumption} + \Centerstack{static\\consumption} \] \end{document}



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