# \[ANN\] LaTeXDatax.jl 3.0.0

**URL:** https://discourse.julialang.org/t/ann-latexdatax-jl-3-0-0/55675
**Category:** Package Announcements
**Tags:** package, announcement, latex
**Created:** [February 20, 2021, 1:31pm UTC](https://discourse.julialang.org/t/ann-latexdatax-jl-3-0-0/55675 "2021-02-20T13:31:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)
#### Post date: [February 20, 2021, 1:31pm UTC](https://discourse.julialang.org/t/ann-latexdatax-jl-3-0-0/55675/1 "2021-02-20T13:31:28Z")

</div>

I just finished a major rework of my [LaTeXDatax](https://github.com/Datax-package/LaTeXDatax.jl) 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](https://ctan.org/pkg/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:

```julia
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:

```tex
\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`:

```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`.
