[dundee] Emacs and org-mode
Robert McWilliam
rmcw at allmail.net
Tue May 18 00:36:23 UTC 2010
On Mon, May 17, 2010 at 10:13:58PM +0100, Nistur wrote:
> Anyone? Ideas please?
If I'm understanding what you want correctly boxedminipage should do
what you want. A useful command for giving things widths is
\textwidth, you can multiply it by things as well so 0.5\textwidth
gives you a measurement that is half the width of the text.
A boxedminipage can be created something like:
% in the preamble (before \begin{document}):
\usepackage{boxedminipage}
% Where you want the "textbox":
\begin{boxedminipage}{0.9\textwidth}
Stuff to be in the textbox goes here.
\end{boxedminipage}
Alternatively if you were after a "textbox" with a different
background colour rather than a frame you could use \colorbox round a
minipage:
\colorbox{red}{
\begin{minipage}
Text goes here.
\end{minipage}
}
Or you could use a \colorbox around a boxedminipage to get a
background colour and a frame but on my system the colour extends
outside the outline which looks odd to me. That is probably fixable
with a bit of tweaking but maybe your time can be better spent on
other things if you have a looming deadline :)
If you want a more attractive textbox I'd do it with the tikz package
(mainly because I know how to from using it to draw diagrams, it's
almost certainly not the Right Way).
%preamble:
\usepackage{tikz}
\usetikzlibrary{shapes}
\tikzstyle{textbox} = [rectangle, draw=red, line width=0.1cm,
fill=blue!10, text width=\textwidth, rounded corners]
% Make the textbox:
\begin{tikzpicture}
\node [textbox] {
Content of the textbox goes here.
};
\end{tikzpicture}
You can wrap that in a \figure if you want it to float. The
\tikzstyle defines what the "textbox" will look like, I would think
fill line width and line colour (draw=) would be the only things you'd
want to play with but tikz can do complicated things with styles
(decorators might be worth having a look at for adding "flourishes" to
the textbox).
I created an example document with the three ways of doing it:
http://bodaegl.ormiret.com/foo/textbox.tex
and the pdf that generates:
http://bodaegl.ormiret.com/foo/textbox.pdf
Latex can be a bit more work to find the right packages and
environments etc. to make the things you need for the type of
documents you're writing, but once you've found them you get decent
documents with a lot less effort. Up here theses had to be in last
week and I spent a chunk of the week helping people try and figure out
weird things with word moving stuff around when they tried to print.
Robert
________________________________________________________________________
Robert McWilliam rmcw at allmail.net www.ormiret.com
You pilot always into an unknown future;
facts are your single clue.
Get the facts!
-- Robert A. Heinlein
More information about the dundee
mailing list