Tag Info

Hot answers tagged

10

Magic of \ooalign: \documentclass{article} \usepackage{graphicx} \newcommand{\trinum}[1]{\mathpalette\dotrinum{#1}} \newcommand{\dotrinum}[2]{{% \vphantom{\triangle}% \ooalign{% $#1\triangle$\cr\hidewidth\scaleraise{$#1#2$}\hidewidth\cr }% }} \newcommand{\scaleraise}[1]{% \raisebox{.2\height}{\scalebox{0.5}{#1}}% } \begin{document} Works fine ...


10

A TikZ solution with works in different sized for both math and text mode. \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \makeatletter \newcommand*{\trinum}{} \DeclareRobustCommand*{\trinum}[1]{% \ensuremath{% \mathpalette\@trinum{#1}% }% } \newdimen\trinum@sep \newdimen\trinum@rule \newcommand*{\@trinum}[2]{% % #1: ...


9

True, only a single argument is given to \mathpalette within the \raisemath macro. The second argument to \mathpalette is grabbed from the remainder of the input stream. Here's a smaller example exhibiting the same setup: \documentclass{article} \newcommand{\abcd}[1]{\defg{#1}} \newcommand{\defg}[2]{#1-#2} \begin{document} \abcd{1234}{5678} \end{document} ...


6

Simple text fraction A simple way for simple fractions is the text form a/b: \documentclass{article} \usepackage[utf8]{vietnam} \usepackage{array} \usepackage{longtable} \begin{document} \begin{longtable}[r]{>{\itshape}p{0.46\linewidth}p{0.46\linewidth}} 1/2 & một \textbf{phần} hai \\ 3/4 & ba \textbf{phần} tư \\ 6/8 & sáu ...


6

The symbol can be set as binary operator \mathbin. The amount of the space is \medmuskip and the space can be set via \>. Manually, \& can be put into \mathbin, then TeX sets the space automatically: \documentclass{article} \begin{document} $a\mathbin{\&}b$ \end{document} Also, `\&` can be redefined to add `\mathbin` in math mode ...


5

There's no definition for \& as a math character, so it's regarded as a letter. However, simply defining it as a math character would make it unusable in text mode, so a branching should be used: \DeclareRobustCommand{\&}{% \ifmmode\expandafter\mathbin\fi\char`& } Full example: \documentclass{article} \DeclareRobustCommand{\&}{% ...


5

When you process your document (after suitable completion) you get an eeror message: ! Missing $ inserted. <inserted text> $ l.18 \item[\(R_1\)] \rOneCalc which gives you a hint about the problem. With your current definitions, you need math-mode for your \cOneCalc, \rOneTrue,... commands (and probably will need to add ...


5

Not sure what the desired result being sought is, but here \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} Single line equations: \begin{description} \item[(a)] $x_{1} + x_{2} = a_{1} + b_{1}\sqrt{t^2-1} + a_{2} + b_{2}\sqrt{t^2-1} = (a_{1} + a_{2} ) + (b_{1} + b_{2})\sqrt{t^2-1} \mapsto (a_1+a_2, b_1+b_2)$ ...


5

Put one extra pair of braces around the arrow. \documentclass{article} \usepackage{stmaryrd,xspace} \newcommand{\deref}{\ensuremath{{\rightarrowtriangle}}\xspace} \begin{document} $b\deref\mathbf{r}_S$ \end{document} BTW, what is the intention of using ensuremath and \xspace here? It is better not to use them.


4

You can lower that subscript by a little by adding an invisible rule via \mystrut: \documentclass{article} \usepackage{mathtools} \newcommand{\mystrut}{\rule{0pt}{1.6ex}} %% <-- adjust this \begin{document} \[ \lim_{\mathclap{(x,y)\rightarrow (0,0)\mystrut}} f(x,y) \] \end{document}


3

One option would be to define a new proofw environment (in this way you still have access to the standard proof) in a similar fashion to amsmthm's proof, but suppressing the name and the punctuation: \documentclass{article} \usepackage{amsthm} \makeatletter \newenvironment{proofw}{\par \pushQED{\qed}% \normalfont \topsep6\p@\@plus6\p@\relax \trivlist ...


3

In a minimal document there is no difference: \documentclass{article} \usepackage{amssymb} \DeclareMathSymbol{:}{\mathpunct}{operators}{"3A} \begin{document} \( f\colon \mathbb R \to \mathbb R \) \( f: \mathbb R \to \mathbb R \) \end{document} However if you load amsmath then the difference you describe does occur: \documentclass{article} ...


2

You can use \intertext or \shortintertext for the left aligned text, depending on the required spacing. \shortintertext gives tighter spacing. For breaking the lines, you can place them in multlined environments from the mathtools package. You can specify the width as an optional argument if that is preferred, and also customize other aspects of the ...


2

You have to introduce a line break in the fourth equation. However, that's not the only adjustment you should perform. I suggest you do the following: use enumerate environments; this will give you typographically sound amounts of indentation of the various items. Also, get rid of the manual line breaks. remove the instances of =$>$, as they are ...


2

The errors mean that you are trying to define new commands with the same names as existing commands. This is probably because your preamble is a mess and you are loading the same packages twice, packages you don't need and incompatible packages. Never load a package more than once - especially with different options. And never load epsfig at all. It is ...


1

You can do it with the stock proof environment, by adding an appropriate definition for \proofname. Since proof does \item[\hskip\labelsep\itshape#1\@addpunct{.}] where #1 is the optional argument to \begin{proof} with default value \proofname, all we need is to nullify the spacing and to set a high enough space factor to make \@addpunct that a ...



Only top voted, non community-wiki answers of a minimum length are eligible