# Tag Info

## New answers tagged math-mode

4

You should use amsmath and its align* environment. Please, note also other fixes: punctuation should be outside inline math formulas; the command \bf has been obsolete for several years and \mathbf should be preferred; \left. <terms> \right] for evaluation of integrals is better done with \Bigr] (or other size); with the \diff command, differentials ...

3

In this case you can exploit the symmetry between the two parts and use aligned: \documentclass[12pt,a4paper]{article} \usepackage{amsmath} \begin{document} \begin{equation*} \openup\jot % make lines a little more far apart \begin{aligned}[t] x &= \dfrac{a+\sqrt{a^2-4b}}{2}\\ &= \dfrac{5+\sqrt{1}}{2}\\ &= \dfrac{5+1}{2}\\ &= ...

1

You can wrap the two formulas in minipages \documentclass[12pt,a4paper]{article} \usepackage[a4paper,vmargin=0.7in,hmargin=0.7in]{geometry} \usepackage[utf8]{inputenc} \usepackage[misc]{ifsym} \usepackage{amsmath,amsfonts,amssymb} \usepackage{array,booktabs} \usepackage{parskip} \begin{document} \large \begin{minipage}{.5\textwidth} ...

8

Use align* instead, like so: \documentclass[12pt,a4paper]{article} \usepackage[a4paper,vmargin=0.7in,hmargin=0.7in]{geometry} \usepackage[utf8]{inputenc} \usepackage[misc]{ifsym} \usepackage{amsmath,amsfonts,amssymb} \usepackage{array,booktabs} \usepackage{parskip} \begin{document} \begin{align*} x_1 &= \dfrac{a+\sqrt{a^2-4b}}{2} & x_2 &= ...

4

It's simpler to do it with pst-node: consider variables you want to link as \rnodes, and connect them with the \ncbar command: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{mathtools} \usepackage{pst-node, auto-pst-pdf} \begin{document} \begin{postscript} \begin{gathered} \phi (\rnode{n1}{x_1}) \quad \phi ...

3

