How do I raise a figure (placed with wrapfig) to be flush with the top of a paragraph?Initial with wrapfigure — other idea?Wrapfig - why is figure placed in margins?Aligning graphical elements with flowframFigure placed on a separate page is centered and not on topWrapfig and multicol — how to avoid wrapping text?I cannot add pictures to my document using latex and texstudioIssue with placement of figure using wrapfig environmentWrapfigure does not work properlyTrying to get cells containing one line of not text to not move down the text the other cells in the rowSCfigure placed on own page, while figure isn't
If nine coins are tossed, what is the probability that the number of heads is even?
What does *dead* mean in *What do you mean, dead?*?
Why does Central Limit Theorem break down in my simulation?
What does the Digital Threat scope actually do?
Finding the minimum value of a function without using Calculus
Computation logic of Partway in TikZ
What is Tony Stark injecting into himself in Iron Man 3?
What should I do when a paper is published similar to my PhD thesis without citation?
Graphic representation of a triangle using ArrayPlot
What can I do if someone tampers with my SSH public key?
Why does this boat have a landing pad? (SpaceX's GO Searcher) Any plans for propulsive capsule landings?
Giving a career talk in my old university, how prominently should I tell students my salary?
How do you make a gun that shoots melee weapons and/or swords?
How can I portion out frozen cookie dough?
Do Cubics always have one real root?
Does the US political system, in principle, allow for a no-party system?
Can one live in the U.S. and not use a credit card?
Converting from "matrix" data into "coordinate" data
Cycles on the torus
Writing text next to a table
Are small insurances worth it?
(Codewars) Linked Lists-Sorted Insert
Is there a way to make cleveref distinguish two environments with the same counter?
"If + would" conditional in present perfect tense
How do I raise a figure (placed with wrapfig) to be flush with the top of a paragraph?
Initial with wrapfigure — other idea?Wrapfig - why is figure placed in margins?Aligning graphical elements with flowframFigure placed on a separate page is centered and not on topWrapfig and multicol — how to avoid wrapping text?I cannot add pictures to my document using latex and texstudioIssue with placement of figure using wrapfig environmentWrapfigure does not work properlyTrying to get cells containing one line of not text to not move down the text the other cells in the rowSCfigure placed on own page, while figure isn't
I am using the wrapfig
package to place a figure with text wrapped around it. Here is a minimal example, with a screenshot of the relevant part of the output below:
documentclassbook
usepackagegraphicx
usepackagewrapfig
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth]TestImage.jpg
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
Looking at this output, I am not fond of how the figure is placed somewhat down from the top of the first paragraph. What is a minimal solution for raising the figure so that the top edge of the image is flush with the top of this paragraph?
A few clarifying notes: I don't need the solution to find the top of the paragraph automatically -- if I can just raise the image by a manually entered length, that's fine. Also, I'm fine with making this manual adjustment for each image; there's no need to make the change to all such images if that's not convenient.
graphics floats vertical-alignment positioning wrapfigure
add a comment |
I am using the wrapfig
package to place a figure with text wrapped around it. Here is a minimal example, with a screenshot of the relevant part of the output below:
documentclassbook
usepackagegraphicx
usepackagewrapfig
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth]TestImage.jpg
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
Looking at this output, I am not fond of how the figure is placed somewhat down from the top of the first paragraph. What is a minimal solution for raising the figure so that the top edge of the image is flush with the top of this paragraph?
A few clarifying notes: I don't need the solution to find the top of the paragraph automatically -- if I can just raise the image by a manually entered length, that's fine. Also, I'm fine with making this manual adjustment for each image; there's no need to make the change to all such images if that's not convenient.
graphics floats vertical-alignment positioning wrapfigure
Note that wrapfig adds a gap ofintextsep
above and below. There are several ways to compensate, such as addingvskip-intextsep
or usingraisebox0pt[dimexpr height-intextsep][dimexpr depth-intextsep]...
. The location of the baseline is irrelevant; all that matters is the height and depth.
– John Kormylo
3 hours ago
add a comment |
I am using the wrapfig
package to place a figure with text wrapped around it. Here is a minimal example, with a screenshot of the relevant part of the output below:
documentclassbook
usepackagegraphicx
usepackagewrapfig
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth]TestImage.jpg
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
Looking at this output, I am not fond of how the figure is placed somewhat down from the top of the first paragraph. What is a minimal solution for raising the figure so that the top edge of the image is flush with the top of this paragraph?
A few clarifying notes: I don't need the solution to find the top of the paragraph automatically -- if I can just raise the image by a manually entered length, that's fine. Also, I'm fine with making this manual adjustment for each image; there's no need to make the change to all such images if that's not convenient.
graphics floats vertical-alignment positioning wrapfigure
I am using the wrapfig
package to place a figure with text wrapped around it. Here is a minimal example, with a screenshot of the relevant part of the output below:
documentclassbook
usepackagegraphicx
usepackagewrapfig
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth]TestImage.jpg
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
Looking at this output, I am not fond of how the figure is placed somewhat down from the top of the first paragraph. What is a minimal solution for raising the figure so that the top edge of the image is flush with the top of this paragraph?
A few clarifying notes: I don't need the solution to find the top of the paragraph automatically -- if I can just raise the image by a manually entered length, that's fine. Also, I'm fine with making this manual adjustment for each image; there's no need to make the change to all such images if that's not convenient.
graphics floats vertical-alignment positioning wrapfigure
graphics floats vertical-alignment positioning wrapfigure
edited 6 hours ago
Sebastiano
10.7k42163
10.7k42163
asked 8 hours ago
SapereAudeSapereAude
423
423
Note that wrapfig adds a gap ofintextsep
above and below. There are several ways to compensate, such as addingvskip-intextsep
or usingraisebox0pt[dimexpr height-intextsep][dimexpr depth-intextsep]...
. The location of the baseline is irrelevant; all that matters is the height and depth.
– John Kormylo
3 hours ago
add a comment |
Note that wrapfig adds a gap ofintextsep
above and below. There are several ways to compensate, such as addingvskip-intextsep
or usingraisebox0pt[dimexpr height-intextsep][dimexpr depth-intextsep]...
. The location of the baseline is irrelevant; all that matters is the height and depth.
– John Kormylo
3 hours ago
Note that wrapfig adds a gap of
intextsep
above and below. There are several ways to compensate, such as adding vskip-intextsep
or using raisebox0pt[dimexpr height-intextsep][dimexpr depth-intextsep]...
. The location of the baseline is irrelevant; all that matters is the height and depth.– John Kormylo
3 hours ago
Note that wrapfig adds a gap of
intextsep
above and below. There are several ways to compensate, such as adding vskip-intextsep
or using raisebox0pt[dimexpr height-intextsep][dimexpr depth-intextsep]...
. The location of the baseline is irrelevant; all that matters is the height and depth.– John Kormylo
3 hours ago
add a comment |
2 Answers
2
active
oldest
votes
You can set intextsep
:
documentclassbook
usepackagegraphicx
usepackagewrapfig
setlengthintextsep0pt
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth]example-image-duck
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
An more manual alternative is to trim the graphic. By adjusting the value, you can move the graphic up and down:
documentclassbook
usepackagegraphicx
usepackagewrapfig
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth,trim=0pt 0pt 0pt 30pt]example-image-duck
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
1
includegraphics[clip,width=0.4textwidth,trim=0pt 0pt 0pt 65pt]example-image-duck
?
– David Carlisle
8 hours ago
add a comment |
Since you don't add a caption, it is simpler to use the InsertBoxR
command, from the plain TeX macro package insbox
. This command takes 2 mandatory arguments: the number of lines that remain untouched before the object is inserted, and the object itself, and 1 optional argument – yhe number of supplementary dhorter lines, in case TeX makes a wrong calculation of the number of lines that have to be shortened.
In the following code, the image is even above the first line (using a negative 1st argument), and I used a negative optional argument, so there no blank space under the image.
documentclassbook
usepackagegraphicx
usepackagewrapfig
usepackage[svgnames]xcolor
usepackagelipsum
inputinsbox
makeatletter@InsertBoxMargin =3mmmakeatother
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
InsertBoxR-1colorYellowGreenrule0.35textwidth0.3textheight[-2]
lipsum
enddocument
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478628%2fhow-do-i-raise-a-figure-placed-with-wrapfig-to-be-flush-with-the-top-of-a-para%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can set intextsep
:
documentclassbook
usepackagegraphicx
usepackagewrapfig
setlengthintextsep0pt
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth]example-image-duck
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
An more manual alternative is to trim the graphic. By adjusting the value, you can move the graphic up and down:
documentclassbook
usepackagegraphicx
usepackagewrapfig
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth,trim=0pt 0pt 0pt 30pt]example-image-duck
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
1
includegraphics[clip,width=0.4textwidth,trim=0pt 0pt 0pt 65pt]example-image-duck
?
– David Carlisle
8 hours ago
add a comment |
You can set intextsep
:
documentclassbook
usepackagegraphicx
usepackagewrapfig
setlengthintextsep0pt
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth]example-image-duck
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
An more manual alternative is to trim the graphic. By adjusting the value, you can move the graphic up and down:
documentclassbook
usepackagegraphicx
usepackagewrapfig
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth,trim=0pt 0pt 0pt 30pt]example-image-duck
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
1
includegraphics[clip,width=0.4textwidth,trim=0pt 0pt 0pt 65pt]example-image-duck
?
– David Carlisle
8 hours ago
add a comment |
You can set intextsep
:
documentclassbook
usepackagegraphicx
usepackagewrapfig
setlengthintextsep0pt
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth]example-image-duck
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
An more manual alternative is to trim the graphic. By adjusting the value, you can move the graphic up and down:
documentclassbook
usepackagegraphicx
usepackagewrapfig
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth,trim=0pt 0pt 0pt 30pt]example-image-duck
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
You can set intextsep
:
documentclassbook
usepackagegraphicx
usepackagewrapfig
setlengthintextsep0pt
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth]example-image-duck
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
An more manual alternative is to trim the graphic. By adjusting the value, you can move the graphic up and down:
documentclassbook
usepackagegraphicx
usepackagewrapfig
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
beginwrapfigure[15]r0in
includegraphics[width=0.4textwidth,trim=0pt 0pt 0pt 30pt]example-image-duck
endwrapfigure
Lorem ipsum ... ridiculus mus.
enddocument
answered 8 hours ago
Ulrike FischerUlrike Fischer
194k8302688
194k8302688
1
includegraphics[clip,width=0.4textwidth,trim=0pt 0pt 0pt 65pt]example-image-duck
?
– David Carlisle
8 hours ago
add a comment |
1
includegraphics[clip,width=0.4textwidth,trim=0pt 0pt 0pt 65pt]example-image-duck
?
– David Carlisle
8 hours ago
1
1
includegraphics[clip,width=0.4textwidth,trim=0pt 0pt 0pt 65pt]example-image-duck
?– David Carlisle
8 hours ago
includegraphics[clip,width=0.4textwidth,trim=0pt 0pt 0pt 65pt]example-image-duck
?– David Carlisle
8 hours ago
add a comment |
Since you don't add a caption, it is simpler to use the InsertBoxR
command, from the plain TeX macro package insbox
. This command takes 2 mandatory arguments: the number of lines that remain untouched before the object is inserted, and the object itself, and 1 optional argument – yhe number of supplementary dhorter lines, in case TeX makes a wrong calculation of the number of lines that have to be shortened.
In the following code, the image is even above the first line (using a negative 1st argument), and I used a negative optional argument, so there no blank space under the image.
documentclassbook
usepackagegraphicx
usepackagewrapfig
usepackage[svgnames]xcolor
usepackagelipsum
inputinsbox
makeatletter@InsertBoxMargin =3mmmakeatother
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
InsertBoxR-1colorYellowGreenrule0.35textwidth0.3textheight[-2]
lipsum
enddocument
add a comment |
Since you don't add a caption, it is simpler to use the InsertBoxR
command, from the plain TeX macro package insbox
. This command takes 2 mandatory arguments: the number of lines that remain untouched before the object is inserted, and the object itself, and 1 optional argument – yhe number of supplementary dhorter lines, in case TeX makes a wrong calculation of the number of lines that have to be shortened.
In the following code, the image is even above the first line (using a negative 1st argument), and I used a negative optional argument, so there no blank space under the image.
documentclassbook
usepackagegraphicx
usepackagewrapfig
usepackage[svgnames]xcolor
usepackagelipsum
inputinsbox
makeatletter@InsertBoxMargin =3mmmakeatother
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
InsertBoxR-1colorYellowGreenrule0.35textwidth0.3textheight[-2]
lipsum
enddocument
add a comment |
Since you don't add a caption, it is simpler to use the InsertBoxR
command, from the plain TeX macro package insbox
. This command takes 2 mandatory arguments: the number of lines that remain untouched before the object is inserted, and the object itself, and 1 optional argument – yhe number of supplementary dhorter lines, in case TeX makes a wrong calculation of the number of lines that have to be shortened.
In the following code, the image is even above the first line (using a negative 1st argument), and I used a negative optional argument, so there no blank space under the image.
documentclassbook
usepackagegraphicx
usepackagewrapfig
usepackage[svgnames]xcolor
usepackagelipsum
inputinsbox
makeatletter@InsertBoxMargin =3mmmakeatother
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
InsertBoxR-1colorYellowGreenrule0.35textwidth0.3textheight[-2]
lipsum
enddocument
Since you don't add a caption, it is simpler to use the InsertBoxR
command, from the plain TeX macro package insbox
. This command takes 2 mandatory arguments: the number of lines that remain untouched before the object is inserted, and the object itself, and 1 optional argument – yhe number of supplementary dhorter lines, in case TeX makes a wrong calculation of the number of lines that have to be shortened.
In the following code, the image is even above the first line (using a negative 1st argument), and I used a negative optional argument, so there no blank space under the image.
documentclassbook
usepackagegraphicx
usepackagewrapfig
usepackage[svgnames]xcolor
usepackagelipsum
inputinsbox
makeatletter@InsertBoxMargin =3mmmakeatother
begindocument
begincenter
textbfLarge Lorem ipsum
endcenter
vspace18pt
InsertBoxR-1colorYellowGreenrule0.35textwidth0.3textheight[-2]
lipsum
enddocument
answered 7 hours ago
BernardBernard
172k776204
172k776204
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478628%2fhow-do-i-raise-a-figure-placed-with-wrapfig-to-be-flush-with-the-top-of-a-para%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Note that wrapfig adds a gap of
intextsep
above and below. There are several ways to compensate, such as addingvskip-intextsep
or usingraisebox0pt[dimexpr height-intextsep][dimexpr depth-intextsep]...
. The location of the baseline is irrelevant; all that matters is the height and depth.– John Kormylo
3 hours ago