New answers tagged

1 vote

How can I create a new simple symbol, similar to the binomial coefficients?

You want something like \boxed, but this has the problem that it chooses \displaystyle unconditionally. I suggest a \styleboxed macro that boxes its contents, but also allows to set a different value ...
user avatar
  • 1.0m
2 votes
Accepted

Summation symbol operator with a parameter

In order to have correctly placed limits I'd use the \sideset macro from amsmath \documentclass{article} \usepackage{amsmath} \newcommand{\sumparameterA}[1]{\sideset{}{^{#1}}\sum} \newcommand{\...
user avatar
  • 26.4k
1 vote

How can I create a new simple symbol, similar to the binomial coefficients?

\documentclass[a4paper]{article} \usepackage{amsmath,stackengine} \makeatletter \DeclareRobustCommand{\bbinom}[2]{\bgroup \fboxsep=1pt \fbox{\ensurestackMath{% \stackanchor{#1\mathstrut}{#2\...
user avatar
0 votes

How can I create a new simple symbol, similar to the binomial coefficients?

That is fairly simple. \binom is defined in amsmath as \DeclareRobustCommand{\binom}{\genfrac()\z@{}} thus is made using the \genfrac macro. So we only have to replace () by []. \genfrac is described ...
user avatar
  • 49.6k
1 vote
Accepted

Detect paired nested macros

Perhaps wrapping the tokens \dif delivered by your macro-mechanism into \@firstofone{...} and thus hiding them from macros that process \dif-delimited arguments does the trick? \documentclass{article} ...
user avatar
6 votes

Detect paired nested macros

The usual way is to use a \mathop here to let TeX add space or not depending on the previous item \documentclass{article} \usepackage{amsmath} \newcommand\dif{\mathop{}\!d} \begin{document} \...
user avatar
23 votes

Math: overwrite \int command

Use the relevant option in amsmath: \documentclass{article} \usepackage[intlimits]{amsmath} \begin{document} \[ \int_{a}^{b} f(x)\,dx \] \end{document}
user avatar
  • 1.0m
8 votes
Accepted

Math: overwrite \int command

\int is defined as \DeclareRobustCommand\int{\intop\nolimits} so you could simply use \intop otherwise \let\int\intop if you want to use \int
user avatar
2 votes

Save function inside macro for the function’s derivative

First, a note on this: \pgfmathsetmacro{\b}{0.7}; \pgfmathsetmacro{\p}{0.4}; \pgfmathsetmacro{\A}{1}; There should be no ; here because these are not TikZ nor pgfplots statements like \path, \draw, \...
user avatar
  • 23.5k

Top 50 recent answers are included