TransWikia.com

Can I make an alias for a node argument in TikZ?

TeX - LaTeX Asked by Andra on September 4, 2021

When I am drawing illustrations with TikZ, the most common mistake I make is incorrectly writing the relative position of a node. I would for example write "left above" in stead of "above left". It is probably due to my native language where you would state "linksboven" when you indicate a position of an object.

Of course this is just a question of correcting and recompiling, but it remains a disturbing annoyance. Is it possible to make an alias for all those above|below left|right, so my document would simply compile when I write Dunglish TikZ?

One Answer

As JLDiaz and percusse where pointing out, you can define styles for TikZ by the means of tikzset. The principal mechanism is, that you can define a style and then set it content: tikzset{<my style>/.style={<content of my style>}}.

So what you can do in your example is tikzset{left above/.style={above left}} or tikzset{linksboven/.style={above left}}.

Be aware however that you should not overwrite existing styles in that way.

Answered by TobiBS on September 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP