Text alignment in tikzpicturealigning a multiline formula with the bullet of itemizeHow can I put a coloured outline around fraction lines?Rotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Numerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themHow to draw a square and its diagonals with arrows?How to draw a -latex arrow inside a node

Do 3D printers really reach 50 micron (0.050mm) accuracy?

“Transitive verb” + interrupter+ “object”?

Transitive action of a discrete group on a compact space

How can I create ribbons like these in Microsoft word 2010?

Does a centaur PC also count as being mounted?

can’t run a function against EXEC

How would a order of Monks that renounce their names communicate effectively?

If a high rpm motor is run at lower rpm, will it produce more torque?

Symbol for "not absolutely continuous" in Latex

Cross over of arrows in a complex diagram

How can I check type T is among parameter pack Ts... in C++?

Are there any vegetarian astronauts?

How exactly is a normal force exerted, at the molecular level?

Is it bad to describe a character long after their introduction?

For people who believe in Jesus and not the devil, what happend in the desert?

How do I spend money in Sweden and Denmark?

Can I travel from Germany to England alone as an unaccompanied minor?

Difference between 'demás' and 'otros'?

Zombie diet, why humans?

Why isn’t the tax system continuous rather than bracketed?

Coefficients of the characteristic polynomial

How to determine what is the correct level of detail when modelling?

Spicket or spigot?

Reverse of diffraction



Text alignment in tikzpicture


aligning a multiline formula with the bullet of itemizeHow can I put a coloured outline around fraction lines?Rotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Numerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themHow to draw a square and its diagonals with arrows?How to draw a -latex arrow inside a node






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I would like to have two lines of text with my time line below. How could I do this:



MWE:



 documentclassarticle
usepackagetikz

begindocument

begintikzpicture
% draw horizontal line

draw (0,0) -- (12,0);

% draw vertical line
foreach x in 0,2,9,12
draw (x cm,3pt) -- (x cm,-3pt);

% draw nodes
draw (0,0) node[below=3pt] 00' node[above=3pt] Starts;
% draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; % <- !
draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

endtikzpicture

enddocument


OUTPUT:
enter image description here



Problem:



When I try to put a new line \ so that 'Lesson starts' appear on top of each other with the command draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; I get this:
enter image description here



Question:



How would I change the above code so "Lesson" is on top of "starts"?










share|improve this question






















  • Line breaks are only supported if the node has a specified width

    – daleif
    Jun 17 at 11:43






  • 1





    Off topic. You should use the $00^prime$ instead of 00'.

    – ferahfeza
    Jun 17 at 11:50











  • @ferahfezaThank you!

    – 3kstc
    Jun 17 at 11:52

















2















I would like to have two lines of text with my time line below. How could I do this:



MWE:



 documentclassarticle
usepackagetikz

begindocument

begintikzpicture
% draw horizontal line

draw (0,0) -- (12,0);

% draw vertical line
foreach x in 0,2,9,12
draw (x cm,3pt) -- (x cm,-3pt);

% draw nodes
draw (0,0) node[below=3pt] 00' node[above=3pt] Starts;
% draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; % <- !
draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

endtikzpicture

enddocument


OUTPUT:
enter image description here



Problem:



When I try to put a new line \ so that 'Lesson starts' appear on top of each other with the command draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; I get this:
enter image description here



Question:



How would I change the above code so "Lesson" is on top of "starts"?










share|improve this question






















  • Line breaks are only supported if the node has a specified width

    – daleif
    Jun 17 at 11:43






  • 1





    Off topic. You should use the $00^prime$ instead of 00'.

    – ferahfeza
    Jun 17 at 11:50











  • @ferahfezaThank you!

    – 3kstc
    Jun 17 at 11:52













2












2








2








I would like to have two lines of text with my time line below. How could I do this:



MWE:



 documentclassarticle
usepackagetikz

begindocument

begintikzpicture
% draw horizontal line

draw (0,0) -- (12,0);

% draw vertical line
foreach x in 0,2,9,12
draw (x cm,3pt) -- (x cm,-3pt);

% draw nodes
draw (0,0) node[below=3pt] 00' node[above=3pt] Starts;
% draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; % <- !
draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

