# LAMD Best Practices ## Content Organization 1. File Structure ``` project/ ├── _common/ │ └── includes/ ├── _topic1/ │ └── includes/ └── lectures/ ``` 2. Naming Conventions - Use descriptive names - Follow consistent patterns - Include context in names 3. Version Control - Commit atomic changes - Write clear commit messages - Tag significant versions ## Writing Guidelines 1. Content Style ```markdown \ifndef{clearName} \define{clearName} \section{Clear Title} \notes{ Start with overview... Provide details... End with summary... } \endif ``` 2. Documentation - Comment complex macros - Explain non-obvious choices - Provide examples 3. Cross-References - Use consistent labels - Document dependencies - Maintain link validity ## Technical Considerations 1. Performance - Optimize large media - Minimize dependencies - Cache when possible 2. Compatibility - Test all output formats - Provide fallbacks - Consider accessibility 3. Maintenance - Regular updates - Deprecation notices - Migration guides ## Common Patterns 1. Content Structure ```markdown \ifndef{topic} \define{topic} \section{Topic} % Context-specific content \ifdef{SLIDES} \slides{...} \else \notes{...} \endif \endif ``` 2. Media Handling ```markdown \figure{\includediagram{name}{width}} {Clear caption}{fig:label} ``` 3. Code Blocks ```markdown \code{ # Clear, commented code result = process(data) } ``` ## Error Prevention 1. Common Mistakes - Missing \ifndef/\define - Incorrect nesting - Undefined references 2. Validation - Use lint tools - Automated testing - Format verification 3. Troubleshooting - Check build logs - Verify dependencies - Test in isolation