# lauzhenyi/socsci-metro architecture

> Architecture diagram of the GitHub repository lauzhenyi/socsci-metro, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lauzhenyi/socsci-metro
- Repository: https://github.com/lauzhenyi/socsci-metro

## Overview

##### Project type and purpose
- This is an open-source LaTeX Beamer theme (“socsci-metro”) built on top of the Metropolis theme, tailored for social science presentations.
- It provides custom tcolorbox environments, navigation bar tweaks, typography adjustments, and slide numbering enhancements.

##### File structure
- Top level:
- socsci-metro.sty (the core theme file)
- README.md (documentation)
- LICENSE (MIT)
- preview/ (example screenshots)
- No “frontend” or “backend” directories—this is a library/plugin, not a service.
- Dependencies are implicit (Metropolis theme, LaTeX engine, tcolorbox package).

##### Key insights from README
- Provides user hooks for resetting counters.
- Preview folder shows output examples but isn’t loaded at compile time.

##### Main components and their relationships
a. User Document (​.tex​)
b. LaTeX Engine (pdfLaTeX / XeLaTeX / LuaLaTeX)
c. Base Beamer Class & Metropolis Theme
d. socsci-metro.sty (this package)
e. External Packages (e.g., tcolorbox, font packages)
f. Output (PDF slides)
g. preview/ (static examples for reference)

Flow:
1. User writes a .tex that calls `\usepackage{socsci-metro}`
2. LaTeX engine loads Beamer → Metropolis → socsci-metro.sty → tcolorbox, font settings
3. socsci-metro.sty overrides macros, defines new environments, adjusts navigation bar
4. LaTeX engine compiles slides → produces PDF
5. preview/ shows reference screenshots (not part of build pipeline)

##### Important architectural/design principles
- Layered extension: socsci-metro sits on top of Metropolis, which sits on top of Beamer.
- Plugin pattern: users include one .sty to add functionality.
- Minimal external footprint: no complex build scripts or code generators; pure LaTeX macro definitions.

a. Components:
- User .tex file (entry point)
- LaTeX Engine
- Beamer class
- Metropolis theme (external dependency)
- socsci-metro.sty
- tcolorbox & other LaTeX packages
- Generated PDF
- preview/ folder (documentation asset)
b. Relationships:
- Layered stack for theme inheritance (Beamer → Metropolis → socsci-metro)
- Side-links to external packages (tcolorbox)
c. Patterns & principles:
d. Technologies & libraries:
- pdfLaTeX/XeLaTeX
- LaTeX Beamer
- Metropolis (mtheme)
- tcolorbox
- Font packages (as referenced in .sty if any)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "User Layer"
        U["User .tex File"]:::user
    end

    subgraph "Build/Compile Process"
        LA["LaTeX Engine"]:::engine
        U -->|"calls \\usepackage{socsci-metro}"| LA
    end

    subgraph "Base Layers"
        B["Beamer Class"]:::base
        M["Metropolis Theme (mtheme)"]:::base
        LA --> B
        B --> M
    end

    subgraph "socsci-metro Layer"
        S["socsci-metro.sty"]:::theme
        M --> S
        LA --> S
    end

    subgraph "External Packages"
        T["tcolorbox Package"]:::ext
        F["Font Packages"]:::ext
        S --> T
        S --> F
    end

    subgraph "Output"
        P["Generated PDF Slides"]:::output
        LA --> P
    end

    subgraph "Documentation Assets"
        R["README.md"]:::doc
        L["LICENSE"]:::doc
        V["preview/"]:::doc
        X["placeholder.txt"]:::doc
    end

    %% Reference note
    Documentation_Notes-.->U

    click S "https://github.com/lauzhenyi/socsci-metro/blob/main/socsci-metro.sty"
    click R "https://github.com/lauzhenyi/socsci-metro/blob/main/README.md"
    click L "https://github.com/lauzhenyi/socsci-metro/tree/main/LICENSE"
    click V "https://github.com/lauzhenyi/socsci-metro/tree/main/preview/"
    click X "https://github.com/lauzhenyi/socsci-metro/blob/main/preview/placeholder.txt"

    classDef user fill:#AEDFF7,stroke:#0366d6,color:#0366d6
    classDef engine fill:#FFE4B3,stroke:#FF8C00,color:#FF8C00
    classDef base fill:#D6EAF8,stroke:#2E86C1,color:#2E86C1
    classDef theme fill:#E8DAEF,stroke:#8E44AD,color:#8E44AD
    classDef ext fill:#D5F5E3,stroke:#27AE60,color:#27AE60
    classDef output fill:#FADBD8,stroke:#C0392B,color:#C0392B
    classDef doc fill:#F2F3F4,stroke:#95A5A6,color:#95A5A6
```
