LaTeX forum ⇒ Graphics, Figures & TablesFigures Side by Side extended into Margin

Information and discussion about graphics, figures & tables in LaTeX documents.
abclatex
Posts: 17
Joined: Wed Nov 28, 2012 10:09 pm

Figures Side by Side extended into Margin

Postby abclatex » Fri Dec 07, 2012 6:54 pm

Hi guys,

I have some problems of figures side by side.

  1. How to place figures like the "image1"? If someone could tell me how to manage them like "image2" (one figure occupies the body and has the same width as that of the body, while another occupies the margin and has the same width to that of the margin.), it could be perfect.

  2. How to place the figure caption directly under the figure? You can say the caption 2 of image 1 or 3 is at the wrong place.

Image 1
image 1.JPG
image 1.JPG (24.09 KiB) Viewed 1050 times


Image 2 (the ideal mode)
image 2.JPG
image 2.JPG (23.57 KiB) Viewed 1050 times


Image 3 (corresponding to the code)
image 3.JPG
image 3.JPG (30.9 KiB) Viewed 1050 times


Code:
  1. \documentclass[10pt,a4paper]{book}
  2.  
  3. % page layout
  4. \usepackage[%
  5. left=2cm,
  6. right=7cm,
  7. top=2cm,
  8. bottom=2cm,
  9. textheight=25cm,
  10. textwidth=11cm,
  11. marginparsep=1cm,
  12. marginparwidth=5cm
  13. ]{geometry}
  14.  
  15. % Language settings
  16. \usepackage[german,french]{babel}
  17.  
  18. % font and other typographic settings:
  19. \usepackage{fontspec}
  20. \setmainfont[Ligatures=TeX]{Calibri-Light}
  21. \usepackage{ragged2e}
  22. \usepackage{ctex}
  23. \usepackage{array,color}
  24.  
  25. % figures and the like:
  26. \usepackage{graphicx}
  27. \graphicspath{{fig/}}
  28. \usepackage{caption}
  29. \captionsetup[figure]{name={Figure.}}
  30. \captionsetup{font={scriptsize,singlespacing},justification=RaggedRight,skip=2pt}
  31. \usepackage{ifoddpage}
  32. %or: \usepackage[strict]{changepage}
  33. \usepackage{blindtext}
  34.  
  35. \begin{document}
  36. \begin{figure}[t]
  37. %\setcapwidth{0.6\textwidth}
  38. \checkoddpage
  39. \edef\side{\ifoddpage l\else r\fi}%
  40. \makebox[\textwidth][\side]{%
  41. \begin{minipage}[t]{0.59\textwidth}
  42. \includegraphics[width=14cm]{1.1.jpg}
  43. \caption{Caption 1}
  44. \end{minipage}%
  45. \hspace{1cm}%
  46. \begin{minipage}[t]{0.59\textwidth}
  47. \raggedleft
  48. \includegraphics[width=3cm]{1.2.jpg}
  49. \caption{Caption 2}
  50. \label{fig:free-lunch}
  51. \end{minipage}%
  52. }%
  53. \end{figure}
  54.  
  55. Today, four necktie knots are in widespread use. They are the four-in-hand knot, the half-Windsor knot, the Windsor knot and the Pratt knot. The first three are classic necktie knots that have been used for a long time. The Pratt knot is a more recent necktie knot that was introduced to the public in 1989.
  56.  
  57. Below shows a comparison table of the four necktie knots, together with the bow tie. It helps you find the answer to the first question that may come up in your mind -- Which necktie knots do I need? Click the links on the left to see the instructions on tying a certain knot.
  58.  
  59. \end{document}


Thanks a lot!

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
cgnieder
Site Moderator
Posts: 1948
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany
Contact:

Postby cgnieder » Fri Dec 07, 2012 7:55 pm

Is this a one-time occasion where you need a text figure and a margin figure side by side or will you figures always come in pairs? Should the figures be able to float like standard figures or should they be fixed?

Regards
Clemens
------------------------------
New German Q&A site about TeX: http://texwelt.de/wissen

Link:
BBcode:
HTML:
Hide post links
Show post links

abclatex
Posts: 17
Joined: Wed Nov 28, 2012 10:09 pm

Postby abclatex » Fri Dec 07, 2012 8:13 pm

cgnieder wrote:Is this a one-time occasion where you need a text figure and a margin figure side by side or will you figures always come in pairs? Should the figures be able to float like standard figures or should they be fixed?

Regards


Thanks for your reply, Cgnieder.

It' not one-time stuff. I need to place two or three figures side by side many times but not in every case. It's better to adopt float figures, I guess, since the paper has not done yet.

If I move the page layout codes, the overlapping would disppear. However I have to keep these layout codes.
  1. \usepackage[%
  2. left=2cm,
  3. right=7cm,
  4. top=2cm,
  5. bottom=2cm,
  6. textheight=25cm,
  7. textwidth=11cm,
  8. marginparsep=1cm,
  9. marginparwidth=5cm
  10. ]{geometry}

Link:
BBcode:
HTML:
Hide post links
Show post links

abclatex
Posts: 17
Joined: Wed Nov 28, 2012 10:09 pm

Postby abclatex » Wed Dec 12, 2012 12:35 am

Still unsolved...

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 2 guests