Tag Info

New answers tagged

2

One advantage with \( and \) over dollar signs is that it is easier to match parenthesis in your editor.


5

If you start a paragrah inside a vbox (or vcenter) the lines will be broken to \hsize which is \textwidth here which is wider than you want. You should use a tabular which will vertically centre and look more like latex. All LaTeX box and rule commands consistently start a paragraph (so \rule here) but TeX primitives like \hbox do not.


1

Here is my version also using tikz-cd: % arara: pdflatex \documentclass{article} \usepackage{tikz-cd} \begin{document} \[\begin{tikzcd} C \ar[shift left=7pt, ""{name=UL, below}]{r}{S} \ar[shift right=7pt, ""name=LL]{r}[swap]{T\vphantom{'}} & B \ar[shift left=7pt, ""{name=UR, below}]{r}{S'} \ar[shift right=7pt, ""name=LR]{r}[swap]{T'} & A\\ ...


3

With stacks. \documentclass{article} \usepackage{graphicx} \usepackage[usestackEOL]{stackengine} \stackMath \def\xtnd{-\kern-5pt-\kern-5pt} \setstackgap{L}{.45\baselineskip} \begin{document} \[C \mathop{\raisebox{1pt}{\Centerstack{ S\\ \xtnd\rightarrow\\ \raisebox{.5pt}{$\scalebox{.8}{$\downarrow$}\scriptstyle\tau$}\\ \xtnd\rightarrow\\ T}}} B ...


3

A solution using MetaPost could look something like this: u:=1.8cm; % Horizontal scale s:=6pt; % shift from letters h:=10pt; % height label(btex $C$ etex, (0,0)); label(btex $B$ etex, (u,0)); label(btex $A$ etex, (2u,0)); drawarrow ((s,0)--(u-s,0)) shifted (0,-h); drawarrow ((s,0)--(u-s,0)) shifted (0,h); drawarrow ((u+s,0)--(2u-s,0)) shifted (0,-h); ...


3

I think you can use tikz-cd for this kind of diagrams. For example, use \documentclass[preview,border=1pt]{standalone} \usepackage{tikz} \usepackage{tikz-cd} \begin{document} %% Hint for the positions: L=left, R=right, U=up D=down \begin{tikzcd} C \arrow[bend left=80]{r}[name=LUU, below]{} \arrow{r}[name=LUD]{} \arrow[swap]{r}[name=LDU]{} ...


3

Just another way... \documentclass[varwidth,border=5]{standalone} \usepackage[T1]{fontenc} \usepackage{lmodern} \newdimen\dx \def\dm#1#2{\dx=1em\relax\def\rt{#1}{\Dm#2\dm}} \def\Dm#1{\ifx#1\dm\else\fontsize\dx\dx\selectfont#1\dx=\rt\dx\expandafter\Dm\fi} \begin{document} \dm{0.95}{3.14159265358979323846264338327950288419716939937510} \end{document}


6

Use a minipage \documentclass{article} \usepackage{amsmath} \begin{document} We make the further assumption that \begin{equation}\label{eqn:assumption} \begin{minipage}{0.9\textwidth} There is a bounded linear operator $B:X\to X^*$ such that $B^*=B$ and the operator $JB$ is an extension of $T'(0)$ \end{minipage} \end{equation} ...


1

For example (the value is only exemplary): \documentclass{article} \usepackage{amsmath} \begin{document} We make the further assumption that \begin{equation} \label{eqn:assumption} \text{\begin{tabular}{p{0.85\linewidth}} There is a bounded linear operator $B\colon X\to X^*$ such that $B^*=B$ and the operator $JB$ is an extension of $T'(0)$ ...


3

\therefore is not a text command. It needs to be in maths mode e.g. $\therefore$. In your snipped, it is outside the align environment and therefore in text mode which won't work. \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{amssymb,amsmath} \begin{document} \noindent c)\\ coordinates = ...


1

All your $'s inside align should be replaced by &'s. (You snippet is not a MWE, hence version without corrections and the final result).


3

I think that there are two most sensitive options: increase the first space and make it symmetric: $\langle\,,\rangle$ put \cdots in place of teh arguments: $\langle\cdot,\cdot\rangle$ (this is what I prefer). Typeset versions: In the second one, if you don't like the space after the comma: $\langle\cdot{,}\cdot\rangle$


19

Mark Wibrow enhanced the text decoration library of TikZ greatly and you can do all kinds of stuff based on formulas regarding the character number and total count of words and so on. Here is a wacky take on it, (thus a simple monotone scaling along a path is very simple and is possible just by playing with the formula with scale instead of yscale) ...


20

A recursive macro: \documentclass[border=2]{standalone} \usepackage{mathptmx} % a scalable font is needed \makeatletter \def\makesmaller#1#2{% \dimen0=\dimexpr\dimen0-.08pt\relax \ifx#2\relax \expandafter\@gobble \else {\fontsize{\dimen0}{0}\selectfont#1}% \expandafter\@firstofone \fi {\makesmaller{#2}}% } \def\decreasingpi{% ...


63

EDITED to allow repeat invocations without having to reset parameters, using the syntax \diminish[scale-down-ratio]{string} The value of \defaultstartht sets the strut height of the first letter (default is set to \baselineskip), and the scale-down ratio defaults to 0.98, but may be supplied as an optional parameter. Beware that arithmetic underflows are ...


1

The difference between your example and the one you refer to from how-to-add-equation-with-cases-inside-the-table is that you are trying to put a displayed equation into a "centred" table cell whereas the example puts one inside a "paragraph" in a tabular environment. You either need to use a p-cell in your tabular environment: \begin{tabular}{p{5cm}} ...


1

This question has already been answered, but I believe that there's a solution applicable to a wider variety of situations. What you call "vector height" can be split up into several different "heights" or "parts of total height" or whatever: Now, in your case you want the "height" of both vectors to be equal. However, taking only these "vectors" into ...


2

You can do in your preamble \newcommand{\myvec}[1]{\overrightarrow{#1\vphantom{k}}} And use it in your document $\myvec{k} \myvec{x}$


1

When you type \newtheorem{thm}{Theorem}[section] it means that it will number by sections, write "Theorem" and you refer to it using the environment name thm. You need to write \begin{thm} Let $X$ be boundedly compact metric space and $\mathcal{B}$ a family of closed balls in $X$ such that \begin{equation} sup\{d(B):B \in \mathcal{B}\} ...


3

For example (Please observe changing of the meaning of HoM. I am assuming that it is your intention): \documentclass{article} \usepackage{amsmath} \DeclareMathOperator{\HoM}{Hom} \begin{document} The first bijection is induced... \begin{equation} \begin{aligned} \pi(X,Y)&\to\HoM(X,Y)\\ [f]&\mapsto[RQf] \end{aligned} \end{equation} if $X$ is ...


4

As you've discovered, an ordinary equation environment won't let you insert line breaks. I suggest you load the amsmath package (if you're not already doing so) and use its align* environment to typeset the expression; insert & where you want the alignment points to be. In the code below, I also make use of \smash[b]{...} to reduce the space between ...


4

You can use math kerning, but its values will depend on the pair of letters, and probably on the math font that you use. How do you like this one: \documentclass{article} \begin{document} \[B X \mkern-1mu N \mkern-2mu A\mkern2mu Γ \mkern1mu C\] \[B X \mkern-1mu A\mkern2mu Γ \mkern1mu C\] \[B A\mkern2mu Γ \mkern-0.5muA\] \end{document}


5

You need to insert \limits after \iiiint: \documentclass{article} \usepackage{amsmath} % for \iiint macro \begin{document} \begin{equation} m = \iiint\limits_E \rho \, \mathrm{d}V \end{equation} \end{document}


5

The problem has not yet been solved with version 0.7f of unicode-math, so this answer is just an attempt to see what's happening; an ugly workaround is proposed. This is what I get when adding \showlists to the definition of \big with \usepackage{etoolbox} \makeatletter \patchcmd{\big}{\n@space}{\n@space\showlists}{}{} \makeatother from $\big($. ...


2

I think you need to define maText as an environment rather than as a command: \newenvironment{maText}[2]% {\bigl(\begin{smallmatrix}#1\\#2}% {\end{smallmatrix}\bigr)}


4

You have defined a two argument command, so the usage is: \documentclass[a4paper,10pt, twoside]{book} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \newcommand{\maText}[2]{\bigl(\begin{smallmatrix}#1\\#2\end{smallmatrix}\bigr)} \begin{document} \(\maText{a}{b}\) \(\maText{a_{1}}{b}\) \end{document}


2

I didn't see any strange symbol either. Perhaps it is a problem with the encoding of your source file. I suggest a slightly different alignment; with and without (smaller) parentheses around the fractions and a correct definition for absolute value, borrowed from an example in mathtools (it's needless to load amsmath if you load mathtools). ...


3

Well, from your MWE I removed those strange bullets at the end of the code, since you're loading the amsmath package, we can improve the code with it. \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{pgf,tikz} \usetikzlibrary{arrows} ...


2

Seems to be missing a tikz solution: or with smaller text under the brace: Code: \documentclass{article} \usepackage{mathtools} \usepackage{xparse} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{decorations.pathreplacing} \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};} % Tweak these as necessary ...


5

The amsmath package seems to add extra vertical space for an equation only with the fleqn option. I'm not sure if that's a bug or a feature, but currently tcolorbox is not aware of the different space settings with or without fleqn. The following patch seems to do the trick: \makeatletter \if@fleqn \tcbset{% ams equation upper/.style={before ...


4

\documentclass[fleqn]{article} \usepackage[many]{tcolorbox} \usepackage{amsmath} \begin{document} \begin{tcolorbox}[ams align] A = B \end{tcolorbox} \end{document}


3

I'm quite certain that the middle subformula in the following example is the correct one. The empty superscript pushes the subscript a bit lower. \documentclass[border=2pt]{standalone} \begin{document} $\Delta\varphi_R\ne\Delta\varphi^{}_R\ne\Delta\varphi^{}_{\!R}$ \end{document} I'm also quite certain that using _{\scriptscriptstyle R} is wrong.


2

I believe it's not necessarily wrong, so I wouldn't bother. However, if it means something as a whole I think defining an appropiate command is the way to go. Moreover, for this situation, it's perfect because that way we can include small adjustments inside that command in case we want. In case \Delta means an increment, you should define a command: ...


3

A \left\{ should always be matched with a \right\} in the same line. This will put the opening and closing braces both. In case if you want only the opening brace (\left\{) then you need to match it with an invisible \right. The . is for invisible pair. Same thing is true for \left. if you want only the closing pair.


5

The package MnSymbol defines \nleftrightline which looks similar: \documentclass{standalone} \usepackage{MnSymbol} \begin{document} $W \nleftrightline X$ \end{document}


11

Never seen such a symbol, but you can define it; choose a better name. \documentclass{article} \usepackage{centernot} \newcommand{\wrel}{% for ``weird relation'' \centernot{\mathrel{-}\joinrel\mathrel{-}}% } \begin{document} \[ W\wrel X \] \end{document} Notes. I use the fact that TeX doesn't add space between consecutive relation symbols; \joinrel ...


3

The problem seems to be very interesting especially when arbitrary number of levels of brackets is expected. I tried to solve this. Arbitrary number of levels can be used and the types of brackets for each level can be declared. The formula enclosed by brackets are typed by \brk{formula} (\brk is abbreviation for "brackets"). The formula can include another ...


4

You are loading far too many fonts given that TeX only allows 16 math fonts, but anyway your example runs without error if you give bm a hint that that is what you are doing \chardef\bmmax=2 \usepackage{bm} Tells bm to be more conservative in its font usage.


3

The \text command places its content in text mode, while you have math-only content within it (\sum,\tfrac, etc.). Use \text{YES} & \text{ if } \sum\sum(\mathbf{Y} \circ \mathbf{G}) > \tfrac{r^{2}}{2} I would also recommend cases from amsmath instead of array. \documentclass{article} \usepackage{amsmath} \begin{document} With \texttt{array}: ...


1

Based on Hendrik Vogt's answer, and for my needs, I created these commands to make my life easier: \newcommand<>{\uncoverubrace}[2]{% \onslide#3 \underbrace{ \onslide<1->% #1% \onslide#3 }_{#2} \onslide<1->% } \newcommand<>{\uncoverobrace}[2]{% \onslide#3 \overbrace{ \onslide<1->% #1% \onslide#3 }^{#2} ...


1

You can do that either with alignat*{2} or with an aligned environment nested in align*. I added a pair of parentheses for the definition of the image-function: \documentclass[a4paper, 11pt]{book} \usepackage[utf8]{inputenc} \usepackage{fourier, heuristica} \usepackage{mathtools, nccmath} \begin{document} \begin{alignat*}{2} \varphi:\ell^q& ―――→ ...


2

Use alignat*: \documentclass{article} \usepackage{amsmath,amssymb} \begin{document} \begin{alignat*}{2} \varphi:\ell^q&\longrightarrow& (\ell^p)^* \\ \mathbf{x}&\longmapsto& f_{\mathbf{x}}:\ell^p &\longrightarrow\mathbb{C} \\ &&\mathbf{y}&\longmapsto\sum_{k=1}^\infty x_k y_k \end{alignat*} \end{document}


1

Some manual work, but one can precisely align the elements. Please observe \colon's in place of :'s. \documentclass{article} \usepackage{amsmath,amssymb} \begin{document} \[ \begin{array}{r@{\;}c@{\;}l@{\;}c@{\;}l} \varphi\colon\ell^q&\longrightarrow& (\ell^p)^*&& \\[6pt] \mathbf{x}&\longmapsto& f_{\mathbf{x}}\colon\ell^p ...


3

I don't think that aligning the \equiv and \sum signs adds to readability; to the contrary, I believe that it hinders it. Anyway, with some more work one can get the required alignments. I made also some improvements, defining a \moebius command that uses \DeclarePairedDelimiter, so you can say \moebius{x} % normal size \moebius[\big]{x} % big ...


1

Saying \hfil is the same as saying \hskip 0pt plus 1fil or, in LaTeXspeak, \hspace{0pt plus 1fil}. However, TeX uses the stretch component only if it has to. For instance, in \hbox{a\hfil b} % Plain TeX \makebox{a\hfil b} % LaTeX (or \mbox{a\hfil b}) the stretch component will do nothing and there will be no space between “a” and “b”. Conversely, a ...


3

You can try this: \def\smart#1{\let\smartA=\empty \setbox0=\hbox{\def\smart{\global\let\smartA=\relax}$#1$}% \begingroup\def\smart##1{(##1)}\ifx\smartA\relax [#1]\else (#1)\fi\endgroup } \smart{abc\smart{d\smart{ef}g}h} % -> [abc(d(ef)g)h] \smart{pq{\smart{ru}v}w} % -> [pq(ru)vw] \smart{xyz} % -> (xyz) \end ...


5

If you didn't want the understacked material to affect the main equation's spacing, then the stackengine package's \useanchorwidth parameter is helpful. Here, I stack the embraced commentary under the V, but tell stackengine to use the horizontal size of the V "anchor" to determine the horizontal space allocated for the overall stack. If I set ...


4

Quick and dirty approach with pmatrix environment The individual columns are separated by a & character, the next linebreak is achieved with \\ If one replaces pmatrix with bmatrix, the [ ] version is obtained \documentclass[12pt]{article} \usepackage{mathtools} \begin{document} \begin{equation*} A = \begin{pmatrix} 3 & 5 \\ 5 & 2 ...


5

Automating the over-use of \left, \right is so wrong, but... \documentclass{article} \newcount\smcount \delimitershortfall-1sp \def\smart#1{\left\ifodd\smcount[\else(\fi \advance\smcount by1 #1\right\ifodd\smcount)\else]\fi} \begin{document} $\smart{aaa\smart{Ala \smart{ma \smart {kota}}}}$ \end{document} or after clarification in comments, perhaps ...


6

You can also use the original \underbrace as the starting point of your definition: \documentclass{article} \begin{document} \makeatletter \def\downunderbrace#1{\mathop {\vtop {\m@th \ialign {##\crcr $\hfil \displaystyle {#1}\hfil $\crcr \noalign {\kern 3\p@ \nointerlineskip } %\upbracefill \downbracefill \crcr \noalign {\kern 3\p@ }}}}\limits} ...



Top 50 recent answers are included