New answers tagged

0

I came around \lower and \raise TeX "primitives" here at https://www.tug.org/utilities/plain/cseq.html. And manually lower and raise a box in the \overset works fine for me. \overset{\lower.5em\hbox{aaa}}{bbb}


5

The Z part in Mico's answer can be rewritten in a different way. Still big but at least there is a pattern and also code-friendly since kronecker product is associative. \documentclass{article} \usepackage{mathtools,multirow} \begin{document} \[ \left[ \begin{array}{c|c|c} \begin{psmallmatrix}-1\\-1\end{psmallmatrix}\otimes I_{2} \otimes \begin{...


4

The full matrix simply has too many non-trivial elements to fit in portrait mode on a normal-sized page, even with \arraycolsep set to (nearly) 0pt. That's why the matrix is protruding into the right-hand margin instead of being centered within the text block. I think you have two main options: You could either use landscape mode to display the full matrix,...


6

This is the aligned environment: \begin{equation} \begin{aligned} a&=1+2+3 & b&=4+5+6\\ c&=2+4+6 & d&=3+5+7 \end{aligned} \end{equation} If you want to have control on the gap between groups of alignments, you can use the alignedat{n} environment, where n is the number of groups, requiring 2n-1 ampersands. \begin{equation} \...


3

To locate the error look in the log for a ( without a matching ) before the error, In this case (./Thesis.bbl So the error is on line 238 of the generated bibliography So, delete Thesis.bbl, fix the corresponding entry in the bib file and re-run latex and bibtex to re-generate.


2

From the header of the file amsfonts.sty: \NeedsTeXFormat{LaTeX2e}[1994/12/01] This package is not intended to be backward compatible with LaTeX2e formats prior to 1994/12/01. By implication, it is not meant to be compatible with LaTeX2.09, the format that became deprecated in 1994 but which is loaded (in emulation mode) by the first line of your code, ...


8

LaTeX2e has many improvements, for example: font selection and stuff. Here, with ancient LaTeX 2.09, \mathbb is rather a font switch than a command with argument. A group is needed to limit its scope: \documentstyle[amsfonts]{article} \begin{document} $\begingroup\mathbb{R}\endgroup D$ ${\mathbb{R}}D$ \end{document} \begingroup and \endgroup is ...


3

If the vertical bar should a kind of math accent, you can use the following idea: \documentclass{article} \usepackage{amsmath} \makeatletter \DeclareRobustCommand{\vbar}[1]{{\vbar@accent{#1}}} \newcommand\vbar@accent[1]{% \overset{% \text{\smash[b]{\rule[-0.4ex]{0.4pt}{0.8ex}}}% <-- customize 0.8ex }{#1}% } \makeatother \begin{document} $X+\...


4

Try with $\stackrel{|}{\tau} $ base $\stackrel{\tikz{\draw[black] (0,1) -- (0,0) ;}}{\tau} $ the second option with TikZ.


2

The explanation for the dual naming is in the following lines of plain.tex 837 \mathchardef\wedge="225E \let\land=\wedge 838 \mathchardef\vee="225F \let\lor=\vee So \land is just an alias for \wedge and similarly for \lor. LaTeX used to load a slightly modified version of plain.tex; when LaTeX2e was released, the aliases were kept for compatibility ...


0

You can do that with alignedat: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation} \begin{alignedat}{2} ∑ F_x: & \qquad & & \mathllap{ -}Q · \cos γ- L · \sin β+ R_{B_x} = 0 \\ ∑ F_y: & & & Q · \sin γ+ L · \cos β+ R_{B_y} - mg = 0 \\ ∑ (M_z)_B: & & & mgh · \cos β- ...


0

OK, I came up with following solution: \begin{subequations} \label{eq:equilibrium} \begin{align} &\sum F_x: && -Q \cdot \cos \gamma - L \cdot \sin \beta + R_{B_x} = 0\\ &\sum F_y: && Q \sin \gamma + L \cos \beta + R_{B_y} - mg = 0 \\ &\sum (M_z)_B: && mgh \cdot \cos \beta - Lh - Qa \cdot \cos(90 - \beta - \gamma) = ...


0

To typeset a multi-line system of equations with a single, vertically centered equation number, you might use a split environment inside an equation environment: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{split} \sum F_x &\colon {-}Q \cos \gamma - L \sin \beta + R_{B_x} = 0\\ \sum F_y &\colon Q \sin \...


4

(too long for a comment, hence posted as an answer) Make sure you don't use both \[...\] and \begin{equation} ... \end{equation} simultaneously to encase your displayed equation. Use one or the other method, but not both at the same time. \documentclass{article} \begin{document} \begin{equation} \label{eq:tau} -1 \leq \tau \leq 1 \end{equation} A cross-...


5

An excerpt from page 135 of the TeXbook: ... [A] blank line or \par is not permitted in math mode. This gives TeX another way to recover from a missing $; such errors will be confined to the paragraph in which they occur. Knuth provides the following example to motivate this syntax rule: For example, suppose you were to write The smallest $n ...


3

The learning curve vor LaTeX sure is steep, but if you have recurring tasks it will be much easier. So for the specific question of your homework I guess you will become much faster after you've done the layout two or three times. The thing I personally noticed with LaTeX is that it encourages my perfectionist side. Because I know that almost everything I ...


1

Avoid the error by : \subsubsection{Lx.....x} x...........x \textit{a} and \begin{math} \mathit{a^\dagger} : \end{math} the dagger is a math symbol and hence should be included in math environment. To get italics on a math symbol use \mathit{} instead of \textit{}.


7

I've found practice with LaTeX makes you faster. Now, I've got a writing disability, so writing out a good copy that other people can read takes me a long time, but I find with practice LaTeX isn't that slow. Also, the first assignment in it, getting the preamble set up and whatnot is the slowest part. After that it should be faster; I did a lot of my ...


5

Basically, \begin{align} executes \align, which in turn calls \start@align. This macro records what's in \@currenvir and sets things up so that the environment's contents to be absorbed is whatever comes up to the first appearance of \end{align}. In case you do \newenvironment{foo}{\align}{\endalign} the execution of \begin{foo} will set \@currenvir to ...


5

Use a tabular, with \left[ and \right]: \documentclass[12pt,a4paper]{article} \usepackage[spanish,es-noshorthands]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{mathptmx} \usepackage{siunitx} \sisetup{per-mode = symbol} \begin{document} \begin{equation*} \left[ \begin{tabular}{ @{} S[table-format=-4....


3

How about using the siunitx - columns in table and wrap the bmatrix around? Please choose the appropiate S settings for your needs. \documentclass[12pt,a4paper]{article} \usepackage[spanish,es-noshorthands]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{mathptmx} \usepackage{siunitx} \sisetup{per-mode = symbol}...


3

in amsmath, \eqref is defined like this: \newcommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}} since \ref is at the root of this, you can redefine it as \renewcommand{\eqref}[1]{(equation: \ref{#1#})} this will forgo the upright form of parentheses and number, which are intentional (and traditional) stylistic features.


2

Change the package loading order. Note that graphicx is already loaded by beamer. On the other hand, loading lmodern is not needed, unless you're on MiKTeX and don't have a working installation of the CM-Super fonts. \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{mathtools} \usepackage{bm} \...


2

Without a proper MWE, this is the best help I can offer: invoking professionalfonts produces no such error. \documentclass{beamer} \usefonttheme{professionalfonts} \usepackage{graphicx} \usepackage{booktabs} \usepackage{bm} \usepackage{mathtools} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \begin{document} Test. \end{document}...


7

As noted in a comment the two symbols are indistinguishable. When typing differential forms, use the command \wedge since the symbol is called the wedge product. (Similarly when you do wedge sums in topology.) Use \land when you use the symbol as the "logical and" symbol. When writing notes in lattice theory I would sometimes also define \newcommand*\...


3

another approach: add a dummy line in the second column, making sure that it has the same height as the other lines. this keeps the equation number centered vertically. this wouldn't work as well if the lines have different heights. i've replaced the greek letters by "xxx" since it's easier for me to use pdflatex, which doesn't deal well with unicode ...


4

Use \begin{aligned}[t] for both environments (I had to remove the \text{..} statements because of Unicode-Errors) However, there's some disadvantage: The equation number is misplaced! \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{siunitx} \begin{document} \begin{equation} \begin{aligned}[t] S_{1} &= \...


1

You can have this, for instance: \documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{thmtools} \usepackage[dvipsnames]{xcolor} \declaretheoremstyle[ spaceabove=0\topsep, spacebelow=0\topsep, name={\color{Blue}Proposition}, ]{propsty} \declaretheorem[style=propsty]{prop} \declaretheoremstyle[ spaceabove=0.5\topsep, ...


3

Here are two versions where the leading & force left alignment; since lines are long, I also provided a version with split lines. Note that \left( t\right) and \left( 1-F\left( t\right) \right) just waste space. I also removed useless parentheses around fractions. The \limits declaration is not needed in displays. \documentclass{article} \usepackage[...


1

To get the same matrix, don't use the overlay option and add the inner sep=0 option to your nodes. \documentclass{article} \usepackage{amsmath, amssymb} \usepackage{pgf,tikz} \usepackage{luatex85} \newcommand{\overlay}[2][]{\tikz[remember picture, #1]{#2}} \newcommand{\flag}[2]{\overlay[baseline=(#1.base)] {\node[inner sep=0] (#1) {$#2$};}} \begin{...


1

An addition to all answers above A useful feature is to control the vertical distance between the equations of the cases, array, or similar environments. You can do that by writing \\[your distance with units] instead of simply \\. For example \\[1.5em]. It works also for negative spacing, e.g., \\[-0.5em] In this minimal example I use \\[1.0em] \...


6

Here is one suggestion with pmatrix. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} D_{i,t} = \begin{pmatrix} \ln(\text{Deal value}) \\ \text{Loan Maturity} \\ \text{Loan Type} \\ \text{Credit Rating of the Loan} \\ \text{Coupon Rate} \end{pmatrix} \end{equation} \end{document} If one wants to avoid the use of \text in ...



Top 50 recent answers are included