Skip to main content

New answers tagged

1 vote

Defining a functional map

Use aligned inside align*: \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} \begin{align*} \Psi: C([0,1],\mathbb{R}) &\longrightarrow C([0,1],\mathbb{R}) \\ ...
Stephen's user avatar
  • 4,269
1 vote
Accepted

Mathcal not working properly

I can reproduce the issue with much less packages: here I only keep the packages that have to do with math fonts. \documentclass[fleqn,leqno]{article} \usepackage{gensymb} \usepackage{amsmath} \...
egreg's user avatar
  • 1.1m
5 votes

Should an array eat up an explicit \mskip at the end of a column if tabularx is loaded?

tabularx is not involved here other than it loads array. In previous releases the mskip is removed but in 2024 that was fixed https://github.com/latex3/latex2e/issues/1323
David Carlisle's user avatar
0 votes

I just want to write \Sha without ruining everything

If you want to use the sha symbol for representing the shuffle product, you can use: \usepackage{shuffle} And then access the character with \shuffle
Jack's user avatar
  • 145
2 votes

Evaluate fractions in Binomial coefficient command

This does not differ much from mbert's answer, but has the added bonus of optionally computing the probability. \documentclass{article} \usepackage{amsmath} \usepackage{xintexpr}% for binomials \...
egreg's user avatar
  • 1.1m
1 vote

Evaluate fractions in Binomial coefficient command

What we can do with plain TeX: \def\pbinom#1#2#3{\pbinomA{#1}{#2}#3/} \def\pbinomA#1#2#3/#4/{ {#2\choose#1} {#3\overwithdelims()#4}^{#1} {\the\numexpr#4-#3\overwithdelims()#4}^{\the\numexpr#2-...
wipet's user avatar
  • 75.5k
2 votes
Accepted

Evaluate fractions in Binomial coefficient command

You can use \fpeval and \inteval to do computations with floating point numbers and integers, respectively. For your preferred syntax, I used two auxiliary commands for processing the argument. \...
mbert's user avatar
  • 4,316
0 votes

How should I label the differentials (arrows) in sseq for a spectral sequence?

Switch in tikz-cd: \documentclass[12pt]{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd}[column sep=small, row sep=small] 1 & A \arrow[rrd, "d_2"] & & \\ 0 & &...
Sebastiano's user avatar
  • 56.5k
0 votes

Interactive tools to make math diagrams in LaTeX

In my humble opinion, currently (Jun 2024), the best tool that builds diagrams even in TikZ is Mathcha especially for beginners. Mathcha is a web-based WYSIWYG editor for creating LaTeX math symbols, ...
Sebastiano's user avatar
  • 56.5k
0 votes

Strike-through text paragraph containing equations

Use lua-ul instead (requires compilation with lualatex): % !TeX TS-program = lualatex \documentclass{article} \usepackage{amsmath,amssymb,mathtools} \usepackage{lipsum} \usepackage{blindtext} \...
samcarter_is_at_topanswers.xyz's user avatar
5 votes
Accepted

