
Estoy intentando poner 4 figuras con alturas desiguales en una matriz. Mi código que puedes compilar.aquíes:
\documentclass[journal=aamick]{achemso}
\usepackage{tikz}
\usetikzlibrary{matrix,positioning}
\title{hi}
\begin{document}
\maketitle
\newlength{\w}
\setlength{\w}{.9\paperwidth}
\noindent \begin{tikzpicture}[align=center]
\matrix[column sep=.0\w,row sep=.0\w,%
every node/.style={draw,node distance=0 and 0,outer sep=0},xshift=-.048\w]{
\node [label=above:(a)] (a) {\includegraphics[width=.14\w]{figs/16_4.jpeg}}; &
\node [label=right:(d)] (d) {\includegraphics[width=.14\w]{figs/16_10.jpeg}};\\
\node [label=below:(b)] (b) {\includegraphics[width=.14\w]{figs/8_4.jpeg}}; &
\node [label=right:(c)] (c) {\includegraphics[width=.14\w]{figs/8_10.pdf}};\\};
\end{tikzpicture}%
\end{document}
Lo que obtengo es:
que tiene un espacio (la flecha roja) entre los cuadros de la izquierda. Lo que quiero es algo como:
¿Cómo puedo hacer esto?
Respuesta1
Sólo necesita configurar los anclajes apropiadamente, es decir, agregar
row 1/.style={anchor=south},row 2/.style={anchor=north}
a las opciones de la matriz.
\documentclass[journal=aamick]{achemso}
\usepackage{tikz}
\usetikzlibrary{matrix,positioning}
\title{hi}
\begin{document}
\maketitle
\newlength{\w}
\setlength{\w}{.9\paperwidth}
\noindent \begin{tikzpicture}[align=center]
\matrix[column sep=.0\w,row sep=.0\w,%
every node/.style={draw,outer sep=0},
row 1/.style={anchor=south},row 2/.style={anchor=north}]{
\node [label=above:(a)] (a) {\includegraphics[width=.14\w]{example-image-duck}}; &
\node [label=right:(d)] (d) {\includegraphics[width=.14\w,height=.14\w]{example-image-duck}};\\
\node [label=below:(b)] (b) {\includegraphics[width=.14\w]{example-image-duck}}; &
\node [label=right:(c)] (c) {\includegraphics[width=.14\w,height=.14\w]{example-image-duck}};\\};
\end{tikzpicture}%
\end{document}
No tengo tus archivos de gráficos, así que uso algunos archivos estándar, pero con diferentes alturas efectivas para simular tu problema.
APÉNDICE: Puede guardar algunas pulsaciones de teclas utilizando
\setkeys{Gin}{width=.14\w}
desde entonces todos los anchos de los gráficos incluidos en este grupo tendrán este ancho. También nodes
es una abreviatura de every node/.append style
y node distance=0 and 0,
no tiene ningún efecto, ni lo tiene ,xshift=-.048\w
mientras esté tikzpicture
formado únicamente por esta matriz.
\documentclass[journal=aamick]{achemso}
\usepackage{tikz}
\usetikzlibrary{matrix,positioning}
\title{hi}
\begin{document}
\maketitle
\newlength{\w}
\setlength{\w}{.9\paperwidth}
\noindent \begin{tikzpicture}[align=center]
\setkeys{Gin}{width=.14\w}
\matrix[column sep=.0\w,row sep=.0\w,%
nodes={draw,outer sep=0},
row 1/.style={anchor=south},row 2/.style={anchor=north}]{
\node [label=above:(a)] (a) {\includegraphics{example-image-duck}}; &
\node [label=right:(d)] (d) {\includegraphics[height=.14\w]{example-image-duck}};\\
\node [label=below:(b)] (b) {\includegraphics{example-image-duck}}; &
\node [label=right:(c)] (c) {\includegraphics[height=.14\w]{example-image-duck}};\\};
\end{tikzpicture}%
\end{document}