我想在单个图形中控制多个子图形的宽度,然后将它们设置为默认值,MWE:
\documentclass{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{duckuments}
\usepackage{graphicx}
\newsubfloat{figure}
\begin{document}
\begin{figure}
\centerfloat
\subbottom[]{\includegraphics{example-image-duck}}~%
\subbottom[]{\includegraphics{example-image-duck}}
\caption{This figure should be of normal width \label{fig}}
\end{figure}
\setkeys{Gin}{width=0.6\textwidth}
\begin{figure}
\centerfloat
\subbottom[]{\includegraphics{example-image-duck}}~%
\subbottom[]{\includegraphics{example-image-duck}}
\caption{This figure should be wider than in figure \ref{fig}}
\end{figure}
\setkeys{Gin}{} %What should I write here to free the width????
\begin{figure}
\centerfloat
\subbottom[]{\includegraphics{example-image-duck}}~%
\subbottom[]{\includegraphics{example-image-duck}}
\caption{This figure should be of normal width, like figure \ref{fig}}
\end{figure}
\end{document}
答案1
最简单的方法是将 Gin 设置放在图形内部,然后它将在组结束时重置。但除此之外:默认值是!
:
\documentclass{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{duckuments}
\usepackage{graphicx}
\newsubfloat{figure}
\begin{document}
\begin{figure}
\centerfloat
\subbottom[]{\includegraphics{example-image-duck}}~%
\subbottom[]{\includegraphics{example-image-duck}}
\caption{This figure should be of normal width \label{fig}}
\end{figure}
\setkeys{Gin}{width=0.6\textwidth}
\begin{figure}
\centerfloat
\subbottom[]{\includegraphics{example-image-duck}}~%
\subbottom[]{\includegraphics{example-image-duck}}
\caption{This figure should be wider than in figure \ref{fig}}
\end{figure}
\setkeys{Gin}{width=!} %What should I write here to free the width????
\begin{figure}
\centerfloat
\subbottom[]{\includegraphics{example-image-duck}}~%
\subbottom[]{\includegraphics{example-image-duck}}
\caption{This figure should be of normal width, like figure \ref{fig}}
\end{figure}
\end{document}