diff --git a/README.md b/README.md index 8716c22..0ae3068 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,12 @@ -# publish -Collection of various templates, scripts, and dependencies for publishing. +# texdown +Latex, via Markdown+YAML using pandoc. + +## Setup +The `conda_install.sh` script creates a conda env using the `requirements.txt` file. + +## Usage +Copy/modify the `example.*` files as a template. + +The `render` script is an example of rendering to PDF. A couple of other useful pandoc args are in the comments at line 6. The IEEE style specification `ieee.csl` is supplied as an example of using pandoc's `--csl` command. + + diff --git a/texdown/conda_create.sh b/conda_create.sh similarity index 100% rename from texdown/conda_create.sh rename to conda_create.sh diff --git a/texdown/example.bibtex b/example.bibtex similarity index 100% rename from texdown/example.bibtex rename to example.bibtex diff --git a/texdown/example.md b/example.md similarity index 100% rename from texdown/example.md rename to example.md diff --git a/texdown/example.pdf b/example.pdf similarity index 100% rename from texdown/example.pdf rename to example.pdf diff --git a/texdown/figures/Arabidopsis_thaliana.jpg b/figures/Arabidopsis_thaliana.jpg similarity index 100% rename from texdown/figures/Arabidopsis_thaliana.jpg rename to figures/Arabidopsis_thaliana.jpg diff --git a/texdown/ieee.csl b/ieee.csl similarity index 100% rename from texdown/ieee.csl rename to ieee.csl diff --git a/jupyter/nbimages.sh b/jupyter/nbimages.sh deleted file mode 100755 index 3e91e13..0000000 --- a/jupyter/nbimages.sh +++ /dev/null @@ -1,33 +0,0 @@ -# Extract the images from a jupyter notebook, with nbconvert -#!/bin/bash -NOTEBOOK=$1 -NAME=`basename $NOTEBOOK .ipynb` - -NBTMPDIR=`mktemp -d` -TARGET_DIR=${2:-"${NAME}_figures"} -mkdir -p $TARGET_DIR - -jupyter nbconvert --to latex --output-dir=$NBTMPDIR --output='figure' "$NOTEBOOK" - -FILE_NUM=0 -FILES=`ls $NBTMPDIR/figure_files/* | sort -t '_' -k2,2n -k3,3n` -RSYNC_ARGS="-v -c" - -echo -echo "Renaming and copying images to: $TARGET_DIR" -echo - -for FILE in $FILES -do - FILE_NUM=$((FILE_NUM+1)) - SUFFIX="`echo $FILE | perl -pe 's|^.*\.(.*)$|$1|'`" - TARGET=$(printf '%s/figure_%02d.%s' "$TARGET_DIR" "$FILE_NUM" "$SUFFIX") - rsync $RSYNC_ARGS "$FILE" "$TARGET" - #echo "Copy: $FILE" - #echo "\t $TARGET" -done - -echo -echo "Removing tmpdir: $NBTMPDIR" -rm -r $NBTMPDIR -echo diff --git a/latex/basic_template.tex b/latex/basic_template.tex deleted file mode 100644 index 1f54208..0000000 --- a/latex/basic_template.tex +++ /dev/null @@ -1,93 +0,0 @@ -% Basic document 01 -\documentclass{article} - -\usepackage{geometry} -\geometry{ a4paper%, - % COMPACT - % margin=10mm, - % headheight=0mm, - % voffset=0mm, - % top=8mm, - % footskip=0mm, - % bottom=8mm -} - -\usepackage{graphicx} -\usepackage{placeins} -%\usepackage{subcaption} -%\usepackage{amsmath} -%%\usepackage[title]{appendix} -%%\usepackage{listings} -%%\usepackage{color} - -\title{} -\date{} -\author{name \\ - \small{\emph{email}} -} - - -\begin{document} -%\textbf{}\textit{ } -\maketitle - -\section{} \label{} -figure \ref{fig:} - -\end{document} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - % %%% SUBFIGURE %%% - % - % \begin{figure}[h!] - % \centering - % \begin{subfigure}[b]{0.4\linewidth} - % \includegraphics[width=\linewidth]{coffee.jpg} - % \caption{Coffee.} - % \end{subfigure} - % \begin{subfigure}[b]{0.4\linewidth} - % \includegraphics[width=\linewidth]{coffee.jpg} - % \caption{More coffee.} - % \end{subfigure} - % \caption{The same cup of coffee. Two times.} - % \label{fig:coffee} - % \end{figure} - - % \begin{figure}[h!] - % \centering - % \begin{minipage}{0.5\linewidth} - % \centering - % \includegraphics[width=\linewidth]{figures_files/figures_3_0.pdf} - % \caption{Histogram of Signal} - % \label{fig:randomSignalHist} - % \end{minipage}% - % \begin{minipage}{0.5\linewidth} - % \centering - % \includegraphics[width=\linewidth]{figures_files/figures_6_0.pdf} - % \caption{Periodogram PSD} - % \label{fig:periodogram} - % \end{minipage} - % \end{figure} - - - % \begin{figure}[!h] - % \centering - % \includegraphics[width=0.7\linewidth]{figures_files/figures_10_0.pdf} - % \caption{PSD Comparison} - % \label{fig:PSDcomparison} - % \end{figure} - - %\FloatBarrier - - - - % \begin{appendices} - % \section{Code} - % \emph{Note this code is actually Ocatve code, rather than Matlab, so maybe there are - % some small differences.} - - % \lstinputlisting[language=Octave]{matlabfile.m} - % \end{appendices} - - diff --git a/texdown/render.sh b/render.sh similarity index 100% rename from texdown/render.sh rename to render.sh diff --git a/texdown/requirements.txt b/requirements.txt similarity index 100% rename from texdown/requirements.txt rename to requirements.txt diff --git a/texdown/README.md b/texdown/README.md deleted file mode 100644 index a2dc4d7..0000000 --- a/texdown/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# texdown -Latex, via Markdown+YAML using pandoc.