Inspired by Bernard answer, just for exercise, below is solution based on TikZ picture: \documentclass[tikz, border=3mm, preview ]{standalone} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix (m) [matrix of math nodes,inner ysep=0pt,row sep=2ex] { \phi(x_1) & \phi(x_2) & ...

9

Here's a LuaLaTeX-based solution. It defines a Lua function, named do_subs, that performs substitutions on all the following two-letter and three-letter character combinations: <== <=> ==> <= >= << >> <-- --> -+ +- ... == <> =. =( =) =[ =] By assigning this function to the "process_input_buffer" callback, the ...

0

I follow the steps 1 to 4 but I'm getting the following message, after try use it in Corel Draw X7 64 bits: Run-time error '-2147467259 (80004005)': Method 'ImportEx' of object 'IVGLayer' failed Is there something that I can do in order to fix this?

8

ConTeXt has this funny asciimath module, which has unfortunately completely different rules (which are highly inconsistent), but it still fits the general task though. Probably there is something about it in Hans' article “When to stop ...” which are the proceedings of his talk at TUG 2015, where he also mentioned asciimath. (I've only seen the talk, the ...

10

This is interesting problem which can be solved by more compact macros than in accepted answer: \long\def\isnextchar#1#2#3{\begingroup\toks0={\endgroup#2}\toks1={\endgroup#3}% \let\tmp=#1\futurelet\next\isnextcharA } \def\isnextcharA{\the\toks\ifx\tmp\next0\else1\fi\space} \def\skipnext#1#2{#1} \def\trynext#1{\trynextA#1\relax\relax} ...

1

The answer is to manually replace the more elegant definition of theorems in the front with the manual environment within the file itself and hence avoid the "newtheorem" command. It is not the most elegant solution but it suffices for a poster. \documentclass[24pt, a0paper, landscape]{tikzposter} \usepackage[utf8]{inputenc} \usepackage{amsmath} ...

2

This is a single equation, not a collection of equations that are being aligned, so I would use equation*, the * suppresses the equation number, and do the alignment with split, as below. This way, if I later find I need to refer to this equation and add a number all I need do is change the outer environment to equation and add a \label command. ...

2

Either use \begin{align*}...\end{align*} or use \nonumber for a specific equation to be suppressed in an align environment. This might get tedious if all equations in an align environment should be unnumbered. General rule: An environment or command with * most times means: 'Do not number' The same is true for alignat and alignat* environments and ...

2

The star form \begin{align*}...\end{align*} suppresses the equation number: \documentclass[conference]{IEEEtran} \usepackage{amsmath} \begin{document} \begin{align*} f_{n}(\beta,\lambda)&= \lambda(1-\lambda/n)^{n-1} \int_{0} ^{1} g_{n}(\beta,\lambda)d\alpha \\ & \leq \lambda(1-\lambda/n)^{n-1}\int_{0}^{1} ...

3

Don't use \\ for ending lines, except where specifically needed (tabular, array or similar environments) and never leave a blank line before an equation. Narrow columns and cases don't go along well, so you have only one possibility: splitting the lines, one part with the value, one with the condition. More generous vertical space will help the reader in ...

3

First and most important: never use eqnarray for any reason whatsoever. Second: never leave a blank line before a display. Third: LaTeX doesn't force anybody to use \left and \right in front of each parenthesis or bracket; if your editor does it automatically, disable the feature. Fourth: from the chosen breaks, I guess you're writing in a two column ...

0

You can also use phantom: \documentclass{article} \begin{document} $g^{\alpha\beta}g^{\gamma\delta}R_{\alpha\mu\gamma\nu}=R^{\beta\;\delta}_{\;\mu\;\nu}$ \\ $g^{\alpha\beta}g^{\gamma\delta}R_{\alpha\mu\gamma\nu}=R^{\beta\;\delta}_{\phantom{\beta}\mu\;\nu}$ \end{document}

0

I have defined a new command \newcommand{\tenmix}[3]{{#1}^{#2}_{#3}} where #1 is the tensor name, #2 the contravariant indices and #3 the covariant indices. But I can't choose the order among the covariant and contravariant index, however it is not necessary to type the signs of superscript and subscript ^ and _. For example, the Riemann tensor: ...

1

The version of parentheses for probability is not obvious. A suggestion (one displaymath in $...$): \documentclass{article} \begin{document} $\Pr\{\mathrm{NC}|\alpha\}= \left\{ \begin{array}{ll} (1-p)^{n-1}(1-p+p(\alpha + \beta)^{2})^{n-1} & 0\leq x \leq \beta \\ (1-p)^{n-1}(1-p+4p\alpha\beta)^{n-1} & \beta\leq x\leq \beta-1\\ ... 2 The Comprehensive Symbol Guide is your flexible friend concerning lookup of thousands of symbols: \documentclass{article} \begin{document} \bot\bot\bot \end{document} 3 Since \overline spans the full character width already, one can treat the A and B seperately, in terms of their overlines. \documentclass{article} \begin{document} \[ \overline{A}\overline{\overline{B}}$ \end{document}

5

The following example solves the reversed bars with \phantom and \rlap: \documentclass{article} \begin{document} $\overline{A\overline{B}} \mbox{ vs.\@ } \rlap{\phantom{A}\overline{\phantom{\overline{B}}}} \overline{AB}$ \end{document}

0

If you were using this type of construction extensively you could define a notation such as $$\left.\sqrt{(a_k+(-1)^{p_k}(}\right\vert_{k=1}^n=\sqrt{(a_1+(-1)^{p_1}\sqrt{(a_2+(-1)^{p_2}\sqrt{(\cdots+\sqrt{a_n}}}}$$ MathJax is unable to handle the LaTeX so I have uploaded the image.

10

Package amsmath uses \Longrightarrow to get the \Implies symbol. \Longrightarrow and \Longleftarrow are composed symbols with the standard fonts (unless a math font is used, which contain ready glyphs for the symbol). The arrow is taken from \Rightarrow and \Leftarrow, the equals sign = is used as prolongation, see macro \Relbar. At larger font sizes, the ...

1

TeX will only introduce line-breaks where it deems it necessary, and aaaaaaaaaaaaaaa does not represent a word that can by properly hyphenated. If you wish to comment on lines within your proof, set the comment in a top-aligned box of fixed width. Below I've used a \parbox of width 20em (adjust as needed). You can also use a tabular or some other ...

2

First option does what you want, although I prefer second solution with + not aligned with =. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{mathtools} \begin{document} $$\begin{split} F = & \left\{ abc \right.\\ + & \left. def \right\} \end{split}$$ \begin{split} F = & \left\{ ...

1

Try with alignat: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} V[1] &= A[1] & i = 1 \\ V[2] &= \max \{ A[1], A[2] \} & i=2 \\ V[i] &= \max\{ V[i-1], V[i-2] + A[i] \} & i>2 \end{align*} \begin{alignat*}{2} V[1] &= A[1] & \quad i &= 1 \\ V[2] &= ...

1

You can easily obtain a horrible document mixing Utopia as text font and Palatino (mathpazo) for math by doing \documentclass{article} \usepackage[T1]{fontenc} \usepackage{mathpazo} \renewcommand{\rmdefault}{put} \usepackage[math]{blindtext} % just to produce mock text \begin{document} \blindmathtrue \blindmathpaper \end{document} Even more ...

1

Ah, sorry, \ar{}[dr]|>{\ulcorner} works.

5

you can use the xlop package \documentclass[border=5pt,tikz]{article} \usepackage{xlop} \begin{document} \opadd{485,05}{178,4} \opsub{245.25}{72.003} \opsub[style=text]{72}{245} \opsub[carrysub,lastcarry]{72}{245} \end{document}

13

The OP's title said substraction, but his/her image shows addition. I originally opted for the latter, but have EDITED to also perform subtractions. In the ADDENDUM, I have begin the process of implementing decimals, at this point for 2-digit addition. SUBTRACTION The one known flaw, if some might call it that, is that the difference will show leading ...

18

Welcome to the site. We will appreciate the questions that have a minimal working example (code) that shows the efforts you have already put. Asking somebody to do things is frowned upon here. If you have no idea of how to start, you may put the following as a MWE \documentclass{article} \begin{document} %equation here \end{document} and ask for the ...

1

Your input misses a couple of &, but it also has some other glitches. Use environments for the logical structures such as theorems and proofs; if you use \noindent in the document body more than once, there's something wrong Never use $$(see Why is $...$ preferable to$$ ... ?) The syntax {\Bbb Z} has been replaced by \mathbb{Z} a couple of ...

1

It seems that you looking for this: Anchors for split of equations should be present in each line of equation: \documentclass{article} \usepackage{amssymb} \usepackage{mathtools} \usepackage{setspace} \usepackage{bm} \begin{document} \noindent \textbf{Binomial Theorem:} If $n \in {\mathbb Z_{\geq 0}}$, then (x+y)^n = \sum_{k=0}^{n} ... 1 I like the following solution: \documentclass{article} \usepackage{mathtools} \usepackage{showframe} \begin{document} \begin{align*} u(x) = & \begin{dcases} 1 - \frac{1}{2}\left(\frac{r}{a}\middle)^{-\frac{1}{2}} \middle\{1 + O(1 + \tan ϑ) \middle\} + O\middle(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right) ... 0 I'd profit of the fact that the first line is much shorter than the second one: \documentclass{article} \usepackage{showframe} % just for the example \usepackage{amsmath} \begin{document} \begin{equation*} u(x) = \begin{cases} \begin{array}{@{}l@{}} 1 - \frac{1}{2}\left(\frac{r}{a}\right)^{-\frac{1}{2}} \{ 1 + O(1 + \tan \vartheta) \} + ... 2 How about one of these solutions? \documentclass{article} \usepackage{mathtools} \usepackage{showframe} \begin{document} \begin{align*} & u(x) = \\ & \begin{cases} 1 - \frac{1}{2}\left(\frac{r}{a}\right)^{-\frac{1}{2}} \left\{ 1 + O(1 + \tan ϑ) \right\} + O\left(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right) \text{as } ϑ\downarrow ... 24 For very mysterious reasons, latexsym defines \unlhd as a \mathbin instead of a \mathrel. On the other hand, amssymb provides a better symbol, \trianglelefteq. \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \renewcommand{\unlhd}{\trianglelefteq} \begin{document} \subsection{Third Isomorphism Theorem} Let G be a group, and N\unlhd ... 17 the difference here is caused by the different treatment of two different classes of symbols when the lines in which they occur are justified. the two classes involved here are \mathbin (for \unlhd, a binary operator) and \mathrel (for \subseteq, a relation). in the second example, the line is too long to fit, so spacing is compressed where permitted. ... 2 \mleft and \mright of package mleftright avoid the additional space. Also often a slightly smaller version can be set manually improving the output. In this case, I would reduce the size of the fraction. \documentclass{article} \usepackage{mleftright} \begin{document} Compare: \[f(\frac{1}{2}) $f\left(\frac{1}{2}\right)$ ...

1

Answering my own question : this is brand new. This page points to something called TeX Gyre DejaVu Math (OTF), version 1.106. The archive is dated May 16, 2006, the font and documentation being dated May 8, 2016. The font is now named "TeX Gyre DejaVu Math", contrasting with the text fonts, which are named Deja Vu xxx, xxx being Serif, Sans or Sans Mono. ...

3

LyX does support Mathematica. Make a math box in LyX (Ctrl+M), put in the math box solve(...), then right-click and go to Use Computer Algebra System and then Mathematica.

3

Use the cancel package. \documentclass{article} \usepackage{cancel} \begin{document} $\cancelto{\simeq 0}{A}$ \end{document}

3

You have to use Renderer=Basic. There are also far better ways to define the font, with the newer versions of fontspec \documentclass{article} \usepackage[no-math]{fontspec} \newfontfamily{\myswashfont}{Cochineal}[ Style=Swash,NFSSFamily=myswash,Renderer=Basic ] \newfontfamily{\mynonswashfont}{Cochineal}[] % just for testing ...

0

Based on my answer at Big tilde in math mode, in introduce \reallywidesim and \reallywidesimeq. \documentclass{article} \usepackage{scalerel} \usepackage{stackengine,amsmath} \newcommand\reallywidesimeq[1]{\mathrel{\ThisStyle{% \setbox0=\hbox{$\SavedStyle\mkern2mu_{\text{#1}}\mkern2mu$}% \mkern1mu\stackengine{1\LMpt}{% ...

1

Probably you are using mathabx, which also have vertical negation bars in its symbols: \documentclass{article} %\documentclass{llncs} \usepackage{amsmath} %\usepackage{amssymb} \usepackage{mathabx} \begin{document} $\nVdash\nsubseteq$ \end{document} Without package mathabx: \documentclass{article} %\documentclass{llncs} \usepackage{amsmath} ...

2

You can abuse the tilde accent together with a \vrule to build your own \simeq. However, you need a font with an extensible \widetilde for that. The non-free font mtpro2 has this accent. \documentclass{article} \usepackage{amsmath} \usepackage[lite]{mtpro2} \begin{document} $A \stackrel{\text{mytext}}{\lower 2.5pt \hbox{$\widetilde{\vrule width 25pt ...

4

Here is a solution that doesn't make the comma globally active: \documentclass{article} \newcommand{\splitatcommas}[1]{% \begingroup \begingroup\lccode~=, \lowercase{\endgroup \edef~{\mathchar\the\mathcode, \penalty0 \noexpand\hspace{0pt plus 1em}}% }\mathcode,="8000 #1% \endgroup } \begin{document} ...

2

The symbol has a Unicode code point: U+A751 LATIN SMALL LETTER P WITH STROKE THROUGH DESCENDER There are some (at least) text fonts, which do provide the symbol. Example for LuaTeX/XeTeX: \documentclass{article} \usepackage{booktabs} \usepackage{fontspec} \newfontfamily\DejaVuSans{DejaVu Sans} \newcommand*{\Rows}{} \makeatletter ...

2

The width of the bar is 9mu, so we need such amount of back up. Here's a version that works also in sub/superscripts and has no spacing issues. \documentclass{article} \usepackage{amsmath} \makeatletter \DeclareRobustCommand{\pbar}{\mathord{% \text{$\m@th\mkern-2mu\raisebox{-1.5ex}[0pt][0pt]{$\mathchar'26$}\mkern-7mu p$}% }} \makeatother ...

Top 50 recent answers are included