How to draw ░░░░░░░ blank with overlaid text in tikz

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












7














Wondering how to draw this sort of thing with tikz:



I ░░░░░░░░░░░░░░░ am a blank space.


...but with text overlaid on the dot grid. Also, instead of the dot-grid being diagonal, I would like to make it simply vertical/horizontal, and make the dots smaller and lighter so when the text goes over it it's not distracting. But it would be along these lines:



I ░Hello░World░░░ am a blank space.


But the "Hello World" would have ░ faded dots behind each letter. Just using this ░ unicode character for demo, this instead would use tikz.










share|improve this question


























    7














    Wondering how to draw this sort of thing with tikz:



    I ░░░░░░░░░░░░░░░ am a blank space.


    ...but with text overlaid on the dot grid. Also, instead of the dot-grid being diagonal, I would like to make it simply vertical/horizontal, and make the dots smaller and lighter so when the text goes over it it's not distracting. But it would be along these lines:



    I ░Hello░World░░░ am a blank space.


    But the "Hello World" would have ░ faded dots behind each letter. Just using this ░ unicode character for demo, this instead would use tikz.










    share|improve this question
























      7












      7








      7


      1





      Wondering how to draw this sort of thing with tikz:



      I ░░░░░░░░░░░░░░░ am a blank space.


      ...but with text overlaid on the dot grid. Also, instead of the dot-grid being diagonal, I would like to make it simply vertical/horizontal, and make the dots smaller and lighter so when the text goes over it it's not distracting. But it would be along these lines:



      I ░Hello░World░░░ am a blank space.


      But the "Hello World" would have ░ faded dots behind each letter. Just using this ░ unicode character for demo, this instead would use tikz.










      share|improve this question













      Wondering how to draw this sort of thing with tikz:



      I ░░░░░░░░░░░░░░░ am a blank space.


      ...but with text overlaid on the dot grid. Also, instead of the dot-grid being diagonal, I would like to make it simply vertical/horizontal, and make the dots smaller and lighter so when the text goes over it it's not distracting. But it would be along these lines:



      I ░Hello░World░░░ am a blank space.


      But the "Hello World" would have ░ faded dots behind each letter. Just using this ░ unicode character for demo, this instead would use tikz.







      tikz-pgf text






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 23 '18 at 1:00









      Lance Pollard

      744415




      744415




















          2 Answers
          2






          active

          oldest

          votes


















          12














          Are you looking for something like this? (If yes, all I'd have to do is to introduce a slightly more flexible pattern such that things look good also with more reasonable scale factors, if no, then this may help others to understand the question better.)



          documentclassarticle
          usepackage[margin=1in]geometry
          usepackagetikz
          usetikzlibraryfadings,patterns
          newcommandPlaceCharOverDots[2][10]%
          begintikzfadingfrompicture[name=temp]
          node[transparent!20,scale=#1]
          bfseriessffamily textcolorwhite#2;
          endtikzfadingfrompicture%
          tikz[baseline=(X.base)]node[inner sep=0pt,outer sep=0pt,scale=#1] (X) bfseriessffamily
          textcolorwhitestrut#2;
          path[pattern=dots,overlay] (X.north west)
          rectangle (X.south east);%
          path[path fading=temp,fit fading=false,overlay,pattern=dots,pattern
          color=gray!20] (X.north west)
          rectangle (X.south east);%

          begindocument
          PlaceCharOverDotsHello world
          enddocument


          enter image description here



          EDIT: If you only want the text being placed over dots, all one needs to do is to define a somewhat denser dot pattern and to use it as the background of a node. I recommend tikzmarknode here because it automatically detects the mode your in (math mode, font size etc.) and has other advantages, which this however does not exploit. Of course, you may adjust inner sep to your needs and/or replace it by inner xsep and inner ysep.



          documentclassarticle
          usepackage[margin=1in]geometry
          usepackagetikz
          usetikzlibrarytikzmark,patterns
          % based on the rings example on p. 1060 of the pgfmanual as well as
          % https://tex.stackexchange.com/a/29367/1952 for the color
          makeatletter
          pgfdeclarepatternformonly[/tikz/radius,size]flexible dots
          pgfpoint-0.5*size-0.5*size
          pgfpoint0.5*size0.5*size
          pgfpointsizesize

          pgfsetfillcolortikz@pattern@color
          pgfpathcirclepgfpointoriginpgfkeysvalueof/tikz/radius
          pgfusepathfill

          makeatother
          tikzset
          radius/.initial=0.1pt,
          size/.store in=size,
          size=0.5pt,

          begindocument
          tikzmarknode[pattern=flexible dots,inner sep=2pt]testHello world
          enddocument


          enter image description here






          share|improve this answer






















          • Pretty much, but the Hello World would just be plain black text, not a cutout of the dots. It's as if the blank is just a background made of dots, and you are typing right over it to fill in the blank.
            – Lance Pollard
            Dec 23 '18 at 1:28











          • @LancePollard I am not sure I fully understand yet but I added a proposal that among other things comes with a more flexible dot pattern.
            – marmot
            Dec 23 '18 at 1:47










          • copy-pasting the code into pdflatex I am getting an error: ! Undefined control sequence. l.24 tikzmarknode [pattern=flexible dots,inner sep=2pt]testHello world
            – Lance Pollard
            Dec 23 '18 at 3:18






          • 1




            @LancePollard When was the last time you updated your TeX installation? tikzmarknode has been added only a few months to the tikzmark library. The error message seems to indicate that you are using an older version.
            – marmot
            Dec 23 '18 at 3:22










          • Okay great, thank you!
            – Lance Pollard
            Dec 23 '18 at 3:28


















          4














          Here is one way to do it. The TikZ pattern has been adopted from https://tex.stackexchange.com/a/323867/8650. Instead of setting up a background layer, I simply draw the node twice.



           documentclassarticle
          usepackagexcolor
          usepackagetikz
          usetikzlibrarypatterns
          pgfdeclarepatternformonlymy dotspgfqpoint-1pt-1ptpgfqpoint5pt5ptpgfqpoint2pt2pt%

          pgfpathcirclepgfqpoint0pt0pt.4pt
          pgfusepathfill

          newcommandfade[1]%
          begintikzpicture[anchor=base, baseline]
          node[inner sep=0, outer sep=0] (node) #1;
          fill[pattern=my dots, pattern color=black!10] (node.south west) rectangle (node.north east);
          node[inner sep=0, outer sep=0] (node) #1;
          endtikzpicture
          begindocument
          \
          I fadeHello World am a blank space.\
          I Hello World am a blank space.
          enddocument


          Dot pattern behind Hello World.






          share|improve this answer






















          • @marmots answer is better - using a tikzmarknode and applying the pattern directly to that node -you just need the lighter color.
            – hpekristiansen
            Dec 23 '18 at 2:08











          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%2f467049%2fhow-to-draw-blank-with-overlaid-text-in-tikz%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          12














          Are you looking for something like this? (If yes, all I'd have to do is to introduce a slightly more flexible pattern such that things look good also with more reasonable scale factors, if no, then this may help others to understand the question better.)



          documentclassarticle
          usepackage[margin=1in]geometry
          usepackagetikz
          usetikzlibraryfadings,patterns
          newcommandPlaceCharOverDots[2][10]%
          begintikzfadingfrompicture[name=temp]
          node[transparent!20,scale=#1]
          bfseriessffamily textcolorwhite#2;
          endtikzfadingfrompicture%
          tikz[baseline=(X.base)]node[inner sep=0pt,outer sep=0pt,scale=#1] (X) bfseriessffamily
          textcolorwhitestrut#2;
          path[pattern=dots,overlay] (X.north west)
          rectangle (X.south east);%
          path[path fading=temp,fit fading=false,overlay,pattern=dots,pattern
          color=gray!20] (X.north west)
          rectangle (X.south east);%

          begindocument
          PlaceCharOverDotsHello world
          enddocument


          enter image description here



          EDIT: If you only want the text being placed over dots, all one needs to do is to define a somewhat denser dot pattern and to use it as the background of a node. I recommend tikzmarknode here because it automatically detects the mode your in (math mode, font size etc.) and has other advantages, which this however does not exploit. Of course, you may adjust inner sep to your needs and/or replace it by inner xsep and inner ysep.



          documentclassarticle
          usepackage[margin=1in]geometry
          usepackagetikz
          usetikzlibrarytikzmark,patterns
          % based on the rings example on p. 1060 of the pgfmanual as well as
          % https://tex.stackexchange.com/a/29367/1952 for the color
          makeatletter
          pgfdeclarepatternformonly[/tikz/radius,size]flexible dots
          pgfpoint-0.5*size-0.5*size
          pgfpoint0.5*size0.5*size
          pgfpointsizesize

          pgfsetfillcolortikz@pattern@color
          pgfpathcirclepgfpointoriginpgfkeysvalueof/tikz/radius
          pgfusepathfill

          makeatother
          tikzset
          radius/.initial=0.1pt,
          size/.store in=size,
          size=0.5pt,

          begindocument
          tikzmarknode[pattern=flexible dots,inner sep=2pt]testHello world
          enddocument


          enter image description here






          share|improve this answer






















          • Pretty much, but the Hello World would just be plain black text, not a cutout of the dots. It's as if the blank is just a background made of dots, and you are typing right over it to fill in the blank.
            – Lance Pollard
            Dec 23 '18 at 1:28











          • @LancePollard I am not sure I fully understand yet but I added a proposal that among other things comes with a more flexible dot pattern.
            – marmot
            Dec 23 '18 at 1:47










          • copy-pasting the code into pdflatex I am getting an error: ! Undefined control sequence. l.24 tikzmarknode [pattern=flexible dots,inner sep=2pt]testHello world
            – Lance Pollard
            Dec 23 '18 at 3:18






          • 1




            @LancePollard When was the last time you updated your TeX installation? tikzmarknode has been added only a few months to the tikzmark library. The error message seems to indicate that you are using an older version.
            – marmot
            Dec 23 '18 at 3:22










          • Okay great, thank you!
            – Lance Pollard
            Dec 23 '18 at 3:28















          12














          Are you looking for something like this? (If yes, all I'd have to do is to introduce a slightly more flexible pattern such that things look good also with more reasonable scale factors, if no, then this may help others to understand the question better.)



          documentclassarticle
          usepackage[margin=1in]geometry
          usepackagetikz
          usetikzlibraryfadings,patterns
          newcommandPlaceCharOverDots[2][10]%
          begintikzfadingfrompicture[name=temp]
          node[transparent!20,scale=#1]
          bfseriessffamily textcolorwhite#2;
          endtikzfadingfrompicture%
          tikz[baseline=(X.base)]node[inner sep=0pt,outer sep=0pt,scale=#1] (X) bfseriessffamily
          textcolorwhitestrut#2;
          path[pattern=dots,overlay] (X.north west)
          rectangle (X.south east);%
          path[path fading=temp,fit fading=false,overlay,pattern=dots,pattern
          color=gray!20] (X.north west)
          rectangle (X.south east);%

          begindocument
          PlaceCharOverDotsHello world
          enddocument


          enter image description here



          EDIT: If you only want the text being placed over dots, all one needs to do is to define a somewhat denser dot pattern and to use it as the background of a node. I recommend tikzmarknode here because it automatically detects the mode your in (math mode, font size etc.) and has other advantages, which this however does not exploit. Of course, you may adjust inner sep to your needs and/or replace it by inner xsep and inner ysep.



          documentclassarticle
          usepackage[margin=1in]geometry
          usepackagetikz
          usetikzlibrarytikzmark,patterns
          % based on the rings example on p. 1060 of the pgfmanual as well as
          % https://tex.stackexchange.com/a/29367/1952 for the color
          makeatletter
          pgfdeclarepatternformonly[/tikz/radius,size]flexible dots
          pgfpoint-0.5*size-0.5*size
          pgfpoint0.5*size0.5*size
          pgfpointsizesize

          pgfsetfillcolortikz@pattern@color
          pgfpathcirclepgfpointoriginpgfkeysvalueof/tikz/radius
          pgfusepathfill

          makeatother
          tikzset
          radius/.initial=0.1pt,
          size/.store in=size,
          size=0.5pt,

          begindocument
          tikzmarknode[pattern=flexible dots,inner sep=2pt]testHello world
          enddocument


          enter image description here






          share|improve this answer






















          • Pretty much, but the Hello World would just be plain black text, not a cutout of the dots. It's as if the blank is just a background made of dots, and you are typing right over it to fill in the blank.
            – Lance Pollard
            Dec 23 '18 at 1:28











          • @LancePollard I am not sure I fully understand yet but I added a proposal that among other things comes with a more flexible dot pattern.
            – marmot
            Dec 23 '18 at 1:47










          • copy-pasting the code into pdflatex I am getting an error: ! Undefined control sequence. l.24 tikzmarknode [pattern=flexible dots,inner sep=2pt]testHello world
            – Lance Pollard
            Dec 23 '18 at 3:18






          • 1




            @LancePollard When was the last time you updated your TeX installation? tikzmarknode has been added only a few months to the tikzmark library. The error message seems to indicate that you are using an older version.
            – marmot
            Dec 23 '18 at 3:22










          • Okay great, thank you!
            – Lance Pollard
            Dec 23 '18 at 3:28













          12












          12








          12






          Are you looking for something like this? (If yes, all I'd have to do is to introduce a slightly more flexible pattern such that things look good also with more reasonable scale factors, if no, then this may help others to understand the question better.)



          documentclassarticle
          usepackage[margin=1in]geometry
          usepackagetikz
          usetikzlibraryfadings,patterns
          newcommandPlaceCharOverDots[2][10]%
          begintikzfadingfrompicture[name=temp]
          node[transparent!20,scale=#1]
          bfseriessffamily textcolorwhite#2;
          endtikzfadingfrompicture%
          tikz[baseline=(X.base)]node[inner sep=0pt,outer sep=0pt,scale=#1] (X) bfseriessffamily
          textcolorwhitestrut#2;
          path[pattern=dots,overlay] (X.north west)
          rectangle (X.south east);%
          path[path fading=temp,fit fading=false,overlay,pattern=dots,pattern
          color=gray!20] (X.north west)
          rectangle (X.south east);%

          begindocument
          PlaceCharOverDotsHello world
          enddocument


          enter image description here



          EDIT: If you only want the text being placed over dots, all one needs to do is to define a somewhat denser dot pattern and to use it as the background of a node. I recommend tikzmarknode here because it automatically detects the mode your in (math mode, font size etc.) and has other advantages, which this however does not exploit. Of course, you may adjust inner sep to your needs and/or replace it by inner xsep and inner ysep.



          documentclassarticle
          usepackage[margin=1in]geometry
          usepackagetikz
          usetikzlibrarytikzmark,patterns
          % based on the rings example on p. 1060 of the pgfmanual as well as
          % https://tex.stackexchange.com/a/29367/1952 for the color
          makeatletter
          pgfdeclarepatternformonly[/tikz/radius,size]flexible dots
          pgfpoint-0.5*size-0.5*size
          pgfpoint0.5*size0.5*size
          pgfpointsizesize

          pgfsetfillcolortikz@pattern@color
          pgfpathcirclepgfpointoriginpgfkeysvalueof/tikz/radius
          pgfusepathfill

          makeatother
          tikzset
          radius/.initial=0.1pt,
          size/.store in=size,
          size=0.5pt,

          begindocument
          tikzmarknode[pattern=flexible dots,inner sep=2pt]testHello world
          enddocument


          enter image description here






          share|improve this answer














          Are you looking for something like this? (If yes, all I'd have to do is to introduce a slightly more flexible pattern such that things look good also with more reasonable scale factors, if no, then this may help others to understand the question better.)



          documentclassarticle
          usepackage[margin=1in]geometry
          usepackagetikz
          usetikzlibraryfadings,patterns
          newcommandPlaceCharOverDots[2][10]%
          begintikzfadingfrompicture[name=temp]
          node[transparent!20,scale=#1]
          bfseriessffamily textcolorwhite#2;
          endtikzfadingfrompicture%
          tikz[baseline=(X.base)]node[inner sep=0pt,outer sep=0pt,scale=#1] (X) bfseriessffamily
          textcolorwhitestrut#2;
          path[pattern=dots,overlay] (X.north west)
          rectangle (X.south east);%
          path[path fading=temp,fit fading=false,overlay,pattern=dots,pattern
          color=gray!20] (X.north west)
          rectangle (X.south east);%

          begindocument
          PlaceCharOverDotsHello world
          enddocument


          enter image description here



          EDIT: If you only want the text being placed over dots, all one needs to do is to define a somewhat denser dot pattern and to use it as the background of a node. I recommend tikzmarknode here because it automatically detects the mode your in (math mode, font size etc.) and has other advantages, which this however does not exploit. Of course, you may adjust inner sep to your needs and/or replace it by inner xsep and inner ysep.



          documentclassarticle
          usepackage[margin=1in]geometry
          usepackagetikz
          usetikzlibrarytikzmark,patterns
          % based on the rings example on p. 1060 of the pgfmanual as well as
          % https://tex.stackexchange.com/a/29367/1952 for the color
          makeatletter
          pgfdeclarepatternformonly[/tikz/radius,size]flexible dots
          pgfpoint-0.5*size-0.5*size
          pgfpoint0.5*size0.5*size
          pgfpointsizesize

          pgfsetfillcolortikz@pattern@color
          pgfpathcirclepgfpointoriginpgfkeysvalueof/tikz/radius
          pgfusepathfill

          makeatother
          tikzset
          radius/.initial=0.1pt,
          size/.store in=size,
          size=0.5pt,

          begindocument
          tikzmarknode[pattern=flexible dots,inner sep=2pt]testHello world
          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 23 '18 at 1:47

























          answered Dec 23 '18 at 1:25









          marmot

          88.6k4102190




          88.6k4102190











          • Pretty much, but the Hello World would just be plain black text, not a cutout of the dots. It's as if the blank is just a background made of dots, and you are typing right over it to fill in the blank.
            – Lance Pollard
            Dec 23 '18 at 1:28











          • @LancePollard I am not sure I fully understand yet but I added a proposal that among other things comes with a more flexible dot pattern.
            – marmot
            Dec 23 '18 at 1:47










          • copy-pasting the code into pdflatex I am getting an error: ! Undefined control sequence. l.24 tikzmarknode [pattern=flexible dots,inner sep=2pt]testHello world
            – Lance Pollard
            Dec 23 '18 at 3:18






          • 1




            @LancePollard When was the last time you updated your TeX installation? tikzmarknode has been added only a few months to the tikzmark library. The error message seems to indicate that you are using an older version.
            – marmot
            Dec 23 '18 at 3:22










          • Okay great, thank you!
            – Lance Pollard
            Dec 23 '18 at 3:28
















          • Pretty much, but the Hello World would just be plain black text, not a cutout of the dots. It's as if the blank is just a background made of dots, and you are typing right over it to fill in the blank.
            – Lance Pollard
            Dec 23 '18 at 1:28











          • @LancePollard I am not sure I fully understand yet but I added a proposal that among other things comes with a more flexible dot pattern.
            – marmot
            Dec 23 '18 at 1:47










          • copy-pasting the code into pdflatex I am getting an error: ! Undefined control sequence. l.24 tikzmarknode [pattern=flexible dots,inner sep=2pt]testHello world
            – Lance Pollard
            Dec 23 '18 at 3:18






          • 1




            @LancePollard When was the last time you updated your TeX installation? tikzmarknode has been added only a few months to the tikzmark library. The error message seems to indicate that you are using an older version.
            – marmot
            Dec 23 '18 at 3:22










          • Okay great, thank you!
            – Lance Pollard
            Dec 23 '18 at 3:28















          Pretty much, but the Hello World would just be plain black text, not a cutout of the dots. It's as if the blank is just a background made of dots, and you are typing right over it to fill in the blank.
          – Lance Pollard
          Dec 23 '18 at 1:28





          Pretty much, but the Hello World would just be plain black text, not a cutout of the dots. It's as if the blank is just a background made of dots, and you are typing right over it to fill in the blank.
          – Lance Pollard
          Dec 23 '18 at 1:28













          @LancePollard I am not sure I fully understand yet but I added a proposal that among other things comes with a more flexible dot pattern.
          – marmot
          Dec 23 '18 at 1:47




          @LancePollard I am not sure I fully understand yet but I added a proposal that among other things comes with a more flexible dot pattern.
          – marmot
          Dec 23 '18 at 1:47












          copy-pasting the code into pdflatex I am getting an error: ! Undefined control sequence. l.24 tikzmarknode [pattern=flexible dots,inner sep=2pt]testHello world
          – Lance Pollard
          Dec 23 '18 at 3:18




          copy-pasting the code into pdflatex I am getting an error: ! Undefined control sequence. l.24 tikzmarknode [pattern=flexible dots,inner sep=2pt]testHello world
          – Lance Pollard
          Dec 23 '18 at 3:18




          1




          1




          @LancePollard When was the last time you updated your TeX installation? tikzmarknode has been added only a few months to the tikzmark library. The error message seems to indicate that you are using an older version.
          – marmot
          Dec 23 '18 at 3:22




          @LancePollard When was the last time you updated your TeX installation? tikzmarknode has been added only a few months to the tikzmark library. The error message seems to indicate that you are using an older version.
          – marmot
          Dec 23 '18 at 3:22












          Okay great, thank you!
          – Lance Pollard
          Dec 23 '18 at 3:28




          Okay great, thank you!
          – Lance Pollard
          Dec 23 '18 at 3:28











          4














          Here is one way to do it. The TikZ pattern has been adopted from https://tex.stackexchange.com/a/323867/8650. Instead of setting up a background layer, I simply draw the node twice.



           documentclassarticle
          usepackagexcolor
          usepackagetikz
          usetikzlibrarypatterns
          pgfdeclarepatternformonlymy dotspgfqpoint-1pt-1ptpgfqpoint5pt5ptpgfqpoint2pt2pt%

          pgfpathcirclepgfqpoint0pt0pt.4pt
          pgfusepathfill

          newcommandfade[1]%
          begintikzpicture[anchor=base, baseline]
          node[inner sep=0, outer sep=0] (node) #1;
          fill[pattern=my dots, pattern color=black!10] (node.south west) rectangle (node.north east);
          node[inner sep=0, outer sep=0] (node) #1;
          endtikzpicture
          begindocument
          \
          I fadeHello World am a blank space.\
          I Hello World am a blank space.
          enddocument


          Dot pattern behind Hello World.






          share|improve this answer






















          • @marmots answer is better - using a tikzmarknode and applying the pattern directly to that node -you just need the lighter color.
            – hpekristiansen
            Dec 23 '18 at 2:08
















          4














          Here is one way to do it. The TikZ pattern has been adopted from https://tex.stackexchange.com/a/323867/8650. Instead of setting up a background layer, I simply draw the node twice.



           documentclassarticle
          usepackagexcolor
          usepackagetikz
          usetikzlibrarypatterns
          pgfdeclarepatternformonlymy dotspgfqpoint-1pt-1ptpgfqpoint5pt5ptpgfqpoint2pt2pt%

          pgfpathcirclepgfqpoint0pt0pt.4pt
          pgfusepathfill

          newcommandfade[1]%
          begintikzpicture[anchor=base, baseline]
          node[inner sep=0, outer sep=0] (node) #1;
          fill[pattern=my dots, pattern color=black!10] (node.south west) rectangle (node.north east);
          node[inner sep=0, outer sep=0] (node) #1;
          endtikzpicture
          begindocument
          \
          I fadeHello World am a blank space.\
          I Hello World am a blank space.
          enddocument


          Dot pattern behind Hello World.






          share|improve this answer






















          • @marmots answer is better - using a tikzmarknode and applying the pattern directly to that node -you just need the lighter color.
            – hpekristiansen
            Dec 23 '18 at 2:08














          4












          4








          4






          Here is one way to do it. The TikZ pattern has been adopted from https://tex.stackexchange.com/a/323867/8650. Instead of setting up a background layer, I simply draw the node twice.



           documentclassarticle
          usepackagexcolor
          usepackagetikz
          usetikzlibrarypatterns
          pgfdeclarepatternformonlymy dotspgfqpoint-1pt-1ptpgfqpoint5pt5ptpgfqpoint2pt2pt%

          pgfpathcirclepgfqpoint0pt0pt.4pt
          pgfusepathfill

          newcommandfade[1]%
          begintikzpicture[anchor=base, baseline]
          node[inner sep=0, outer sep=0] (node) #1;
          fill[pattern=my dots, pattern color=black!10] (node.south west) rectangle (node.north east);
          node[inner sep=0, outer sep=0] (node) #1;
          endtikzpicture
          begindocument
          \
          I fadeHello World am a blank space.\
          I Hello World am a blank space.
          enddocument


          Dot pattern behind Hello World.






          share|improve this answer














          Here is one way to do it. The TikZ pattern has been adopted from https://tex.stackexchange.com/a/323867/8650. Instead of setting up a background layer, I simply draw the node twice.



           documentclassarticle
          usepackagexcolor
          usepackagetikz
          usetikzlibrarypatterns
          pgfdeclarepatternformonlymy dotspgfqpoint-1pt-1ptpgfqpoint5pt5ptpgfqpoint2pt2pt%

          pgfpathcirclepgfqpoint0pt0pt.4pt
          pgfusepathfill

          newcommandfade[1]%
          begintikzpicture[anchor=base, baseline]
          node[inner sep=0, outer sep=0] (node) #1;
          fill[pattern=my dots, pattern color=black!10] (node.south west) rectangle (node.north east);
          node[inner sep=0, outer sep=0] (node) #1;
          endtikzpicture
          begindocument
          \
          I fadeHello World am a blank space.\
          I Hello World am a blank space.
          enddocument


          Dot pattern behind Hello World.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 23 '18 at 2:12

























          answered Dec 23 '18 at 2:04









          hpekristiansen

          5,16862864




          5,16862864











          • @marmots answer is better - using a tikzmarknode and applying the pattern directly to that node -you just need the lighter color.
            – hpekristiansen
            Dec 23 '18 at 2:08

















          • @marmots answer is better - using a tikzmarknode and applying the pattern directly to that node -you just need the lighter color.
            – hpekristiansen
            Dec 23 '18 at 2:08
















          @marmots answer is better - using a tikzmarknode and applying the pattern directly to that node -you just need the lighter color.
          – hpekristiansen
          Dec 23 '18 at 2:08





          @marmots answer is better - using a tikzmarknode and applying the pattern directly to that node -you just need the lighter color.
          – hpekristiansen
          Dec 23 '18 at 2:08


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f467049%2fhow-to-draw-blank-with-overlaid-text-in-tikz%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

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay