# Tag Info

## New answers tagged math-mode

0

For me, \parallel works fine: \documentclass{article} \begin{document} $D(P\parallel Q) = \ldots$ \end{document}

5

Something like this? \documentclass{article} \usepackage[T1]{fontenc} % for "\dh" macro \usepackage{amsmath} % for "\textrm" macro \newcommand{\crpartial}{\textup{\rmfamily\dh}} \begin{document} $dS \ge \frac{\crpartial q}{T}$ \end{document}

0

To obtain an equivalent of ${}^AB$ in LyX, you can start an empty math mode box, type ^ to enter superscript and enter the A, press space to exit the superscript, enter the B immediately after the superscript. Checking View > Source Pane, the above produces $^{A}B$, which compiles as ${}^AB$. If it is something you need to insert many times, then ...

2


2

Maybe something of this kind, but the brace and the main equation number are unnecessary, in my opinion. \documentclass{article} \usepackage{amsmath} \usepackage{hyperref} \usepackage{lipsum} % for mock text \begin{document} \lipsum[2] \begin{subequations}\label{main} \left. \addtocounter{equation}{-1} \edef\theHparentequation{x.\...

0

I had a similar issue, solved by writing same expression in multiple lines by , for example, \documentclass[paper=8.27in:11.69in]{scrartcl} \usepackage{geometry} \usepackage{graphicx} \usepackage{pdfpages} \usepackage{hyperref} \usepackage{enumitem} \usepackage{amsmath} \begin{document} $\Pi_{employee-name}(\sigma_{manages.manager-id \ = \ employee2.... 8 First, some general comments and observations about the code shown in your preamble: When using LuaLaTeX or XeLaTeX, you should not load the fontenc and inputenc packages. (Even when using pdfLaTeX, it's no longer necessary to load the inputenc package unless your file's input encoding is not UTF8 or ASCII, which is a proper subset of UTF8.) Loading the ... 5 The bm package is for legacy 8-bit fonts. In unicode-math, load a math font that comes in bold (currently, XITS Math, Libertinus Math or Minion Math) and use \boldsymbol for bold operators and signs. If you only need bold letters, you can use \mathbf, \mathbfcal, etc. Or the new commands \symbfup for bold upright, \symbfit for bold italic, etc., as Mico ... 4 I have never used gb4e, but looking at its definition of \exp % gb4e.sty line 319 \def\exp#1{\exi{{(\ref{#1}$'$)}}} I'd say the following should work (hoping that I made a meaningful MWE for gb4e) \documentclass{article} \let\mathexp=\exp % save the current (math) definition of \exp \usepackage{gb4e} \let\gbexp=\exp % save the current (gb4e) definition ... 0 This is either a bug in LuaTeX (or maybe luaotfload) or the font itself, nothing to do with fontspec or unicode-math. Here is a plain TeX example: %!TEX TS-program = XeTeX \ifx\XeTeXversion\undefined \input luaotfload.sty \def\otf#1{[#1.otf]} \else \def\otf#1{[#1.otf]} \fi \parindent=0pt\relax \hsize=8.5cm\relax \hrule \bigskip {\bf Default \TeX} ... 6 The definition of \vdots in fontmath.ltx reads \DeclareRobustCommand \vdots{\vbox{\baselineskip4\p@ \lineskiplimit\z@ \kern6\p@\hbox{.}\hbox{.}\hbox{.}}} (This is inherited from plain.tex with the addition of robustness.) I don't quite know the idea behind the \kern6\p@ bit, but removing it removes the excess box height \documentclass{article} \... 9 As @DavidCarlisle has already noted in a comment, you may want to replace \parallel with \Vert. Importantly, the symbol produced by \Vert can be enlarged vertically with the help of the \big, \Big, \bigg, and \Bigg prefixes: \big\Vert, \Big\Vert, \bigg\Vert, and \Bigg\Vert. Finally, in case you need a bit of extra spacing around the double vertical lines, ... 4 Just don't use such verbose set descriptions: your readers will have a hard time guessing where the set description starts and ends. In the code below I added several ties ~. \documentclass[a4paper, 12pt]{article} \usepackage{amsfonts} %\usepackage{amsbsy} \usepackage{amssymb} \usepackage{amsmath} \begin{document} Let$G$be a$3$-coloured digraph. A ... 4 \mbox and \text will not text-wrap, use$..$s for math parts only. \documentclass[a4paper, 12pt]{article} \usepackage{amsfonts} %\usepackage{amsbsy} \usepackage{amssymb} \usepackage{amsmath} \begin{document} Let$G$be a$3$-coloured digraph. A subgraph$\mathrm{H}$of$G$is called linear if each component of$\mathrm{H}$is either an edge or a cycle. ... 0 There is also the Unicode combining character U+030A ◌̊ "COMBINING RING ABOVE": https://en.wikipedia.org/wiki/Ring_(diacritic)#Overring 5 To answer question 1: All (or at least most) \mathXX are internally the same a, they only look different as they are from different fonts. The sym-variants are different symbols with different unicode code points. You can see the difference if you try to copy and paste from a pdf. \documentclass{article} \usepackage{unicode-math} \begin{document}$\mathrm{a}...

1

If you're not French and plan to never write in French, you can just do \documentclass{article} \usepackage{amsmath} \makeatletter \mathchardef\normalcolon=\mathcode: \def\colon{% \noexpand\nobreak \mskip 2mu \mathpunct{} \nonscript\mkern -\thinmuskip {\normalcolon}% \mskip 6muplus1mu \relax } \begingroup\lccode\~=\:\lowercase{\endgroup\...

3

\documentclass{article} \usepackage{amsmath} \begin{document} $\forall x: P (x)$ using \verb|:| $\forall x \colon P(x)$ using \verb|\colon| \def\newcolon{% \nobreak\mskip2mu\mathpunct{}\nonscript\mkern-\thinmuskip{\text{:}}% \mskip 6mu plus 1 mu \relax} \mathcode\:="8000 % {\catcode:=\active \global\let:\newcolon} $\forall x: P (x)$ using ...

3

There are cases where a very high or deep object is better smashed; for instance, in an alignment where a formula ends with a summation and the next is much shorter, we can save vertical space by using \smash[b]{...} around the summation. Also your case can take advantage of smashing because of the short lines of text around the display. However, one has to ...

4

You asked, How can I smash the \sum without changing the horizontal spacing around it? To \smash the expression without affecting the spacing between \frac{1}{N} and \sum, insert an empty math atom -- {} -- as the first element of the argument of \smash. For instance, \bar{x} = \frac{1}{N}\smash{{}\sum_{n=1}^N x_i} A full MWE: \documentclass[...

3

I was able to recreate the issue you've experienced on the Wikipedia site by using \dfrac instead of \frac. I can think of three possible work-arounds. The first solution relies on inserting a typographic strut. This method is feasible only if the \vphantom directive is available. The second method employs \tfrac instead of \frac (or \dfrac). Given that ...

5

You load chemformula, so use it. \documentclass{article} \usepackage{chemformula} \begin{document} $\ch{MoS2 + $$x$$ 'n-BuLi' -> $$\frac{x}{2}$$ 'n-Oct' + Li$$\sb{x}$$MoS2 '\quad($$x\approx{1}$$)'}$ \end{document}

3


5

\documentclass[12pt]{article} \usepackage{mathtools} \begin{document} \[ P_{s,t}^{WT}=\begin{dcases} 0 & V_{s,t}^{WT} \leq V_{ci} \\ p_r\times\biggl(\frac{V_{s,t}^{WT}-V_{c,t}} {V_t - V_{ci}}\biggr)^3 & V_{ci} \le V_{t,s}^{WT} \le V_{cr} \\ p_r ...

6

You can load amstex (which is recommended if you do much mathematics), but you have to fix the definitions of \dddot (and \ddddot): \input amstex % fix \dddot and \ddddot \begingroup \catcode@=11 \gdef\dddot#1{{\mathop{\kern0pt #1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ \hbox{\rm...}\vss}}}} \gdef\ddddot#1{{\mathop{\kern0pt #1}\limits^{\vbox to-1.4\ex@{\...

9

The amstex macros provide this accent. \input amstex $\dddot{a}$ \bye

Top 50 recent answers are included