1

I am new to LaTex coding so please be patient ;) Just let me know when this kind of question has been asked so far. I have some graphs I want to put in my LaTeX document and I want them as big as possible to be able to see the details(hence, they need to have a width of at least 1). To describe them, I want some text next to it. The image and the text should take the whole page(and also should ingore the margins). I tried so far:

-two minipages + itemize(which is not satisfying because minipages doesn't consider the size of the page(so my keypoints are cut off) and I loose some space between the minipages

wrapfig but couldn't align it as I wanted

floatrow and tried to write the keypoints into the captions; I also couldn't manage to align it(the image just floated somewhere outside of the page)

figure and subfigure to right it into the captions but could't manage to put all images on one another and write the captrions next to it.

\documentclass{article}
\usepackage{graphicx}
\usepackage[a4paper, top=2cm]{geometry}
\usepackage{arydshln}
\usepackage{booktabs}
\usepackage{bbding}
\usepackage{caption}
\usepackage{lipsum}
\usepackage{wrapfig}
\usepackage{fullpage}
\usepackage[utf8x]{inputenc} 
\usepackage[english]{babel}
\usepackage{xcolor}
\usepackage{csvsimple}
\usepackage{subcaption}
\begin{document}
\begin{minipage}{0.8\textwidth} %this cuts off my points
\includegraphics[width=1\textwidth]{image.png} 
\end{minipage}
\begin{minipage}{0.8\textwidth}
\begin{itemize}
\item 
\end{itemize}
\end{minipage}

\begin{figure}[h] %this is on one another and the text is below it
\begin{minipage}{1\textwidth}
\includegraphics[width=1\textwidth]{image.png}
\end{minipage}
\begin{minipage}{1\textwidth}
\includegraphics[width=1\textwidth]{image.png}
\end{minipage}
\end{figure}


Some text that should be right or left next to it or around bit is above
\begin{wrapfigure}{l}{0.6\textwidth}
  \vspace{-20pt}
\centering
\includegraphics[width=0.8\textwidth]{image.png}   \vspace{-20pt}
  \vspace{-10pt}
\end{wrapfigure}
\end{document}

I don't care about the soluation at all as long as it works for me

4
  • Welcome to TeX SX! Well, you should post a minimal example (complete code, please!) that you have problems with.
    – Bernard
    Sep 23, 2020 at 8:57
  • If you want to place two minipages side by side into the textwidth, their combined with can't exceed the textwidth. In your first example, the width of both minipages adds up to 1.6\textwidth Please also clarify what "The image and the text should take the whole page(and also should ingore the margins). " means exactly? Do you want the image to start inside of the left margin and the text to end inside of the right margin? If so, tex.stackexchange.com/a/154766/134144 should work. If your image is that wide that you need the whole textwidth why don't you put the text below the image?
    – leandriis
    Sep 23, 2020 at 9:08
  • I just want to fill the rest of the page with text next to the image. The example below was copied 1:1 from somehwere else and worked so far but just doesn't look good because the minipage with the image is a way too far from the left edge away
    – Riboswitch
    Sep 23, 2020 at 9:10
  • The image and the text should take the whole page(and also should ingore the margins). - means, that when I image a complete page of the document as 3 x 2 boxes (so two boxes per row), I want the first left top corner box to be filled with the image and the right top left corner box to be filled with text. Hence, 1/3 of the whole page(vertically) is used by an image and its text. with to ignore the margins I mean, that when I use minipage, the "supposed to be left aligned" minipage with the picture doesn't start at the left edge of the site and waste some space
    – Riboswitch
    Sep 23, 2020 at 9:18

1 Answer 1

1

With wrapfigure?

enter image description here

\documentclass{article}
\usepackage[a4paper, margin=2cm]{geometry}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{wrapfig}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}

\begin{document}
    \begin{wrapfigure}[11]{l}{0.6\textwidth}
\centering
\includegraphics[width=\linewidth]{image.png}  
\caption{My wrapped figure}
    \end{wrapfigure}
\lipsum[1-2]
\end{document}

or with some description as list on the right size of image:


\documentclass{article}
\usepackage[a4paper, margin=2cm]{geometry}
\usepackage[demo,
            export]{adjustbox}
\usepackage[skip=1ex]{caption}
\usepackage{tabularx}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}

\begin{document}
\lipsum[1]
    \begin{table}[ht]
    \begin{tabularx}{\linewidth}{XX}
\includegraphics[width=\linewidth, valign=T]{image.png}  
    &   \begin{itemize}
    \item some text some text some text some text some text some text some text 
    \item some text some text some text some text some text some text some text
    \item some text some text some text some text some text some text some text
        \end{itemize}   \\
\caption{Figure with description on the right side}
    &   
    \end{tabularx}
    \vspace{-\baselineskip}
    \end{table}
\lipsum[2]
\end{document}

enter image description here

(in bot examples red lines show page layout/text borders)

Edit:

  • width of image is determined by width of the first (left) column
  • width of columns you can change on the two ways:
    • when in the second column is list (as is in the above MWE, then for it use p{...} column, for example:
\begin{tabularx}{\linewidth}{Xp{0.4\linewidth}}
  • when the second column contain ordinary text, than you determine column width for example as:
\begin{tabularx}{\linewidth}{>{\hsize=0.8\hsize}X
                             >{\hsize=1.2\hsize}m{0.8\linewidth}}
\includegraphics[width=\linewidth, valign=c]{image.png} % <---
    &   \lipsum[66]  \\
3
  • Thanks, the second one suits my unnecessary standards! One last question about the list example: Where do I set the space the picture takes individualy? or does the begin tabular environment in general says, how much space both parts will get?
    – Riboswitch
    Sep 23, 2020 at 10:49
  • 1
    @Syralia, width of image is defined by width of column. In showed example both column have the same width. Their widths you can change for example \begin{tabularx}{\linewidth}{Xm{0.4\linewidth}} when in the second column is a list. See edit in answer.
    – Zarko
    Sep 23, 2020 at 12:26
  • Thanks a lot for the detailed description!
    – Riboswitch
    Sep 23, 2020 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.