
Yo suelo setspace
cambiar el espaciado en los textos.
\usepackage{setspace}
\setstretch{1.435}
El espaciado en las ecuaciones se puede gestionar cambiando\arraystretch
El enfoque de @egreg enaquí
\usepackage{etoolbox}
\pretocmd{\array}{\renewcommand{\arraystretch}{0.69686}}{}{} % 1/1.435=0.69686
o el enfoque de @campa enaquí
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.435}
\everydisplay=\expandafter{\the\everydisplay\setstretch{1.0}}
Sin embargo, en cualquier caso, el espacio entre filas en la tabla es el espacio entre señales y no se puede cambiar cambiando el valor en \arraystretch
o \setstretch
.
Prefiero aumentar un poco el espacio entre filas en las tablas que el espacio entre señales. ¿Cómo puedo hacer eso?
\documentclass{article}
\usepackage{lipsum} % just for this example
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{setspace}
\setstretch{1.435}
\usepackage{etoolbox}
\pretocmd{\array}{\renewcommand{\arraystretch}{1}}{}{} % increase a little for the row spacing in equations
\begin{document}
\lipsum*[1]
\begin{equation}
X=\begin{cases}
\frac{1}{2}, & \text{if $a=1$} \\
\frac{3}{2} & \text{otherwise}
\end{cases}
\end{equation}
\begin{table}[htbp]
\centering
\caption{Changing the row spacing in the table}
\begin{tabular}{ c c c }
\toprule
cell1 & cell2 & cell3 \\
\midrule
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
Respuesta1
Para el espaciado de ecuaciones multilineales, es posible jugar con el spreadlines
entorno desde mathtools
. No funciona con el cases
entorno simple, pero puedes usar la variante de este entorno introducida por mathtools
.
Para las tablas, puede usar cellspace
, que define un espacio vertical mínimo en la parte superior e inferior de las celdas en las columnas con el especificador precedido por la letra S
(o C
si carga siunitx
). Por último, recomiendo cargar el caption
paquete, que le permite configurar el salto entre título y flotante.
Aquí hay un código de ejemplo exagerado:
\documentclass{article}
\usepackage{lipsum} % just for this example
\usepackage{mathtools, empheq, nccmath}
\usepackage{booktabs, caption}
\captionsetup{skip=20pt}
\usepackage[math]{cellspace}
\renewcommand{\cellspacetoplimit}{10pt}
\renewcommand{\cellspacebottomlimit}{10pt}
\usepackage{etoolbox}
\BeforeBeginEnvironment{equation}{\begin{spreadlines}{20pt}}%{\spreadlines{20pt}}%
\AfterEndEnvironment{equation}{\end{spreadlines}}
\BeforeBeginEnvironment{empheq}{\begin{spreadlines}{20pt}}%{\spreadlines{20pt}}%
\AfterEndEnvironment{empheq}{\end{spreadlines}}
\usepackage{setspace}
\setstretch{1.435}
\pretocmd{\array}{\renewcommand{\arraystretch}{1}}{}{} % increase a little for the row spacing in equations
\begin{document}
\lipsum*[1]
\begin{equation}
X=\begin{cases*}
\mfrac{1}{2}, & \text{if $a=1$} \\
\mfrac{3}{2} & \text{otherwise}
\end{cases*}
\end{equation}
\begin{empheq}[left ={ X = \empheqlbrace}]{alignat*=2}
& \mfrac{1}{2}, &\quad & \text{if $a=1$} \\
& \mfrac{3}{2} & & \text{otherwise}
\end{empheq}
\begin{table}[htbp]
\centering
\caption{Changing the row spacing in the table}
\begin{tabular}{ Sc c c }
\toprule
cell1 & cell2 & cell3 \\
\midrule
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}