Tag Info

New answers tagged

0

There might exist different notations for the hypergeometric function. Here is a small example, using , as separators, but I would rather use ;. \documentclass{article} \usepackage{mathtools} \usepackage{mleftright} % for better spacings \begin{document} \section{First} \begin{align*} H\mleft(k\vert N,M,n\mright) &= \\ \intertext{or} &\\ ...


2

Please do not use $$\dots $$ but \[\dots \] unless you are using plain TeX. For your question. Just use \dfrac{}{} (display style fraction) from amsmath. % arara: pdflatex \documentclass{article} \usepackage{mathtools} % loads amsmath \begin{document} \begin{enumerate} \setcounter{enumi}{10} \item \begin{enumerate} \item $8!$ ...


2

From a Physicist's view I suggest both the usage of esvect (font) package and \dot instead of primes, since the relevant equation contains a time derivative. The esvect provides distinctive vector arrows, the relevant command is \vv instead of \vec, however. \documentclass{article} \usepackage{amsmath} \usepackage{esvect} ...


5

There is code in the Comprehensive List of Symbols, but it's wrong: what's suggested is \newcommand{\dbar}{{\mathchar'26\mkern-12mu d}} but one needs to compensate the amount of backup, which is larger than the width of the bar by 3mu: \documentclass{article} \newcommand{\dbar}{{\mkern3mu\mathchar'26\mkern-12mu d}} \begin{document} $32\lambda^2 ...


1

I am writing this answer based on another answer on this site and upon Christian Hupfer's answer here. There are many other useful points on that question too. %pdfLaTeX \documentclass{book} \usepackage{amsmath} \renewcommand\theequation{\arabic{equation}} \begin{document} \chapter{First} \section{First section} \subsection{First subsection} ...


6

The report class uses chapter.equation numbering, enclosed by parentheses. If the equation number should be used alone without referring to the chapter number, then \counterwithout{equation}{chapter} can be used. It requires chngcntr package, however. \documentclass{report} \usepackage{amsmath} \usepackage{chngcntr} \begin{document} \chapter{First} ...


3

Something like this, although it is still a little wide for the page Note that you had one "hidden" error in addition to the general syntax errors, each of your \sum_ is the unicode sequence U+005c REVERSE SOLIDUS U+0073 LATIN SMALL LETTER S U+0075 LATIN SMALL LETTER U U+006d LATIN SMALL LETTER M U+200e LEFT-TO-RIGHT MARK U+200e LEFT-TO-RIGHT ...


1

That the math font for \mathcal changes, when package txgreeks is loaded, is not an incompatibility, but intended behavior, the abstract of package txgreeks: The TX Fonts 1 of Young Ryu provide a very complete replacement for the default math fonts of TeX and LaTeX, containing all CM symbols and even all symbols from the AMS fonts, and more. In ...


2

Remove mathabx to restore the default \emptyset.


6

In the early days of LaTeX, a syntax like {\rm foo} was used in math mode, where nowadays \mathrm{foo} is the correct syntax. With the release of LaTeX2e in 1994, such commands were disabled by default. They continue to work with the standard classes for compatibility reasons, but they shouldn't be used in newer documents. There are several reasons for ...


1

Short answer: the argument must be -1. (But one should take my answer with a grain of salt, since “user’s” docs are completely missing, the “developer’s” docs do not match the code, and the code is incomprehensible.) Long answer: First, there is a variant of align with a micro-fool-proofing: the environment xalignat takes a required argument; when it is ...


6

