estilo de visualización para cada entrada en la matriz

estilo de visualización para cada entrada en la matriz

Tengo una matriz cuyas entradas son límites y me gustaría tener el \displaystylerenderizado sin tener que ponerlo delante de cada entrada.

¿Existe algún equivalente del enumerateargumento opcional [before={\everymath{\displaystyle}}]?

La respuesta aceptada a esta pregunta.(en el que se explica el argumento enumerate opcional) parece sugerir que podría simplemente escribir:

\begin{matrix*}
\everymath{\displaystyle}
% entries of matrix, all of which to be rendered in \displaystyle fashion.
\end{matrix*}

Pero esto no funcionó para mí. Se puede hacer esto?

Respuesta1

Si necesita displaystyleglobalmente, agregue \everymath{\displaystyle}al preámbulo:

\documentclass[12pt,a4paper]{article}
\usepackage{mathtools}
\everymath{\displaystyle}
\begin{document}

\begin{equation}
\begin{matrix*}
%
1\int & 2\sum \\
%
3 & 4
\end{matrix*}
\end{equation}

\end{document}

ingrese la descripción de la imagen aquí

O puede usarlo localmente como:

\documentclass[12pt,a4paper]{article}
\usepackage{mathtools}
\begin{document}

{
\everymath{\displaystyle}
\begin{equation}
\begin{matrix*}
%
1\int & 2\sum \\
%
3 & 4
\end{matrix*}
\end{equation}
}

\end{document}

Respuesta2

No estoy seguro de para qué sería esto; de todos modos, aquí hay una implementación:

\documentclass{article}
\usepackage{amsmath,array}

\makeatletter
\def\env@dmatrix{\hskip -\arraycolsep
  \let\@ifnextchar\new@ifnextchar
  \def\arraystretch{2}%
  \array{*{\c@MaxMatrixCols}{>{\displaystyle}c}}%
}
\newenvironment{dmatrix}{\env@dmatrix}{\endmatrix}
\newenvironment{pdmatrix}{\left(\env@dmatrix}{\endmatrix\right)}
\newenvironment{bdmatrix}{\left[\env@dmatrix}{\endmatrix\right]}
\newenvironment{Bdmatrix}{\left\{\env@dmatrix}{\endmatrix\right\}}
\newenvironment{vdmatrix}{\left|\env@dmatrix}{\endmatrix\right|}
\newenvironment{Vdmatrix}{\left\|\env@dmatrix}{\endmatrix\right\|}
\makeatother

\begin{document}

\[
\begin{bdmatrix}
\lim_{x\to0}\frac{\sin x}{x} & 1 \\
\int_{0}^{\infty}e^{-x^2}\,dx & \frac{\sqrt{\pi}}{2}
\end{bdmatrix}
\]

\end{document}

ingrese la descripción de la imagen aquí

información relacionada