Graphics, Figures & Tablesusing bullets as labels defined by a macro

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
kent
Posts: 57
Joined: Thu Oct 20, 2016 3:41 pm

using bullets as labels defined by a macro

Post by kent »

I often use PGF to draw geometrical figures and I use to label important points using a macro to add bullets at certain points using their coordinates.
All fine, but I should very much be able to invoke my macro with a predefined list say plist by \mgredbullets[\plist], but I can't get it to work.
I have added a short to-the-point attachment with illustrative code.
\mgredbullets[A,B,C,D] works fine with defined points A, B, C and D, also
\mgredbullets[{A,B,C,D}] works fine as seen in the attachement.
Trying to define the list plist by \newcommand{\plist}{{A,B,C,D}} will make \mgredbullets[\plist] fail.
Anybody who can help?

Best regards,
Kent
Attachments
latexforumposting.tex
(1.92 KiB) Downloaded 161 times

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

using bullets as labels defined by a macro

Post by Stefan Kottwitz »

Hi Kent,

a quick fix would be expanding the argument before it's applied:

\expandafter\mgbluebullets\expandafter[\plist];

Stefan
LaTeX.org admin
Post Reply