# Tag Info

2

Here's a LuaLaTeX-based solution. It doesn't modify the enumerate environment, it doesn't modify the \item macro, and it doesn't require the use of a new macro called, say, \mathitem. Instead, it takes a preprocessor approach: It sets up a Lua function which, by being assigned to the process_input_buffer callback, acts as a preprocessor, scans each line of ...

5


0

If you want to display material in sub- and superscripts using roman/upright rather than italic letters, you should render the main material (i.e., what's on the main math axis) using roman/upright letters as well. One way to render all math material with upright letters on a document-wide basis is to load the mathastext package: \usepackage{mathastext} ...

0

You may also want to try \begin{Bmatrix}\end{Bmatrix}, for example \documentclass{article} \usepackage{amsmath} \begin{document} $$\begin{Bmatrix} c & u & r & l & y \\ b & r & a & c & e \\ i & s & \\ & c & o & o & l \end{Bmatrix}$$ ...

1

Both the answers that have already been given have an obvious refinement, that is, make the symbols scalable with the math style. Even @egreg’s answer, which is more flexible than @LoopSpaces’s, is defective in this, in that it statically refers to the “text size” (it uses \textfont2). These enhancements are just routine, but since 24 hours have already ...

6


2

Here's how I did it: \documentclass{article} \usepackage{amssymb} \usepackage[svgnames]{xcolor} \usepackage{tikz} \usetikzlibrary{knots} \tikzset{knot/.style={double=#1,double distance=1pt,line width=2pt,white}} \begin{document} \begin{enumerate} \item $$\langle \tikz[baseline=-.8ex] \draw[knot,double=Red] (0,0) circle (1ex); \rangle = 1$$ \item \langle ... 2 tabular starts text mode, thus math mode needs to be set for the cells to get \frac work: \begin{tabular}{cc} \frac{1}{2} & \frac{3}{4}\\ \end{tabular} If it is used inside math mode, environment array can be used, which automatically switches the cells to math mode, see Mico's answer. Another approach is offered by package siunitx, where ... 1 You should probably be using an array environment, in math mode. \documentclass{article} \begin{document} \begin{array}{ccc} \frac{1}{2} & \frac{3}{4} & x/y(z) \end{array} \end{document} 9 The following example uses specialized packages for the different tasks: mhchem for easier input and typesetting of chemical formulas. siunitx for setting units, numbers and numbers with units. There are many configuration options. amsmath for more advanced features in the area of mathematical typesetting. Example: \documentclass{article} ... 1 You need to escape the math mode with \text{} to use fontawesome macros. \documentclass{article} \usepackage{fontawesome} \usepackage{amsmath} \begin{document} \faTwitter \begin{align*} \text{\faTwitter} &= E \cdot e^{-r(T-t)} \cdot \Phi'\left[d(S,t) - \sigma \sqrt{T-t}\right] \cdot \underbrace{\frac{\partial}{\partial \sigma} ... 3 what you probably want is v \in V. the \in must be in math mode (the part inside ... as you have already used correctly for G = (V, E)). since \in is recognized as math, tex will switch into math mode if it isn't already there, and will therefore report a missing  when it encounters something that can't be math. this is an elementary principle of ... 2 (too long for a comment, hence posted as an answer) Some comments and observations: Not even one of the packages loaded in your preamble is needed to compile the body of the document. Do take some time to figure which packages are really needed to compile your full document. The body of the document you've posted actually compiles without errors. You may ... 3 The _ is only valid in math mode, it doesn't work outside of it. \textbf{...} - as the name rather suggests - is a text mode command. Using \textbf{...} - whether within math mode or outside of it - puts you in text mode. The argument of \textbf{...} is typeset in text mode. As such, you cannot use _ within \textbf{...}. Try \mathbf{a_{1}} 1 \textbf{...} isn't allowed since \textbf is meant for text mode only. There are multiple ways to achieve bold math, depending on the desired output. \mathbf will print bold in math, but the letters are upright whereas \boldmath and \bm produces italic letters. There is \boldsymbol (also amsmath) also for symbols that are not printed in bold by ... 1 Is perhaps this that you want? \documentclass[12pt]{report} \usepackage[ruled,linesnumbered]{algorithm2e} \usepackage{amsmath} \begin{document} \begin{algorithm} \DontPrintSemicolon \caption{BE radix-8 IMML Modular Multiplication}\label{alg1} \KwIn{ x=\sum_{i=0}^{n-1} x_i\cdot2^i, y=\sum_{i=0}^{n-1} y_i\cdot2^i, p=\sum_{i=0}^{n-1}p_i\cdot2^i ... 5 I think you have asked several questions. The first is about x, y versus x, y. I think the second one is semantically and hence typographically right since the comma is not part of the mathematical expression. Your second example is a little ambiguous. There I would include the comma in the mathematics. An implicit question is the choice between ... 4 First things first: An algorithm most probabilly will never cover all use cases at once. A good rule of thumb is to assume that on average a LaTeX document will reach 90% of the final quality without any direct intervention. That said, inserting a \linebreak here and there should not be the end of the world, i.e. \begin{defn} The double integral of f on ... 2 breqn will break at all non hidden relation symbols. \documentclass{article} \usepackage{breqn} \DeclareFlexSymbol{\mywedge}{Rel}{bin}{5E} \DeclareFlexSymbol{\myvee}{Rel}{bin}{5F} \begin{document} \begin{dmath}[number={S_{1,19}}] p_{19,a} \hiderel{<} p_{1,a} \myvee p_{19,a} + p_{19,b} \hiderel{<} p_{1,a} + p_{1,b} \myvee p_{19,a} \hiderel{=} ... 5 It is instructive to examine the exact definitions of \( and that are provided by the LaTeX kernel (contained in the file latex.ltx, version early 2016): \DeclareRobustCommand$${% \relax\ifmmode\@badmath\else\fi}% \DeclareRobustCommand$${% \relax\ifmmode\ifinner$\else\@badmath\fi\else \@badmath\fi}% The main thing to note is that $$and$$ act as ... -1 \documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{mdframed} \theoremstyle{definition} \newtheorem{defn}{Definition} \surroundwithmdframed[leftmargin=-10pt,rightmargin=20pt]{defn} \begin{document} \begin{defn} The double integral of$f$on$R$, denoted as$\iint_R f(x,y) \, \operatorname{d}\!A$\end{defn} \end{document} Same code ... 1 It depends exactly what you mean by "computer zero." I'd guess you mean a slashed zero in a monospaced font; you can obtain this by choosing a font that has a slashed zero in its \texttt series and writing$\texttt 0; for example, Anonymous Pro will work by adding this to your preamble: \usepackage[T1]{fontenc} \usepackage[ttdefault=true]{AnonymousPro} ... 2 The argument to \cramped is typeset as a subformula, so spaces inside it are frozen; it's the same that happens with \left and \right. Thus the spaces around the minus sign in \cramped{1-2} are not flexible any more and the result is guaranteed to look wrong. For the same reason, \left and \right should never be used in inline math. Of course you get rigid ... 0 Solved it using: % Font fourier \usepackage{fourier} % Only use the math font of mathpazo \let\temp\rmdefault \usepackage{mathpazo} \let\rmdefault\temp 2 It's a little bit hacky and overrides all the nice measuring mechanisms from amsmath, but it should be prety relialble in most of the cases. Note that the solution is sensible to the leqno and reqno options. \documentclass[leqno]{amsart} \makeatletter \newenvironment{tagedequation}[1]{% \gdef\@tempa{#1} \refstepcounter{equation} ... 1 This might be a start. I've shown two varieties depending on your desires for centering the content. \documentclass{amsart} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{flalign} \phantom{(r\in\mathfrak{N})}&&\theta' = \gamma\theta, \quad r'=r&&(r\in\mathfrak{N}) \end{flalign} \begin{flalign} &&\theta' = \gamma\theta, ... 5 One approach is to right-align both matrices, using \begin{bmatrix*}[r]…\end{bmatrix*} (from the mathtools package) instead of bmatrix. Then, adding \phantom{-}0 to entries in the second and third columns of the first matrix will add the correct amount of space. \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align} % ... 4 You probably want to set Preferences > Look & Feel > Display > Instant Preview to No math. 0 I find that { } (\{\} in LateX) is perfectly clear to mathematicians, maybe not to computer scientists. I would use the following: This is obtained with \usepackage{algorithm} \usepackage{algpseudocode} \begin{document} \begin{algorithm}[H] \begin{algorithmic}[1] \Statemyset \gets \{\}$\For{$i = 0\, \textbf{to}\, 4\$} ...

2

You can use \substack from the mathtools package, as that command is designed exactly to stack multiple subscripts. If you want more spacing between the two lines, you can add e.g. \\[0.3ex] (or any other amount) instead of \\ in the argument to the \substack command. \documentclass[preview,border=2mm]{standalone} % Only to get minimal output ...

2

You can try this, with align and aligned: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align*} & R_\mathrm{in}=R_{B}\parallel [r_{\pi}+(\beta+1)R_{E}]\\ &R_\mathrm{out}=R_{C}\\ &A{u} \!\begin{aligned}[t] & =V_\mathrm{out}/V_\mathrm{in}\\ % & =[-g_{m}(R_{C}\parallel R_{L})]/[1+(g_{m}+1/r_{\pi})R_{E}] ...

2

Package mathtools, which upgrade amsmathdefine for such purposes math environment multlined. by it you can obtain: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align*} & R_{in}=R_{B}\parallel [r_{\pi}+(\beta+1)R_{E}]\\ & R_{out}=R_{C}\\ & A{u}=V_{out}/V_{in}\\ &\begin{multlined}[t] =[-g_{m}(R_{C}\parallel ...

Top 50 recent answers are included