New answers tagged

1

You could draw this with tikz: \documentclass{article} \usepackage{amsmath,tikz} \newcommand{\curvearc}{\tikz[trim left]{\draw[->] (0,0) to[bend left] (1em,0);}} \begin{document} \( \stackrel{\curvearc}{AB} \) \end{document}


5

You have a spurious extra \\ after the first equation. Remove it, and the extra line will disappear. For the second equation, do consider using a cases environment; for one, the left-hand curly brace will be a bit larger. \documentclass{article} \usepackage{amsmath} % for 'cases' env. and `\text` macro \numberwithin{equation}{section} % just for this ...


0

Load amsmath. \begin{document} \begin{equation} u(x,t) = 0 \text{ si } x = 0, x = 1\label{ex1bc} \end{equation} \begin{equation} u(x,0)=\begin{cases} x, & \text{si $0 \le x \le 1/2$}, \\ 2(1-x), & \text{si $1/2 \le x \le 1$.} \\ \end{cases} \end{equation} \end{document}


7

Make sure the \abs macro is defined. \documentclass{article} \usepackage{mathtools} % for '\DeclarePairedDelimiter' macro \DeclarePairedDelimiter{\abs}{\lvert}{\rvert} % define '\abs' macro \begin{document} $\frac{\abs{\lambda_f}}{8\pi^2}$\quad $\dfrac{\abs{\lambda_f}}{8\pi^2}$ \end{document}


2

\usepackage{fourier} Then $\wideOarc{AB}$ However, as Andrew Swann noted in a comment, loading the fourier package changes all the fonts in the document.


1

I use the pdfocr program with tesseract when I want to ocr my pdf's on linux I use the ppa:gezakovacs/pdfocr repository for pdfocr and sudo apt-get update sudo apt-get install pdfocr sudo apt-get install tesseract-ocr sudo apt-get install tesseract-ocr-eng The command to convert is pdfocr -i input.pdf -o output.pdf In addition, prior to ...


3

