# [ANN] LaTeXDatax.jl 3.0.0

I just finished a major rework of my LaTeXDatax package, and I realized I never announced it here when it first came out, so I’m taking the opportunity now.

## Introduction

LaTeXDatax is an accompanying package to the LaTeX package datax. It allows you to store named data from Julia (or MATLAB, Python) scripts in a file, and recall them in your LaTeX document, much like one would figures.

## Usage example

### Julia script:

using Unitful, LaTeXDatax
x = 3u"m"
v = 2u"m/s"
n = 5
@datax x v t=x/v n feeling="happy" filename:="data.tex"


### LaTeX file:

\documentclass{article}
\usepackage[dataxfile=data.tex]{datax}
\begin{document}
Moving \datax{x}, at a speed of \datax{v} takes \datax{t}.
I checked the math \datax{n} times. This result makes me \datax{feeling}.
\end{document}


### Generated data.tex:

% Generated by LaTeXDatax, will be overwritten
\pgfkeyssetvalue{/datax/x}{$3\;\mathrm{m}$}
\pgfkeyssetvalue{/datax/v}{$2\;\mathrm{m}\,\mathrm{s}^{-1}$}
\pgfkeyssetvalue{/datax/t}{$1.5\;\mathrm{s}$}
\pgfkeyssetvalue{/datax/n}{$5$}
\pgfkeyssetvalue{/datax/feeling}{happy}


### (approximation of) Resulting pdf:

Moving 3\;\mathrm{m}, at a speed of 2\;\mathrm{m}\,\mathrm{s}^{-1} takes 1.5\;\mathrm{s}. I checked the math 5 times. This result makes me happy.

## Returning users

With the update, the syntax has gotten a lot more robust and easier to maintain. It now uses Latexify.jl and UnitfulLatexify.jl for all the latexification, which is nice. Previous scripts will probably be broken, sorry.

Formatting options are now given once per macro call. If you want specific formatting for specific items, add them one call at a time with overwrite := false.

32 Likes