I want to create a block in every frame like this

enter image description here

Because I don't like to use classical blocks like this enter image description here Could you please give me the necessary code ? Thank you

  • 2
    You could try to use empty slides and tcolorbox. But without MWE and any attempt it will be hard to help you. – TeXnician Nov 12 '17 at 15:34
  • Welcome to TeX - LaTeX! Do you a sample theme you wish to use? – Andrew Swann Nov 12 '17 at 15:36
  • I use the theme Madrid – Student Nov 12 '17 at 15:40
  • Should "definition 1" be the frametitle? What should happen to the elements which are normally on a slide of the Madrid theme, e.g. head and footline? – samcarter is at topanswers.xyz Nov 12 '17 at 18:44
  • it's not the frametitle, it is only the title of a block – Student Nov 12 '17 at 18:50

You can make a similar box with the tcolorbox package.


\newtcolorbox[auto counter]{pabox}[1]{%
    title=Definition~\thetcbcounter .,
    attach boxed title to top left={yshift=-2mm, xshift=0.5cm}


This is my own box with a mandatory
numbered title and options.


enter image description here

  • hi! how can you add the name of the definition in the upper small box ? thank you :) tex.stackexchange.com/questions/337331/… here i see that I can add a parameter in the options ' title=#2, ' but it erases the word theorem. How can I have theorem, the counter and the name of it into parenthesis? – Marine Galantin Jan 25 '18 at 6:24
  • 1
    @MarineGalantin Seems like I was too slow and Christian Hupfer already answered this. – samcarter is at topanswers.xyz Jan 25 '18 at 20:34
  • but do you know how to define a specific counter ressetting at each chapter? I don't understand the answer of Christian and I can't make it work :/ – Marine Galantin Jan 26 '18 at 17:47
  • @MarineGalantin Then it would be best if you take Christians answer and write a follow up question about your counter problem. – samcarter is at topanswers.xyz Jan 26 '18 at 18:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.