How to align text above triangle figure Announcing the arrival of Valued Associate #679: Cesar...

Short Story with Cinderella as a Voo-doo Witch

Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?

Simplicity of the roots of a minimal polynomial

What's the meaning of 間時肆拾貳 at a car parking sign

List *all* the tuples!

Are two submodules (where one is contained in the other) isomorphic if their quotientmodules are isomorphic?

Book where humans were engineered with genes from animal species to survive hostile planets

porting install scripts : can rpm replace apt?

At the end of Thor: Ragnarok why don't the Asgardians turn and head for the Bifrost as per their original plan?

Denied boarding although I have proper visa and documentation. To whom should I make a complaint?

How widely used is the term Treppenwitz? Is it something that most Germans know?

Why is my conclusion inconsistent with the van't Hoff equation?

What's the purpose of writing one's academic biography in the third person?

Why are there no cargo aircraft with "flying wing" design?

Check which numbers satisfy the condition [A*B*C = A! + B! + C!]

Why was the term "discrete" used in discrete logarithm?

Should I discuss the type of campaign with my players?

Why aren't air breathing engines used as small first stages

Sci-Fi book where patients in a coma ward all live in a subconscious world linked together

How can I make names more distinctive without making them longer?

Can a non-EU citizen traveling with me come with me through the EU passport line?

English words in a non-english sci-fi novel

What does this icon in iOS Stardew Valley mean?

Do I really need recursive chmod to restrict access to a folder?



How to align text above triangle figure



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Rotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizealign text in tikz figureNumerical conditional within tikz keys?Relating tree nodes in forest to content in a tableTikZ: Node position in draw environmentLatex and Game Theory: Combining an Extensive and Normal Form for a Three Players GameDrawing graph with Tikz: Link it with main text without overlapping with textTikZ: define arrow starting position based on style and format node label












1















I managed to align my hypotenuse text with the hypotenuse side of my triangle, but I feel like it was done inefficiently using a lot of ~~~~~~ in this line node[above] {$sqrt{1+x^2}$~~~~~~~} (B) --.



Is there a better way to get the same alignment that I have now without the excessive use of ~?



enter image description here



documentclass[hidelinks,14pt, letterpaper]{extarticle}
usepackage{amsmath, amssymb, tikz}

newcommand{pythagwidth}{3cm}
newcommand{pythagheight}{2cm}

begin{document}
begin{figure}[h]
centering

begin{tikzpicture}[scale=1.25]
coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
coordinate [label=below right:$C$] (C) at (1.5cm,-1.0cm);
draw
(A) --
node[above] {$sqrt{1+x^2}$~~~~~~~} (B) --
node[right] {?} (C) --
node[below] {?}
(A);
draw
(1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);

end{tikzpicture}
caption{Caption}
label{fig:my_label}
end{figure}
end{document}