Squished ```\equiv'''

Put two \equiv signs with some backup in the middle. \documentclass{article} \newcommand{\Equiv}{\equiv\joinrel\equiv} \begin{document} $a = b$ $a \equiv b$ $a \Equiv b$ \end{document} The ...
egreg's user avatar
  • 1.1m
2 votes

Wedge inside of itself math symbol

There's always the TikZ option... \documentclass{article} \usepackage{tikz, scalerel} \newcommand{\Wedge}{\mathbin{\scalerel*{\tikz{ \path[use as bounding box](-.04,0)rectangle(.24,.23); \...
Sandy G's user avatar
  • 46.5k
4 votes
Accepted

Wedge inside of itself math symbol

Another approach could be this looking the answer here importing the only symbol (rotated) $\ggg$ from mathabx package: \documentclass[12pt]{article} \DeclareFontFamily{U}{matha}{\hyphenchar\font45} \...
Sebastiano's user avatar
  • 56.5k
6 votes

Wedge inside of itself math symbol

Not really pretty… \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \makeatletter \newcommand{\Wedge}{\DOTSB\mathbin{\mathpalette\Wedge@\relax}} \newcommand{\Wedge@}[2]{% \ooalign{...
egreg's user avatar
  • 1.1m
1 vote
Accepted

"Fancy" math font with double brackets

I guess you want something like this: \documentclass{article} \usepackage{amsmath} \usepackage{stmaryrd} \DeclareMathOperator{\Val}{\mathcal{V}\mspace{-2mu}\mathit{al}} \begin{document} $\Val\...
egreg's user avatar
  • 1.1m
3 votes

Better alternative for writing $\circ\!\!-\!\!\!-\!\!\bullet$

You should, to begin with, define a command for the job. \documentclass{article} \usepackage{amsmath} % Laplace direct transform \newcommand{\ldt}{\mathrel{\circ}\mathrel{\!}\mathrel{-}\mathrel{\!}\...
egreg's user avatar
  • 1.1m
3 votes

Better alternative for writing $\circ\!\!-\!\!\!-\!\!\bullet$

If you use an unicode engine, it is available through the command \origof provided by the package unicode-math (code U+022B6). Example : \documentclass{article} \usepackage{unicode-math} \begin{...
jlab's user avatar
  • 3,759
2 votes
Accepted

Problem of resizing and scaling

Here are the necessary modifications: Use semilogxaxis instead of axis. (This will also move the dashed line to 1.) Declare your tick labels with xtick={.01,.05,.1,.2,.5,1,2,5,10} Use log ticks with ...
Sandy G's user avatar
  • 46.5k
4 votes

How to Produce a Cross Patonce in LaTeX?

Take the PostScript file you find at https://en.m.wikipedia.org/wiki/File:Cross-Patonce-Heraldry.svg The image is declared “public domain”, so there's no usage restriction. %! /Patonce-arm{ 300 -181 ...
egreg's user avatar
  • 1.1m
8 votes
Accepted

How to Produce a Cross Patonce in LaTeX?

Quick, TikZ version. You can adjust to your liking. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=.5] \foreach \t in {0,90,180,270}{ \scoped[rotate=\t] \fill ...
Sandy G's user avatar
  • 46.5k
10 votes

Is there a way of creating this symbol for probability independence with respect to a $\sigma$-algebra?

The ⫫ symbol is \Vbar in unicode-math, or the legacy packages stix, stix2 and fdsymbol. \documentclass{article} \usepackage[default]{fontsetup} % Loads unicode-math. \begin{document} \begin{align*} ...
Davislor's user avatar
  • 45k
10 votes

Is there a way of creating this symbol for probability independence with respect to a $\sigma$-algebra?

You can use the standard _{C} syntax. \documentclass[twocolumn]{article} \usepackage{amsmath} %%% the pure symbol, see https://tex.stackexchange.com/a/718194/4427 \newcommand{\cind}{\perp\mspace{-9mu}...
egreg's user avatar
  • 1.1m
15 votes

Is there a way of creating this symbol for probability independence with respect to a $\sigma$-algebra?

The newtx and newpx text and math font packages provide a macro called \Perp that can be used to create a relational operator I'll call \prind -- short for "probability independence", I ...
Mico's user avatar
  • 513k
8 votes

Is there a way of creating this symbol for probability independence with respect to a $\sigma$-algebra?

There is the built-in \coprod symbol: \documentclass{article} \begin{document} $a\coprod b\quad a\coprod_c b\quad{\displaystyle a\coprod_c b}$ \end{document} Alternatively, you can make a double \...
Sandy G's user avatar
  • 46.5k
3 votes
Accepted

What will be the overleaf code for this table

Your table only has 11 rows of data, so change the value of ymax, and make sure the y-coordinates in your coordinates number from 1 to 11. \documentclass[11pt]{report} \usepackage{booktabs} \...
Sandy G's user avatar
  • 46.5k
4 votes

Long inclusion symbol

You can append two copies of half the symbol (clipped at the left). No need to do guesses about the dimensions of the symbols. This should work with any math font set (unless it has very peculiar ...
egreg's user avatar
  • 1.1m
7 votes
Accepted

Long inclusion symbol

You could use \scalebox to stretch a character horizontally, but then vertical portions become thick. So you could use trimclip to isolate the middle of a character and stretch it horizontally. The ...
Sandy G's user avatar
  • 46.5k
4 votes

Long inclusion symbol

You can fake it by creating a symbol that is like the equals sign, but with the two lines spread further apart. This can be accomplished by just drawing some rules. But note that this relies on a lot ...
Willie Wong's user avatar
  • 25.5k
2 votes

How can I write this on latex?

Maybe you can start from the following code that essentially uses a tabular environment with an \hline. Add the following code to your preamble: \newcommand\fillin[2][0pt]{% \begin{tabular}[t]{c} \...
gernot's user avatar
  • 49.9k
4 votes
Accepted

How to write a math formula in bibtex

The file \documentclass{article} \begin{document} abc \cite{BuresDistance} xyz \bibliographystyle{plain} \bibliography{b.bib} \end{document} with b.bib @article{BuresDistance, author = {Bures, D},...
David Carlisle's user avatar
6 votes
Accepted

Geometric measure theory: Notation for the cone of a current

It looks simply like two stacked \times \documentclass{article} \makeatletter \newcommand*{\foo}{\mathrel{\mathpalette\@foo\relax}} % or \mathbin? or nothing? \newcommand*{\@foo}[2]{% \setbox\z@=\...
campa's user avatar
  • 31.7k
4 votes

Control height of subscript in LaTeX

You could use a \vphantom, which makes an object with the height of its argument, but having no width. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} \operatorname{P}...
bert's user avatar
  • 159
5 votes

Control height of subscript in LaTeX

You can use \smash to remove the extra vertical spacing, like so: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} \operatorname{P}_{\widehat{Y}} \quad \operatorname{P}...
karlh's user avatar
  • 725
2 votes

Wrap text in equations?

Probably not optimal, but you can try the varwidth package with inline math, and define a command like \newcommand{\restrain}[2][5cm]{% \begin{varwidth}{#1} \centering $#2$ \end{varwidth} } ...
jlab's user avatar
  • 3,759
2 votes

Wrap text in equations?

Late to the party, but I noticed the presence of a lot of useless parentheses that don't add to clarity, but rather hinder reading. The added spaces don't help either. \documentclass{article} \...
egreg's user avatar
  • 1.1m
1 vote

Wrap text in equations?

An harmonized view code. \documentclass[12pt]{article} \usepackage{geometry} \usepackage{amsmath} \begin{document} $ \left(\left(\vcenter{\hbox{$\displaystyle \frac{\left(\begin{array}{c} \texttt{5dc}+...
Sebastiano's user avatar
  • 56.5k
6 votes
Accepted

LaTeX error during base conversion : Missing number, treated as zero

The issue is that the powers (for example 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2 for the first case) are calculated with the following line of code: \xinttheiiexpr [reversed(...
Marijn's user avatar
  • 38.6k
2 votes
Accepted

Why this wrong horizontal spacing in mathmode?

Either use -ed form inside gather, here aligned, separate the environments, use only align* or add space manually as proposed by egreg. Example: \documentclass[12pt,letterpaper,twoside]{book} \...
jlab's user avatar
  • 3,759
3 votes

Create a command with pgf options to import a symbol from a different font

The following is basically the same answer as @cfr's, but the code turned into L3 code, and instead of using a long chain of strcmp it just turns the style into a macro (so style=mathbin results in \...
Skillmon's user avatar
  • 61.4k
4 votes
Accepted

Quote Equation number with horizontal alignment

quote is based on \list and doesn't like \rightskip to be set. \documentclass[11pt]{book} \usepackage{showframe} \def\ShowFrameLinethickness{0.125pt} \newenvironment{smallquote}{% \list{}{\...
egreg's user avatar
  • 1.1m
1 vote

Automatically listing answer choices: either all in one line, or each answer choice in one line

You can grab the environment body so that it can be reset multiple ways, first try an inline list and if that is too wide, reset as a display list \documentclass[12pt]{article} \usepackage[a4paper, ...
David Carlisle's user avatar
0 votes

General guide on how to set up Minion Pro for math in lualatex

MnSymbol and Minion Pro with mathspec Another solution not mentioned in Robert Seifert’s excellent answer. This package lets you combine a modern text font with a legacy math font. It requires ...
Davislor's user avatar
  • 45k
0 votes

Overleaf math mode misplacing bug?

A friend and I encountered this problem and managed to fix it. When does this error happen ? When using $...$ math mode and scrolling through your code while having your cursor on the line ...
Eterniance's user avatar
4 votes
Accepted

Create a command with pgf options to import a symbol from a different font

I don't recommend this approach, but it will work if you remove * [1] from the font family declaration and use FdSymbolC-Regular. I also commented a bunch of line endings which would otherwise ...
cfr's user avatar
  • 206k
1 vote

\int font problem in ctexbeamer

The fdsymbol package seems full of bell and whistles, read many symbols that don't appear in the standard packages such as amssymb. However, loading it has a price: every math symbol is changed, but ...
egreg's user avatar
  • 1.1m
10 votes

Need to create a math symbol

With the standard fonts: \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\triangledot}{\mathord{\mathpalette\triangledot@\relax}} \newcommand{\triangledot@}[2]{% \ooalign{$\m@...
egreg's user avatar
  • 1.1m
10 votes

Need to create a math symbol

In the set font stix there is a triangle with dot. You can import only the symbol \trianglecdot. The code is with the default font of Computer Modern=CM is: \documentclass[a4paper,12pt]{article} \...
Sebastiano's user avatar
  • 56.5k
11 votes

Need to create a math symbol

The logix package (requires an unicode-aware engine like lualatex) has a similar symbol: % !TeX TS-program = lualatex \documentclass{article} \usepackage{logix} \begin{document} \[ \LogNonCont_i \...
samcarter_is_at_topanswers.xyz's user avatar
24 votes
Accepted

Need to create a math symbol

Here's one way that works across math scripts. I have used \mathord to make it act as a variable (or constant) in terms of spacing. If it was an operator of some sort, the \mathord could be changed ...
Steven B. Segletes's user avatar
3 votes

How to display `\hat` when using sans-serif?

I add a MWE where I have used the command \skew. This command is specifically designed to move accents while keeping the underlying character still. \documentclass[12pt, letterpaper, twocolumn]{...
Sebastiano's user avatar
  • 56.5k

Top 50 recent answers are included