From 43ec43052a95ebc6b259743e90c358675c73d1db Mon Sep 17 00:00:00 2001 From: August Muench Date: Mon, 2 May 2016 09:17:08 -0400 Subject: [PATCH] Usability improvements Add AASTeX<6 macros; more documentation. --- figureset/README.md | 13 ++++++++++++- figureset/figset.tex | 20 ++++++++++++++++++++ figureset/translation.yaml | 11 ++++++++--- 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 figureset/figset.tex diff --git a/figureset/README.md b/figureset/README.md index 139597f..2de7b6d 100644 --- a/figureset/README.md +++ b/figureset/README.md @@ -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 diff --git a/figureset/figset.tex b/figureset/figset.tex new file mode 100644 index 0000000..35ec12d --- /dev/null +++ b/figureset/figset.tex @@ -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 diff --git a/figureset/translation.yaml b/figureset/translation.yaml index 15aa576..c98f300 100644 --- a/figureset/translation.yaml +++ b/figureset/translation.yaml @@ -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} # @@ -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"