Managing People Macros
LAMD provides a system for managing people information and automatically generating the required macros using a Python script.
Setup
Install requirements:
pip install pyyaml
Save the macro generator script:
# In your LAMD root directory
wget https://raw.githubusercontent.com/lawrennd/lamd/main/scripts/create_people_macros.py
chmod +x create_people_macros.py
People Information File
Create a YAML file (people.yml
) with people information:
- name: Neil Lawrence
image: \diagramsDir/people/neil-lawrence.png
url: https://inverseprobability.com/
title: Neil Lawrence
- name: Carl Henrik Ek
image: \diagramsDir/people/carl-henrik-ek.png
url: https://carlhenrik.com
title: Carl Henrik Ek
Required fields:
name
: Person’s full nameimage
: Path to profile image
Optional fields:
url
: Personal webpagetitle
: Position or title
Generating Macros
Generate the macros file:
./create_people_macros.py -i people.yml -o talk-people.gpp
Include in your LAMD setup:
\include{talk-people.gpp}
Using the Macros
Basic usage:
\neillawrencePicture{15%}
Multiple people:
\centerdiv{
\neillawrencePicture{15%}
\carlhenrikekPicture{15%}
}
Best Practices
Image Management
Use consistent image sizes
Store images in
\diagramsDir/people/
Use clear file names
Macro Generation
Keep YAML file under version control
Re-run generator when adding people
Test macros after generation
Usage Guidelines
Use consistent sizing
Group related people
Include alt text
Consider mobile viewing
Troubleshooting
Common issues and solutions:
Image not displaying: Check path in YAML
Macro not found: Ensure generator was run
Sizing issues: Use percentage widths