Just use amsmath as package as one possibility or \binom{n}{k} as the quick alternative (requires amsmath or mathtools however too) matrix is defined by amsmath, so this environment needs the amsmath package. \documentclass{article} \usepackage{amsmath} \begin{document} \texttt{Bad example -- do not use this} \begin{equation} \left( \begin{matrix} n \\ ...


4

Something like this? This takes a maths alphabet. You can avoid this if necessary but if you want several symbols from the font, it is more straightforward this way. \documentclass{article} \DeclareSymbolFont{extraitalic} {U}{zavm}{m}{it} \DeclareMathSymbol{\Qoppa}{\mathord}{extraitalic}{161} \DeclareMathSymbol{\qoppa}{\mathord}{extraitalic}{162} ...


3

You could use multlined: \documentclass[12pt, letterpaper]{article} \usepackage{amsmath, amssymb, mathtools} \begin{document} \begin{align*} &\begin{multlined}[.9\displaywidth] \forall a, b, c \in \mathbb{X} \ldotp (a \leq b \land b \leq a \Rightarrow a = b) \\ \land (a \leq b \land b \leq c \Rightarrow a \leq c) \land (a \leq b \lor b \leq a) ...


0

So as was suggested by @Sigur and @R. Schumacher in the origional post comments this was a version error... ProTex does not come with the latest TexStudio (2.6.6). Downloading the newest version (2.9.4) solved the issue.


11

For luatex you can load the fonts in base mode \ifx\XeTeXversion\undefined \input luaotfload.sty \def\otf#1{file:#1.otf:mode=base} \else \def\otf#1{[#1.otf]} \fi For xetex, I pinged Arthur in chat.... luaotfload documentation explains the need for this: base mode works by mapping OpenType features to traditional TeX ligature and kerning ...


2

If the cells in the column always end with &, then the following trick with delimited arguments can be used: \documentclass{article} \usepackage{amstext} \usepackage{array} \usepackage{bm} \def\bmstart#1\bmstop{\bm{#1}} \begin{document} \begin{table}[!t] \renewcommand{\arraystretch}{1.5} \centering ...


1

You could use the LaTeX built in \boldmath: \documentclass{article} \usepackage{array} % >{\command} and <{\command} for advanced column specification \begin{document} \begin{table}[!t] \renewcommand{\arraystretch}{1.5} \centering \begin{tabular}{|>{\boldmath$}c<{$}|>{\boldmath$}c<{$}|} \hline 2 & ...


1

Since you are using $ as part of some script (for example $USER) TeXstudio will interpret that dollar sign as opening math mode and will highlight as well. So if you insert %$ at the end of the line containing $ in the script code it will not have effect since it is a comment (%). And according to the solution you cited (I didn't tested) it should correct ...


0

If \(...\) is close enough this there is great detail in the answers here: Are \( and \) preferable to dollar signs for math mode?


0

This also seems to work fine witouth using mathtools. \newcommand{\floor}[1]{\lfloor #1 \rfloor}


4

As Manuel indicates, my scalerel package can be used. However, I don't necessarily recommend this approach except in unusual circumstances. \documentclass{article} \usepackage{scalerel} \usepackage{mathtools} \begin{document} \def\x{\begin{bmatrix*}1&1\\1&1\end{bmatrix*}} \[{\scalerel*[2.2ex]{\int}{\x}}_{\!\!\!x=0}^{\infty}\x\,dx\] ...


1

The \scaleleftright[maxwidth]{left-delim}{term}{right-delim} macro provides scalable (not extensible) delimiters without forcing vertical height symmetry about \fracs. The optional parameter is a width limiter on the delimiters. Note that the math axis of the fraction is not altered (as it is with a \raisebox), so the fraction's vinculum remains vertically ...


6

Option pdfencoding=auto or unicode enables bookmarks in Unicode with more symbols. Option psdextra defines lots of math symbols, however it misses \varepsilon. Then \pdfstringdefDisableCommands can be used to define a bookmark replacement string for commands. Full example: \documentclass{article} \usepackage[pdfencoding=auto, psdextra]{hyperref} ...


9

The sagetex package has this feature for polynomials and more. You need Sage installed locally or, better yet, Sagemath Cloud to run (no installation needed). \documentclass{article} \usepackage{sagetex} \usepackage{amsmath} \begin{document} \begin{sagesilent} x = var("x") a = x+1 b = x^2-5*x+2 c = Integer(randint(2,7))*x^2-Integer(randint(2,7))*x+ ...


14

The polynom package has a low level function \polyprint which prints the expanded form of a polynomial: \documentclass{article} \usepackage{polynom} \begin{document} \polyprint{(x^2-1)(x+2)} \end{document}


7

\documentclass{memoir}%it must work with memoir, so no solutions with \it allowed. \newcommand\italicmath{\mathversion{italic}} \newcommand\bitalicmath{\mathversion{bitalic}} \DeclareMathVersion{italic} \SetSymbolFont{operators}{italic}{OT1}{cmr} {m}{it} \SetSymbolFont{letters} {italic}{OML}{cmm} {m}{it} \SetSymbolFont{symbols} ...


5

You may be interested in the mathastext package. Note, though, that this package will typeset both lowercase and uppercase latin letters using upright rather than italic glyphs. Addendum: Thanks for clarifying that you need so-called "french" math style, in which uppercase latin letters -- but not lowercase latin letters -- are typeset with upright ...


6

A strange request [[edit: it was late when I wrote that—French maths usage had fallen out of my head; I should have known better]]. Here's a short example demonstrating the idea of how to do this: \documentclass{article} \DeclareMathSymbol{A}{\mathalpha}{operators}{`A} \DeclareMathSymbol{B}{\mathalpha}{operators}{`B} \begin{document} \[a+b+A+B\] ...


1

My own answer Here is a variation of what egreg proposed. It provides a reasonable default for round parentheses (at least in my humble opinion), and works with both sub- and superscripts immediately following those parentheses: \documentclass{scrbook} \usepackage{amsmath} \makeatletter % Automatically scaled round parentheses with % subscripts and ...


1

I'm not sure you want to do this or, better, I discourage you to do this: automatically applying \left and \right is always wrong. \documentclass{scrbook} \usepackage{amsmath} % commands for round parentheses \makeatletter \DeclareRobustCommand{\rPar}[1]{% \@ifnextchar_{\rPar@sb{#1}}{\rPar@nosb{#1}}% } \newcommand{\rPar@sb}[3]{% % #1 is what we already ...


1

use something like: \documentclass{scrbook} \usepackage{amsmath} % commands for round parentheses \makeatletter \newcommand\rParA[1]{\ifinalign@\mathchoice{\left(#1\right)}{(#1)}{(#1)}{(#1)} \else(#1)\fi} \newcommand\rParB[1]{\ifinalign@\left(#1\right)\else#1\fi} \makeatother \begin{document} \begin{minipage}[H]{0.5\linewidth} Here is some process ...


2

You should use \substack, with which you can make a multiline subscript or superscript. Note that you need to load amsmath package to use the command. \documentclass{amsart} \begin{document} \[ \prod_{\substack{k=0\\ k\neq i}}^{n} \frac{x-c_{k}}{c_{i}-c_{k}} \] \end{document}


1

Here are all the fonts, I could find on my system. Just play around with those. % arara: pdflatex \documentclass{article} \usepackage{bbold} % all ten digits with \mathbb %\usepackage{mathbbol} % all ten digits with \mathbb %\usepackage{mbboard} % not working here, but should have your digits with \mathbb %\usepackage{bbm} % just 1 and 2 with \mathbbm, ...


4

Just for completeness, here's a solution that uses an align* environment. Note that instead of using \overline to draw the horizontal bars above the four pairs of uppercase letters, a macro called \widebar is used. The code for the \widebar macro is copied from a posting by Hendrik Vogt. (See http://tex.stackexchange.com/a/60253/5001 for the original ...


1

Yet another way to create a dash is to use a strike-out through a space. It creates a slightly longer one than given in the answer by Sam Buss, which is what I needed. One could define the macro by \usepackage[normalem]{ulem} \newcommand{\mydash}{\hbox{\sout{ }}}


4

I can reproduce the issue with TeX Live 2012, not with 2013. Upgrading to a current TeX Live would be best. A workaround is available anyway: \documentclass{beamer} \usepackage[utf8x]{inputenc} % but utf8 would be better \usepackage[english]{babel} \usepackage{lmodern} \usepackage{bm} \begin{document} \begin{frame} \frametitle{Bold} \begin{itemize} ...


1

If you persist on vertical rules, than (good old) mdwtab will give nice result: and code: \documentclass{scrartcl} \usepackage{mathtools} % loads amsmath \usepackage{mdwtab} \begin{document} \begin{tabular}{|l|Mc|Mc|} \hlx{hv} Ableitung des Vielfachen & c f(x) & c f'(x) \\ \hlx{vhvv} Quotientenregel & \dfrac{f(x)}{g(x)} ...


4

Use \dfrac from amsmath for this: % arara: pdflatex \documentclass{scrartcl} \usepackage{mathtools} % loads amsmath \usepackage{booktabs} \usepackage{array} \newcolumntype{C}{>{$}c<{$}} \begin{document} \begin{tabular}{lCC}\toprule Ableitung des Vielfachen & c f(x) & c f'(x) \\\midrule Quotientenregel & ...


0

You could use the power of xparse to define new sub- and superscript arguments and pass them as optional arguments. Here is the full code and explanation. Basically you use a and b arguments in xparse that search for _{#1} and ^{#2} respectively and then do whatever you want with those arguments. I use here the solution from egreg to show you how easy it ...


4

Don't abuse \tag; there's no need for the explanation to be flush with the right margin; also, the explanations should be left aligned with each other. Since it's impossible to accommodate those explanations in one line, I use a tabular for splitting them across two lines. Don't forget loading fontenc with the T1 option. ...


2

You could use tabular environments in the argument of \tag* to split the explanations into two parts. \documentclass[11pt,a4paper]{report} \usepackage[utf8]{inputenc} \usepackage[dutch]{babel} \usepackage{mathtools} \begin{document} \begin{align*} \det \begin{pmatrix} 4 & 3 & 2 \\ 3 & -2 & 5 \\ 2 & 4 & 6 \end{pmatrix} &= ...


2

Something like this: Code: \documentclass[11pt,a4paper,openany]{report} \usepackage[utf8]{inputenc} \usepackage{amssymb, mathrsfs} %\usepackage[dutch]{babel} \usepackage{mathtools}%systeme, %\usepackage[amsmath, thref, hyperref, thmmarks]{ntheorem} \begin{document} \begin{align*} \det\begin{pmatrix} 4 & 3 & 2 \\ 3 & -2 & 5 \\ 2 ...


2

Yet another possibility one might want to consider: Redefine \chi so that the bottom half of a "math strut" is inserted automatically after the character. (Aside: A mathstrut is a TeX object of zero width -- hence it's invisible -- and the height and depth of a round parenthesis, i.e., ).) That way, the position of any subscripts will be keyed off the ...


1

Is the following too trivial? \documentclass{amsart} \begin{document} $\chi_{\raisebox{-.5ex}{$\scriptstyle A$}}$ $\chi_{\raisebox{-.5ex}{$\scriptstyle S_{i}$}}$ \end{document}


0

Here's a solution that maintains your basic array setup, while simplifying it somewhat. Inside the equation, it first defines two scratch macros, \blocka and \blockb, and then uses each of them twice: first to typeset the material itself, then as the argument of the \vphantom instructions. Each "block" macro consists of an array environment that contains two ...


3

You can add \displaystyle to the columns you like in your array: % arara: pdflatex \documentclass[a4paper]{book} \usepackage{mathtools} \usepackage{lipsum} \usepackage{array} \begin{document} \lipsum[1] \begin{equation} \begin{aligned} &\left.\begin{array}{r@{\;}>{{}\displaystyle}l} U =& \sum_{\mathclap{\text{bonds},\,i}} ...


1

Here's a general option which addresses your concern. That is, a localized change from inline to display style mathematical typesetting. The easier option for the case you're using array is adjusting the argument thereof (as mentioned in the comments). The solution opens a group, and redefines the macros you wish to be \displaystyle. After the group closes ...


7

With amsmath there is the aligned environment you can use inside other building blocks; it inserts a tiny space before it which may be undone with \!. If you use the combination of split inside equation instead one align, then only one equation number is attached and you avoid writing \notag many times. By default the number is centered, but the tbtags ...


3

You can use the \phantom command \documentclass{article} \usepackage{multicol,amsmath,amssymb,geometry} \begin{document} \begin{multicols}{2} \begin{align} P(&\mathcal{X},\mathcal{C},\xi|\alpha,\beta,\theta^0) \notag\\ &= \prod_d P(\mathcal{X}_d|\beta)P(\mathcal{C}_d|\alpha,\xi) \prod_c P(\xi^c|\theta^0) \notag\\ &\propto\prod_d \beta^d_c ...



Top 50 recent answers are included