endtikzpicture

enddocument


OUTPUT:
enter image description here



Problem:



When I try to put a new line \ so that 'Lesson starts' appear on top of each other with the command draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; I get this:
enter image description here



Question:



How would I change the above code so "Lesson" is on top of "starts"?










share|improve this question














I would like to have two lines of text with my time line below. How could I do this:



MWE:



 documentclassarticle
usepackagetikz

begindocument

begintikzpicture
% draw horizontal line

draw (0,0) -- (12,0);

% draw vertical line
foreach x in 0,2,9,12
draw (x cm,3pt) -- (x cm,-3pt);

% draw nodes
draw (0,0) node[below=3pt] 00' node[above=3pt] Starts;
% draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; % <- !
draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

endtikzpicture

enddocument


OUTPUT:
enter image description here



Problem:



When I try to put a new line \ so that 'Lesson starts' appear on top of each other with the command draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; I get this:
enter image description here



Question:



How would I change the above code so "Lesson" is on top of "starts"?







tikz-pgf vertical-alignment






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 17 at 11:32









3kstc3kstc

2751 silver badge12 bronze badges




2751 silver badge12 bronze badges












  • Line breaks are only supported if the node has a specified width

    – daleif
    Jun 17 at 11:43






  • 1





    Off topic. You should use the $00^prime$ instead of 00'.

    – ferahfeza
    Jun 17 at 11:50











  • @ferahfezaThank you!

    – 3kstc
    Jun 17 at 11:52

















  • Line breaks are only supported if the node has a specified width

    – daleif
    Jun 17 at 11:43






  • 1





    Off topic. You should use the $00^prime$ instead of 00'.

    – ferahfeza
    Jun 17 at 11:50











  • @ferahfezaThank you!

    – 3kstc
    Jun 17 at 11:52
















Line breaks are only supported if the node has a specified width

– daleif
Jun 17 at 11:43





Line breaks are only supported if the node has a specified width

– daleif
Jun 17 at 11:43




1




1





Off topic. You should use the $00^prime$ instead of 00'.

– ferahfeza
Jun 17 at 11:50





Off topic. You should use the $00^prime$ instead of 00'.

– ferahfeza
Jun 17 at 11:50













@ferahfezaThank you!

– 3kstc
Jun 17 at 11:52





@ferahfezaThank you!

– 3kstc
Jun 17 at 11:52










3 Answers
3






active

oldest

votes


















5














By default, the text of a node is put in an hbox, and therefore occupies only one line. There are several ways to do what you want, one of which is to specify align=left (or similar) for your multiline text node:



 documentclassarticle
usepackagetikz

begindocument

begintikzpicture
% draw horizontal line

draw (0,0) -- (12,0);

% draw vertical lines
foreach x in 0, 2, 9, 12 draw (x cm,3pt) -- (x cm,-3pt);

% draw nodes
draw (0,0) node[below=3pt] 00' node[above=3pt, align=left] Lesson\starts; % <- !
draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

endtikzpicture

enddocument


Screenshot



For details and other techniques, see Text Parameters: Alignment and Width for Multi-Line Text in the PGF & TikZ manual (page 229 for version 3.1.3).



Briefly, the other techniques given in the manual are:




  • use a tabular inside your node:



    draw (0,0) node[below=3pt] 00' node[above=3pt]
    %
    begintabular@l@
    Lesson\
    starts
    endtabular%
    ;



  • ask for automatic line-breaking inside the node by specifying a fixed text width:



    draw (0,0) node[below=3pt] 00' node[above=3pt, text width=3em]
    Lesson starts;






