views:

466

answers:

5

Fully aware of the LaTeX features to define new environment allowing me to do about anything, I was wondering if there are Open Source packages that allows me to do book branding by predefining environments for examples, excursions, listings, question sections, etc. For example, have an example environment with a blue-ish background, sections with further details which can be skipped by the casual reader in yellow, etc.

Today, I have been playing a bit with the float package, and customized the .sty to have a environment with a blue background, but did not manage to tune the macro's such to have change the font style to sans-serif.

Now, this is just an example, but I figured that many people must have been doing this to give their book a somewhat more professional look. Are there LaTeX package around that allow me to focus on the content, instead spending time on LaTeX coding to make environments stand out from the main text?

Is there a document class that allows me to just do:

\documentclass{fancyeducationalbook}

\begin{document}

\begin[bgcolor=orange]{fancyExampleEnvironment}
   % showing up in the PDF with a orange background
\end{fancyExampleEnvironment}

\end{document}

It does not have to be perfect at all, but it does need to make various boxes stand out, and immediately be recognizable for first-year students as having some purpose (example, further reading, definition, etc); The key is that it makes the book look attractive.

I do not mind some hacking, but a good basis would be nice. Very much preferred, this base would be Open Source, so that I can reshare my customizations, if any needed.

Update: I'd welcome a system which supports multipage environments.

+3  A: 

I did ask a similar question a few weeks ago:

http://stackoverflow.com/questions/1783400/developing-ebooks-software

where a couple of responses mentioned some other tools and packages.

Obviously LaTeX has the book style and those sorts of things, but one must remember it's primarily a scientific document producing tool - which it's fantastic for, but for other tasks there are often tools more suited to the job:

Good luck, let us know what you find if you spot anything else - I'm still on the hunt for the 'ideal' tool :)

Mark Mayo
what does any of that have to do with the question asked?
Mica
He was asking on making the books attractive as the key. LaTeX is great for scientific documents, but not so much in the 'attractive' stakes. The above tools do try and focus more on creating more accessible, friendly books.
Mark Mayo
The use of LaTeX is key here... it is a science oriented book, and BibTeX is not going to go away for me.
Egon Willighagen
Fair enough, just thought I'd show some alternatives. Ah the memories of BibTeX...it's been a while for me. Although there are still other tools which could even parse BibTeX results and incorporate them, just a thought. I have nothing against LaTeX though - good luck with your hunt!
Mark Mayo
Mark, I did like your pointers. Thanx for those!
Egon Willighagen
+2  A: 

The usual recommendation for a more configurable long document class is memoir (read the extensive [manual PDF link).

Colored environment background and the like will probably have to be brought in with additional classes.

dmckee
A: 

Edit #2: you may want to check out http://www.math.harvard.edu/computing/latex/color.html, particularly the section about 2/3 of the way down called "Coloured box backgrounds"... also this link http://www.latex-community.org/forum/viewtopic.php?f=5&t=1441&start=0&st=0&sk=t&sd=a talks about the framed package which will color environment backgrounds, apparently.

Edit: Made it into its own command.

\documentclass[10pt]{article}
\usepackage{tikz}
\definecolor{shade}{HTML}{884763}   

\newcommand{\uglybg}[1]{%
\begin{tikzpicture}
\node [fill=shade,rounded corners=5pt]
{%
\begin{minipage}{1\textwidth}
#1
\end{minipage}
};%
\end{tikzpicture}
}

\begin{document}

\uglybg{some text here please}

\end{document}
Mica
This still does not define a dedicated environment... another issue is that is it not multipage (but that's something I was not clear about)...
Egon Willighagen
now you have a dedicated environment... as for multipage, it's not going to work as I used a minipage. minipages don't break over pages. sorry.
Mica
Ran across this thread and upvoted this entry from a -1. Can't figure out why it was downvoted at all, since the suggestion to use 'framed' package gets very close to what OP wanted, colored environment that can stretch across multiple pages. (In any case I'm against downvoting anybody who makes an honest effort to answer a question, but this post was much better than that.)
Herbert Sitz
LOL Thanks Herbert. The real problem is that the OP kept adding to his question after there had already been answers :P
Mica
+1  A: 

Take a look at context, a tex-based typesetting system which was designed for education publishing. It deals with page layout in a much more sophisticated manner than latex, and can give much more distinctive results.

I recommend not using anything fancy when writing the context: focus on the text and content-necessary graphics until the text is complete; get it edited and only then work through the typesetting. Trying to edit the document after it has been typeset is an invitation to redo work.

It is fairly painless to convert from latex to context. There's more work involved learning context than latex, but, well, you want good results?

Postscript: ConTeXt: An Excursion provides an introduction to the main document preparation features of context, and showcases its integration with metapost. The document has hyperlink navigation, which doesn't work with all pdf viewers.

Some of the documents on the TeX Showcase are prepared in context. There are some impressive latex examples there, too: you can get good results with latex, but it is, I think much harder work.

The contextgarden wiki has a list of official documentation, and From LaTeX to ConTeXt, the document migration advice. Migrating documents isn't hard, once you've got the hang of context.

Charles Stewart
Is there an overview of context environments, with graphics of what the output looks like? Perhaps a screenshot gallery?
Egon Willighagen
I've added some links to my answer. I have seen a nice PDF with some good examples, but I've forgotten where. It's probably from an old TUBboat, maybe I remember.
Charles Stewart