Page LayoutGraphic splitting paragraph [?Memoir issue?]

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Julian_S_Moore
Posts: 72
Joined: Sun Nov 16, 2008 1:26 pm

Graphic splitting paragraph [?Memoir issue?]

Post by Julian_S_Moore »

In the attached example the graphic has jumped from the bottom of p2 to the top of p3 where it now sits between lines 1 & 2 of the paragraph it is supposed to precede.

I would be quite happy for the graphic to be on p3 provided the successor paragraph is beneath it... and correctly spaced (change the initial lipsum range where shown to see what the nominal spacing should look like). Generally the layout is the (?default) flushbottom (not raggedbottom) and looks good, so some code change that deals with the issue if/where it arises rather than creating a global solution that messes up everything else would be preferred.

The problem does not seem occur is there is too little preceding text... hence the extra lines of lipsum. I'm not sure it's a Memoir issue because it seems so dependent on the layout details (#lines?) but simply switching from Memoir to Article the problem doesn't seem to occur.

Your help is, as ever, greatly appreciated.

Code: Select all

\documentclass[final,twoside,openright,10pt]{memoir}
\usepackage{lipsum}
\usepackage{graphicx}
\setlength\intextsep{0pt plus 1pt minus 1pt} % space above AND below an in-text float
\newlength{\prestar}
\newcommand{\starBreak}{%
	\setlength{\prestar}{0.5\textwidth} \addtolength{\prestar}{-12pt}	
	\begin{figure}[!ht]
		\vspace{3.5pt} 
		\hspace{\prestar} \includegraphics{Wingding16.eps}
		\vspace{3.2pt} 
	\end{figure}
}

\begin{document}
\lipsum[1-9]% TRY IT WITH [1-4] FOR COMPARISON
Suspendisse vel felis. Ut lorem lorem, interdum eu, tincidunt sit amet,
laoreet vitae, arcu. Aenean faucibus pede eu ante. Praesent enim elit, rutrum
at, molestie non, nonummy vel, nisl. Ut lectus eros, malesuada sit amet, fer-
mentum eu, sodales cursus, magna. Donec eu purus. Quisque vehicula, urna
sed ultricies auctor, pede lorem egestas dui, et convallis elit erat sed nulla. Nulla nulla nulla nulla Nulla nulla nulla nulla Nulla nulla nulla nulla. \par
\starBreak{} \par
Morbi luctus, wisi viverra faucibus pretium, nibh est placerat odio, nec com-
modo wisi enim eget quam. Quisque libero justo, consectetuer a, feugiat vitae,
porttitor eu, libero.\par
\lipsum[7-20]
\end{document}
Attachments
Wingding16.zip
Necessary to see what's happening...
(5.22 KiB) Downloaded 307 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
fatra2
Posts: 126
Joined: Fri May 01, 2009 1:43 pm

Re: Graphic splitting paragraph [?Memoir issue?]

Post by fatra2 »

Hi there,

It is kind of normal that your graphic will be position somewhere at the top of the page, you are telling the LaTeX compiler to begin your figure environment with the options [!ht] meaning "force the position of this figure either here or on top of a page".

If you want to make sure that your figure appears precisely where you include it in your code, you need to leave the figure environment out. I am not saying that this is good practice, but it works.

Cheers
Julian_S_Moore
Posts: 72
Joined: Sun Nov 16, 2008 1:26 pm

Re: Graphic splitting paragraph [?Memoir issue?]

Post by Julian_S_Moore »

Thanks - I was told the same thing over on comp.text.tex.

I took out the float and now it behaves as expected; I could see it was due to the !ht but having been advised to use a float didn't know what to do... until I was told not to use a float!
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Graphic splitting paragraph [?Memoir issue?]

Post by localghost »

It is very much appreciated if you mention a crossposting. This prevents users from waste of time by double effort. Because this is not the first time you do that, I for one prospectively will wait before I react on your next request(s).


Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Julian_S_Moore
Posts: 72
Joined: Sun Nov 16, 2008 1:26 pm

Re: Graphic splitting paragraph [?Memoir issue?]

Post by Julian_S_Moore »

Thorsten, may I respectfully ask you to reconsider your personal position and the implicit recommendation to others?

My purpose in cross-posting has been to reach a greater number of people in order to elicit a wider variety of opinions/approaches, and to expedite resolution of what is for me a time sensitive issue; I shan't bore you with the details but I am not in a financial position to sit back and wait for leisurely answers.

This being more of a "community" than the big wide usenet, I have endeavoured to maintain a balance by being careful to report back here and to acknowledge both the contributors and the information provided.

Following your message, if I declare a cross-posting and people hold back in answering, the purpose of posting at all is defeated; if I cross-post but do not declare it, I could now be accused of being duplicitous; if I do not cross-post I am deprived of the widest possible pool of input and the timeliness of the responses.

The value of the wider pool is amply demonstrated by the issue of this thread; and with regard to timeliness, having wasted hours on an innapropriate approach, the quicker one begins to advance again, the better.

I would suggest, and hope you would agree that the best approach would be as follows.

If cross-posting, declare it (and provide link if possible); cross-posting forum users not to be penalised by being ignored as long as they declare cross-postings and promptly cross-report summary answers (not progress of discussions, but with links if not previously supplied) for the benefit of all.

What do you think?
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Graphic splitting paragraph [?Memoir issue?]

Post by gmedina »

Julian_S_Moore wrote:...but having been advised to use a float didn't know what to do... until I was told not to use a float!...
WTF... Who advised you to use a float? I only assumed that you were talking about one and gave my suggestion based on that assumption. If that was not the case (as we now know, but not thanks to you, but to a more considered user), then clearly I would have corrected my suggestion.

And then again, please cite the corresponding sources here too:

Creating n x lineheight space to contain graphic?.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Graphic splitting paragraph [?Memoir issue?]

Post by localghost »

Julian_S_Moore wrote:Thorsten, may I respectfully ask you to reconsider your personal position and the implicit recommendation to others? […]
This is not a personal consideration but a general attitude in forums like this. And I don't see where I gave a recommendation, neither explicit nor implicit.
Julian_S_Moore wrote:[…] My purpose in cross-posting has been to reach a greater number of people in order to elicit a wider variety of opinions/approaches, and to expedite resolution of what is for me a time sensitive issue; I shan't bore you with the details but I am not in a financial position to sit back and wait for leisurely answers.

This being more of a "community" than the big wide usenet, I have endeavoured to maintain a balance by being careful to report back here and to acknowledge both the contributors and the information provided. […]
You are free to do so. This just seems to be a conflict of interests. You want to have quick answers, I don't want to waste my time. Finally it's all about how you ask your questions. But don't blame others for your situation.
Julian_S_Moore wrote:[…] Following your message, if I declare a cross-posting and people hold back in answering, the purpose of posting at all is defeated; if I cross-post but do not declare it, I could now be accused of being duplicitous; if I do not cross-post I am deprived of the widest possible pool of input and the timeliness of the responses.

The value of the wider pool is amply demonstrated by the issue of this thread; and with regard to timeliness, having wasted hours on an innapropriate approach, the quicker one begins to advance again, the better. […]
I don't think that a solution will be held back. But when I see that a solution has already been given somewhere else and my solution is not better, I can save my time. And I'm fed up with the fact that after working out a solution I must see that a solution from where else is used and I don't get feedback. Mentioning a cross posting is just fair. You won't lose your face when doing so.
Julian_S_Moore wrote:[…] I would suggest, and hope you would agree that the best approach would be as follows.

If cross-posting, declare it (and provide link if possible); cross-posting forum users not to be penalised by being ignored as long as they declare cross-postings and promptly cross-report summary answers (not progress of discussions, but with links if not previously supplied) for the benefit of all.

What do you think?
This is almost exactly the same at it is written in the Board Rules.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply