Graphics, Figures & TablesCustom Shapes

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Custom Shapes

Post by ghostanime2001 »

Is there a way to create your own custom shapes with custom anchors/nodes etc. or sort of like re-creating your own TikZ objects?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Custom Shapes

Post by localghost »

You'd have to take a look at the corresponding PGF/TikZ libraries and probably go down to the system or basic layer to program your own shapes. These layers are described in the PGF/TikZ manual.


Thorsten
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Custom Shapes

Post by Stefan Kottwitz »

Perhaps have a look at this rectangle TikZ shape example. The description is in German, a translator (pons.eu, google) could translate it for you. The main part is just code, so understandable.

Defining new shapes is pretty much work, as I see there. As Thorsten said, I would start with reading and copying parts of the pgf shapes libraries as the basis of my own shapes.

If you manage to define a new shape, I would be glad to see it. And if you have specific questions while working on it, let us know.

Stefan
LaTeX.org admin
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Custom Shapes

Post by ghostanime2001 »

Is it possible to create a shape with Adobe Illustrator CC, then customize the shape with anchor points? If so, how?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Custom Shapes

Post by localghost »

ghostanime2001 wrote:Is it possible to create a shape with Adobe Illustrator CC, then customize the shape with anchor points? […]
No. The possible approaches have already been pointed out in the former responses.
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Custom Shapes

Post by ghostanime2001 »

So the only way is to use TikZ to make shapes?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Custom Shapes

Post by localghost »

ghostanime2001 wrote:So the only way is to use TikZ to make shapes?
Please tell me, do you actually read what others write here? This question is clearly answered by former replies in this thread. m(
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Custom Shapes

Post by ghostanime2001 »

Maybe if it wasn't German.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Custom Shapes

Post by localghost »

ghostanime2001 wrote:Maybe if it wasn't German.
As far as I remember the PGF manual is entirely written in English. m(
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Custom Shapes

Post by ghostanime2001 »

Would latex 3 have better shape anchor integration ?
Post Reply