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













3















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


enter image description here



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.










share|improve this question
























  • 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
















3















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


enter image description here



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.










share|improve this question
























  • 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














3












3








3


2






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


enter image description here



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.










share|improve this question
















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


enter image description here



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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 6 hours ago









Sebastiano

10.7k42163




10.7k42163










asked 8 hours ago









SapereAudeSapereAude

423




423












  • 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

















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











2 Answers
2






active

oldest

votes


















4














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





share|improve this answer


















  • 1





    includegraphics[clip,width=0.4textwidth,trim=0pt 0pt 0pt 65pt]example-image-duck ?

    – David Carlisle
    8 hours ago


















2














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


enter image description here






share|improve this answer






















    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
    );



    );













    draft saved

    draft discarded


















    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









    4














    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





    share|improve this answer


















    • 1





      includegraphics[clip,width=0.4textwidth,trim=0pt 0pt 0pt 65pt]example-image-duck ?

      – David Carlisle
      8 hours ago















    4














    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





    share|improve this answer


















    • 1





      includegraphics[clip,width=0.4textwidth,trim=0pt 0pt 0pt 65pt]example-image-duck ?

      – David Carlisle
      8 hours ago













    4












    4








    4







    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





    share|improve this answer













    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






    share|improve this answer












    share|improve this answer



    share|improve this answer










    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












    • 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











    2














    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


    enter image description here






    share|improve this answer



























      2














      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


      enter image description here






      share|improve this answer

























        2












        2








        2







        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


        enter image description here






        share|improve this answer













        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


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 7 hours ago









        BernardBernard

        172k776204




        172k776204



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Möglingen Índice Localización Historia Demografía Referencias Enlaces externos Menú de navegación48°53′18″N 9°07′45″E / 48.888333333333, 9.129166666666748°53′18″N 9°07′45″E / 48.888333333333, 9.1291666666667Sitio web oficial Mapa de Möglingen«Gemeinden in Deutschland nach Fläche, Bevölkerung und Postleitzahl am 30.09.2016»Möglingen

            Virtualbox - Configuration error: Querying “UUID” failed (VERR_CFGM_VALUE_NOT_FOUND)“VERR_SUPLIB_WORLD_WRITABLE” error when trying to installing OS in virtualboxVirtual Box Kernel errorFailed to open a seesion for the virtual machineFailed to open a session for the virtual machineUbuntu 14.04 LTS Virtualbox errorcan't use VM VirtualBoxusing virtualboxI can't run Linux-64 Bit on VirtualBoxUnable to insert the virtual optical disk (VBoxguestaddition) in virtual machine for ubuntu server in win 10VirtuaBox in Ubuntu 18.04 Issues with Win10.ISO Installation

            Torre de la Isleta Índice Véase también Referencias Bibliografía Enlaces externos Menú de navegación38°25′58″N 0°23′02″O / 38.43277778, -0.3838888938°25′58″N 0°23′02″O / 38.43277778, -0.38388889Torre de la Illeta de l’Horta o Torre Saleta. Base de datos de bienes inmuebles. Patrimonio Cultural. Secretaría de Estado de CulturaFicha BIC Torre de la Illeta de l’Horta. Dirección General de Patrimonio Cultural. Generalitat ValencianaLugares de interés. Ayuntamiento del CampelloTorre de la Isleta en CastillosNet.org