I am trying to edit a beamerthemeMyTheme.sty file to have the exampleblock
become framed/bordered. While I have seen examples such as that in
- Link to answer providing code for framed blocks (it does not work for me although I expect it should)
- Link to question regarding framed blocks (question providing framed block answers)
- Documentation of 'tcolorbox', and the documentation of tcolorbox provides many good examples on making framed blocks using the package, which I managed to do.
What I cannot seem to do is edit the style file to make each exampleblock a framed block with a specific frame color. At the moment I am continuously fumbling with the concepts of the style file layout and syntax present in this for ex:
\defbeamertemplateparent{blocks}[framed]{block begin,block end}[1][{[#1]}
What is the [framed]
component doing here? Is it a parameter or a flag to specify a new usage of the block environment used? Is this overriding the block
environment or when the word "blocks
" is used instead? What are the parameters in [1][{[#1]}
setting or referring to? Another statement in the first link above:
\defbeamertemplate{block begin}{framed}[1][]
Is this referring to every block that will be created or a block that will be flagged/set as "framed"? Again what is the number referring to?
This code produces a framed block using \usepackage{tcolorbox}
:
\begin{frame}{test}
\begin{tcolorbox}[title=My title,
colback=red!5!white,
colframe=red!75!black,
fonttitle=\bfseries]
This is a tcolorbox
Further text.
\end{tcolorbox}
\end{frame}
Overall, I would like to understand how to create the theme style for adding framed blocks to exampleblocks, while understanding what the statements are doing. I have been trying to get through the book 'The TEXbook' by Donald E. Knuth, but I seem to be missing the big picture.