2010-02-24 12 views
22

मैं अपने थीसिस पर काम कर रहा हूं और मैं एक-दूसरे के बगल में 2 छवियों को रखने के साथ संघर्ष कर रहा हूं, ताकि दूसरी छवि पहले के साथ लंबवत केंद्रित हो। मैं subfloat के बजाय subfigure का उपयोग करने की भी कोशिश कर रहा था लेकिन उनमें से कोई भी काम नहीं करता है।सबफिगरों का लंबवत संरेखण LATEX

\begin{figure}[H] 
\centering \subfloat[H][sparse($\mathbf{A}$)]{\includegraphics[width=0.28\textwidth]{sparsesmall} \label{sparse}} 
    \subfloat[H][full($\mathbf{A}$)]{\includegraphics[width=0.55\textwidth]{fullsmall}\label{full}} 
    \caption{Representation of $\mathbf{A}$ in MATLAB} 
    \label{schematic} 
\end{figure} 

कोई सुझाव यह अब की तुलना में बेहतर लग रहे बनाने के लिए:

यह है कि यह कैसे alt text http://img51.imageshack.us/img51/1174/screenshot20100224at712.png

लग रहा है और मेरी कोड है? Thx

उत्तर

11

यदि आप subfig पैकेज का उपयोग करते हैं, तो आप इसे आसानी से कर सकते हैं। समाधान अनुभाग the manual के 5.4 में है:

\newsavebox{\tempbox} 
\begin{figure}[H] 
\sbox{\tempbox}{\includegraphics[width=0.28\textwidth]{sparsesmall}} 
\subfloat[sparse($\mathbf{A}$)]{\usebox{\tempbox}\label{sparse}}% 
\qquad 
\subfloat[full($\mathbf{A}$)]{\vbox to \ht\tempbox{% 
    \vfil 
    \includegraphics[width=0.55\textwidth]{fullsmall} 
    \vfil}\label{full}}% 
    \caption{Representation of $\mathbf{A}$ in MATLAB}\label{schematic} 
\end{figure} 

मैं इसे परीक्षण नहीं किया है, और वहाँ लिखने की त्रुटियों हो सकता है, लेकिन यह काम करना चाहिए।

+0

में डाल दिया है दूसरा चित्र का शीर्षक संरेखित किया गया है ठीक है। अन्यथा यह पूरी तरह से काम करता है, धन्यवाद। –

29

आप \ raise बॉक्स {x} {\ includegraphics [...] {...}} का भी उपयोग कर सकते हैं जहां x इसे नकारात्मक स्थानांतरित करने के लिए नकारात्मक और सकारात्मक स्थानांतरित करने के लिए नकारात्मक है।

1

मेरे विधि वर्ग minipage जो इसकी सामग्री केन्द्रों उपयोग कर रहा है:

\begin{figure} 
\subfloat[Figure a]{% 
\begin{minipage}[c][1\width]{0.5\textwidth}% 
\includegraphics[clip,width=1\textwidth]{figurea}% 
\end{minipage}}\subfloat[Figure b]{\centering{}% 
\begin{minipage}[c][1\width]{0.5\textwidth}% 
\begin{center} 
\includegraphics[clip,width=0.6\textwidth]{figureb} 
\par\end{center}% 
\end{minipage}} 
\caption{main caption} 
\end{figure} 

इस कोड LyX द्वारा उत्पन्न की गई, हालांकि, तो यह एक सा बदसूरत है।

-1

एक अन्य समाधान (जो subcaption पैकेज के साथ काम करता

\begin{figure}[p] 
     \centering 
     \begin{subfigure}{.49\linewidth} 
      \centering 
      \caption{Large Picture} 
      \includegraphics{LARGEPIC} 
     \end{subfigure} 
     \hfill 
     \begin{subfigure}{.49\linewidth} 
      \centering 
      \caption{SMALL PIC} 
      \includegraphics{small picture} 
      \begin{minipage}{.1cm} 
      \vfill 
      \end{minipage} 
     \end{subfigure} 
     \caption{Two pictures} 
\end{figure} 

\vfill अकेले काम नहीं करता है, यही कारण है कि यह किसी कारण से minipage

संबंधित मुद्दे