4
votes
2answers
126 views

About \def\b*{\begin{align*}}

I want to make the code shorter. I defined the following pair of macros: \def\b*{\begin{align*}} \def\e*{\end{align*}} My point is that I saw this is a document, with \def\b*{\begin{eqnarray*}} ...
2
votes
2answers
170 views

LaTeX Error: \mathbb allowed only in math mode.

I'm writing a package which, among other things, gives abbreviations for \mathbb, as follows: \newcommand{\A}{\mathbb A} \def\B{\mathbb B} \def\C{\mathbb C} \newcommand{\D}{\mathbb D} ...
7
votes
1answer
28 views

Is it OK to use a macro for an operator, or a macro defined by `\DeclareMathOperator`, as a non-operator?

Macros like \det, I believe, is intended to be used before some expression, but sometimes I wish to use them as in \det \in \mathbf{VP}. Is it acceptable to use them like this instead of using ...
4
votes
2answers
86 views

How to break a line in a long equation?

I am using a class named abntex2 and I don't know how to break an equation. I've tried inserting a package amsmath, breqn, mathtools, but it does not work. I type: \usepackage{amsmath} ... and ...
4
votes
2answers
97 views

Designing medcirc and circledtimes symbols

It would be great to use only \medcirc and \circledtimes from the pxfonts or to design the similar symbols by other techniques. The symbols from pxfonts are quite well but when I connect the ...
2
votes
4answers
132 views

How to modify eqnarray?

I'm currently writing a maths undergrad dissertation using Texmaker, and when I use eqnarray. It keeps justifying all of the equations to the right but still in the center? How do I change this so ...
-1
votes
1answer
179 views

How do I write this mathematical equation?

I want to write the shown mathematical equation in LaTeX but I am getting an error. Here this is not eta but it is n. The code which I am writing is \begin{equation} \Delta {E} + \frac{\omega^2 ...
4
votes
1answer
55 views

How to get a bigger bracket? I have tried \left and \right

I have the following code. The problem is the outer brackets are the same size as the inner bracket so it doesn't look that nice. I have tried \left and \right and it doesn't make a difference. The ...
12
votes
3answers
269 views

Displaymath environment that can align equations and squeezes math

I have a long equation to align. Without squeezing the math, it is just barely longer than \textwidth. However, the align environment doesn't squeeze the math at all, which results in a badbox. ...
4
votes
2answers
182 views

Help me input a column vector

I'm trying to input an arrow vector (a column vector, see the picture) in an align environment, but it reports an error. Can someone show me the TeX code of it in an align environment?
5
votes
1answer
136 views

\atop vs. \substack for multiple lines under a sum

I did a search trying to find out how one can typeset multiple lines under a sum and found out that there is the possibility to use \atop or \substack together with a remark that one shouldn't use ...
1
vote
0answers
84 views

\to or \longrightarrow and \mapsto or \longrightarrow in functions? [closed]

I'm typing up a research project and I am not sure which ones I should use when I'm defining functions. I personally prefer \longrightarrow and \longmapsto but I see a lot of people use \to and ...
8
votes
2answers
94 views

Please help me input the following formula correctly

This is the formula I want to be made in LaTeX. The problem is to make this formula aligned. I've made something like this \begin{gather} 1 = \cos \, (\bar x, \bar x) = \cos^2 \, (\bar x, x) + ...
4
votes
1answer
111 views

Widetilde and prime (derivative) position

I need to write something like {\widetilde f}' in my text, but the result looks rather ugly since the prime (derivative) sign is too low. It looks like \widetilde{f'}. Is there any way to do this ...
4
votes
1answer
118 views

Aligning piecewise functions and function definition maths

I am unsure how to align the following so that \mathbb{N} is aligned with the n in f(n). I have tried \begin{align*} but that just gave me a bunch of errors. Any help will be much appreciated! It ...
5
votes
2answers
67 views

How to format a multi-line statement with a label

I am trying to format a multi-line statement with a label. \documentclass{article} \usepackage{amsmath} \usepackage[showframe,pass]{geometry} \begin{document} Let $P(n)$ denote the statement that ...
3
votes
1answer
138 views

How to make the equations at the center

