# Latexify functions with specific units Unitful

**URL:** <https://discourse.julialang.org/t/latexify-functions-with-specific-units-unitful/125284>\
**Category:** General Usage\
**Tags:** pluto-and-latex\
**Created:** [January 28, 2025, 12:06am UTC](https://discourse.julialang.org/t/latexify-functions-with-specific-units-unitful/125284 "2025-01-28T00:06:48Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Post date:** [January 29, 2025, 2:58pm UTC](https://discourse.julialang.org/t/latexify-functions-with-specific-units-unitful/125284/6 "2025-01-29T14:58:22Z")

</div>

> [@eduardovrs](#):
>
> remove the arguments when displaying.

It looks like you may have already found this since I use that exact `remove_arguments` function lol, but nonetheless my notebooks with similar goals are [here](https://github.com/nathanrboyer/KD232.jl) and [here](https://github.com/nathanrboyer/KM620.jl). You can wrap your `@latexrun` expressions in `remove_arguments` without affecting the underlying function definition. Then the function definitions displayed nicely in the notebook are all available by loading the package.

* * *

> [@eduardovrs](#):
>
> add the function a Label (i.e. this function is (D2-1)).

I’m just doing this with markdown headers currently.

* * *

> [@eduardovrs](#):
>
> function only accepts specific units.

I also just got an answer on how to dispatch on specific units here:

> [@Dispatch on specific Unitful unit](https://discourse.julialang.org/t/dispatch-on-specific-unitful-unit/124774):
>
> Continuing the discussion from [Unitful dispatch](https://discourse.julialang.org/t/unitful-dispatch/49480/9): I want to dispatch specifically on u"inch". What am I missing? In this MWE, I want mm(1), mm(1u"inch"), and mm(1.0u"inch") to all return 25.4 mm. using Unitful InchType = Quantity{ \<:Any, Unitful.𝐋, Unitful.FreeUnits{(Unitful.inch,), Unitful.𝐋, nothing}, } function mm(x::Real) x \* u"inch" |\> u"mm" |\> float end function mm(x::InchType) x |\> u"mm" |\> float end julia\> x = 1u"inch" 1 inch julia\> XType = typeof(x) Quantity{Int6…

* * *

Looks like we are all doing similar things! 😆

 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/b/6ba4cfcafd2b645acdbc9041b90ad6a56184f622.png)

---

_[View the full topic](https://discourse.julialang.org/t/latexify-functions-with-specific-units-unitful/125284)._
