Generalalign picture with sectioning heading

LaTeX specific issues not fitting into one of the other forums of this category.
Coen
Posts: 17
Joined: Thu May 15, 2008 11:03 am

align picture with sectioning heading

Post by Coen »

I think that my question more or less has something to do with this subject:

I have a piece of text and a very simple drawing (.JPG) that I want to place on the right side of the text with the top in line with the header of the paragraph. (so text left, picture right)

Thought I could just put a box around the picture and place that on the right side of the document. Not so!

this is what I came up with:
\subsubsection{Gravity Based Structures}
\framebox{3.1cm][r]{\begin{figure}[h]
\includegraphics[width=3cm]{Plaatjes/GBS.jpg}
\end{figure}}
The concept of gravity foundations implies that dead load provides stability in all environmental conditions by means of its own gravity. Usually the foundation is made of a reinforced concrete hollow structure that is placed on a preparated sea bed. After positioning the structure is ballasted to provide the required stability.\\
This type of substructure is especially suited where the water depths are relatively shallow and environmental conditions benign. Of the ten reference wind farm three are built with GBSs\footnote{Lillgrund, Middelgrunden and Nysted} all located in the Baltic Sea.
Currently phase I of the Thornton Banks wind farm is being installed which consists of six 2,800T GBFs placed in water depths of approximately 25m. The concept is chosen based on the soil conditions that show a hard layer of limestone . Had the soil conditions allowed for driven monopiles this would have been the method of choice; being both financially and technically more attractive
again thanks for your help! It is highly appreciated!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

align picture with sectioning heading

Post by Stefan Kottwitz »

Hi Coen,

in general feel free to open a new topic for your question, that's usually better then perhaps mixing different subjects.
First, look at the syntax of \framebox, at least the brackets/braces are incorrect: opening {, closing ].
Second, don't use the figure environment, because the picture need not to float.

There are solutions like wrapfig for including pictures and wrapping text around them. But here I quickly typed some lines how one could make it, but that's just a "handmade" example, some values have to be changed perhaps:

Code: Select all

\documentclass[a4paper,10pt]{article}
\usepackage{graphicx,calc}
\begin{document}
\tableofcontents
\subsubsection[Gravity Based Structures]{Gravity Based Structures\hfill
\parbox[t]{3cm+2\fboxsep+2\fboxrule}{\vspace{-1.4ex}
\fbox{\includegraphics[width=3cm]{Plaatjes/GBS.jpg}}}}
\vspace{-3cm}
\parbox{8.5cm}{
The concept of gravity foundations implies that dead load provides stability in all environmental conditions by means of its own gravity. Usually the foundation is made of a reinforced concrete hollow structure that is placed on a preparated sea bed. After positioning the structure is ballasted to provide the required stability.\\
This type of substructure is especially suited where the water depths are relatively shallow and environmental conditions benign. Of the ten reference wind farm three are built with GBSs\footnote{Lillgrund, Middelgrunden and Nysted} all located in the Baltic Sea.}
\smallskip

Currently phase I of the Thornton Banks wind farm is being installed which consists of six 2,800T GBFs placed in water depths of approximately 25m. The concept is chosen based on the soil conditions that show a hard layer of limestone. Had the soil conditions allowed for driven monopiles this would have been the method of choice; being both financially and technically more attractiv\ldots
\end{document}
Stefan
LaTeX.org admin
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

align picture with sectioning heading

Post by gmedina »

Try using the wrapfig package (documentation mostly included in wrapfig,sty itself).
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

align picture with sectioning heading

Post by Juanjo »

What about two aligned minipages? In the following code I've put a \rule instead of your graphic.

Code: Select all

\documentclass[a4paper]{article}
\usepackage{graphicx}

\begin{document}

\subsubsection{Gravity Based Structures}

\begin{minipage}[t]{0.6\textwidth}
  \vspace{0pt}
  The concept of gravity foundations implies that dead load provides stability
  in all environmental conditions by means of its own gravity. 
  Usually the foundation is made of a reinforced concrete hollow structure 
  that is placed on a preparated sea bed. After positioning the structure is
  ballasted to provide the required stability.
\end{minipage}
\hfill
\begin{minipage}[t]{0.35\textwidth}
  \centering\vspace{0pt}
% \includegraphics[width=3cm]{Plaatjes/GBS.jpg} 
  \rule{3cm}{3cm}
\end{minipage}
\smallskip

This type of substructure is especially suited where the water depths are relatively shallow and environmental conditions benign. Of the ten reference wind farm three are built with GBSs\footnote{Lillgrund, Middelgrunden and Nysted} all located in the Baltic Sea.

Currently phase I of the Thornton Banks wind farm is being installed which consists of six 2,800T GBFs placed in water depths of approximately 25m. The concept is chosen based on the soil conditions that show a hard layer of limestone. Had the soil conditions allowed for driven monopiles this would have been the method of choice; being both financially and technically more attractive\ldots
\end{document}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: boxed float that is NOT 3.4pt wider than the textwidth

Post by Stefan Kottwitz »

Hi,

just for info, I understood Coen wanted top alignment with the header, that's why I've put the picture into the \subsection command instead of ready-made solutions like wrapfig.

Stefan
LaTeX.org admin
Coen
Posts: 17
Joined: Thu May 15, 2008 11:03 am

Re: boxed float that is NOT 3.4pt wider than the textwidth

Post by Coen »

Thanks a lot, such enthousiasm in helping to solve my problems!
I followed Stefans solution and it looks great. I only adjusted \smallskip to \medskip.


Thanks a lot. it is highly appreciated!


have a good weekend!
Coen
Posts: 17
Joined: Thu May 15, 2008 11:03 am

Re: boxed float that is NOT 3.4pt wider than the textwidth

Post by Coen »

this might sound pathetic but I forgot about the caption, I tried every position but I think 2 things are going wrong:
- latex does not see the picture as a picture
-the positioning is not going as planned..

again, I hope you have the solutions ready!

I have tried the wrapfig but this does not line out at the level of the header... (I just should not bother about this but about the contents of the thesis....)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

align picture with sectioning heading

Post by Stefan Kottwitz »

Hi Coen,

that should be no problem using \captionof provided by the caption package:

Code: Select all

\usepackage{caption}
...
\subsubsection[...\fbox{\includegraphics[width=3cm]{Plaatjes/GBS.jpg}}\captionof{figure}{text}}}
Stefan
LaTeX.org admin
Coen
Posts: 17
Joined: Thu May 15, 2008 11:03 am

Re: boxed float that is NOT 3.4pt wider than the textwidth

Post by Coen »

Thanks, I'll start playing with it again!

Cheers,


Coen
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

align picture with sectioning heading

Post by Stefan Kottwitz »

This topic was splitted from that older one because a new discussion was started with a different subject.

Stefan
LaTeX.org admin
Post Reply