share|improve this answer
































    3














    Play with the width of the text:



     [![documentclassarticle
    usepackagetikz

    begindocument

    begintikzpicture
    % draw horizontal line

    draw (0,0) -- (12,0);

    % draw vertical line
    foreach x in 0,2,9,12
    draw (x cm,3pt) -- (x cm,-3pt);

    % draw nodes
    draw (0,0) node[below=3pt] 00' node[above=3pt,text width = 1cm, align=center] Starts New ;
    % draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; % <- !
    draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
    draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
    draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

    endtikzpicture

    enddocument


    enter image description here






    share|improve this answer






























      2














      One more similar solution with slightly more compact code:



      documentclassarticle
      usepackagetikz

      begindocument
      begintikzpicture[
      every node/.style = align=center, text width=3em
      ]
      % draw horizontal line
      draw (0,0) -- (12,0);
      % draw vertical lines woith nodes
      draw ( 0,-3pt) node[below] 00' -- ++ (0,6pt) node[above] Lesson starts;
      draw ( 2,-3pt) node[below] 10' -- ++ (0,6pt) node[above] Pre-text;
      draw ( 9,-3pt) node[below] 45' -- ++ (0,6pt) node[above] Text;
      draw (12,-3pt) node[below] 60' -- ++ (0,6pt) node[above] Ends;
      endtikzpicture
      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%2f496153%2ftext-alignment-in-tikzpicture%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        5














        By default, the text of a node is put in an hbox, and therefore occupies only one line. There are several ways to do what you want, one of which is to specify align=left (or similar) for your multiline text node:



         documentclassarticle
        usepackagetikz

        begindocument

        begintikzpicture
        % draw horizontal line

        draw (0,0) -- (12,0);

        % draw vertical lines
        foreach x in 0, 2, 9, 12 draw (x cm,3pt) -- (x cm,-3pt);

        % draw nodes
        draw (0,0) node[below=3pt] 00' node[above=3pt, align=left] Lesson\starts; % <- !
        draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
        draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
        draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

        endtikzpicture

        enddocument


        Screenshot



        For details and other techniques, see Text Parameters: Alignment and Width for Multi-Line Text in the PGF & TikZ manual (page 229 for version 3.1.3).



        Briefly, the other techniques given in the manual are:




        • use a tabular inside your node:



          draw (0,0) node[below=3pt] 00' node[above=3pt]
          %
          begintabular@l@
          Lesson\
          starts
          endtabular%
          ;



        • ask for automatic line-breaking inside the node by specifying a fixed text width:



          draw (0,0) node[below=3pt] 00' node[above=3pt, text width=3em]
          Lesson starts;






        share|improve this answer





























          5














          By default, the text of a node is put in an hbox, and therefore occupies only one line. There are several ways to do what you want, one of which is to specify align=left (or similar) for your multiline text node:



           documentclassarticle
          usepackagetikz

          begindocument

          begintikzpicture
          % draw horizontal line

          draw (0,0) -- (12,0);

          % draw vertical lines
          foreach x in 0, 2, 9, 12 draw (x cm,3pt) -- (x cm,-3pt);

          % draw nodes
          draw (0,0) node[below=3pt] 00' node[above=3pt, align=left] Lesson\starts; % <- !
          draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
          draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
          draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

          endtikzpicture

          enddocument


          Screenshot



          For details and other techniques, see Text Parameters: Alignment and Width for Multi-Line Text in the PGF & TikZ manual (page 229 for version 3.1.3).



          Briefly, the other techniques given in the manual are:




          • use a tabular inside your node:



            draw (0,0) node[below=3pt] 00' node[above=3pt]
            %
            begintabular@l@
            Lesson\
            starts
            endtabular%
            ;



          • ask for automatic line-breaking inside the node by specifying a fixed text width:



            draw (0,0) node[below=3pt] 00' node[above=3pt, text width=3em]
            Lesson starts;






          share|improve this answer



























            5












            5








            5







            By default, the text of a node is put in an hbox, and therefore occupies only one line. There are several ways to do what you want, one of which is to specify align=left (or similar) for your multiline text node:



             documentclassarticle
            usepackagetikz

            begindocument

            begintikzpicture
            % draw horizontal line

            draw (0,0) -- (12,0);

            % draw vertical lines
            foreach x in 0, 2, 9, 12 draw (x cm,3pt) -- (x cm,-3pt);

            % draw nodes
            draw (0,0) node[below=3pt] 00' node[above=3pt, align=left] Lesson\starts; % <- !
            draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
            draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
            draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

            endtikzpicture

            enddocument


            Screenshot



            For details and other techniques, see Text Parameters: Alignment and Width for Multi-Line Text in the PGF & TikZ manual (page 229 for version 3.1.3).



            Briefly, the other techniques given in the manual are:




            • use a tabular inside your node:



              draw (0,0) node[below=3pt] 00' node[above=3pt]
              %
              begintabular@l@
              Lesson\
              starts
              endtabular%
              ;



            • ask for automatic line-breaking inside the node by specifying a fixed text width:



              draw (0,0) node[below=3pt] 00' node[above=3pt, text width=3em]
              Lesson starts;






            share|improve this answer















            By default, the text of a node is put in an hbox, and therefore occupies only one line. There are several ways to do what you want, one of which is to specify align=left (or similar) for your multiline text node:



             documentclassarticle
            usepackagetikz

            begindocument

            begintikzpicture
            % draw horizontal line

            draw (0,0) -- (12,0);

            % draw vertical lines
            foreach x in 0, 2, 9, 12 draw (x cm,3pt) -- (x cm,-3pt);

            % draw nodes
            draw (0,0) node[below=3pt] 00' node[above=3pt, align=left] Lesson\starts; % <- !
            draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
            draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
            draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

            endtikzpicture

            enddocument


            Screenshot



            For details and other techniques, see Text Parameters: Alignment and Width for Multi-Line Text in the PGF & TikZ manual (page 229 for version 3.1.3).



            Briefly, the other techniques given in the manual are:




            • use a tabular inside your node:



              draw (0,0) node[below=3pt] 00' node[above=3pt]
              %
              begintabular@l@
              Lesson\
              starts
              endtabular%
              ;



            • ask for automatic line-breaking inside the node by specifying a fixed text width:



              draw (0,0) node[below=3pt] 00' node[above=3pt, text width=3em]
              Lesson starts;







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jun 17 at 11:57

























            answered Jun 17 at 11:43









            frougonfrougon

            3,7601 gold badge9 silver badges18 bronze badges




            3,7601 gold badge9 silver badges18 bronze badges























                3














                Play with the width of the text:



                 [![documentclassarticle
                usepackagetikz

                begindocument

                begintikzpicture
                % draw horizontal line

                draw (0,0) -- (12,0);

                % draw vertical line
                foreach x in 0,2,9,12
                draw (x cm,3pt) -- (x cm,-3pt);

                % draw nodes
                draw (0,0) node[below=3pt] 00' node[above=3pt,text width = 1cm, align=center] Starts New ;
                % draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; % <- !
                draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
                draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
                draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

                endtikzpicture

                enddocument


                enter image description here






                share|improve this answer



























                  3














                  Play with the width of the text:



                   [![documentclassarticle
                  usepackagetikz

                  begindocument

                  begintikzpicture
                  % draw horizontal line

                  draw (0,0) -- (12,0);

                  % draw vertical line
                  foreach x in 0,2,9,12
                  draw (x cm,3pt) -- (x cm,-3pt);

                  % draw nodes
                  draw (0,0) node[below=3pt] 00' node[above=3pt,text width = 1cm, align=center] Starts New ;
                  % draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; % <- !
                  draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
                  draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
                  draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

                  endtikzpicture

                  enddocument


                  enter image description here






                  share|improve this answer

























                    3












                    3








                    3







                    Play with the width of the text:



                     [![documentclassarticle
                    usepackagetikz

                    begindocument

                    begintikzpicture
                    % draw horizontal line

                    draw (0,0) -- (12,0);

                    % draw vertical line
                    foreach x in 0,2,9,12
                    draw (x cm,3pt) -- (x cm,-3pt);

                    % draw nodes
                    draw (0,0) node[below=3pt] 00' node[above=3pt,text width = 1cm, align=center] Starts New ;
                    % draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; % <- !
                    draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
                    draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
                    draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

                    endtikzpicture

                    enddocument


                    enter image description here






                    share|improve this answer













                    Play with the width of the text:



                     [![documentclassarticle
                    usepackagetikz

                    begindocument

                    begintikzpicture
                    % draw horizontal line

                    draw (0,0) -- (12,0);

                    % draw vertical line
                    foreach x in 0,2,9,12
                    draw (x cm,3pt) -- (x cm,-3pt);

                    % draw nodes
                    draw (0,0) node[below=3pt] 00' node[above=3pt,text width = 1cm, align=center] Starts New ;
                    % draw (0,0) node[below=3pt] 00' node[above=3pt] Lesson\starts; % <- !
                    draw (2,0) node[below=3pt] 10' node[above=3pt] Pre-text;
                    draw (9,0) node[below=3pt] 45' node[above=3pt] Text;
                    draw (12,0) node[below=3pt] 60' node[above=3pt] Ends;

                    endtikzpicture

                    enddocument


                    enter image description here







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jun 17 at 11:46









                    DenisDenis

                    2,8616 silver badges23 bronze badges




                    2,8616 silver badges23 bronze badges





















                        2














                        One more similar solution with slightly more compact code:



                        documentclassarticle
                        usepackagetikz

                        begindocument
                        begintikzpicture[
                        every node/.style = align=center, text width=3em
                        ]
                        % draw horizontal line
                        draw (0,0) -- (12,0);
                        % draw vertical lines woith nodes
                        draw ( 0,-3pt) node[below] 00' -- ++ (0,6pt) node[above] Lesson starts;
                        draw ( 2,-3pt) node[below] 10' -- ++ (0,6pt) node[above] Pre-text;
                        draw ( 9,-3pt) node[below] 45' -- ++ (0,6pt) node[above] Text;
                        draw (12,-3pt) node[below] 60' -- ++ (0,6pt) node[above] Ends;
                        endtikzpicture
                        enddocument


                        enter image description here






                        share|improve this answer



























                          2














                          One more similar solution with slightly more compact code:



                          documentclassarticle
                          usepackagetikz

                          begindocument
                          begintikzpicture[
                          every node/.style = align=center, text width=3em
                          ]
                          % draw horizontal line
                          draw (0,0) -- (12,0);
                          % draw vertical lines woith nodes
                          draw ( 0,-3pt) node[below] 00' -- ++ (0,6pt) node[above] Lesson starts;
                          draw ( 2,-3pt) node[below] 10' -- ++ (0,6pt) node[above] Pre-text;
                          draw ( 9,-3pt) node[below] 45' -- ++ (0,6pt) node[above] Text;
                          draw (12,-3pt) node[below] 60' -- ++ (0,6pt) node[above] Ends;
                          endtikzpicture
                          enddocument


                          enter image description here






                          share|improve this answer

























                            2












                            2








                            2







                            One more similar solution with slightly more compact code:



                            documentclassarticle
                            usepackagetikz

                            begindocument
                            begintikzpicture[
                            every node/.style = align=center, text width=3em
                            ]
                            % draw horizontal line
                            draw (0,0) -- (12,0);
                            % draw vertical lines woith nodes
                            draw ( 0,-3pt) node[below] 00' -- ++ (0,6pt) node[above] Lesson starts;
                            draw ( 2,-3pt) node[below] 10' -- ++ (0,6pt) node[above] Pre-text;
                            draw ( 9,-3pt) node[below] 45' -- ++ (0,6pt) node[above] Text;
                            draw (12,-3pt) node[below] 60' -- ++ (0,6pt) node[above] Ends;
                            endtikzpicture
                            enddocument


                            enter image description here






                            share|improve this answer













                            One more similar solution with slightly more compact code:



                            documentclassarticle
                            usepackagetikz

                            begindocument
                            begintikzpicture[
                            every node/.style = align=center, text width=3em
                            ]
                            % draw horizontal line
                            draw (0,0) -- (12,0);
                            % draw vertical lines woith nodes
                            draw ( 0,-3pt) node[below] 00' -- ++ (0,6pt) node[above] Lesson starts;
                            draw ( 2,-3pt) node[below] 10' -- ++ (0,6pt) node[above] Pre-text;
                            draw ( 9,-3pt) node[below] 45' -- ++ (0,6pt) node[above] Text;
                            draw (12,-3pt) node[below] 60' -- ++ (0,6pt) node[above] Ends;
                            endtikzpicture
                            enddocument


                            enter image description here







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jun 17 at 12:17









                            ZarkoZarko

                            138k8 gold badges75 silver badges183 bronze badges




                            138k8 gold badges75 silver badges183 bronze badges



























                                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%2f496153%2ftext-alignment-in-tikzpicture%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

                                Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                                Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                                Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form