Tag Info

New answers tagged

2

I have never seen any rules on this, but both of your examples are quite hard to read. I will just point out some thoughts about readability: a minus followed by a minus could be understood as a plus. When reading the whole formula (and not being used to such repetition like in Russia, as pointed out be egreg), I would read j sin z minus minus j sin z ...


0

\usepackage{mathrsfs} $\mathscr{F}$ Take a look at What are all the font styles I can use in math mode?


0

\documentclass[preview,border=12pt,12pt,varwidth]{standalone}% change this line to \documentclass{article} or whatever you want. \begin{document} \noindent The square root of 100 is $\sqrt{100}=10$. \\ But the cubic root of 64 is $\sqrt[3]{64}=4$. \end{document}


0

You can just use \sqrt{.........} and put what ever numbers between the brackets.


4

This uses a stacking approach. This answer is helping me to think of ways to automate dotted/dashed lines as part of stacks, which in this MWE, had to be done very manually. \documentclass{article} \usepackage[usestackEOL]{stackengine} \usepackage{graphicx} \stackMath % DASHED LINE OF SPECIFIED LENGTH % From morsburg at ...


6

Since revtex4 seems to be incompatible with the arydshln package, here's an option using TikZ: \documentclass[aps,prl,twocolumn,nofootinbib,superscriptaddress,floatfix]{revtex4} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \[ \Biggl(\mkern-5mu \begin{tikzpicture}[baseline=-.65ex] \matrix[ matrix of math nodes, column sep=1ex, ] (m) { B ...


2

Use the cases environment from \usepackage{amsmath}. \[f(x)= \begin{cases}% 7 & \text{if $x=0$}\\ 3x^2-2 & \text{otherwise} \end{cases} \]


9

