Skip to content

Instantly share code, notes, and snippets.

@colabug
Created January 21, 2015 17:00
Show Gist options
  • Save colabug/45a7242b2658c2b66bf6 to your computer and use it in GitHub Desktop.
Save colabug/45a7242b2658c2b66bf6 to your computer and use it in GitHub Desktop.
Menu, File, and Key Formatting in Softcover
cover
frontmatter:
maketitle
preface.md
\documentclass[14pt]{memoir} % Edit this line to change the documentclass.
% Add custom preamble content below.
\usepackage{menukeys}
\renewmenumacro{\directory}[/]{pathswithblackfolder}
\renewmenumacro{\keys}[+]{shadowedroundedkeys}

Preface

...

Conventions

I use several typesetting conventions in this book.1

Note: Used when calling out an important note or a caveat.

When interacting with the menu system to follow \menu{a>set>of>instructions} or interacting with a particular \menu{user interface element} you'll see this formatting.

If you are directed to a particular file, \directory{the/full/file/path} will be shown. If the full path has already been used in the same section, a shorthand will be used, e.g. \directory{path}.

When referencing ClassNames, functions(), XML attributes, or other code items inline, a special font is used.

A box with syntax highlighting is used for longer code segments.

public class CalculatorActivity extends ActionBarActivity
{
    @Override
    protected void onCreate( Bundle savedInstanceState )
    {
        super.onCreate( savedInstanceState );
        setContentView( R.layout.activity_calculator );
    }
}

Finally, key shortcuts are shown as: \keys{cmd + \Alt + \ctrl + \tab + \shift + \return + O}2

\newpage

Footnotes

  1. When adding context or referencing sources, I use footnotes.

  2. This key combination is for demonstration purposes only, do not attempt at home.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment