Skip to content

Commit

Permalink
Merge pull request #142 from mookerji/fix-latex
Browse files Browse the repository at this point in the history
Latex datasheet fixes.
  • Loading branch information
mookerji committed May 4, 2015
2 parents b95ec80 + 46de40a commit 16f8ef8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Binary file modified docs/sbp.pdf
Binary file not shown.
3 changes: 2 additions & 1 deletion generator/sbpg/targets/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,5 +295,6 @@ def render_source(output_dir, package_specs):
import subprocess
import os
os.chdir(output_dir)
subprocess.call(["pdflatex", "sbp_out.tex"])
subprocess.call(["pdflatex", "--enable-write18",
"-shell-escape", "sbp_out.tex"])
subprocess.call(["mv", "sbp_out.pdf", "../docs/sbp.pdf"])
17 changes: 8 additions & 9 deletions generator/sbpg/targets/resources/sbp_base.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
\usepackage{pbox}
\usepackage{soul}
\usepackage{hyperref}
\usepackage{ltxtable}
\usepackage{caption}

\hypersetup{bookmarks,bookmarksopen,bookmarksdepth=4}

Expand All @@ -31,13 +33,6 @@
\numberwithin{field}{subsection}

\renewcommand{\thesubsubsection}{\hspace{-0.45cm}}
%% \renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}}
%% \makeatletter
%% \def\@seccntformat#1{\csname #1ignore\expandafter\endcsname\csname the#1\endcsname\quad}
%% \let\sectionignore\@gobbletwo
%% \let\latex@numberline\numberline
%% \def\numberline#1{\if\relax#1\relax\else\latex@numberline{#1}\fi}
%% \makeatother

\newcommand{\specialcell}[2][c]{%
\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
Expand All @@ -59,10 +54,14 @@
\newcolumntype{c}{>{\hsize=.3\hsize}X}
\newcolumntype{d}{>{\hsize=.7\hsize}X}

% Shell out to git to get the most recent tag and pass it to the LateX
% job name. Hopefully this doesn't screw with things.
\immediate\write18{git describe --abbrev=0 --tags > \jobname.info }

\title{Swift Navigation Binary Protocol}
\version{0.33}
\version{\input{\jobname.info}}
\author{Swift Navigation}
\mysubtitle{Protocol Specification v\theversion}
\mysubtitle{Protocol Specification \theversion}
\date{\today}

\begin{document}
Expand Down
12 changes: 6 additions & 6 deletions generator/sbpg/targets/resources/sbp_messages_table.tex
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ \section{Message Types}
purposes only}. Many draft messages are implementation-defined, and
some collections, such as the acquisition package, are used for
internal development.
\end{large}
\begin{table}[h]
\centering
\end{large}\\

\begin{center}
\begin{tabularx}{\textwidth}{badcX}
\toprule
Package & Msg ID & Name & Size (bytes) & Description \\
Expand All @@ -39,9 +39,9 @@ \section{Message Types}
(((m.short_desc|removedir|escape_tex))) \\
((*- endfor *))
\bottomrule
\end{tabularx}
\caption{SBP message types}
\label{tab:messages}
\end{table}
\end{tabularx}
\captionof{table}{SBP message types}
\end{center}
((* endblock *))

0 comments on commit 16f8ef8

Please sign in to comment.