You can adjust the dash and gap of the \hdashline by modifying the lengths \dashlinedash and \dashlinegap: \documentclass{article} \usepackage{tabularx} \usepackage{arydshln,leftidx,mathtools} \setlength{\dashlinedash}{.4pt} \setlength{\dashlinegap}{.8pt} \begin{document} \[ \leftidx{_{m-r}^{\phantom{m-r}\llap{$\scriptstyle r$}}}{\left( ...


5

In Unicode, a combining mark is associated with the character that precedes it, so you should use $x⃗$(the content between dollar signs is letter x followed by U+20D7 COMBINING RIGHT ARROW ABOVE). And you should declare a mathematical font that contains the character. But it still won’t work, presumably due to limitations in unicode-math, in fonts, or in ...


4

Define it just like \min is defined: \def\argmin{\mathop{\rm argmin}}


2

I would type the formula as displayed: \documentclass{article} \usepackage{amsmath} \begin{document} \noindent Text before. \begin{align*} P^{1}_{r,s} &= \sum_{i = r}^{n}P(\text{$i$ applicant is selected and is the best})\\ &= \sum_{i = r}^{n}P(\text{$i$ applicant is the best}) \cdot P(\text{$i$ is selected $\mid$ is the best}) \end{align*} ...


3

TeX inserts breakpoints after binary and relational operators with penalties \binoppenalty and \relpenalty. However, subformulas cannot be broken across lines. A pair of curly braces create a subformula as in the example of the question. Therefore the * does not create a breakpoint. If you want breakpoints inside the text part of the formula, then the text ...


7

You can use fancytooltips; one restriction is that this won't work in most PDF viewers; you need Acrobat Reader: Your main document will look something like this: \documentclass{article} \usepackage{xcolor} \usepackage[filename=proofs,mouseover,noextratext]{fancytooltips} \usepackage{amsmath} \usepackage{amsthm} \usepackage{lipsum} ...


5

This can be achieved with Optical Content Groups (OCG). There are some packages that support OCG. A CTAN search revealed the following packages: Package ocg-p Package ocgx Package ocgtools Example for ocgx (randomly choosen): \documentclass{article} \usepackage{ocgx} \begin{document} \noindent My theorem. \begin{ocg}{OCG 1}{ocg1}{0} My proof. \end{ocg} ...


7

The restriction of the AMS alignments that they may not be hidden behind command forms is documented on page 28 of the amsmath guide (texdoc amsmath ) Actually the restriction is better described in the technical notes (texdoc technote) as shown in the other answer. The names chosen here are particularly dangerous as using \def you lose the warning that you ...


10

The technote document explains why this kind of shorthand definitions will fail:


1

The answer from ( http://www.latex-community.org/forum/viewtopic.php?f=5&p=4872 )works for me: =================== Re: Can I have more control over my subscripts? Postby ptoche on Thu Aug 7th, 2008 Great tip. My contribution is absolutely trivial: In preamble, define: \newcommand{\ms}{\scriptscriptstyle} In text, type: {\ms TEXT} where "ms" stands ...


3

Just close math mode and reopen it: \documentclass{article} \usepackage{stmaryrd} \newcommand{\sem}[2][]{% \mbox{$\llbracket$\bfseries #2$\rrbracket^{#1}$}% } \begin{document} Here are \sem{Two words} and here is \sem[1]{One}. \end{document}


1

The parenthesis in the example provided is not really necessary. The problem here was the fact of forgetting to group the superscripts/subscripts in braces. This is a good practice. Hence the right approach is illustrated below: \documentclass[letterpaper]{article} \begin{document} $p= \sqrt{2}^{(\sqrt{2})}$ $p= \sqrt{2}^{\sqrt{2}}$ \end{document}


4

< and > are relational operators ("less than" and "greater than"). They can be used as delimiters, but TeX needs to know it (the traditional way with \langle and \rangle are added for comparison): \documentclass{article} \begin{document} \[ \mathopen< a, b, c \mathclose> \times T = \langle a, b, c \rangle \times T \] \end{document} ...


2

You may also put the binary operator > between braces: \documentclass{article} \usepackage{mathtools} \begin{document} \[ {>} \times T \] \end{document} Edit. Sorry, > is in fact a relational operator, as Heiko Oberdiek noticed. Putting it into a pair of braces makes the binary operator \times consider it as an operand, and so there is ...


2

This occurs because both > and \times are binary operators. If you use \mathord> \times T the > will not be treated as a binary operator, and the spacing will be as you desire.


2

Load nccmath after hyperref: \documentclass{article} \usepackage[colorlinks=true]{hyperref} \usepackage{nccmath} \numberwithin{equation}{section} \begin{document} \section{First section} Hello world \begin{fleqn} \begin{equation}\label{eqnA} \qquad\text{equation A:}\quad x + 3y = 7 \end{equation} \end{fleqn} \vspace{5in} Goodby world \begin{fleqn} ...


1

Another nice approach could be rotating and scaling the \partial symbol by this one-liner: \DeclareRobustCommand{\uppartial}{\text{\rotatebox[origin=t]{20}{\scalebox{0.95}[1]{$\partial$}}}\hspace{-1pt}} It uses the normal partial symbol, squeezes it a bit horizontally, rotates it around the top for 20 deg and minimizes the distance to the following ...


3

The question which I linked in the comment above works fine here too. \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{enumitem} \SetLabelAlign{myright}{\hss\llap{$#1$}} \newlist{where}{description}{1} \setlist[where]{labelwidth=2cm,labelsep=0.5em,itemsep=0pt, ...


0

The package pdfpages loads package eso-pic which in turns loads package xcolor without any options. The solution is to move \usepackage[table]{xcolor} before \usepackage{pdfpages} and fix capitalisation of \usepackage{MnSymbol} as mentioned by egreg. \documentclass[a4paper]{article} \usepackage[greek]{babel} \usepackage[iso-8859-7]{inputenc} \usepackage{ ...


5

I suggest scaling up the \_ceils and introducing a little space before the \rceil and in between ) and |. I'd omit extra spacing before ( because this glyph is already curved away from the \lceil a bit. \documentclass{article} \begin{document} first $\bigl\lceil (cN-n)\, |S_{n+1}| \,\bigr\rceil$ points \end{document} Consider reading chapter 18 of ...


2

You could use a tabularx instead of align: \documentclass{IEEEtran} \usepackage{amsmath} \usepackage{array,tabularx} \begin{document} \begin{equation} U= \frac{\bar{X}_1 -\bar{X}_2}{\sqrt{\frac{S^2_1}{n_1}+\frac{S^2_1}{n_1}}} \end{equation} \begin{tabularx}{\linewidth}{>{$}r<{$} @{${}={}$} X} \bar{X}_1 & mean of correctly recognized In-direction ...


4

Do you just want something like this? EDIT: The following code is edited to eliminate loading charter which turns out to be pointless. mathdesign wants to set \rmdefault to mdbch rather than bch - so let it. \documentclass{article} \usepackage[T1]{fontenc} \renewcommand{\sfdefault}{fvs} \renewcommand{\ttdefault}{fvm} \usepackage[charter, sfscaled, ...


4

Using amsmath you can set this up as a starred version of a math operator so that the limits get correctly placed. \documentclass{article} \usepackage{amsmath} \DeclareMathOperator*{\minimize}{minimize} \begin{document} $\displaystyle{\minimize_{x\in S} f(x)}$ \end{document}


4

It's not clear what you want Subscripts are set a bit higher if there's no superscript; just provide a dummy one: \[ A+B_{\alpha+\beta}^{} \rightarrow C+D_{\alpha+\beta}^{\prime} \] Note that you can type D_{\alpha+\beta}' as ^{\prime} can be shortened into '; also ^{\prime\prime} can be '' and so on.


8

It's already correct except for the usage: \newcommand{\myCommand}[1][]{I_{wr#1}} The argument is an optional argument that uses square brackets: $\myCommand[2]$ Full example: \documentclass{article} \newcommand{\myCommand}[1][]{I_{wr#1}} \begin{document} \[ \myCommand[2] = 2 * \myCommand \] \end{document}


9

Using \text{\tiny{locations}} does make it a bit smaller. To make it really small, you could try \scalebox. \documentclass[10pt,a4paper]{article} \usepackage{amsmath} \usepackage{graphicx} \begin{document} $\sum\limits_{\substack{\scalebox{0.5}{locations} \\ L_j}}$ $\sum\limits_{\substack{\text{\tiny{locations}} \\ L_j}}$ ...


0

You can use \mbox: $\sum\limits_{\substack{\mbox{\tiny {\emph{locations}}}\\ L_j}}$ Remove \emph if you do now want the text to be slanted.


4

The following summarizes many variants of the estimate symbol without changing all math symbols. \newcommand*{\estimatesA}{\mathrel{\hat=}} Source: Bernard's answer, Johannes_B's comment \newcommand*{\estimatesB}{\mathrel{\widehat=}} Source: DanteFAQ, Bernard's answer \newcommand*{\estimatesC}{\stackrel{\scriptscriptstyle\wedge}{=}} Source: DanteFAQ ...


2

Just with \mathrel{\hat{=}}. Or with `\widehatif you like. More precisely: \documentclass[12pt, a4paper]{article} \usepackage{amsmath}% \newcommand*\estimates{\mathrel{\hat{=}}} \newcommand*\wideestimates{\mathrel{\widehat{=}}} \begin{document} \begin{align*} & A \estimates B \\ & A \wideestimates B \\ & A = B \end{align*} ...


0

You can use \hateq from the mnsymbol package: \documentclass{article} \usepackage{mnsymbol} \begin{document} $$a \hateq b$$ \end{document} An alternative is to use \corresponds from mathabx, but it does not quite look right.


7

This answer follows the additional Russian typographic tradition (Figure 5 of http://www.staff.uni-giessen.de/partosch/eurotex99/zaitsev.pdf) of having the limits above and below the integral sign in \displaystyle. The \rint is essentially an \int (of the current math style) with a 15 degree rotation applied to it. \documentclass{article} ...


4

Will this do? \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{enumitem} \SetLabelAlign{myright}{\hss\llap{$#1$}} \newlist{where}{description}{1} \setlist[where]{labelwidth=2cm,labelsep=1em, leftmargin=!,align=myright,font=\normalfont} \begin{document} \[ ...


1

You can use scrextend and paralist \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{scrextend} \usepackage{paralist} \usepackage{enumitem} \usepackage{blindtext} \begin{document} \blindtext \begin{equation} \label{eq:mylabel} ...


0

I think $a \equiv r \;(\bmod\; n)$ does what you want (as mentioned by jfbu in the comment).


39

There are some issues to consider: Line width The standard line width in TeX is 0.4pt, it is hardcoded in TeX as 26214sp. \overline uses a different line width. It is taken from font parameter 8 of math font family 3 in TeX. The standard math fonts (Computer Modern) are using 0.39998pt in all font sizes. But it is scalable in other fonts, e.g. package ...


10

With the horizontal bar slightly protruding: \documentclass[a4paper,12pt]{article} \usepackage{array} \newcommand\house[1]{% \begingroup\setlength\arraycolsep{0pt} \begin{array}[t]{@{\mkern1mu}c@{}|c|@{}c@{\mkern1mu}} \firsthline &\;#1\;{}& \end{array} \endgroup } \begin{document} $\house{\alpha + \beta} \leq \house{\alpha} + ...


4

Never seen it either. However, here is a way of doing things: put everything into an array, with hhline to have a clean connection of vertical and horizontal lines. I define a normal and a bold version I don'tknow how to declare it, so as to have only one command for both versions): \documentclass[a4paper,12pt]{article} \usepackage{mathtools} ...


4

An implementation with tikz, shamefully adapted from this answer \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \newcommand{\house}[1]{% \tikz[baseline]{\node[anchor=base,inner sep=0.3ex](mynode){\ensuremath{#1}}; \draw(mynode.south west)--(mynode.north west)--(mynode.north east)--(mynode.south east); \path[use as bounding ...


0

\newcommand{\house}[1]{ \setbox0=\hbox{$#1$} \rule{.4pt}{\dimexpr\ht0 + 1.6pt} \overline{\mkern+1mu #1 \mkern+1mu} \rule{.4pt}{\dimexpr\ht0 + 1.6pt} }


16

Here is a plain TeX solution. The downside is, that \everymath is executed inside the "house". If you want every house to have the same height and depth, add a strut or a phantom inside it. \nopagenumbers% for cropping \def\house#1{{% \setbox0=\hbox{$#1$} \vrule height \dimexpr\ht0+1.4pt width .4pt depth \dp0\relax \vrule height ...


0

Although it doesn't use "matrix" notation you can adapt from one of the COOL package solutions. Check out page 30 of the COOL package manual. http://www.ctan.org/tex-archive/macros/latex/contrib/cool.


5

The tufte-book class makes all headers lowercase, so the R becomes r and the blackboard bold font has no lowercase R. As a solution you can do \documentclass{tufte-book} \usepackage{amsmath,amsfonts,amsthm} \usepackage[utf8]{inputenc} \DeclareRobustCommand{\R}{\mathbb{R}} \begin{document} \mainmatter \chapter{This chapter title $\R^{n}$} \newpage another ...


3

This is just a manual placement of the respective braces in a nested array: \documentclass{article} \usepackage{amsmath,amssymb,array,graphicx} \newcolumntype{C}[1]{>{\centering\arraybackslash$}p{#1}<{$}} \begin{document} \[ \begin{array}{@{}r@{}} \overbrace{\begin{array}{@{}*{5}{C{1.5em}}@{}} &&&& ...



Top 50 recent answers are included