Hi all,
is there a way to use the \beamerboxesrounded command in a non beamer document? I am writing in a book style.
Thanks!
Document Classes ⇒ beamer environments in non beamer documents
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
beamer environments in non beamer documents
Hi polla,
\beamerboxesrounded is defined in beamerbaseboxes.sty, reading that file could give you an impression. Perhaps the fancybox package could be an alternative way.
Stefan
\beamerboxesrounded is defined in beamerbaseboxes.sty, reading that file could give you an impression. Perhaps the fancybox package could be an alternative way.
Stefan
LaTeX.org admin
Re: beamer environments in non beamer documents
Hi Stefan, thanks, but the fancybox package does not do all I'd like it to do (though I guess it is better than nothing). I tried loading beamerbaseboxes, but I get error messages on the xcolor package, no matter what I do (i get something along the lines that bg is not defined).
I also tried the article mode in beamer, but with that mode all the typesetting of the boxes is lost. Should I jsut give up?
I also tried the article mode in beamer, but with that mode all the typesetting of the boxes is lost. Should I jsut give up?
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
beamer environments in non beamer documents
You could also use pgf/TikZ, have a look at this example: Boxes with text and math.
If you cannot use beamer boxes directly, a hard workaround would be to create a beamer class document pdf with just those boxes and include parts of the pdf by \includegraphics (cropped) into the book document.
Stefan
If you cannot use beamer boxes directly, a hard workaround would be to create a beamer class document pdf with just those boxes and include parts of the pdf by \includegraphics (cropped) into the book document.
Stefan
LaTeX.org admin
Re: beamer environments in non beamer documents
Many thansk, Stefan, I have just tried it and indeed it works like a charm. My problem, though, is that I was looking for something easy to use that would work like:
\begin{mybeautifulbox}[options on colours, lines, etc]
my text here
\end{mybautifulbox}
The reason is, I am working with a coauthor that does not use latex, so we converge on scientific workplace. The beautiful fancybox you suggested have the problem that, because of the "node" environment, would show like a grey square in scientific workplace.... any idea to put something before the \begin{document} command that might do the trick, such as a new environment? I should add that after years of scientific word use I am pretty latex illiterate...
\begin{mybeautifulbox}[options on colours, lines, etc]
my text here
\end{mybautifulbox}
The reason is, I am working with a coauthor that does not use latex, so we converge on scientific workplace. The beautiful fancybox you suggested have the problem that, because of the "node" environment, would show like a grey square in scientific workplace.... any idea to put something before the \begin{document} command that might do the trick, such as a new environment? I should add that after years of scientific word use I am pretty latex illiterate...
beamer environments in non beamer documents
ok, I have been playing around with this, and finally managed to obtain the following (shamelessly plagiarising from http://syracuse-dev.org/mpst-globe/brow ... mp-geo.tex)
This works. However, I cannot put a title in. I tried with
but then it does not matter where I call for the argument, the most I manage to do is produce a box with a title consisting of the number 1. Any ideas on how I could solve this?
Many thanks
Code: Select all
\newsavebox{\dangerbox}
%\newsavebox{\titolo}
\newenvironment{Danger}{ \begin{lrbox}{\dangerbox}
\begin{minipage}{\linewidth}
}
{\end{minipage} \end{lrbox}
\tikzstyle{unabox} = [draw=blue!20, fill=red!20, very thick,
rectangle, rounded corners, inner sep=10pt]
\par
\begin{tikzpicture}
\node [unabox] (box) { \begin{minipage}[t!]{\linewidth}
\usebox{\dangerbox}
\end{minipage}
};
\node[titolobox, right=10pt] at (box.north west) {#1};
\end{tikzpicture}
\par
}
\begin{document}
\begin{Danger}
BLA BLA BLA
\end{Danger}
Code: Select all
\newenvironment{Danger}[1]{ etc etc}
Many thanks