Question

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.

Was it helpful?

Solution

I did ask a similar question a few weeks ago:

https://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 :)

OTHER TIPS

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.

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.

Related questions:

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}

Profr. Jim Hefferon has written a book on Linear Algebra using LaTeX. He shares the source code in the following site: http://joshua.smcvt.edu/linearalgebra/

The terms of use of the source code are the GNU Free Documentation License (http://www.gnu.org/copyleft/fdl.html)

Check out his code. I like the formatting of the book.

I am doing some notes on basic math, but to be honest, I think that the macros still need improvement. Check out the notes (all in spanish) at http://www.aprendematematicas.org.mx/notas.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top