share



























    1















    I managed to align my hypotenuse text with the hypotenuse side of my triangle, but I feel like it was done inefficiently using a lot of ~~~~~~ in this line node[above] {$sqrt{1+x^2}$~~~~~~~} (B) --.



    Is there a better way to get the same alignment that I have now without the excessive use of ~?



    enter image description here



    documentclass[hidelinks,14pt, letterpaper]{extarticle}
    usepackage{amsmath, amssymb, tikz}

    newcommand{pythagwidth}{3cm}
    newcommand{pythagheight}{2cm}

    begin{document}
    begin{figure}[h]
    centering

    begin{tikzpicture}[scale=1.25]
    coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
    coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
    coordinate [label=below right:$C$] (C) at (1.5cm,-1.0cm);
    draw
    (A) --
    node[above] {$sqrt{1+x^2}$~~~~~~~} (B) --
    node[right] {?} (C) --
    node[below] {?}
    (A);
    draw
    (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);

    end{tikzpicture}
    caption{Caption}
    label{fig:my_label}
    end{figure}
    end{document}








    share

























      1












      1








      1








      I managed to align my hypotenuse text with the hypotenuse side of my triangle, but I feel like it was done inefficiently using a lot of ~~~~~~ in this line node[above] {$sqrt{1+x^2}$~~~~~~~} (B) --.



      Is there a better way to get the same alignment that I have now without the excessive use of ~?



      enter image description here



      documentclass[hidelinks,14pt, letterpaper]{extarticle}
      usepackage{amsmath, amssymb, tikz}

      newcommand{pythagwidth}{3cm}
      newcommand{pythagheight}{2cm}

      begin{document}
      begin{figure}[h]
      centering

      begin{tikzpicture}[scale=1.25]
      coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
      coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
      coordinate [label=below right:$C$] (C) at (1.5cm,-1.0cm);
      draw
      (A) --
      node[above] {$sqrt{1+x^2}$~~~~~~~} (B) --
      node[right] {?} (C) --
      node[below] {?}
      (A);
      draw
      (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);

      end{tikzpicture}
      caption{Caption}
      label{fig:my_label}
      end{figure}
      end{document}








      share














      I managed to align my hypotenuse text with the hypotenuse side of my triangle, but I feel like it was done inefficiently using a lot of ~~~~~~ in this line node[above] {$sqrt{1+x^2}$~~~~~~~} (B) --.



      Is there a better way to get the same alignment that I have now without the excessive use of ~?



      enter image description here



      documentclass[hidelinks,14pt, letterpaper]{extarticle}
      usepackage{amsmath, amssymb, tikz}

      newcommand{pythagwidth}{3cm}
      newcommand{pythagheight}{2cm}

      begin{document}
      begin{figure}[h]
      centering

      begin{tikzpicture}[scale=1.25]
      coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
      coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
      coordinate [label=below right:$C$] (C) at (1.5cm,-1.0cm);
      draw
      (A) --
      node[above] {$sqrt{1+x^2}$~~~~~~~} (B) --
      node[right] {?} (C) --
      node[below] {?}
      (A);
      draw
      (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);

      end{tikzpicture}
      caption{Caption}
      label{fig:my_label}
      end{figure}
      end{document}






      tikz-pgf





      share












      share










      share



      share










      asked 5 mins ago









      Evan KimEvan Kim

      1383




      1383






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Something like this? I use node[midway,above left=0pt,inner sep=0.5pt] {$sqrt{1+x^2}$}, where inner sep=0.5pt controls the distance.



          documentclass[hidelinks,14pt, letterpaper]{extarticle}
          usepackage{amsmath, amssymb, tikz}

          newcommand{pythagwidth}{3cm}
          newcommand{pythagheight}{2cm}

          begin{document}
          begin{figure}[h]
          centering

          begin{tikzpicture}[scale=1.25]
          coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
          coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
          coordinate [label=below right:$C$] (C) at (1.5cm,-1.0cm);
          draw
          (A) --
          node[midway,above left=0pt,inner sep=0.5pt] {$sqrt{1+x^2}$} (B) --
          node[right] {?} (C) --
          node[below] {?}
          (A);
          draw
          (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);

          end{tikzpicture}
          caption{Caption}
          label{fig:my_label}
          end{figure}
          end{document}


          enter image description here





          share
























            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%2f485211%2fhow-to-align-text-above-triangle-figure%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Something like this? I use node[midway,above left=0pt,inner sep=0.5pt] {$sqrt{1+x^2}$}, where inner sep=0.5pt controls the distance.



            documentclass[hidelinks,14pt, letterpaper]{extarticle}
            usepackage{amsmath, amssymb, tikz}

            newcommand{pythagwidth}{3cm}
            newcommand{pythagheight}{2cm}

            begin{document}
            begin{figure}[h]
            centering

            begin{tikzpicture}[scale=1.25]
            coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
            coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
            coordinate [label=below right:$C$] (C) at (1.5cm,-1.0cm);
            draw
            (A) --
            node[midway,above left=0pt,inner sep=0.5pt] {$sqrt{1+x^2}$} (B) --
            node[right] {?} (C) --
            node[below] {?}
            (A);
            draw
            (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);

            end{tikzpicture}
            caption{Caption}
            label{fig:my_label}
            end{figure}
            end{document}


            enter image description here





            share




























              0














              Something like this? I use node[midway,above left=0pt,inner sep=0.5pt] {$sqrt{1+x^2}$}, where inner sep=0.5pt controls the distance.



              documentclass[hidelinks,14pt, letterpaper]{extarticle}
              usepackage{amsmath, amssymb, tikz}

              newcommand{pythagwidth}{3cm}
              newcommand{pythagheight}{2cm}

              begin{document}
              begin{figure}[h]
              centering

              begin{tikzpicture}[scale=1.25]
              coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
              coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
              coordinate [label=below right:$C$] (C) at (1.5cm,-1.0cm);
              draw
              (A) --
              node[midway,above left=0pt,inner sep=0.5pt] {$sqrt{1+x^2}$} (B) --
              node[right] {?} (C) --
              node[below] {?}
              (A);
              draw
              (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);

              end{tikzpicture}
              caption{Caption}
              label{fig:my_label}
              end{figure}
              end{document}


              enter image description here





              share


























                0












                0








                0







                Something like this? I use node[midway,above left=0pt,inner sep=0.5pt] {$sqrt{1+x^2}$}, where inner sep=0.5pt controls the distance.



                documentclass[hidelinks,14pt, letterpaper]{extarticle}
                usepackage{amsmath, amssymb, tikz}

                newcommand{pythagwidth}{3cm}
                newcommand{pythagheight}{2cm}

                begin{document}
                begin{figure}[h]
                centering

                begin{tikzpicture}[scale=1.25]
                coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
                coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
                coordinate [label=below right:$C$] (C) at (1.5cm,-1.0cm);
                draw
                (A) --
                node[midway,above left=0pt,inner sep=0.5pt] {$sqrt{1+x^2}$} (B) --
                node[right] {?} (C) --
                node[below] {?}
                (A);
                draw
                (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);

                end{tikzpicture}
                caption{Caption}
                label{fig:my_label}
                end{figure}
                end{document}


                enter image description here





                share













                Something like this? I use node[midway,above left=0pt,inner sep=0.5pt] {$sqrt{1+x^2}$}, where inner sep=0.5pt controls the distance.



                documentclass[hidelinks,14pt, letterpaper]{extarticle}
                usepackage{amsmath, amssymb, tikz}

                newcommand{pythagwidth}{3cm}
                newcommand{pythagheight}{2cm}

                begin{document}
                begin{figure}[h]
                centering

                begin{tikzpicture}[scale=1.25]
                coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
                coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
                coordinate [label=below right:$C$] (C) at (1.5cm,-1.0cm);
                draw
                (A) --
                node[midway,above left=0pt,inner sep=0.5pt] {$sqrt{1+x^2}$} (B) --
                node[right] {?} (C) --
                node[below] {?}
                (A);
                draw
                (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);

                end{tikzpicture}
                caption{Caption}
                label{fig:my_label}
                end{figure}
                end{document}


                enter image description here






                share











                share


                share










                answered 2 mins ago









                marmotmarmot

                118k6153288




                118k6153288






























                    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%2f485211%2fhow-to-align-text-above-triangle-figure%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

                    IEEEtran - How to include ORCID in TeX/PDF with PdfLatexIs there a standard way to include ORCID in TeX /...

                    Cicindela nigrior Przypisy | Menu nawigacyjneCicindela varians unicolorManual for the Identification of the...

                    Glossaries-extra: Adding glossaries package to “Clas­sicTh­e­sis” template by Dr. André Miede v. 4.6 ...