2

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

marked as duplicate by user36296 beamer Nov 15 '17 at 14:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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? – user36296 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
3

You can make a similar box with the tcolorbox package.

\documentclass{beamer}
\usetheme{Madrid}
\usepackage[most]{tcolorbox}

\newtcolorbox[auto counter]{pabox}[1]{%
    colback=white,
    colframe=structure.fg,
    colbacktitle=white!90!structure.fg,
    coltitle=black,
    fonttitle=\bfseries, 
    title=Definition~\thetcbcounter .,
    enhanced,
    attach boxed title to top left={yshift=-2mm, xshift=0.5cm}
}

\begin{document}

\begin{frame}
\begin{pabox}
This is my own box with a mandatory
numbered title and options.
\end{pabox}
\end{frame}


\end{document}

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. – user36296 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. – user36296 Jan 26 '18 at 18:26

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