(I'm using LyX). When I'm writing multiline equations, with \aligned the align of the equations is right, how can I make it to be center? For example: Here how it looks when I writing at math ...
4
votes
1answer
92 views

smartref package: Problems when referencing from math mode \text{}

I'm getting errors when using smartref's \sectionref command (or similar) from inside amsmath's \text{...} environment inside math mode. MWE: \documentclass{article} \usepackage{amsmath} ...
5
votes
1answer
115 views

`missing $ inserted` Error when not putting $ before and after array environment

Considering this answer I added $ before and after the array, i. e. before \begin{array} and after \end{array} in the following code. Then the former missing $ inserted Error was gone. ...
5
votes
2answers
84 views

How to create a math environment with one row on one side, and two on the other?

I have the following math equations: \begin{align*} &\mathcal{H} = \mathcal{H}^{(0)} + \mathcal{H}^{(1)} \\ &\mathcal{H}^{(0)} = -\frac{\hbar^2}{2m}(\nabla_{1}^{2} + \nabla_{2}^{2}) - ...
4
votes
2answers
224 views

Maths, functions in latex, really basic

I am trying to code the following; f:X->Y   x|->f(x) where -> is \longrightarrow and |-> is \longmapsto. However, my problem is that I am unable to get the x directly underneath the X. ...
2
votes
2answers
132 views

File ended while scanning use of \\definition

LaTeX noob here. Basically I get the following message in sharetex: main.tex: File ended while scanning use of \\definition. <inserted text> \par <*> main.tex I suspect you have ...
7
votes
2answers
202 views

Color fraction bar

What would be the easiest way to create a fraction whose bar can be coloured as desired? I know one can use the \genfrac{left-delim}{right-delim}{thickness}{mathstyle}{numerator}{denominator} command ...
6
votes
1answer
143 views

How to typeset row operations on augmented matrix

I would like to typeset row operations on a augmented matrix, but the "gauss"-package does not seem to support the vertical line just before the last column, any way to do this? Thanks!
6
votes
4answers
146 views

Multiple underbraces that span overlapping columns in matrix

I want to display the structure of a matrix as shown in the image below: The following code shows the structure of the matrix, without the underbraces: \documentclass{standalone} ...
9
votes
3answers
390 views

Underbrace in a matrix

I want to display the structure of a matrix as shown in the image below: Can this be done using pmatrix and \underbrace? My attempt at combining pmatrix and \underbrace results in a compile error. ...
7
votes
1answer
91 views

Is it necessary to give a \\ before \intertext?

I am not sure which one is correct when using \intertext or \shortintertext. Adding \\ before them or not. \documentclass[preview,border=12pt]{standalone} \usepackage{amsmath} \begin{document} ...
6
votes
1answer
108 views

Match upper horizontal line of two fractions with different roots

I'm learning LaTeX and encountered a problem which I'm not able to solve after reading several related problems (e.g.: Align \sqrt with baseline of other mathematical input). I will present my actual ...
2
votes
0answers
134 views

Undefined control sequence \nmid [duplicate]

I need to express that "a is not divisible by b" in my LaTeX document. It is my understanding that I should use the \nmid symbol for this case, as in $b \nmid a$. LaTeX gives me the following error: ...
7
votes
2answers
195 views

How to typeset piecewise-defined functions? [duplicate]

I am attempting to write out the basic process for finding the absolute value of some number. In ASCII, this is what I am attempting to write. |X| = { x if x > 0 0 if x = 0 ...
10
votes
2answers
152 views

Math equation typeset problem

I would like typeset equation on the figure below. I have problem with subsript text 1, 2, 3 and 4 under integrals. I try something like this: \begin{align}\label{fyz:eq_fey_null2} ...
8
votes
2answers
124 views

Text misplacement with certains combinations of \mathring and \overline

If I try to compile the following document \documentclass{article} \usepackage{mathtools} \DeclareMathOperator{\Op}{Op} \begin{document} \[ 1 + \mathring \Op(4) = 2 \] \[ \overline{ 1 + \mathring ...
15
votes
2answers
211 views

Strange behaviour of binomial coefficient's delimiters

While writing down my Combinatorics exercises I found that the binomial coefficient's delimiters weren't displayed as indicated inside the amsmath documentation. By subsequent trials and errors I was ...
5
votes
1answer
84 views

Automatic way to match matrix heights

I have a simple matrix equation, but one of the matrices has subscripts and superscripts on both lines: \documentclass{article} \usepackage{lmodern} \usepackage[T1]{fontenc} ...
5
votes
1answer
97 views

commath and \ifinner

The commath package use the TeX command \ifinner to select between inline math mode and display math mode. Because of this, it fail to work properly with some display math environments. In the breqn ...
5
votes
2answers
98 views

Matrices with llncs class

I have the following snippet to display a matrix equation using the regular amsmath packages: \begin{equation} S(x) = \begin{pmatrix} 0 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & ...
15
votes
3answers
781 views

Guidelines for typesetting fractions

I realize that this question is to some extent subjective. However, I suspect that there are some common standards regarding how fractions ought to be typeset in mathematics. The guide Mathematical ...
0
votes
0answers
27 views

Undefined control sequence error when using \abs [duplicate]

I have the following line of code that is throwing up an undefined control sequence error: \begin{equation} \vec{N} = \frac{\vec{T'}(t)}{\abs{\vec{T'}(t)}} \end{equation} The problem is with the ...
11
votes
2answers
6k views

What is the difference between \dfrac and \frac?

The title says it all, both \dfrac{a}{b} and \frac{a}{b} make fractions, so what is the difference between the two?
1
vote
1answer
128 views

Changing align environment tag styles and colors [duplicate]

I'm using amsmath and amsfonts to typeset my homework, and since it will be read on a screen, I would like to make \tag{comments inside equations} differently colored, and optimally downsize them by a ...
0
votes
0answers
27 views

How can I create multiple lines of equations in flashcards? [duplicate]

I have flashcards that work perfectly, but on a few of my flashcards I want to be able to give 2 equations on separate lines. Normally I know how to do this....such as using gather or align but when I ...
2
votes
1answer
56 views

Hyperlinks to repeated & variant equations with \tag{} don't work

Suppose I have the following equation (42), a variant version of it (42ᵇⁱˢ), and then a repeated version of (42). Here is how I would express them in my document: Original equation: \begin{equation} ...
5
votes
2answers
214 views

How to number each equation of simultaneous equations grouped by a left curly brace?

Consider the following MWE. \documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt\relax \begin{equation} \begin{cases} ax + by =c \\ px ...
2
votes
2answers
100 views

Equation conditions

I am in doubt of how to properly write (multiple) conditions to an equation. Right now I have a+b=c,\quad a>0,b\ge 0 Which gives But I dont think it looks very nice. How can I make it look ...
2
votes
2answers
1k views

How to put the QED symbol of a proof at the right place inside align?

When a proof ends with a formula in equation or equation* environment, putting \qedhere after the equation would cause the QED symbol to appear in the right place. I.e. at the end of the line in which ...
12
votes
3answers
201 views

Multiple letters without spacing in Math [duplicate]

Is there something I can add to the preamble of my document such that multiple letters without spacing in a Math environment (such as $NP$) do not have extra spacing between them and are not ...
3
votes
1answer
2k views

“!Missing $ inserted” error using amsmath environments

I am trying to compile a document with equations but whenever I use \begin{eqnarray}..\end{eqnarray} or \begin{align}...\end{align} or anything like this I get the error msg !Missing $ ...
6
votes
3answers
438 views

\everymath, AMS equations, beamer, and tikz not working together

In a beamer document, I have $ expressions embedded in displayed equations (using tikz to make, e.g., colored boxes around some expressions). I put \everymath{\displaystyle} in the preamble so that ...
1
vote
3answers
176 views

To show something are appearing n-times!

Suppose I want to write that the sequence 1,1,...,1 appear n-times. How will I do this? Usually in mathematics we use a braces at the bottom and write "n-times" below the brace.
1
vote
1answer
87 views

Lowering two expressions in an equation

\documentclass[11pt]{article} \usepackage{xfrac, array, tabu, multirow, graphicx, setspace, dcolumn, tikz} \usepackage[fleqn]{mathtools} %the argument for d specifies the maximum number of decimal ...