New answers tagged

4

If you prefer to have any size of the integral sign (you can choose the size that you like), it is possible to use scalerel package with the option \scaleobj{<scale factor>}{...}. \documentclass[a4paper,12pt]{article} \usepackage{mathtools} \usepackage{scalerel} \begin{document} \[ \int^{b}_{a}\frac{1}{x}\,dx, \quad \scaleobj{.5}{\int^{b}_{a}}\frac{...


4

To have the \forall and the \in vertically aligned, I used a 3 columns alignedat (due to the difference in width between t and x). Further, as newtx produced error messages on my system, I replaed them with fourier: \documentclass[a4paper,12pt]{article} \usepackage{mathtools,amssymb} \usepackage{fourier} %\usepackage{newtxtext} %\usepackage[libertine]{...


5

Here's a solution that employs an array environment to align the elements of the two rows of conditioning information. Note that I use a vertical bar to denote "given that" or "conditional on". If you prefer using a colon, you should input it as :, not as \colon. \documentclass[a4paper,12pt]{article} \usepackage{mathtools,array,newtxtext,newtxmath} \...


10

Writing \eta:=\eta(x,t) has no mathematical meaning whatsoever. Since apparently D is a subset of the plane, functions over D are two-variable by definition; how you call the variables is completely irrelevant. I wouldn't align the two final intervals. Around the colon I would add some additional space because of the split line on the right. \documentclass[...


5

The nccmath package provides a medium-size integral sign , with the \medint\int command. There are also medium-sized fractions (\mfrac), the more general medmath{...} command. and medsize environments. You obtain formulæ with a size of ~80 % \displaystyle, avoiding the discrepancy with \textstyle . The following code provides a demo: \documentclass{article}...


3

I propose 3 other possibilities, using each the medium-size commands from nccmath (ca 80 % of \displaystyle), with the geometry package, which produces by default more decent margins if you don't use marginal notes. \documentclass{article} \usepackage[showframe]{geometry} \usepackage{mathtools, nccmath} \begin{document} \ \begin{flalign*} & g'(x)= &...


6

I would use a \splitfrac macro (provided by the mathtools package) to split the very long numerator term into two parts. Note that I replaced the outermost pair of round parentheses with \big square brackets. This change should make it easier for your readers to find their way around the numerator term. Finally, do also note that there's no point in ...


4

Using my new tokcycle package (https://www.ctan.org/pkg/tokcycle )...I find the result pleasingly legible, when read audibly via the Adobe Reader. This MWE relies on you having a new enough LaTeX installation to support the new \expanded primitive. If not, you can, for the time being, change the \tcremap[x] in the \speakifytext definition to \tcremap[1] ...


2

For a longer comment. I agree with egreg that those \left\right are excessive The alignment is using the recommendations from https://www.ams.org/publications/authors/mit-2.pdf (some of which breqn is also attempting to use) \documentclass[a4paper]{article} \usepackage{mathtools} \DeclareMathOperator\Tr{Tr} \begin{document} \begin{equation} \begin{...


4

Use \substack: \[ \bigl\{x_{n,k}\bigr\}_{\substack{n = 1, \ldots, N \\ k = 1, \ldots ,K}} \]%


2

Use \substack from amsmath: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \bigl\{x_{n,k}\bigr\}_{\substack{n = 1, \ldots N \\ k = 1 \ldots K}} \] \end{document} Output:


1

The newtxmath package has a frenchmath option. newtx is a Times-style font, but also supports libertine, minion, stix2, and other math fonts. newtx is also compatible with LuaLaTeX and XeTeX (see details in package documentation). \documentclass[11pt]{amsart} \usepackage{newtxtext} \usepackage[frenchmath]{newtxmath} \begin{document} \[ \Phi(u) = \frac{1}{\...


2

You wrote, not mentioning the fact that unicode-math seems to clash with amssymb What's the basis for this claim? The packages get along fine as long as amssymb is loaded first. If you can use either XeLaTeX or LuaLaTeX to compile your document, specifying the option math-style=french while running \setmathfont lets you achieve all of your locale-...


1

If your text is entirely in french you are better off with the frenchmath package which implements all french-specific math typesetting.


3

I assume your question is about how to write "Ev" and "Od" using math-calligraphic lettering. For the uppercase letters "E" and "O", just input \mathcal{E} and \mathcal{O}, respectively. Computer Modern, which is the default text and math font family in virtually all TeX installations, does not provide true calligraphic lowercase letters. In fact, very ...


0

One way is to add vertical space above and below each cells' content: \documentclass{article} \usepackage{caption} %\usepackage{adjustbox} %\usepackage{geometry} \usepackage{amsmath} \usepackage{makecell} \renewcommand\theadfont{\small\bfseries} \renewcommand\theadgape{} % <--- \begin{document} \begin{table}[ht] % <--- \captionsetup{...


1

Here is my suggestion that uses booktabs for the horizontal lines with some additional spacing around them and the \addlinespace command for additional space around the rows containing fractions. With the makecell package you can easily insert linebreaks in column headers. With the tabular* environment and \extracolsep{\fill}} I made sure that the table fits ...


7

For your two problems read my answer to your other question: Normal kerning is not the right tool for Math and will normally not be applied. That LuaTeX sometimes does apply it probably happens because TeX no longer knows that the characters used to be math. After the f italic correction is inserted, so the f and } do not directly follow each other -> no ...


1

Welcome to TeX.SE! So I have done the following: First, the spacing between the \dfrac{}{} has been increased by changing \\ to \\[2em]. Second, you can stretch all the table rows via \renewcommand{\arraystretch}{1}. The 1 is the default value, increase to see the result. \documentclass{article} \usepackage{adjustbox} \usepackage{amsmath} \usepackage{...


6

All of this is really not recommended, unless you really know what you are doing and/or is willing to suffer the consequences. In the words of Mr. Cat, this is "living dangerously", and you may end up being dead when someone opens the box ;-) \DeclareMathSymbol is used to select the glyph in a font which will be used to write a specific symbol on the paper. ...


2

One side note: on many systems, Cambria Math will be in the file cambria_01.ttf or cambria.ttc. Therefore, the only portable way to select it is by its display name. That’s not the cause of your error, but it’s something I needed to change to get your MWE to compile. It’s a bug in unicode-math that range=\backtick and range="2035 don’t work. As of August ...


1

I wanted to add that surrounding, say, an equal sign with empty braces (i.e. \phantom{{}={}}) to get the right alignment does not work if the equal sign is followed by an operator. What does work, however, is using \mathrel{\phantom{=}}. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} &\phantom{{}={}} \sin(x) \\ &=...


4

If you're happy with the symbol, set the lower limit together with the integral, then add the upper limit to the whole block. \documentclass{article} \usepackage{amsmath} \usepackage{adjustbox,xparse} \NewDocumentCommand{\Prodint}{e{^_}}{% \mathop{}\!% {% \adjustbox{trim = 0pt -0.5pt 0pt 0.15\height, clip}{$\displaystyle\int\IfValueT{#2}{_{#2}}$}% ...


5

An alternative with the cellspace package: \documentclass{article} \usepackage{cellspace} \usepackage{tabularx} \newcolumntype{Y}{>{\centering\arraybackslash}X} \setlength\cellspacetoplimit{6pt} \setlength\cellspacebottomlimit{6pt} \begin{document} \begin{tabularx}{\linewidth}{|Y|SY|Y|}\hline a & $\overrightarrow{\mathrm{AB}}$ & cdeffg \\\hline \...


4

Another possibilities is to use \makegapedcells from makecell package: \documentclass{article} \usepackage{amsmath, amssymb} \usepackage{makecell, tabularx} \newcolumntype{Y}{>{\centering\arraybackslash}X} \begin{document} { \setcellgapes{3pt} \makegapedcells \begin{tabularx}{\linewidth}{|Y|Y|Y|}\hline a & $\overrightarrow{\mathrm{AB}}$ & ...


4

You could use \renewcommand{\arraystretch}{<more space between rows>} (or with the @Zarko'definition stretchering factor), to increase the space of the cells for example. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amssymb} \usepackage{tabularx} \newcolumntype{Y}{>{\centering\arraybackslash}X} \begin{...


1

This is using TikZ also, but somehow simpler egreg's answer. TikZ controls everything: the center and around symbol with their scaling and distance, as well as horizontal alignment with other texts or formulars (via optionbaseline=(A.mid)). \documentclass{article} \usepackage{amsfonts,tikz} \newcommand{\putaround}[8]{% % #1 center char % #2 scale rate of ...


5

The best way to achieve this is with \rotatebox[origin=c]{180}(\someSymbol), from graphicx. It doesn’t rely on any undocumented feature, and it doesn’t need any adjustment with \raisebox, although you might still prefer to add one. There are two different ways to read your question: a 180° rotation and a vertical reflection are two different meanings of “...


1

I can suggest to use the lite version of mtpro2 that you can find to CTAN. Here for example there is a recent documentation (see pag. 14). Is you will use this MWE \documentclass[12pt]{article} \usepackage[lite]{mtpro2} \begin{document} Let $\wwtilde{I}$ collision be elastic in one frame of reference.\\ Let $\tilde{I}$ and let $ \widetilde{I}$ another ...


5

Presumably it is possible. \documentclass{article} \usepackage{amsmath} \usepackage{cancel} \newcommand{\mycancel}[2]{\overset{#1}{\cancel{#2}}} \begin{document} \section{Something} \begin{align*} \left(\begin{bmatrix}a\\b\\c\end{bmatrix} \times \begin{bmatrix}x\\y\\z\end{bmatrix}\right) \cdot\begin{bmatrix}a\\b\\c\end{bmatrix} &=\begin{bmatrix}bz-cy\\...


3

The LaTeX kernel borrows its definition of \pmod \def\pmod#1{% \allowbreak\mkern18mu({\operator@font mod}\,\,#1)} (see ltmath.dtx, code lines 39–40) from plain TeX, in which it reads \def\pmod#1{\allowbreak\mkern18mu({\rm mod}\,\,#1)} (see The TeXbook, p. 361); in both cases, the space that precedes the word “mod” is 1em wide. The examples of use ...


11

Like this? \documentclass{article} \usepackage{graphics} \begin{document} \[ \Omega\quad\raisebox{\depth}{\scalebox{1}[-1]{$ \Omega $}} \] \end{document} Added: Simpler, the amssymb package defines the \mho command for the conductance unit:


4

I would avoid using TeX Gyre Pagella or newpxtext if small caps are to be used. The proportions of some of these small caps are off. This is particularly obvious for o.sc. Here O\textsc{o}o is compared for newpxtext with option largesc, TeX Gyre Pagella and mathpazo with option sc (or osf): Without the largesc option, newpxtext is the same as Pagella. But ...


5

The accents package allows one to define accents. The syntax to define a new accent is \accentset{〈accent〉}{〈symbol〉}. There is no ellipse in the standard math alphabet. You can get one by horizontally stretching a circle: \hstretch{2}{\circ}. Parameter 2 can be modified; it defines the scale factor. hstretch command is provided by the scalerel ...


2

You need to use a linenomath environment around the equation. \documentclass{article} \usepackage[fleqn]{amsmath} \usepackage{lineno} \usepackage{blindtext} \begin{document} \linenumbers \blindtext[2] \begin{linenomath} \begin{equation}\label{eq:test} a^2+b^2=c^2 \end{equation} \end{linenomath} \blindtext[3] \end{document}


6

You can also do this with OpenType fonts using unicode-math. \documentclass[10pt,letterpaper]{memoir} \usepackage{amsmath} \usepackage{unicode-math} \usepackage{microtype} \usepackage{lipsum} \defaultfontfeatures{Scale=MatchLowercase} \setmainfont{TeX Gyre Pagella} \setmathfont{Asana Math} \begin{document} \chapter{Demo} Some regular text. \lipsum[1] ...


10

I suggest that you not load the mathpple, mathpazo, and upgreek packages and, instead, load the newpxtext and newpxmath packages. \documentclass[10pt,letterpaper]{memoir} \usepackage{amsmath,amssymb} %\usepackage{mathpple} %\usepackage{upgreek} %\usepackage{mathpazo} \usepackage{lipsum} \usepackage{newpxtext,newpxmath} \begin{document} Some regular text. \...


7

Currently, I have only set it up for \displaystyle. If you need smaller math styles, let me know. One can change the square size with \sqdim. \documentclass{amsart} \usepackage{stackengine} \def\sqdim{.4ex} \newcommand\perpsq{\mathrel{\ensurestackMath{\stackengine{0pt}{\perp} {\kern\sqdim\rule[\sqdim]{\sqdim}{.4pt}\rule[.4pt]{.4pt}{\sqdim}}{O}{c}{F}{F}{...


3

The spaces are exactly the same -- compare the gaps between the surrounding text, not the distance from the highest/lowest elements of the displayed material. The difference you observe is the fact that there is a large operator with limits in the second display; that is not part of the defined measurement, which is correctly described by @egreg (in a ...


2

You can make these symbols math active by setting their mathcode to 8000 and then define them by the lowercase trick: \documentclass{article} \usepackage{amsmath} \usepackage{mleftright} \makeatletter \def\@mathactive#1#2{\begingroup \lccode`~=`#1 \lowercase{\endgroup \def~{#2}}% \mathcode`#1="8000\relax} \@mathactive({\mleft(} \@...


3

My suggestion is not to use cases, because it increases the interline spaces also inside nested alignments. Using multlined for the long middle equation does the job. \documentclass{article} \usepackage{amsmath,mathtools} \begin{document} \begin{equation*} V_{ijk} = \left\{ \begin{aligned} & \dfrac{y_u+y_l}2 - \dfrac{x_u+x_l}2, && \text{if }...


3

Here's a solution that employs a dcases* environment instead of the cases environment. The d in dcases denotes "display style"; this means, among other things, that one can write \frac instead of \dfrac in order to get "large" fraction terms. Note that I've removed unnecessary \left and \right directives. \documentclass{article} \usepackage{mathtools} % ...


7

with \mfrac from nccmath and multlined from the mathtools package: \documentclass{article} \usepackage{mathtools, nccmath} %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} %----------------------------------------------------------...


5

I'm pretty sure it is a duplicate. But it is also easy to solve using aligned \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} V_{ijk}& = \begin{cases} \dfrac{y_u+y_l}2 - \dfrac{x_u+x_l}2,& \text{if }x_u < y_l \\[15pt] \begin{aligned}[b] &\dfrac1C \bigg[\dfrac{x_u^3-y_l^3}{6}+\dfrac{y_l^2+x_u^...


5

Judging from the italic font, the display is inside a theorem statement. I would avoid the parentheses and the repetition of common parts: \documentclass{article} \usepackage{amsmath} \newtheorem{theorem}{Theorem} \DeclareMathOperator{\MSC}{MSC} \begin{document} \begin{theorem} Blah, blah \begin{equation*} \MSC(C_n^2)= \begin{cases} 1, & \text{if $...


2

I don't think using \pmod within parentheses looks so nice, especially if the outer (text) parentheses are italic, so I propose using \bmod instead. I propose two ways: with the cases* environment from mathtools (simpler syntax), and with a standardcases,andeqparbox` to align the modulus conditions: \documentclass{article} \usepackage{mathtools} \...


4

Following Writing mod in congruence problems without leading space, use \Mod as defined below: \documentclass{article} \usepackage{amsmath} \newcommand{\Mod}[1]{\ (\mathrm{mod}\ #1)} \begin{document} \begin{align*} MSC(C_n^2) &= \begin{cases} 1, & \text{if $n$ is odd and $d$ is even ($n \equiv 1 \Mod{4}$)}, \\ 2, & \text{...


3

I suppose you are using algorithm2e to insert algorithms. Also, you have to insert math symbols in math mode, eg, $\Leftarrow$. Finally, delete the Endif. MWE \documentclass[11pt,a4paper]{report} \usepackage{amsthm,amsmath,amssymb} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{algorithm2e} \begin{document} \begin{algorithm} \caption{...


0

In fact, I found an easy solution. Instead of \mathup or \mathrm, one can use \normalfont to use the text font and keep it upright in any environment. \documentclass[11pt]{article} \usepackage{amsthm,amssymb,amsmath,amsbsy} \usepackage[T1]{fontenc} \usepackage{baskervald} \usepackage[bigdelims]{newtxmath} % math font %\usepackage[bb=px,cal=cm,scr=boondoxo]{...


0

So after some work and looking at different ways to find code that make solve this, I have this partial solution that works well enough for my own purposes. It does require some manual labor and I know that there are probably better solutions. I hope that this helps in the meantime. \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \...


Top 50 recent answers are included