Skip to content

Instantly share code, notes, and snippets.

@jrjhealey
Created June 19, 2019 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrjhealey/8fa512e33cdf85d4789c87fc4f782c5f to your computer and use it in GitHub Desktop.
Save jrjhealey/8fa512e33cdf85d4789c87fc4f782c5f to your computer and use it in GitHub Desktop.
A construct to enable, centered, cropped-to-fit content to be generated dynamically. Useful for equations/figures etc. This example uses TeXShade for sequence alignment.
\documentclass[a4paper, oneside, 11pt]{memoir} % Doc Setup
\usepackage[left=1cm, right=1cm, top=1cm, bottom=1cm]{geometry} % Doc Geometry
\usepackage{texshade}
\usepackage{lscape}
\usepackage[active, tightpage]{preview}
\begin{document}
\begin{landscape}
\begin{preview}
\begin{vplace}
\begin{texshade}{/path/to/input.aln}
\seqtype{P}
\alignment{center}
\setfont{numbering}{tt}{md}{sc}{small}
\setfont{names}{tt}{md}{up}{tiny}
\setfont{residues}{tt}{md}{sc}{tiny}
\setfont{ruler}{tt}{bf}{sc}{tiny}
\shadingmode[allmatchspecial]{similar}
\smallblockskip
\feature{top}{1}{25..25}{fill:$\downarrow$}{Hi, I'm an annotation}
\feature{bottom}{1}{70..76}{brace}{So am I!}
\end{texshade}
\end{vplace}
\end{preview}
\end{landscape}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment