tikz : too much white space over tikzpicture

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











up vote
2
down vote

favorite












MWE .



I do not understand why there is too much blank space on the image.Any advice on how to fix it .Thx



documentclassarticle
usepackagetkz-euclide
usetkzobjall
usepackagepgfplots
usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
begindocument
fbox
begintikzpicture
tkzInittkzClip[space = 1]
tkzPoint[pos = left](0,0)A
tkzPoint[pos = above](4,6)B
tkzPoint[pos = right](10,0)C
tkzDrawPolygon(A,B,C)
tkzInCenter(A,B,C) tkzGetPointI
tkzDefPointBy[projection=onto B--C](I)
tkzGetPointH
tkzDefPointBy[projection=onto A--C](I)
tkzGetPointK
tkzDefPointBy[projection=onto A--B](I)
tkzGetPointL
tkzDrawSegments[dotted](I,L I,H I,K)
tkzDrawSegments[dashed](I,A I,B I,C)
tkzDrawCircle(I,H)
tkzMarkRightAngles%
[fill=gray!10,](I,L,B B,H,I C,K,I)
pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
tkzLabelAngle[pos=1,](H,C,I)$gamma$;
tkzLabelAngle[pos=1,](I,C,K)$gamma$;
endtikzpicture

enddocument


Output of the previous code










share|improve this question

























    up vote
    2
    down vote

    favorite












    MWE .



    I do not understand why there is too much blank space on the image.Any advice on how to fix it .Thx



    documentclassarticle
    usepackagetkz-euclide
    usetkzobjall
    usepackagepgfplots
    usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
    begindocument
    fbox
    begintikzpicture
    tkzInittkzClip[space = 1]
    tkzPoint[pos = left](0,0)A
    tkzPoint[pos = above](4,6)B
    tkzPoint[pos = right](10,0)C
    tkzDrawPolygon(A,B,C)
    tkzInCenter(A,B,C) tkzGetPointI
    tkzDefPointBy[projection=onto B--C](I)
    tkzGetPointH
    tkzDefPointBy[projection=onto A--C](I)
    tkzGetPointK
    tkzDefPointBy[projection=onto A--B](I)
    tkzGetPointL
    tkzDrawSegments[dotted](I,L I,H I,K)
    tkzDrawSegments[dashed](I,A I,B I,C)
    tkzDrawCircle(I,H)
    tkzMarkRightAngles%
    [fill=gray!10,](I,L,B B,H,I C,K,I)
    pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
    pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
    tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
    tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

    pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
    pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
    tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
    tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


    pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
    pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
    tkzLabelAngle[pos=1,](H,C,I)$gamma$;
    tkzLabelAngle[pos=1,](I,C,K)$gamma$;
    endtikzpicture

    enddocument


    Output of the previous code










    share|improve this question























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      MWE .



      I do not understand why there is too much blank space on the image.Any advice on how to fix it .Thx



      documentclassarticle
      usepackagetkz-euclide
      usetkzobjall
      usepackagepgfplots
      usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
      begindocument
      fbox
      begintikzpicture
      tkzInittkzClip[space = 1]
      tkzPoint[pos = left](0,0)A
      tkzPoint[pos = above](4,6)B
      tkzPoint[pos = right](10,0)C
      tkzDrawPolygon(A,B,C)
      tkzInCenter(A,B,C) tkzGetPointI
      tkzDefPointBy[projection=onto B--C](I)
      tkzGetPointH
      tkzDefPointBy[projection=onto A--C](I)
      tkzGetPointK
      tkzDefPointBy[projection=onto A--B](I)
      tkzGetPointL
      tkzDrawSegments[dotted](I,L I,H I,K)
      tkzDrawSegments[dashed](I,A I,B I,C)
      tkzDrawCircle(I,H)
      tkzMarkRightAngles%
      [fill=gray!10,](I,L,B B,H,I C,K,I)
      pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
      pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
      tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
      tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

      pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
      pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
      tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
      tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


      pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
      pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
      tkzLabelAngle[pos=1,](H,C,I)$gamma$;
      tkzLabelAngle[pos=1,](I,C,K)$gamma$;
      endtikzpicture

      enddocument


      Output of the previous code










      share|improve this question













      MWE .



      I do not understand why there is too much blank space on the image.Any advice on how to fix it .Thx



      documentclassarticle
      usepackagetkz-euclide
      usetkzobjall
      usepackagepgfplots
      usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
      begindocument
      fbox
      begintikzpicture
      tkzInittkzClip[space = 1]
      tkzPoint[pos = left](0,0)A
      tkzPoint[pos = above](4,6)B
      tkzPoint[pos = right](10,0)C
      tkzDrawPolygon(A,B,C)
      tkzInCenter(A,B,C) tkzGetPointI
      tkzDefPointBy[projection=onto B--C](I)
      tkzGetPointH
      tkzDefPointBy[projection=onto A--C](I)
      tkzGetPointK
      tkzDefPointBy[projection=onto A--B](I)
      tkzGetPointL
      tkzDrawSegments[dotted](I,L I,H I,K)
      tkzDrawSegments[dashed](I,A I,B I,C)
      tkzDrawCircle(I,H)
      tkzMarkRightAngles%
      [fill=gray!10,](I,L,B B,H,I C,K,I)
      pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
      pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
      tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
      tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

      pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
      pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
      tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
      tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


      pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
      pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
      tkzLabelAngle[pos=1,](H,C,I)$gamma$;
      tkzLabelAngle[pos=1,](I,C,K)$gamma$;
      endtikzpicture

      enddocument


      Output of the previous code







      tikz-pgf tkz-euclide






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 56 mins ago









      robintux

      263




      263




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote













          I didn't try to track down the exact source of the problem, but it is a known problem, that the bounding box not only takes into account all visible objects, but also coordinates used in the computation of paths etc. I think this might also be the issue here.



          As a workaround, remove tkzInittkzClip[space = 1] and wrap everything which should not influence the bounding box in a pgfinterruptboundingbox environment.



          If you want the bounding box to be a bit bigger than the triangle, you could add path ([xshift=-1cm,yshift=-1cm]current bounding box.south west) ([xshift=1cm,yshift=1cm]current bounding box.north east); as suggested by @marmot in his comment below.



          documentclassarticle
          usepackagetkz-euclide
          usetkzobjall
          usepackagepgfplots
          usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
          pgfplotssetcompat=1.16
          begindocument
          fbox
          begintikzpicture
          % tkzInittkzClip[space = 1]
          tkzPoint[pos = left](0,0)A
          tkzPoint[pos = above](4,6)B
          tkzPoint[pos = right](10,0)C
          tkzDrawPolygon(A,B,C)
          beginpgfinterruptboundingbox
          tkzInCenter(A,B,C) tkzGetPointI
          tkzDefPointBy[projection=onto B--C](I)
          tkzGetPointH
          tkzDefPointBy[projection=onto A--C](I)
          tkzGetPointK
          tkzDefPointBy[projection=onto A--B](I)
          tkzGetPointL
          tkzDrawSegments[dotted](I,L I,H I,K)
          tkzDrawSegments[dashed](I,A I,B I,C)
          tkzDrawCircle(I,H)
          tkzMarkRightAngles%
          [fill=gray!10,](I,L,B B,H,I C,K,I)
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
          tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
          tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
          tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
          tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
          tkzLabelAngle[pos=1,](H,C,I)$gamma$;
          tkzLabelAngle[pos=1,](I,C,K)$gamma$;
          endpgfinterruptboundingbox
          path ([xshift=-1cm,yshift=-1cm]current bounding box.south west) ([xshift=1cm,yshift=1cm]current bounding box.north east);
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer






















          • @marmot Added. Thanks a lot for the suggestion
            – samcarter
            36 mins ago

















          up vote
          1
          down vote













          In addition to the solution given by @samcarter, it is enough to frame the figure with a rectangle draw(-1,-1)rectangle(11,7); without using a fbox to solve this problem.



          Edit: thanks a lot to marmot who saw the error I hadn't seen!



          documentclassarticle
          usepackagetkz-euclide
          usetkzobjall
          usepackagepgfplots
          usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
          begindocument
          %fbox
          begintikzpicture
          tkzInit[xmax=10,ymax=6]
          tkzClip[space = 1]
          draw(-1,-1)rectangle(11,7);
          tkzPoint[pos = left](0,0)A
          tkzPoint[pos = above](4,6)B
          tkzPoint[pos = right](10,0)C
          tkzDrawPolygon(A,B,C)
          %beginpgfinterruptboundingbox
          tkzInCenter(A,B,C) tkzGetPointI
          tkzDefPointBy[projection=onto B--C](I)
          tkzGetPointH
          tkzDefPointBy[projection=onto A--C](I)
          tkzGetPointK
          tkzDefPointBy[projection=onto A--B](I)
          tkzGetPointL
          tkzDrawSegments[dotted](I,L I,H I,K)
          tkzDrawSegments[dashed](I,A I,B I,C)
          tkzDrawCircle(I,H)
          tkzMarkRightAngles%
          [fill=gray!10,](I,L,B B,H,I C,K,I)
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
          tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
          tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
          tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
          tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
          tkzLabelAngle[pos=1,](H,C,I)$gamma$;
          tkzLabelAngle[pos=1,](I,C,K)$gamma$;
          %endpgfinterruptboundingbox
          endtikzpicture
          %
          enddocument


          euclide






          share|improve this answer


















          • 1




            Sorry, all your proposal does is to add a hard coded rectangle. The bounding box is still too large since it also has the points in that are relevant to the path construction. To see what I mean, add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); at the end of the tikz code. I work with pdflatex.
            – marmot
            9 mins ago











          • @marmot When I compile the document this way with pdflatex on MikTex I get the result shown. What are you working with?
            – AndréC
            6 mins ago






          • 1




            Could you please add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); just before endtikzpicture and show what you get then?
            – marmot
            4 mins ago










          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%2f456741%2ftikz-too-much-white-space-over-tikzpicture%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
          3
          down vote













          I didn't try to track down the exact source of the problem, but it is a known problem, that the bounding box not only takes into account all visible objects, but also coordinates used in the computation of paths etc. I think this might also be the issue here.



          As a workaround, remove tkzInittkzClip[space = 1] and wrap everything which should not influence the bounding box in a pgfinterruptboundingbox environment.



          If you want the bounding box to be a bit bigger than the triangle, you could add path ([xshift=-1cm,yshift=-1cm]current bounding box.south west) ([xshift=1cm,yshift=1cm]current bounding box.north east); as suggested by @marmot in his comment below.



          documentclassarticle
          usepackagetkz-euclide
          usetkzobjall
          usepackagepgfplots
          usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
          pgfplotssetcompat=1.16
          begindocument
          fbox
          begintikzpicture
          % tkzInittkzClip[space = 1]
          tkzPoint[pos = left](0,0)A
          tkzPoint[pos = above](4,6)B
          tkzPoint[pos = right](10,0)C
          tkzDrawPolygon(A,B,C)
          beginpgfinterruptboundingbox
          tkzInCenter(A,B,C) tkzGetPointI
          tkzDefPointBy[projection=onto B--C](I)
          tkzGetPointH
          tkzDefPointBy[projection=onto A--C](I)
          tkzGetPointK
          tkzDefPointBy[projection=onto A--B](I)
          tkzGetPointL
          tkzDrawSegments[dotted](I,L I,H I,K)
          tkzDrawSegments[dashed](I,A I,B I,C)
          tkzDrawCircle(I,H)
          tkzMarkRightAngles%
          [fill=gray!10,](I,L,B B,H,I C,K,I)
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
          tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
          tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
          tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
          tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
          tkzLabelAngle[pos=1,](H,C,I)$gamma$;
          tkzLabelAngle[pos=1,](I,C,K)$gamma$;
          endpgfinterruptboundingbox
          path ([xshift=-1cm,yshift=-1cm]current bounding box.south west) ([xshift=1cm,yshift=1cm]current bounding box.north east);
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer






















          • @marmot Added. Thanks a lot for the suggestion
            – samcarter
            36 mins ago














          up vote
          3
          down vote













          I didn't try to track down the exact source of the problem, but it is a known problem, that the bounding box not only takes into account all visible objects, but also coordinates used in the computation of paths etc. I think this might also be the issue here.



          As a workaround, remove tkzInittkzClip[space = 1] and wrap everything which should not influence the bounding box in a pgfinterruptboundingbox environment.



          If you want the bounding box to be a bit bigger than the triangle, you could add path ([xshift=-1cm,yshift=-1cm]current bounding box.south west) ([xshift=1cm,yshift=1cm]current bounding box.north east); as suggested by @marmot in his comment below.



          documentclassarticle
          usepackagetkz-euclide
          usetkzobjall
          usepackagepgfplots
          usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
          pgfplotssetcompat=1.16
          begindocument
          fbox
          begintikzpicture
          % tkzInittkzClip[space = 1]
          tkzPoint[pos = left](0,0)A
          tkzPoint[pos = above](4,6)B
          tkzPoint[pos = right](10,0)C
          tkzDrawPolygon(A,B,C)
          beginpgfinterruptboundingbox
          tkzInCenter(A,B,C) tkzGetPointI
          tkzDefPointBy[projection=onto B--C](I)
          tkzGetPointH
          tkzDefPointBy[projection=onto A--C](I)
          tkzGetPointK
          tkzDefPointBy[projection=onto A--B](I)
          tkzGetPointL
          tkzDrawSegments[dotted](I,L I,H I,K)
          tkzDrawSegments[dashed](I,A I,B I,C)
          tkzDrawCircle(I,H)
          tkzMarkRightAngles%
          [fill=gray!10,](I,L,B B,H,I C,K,I)
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
          tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
          tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
          tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
          tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
          tkzLabelAngle[pos=1,](H,C,I)$gamma$;
          tkzLabelAngle[pos=1,](I,C,K)$gamma$;
          endpgfinterruptboundingbox
          path ([xshift=-1cm,yshift=-1cm]current bounding box.south west) ([xshift=1cm,yshift=1cm]current bounding box.north east);
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer






















          • @marmot Added. Thanks a lot for the suggestion
            – samcarter
            36 mins ago












          up vote
          3
          down vote










          up vote
          3
          down vote









          I didn't try to track down the exact source of the problem, but it is a known problem, that the bounding box not only takes into account all visible objects, but also coordinates used in the computation of paths etc. I think this might also be the issue here.



          As a workaround, remove tkzInittkzClip[space = 1] and wrap everything which should not influence the bounding box in a pgfinterruptboundingbox environment.



          If you want the bounding box to be a bit bigger than the triangle, you could add path ([xshift=-1cm,yshift=-1cm]current bounding box.south west) ([xshift=1cm,yshift=1cm]current bounding box.north east); as suggested by @marmot in his comment below.



          documentclassarticle
          usepackagetkz-euclide
          usetkzobjall
          usepackagepgfplots
          usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
          pgfplotssetcompat=1.16
          begindocument
          fbox
          begintikzpicture
          % tkzInittkzClip[space = 1]
          tkzPoint[pos = left](0,0)A
          tkzPoint[pos = above](4,6)B
          tkzPoint[pos = right](10,0)C
          tkzDrawPolygon(A,B,C)
          beginpgfinterruptboundingbox
          tkzInCenter(A,B,C) tkzGetPointI
          tkzDefPointBy[projection=onto B--C](I)
          tkzGetPointH
          tkzDefPointBy[projection=onto A--C](I)
          tkzGetPointK
          tkzDefPointBy[projection=onto A--B](I)
          tkzGetPointL
          tkzDrawSegments[dotted](I,L I,H I,K)
          tkzDrawSegments[dashed](I,A I,B I,C)
          tkzDrawCircle(I,H)
          tkzMarkRightAngles%
          [fill=gray!10,](I,L,B B,H,I C,K,I)
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
          tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
          tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
          tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
          tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
          tkzLabelAngle[pos=1,](H,C,I)$gamma$;
          tkzLabelAngle[pos=1,](I,C,K)$gamma$;
          endpgfinterruptboundingbox
          path ([xshift=-1cm,yshift=-1cm]current bounding box.south west) ([xshift=1cm,yshift=1cm]current bounding box.north east);
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer














          I didn't try to track down the exact source of the problem, but it is a known problem, that the bounding box not only takes into account all visible objects, but also coordinates used in the computation of paths etc. I think this might also be the issue here.



          As a workaround, remove tkzInittkzClip[space = 1] and wrap everything which should not influence the bounding box in a pgfinterruptboundingbox environment.



          If you want the bounding box to be a bit bigger than the triangle, you could add path ([xshift=-1cm,yshift=-1cm]current bounding box.south west) ([xshift=1cm,yshift=1cm]current bounding box.north east); as suggested by @marmot in his comment below.



          documentclassarticle
          usepackagetkz-euclide
          usetkzobjall
          usepackagepgfplots
          usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
          pgfplotssetcompat=1.16
          begindocument
          fbox
          begintikzpicture
          % tkzInittkzClip[space = 1]
          tkzPoint[pos = left](0,0)A
          tkzPoint[pos = above](4,6)B
          tkzPoint[pos = right](10,0)C
          tkzDrawPolygon(A,B,C)
          beginpgfinterruptboundingbox
          tkzInCenter(A,B,C) tkzGetPointI
          tkzDefPointBy[projection=onto B--C](I)
          tkzGetPointH
          tkzDefPointBy[projection=onto A--C](I)
          tkzGetPointK
          tkzDefPointBy[projection=onto A--B](I)
          tkzGetPointL
          tkzDrawSegments[dotted](I,L I,H I,K)
          tkzDrawSegments[dashed](I,A I,B I,C)
          tkzDrawCircle(I,H)
          tkzMarkRightAngles%
          [fill=gray!10,](I,L,B B,H,I C,K,I)
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
          tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
          tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
          tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
          tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
          tkzLabelAngle[pos=1,](H,C,I)$gamma$;
          tkzLabelAngle[pos=1,](I,C,K)$gamma$;
          endpgfinterruptboundingbox
          path ([xshift=-1cm,yshift=-1cm]current bounding box.south west) ([xshift=1cm,yshift=1cm]current bounding box.north east);
          endtikzpicture

          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 36 mins ago

























          answered 45 mins ago









          samcarter

          78.9k787253




          78.9k787253











          • @marmot Added. Thanks a lot for the suggestion
            – samcarter
            36 mins ago
















          • @marmot Added. Thanks a lot for the suggestion
            – samcarter
            36 mins ago















          @marmot Added. Thanks a lot for the suggestion
          – samcarter
          36 mins ago




          @marmot Added. Thanks a lot for the suggestion
          – samcarter
          36 mins ago










          up vote
          1
          down vote













          In addition to the solution given by @samcarter, it is enough to frame the figure with a rectangle draw(-1,-1)rectangle(11,7); without using a fbox to solve this problem.



          Edit: thanks a lot to marmot who saw the error I hadn't seen!



          documentclassarticle
          usepackagetkz-euclide
          usetkzobjall
          usepackagepgfplots
          usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
          begindocument
          %fbox
          begintikzpicture
          tkzInit[xmax=10,ymax=6]
          tkzClip[space = 1]
          draw(-1,-1)rectangle(11,7);
          tkzPoint[pos = left](0,0)A
          tkzPoint[pos = above](4,6)B
          tkzPoint[pos = right](10,0)C
          tkzDrawPolygon(A,B,C)
          %beginpgfinterruptboundingbox
          tkzInCenter(A,B,C) tkzGetPointI
          tkzDefPointBy[projection=onto B--C](I)
          tkzGetPointH
          tkzDefPointBy[projection=onto A--C](I)
          tkzGetPointK
          tkzDefPointBy[projection=onto A--B](I)
          tkzGetPointL
          tkzDrawSegments[dotted](I,L I,H I,K)
          tkzDrawSegments[dashed](I,A I,B I,C)
          tkzDrawCircle(I,H)
          tkzMarkRightAngles%
          [fill=gray!10,](I,L,B B,H,I C,K,I)
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
          tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
          tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
          tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
          tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
          tkzLabelAngle[pos=1,](H,C,I)$gamma$;
          tkzLabelAngle[pos=1,](I,C,K)$gamma$;
          %endpgfinterruptboundingbox
          endtikzpicture
          %
          enddocument


          euclide






          share|improve this answer


















          • 1




            Sorry, all your proposal does is to add a hard coded rectangle. The bounding box is still too large since it also has the points in that are relevant to the path construction. To see what I mean, add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); at the end of the tikz code. I work with pdflatex.
            – marmot
            9 mins ago











          • @marmot When I compile the document this way with pdflatex on MikTex I get the result shown. What are you working with?
            – AndréC
            6 mins ago






          • 1




            Could you please add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); just before endtikzpicture and show what you get then?
            – marmot
            4 mins ago














          up vote
          1
          down vote













          In addition to the solution given by @samcarter, it is enough to frame the figure with a rectangle draw(-1,-1)rectangle(11,7); without using a fbox to solve this problem.



          Edit: thanks a lot to marmot who saw the error I hadn't seen!



          documentclassarticle
          usepackagetkz-euclide
          usetkzobjall
          usepackagepgfplots
          usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
          begindocument
          %fbox
          begintikzpicture
          tkzInit[xmax=10,ymax=6]
          tkzClip[space = 1]
          draw(-1,-1)rectangle(11,7);
          tkzPoint[pos = left](0,0)A
          tkzPoint[pos = above](4,6)B
          tkzPoint[pos = right](10,0)C
          tkzDrawPolygon(A,B,C)
          %beginpgfinterruptboundingbox
          tkzInCenter(A,B,C) tkzGetPointI
          tkzDefPointBy[projection=onto B--C](I)
          tkzGetPointH
          tkzDefPointBy[projection=onto A--C](I)
          tkzGetPointK
          tkzDefPointBy[projection=onto A--B](I)
          tkzGetPointL
          tkzDrawSegments[dotted](I,L I,H I,K)
          tkzDrawSegments[dashed](I,A I,B I,C)
          tkzDrawCircle(I,H)
          tkzMarkRightAngles%
          [fill=gray!10,](I,L,B B,H,I C,K,I)
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
          tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
          tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
          tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
          tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
          tkzLabelAngle[pos=1,](H,C,I)$gamma$;
          tkzLabelAngle[pos=1,](I,C,K)$gamma$;
          %endpgfinterruptboundingbox
          endtikzpicture
          %
          enddocument


          euclide






          share|improve this answer


















          • 1




            Sorry, all your proposal does is to add a hard coded rectangle. The bounding box is still too large since it also has the points in that are relevant to the path construction. To see what I mean, add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); at the end of the tikz code. I work with pdflatex.
            – marmot
            9 mins ago











          • @marmot When I compile the document this way with pdflatex on MikTex I get the result shown. What are you working with?
            – AndréC
            6 mins ago






          • 1




            Could you please add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); just before endtikzpicture and show what you get then?
            – marmot
            4 mins ago












          up vote
          1
          down vote










          up vote
          1
          down vote









          In addition to the solution given by @samcarter, it is enough to frame the figure with a rectangle draw(-1,-1)rectangle(11,7); without using a fbox to solve this problem.



          Edit: thanks a lot to marmot who saw the error I hadn't seen!



          documentclassarticle
          usepackagetkz-euclide
          usetkzobjall
          usepackagepgfplots
          usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
          begindocument
          %fbox
          begintikzpicture
          tkzInit[xmax=10,ymax=6]
          tkzClip[space = 1]
          draw(-1,-1)rectangle(11,7);
          tkzPoint[pos = left](0,0)A
          tkzPoint[pos = above](4,6)B
          tkzPoint[pos = right](10,0)C
          tkzDrawPolygon(A,B,C)
          %beginpgfinterruptboundingbox
          tkzInCenter(A,B,C) tkzGetPointI
          tkzDefPointBy[projection=onto B--C](I)
          tkzGetPointH
          tkzDefPointBy[projection=onto A--C](I)
          tkzGetPointK
          tkzDefPointBy[projection=onto A--B](I)
          tkzGetPointL
          tkzDrawSegments[dotted](I,L I,H I,K)
          tkzDrawSegments[dashed](I,A I,B I,C)
          tkzDrawCircle(I,H)
          tkzMarkRightAngles%
          [fill=gray!10,](I,L,B B,H,I C,K,I)
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
          tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
          tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
          tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
          tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
          tkzLabelAngle[pos=1,](H,C,I)$gamma$;
          tkzLabelAngle[pos=1,](I,C,K)$gamma$;
          %endpgfinterruptboundingbox
          endtikzpicture
          %
          enddocument


          euclide






          share|improve this answer














          In addition to the solution given by @samcarter, it is enough to frame the figure with a rectangle draw(-1,-1)rectangle(11,7); without using a fbox to solve this problem.



          Edit: thanks a lot to marmot who saw the error I hadn't seen!



          documentclassarticle
          usepackagetkz-euclide
          usetkzobjall
          usepackagepgfplots
          usetikzlibrarycalc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta,positioning,math,babel
          begindocument
          %fbox
          begintikzpicture
          tkzInit[xmax=10,ymax=6]
          tkzClip[space = 1]
          draw(-1,-1)rectangle(11,7);
          tkzPoint[pos = left](0,0)A
          tkzPoint[pos = above](4,6)B
          tkzPoint[pos = right](10,0)C
          tkzDrawPolygon(A,B,C)
          %beginpgfinterruptboundingbox
          tkzInCenter(A,B,C) tkzGetPointI
          tkzDefPointBy[projection=onto B--C](I)
          tkzGetPointH
          tkzDefPointBy[projection=onto A--C](I)
          tkzGetPointK
          tkzDefPointBy[projection=onto A--B](I)
          tkzGetPointL
          tkzDrawSegments[dotted](I,L I,H I,K)
          tkzDrawSegments[dashed](I,A I,B I,C)
          tkzDrawCircle(I,H)
          tkzMarkRightAngles%
          [fill=gray!10,](I,L,B B,H,I C,K,I)
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--B--H;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = L--B--I;
          tkzLabelAngle[pos=0.7,](H,B,I)$alpha$;
          tkzLabelAngle[pos=0.7,](L,B,I)$alpha$;

          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = K--A--I;
          pic[draw=black,text=black,-,angle eccentricity=0.7,angle radius=0.5cm]angle = I--A--L;
          tkzLabelAngle[pos=0.7,](L,A,I)$beta$;
          tkzLabelAngle[pos=0.7,](I,A,K)$beta$;


          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = H--C--I;
          pic[draw=black,text=black,-,angle eccentricity=0.1,angle radius=0.7cm]angle = I--C--K;
          tkzLabelAngle[pos=1,](H,C,I)$gamma$;
          tkzLabelAngle[pos=1,](I,C,K)$gamma$;
          %endpgfinterruptboundingbox
          endtikzpicture
          %
          enddocument


          euclide







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 22 secs ago

























          answered 19 mins ago









          AndréC

          4,072833




          4,072833







          • 1




            Sorry, all your proposal does is to add a hard coded rectangle. The bounding box is still too large since it also has the points in that are relevant to the path construction. To see what I mean, add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); at the end of the tikz code. I work with pdflatex.
            – marmot
            9 mins ago











          • @marmot When I compile the document this way with pdflatex on MikTex I get the result shown. What are you working with?
            – AndréC
            6 mins ago






          • 1




            Could you please add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); just before endtikzpicture and show what you get then?
            – marmot
            4 mins ago












          • 1




            Sorry, all your proposal does is to add a hard coded rectangle. The bounding box is still too large since it also has the points in that are relevant to the path construction. To see what I mean, add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); at the end of the tikz code. I work with pdflatex.
            – marmot
            9 mins ago











          • @marmot When I compile the document this way with pdflatex on MikTex I get the result shown. What are you working with?
            – AndréC
            6 mins ago






          • 1




            Could you please add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); just before endtikzpicture and show what you get then?
            – marmot
            4 mins ago







          1




          1




          Sorry, all your proposal does is to add a hard coded rectangle. The bounding box is still too large since it also has the points in that are relevant to the path construction. To see what I mean, add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); at the end of the tikz code. I work with pdflatex.
          – marmot
          9 mins ago





          Sorry, all your proposal does is to add a hard coded rectangle. The bounding box is still too large since it also has the points in that are relevant to the path construction. To see what I mean, add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); at the end of the tikz code. I work with pdflatex.
          – marmot
          9 mins ago













          @marmot When I compile the document this way with pdflatex on MikTex I get the result shown. What are you working with?
          – AndréC
          6 mins ago




          @marmot When I compile the document this way with pdflatex on MikTex I get the result shown. What are you working with?
          – AndréC
          6 mins ago




          1




          1




          Could you please add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); just before endtikzpicture and show what you get then?
          – marmot
          4 mins ago




          Could you please add draw[red] (current bounding box.south west) rectangle (current bounding box.north east); just before endtikzpicture and show what you get then?
          – marmot
          4 mins ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f456741%2ftikz-too-much-white-space-over-tikzpicture%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          Long meetings (6-7 hours a day): Being “babysat” by supervisor

          Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

          Confectionery