Beamer: llap produces new line if at the beginning of the line

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












If you use llap in beamer at the beginning of a line, a new line appears between the llaped text and the following text:



enter image description here



Is there a way to fix this?



MWE:



documentclassbeamer

begindocument
beginframe
llapXX
endframe
enddocument


Adding something before the llap command and then llaping past it produces the right sort of result, but doesn't seem like good practice if there's a better way to do it:



enter image description here



This is produced by the following:



documentclassbeamer

begindocument
beginframe
XllapAphantomX
endframe
enddocument









share|improve this question

























    up vote
    2
    down vote

    favorite












    If you use llap in beamer at the beginning of a line, a new line appears between the llaped text and the following text:



    enter image description here



    Is there a way to fix this?



    MWE:



    documentclassbeamer

    begindocument
    beginframe
    llapXX
    endframe
    enddocument


    Adding something before the llap command and then llaping past it produces the right sort of result, but doesn't seem like good practice if there's a better way to do it:



    enter image description here



    This is produced by the following:



    documentclassbeamer

    begindocument
    beginframe
    XllapAphantomX
    endframe
    enddocument









    share|improve this question























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      If you use llap in beamer at the beginning of a line, a new line appears between the llaped text and the following text:



      enter image description here



      Is there a way to fix this?



      MWE:



      documentclassbeamer

      begindocument
      beginframe
      llapXX
      endframe
      enddocument


      Adding something before the llap command and then llaping past it produces the right sort of result, but doesn't seem like good practice if there's a better way to do it:



      enter image description here



      This is produced by the following:



      documentclassbeamer

      begindocument
      beginframe
      XllapAphantomX
      endframe
      enddocument









      share|improve this question













      If you use llap in beamer at the beginning of a line, a new line appears between the llaped text and the following text:



      enter image description here



      Is there a way to fix this?



      MWE:



      documentclassbeamer

      begindocument
      beginframe
      llapXX
      endframe
      enddocument


      Adding something before the llap command and then llaping past it produces the right sort of result, but doesn't seem like good practice if there's a better way to do it:



      enter image description here



      This is produced by the following:



      documentclassbeamer

      begindocument
      beginframe
      XllapAphantomX
      endframe
      enddocument






      beamer






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      Jigsaw

      894




      894




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote













          You must use llap and rlap in horizontal mode. A way to do this is obviously leave the vertical mode:



          documentclassbeamer
          begindocument
          beginframe
          leavevmodellapXX
          endframe
          enddocument


          But as you discover, you can enter also in horizontal mode in several other ways, for instance, writing some text before or some other commands as indent or noindent or mbox,



          IMHO there are nothing wrong with any method as long as you obtain the desired result and nothing else (i.e., worth the truism: do not use noindent if you want maintain the default indentation) ;-) ... but you really need start a paragraph with llap? May be with a MWE more close to you final goal someone could offer a different approach:






          share|improve this answer




















          • Oh, you were faster than me, I'll delete my answer :)
            – nox
            34 mins ago

















          up vote
          2
          down vote













          The LaTeX savvy way to do it is



          makebox[0pt][r]X


          The analog for rlap is



          makebox[0pt][l]X


          If you want to know the reason why llap “fails”, you have to look how llap is defined:



          % latex.ltx, line 5162:
          defllap#1hb@xt@z@hss#1


          and hb@xt@z@ is the same as hbox to 0pt. The primitive hbox doesn't start horizontal mode, so if found between paragraphs it makes a line of its own.



          The llap command doesn't appear in the official LaTeX manual, so who wants to use it should know the details of TeX. Be careful when you copy code from the net.






          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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f452287%2fbeamer-llap-produces-new-line-if-at-the-beginning-of-the-line%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote













            You must use llap and rlap in horizontal mode. A way to do this is obviously leave the vertical mode:



            documentclassbeamer
            begindocument
            beginframe
            leavevmodellapXX
            endframe
            enddocument


            But as you discover, you can enter also in horizontal mode in several other ways, for instance, writing some text before or some other commands as indent or noindent or mbox,



            IMHO there are nothing wrong with any method as long as you obtain the desired result and nothing else (i.e., worth the truism: do not use noindent if you want maintain the default indentation) ;-) ... but you really need start a paragraph with llap? May be with a MWE more close to you final goal someone could offer a different approach:






            share|improve this answer




















            • Oh, you were faster than me, I'll delete my answer :)
              – nox
              34 mins ago














            up vote
            2
            down vote













            You must use llap and rlap in horizontal mode. A way to do this is obviously leave the vertical mode:



            documentclassbeamer
            begindocument
            beginframe
            leavevmodellapXX
            endframe
            enddocument


            But as you discover, you can enter also in horizontal mode in several other ways, for instance, writing some text before or some other commands as indent or noindent or mbox,



            IMHO there are nothing wrong with any method as long as you obtain the desired result and nothing else (i.e., worth the truism: do not use noindent if you want maintain the default indentation) ;-) ... but you really need start a paragraph with llap? May be with a MWE more close to you final goal someone could offer a different approach:






            share|improve this answer




















            • Oh, you were faster than me, I'll delete my answer :)
              – nox
              34 mins ago












            up vote
            2
            down vote










            up vote
            2
            down vote









            You must use llap and rlap in horizontal mode. A way to do this is obviously leave the vertical mode:



            documentclassbeamer
            begindocument
            beginframe
            leavevmodellapXX
            endframe
            enddocument


            But as you discover, you can enter also in horizontal mode in several other ways, for instance, writing some text before or some other commands as indent or noindent or mbox,



            IMHO there are nothing wrong with any method as long as you obtain the desired result and nothing else (i.e., worth the truism: do not use noindent if you want maintain the default indentation) ;-) ... but you really need start a paragraph with llap? May be with a MWE more close to you final goal someone could offer a different approach:






            share|improve this answer












            You must use llap and rlap in horizontal mode. A way to do this is obviously leave the vertical mode:



            documentclassbeamer
            begindocument
            beginframe
            leavevmodellapXX
            endframe
            enddocument


            But as you discover, you can enter also in horizontal mode in several other ways, for instance, writing some text before or some other commands as indent or noindent or mbox,



            IMHO there are nothing wrong with any method as long as you obtain the desired result and nothing else (i.e., worth the truism: do not use noindent if you want maintain the default indentation) ;-) ... but you really need start a paragraph with llap? May be with a MWE more close to you final goal someone could offer a different approach:







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 40 mins ago









            Fran

            48.4k6110169




            48.4k6110169











            • Oh, you were faster than me, I'll delete my answer :)
              – nox
              34 mins ago
















            • Oh, you were faster than me, I'll delete my answer :)
              – nox
              34 mins ago















            Oh, you were faster than me, I'll delete my answer :)
            – nox
            34 mins ago




            Oh, you were faster than me, I'll delete my answer :)
            – nox
            34 mins ago










            up vote
            2
            down vote













            The LaTeX savvy way to do it is



            makebox[0pt][r]X


            The analog for rlap is



            makebox[0pt][l]X


            If you want to know the reason why llap “fails”, you have to look how llap is defined:



            % latex.ltx, line 5162:
            defllap#1hb@xt@z@hss#1


            and hb@xt@z@ is the same as hbox to 0pt. The primitive hbox doesn't start horizontal mode, so if found between paragraphs it makes a line of its own.



            The llap command doesn't appear in the official LaTeX manual, so who wants to use it should know the details of TeX. Be careful when you copy code from the net.






            share|improve this answer
























              up vote
              2
              down vote













              The LaTeX savvy way to do it is



              makebox[0pt][r]X


              The analog for rlap is



              makebox[0pt][l]X


              If you want to know the reason why llap “fails”, you have to look how llap is defined:



              % latex.ltx, line 5162:
              defllap#1hb@xt@z@hss#1


              and hb@xt@z@ is the same as hbox to 0pt. The primitive hbox doesn't start horizontal mode, so if found between paragraphs it makes a line of its own.



              The llap command doesn't appear in the official LaTeX manual, so who wants to use it should know the details of TeX. Be careful when you copy code from the net.






              share|improve this answer






















                up vote
                2
                down vote










                up vote
                2
                down vote









                The LaTeX savvy way to do it is



                makebox[0pt][r]X


                The analog for rlap is



                makebox[0pt][l]X


                If you want to know the reason why llap “fails”, you have to look how llap is defined:



                % latex.ltx, line 5162:
                defllap#1hb@xt@z@hss#1


                and hb@xt@z@ is the same as hbox to 0pt. The primitive hbox doesn't start horizontal mode, so if found between paragraphs it makes a line of its own.



                The llap command doesn't appear in the official LaTeX manual, so who wants to use it should know the details of TeX. Be careful when you copy code from the net.






                share|improve this answer












                The LaTeX savvy way to do it is



                makebox[0pt][r]X


                The analog for rlap is



                makebox[0pt][l]X


                If you want to know the reason why llap “fails”, you have to look how llap is defined:



                % latex.ltx, line 5162:
                defllap#1hb@xt@z@hss#1


                and hb@xt@z@ is the same as hbox to 0pt. The primitive hbox doesn't start horizontal mode, so if found between paragraphs it makes a line of its own.



                The llap command doesn't appear in the official LaTeX manual, so who wants to use it should know the details of TeX. Be careful when you copy code from the net.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 24 mins ago









                egreg

                684k8418243069




                684k8418243069



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f452287%2fbeamer-llap-produces-new-line-if-at-the-beginning-of-the-line%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    Installing NextGIS Connect into QGIS 3?

                    One-line joke