Hot answers tagged

40

Your MWE is using the default beamer theme, which doesn't define the blocks to have the colors you want. Try using a different theme, as below. Also, to get blue/green/red use block/exampleblock/alertblock, respectively. \documentclass[pdf]{beamer} \usetheme{Copenhagen} \begin{document} \begin{frame} \frametitle{Frame title} \begin{block}{Observation 1} ...


24

One idea is to define a new environment which places the answer contents inside a TikZ \node and rotates it: \documentclass{article} \usepackage[framemethod=tikz]{mdframed} \usepackage{environ} \usepackage{lipsum} \newtheorem{question}{Question} \mdfdefinestyle{que}{ linecolor=cyan, backgroundcolor=cyan!20, } \surroundwithmdframed[style=que]{question} ...


14

One option using a style and append after command to add the dashed lines to the node; since the solution uses \path ... node ...; you can do all operations on nodes (use the standard available keys, name them and have access to their anchors to draw elements): \documentclass{article} \usepackage{tikz} \tikzset{ keep name/.style={ prefix after ...


13

Here is a solution using tikz. The main feature, I think, is that the pin labels are easy to edit/change. This is possibly fortunate because the labels below are roughly the same as the OPs for pins 1-16 but the remaining labels need to be changed as they just repeat the labels for the first 16 pins. Here is an image for what my code produces: and here is ...


11

Here's another solution that doesn't need the environ package because it uses a newsavebox instead. The different part compared to the other answers is \makeatletter \newsavebox{\@my@box} \newenvironment{Answer}% {% \noindent \begin{lrbox}{\@my@box}% \begin{minipage}[t]{\linewidth} \begin{answer} }% {% \end{answer}% \end{minipage}% ...


10

Unfortunately, due to the way boxes are built in beamer (take a look at the definition of \beamerboxesrounded and \endbeamerboxesrounded in beamerbaseboxes.sty to see how different chunks are pieced together to build a box), this would require a major rewriting of the code producing the boxes and quite frankly I am not sure if the work is worthy the effort. ...


9

beamer sets the paragraph indent to 0pt by default (in beamerbasemisc.sty). So, using \indent doesn't have any effect, nor does \hspace*{\parindent}. You can use \hspace*{20pt} though: \documentclass{beamer} \begin{document} \begin{frame} \indent ffffffffffffffffffffffffffffffffddddddddddddddddddd % No indentation ddddddddddddddddddddddddddddddddd ...


9

If you use minipage as indicated by samcarter, you can use block and omit the varblock definition since minipage already allows for reducing the width of the block: \documentclass{beamer} \usetheme{Warsaw} \begin{document} \begin{frame} \begin{center} \begin{minipage}{4cm} \begin{block}{New block} ...


8

You need to use a theme to have blocks appearing this way. Here is an example with "Boadilla" \documentclass[10pt,a4paper]{beamer} \usepackage[utf8]{inputenc} \usetheme[secheader]{Boadilla} \begin{document} \begin{frame}{Title Frame} Introduction sentece \begin{block}{Title Block 1} { \begin{itemize} \item item 1 \item ...


8

Add a \strut and the [t] option to the minipage: or you can add a \vphatom{p} to the first block to get slightly tighter spacing: Notes: The cause of this is that the second block has a p which goes below the baseline, and hence adding the \vphatom{p} to the first block does the trick. The reaason why the blocks are of different heights is also for the ...


8

You can make use of the fit-library. You can pass the nodes you want to include to the fit-option and put the fitting-node on the background layer. In your example it is sufficient to fit the three outermost nodes to get the fitting-node into the right position: \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{backgrounds, fit} \...


7

Unfortunately this is not easy natively in beamer (but there's an easy way to achieve it using external tools) since shadows are applied only to rounded boxes (which are built using beamerboxesrounded) but not to non-rounded boxes (which are built separately using beamercolorbox). As an alternative, I offer you here a possibility using the tcolorbox package ...


7

You can use the tcolorbox package: \documentclass{beamer} \usepackage{tcolorbox} \newtcolorbox{mybox}[1][Theorem:]{ colback=white, colbacktitle=white, coltitle=red!70!black, colframe=red!70!black, boxrule=1pt, titlerule=0pt, arc=15pt, title={\strut#1} } \begin{document} \begin{frame} \begin{mybox} test \end{mybox} \begin{mybox}[Proposition:] test \end{...


7

Whereas \sloppy will loosen the alignment constraints on the whole document, the sloppypar environment can limit the effect of the damage to a localized area. In my MWE, the \hrulefill shows the extent of the left/right margins. \documentclass{article} \def\pre#1{\makebox{#1}} \begin{document} \noindent\hrulefill xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxThis is a ...


7

Here is my approach. I made commands for the edges and the inputs and outputs. \documentclass{standalone} \usepackage{tikz} \begin{document} \tikzstyle{lightedge}=[blue] \tikzstyle{mainedge}=[red,very thick] \tikzstyle{inputBit}=[rectangle,fill=red, text=white] \tikzstyle{outputBit}=[rectangle,fill=blue, text=white] \tikzstyle{pointer}=[orange,->,...


7

\multirow does not know, how large the table will be and it does not tell TeX back, the space used by it. In opposite, the user has to tell \multirow, how much regular rows it is allowed to occupy. However, the equation in \multirow is much higher than two regular rows. The matrix already uses four lines. A workaround is to provide the needed space: \...


6

There are many ways, and it all depends on the desired final layout. Below, two options: one using the standard quote environment; the other one using mdframed: \documentclass{article} \usepackage[framemethod=tikz]{mdframed} \usepackage{lipsum} \newmdenv[linecolor=cyan,backgroundcolor=cyan!20]{question} \begin{document} \lipsum[2] \begin{quote} \lipsum[2]...


6

One possibility using the tcolorbox package and its beamer skin: \documentclass{beamer} \usetheme{Copenhagen} \usepackage{tcolorbox} \tcbuselibrary{most} \setbeamercolor{myblock}{bg=cyan!20} \pgfdeclareimage[width=20pt]{em}{em.png} \pgfdeclareimage[width=20pt]{qm}{qm} \pgfdeclareimage[width=20pt]{st}{st} \newtcolorbox{eblock}{ beamer, enhanced, ...


6

This is a different approach not using tikzmarks but the remember as feature from tcolorbox. Here is the code: \documentclass{beamer} \usepackage[absolute,overlay]{textpos} \usepackage[orientation=portrait,width=36in,height=44in]{beamerposter} \usepackage{tcolorbox} %new code, tcb definition \tcbuselibrary{skins} \newtcolorbox{...


6

This isn't related to the use of layers, but rather to the way you specify the rectangle coordinates. Consider this simpler example: \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{backgrounds} \begin{document} \begin{tikzpicture} \node [draw] (A) {Node A}; \node [draw] (B) at (4,0) {Node B}; \draw (A.north west) + (-0.5,0.5) ...


6

Add a [t] option to the columns: \documentclass[compress]{beamer} \usetheme{Warsaw} \begin{document} \begin{frame} \frametitle{Test1} \begin{columns} \column{7cm} \begin{block} {Block1} \begin{description} \item [{A:}] This is \item [{B:}] New Item \end{description} \end{block} \column{4.75cm} \begin{block} {Block2} \begin{description} \item [{A:}] This ...


6

Here is a Circuitiz component version for a general 64 Lead Quad Flat Package. (My OCD seems to be acting up.) Of course, I usually stick components into a separate file where I never have to look at the code again. \documentclass{standalone} \usepackage{circuitikz} \newlength{\ResUp} \newlength{\ResDown} \newlength{\ResLeft} \newlength{\ResRight} % ****...


6

This is a tcolorbox based implementation. \documentclass{beamer} \usepackage{tikz,tcolorbox} \usetikzlibrary{shapes,calc} \tcbuselibrary{skins} \definecolor{myblue}{rgb}{0.15,0.15,0.53} \makeatletter \newtcbox{\titlebox}{ enhanced, overlay={ \draw[myblue,fill=myblue](frame.south east)--+(0,.2)to[bend right]+(.2,-0)--cycle;}, ...


6

You can change the color inside a local scope \documentclass{tikzposter} % See Section 3 \title{Title} \institute{Inst} % See Section 4.1 \author{Auth} \titlegraphic{Logo} \usetheme{Basic} % See Section 5 \usepackage{lipsum} \begin{document} \maketitle % See Section 4.1 \block{BlocktitleA}{\lipsum[1]} % See Section 4.2 \begin{columns} % See Section 4.4 \...


6

You can use the tcolorbox package to easily create your box (you can use the beamer skin). Setting the desired width for the box (and the text width inside the box) is just a matter of setting the appropriate keys. A little example; since the original beamer theme used was not specified in the question, I defined my own colors to emulate the original ones; ...


Only top voted, non community-wiki answers of a minimum length are eligible