# Simple macros?

**URL:** <https://forum.obsidian.md/t/simple-macros/44009>\
**Category:** Help\
**Created:** [September 26, 2022, 5:20am UTC](https://forum.obsidian.md/t/simple-macros/44009 "2022-09-26T05:20:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnnn777](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/n/bb73d2/32.png) [@nnnn777](https://forum.obsidian.md/u/nnnn777)\
**Post date:** [September 26, 2022, 5:20am UTC](https://forum.obsidian.md/t/simple-macros/44009/1 "2022-09-26T05:20:51Z")

</div>

Does Obsidian support macros like Latex? For example, I want a simple macro that represents a relationship between two keyword terms. In Latex syntax I would do:

> \newcommand{\relation}[3]{[[#1]] (#2) [[#3]]}

So the input

> \relation{dog}{is a type of}{mammal}

should render as:

> [[dog]] (is a type of) [[mammal]]

Is there a way to do something similar in Obsidian?

---

<div class="post-metadata">

**Author:** ![I-d-as](https://forum.obsidian.md/user_avatar/forum.obsidian.md/i-d-as/32/59965_2.png) [@I-d-as](https://forum.obsidian.md/u/I-d-as)\
**Post date:** [September 26, 2022, 6:05am UTC](https://forum.obsidian.md/t/simple-macros/44009/2 "2022-09-26T06:05:37Z")

</div>

You could look into the community plugins. Browsing through them, I’m sure you will find a number of them that may help you. For example, Templater and QuickAdd have some pretty powerful functionality when you dig in.

Good luck!

---

<div class="post-metadata">

**Author:** ![dracozny](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/d/779978/32.png) [@dracozny](https://forum.obsidian.md/u/dracozny)\
**Post date:** [September 26, 2022, 2:16pm UTC](https://forum.obsidian.md/t/simple-macros/44009/3 "2022-09-26T14:16:50Z")

</div>

The long and short of it is there are two methods. One watches the keystrokes. the other watches files. I think in your case the keystroke approach may work well enough. I use Espanso to achieve similar results to do things such as autofill dates but you can go way further than that as well.

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [December 25, 2022, 2:17pm UTC](https://forum.obsidian.md/t/simple-macros/44009/4 "2022-12-25T14:17:11Z")

</div>

Closed on December 25, 2022, 2:17pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
