Code Monkey home page Code Monkey logo

sbabook's Introduction

SBAbook — A LaTeX class for technical books

This is a set of layout, typography, and markup definitions for LaTeX books based on the memoir document class. It is intended for use by Square Bracket Associates (SBA), and heavily customized in this direction — by this I mean it's made to setup specific semantic markup and typographic style, rather than to be flexible.

Donate

Usage (nearly there)

Here is the minimal preamble:

\documentclass{sbabook}
\setmainlanguage{english} % this is polyglossia, not babel
\begin{document}

...and off you go!

\end{document}

The class requires LuaLaTeX to load nice fonts; just use lualatex instead of pdflatex to compile.

Showcase

It looks nice, I promise! Check the manual / example file; a compiled version is attached to the latest release.

Install

Clone or otherwise download the contents of this repo, and put the files somewhere LaTeX can find them. Run kpsexpand '$TEXMFHOME' for a suggestion.

Requirements

You need a pretty up-to-date and complete LaTeX distribution, because the class requires LuaLaTeX and some associated packages to compile. Check the texlive*.deps files, or just get a full install of the latest TeXlive release and you should be good.

Fonts: the class uses Gentium Book Basic, Open Sans, and Fira mono. Those are now distributed as part of TeXlive.

On Linux distributions that maintain their own packaging instead of using the system provided by TeXlive, you will probably need to install several packages; e.g. on Ubuntu 15.04, since texlive-full doesn't seem to be a full install, you will additionally need:

  • texlive-luatex, for luaotfload.sty,
  • texlive-xetex, for xunicode.sty,
  • texlive-generic-extra, for tracklang.sty,
  • texlive-fonts-extra, for the Gentium fonts…

sbabook's People

Contributors

cdlm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sbabook's Issues

Reinstate acceptable support for A4

Most notably, the chapter headers are broken.

For the text block, a possibility is to keep the same text width as with US trade, and use the space for margin notes.

Add part introductory paragraph support

If I write

\part{Getting Started}

This part will show you how to get a simple Seaside application up and running in your favourite Smalltalk dialect in less than 15 minutes.

I would like the part title and introductory paragraph to be on the same page

Clarify / re-license as MIT

The CC BY-SA logo is here for convenience, because that's the license of books by @SquareBracketAssociates. The SBAbook class itself should be considered as software and licensed as such. Creative Commons discourage using their licenses for software, so MIT seems more appropriate.

Figure below footnotes

At the beginning of the Pillar chapter, the first figure appears below the footnote. Is that expected?

figure-below-footnotes

The LaTeX code is:

% -*- mode: latex; -*-
\ifx\wholebook\relax\else

    \documentclass[10pt,twoside,english]{root/support/latex/sbabook/sbabook}
  \usepackage{import}
  \subimport{root/support/latex/}{common.tex}

    \begin{document}
\fi



\chapter{Documenting and Presenting with Pillar}
\chapterprecis{Damien Cassou and Cyril Ferlicot Delbecque}

\label{cha:pillar}
This chapter describes Pillar version 2.
\section{Introduction}
\href{http://www.smalltalkhub.com/#!/~Pier/Pillar}{Pillar}\footnote{\url{http://www.smalltalkhub.com/\#!/~Pier/Pillar}} is a markup syntax and associated tools to write and generate documentation, books (such as this one) and slide-based presentations. The Pillar
screenshot below (see Figure \ref{voyageDocExample}) shows the HTML version of chapter \ref{cha:voyage}.


\begin{figure}

\begin{center}
\includegraphics[width=0.3\textwidth]{figures/voyageDocExample-small.png}\caption{An example Pillar output\label{voyageDocExample}}\end{center}
\end{figure}


Pillar has many features:

\begin{itemize}
\item simple markup syntax with references, tables, pictures, captions...);
\item export to HTML, LaTeX, Markdown, AsciiDoc and Pillar itself;
\item export presentations to Beamer and Deck.js;
\item customization of the export through a dedicated \href{http://smalltalkhub.com/#!/~SvenVanCaekenberghe/STON}{STON}\footnote{\url{http://smalltalkhub.com/\#!/~SvenVanCaekenberghe/STON}} configuration file;
\item support of templates using the \href{http://smalltalkhub.com/#!/~NorbertHartl/Mustache}{Mustache}\footnote{\url{http://smalltalkhub.com/\#!/~NorbertHartl/Mustache}} templating engine;
\item syntax-highlighting of generated code blocks (not yet in LaTeX);
\item configurable numbering of section titles and figures;
\item ...
\end{itemize}

Add option to highlight overfull hboxes

overcolored.sty seems to work fine but it has to be installed separately. The simpler option is simply to add \overfullrule=5mm, for the traditional black marks.

I'd also like to show the text block boudaries, to help decide if a particular overflow is acceptable or not.

using textcode within subsections does not work

pillar code like
!!! Using ==CMD-b== to browse
is transformed to latext
\subsection{Using \textcode{CMD-b} to browse}

but this can not be compiled, as long as \textcode is defined as
\let\textcode\texttt
whereas
\def\textcode{\texttt}
seems to work
(I don't know much about latex)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.