\usepackage{tikz} \usetikzlibrary{arrows.meta} \newlength\tmplength \newcommand*\textarrow[2][3em] {\mathrel{\vcenter{\hbox{\settowidth\tmplength{\scriptsize#2}% \tikz[font=\scriptsize] \draw[->](0,0)--node[fill=white,midway]{#2} ++({#1+\the\tmplength},0);}}}} and ...


4

I'd use smaller type vertically centered with respect to the math axis: \documentclass{article} \usepackage{amsmath} \newcommand{\crightarrow}[1]{% \relbar\joinrel\joinrel\relbar\mathrel{\vcentertext{#1}}\rightarrow } \newcommand{\vcentertext}[1]{% \vcenter{\hbox{\scriptsize\smallstrut#1}}% } \newcommand{\smallstrut}{\vrule height 1.5ex depth 0.5ex ...


6

I propose this: \documentclass{article} \usepackage{amsmath} \newcommand{\mytextarrow}[1]{\mathrel{\relbar\mkern-10mu\relbar\mkern-3.5mu\raisebox{0.25ex}{\scriptsize#1}\!\rightarrow}} \begin{document} \begin{equation*} 2 + 2 \mytextarrow{goes to} 4 \end{equation*} \end{document}


2

\documentclass{article} \usepackage{amsmath} \newcommand{\textarrow}[1]{-\text{#1}\to} \begin{document} \begin{equation*} 2 + 2 \textarrow{goes to} 4 \end{equation*} \end{document}


5

I'm not sure if you really want this; however, here it is. \documentclass{article} \usepackage{amsmath} \usepackage{unicode-math} \ExplSyntaxOn \NewDocumentCommand{\defineoversetchar}{m} { \clist_map_inline:nn { #1 } { \kasper_define_overset_char:n { ##1 } } } \cs_new_protected:Nn \kasper_define_overset_char:n { \cs_new_protected:cn { ...


6

Here you are, I think. You don't have to add \tag, numbering is automatic. Also, don't add \\ at the end: it creates a new line and a new tag. \documentclass[a4paper, 11pt]{book} \usepackage[utf8]{inputenc} \usepackage{fourier, heuristica} % not necessary, just personal preference \usepackage{mathtools} \begin{document} \begin{align} ...


0

I am missing the reputation to add a comment to Herr K.'s answer... In order to generate individual PNG files on Windows, you may need to specify the actual convert executable on your path (standalone assumes this to be imgconvert on Windows, instead of convert). MWE: \documentclass[ multi={mymath}, border=2pt, ...


3

In your linked question Yiannis writes: When using the \DeclareMathSizes the first parameter for the text font must be exactly what is used in the class declaration. For example with Beamer rather declare \documentclass[10pt]{beamer}, otherwise the command will appear as it is not working. That is not a hundred percent correct. You have to use ...


0

The problem can be solved by the amssymb package for a (graphical) square. amssymb overwrites \square with no backup of amssymb’s original \square macro. See http://www.combinatorics.net/weblib/a.8/a8.html. The table is divided into two parts. The top part contains the symbols provided by LaTex ; the last three commands requires the latexsym package.The ...


0

It's not a mathematical symbol, it's definitely a capital S, but in cursive. That's how it usually appears when you write by hand and in some fonts, depending on the style, it really looks like a flipped ampersand. If you go to any website that provides fonts, search for "cursive font", and type a capital S. Some of them will look like the letter you ...


3

Here's a start, with \Ss{}{}{}. EDITED to work with displaystyle stuff, too. EDITED to automatically work with subscripting styles, as well. FIXED obvious bug that macro did not behave properly if superscript length exceeded subscript length. \documentclass{article} \usepackage{amsmath,stackengine,scalerel} ...


0

For example, you can try this: \def\sf#1_#2^#3{% \setbox1=\hbox{$\scriptstyle#2$}% \setbox2=\hbox{$\scriptstyle#3$}% \ifdim\wd2>\wd1 \dimen0=\wd2 \else \dimen0=\wd1 \fi \setbox2=\hbox to\dimen0{\hss\box2}% \setbox1=\hbox to\dimen0{\hss\box1}% #1_{\box1}^{\box2} } $\sf x_{100}^{2}$ \bye


5

I'm not sure what's the purpose of this, but here it is: \documentclass{article} \usepackage{mathtools} \DeclareRobustCommand{\subsup}[3]{{% \mathpalette\makesubsup{{#1}{#2}{#3}}% }} \makeatletter \providecommand{\@firstofthree}[3]{#1} \providecommand{\@secondofthree}[3]{#2} \providecommand{\@thirdofthree}[3]{#3} \newcommand{\makesubsup}[2]{% ...


10

With MinionMath-Regular: \documentclass{article} \usepackage{unicode-math} \setmathfont{MinionMath-Regular.otf} \begin{document} \[ \sqrt{{x^i}} \] \[ \sqrt{\sum_{i = 1}{x^i}} \] \[ \sqrt{\sum^{n}{x^i}} \] \[ \sqrt{\sum_{i = 1}^{n}{x^i}} \] \end{document}


6

Two suggestions: You could affix \nolimits to \sum, to force LateX to set the limits of summation to the side rather than above and below the summation symbol. That way, the surds will be noticeably less steep and their overall height will be much reduced, reducing their visual dominance. Of course, if you side-set the limits of summation, the formulas ...


18

The only math font package I know that has slanted surds at large sizes is mtpro2: \documentclass{article} \usepackage[lite]{mtpro2} \begin{document} \[ \SQRT{1+ \SQRT{1+ \SQRT{1 + \SQRT{1+ \SQRT{1+ \SQRT{1+x}}}}}} \] \[ \SQRT{\sum_{i = 1}^{n}{x^i}} \] \end{document} Note that \SQRT should be used for this to work. Unfortunately, adapting this to ...


23

If you look carefully you can see that the angle changes if the part below the root sign gets larger until it is vertical. Imho all math fonts will do it. So if you want a slant: make the content smaller, e.g. by using \nolimits: \documentclass{article} \begin{document} \[ \sqrt{1+ \sqrt{1+ \sqrt{1 + \sqrt{1+ \sqrt{1+ \sqrt{1+x}}}}}} \] \[ ...


0

Load amsmath always before fontspec. For math use always unicode-math: \documentclass[french]{report} \usepackage{amsmath} \usepackage{unicode-math} \begin{document} ... will work


5

We could do it, but it would be wrong. \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \begin{document} \[ \sqrt{\sum_{i = 1}^{n}{x^i}} \] \[ \scalebox{2}{$\displaystyle\sqrt{\scalebox{0.5}{$\displaystyle\sum_{i = 1}^{n}{x^i}$}}$} \] \end{document}


2

To remove this question from the list of unanswered questions and inform those interested: The fix is now available on TeX Live. Thanks again to @egreg and @DavidCarlisle for the fast response, that a fix was already on the way.


4

align and align* use a vertical skip amount of about 10pt above the environment. This can be set to 0pt, but this should be done within a group, i.e. use {% \abovedisplayskip=0pt% \begin{align*} ... \end{align*} }% Please note, that there's \belowdisplayskip as well, having the analogous meaning for the space below the environment. Reducing just one ...


8

A similar thing came up the other day with Hàn Thế Thành describing how pdftex avoids the accumulation of errors. http://tug.org/pipermail/tex-live/2016-January/037682.html Basically if there is a small relative space specified the renderer may have to adjust that to the nearest pixel, but should keep track of how far it is from the ideal position so that ...


5

\documentclass{article} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{sansmath} \begin{document} foo \sansmath \begin{align*} a & b & c \end{align*} \end{document}


7

Well, first of all, if your equation is intended to be inline you should be using single $s only - i.e. $ ... $. In fact, in general, $$ ... $$ is deprecated in LaTeX: Why is \[ ... \] preferable to $$ ... $$? Now, onto the main point. I think what you're doing is enclosing the entire mathematical equation in $ ... $ (this is correct) and individual ...


2

The systeme package does this in a very pretty way: \documentclass{article} \usepackage{amsmath} \usepackage{systeme} \begin{document} \[ \systeme{ x_{1} - 3x_{2} + 4x_{3} = -4, 3x_{1} - 7x_{2} + 7x_{3} = -8, -4x_{1} + 6x_{2} - x_{3} = 7 } \] \end{document} If you search on the site for systeme, you'll find several other examples. For ...


1

You can use \overset and \substack, with a trick for making the annotation to have zero width: \documentclass{article} \usepackage{amsmath} \newcommand{\annoterel}[2]{% \overset{% \substack{\hidewidth\text{#1}\hidewidth\\\downarrow}% }{#2}% } \begin{document} \begin{equation} E[|A\cup B|] = E[|A|+|B|-|A\cap B|] \annoterel{linearity}{=} ...


1

Verdana is a sans font that has serifs on the capital i.


3

You could use the \overset macro, which is provided by the amsmath package: \documentclass{article} \usepackage{amsmath} % for \overset and \text macros \begin{document} \begin{equation} E[|A\cup B|]=E[|A|+|B|-|A\cap B|] \overset{\text{linearity}}{=} E[|A|]+E[|B|]-E[|A\cap B|] \end{equation}\ \end{document} Addendum: If you also need the vertical ...


3

The problem is that the inner sep and line width do not change with the font. The solution is to define a length that does change proportionately with the font. I chose the height of \mathstrut, but almost anything will do. Also, by drawing the circle separately, you can adjust its size and the size of the contents ($r$) separately. ...


0

Another option: \documentclass{article} \newcommand{\boldm}[1] {\mathversion{bold}#1\mathversion{normal}} \begin{document} There is a normal symbol, $p_1$. Now, a bold symbol: {\boldm $p_2$}. It works! \end{document} Output:


3

I suggest you use the \Pr macro, which places its subscript argument (the "constraint") below rather than to the side when in displaystyle-math mode. For inline-style math mode, add \limits after \Pr. A separate issue: use \mathtt for the letters that apparently need to be set in monospaced (aka "teletype") font face. \documentclass{article} ...


1

An alternative to Przemysław's solution would be to use \underset{•}{•}. \documentclass{article} \usepackage{amsmath} \begin{document} \[ \underset{v \leftarrow \left\{0,1\right\}^n}{\Pr} \Big[ \texttt{Fre}(A,B,C) = \texttt{Ja} \Big] \leq \frac{1}{2} \] \end{document} I also tuned your original formula a bit to make it look a bit nicer.


3

For example (some tuning is needed): \documentclass{article} \usepackage{amsmath} \begin{document} \[ \Pr_{v \leftarrow \{0,1\}^n}[ \operatorname{Fre}(A,B,C) =\operatorname{Ja} ] \leq \frac{1}{2} \] \end{document} If Fre and Ja are used more times, it would be wise to define them, e.g., \newcommand{\Fre}{\operatorname{Fre}}.


1

For the first problem, look at Long dashes for denoting omitted columns of a matrix For the second problem, the result will not be pretty: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{pmatrix} \makebox[9em]{\dotfill} \\ \makebox[9em]{\dotfill} \\ \makebox[9em]{\dotfill\ $2^{i+j}$ \dotfill} \\ \makebox[9em]{\dotfill} \\ ...


2

Here's a possibility: \documentclass{article} \usepackage{amsmath} \makeatletter \everymath{\if@display\else\thickmuskip=2mu plus 2mu\fi} \makeatother \begin{document} \begin{center}% just to show the effect $a=b$ \end{center} \[ a=b \] \end{document} Alternatively (and preferably), but this requires using \(...\) for inline math: ...


4

Measure the object to be quoted; if it's higher than the quotes, raise them. \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\mquote}[1]{{\mathpalette\mqu@te{#1}}} \newcommand{\mqu@te}[2]{% \sbox0{$\m@th#1\text{``}$}% \sbox2{$\m@th#1\text{''}$}% \sbox4{$\m@th#1#2$}% \ifdim\ht4>\dimexpr\ht0+1pt\relax ...


2

Does this meet your needs? \documentclass{article} \usepackage{amsmath,scalerel} \newsavebox\tmpbox \newcommand*{\mquote}[1]{\ThisStyle{\savebox{\tmpbox}{\hbox{$\SavedStyle#1$}}% \raisebox{\dimexpr\ht\tmpbox-.7\ht\strutbox}{``}\usebox{\tmpbox}% \raisebox{\dimexpr\ht\tmpbox-.7\ht\strutbox}{''}}} \begin{document} \[ \frac{f(x)}{g(x)} \implies ...


13

\v(C) only works outside maths mode. For inside maths mode, use \check{C}. Thus (providing you are using the amsmath or mathtools packages), create your operator using: \DeclareMathOperator{\Cech}{\check{C}} and you can then do $\Cech_r(S)$ to get what you want.


6

Or \resizebox of the same package graphicx ... \documentclass{article} \usepackage{graphicx} \newdimen\antes \setlength{\antes}{4em} \gdef\mb#1{\resizebox{\antes}{!}{#1% \global\addtolength{\antes}{-.15\antes}}} \begin{document} $\mb{2}^{\mb{2}^{\mb{2}^{\mb{2}^{\mb{2}^{\mb{2}^{% \mb{2}^{\mb{2}^{\mb{2}^{\mb{2}^{\mb{2}}}}}}}}}}}$ \end{document}


6

You could use \scalebox command from the graphicx package and make a macro that does this. But, as mentioned by @cfr in the comments to your question, readability very quickly becomes an issue. \documentclass{article} \usepackage{graphicx} \newcommand\aesuper[2][0.90]{^{\scalebox{#1}{$\scriptstyle#2$}}} \begin{document} \[ ...


1

To answer your question 4 about fonts, you can get a good list of Type 1 math fonts usable by PDFLaTeX, with samples, at the LaTeX Font Catalogue. I personally like \usepackage[osf,slantedGreek]{mathpazo} This gives you an attractive Palatino clone with excellent coverage. You can combine it with other math symbol packages, such as amssymb, boondox and ...


2

Depending on how complicated your requirements are, the general approach I would take is to use a scripting language with regex to find all latex commands (in python, say \(?:[^a-zA-Z]|[a-zA-Z]+[*=']? from here), and then apply a custom built filter to limit it to math symbol commands. The part about keeping subscripts intact is much harder. Parsing ...


9

multi-question questions don't really fit the site format but.. Do you think that it is Ok to recommend the mathtools package instead of amsmath package. The mathtools package calls the amsmath package and improves it as far as I understand. Yes What about the empheq package It's OK but more of a "contrib" package than mathtools which aims to ...


1

You can use Henrik Vogt's code in an answer to a similar question: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{amsmath} \makeatletter \newcommand*\rel@kern[1]{\kern#1\dimexpr\macc@kerna} \newcommand*\widebar[1]{% \begingroup \def\mathaccent##1##2{% \rel@kern{0.8}% \overline{\rel@kern{-0.8}\macc@nucleus\rel@kern{0.2}}% ...



Top 50 recent answers are included