Skip to content

Commit

Permalink
Usability improvements
Browse files Browse the repository at this point in the history
Add AASTeX<6 macros; more documentation.
  • Loading branch information
augustfly committed May 2, 2016
1 parent 0a4e5eb commit 43ec430
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
13 changes: 12 additions & 1 deletion figureset/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
Simple python3 tool to create figure set markup using a YAML configuration
file and CSV input translation table. Assumes each figure set caption is
similar to the others.


File | Explanation
:--- | :----------
`figset.tex` | AASTeX < 6 macros
| (add to .tex header)
`figure1set.tex` | Example Figure Set
`make_translation.sh` | table parsing script
`newfigureset.py` | python newfigureset.py translation.yaml
`translation.csv` | Example CSV input to translation.yaml
`translation.yaml` | Figure Set parameters
20 changes: 20 additions & 0 deletions figureset/figset.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
%% For manuscripts created with AASTeX < 6.0
%%
%% You can integrate this mark up directly into your ms.tex file
%% by placing the new commands below before your \begin{document}
%% command and everything that follows within the run of text
%% where you want the figure set to appear.

% FIGSET-MACROS-BEGIN
\newcommand{\noprint}[1]{}
\newcommand{\figsetstart}{{\bf Fig. Set} }
\newcommand{\figsetend}{}
\newcommand{\figsetgrpstart}{}
\newcommand{\figsetgrpend}{}
\newcommand{\figsetnum}[1]{{\bf #1.}}
\newcommand{\figsettitle}[1]{ {\bf #1} }
\newcommand{\figsetgrpnum}[1]{\noprint{#1}}
\newcommand{\figsetgrptitle}[1]{\noprint{#1}}
\newcommand{\figsetplot}[1]{\noprint{#1}}
\newcommand{\figsetgrpnote}[1]{\noprint{#1}}
% FIGSET-MACROS-END
11 changes: 8 additions & 3 deletions figureset/translation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# to assign multiple figure files to a single figure in the set, give them the
# same figure title, e.g., Ori32-5 above.
#
# the caption string below can be written to map attributes of each row in the
# csv file as string elements of the caption. Given the example above a caption
# string of
# the caption is built using a Python3 formatting string to map elements of
# each row of the csv file to caption variable attributes. Given the example
# above a caption string of
#
# caption: {1} is a Class {2} object and {3}
#
Expand All @@ -33,6 +33,11 @@
# LkHa823 is a Class III object and displays forbidden lines, Halpha in emission.
# Ori32-5 is a Class II object and is completely featureless.
#
# YAML/Python3 notes on caption strings:
# - "{" double escape {{ to pass through LaTeX commands
# - "\" pass through safely
# - YAML string paragraph formatting rules are in effect
#
fignum: 1
settitle: Young Stellar Object Scrapbook
translationfile: "translation.csv"
Expand Down

0 comments on commit 43ec430

Please sign in to comment.