muscles its types classification, function and classification of skeletal muscles whole chapter from general anatomy book

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Searching Content

"5.1 " in /textbooks/9781626237186

Finding Sources
Reading File
I now have extensive, rich content from the THIEME General Anatomy book. Let me compile the full, comprehensive chapter response:

Muscles: Types, Classification, and Function

Source: General Anatomy and Musculoskeletal System - THIEME Atlas of Anatomy

1. Overview: Types of Muscle Tissue

The human body contains three fundamental types of muscle tissue, each with distinct structural and functional properties:
FeatureSkeletal MuscleCardiac MuscleSmooth Muscle
LocationAttached to skeletonHeart wallViscera, blood vessels
AppearanceStriatedStriatedNon-striated
ControlVoluntaryInvoluntaryInvoluntary
NucleiMultiple, peripheralSingle, centralSingle, central
SpeedFastIntermediateSlow
FatigueYes (phasic)NoNo

2. Skeletal Muscle Classification

2A. By Fiber Type (Metabolic & Functional Classification)

All striated skeletal muscles consist of two primary muscle fiber types - Type I and Type II - which differ in their metabolic, physiological, histochemical, and biochemical characteristics. Type II fibers are further subdivided into Type IIA and Type IIB based on the weight of isoforms in their myosin chains.
Since both Type I and Type II fibers respond to a single action potential with a single twitch (all-or-none response), they are also called twitch fibers. In contrast, tonic fibers (found only in muscle spindles and external eye muscles) gradually depolarize, causing gradual fiber shortening.

Type I Fibers - Slow-Twitch (ST) Fibers

These are the fibers of postural muscles (red muscles):
  • Phylogenetically older
  • Twitch duration ~100 ms (slower)
  • Function best in endurance activity
  • Fatigue slowly
  • Large motor units (several thousand fibers)
  • Rich in myoglobin (red color)
  • Abundant mitochondria
  • Energy derived from oxidative (aerobic) metabolism
  • Little glycogen (PAS-negative)
  • Relatively highly vascularized
  • Prone to shortening (increased resting tonus) - require regular stretching
  • Examples: Intercostal muscles, masticatory muscles, trapezius muscle

Type II Fibers - Fast-Twitch (FT) Fibers

These are the fibers of muscles of movement (white muscles):
  • Phylogenetically more recent
  • Twitch duration ~30 ms (faster)
  • Brief periods of intense activity
  • Fatigue more rapidly
  • Small motor units (<100 fibers)
  • Scant myoglobin (white/pale color)
  • Few mitochondria
  • Energy derived mainly from anaerobic glycolysis
  • Abundant glycogen (PAS-positive)
  • Much smaller capillary supply
  • Prone to atrophy - require regular strengthening
  • Examples: Gastrocnemius muscle, tibialis anterior muscle
Clinical Note: The basic distribution of Type I vs. Type II fibers is genetically determined. However, skeletal muscle is highly adaptable - neuro-muscular activity (exercise) can influence the distribution. Endurance athletes (long-distance runners, cyclists, rowers) have predominantly Type I fibers; explosive athletes (sprinters, weight lifters) have predominantly Type II fibers. This is known as the phenotypic plasticity of muscle (Pette and Saron, 2001).

2B. By Architecture - Pennate vs. Non-Pennate Muscles

Skeletal muscles are also classified by the arrangement of their fibers relative to their tendons:

Non-Pennate (Parallel-Fibered) Muscles

  • Muscle fibers run parallel to the long axis of the muscle and tendon
  • Greater force production (direct force transmission from muscle to tendon - no pennation angle)
  • Physiological cross-section = anatomic cross-section
  • Larger range of shortening (excursion)

Pennate Muscles

Muscle fibers run obliquely to the tendon, like the barbs of a feather (penna = feather). Types include:
  • Unipennate - fibers angle from one side of the tendon
  • Bipennate - fibers angle from both sides
  • Multipennate - multiple angles of insertion
Properties of pennate muscles:
  • Due to the pennation angle, maximum fiber shortening (lifting height) is greater than actual fiber shortening during muscle activity (= path gain)
  • The physiological cross-section is larger than the anatomic cross-section - more muscle fibers can insert into a tendon in a given cross-section, increasing force development (lifting height)
  • Greater force development despite lesser raw force production per fiber
  • Smaller size for similar power output compared to non-pennate muscles
Note from THIEME Atlas: "If there were only non-pennate muscles, the body, in a lot of places, would not have space for a sufficient number of strong muscles."

3. Structure of Skeletal Muscle (Histological Organization)

Skeletal muscle is organized in a hierarchical system of connective tissue sheaths (Section 5.3):

Connective Tissue Sheaths

LayerWhat It SurroundsFunction
EndomysiumIndividual muscle fibers (cells); condenses 200-250 fibers into primary bundlesTensile strength; carries capillaries (300-400/mm²) and motor end plates
PerimysiumNumerous primary bundles → secondary bundles (visible to naked eye as "meat fibers")Transmission of tensile force to tendons
EpimysiumEntire muscle (loose connective tissue beneath the muscle fascia)Connects to the muscle fascia

The Muscle Fiber (Cell)

  • Skeletal muscle fibers are exceptionally large cells
  • Average diameter: ~60 μm (range 10-100 μm)
  • Length: up to 20 cm
  • Dominant structures: myofibrils, mitochondria, L-system (sarcoplasmic reticulum/longitudinal tubules), and T-system (transverse tubules)
The L-system (longitudinal system) is a cavity system (sarcoplasmic reticulum) arranged lengthwise to the myofibrils - it stores calcium ions, which are released upon excitation to trigger contraction.
The T-system (transverse system) consists of tubules running perpendicular to the myofibrils and conducts action potentials from the cell surface deep into the fiber.

4. Muscle Fasciae

Muscle fasciae are composed of tough collagenous connective tissue coursing in weblike strands forming a lattice structure. This lattice structure:
  • Allows the connective tissue to bear loads in any direction
  • Maintains the shape and position of muscles
  • Permits adjacent muscles/muscle groups to glide past each other with relatively little friction (less friction = less loss of force)
Current anatomic nomenclature identifies fasciae as a continuous three-dimensional network investing the body and extending into its innermost structures. They play an important role in supporting the musculoskeletal system.

5. Muscle Function Principles

5A. Postural vs. Phasic (Movement) Function

  • Postural muscles (Type I dominant): maintain body position against gravity; active continuously; resist fatigue
  • Phasic/movement muscles (Type II dominant): produce rapid, powerful movements; activate in bursts; fatigue quickly

5B. Lever Mechanics

Muscle force transmission to joints follows the principles of levers:
  • One-arm lever: Muscular force and load act on the same side of the center of joint rotation (e.g., elbow joint - biceps brachii)
  • Two-arm lever: Muscular force acts on one side of the joint center while body weight acts on the other side (e.g., hip joint)
The torque = Force × Force arm (must equal Load × Load arm for the joint to be at rest)

5C. Synergists and Antagonists

  • Agonist (prime mover): Primary muscle producing a movement
  • Synergist: Assists the agonist, stabilizes joints during movement
  • Antagonist: Opposes the action of the agonist; provides controlled, smooth movement by eccentric contraction
  • Fixators/Stabilizers: Contract isometrically to stabilize proximal segments during distal movement

6. Motor Units

A motor unit = one motor neuron + all the muscle fibers it innervates. Key points:
  • All fibers within a motor unit are the same fiber type (Type I or II)
  • Large motor units (thousands of fibers) → found in Type I (slow) fiber muscles (postural)
  • Small motor units (<100 fibers) → found in Type II (fast) fiber muscles (fine/rapid movement)
  • The fiber type is determined by its innervating neuron

7. Origin and Insertion / Tendons

Tendon Types

TypeStressStructure
Traction tendonsTensile stress (pulling)Strong connective tissue with parallel fibers; well vascularized
Pressure tendonsCompressive stressChange direction around bone; fibrocartilage on compressed side (acts as fulcrum); avascular in compressed area

Tendon Insertions

  • Periosteal diaphyseal insertion: Tendon inserts directly into periosteum; transitions through zones of collagen fibers, fibrocartilage, mineralized fibrocartilage, and bone (Sharpey's fibers)
  • Chondral apophyseal insertion: Cartilage cells in the non-mineralized fibrocartilage zone act like taut springs - the principle of stretch protection - resisting transverse shortening during contraction

Summary Classification Table

Classification BasisTypes
ControlVoluntary (skeletal) / Involuntary (cardiac, smooth)
HistologyStriated / Non-striated
Fiber typeType I (slow-twitch, oxidative) / Type IIA (fast, oxidative-glycolytic) / Type IIB (fast, glycolytic)
Functional rolePostural (red) / Phasic/movement (white)
ArchitectureNon-pennate (parallel) / Pennate (uni-, bi-, multipennate)
ActionAgonist / Antagonist / Synergist / Fixator
Lever typeOne-arm lever / Two-arm lever

Source: General Anatomy and Musculoskeletal System, THIEME Atlas of Anatomy (ISBN 9781626237186), Sections 5.1-5.3, pp. 76-81

Create a study guide PDF covering muscle classification and fiber types

Reading File
Running Command

ls -la /home/daytona/workspace/ && mkdir -p /home/daytona/workspace/muscle-study-guide

Writing File

~/muscle-study-guide/generate_study_guide.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, PageBreak, KeepTogether
)
from reportlab.platypus.flowables import HRFlowable
from reportlab.graphics.shapes import Drawing, Rect, String, Line, Polygon, Circle
from reportlab.graphics.charts.barcharts import VerticalBarChart
from reportlab.graphics import renderPDF
from reportlab.pdfbase import pdfmetrics

import os

OUTPUT_PATH = "/home/daytona/workspace/muscle-study-guide/Muscle_Classification_Study_Guide.pdf"

# ── Color Palette ──────────────────────────────────────────────────────────────
DARK_NAVY    = colors.HexColor("#1A2E4A")
MID_BLUE     = colors.HexColor("#2C5F8A")
ACCENT_BLUE  = colors.HexColor("#3B82C4")
LIGHT_BLUE   = colors.HexColor("#D6E8F5")
RED_TYPE1    = colors.HexColor("#C0392B")
ORANGE_TYPE2 = colors.HexColor("#D35400")
GREEN_ACCT   = colors.HexColor("#1E8449")
LIGHT_GREEN  = colors.HexColor("#D5F5E3")
LIGHT_RED    = colors.HexColor("#FADBD8")
LIGHT_ORANGE = colors.HexColor("#FDEBD0")
YELLOW_HL    = colors.HexColor("#FFF3CD")
GOLD         = colors.HexColor("#F39C12")
GRAY_LIGHT   = colors.HexColor("#F2F3F4")
GRAY_MID     = colors.HexColor("#BDC3C7")
GRAY_DARK    = colors.HexColor("#7F8C8D")
WHITE        = colors.white

# ── Styles ─────────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()

def make_style(name, parent='Normal', **kwargs):
    return ParagraphStyle(name, parent=styles[parent], **kwargs)

COVER_TITLE = make_style('CoverTitle',
    fontSize=34, leading=42, textColor=WHITE,
    fontName='Helvetica-Bold', alignment=TA_CENTER, spaceAfter=8)

COVER_SUB = make_style('CoverSub',
    fontSize=16, leading=22, textColor=colors.HexColor("#D6E8F5"),
    fontName='Helvetica', alignment=TA_CENTER, spaceAfter=6)

COVER_CAPTION = make_style('CoverCaption',
    fontSize=11, leading=15, textColor=GRAY_MID,
    fontName='Helvetica', alignment=TA_CENTER)

CH_TITLE = make_style('ChTitle',
    fontSize=22, leading=28, textColor=WHITE,
    fontName='Helvetica-Bold', alignment=TA_LEFT, spaceAfter=4)

SECTION_HEAD = make_style('SectionHead',
    fontSize=14, leading=18, textColor=DARK_NAVY,
    fontName='Helvetica-Bold', spaceBefore=14, spaceAfter=6)

SUBHEAD = make_style('Subhead',
    fontSize=12, leading=16, textColor=MID_BLUE,
    fontName='Helvetica-Bold', spaceBefore=10, spaceAfter=4)

BODY = make_style('Body',
    fontSize=10, leading=15, textColor=colors.HexColor("#2C3E50"),
    fontName='Helvetica', spaceAfter=4, alignment=TA_JUSTIFY)

BODY_BOLD = make_style('BodyBold',
    fontSize=10, leading=14, textColor=DARK_NAVY,
    fontName='Helvetica-Bold', spaceAfter=2)

BULLET = make_style('Bullet',
    fontSize=10, leading=14, textColor=colors.HexColor("#2C3E50"),
    fontName='Helvetica', leftIndent=18, spaceAfter=3,
    bulletIndent=6, bulletFontName='Helvetica')

NOTE_STYLE = make_style('NoteStyle',
    fontSize=9.5, leading=14, textColor=colors.HexColor("#5D4037"),
    fontName='Helvetica-Oblique', leftIndent=10, rightIndent=10,
    spaceAfter=4)

SMALL = make_style('Small',
    fontSize=8.5, leading=12, textColor=GRAY_DARK,
    fontName='Helvetica', alignment=TA_CENTER)

TABLE_HEADER = make_style('TableHeader',
    fontSize=9.5, leading=13, textColor=WHITE,
    fontName='Helvetica-Bold', alignment=TA_CENTER)

TABLE_CELL = make_style('TableCell',
    fontSize=9, leading=13, textColor=DARK_NAVY,
    fontName='Helvetica', alignment=TA_LEFT)

TABLE_CELL_C = make_style('TableCellC',
    fontSize=9, leading=13, textColor=DARK_NAVY,
    fontName='Helvetica', alignment=TA_CENTER)

# ── Helpers ────────────────────────────────────────────────────────────────────

def chapter_banner(title, subtitle="", color=DARK_NAVY):
    d = Drawing(500, 52)
    d.add(Rect(0, 0, 500, 52, fillColor=color, strokeColor=None))
    d.add(String(14, 30, title, fontSize=18, fontName='Helvetica-Bold',
                 fillColor=colors.white))
    if subtitle:
        d.add(String(14, 12, subtitle, fontSize=10, fontName='Helvetica',
                     fillColor=colors.HexColor("#D6E8F5")))
    return d

def section_rule():
    return HRFlowable(width="100%", thickness=1.5, color=ACCENT_BLUE,
                      spaceAfter=6, spaceBefore=4)

def info_box(title, body_paras, bg=LIGHT_BLUE, border=ACCENT_BLUE):
    inner = [[Paragraph(f"<b>{title}</b>", SUBHEAD)] + body_paras]
    t = Table(inner, colWidths=[470])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), bg),
        ('BOX',        (0,0), (-1,-1), 1.5, border),
        ('TOPPADDING', (0,0), (-1,-1), 8),
        ('BOTTOMPADDING',(0,0),(-1,-1), 8),
        ('LEFTPADDING', (0,0), (-1,-1), 12),
        ('RIGHTPADDING',(0,0), (-1,-1), 12),
    ]))
    return t

def key_point_box(text, color=YELLOW_HL, border=GOLD):
    t = Table([[Paragraph(f"⚑  {text}", NOTE_STYLE)]], colWidths=[470])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0),(-1,-1), color),
        ('BOX',        (0,0),(-1,-1), 1.2, border),
        ('TOPPADDING', (0,0),(-1,-1), 7),
        ('BOTTOMPADDING',(0,0),(-1,-1), 7),
        ('LEFTPADDING', (0,0),(-1,-1), 10),
        ('RIGHTPADDING',(0,0),(-1,-1), 10),
    ]))
    return t

def two_col_table(headers, rows, col_widths=None, header_color=DARK_NAVY):
    if col_widths is None:
        col_widths = [235, 235]
    data = [[Paragraph(h, TABLE_HEADER) for h in headers]]
    for row in rows:
        data.append([Paragraph(str(c), TABLE_CELL) for c in row])
    t = Table(data, colWidths=col_widths)
    n = len(rows)
    ts = [
        ('BACKGROUND', (0,0), (-1,0), header_color),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, GRAY_LIGHT]),
        ('GRID', (0,0), (-1,-1), 0.5, GRAY_MID),
        ('TOPPADDING', (0,0), (-1,-1), 6),
        ('BOTTOMPADDING',(0,0),(-1,-1), 6),
        ('LEFTPADDING', (0,0), (-1,-1), 8),
        ('RIGHTPADDING',(0,0),(-1,-1), 8),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ]
    t.setStyle(TableStyle(ts))
    return t

def multi_col_table(headers, rows, col_widths, header_color=DARK_NAVY):
    data = [[Paragraph(h, TABLE_HEADER) for h in headers]]
    for row in rows:
        data.append([Paragraph(str(c), TABLE_CELL_C) for c in row])
    t = Table(data, colWidths=col_widths)
    ts = [
        ('BACKGROUND', (0,0), (-1,0), header_color),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, GRAY_LIGHT]),
        ('GRID', (0,0), (-1,-1), 0.5, GRAY_MID),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING',(0,0),(-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('RIGHTPADDING',(0,0),(-1,-1), 6),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
        ('ALIGN', (0,0), (-1,-1), 'CENTER'),
    ]
    t.setStyle(TableStyle(ts))
    return t

# ── Fiber Type Comparison Diagram ─────────────────────────────────────────────

def fiber_type_diagram():
    d = Drawing(470, 200)
    # Background
    d.add(Rect(0, 0, 470, 200, fillColor=GRAY_LIGHT, strokeColor=None))

    # Type I column
    d.add(Rect(10, 10, 215, 180, fillColor=LIGHT_RED, strokeColor=RED_TYPE1, strokeWidth=2))
    d.add(String(20, 175, "TYPE I — Slow-Twitch (ST)", fontSize=11,
                 fontName='Helvetica-Bold', fillColor=RED_TYPE1))
    d.add(String(20, 158, "Postural / Red Muscles", fontSize=9,
                 fontName='Helvetica-Oblique', fillColor=colors.HexColor("#922B21")))

    items_1 = [
        "Twitch: ~100 ms (slow)",
        "Motor units: Large",
        "Myoglobin: Rich (red)",
        "Mitochondria: Abundant",
        "Metabolism: Aerobic (oxidative)",
        "Glycogen: Low (PAS–)",
        "Fatigue: Resistant",
        "Prone to: Shortening",
        "Athletes: Endurance (runners)",
    ]
    for i, item in enumerate(items_1):
        d.add(String(26, 142 - i*14, f"• {item}", fontSize=8.5,
                     fontName='Helvetica', fillColor=DARK_NAVY))

    # Type II column
    d.add(Rect(245, 10, 215, 180, fillColor=LIGHT_ORANGE, strokeColor=ORANGE_TYPE2, strokeWidth=2))
    d.add(String(255, 175, "TYPE II — Fast-Twitch (FT)", fontSize=11,
                 fontName='Helvetica-Bold', fillColor=ORANGE_TYPE2))
    d.add(String(255, 158, "Phasic / White Muscles", fontSize=9,
                 fontName='Helvetica-Oblique', fillColor=colors.HexColor("#A04000")))

    items_2 = [
        "Twitch: ~30 ms (fast)",
        "Motor units: Small (<100)",
        "Myoglobin: Scant (pale)",
        "Mitochondria: Few",
        "Metabolism: Anaerobic (glycolytic)",
        "Glycogen: Abundant (PAS+)",
        "Fatigue: Rapid",
        "Prone to: Atrophy",
        "Athletes: Explosive (sprinters)",
    ]
    for i, item in enumerate(items_2):
        d.add(String(261, 142 - i*14, f"• {item}", fontSize=8.5,
                     fontName='Helvetica', fillColor=DARK_NAVY))

    return d


# ── Pennate vs Non-pennate Diagram ─────────────────────────────────────────────

def pennate_diagram():
    d = Drawing(470, 130)
    d.add(Rect(0, 0, 470, 130, fillColor=GRAY_LIGHT, strokeColor=None))

    # --- Non-pennate ---
    d.add(Rect(10, 10, 135, 110, fillColor=LIGHT_BLUE, strokeColor=ACCENT_BLUE, strokeWidth=1.5))
    d.add(String(18, 108, "Non-Pennate", fontSize=10, fontName='Helvetica-Bold', fillColor=DARK_NAVY))
    d.add(String(18, 95, "(Parallel Fibered)", fontSize=8, fontName='Helvetica-Oblique', fillColor=MID_BLUE))
    # Draw parallel lines (fibers)
    for y in [80, 68, 56, 44, 32]:
        d.add(Line(25, y, 130, y, strokeColor=MID_BLUE, strokeWidth=2))
    # tendon at right
    d.add(Rect(128, 48, 8, 24, fillColor=DARK_NAVY, strokeColor=None))

    # --- Unipennate ---
    d.add(Rect(158, 10, 90, 110, fillColor=LIGHT_GREEN, strokeColor=GREEN_ACCT, strokeWidth=1.5))
    d.add(String(164, 108, "Unipennate", fontSize=9, fontName='Helvetica-Bold', fillColor=DARK_NAVY))
    # Tendon line
    d.add(Line(230, 25, 230, 105, strokeColor=DARK_NAVY, strokeWidth=3))
    for y in [90, 75, 60, 45, 30]:
        d.add(Line(168, y, 228, y+8, strokeColor=GREEN_ACCT, strokeWidth=2))

    # --- Bipennate ---
    d.add(Rect(260, 10, 90, 110, fillColor=LIGHT_GREEN, strokeColor=GREEN_ACCT, strokeWidth=1.5))
    d.add(String(266, 108, "Bipennate", fontSize=9, fontName='Helvetica-Bold', fillColor=DARK_NAVY))
    d.add(Line(305, 20, 305, 105, strokeColor=DARK_NAVY, strokeWidth=3))
    for y in [88, 74, 60, 46, 32]:
        d.add(Line(268, y, 303, y+8, strokeColor=GREEN_ACCT, strokeWidth=2))
        d.add(Line(342, y, 307, y+8, strokeColor=GREEN_ACCT, strokeWidth=2))

    # --- Multipennate ---
    d.add(Rect(362, 10, 98, 110, fillColor=LIGHT_GREEN, strokeColor=GREEN_ACCT, strokeWidth=1.5))
    d.add(String(368, 108, "Multipennate", fontSize=9, fontName='Helvetica-Bold', fillColor=DARK_NAVY))
    d.add(Line(380, 20, 380, 105, strokeColor=DARK_NAVY, strokeWidth=3))
    d.add(Line(420, 20, 420, 105, strokeColor=DARK_NAVY, strokeWidth=3))
    for y in [88, 72, 56, 40]:
        d.add(Line(366, y, 378, y+8, strokeColor=GREEN_ACCT, strokeWidth=2))
        d.add(Line(395, y, 382, y+8, strokeColor=GREEN_ACCT, strokeWidth=2))
        d.add(Line(395, y, 418, y+8, strokeColor=GREEN_ACCT, strokeWidth=2))
        d.add(Line(450, y, 422, y+8, strokeColor=GREEN_ACCT, strokeWidth=2))

    return d


# ── Connective Tissue Hierarchy Diagram ────────────────────────────────────────

def connective_tissue_diagram():
    d = Drawing(470, 90)
    d.add(Rect(0, 0, 470, 90, fillColor=GRAY_LIGHT, strokeColor=None))

    levels = [
        ("Epimysium", DARK_NAVY, 20, 62, 80),
        ("Perimysium", MID_BLUE, 120, 62, 80),
        ("Endomysium", ACCENT_BLUE, 220, 62, 80),
        ("Muscle Fiber", colors.HexColor("#E74C3C"), 320, 62, 80),
        ("Myofibril", colors.HexColor("#8E44AD"), 420, 62, 40),
    ]
    sub = [
        "Whole muscle",
        "Bundles",
        "200–250 fibers",
        "Single cell\n~60 µm dia",
        "Actin &\nMyosin",
    ]

    for i, (label, col, x, y, w) in enumerate(levels):
        d.add(Rect(x - w//2, y - 14, w, 28, fillColor=col, strokeColor=WHITE, strokeWidth=1))
        d.add(String(x - w//2 + 4, y - 2, label, fontSize=8,
                     fontName='Helvetica-Bold', fillColor=WHITE))
        d.add(String(x - w//2 + 2, 18, sub[i], fontSize=7.5,
                     fontName='Helvetica', fillColor=GRAY_DARK))
        if i < len(levels) - 1:
            nx = levels[i+1][2] - levels[i+1][4]//2
            d.add(Line(x + w//2, y, nx, y, strokeColor=GRAY_DARK,
                       strokeWidth=1.5, strokeDashArray=[3,2]))

    return d


# ── Motor Unit Diagram ─────────────────────────────────────────────────────────

def motor_unit_diagram():
    d = Drawing(470, 100)
    d.add(Rect(0, 0, 470, 100, fillColor=GRAY_LIGHT, strokeColor=None))

    # Type I motor unit (large)
    d.add(Rect(10, 10, 210, 80, fillColor=LIGHT_RED, strokeColor=RED_TYPE1, strokeWidth=1.5))
    d.add(String(18, 78, "TYPE I Motor Unit", fontSize=10,
                 fontName='Helvetica-Bold', fillColor=RED_TYPE1))
    d.add(String(18, 64, "Large (thousands of fibers)", fontSize=8.5,
                 fontName='Helvetica', fillColor=DARK_NAVY))
    d.add(String(18, 50, "Innervated by: Large alpha-MN", fontSize=8.5,
                 fontName='Helvetica', fillColor=DARK_NAVY))
    d.add(String(18, 36, "Force: Sustained / low force", fontSize=8.5,
                 fontName='Helvetica', fillColor=DARK_NAVY))
    d.add(String(18, 22, "Function: Posture & endurance", fontSize=8.5,
                 fontName='Helvetica', fillColor=DARK_NAVY))

    # Type II motor unit (small)
    d.add(Rect(250, 10, 210, 80, fillColor=LIGHT_ORANGE, strokeColor=ORANGE_TYPE2, strokeWidth=1.5))
    d.add(String(258, 78, "TYPE II Motor Unit", fontSize=10,
                 fontName='Helvetica-Bold', fillColor=ORANGE_TYPE2))
    d.add(String(258, 64, "Small (<100 fibers)", fontSize=8.5,
                 fontName='Helvetica', fillColor=DARK_NAVY))
    d.add(String(258, 50, "Innervated by: Small alpha-MN", fontSize=8.5,
                 fontName='Helvetica', fillColor=DARK_NAVY))
    d.add(String(258, 36, "Force: Brief / high force", fontSize=8.5,
                 fontName='Helvetica', fillColor=DARK_NAVY))
    d.add(String(258, 22, "Function: Power & speed", fontSize=8.5,
                 fontName='Helvetica', fillColor=DARK_NAVY))

    return d


# ── Cover Page ─────────────────────────────────────────────────────────────────

def build_cover():
    d = Drawing(595 - 72, 842 - 72)   # A4 minus margins
    d.add(Rect(0, 0, 523, 770, fillColor=DARK_NAVY, strokeColor=None))
    # Accent stripe
    d.add(Rect(0, 0, 523, 8, fillColor=GOLD, strokeColor=None))
    d.add(Rect(0, 762, 523, 8, fillColor=GOLD, strokeColor=None))
    # Decorative circles
    d.add(Circle(430, 680, 70, fillColor=MID_BLUE, strokeColor=None))
    d.add(Circle(80,  100, 50, fillColor=MID_BLUE, strokeColor=None))
    d.add(Circle(460, 100, 30, fillColor=ACCENT_BLUE, strokeColor=None))
    # Icon strip
    for x, lbl, col in [(120,'TYPE I', RED_TYPE1), (250,'TYPE II', ORANGE_TYPE2), (380,'MUSCLE', GREEN_ACCT)]:
        d.add(Rect(x-50, 380, 100, 55, fillColor=col, strokeColor=WHITE, strokeWidth=1.5))
        d.add(String(x-40, 402, lbl, fontSize=13, fontName='Helvetica-Bold', fillColor=WHITE))
    return d


# ── Build Document ─────────────────────────────────────────────────────────────

def build():
    doc = SimpleDocTemplate(
        OUTPUT_PATH,
        pagesize=A4,
        leftMargin=2.5*cm, rightMargin=2.5*cm,
        topMargin=2.2*cm, bottomMargin=2.2*cm,
        title="Muscle Classification & Fiber Types — Study Guide",
        author="Orris Medical Education",
        subject="General Anatomy"
    )

    story = []

    # ─── COVER ────────────────────────────────────────────────────────────────
    cover_bg = build_cover()
    story.append(cover_bg)
    story.append(Spacer(1, 2.5*cm))
    story.append(Paragraph("MUSCLE CLASSIFICATION", COVER_TITLE))
    story.append(Paragraph("&amp; FIBER TYPES", COVER_TITLE))
    story.append(Spacer(1, 0.6*cm))
    story.append(Paragraph("A Complete Study Guide for Medical Students", COVER_SUB))
    story.append(Spacer(1, 1.2*cm))
    story.append(Paragraph("General Anatomy | Musculoskeletal System", COVER_CAPTION))
    story.append(Paragraph("Based on THIEME Atlas of Anatomy — General Anatomy &amp; Musculoskeletal System", COVER_CAPTION))
    story.append(PageBreak())

    # ─── TABLE OF CONTENTS ────────────────────────────────────────────────────
    story.append(chapter_banner("TABLE OF CONTENTS", "Quick navigation guide"))
    story.append(Spacer(1, 0.4*cm))

    toc_data = [
        ["Section", "Topic", "Page"],
        ["1", "Overview: Three Types of Muscle Tissue", "3"],
        ["2", "Skeletal Muscle — General Classification", "3"],
        ["3", "Fiber Type Classification (Type I vs II)", "4"],
        ["4", "Type IIA vs IIB Subtypes", "5"],
        ["5", "Architectural Classification: Pennate vs Non-Pennate", "6"],
        ["6", "Histological Structure of Skeletal Muscle", "7"],
        ["7", "Motor Units", "8"],
        ["8", "Muscle Fasciae", "9"],
        ["9", "Functional Classification (Agonist/Antagonist etc.)", "9"],
        ["10", "Tendons: Types and Insertions", "10"],
        ["11", "Master Summary Table", "11"],
        ["12", "Quick-Recall Flashcard Points", "12"],
    ]
    toc_t = Table(toc_data, colWidths=[50, 300, 50])
    toc_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), DARK_NAVY),
        ('TEXTCOLOR', (0,0), (-1,0), WHITE),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,0), 10),
        ('FONTNAME', (0,1), (-1,-1), 'Helvetica'),
        ('FONTSIZE', (0,1), (-1,-1), 10),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, GRAY_LIGHT]),
        ('GRID', (0,0), (-1,-1), 0.5, GRAY_MID),
        ('ALIGN', (0,0), (-1,-1), 'LEFT'),
        ('ALIGN', (2,0), (2,-1), 'CENTER'),
        ('TOPPADDING', (0,0), (-1,-1), 6),
        ('BOTTOMPADDING',(0,0),(-1,-1), 6),
        ('LEFTPADDING', (0,0), (-1,-1), 10),
    ]))
    story.append(toc_t)
    story.append(PageBreak())

    # ─── SECTION 1: THREE TYPES ───────────────────────────────────────────────
    story.append(chapter_banner("Section 1 — Overview: Three Types of Muscle", color=DARK_NAVY))
    story.append(Spacer(1, 0.3*cm))
    story.append(Paragraph("The human body contains three fundamental types of muscle tissue:", BODY))
    story.append(Spacer(1, 0.2*cm))

    three_types = multi_col_table(
        ["Feature", "Skeletal Muscle", "Cardiac Muscle", "Smooth Muscle"],
        [
            ["Location", "Attached to skeleton", "Heart wall", "Viscera, blood vessels"],
            ["Appearance", "Striated", "Striated", "Non-striated"],
            ["Control", "Voluntary", "Involuntary", "Involuntary"],
            ["Nuclei", "Multiple, peripheral", "Single, central", "Single, central"],
            ["Speed", "Fast", "Intermediate", "Slow"],
            ["Fatigue", "Yes (phasic)", "No (self-sustaining)", "No"],
            ["Special feature", "Motor end plate", "Intercalated discs", "Gap junctions"],
        ],
        col_widths=[90, 110, 110, 110],
        header_color=MID_BLUE,
    )
    story.append(three_types)
    story.append(Spacer(1, 0.3*cm))

    # ─── SECTION 2 ────────────────────────────────────────────────────────────
    story.append(section_rule())
    story.append(Paragraph("Section 2 — Skeletal Muscle: General Classification", SECTION_HEAD))
    story.append(Paragraph(
        "Skeletal muscle can be classified on multiple axes: fiber type (metabolic), architecture "
        "(pennation), functional role (agonist/antagonist), and lever type. The most clinically "
        "relevant is the <b>fiber type classification</b>.", BODY))
    story.append(Spacer(1, 0.25*cm))

    story.append(info_box("Why Classification Matters", [
        Paragraph("Understanding fiber type composition helps predict which muscles are prone to "
                  "<b>shortening vs. atrophy</b>, guides rehabilitation strategies, and explains why "
                  "different athletes develop different muscle profiles.", BODY),
    ]))
    story.append(PageBreak())

    # ─── SECTION 3: FIBER TYPES ───────────────────────────────────────────────
    story.append(chapter_banner("Section 3 — Fiber Type Classification", "Type I vs. Type II",
                                color=colors.HexColor("#7B241C")))
    story.append(Spacer(1, 0.3*cm))
    story.append(Paragraph(
        "All striated skeletal muscles consist of two primary fiber types. Since both respond to a "
        "single action potential with a single twitch (all-or-none response), they are called "
        "<b>twitch fibers</b>. In contrast, <b>tonic fibers</b> (found only in muscle spindles "
        "and external eye muscles) gradually depolarize, causing gradual fiber shortening.",
        BODY))
    story.append(Spacer(1, 0.3*cm))

    story.append(fiber_type_diagram())
    story.append(Spacer(1, 0.3*cm))

    story.append(Paragraph("Detailed Comparison Table", SUBHEAD))
    fiber_table = multi_col_table(
        ["Property", "Type I (ST)", "Type II (FT)"],
        [
            ["Twitch speed", "Slow (~100 ms)", "Fast (~30 ms)"],
            ["Myoglobin content", "High (red/dark)", "Low (pale/white)"],
            ["Mitochondria", "Abundant", "Few"],
            ["Primary metabolism", "Oxidative (aerobic)", "Glycolytic (anaerobic)"],
            ["Glycogen content", "Low (PAS-negative)", "High (PAS-positive)"],
            ["Capillary density", "High", "Low"],
            ["Motor unit size", "Large (1000s fibers)", "Small (<100 fibers)"],
            ["Fatigue resistance", "High (slow to fatigue)", "Low (fatigues quickly)"],
            ["Contraction force", "Lower per unit", "Higher per unit"],
            ["Primary function", "Sustained posture", "Rapid, powerful movement"],
            ["Plasticity", "Can convert to Type II with disuse", "Can convert to Type I with endurance training"],
        ],
        col_widths=[165, 155, 150],
        header_color=colors.HexColor("#7B241C"),
    )
    story.append(fiber_table)
    story.append(Spacer(1, 0.3*cm))

    story.append(key_point_box(
        "Key point: The basic distribution of Type I vs II fibers is GENETICALLY determined. "
        "However, skeletal muscle has phenotypic plasticity — neuro-muscular activity can shift the "
        "distribution. Endurance training ↑ Type I; explosive/resistance training ↑ Type II "
        "(Pette & Saron, 2001)."
    ))
    story.append(PageBreak())

    # ─── SECTION 4: TYPE IIA vs IIB ───────────────────────────────────────────
    story.append(chapter_banner("Section 4 — Type II Subtypes: IIA vs. IIB", color=ORANGE_TYPE2))
    story.append(Spacer(1, 0.3*cm))
    story.append(Paragraph(
        "Type II fibers are further subdivided based on the <b>weight of isoforms in their "
        "myosin heavy chains</b>:", BODY))
    story.append(Spacer(1, 0.2*cm))

    subtypes = multi_col_table(
        ["Property", "Type IIA", "Type IIB"],
        [
            ["Also called", "Fast oxidative-glycolytic (FOG)", "Fast glycolytic (FG)"],
            ["Myosin isoform", "IIa heavy chain", "IIb heavy chain"],
            ["Metabolism", "Oxidative + glycolytic (both)", "Mainly anaerobic glycolytic"],
            ["Mitochondria", "Moderate", "Few"],
            ["Fatigue", "Intermediate", "Fatigues fastest"],
            ["Force", "High", "Highest"],
            ["Speed", "Fast", "Fastest"],
            ["Typical use", "Prolonged high-intensity work", "Brief maximal efforts"],
            ["Examples", "Middle-distance running muscles", "Sprinting, jumping muscles"],
        ],
        col_widths=[130, 170, 170],
        header_color=ORANGE_TYPE2,
    )
    story.append(subtypes)
    story.append(Spacer(1, 0.3*cm))

    story.append(info_box("Fiber Type Distribution in Common Muscles", [
        Paragraph("• <b>Soleus:</b> ~80% Type I — classic postural muscle, sustains standing", BODY),
        Paragraph("• <b>Gastrocnemius:</b> ~50% Type II — generates force for jumping/sprinting", BODY),
        Paragraph("• <b>Deltoid:</b> ~60% Type I — holds arm up continuously", BODY),
        Paragraph("• <b>Biceps brachii:</b> ~50% mixed — both sustained & rapid elbow flexion", BODY),
        Paragraph("• <b>External eye muscles:</b> Tonic fibers (unique — gradual depolarization)", BODY),
    ], bg=LIGHT_ORANGE, border=ORANGE_TYPE2))
    story.append(PageBreak())

    # ─── SECTION 5: PENNATE ───────────────────────────────────────────────────
    story.append(chapter_banner("Section 5 — Architectural Classification: Pennate vs. Non-Pennate",
                                color=GREEN_ACCT))
    story.append(Spacer(1, 0.3*cm))
    story.append(Paragraph(
        "Skeletal muscles are classified by the <b>arrangement of fibers relative to their tendon</b>. "
        "This determines the trade-off between <i>force production</i> vs. <i>force development "
        "(lifting height)</i>.", BODY))
    story.append(Spacer(1, 0.3*cm))
    story.append(pennate_diagram())
    story.append(Spacer(1, 0.3*cm))

    penn_table = multi_col_table(
        ["Type", "Fiber Arrangement", "Physiological XS", "Advantage", "Examples"],
        [
            ["Non-pennate\n(parallel)", "Parallel to long axis of tendon",
             "= Anatomic XS", "Greater force production;\nlarger range of motion",
             "Sartorius, rectus abdominis"],
            ["Unipennate", "Fibers angle from ONE side of tendon",
             "> Anatomic XS", "More fibers per unit volume;\ngreater force development",
             "Flexor pollicis longus"],
            ["Bipennate", "Fibers angle from BOTH sides of tendon",
             ">> Anatomic XS", "Even more fibers; greater lifting height",
             "Rectus femoris, flexor digitorum longus"],
            ["Multipennate", "Multiple pennation angles; complex tendon",
             ">>> Anatomic XS", "Maximum fibers; maximum force in small space",
             "Deltoid, tibialis posterior"],
        ],
        col_widths=[75, 100, 75, 110, 110],
        header_color=GREEN_ACCT,
    )
    story.append(penn_table)
    story.append(Spacer(1, 0.3*cm))

    story.append(key_point_box(
        "In NON-pennate muscles: force production is greater (direct fiber-to-tendon axis). "
        "In PENNATE muscles: force development is greater (more fibers per cross-section, "
        "greater lifting height). Pennation allows the body to pack more powerful muscles "
        "into confined anatomical spaces — a critical evolutionary advantage."
    ))
    story.append(PageBreak())

    # ─── SECTION 6: HISTOLOGY ─────────────────────────────────────────────────
    story.append(chapter_banner("Section 6 — Histological Structure of Skeletal Muscle",
                                color=ACCENT_BLUE))
    story.append(Spacer(1, 0.3*cm))
    story.append(Paragraph(
        "Skeletal muscle has a hierarchical organization of muscle fibers and connective tissue "
        "sheaths that work together to transmit force efficiently.", BODY))
    story.append(Spacer(1, 0.3*cm))

    story.append(Paragraph("Connective Tissue Hierarchy", SUBHEAD))
    story.append(connective_tissue_diagram())
    story.append(Spacer(1, 0.2*cm))

    ct_table = multi_col_table(
        ["Layer", "What It Surrounds", "Thickness", "Function"],
        [
            ["Endomysium", "Individual muscle fibers;\n200–250 fibers → 1° bundles",
             "Thinnest", "Tensile strength; houses capillaries (300–400/mm²)\n& motor end plates"],
            ["Perimysium", "Primary bundles → secondary bundles\n(visible to naked eye = 'meat fibers')",
             "Intermediate", "Transmits tensile force to tendons"],
            ["Epimysium", "Entire muscle (beneath muscle fascia)",
             "Loose CT", "Connects muscle to fascial system;\npermits gliding"],
        ],
        col_widths=[80, 130, 80, 180],
        header_color=ACCENT_BLUE,
    )
    story.append(ct_table)
    story.append(Spacer(1, 0.3*cm))

    story.append(Paragraph("The Muscle Fiber (Cell)", SUBHEAD))
    story.append(Paragraph(
        "Skeletal muscle fibers are among the largest cells in the body:", BODY))
    fiber_stats = [
        [Paragraph("<b>Average diameter:</b>", BODY_BOLD),
         Paragraph("~60 µm (range: 10–100 µm)", BODY)],
        [Paragraph("<b>Length:</b>", BODY_BOLD),
         Paragraph("Up to 20 cm", BODY)],
        [Paragraph("<b>Nuclei:</b>", BODY_BOLD),
         Paragraph("Multiple, peripheral (subsarcolemmal)", BODY)],
        [Paragraph("<b>Dominant structures:</b>", BODY_BOLD),
         Paragraph("Myofibrils, mitochondria, L-system (sarcoplasmic reticulum), T-system (transverse tubules)", BODY)],
        [Paragraph("<b>L-system:</b>", BODY_BOLD),
         Paragraph("Longitudinal tubules — stores Ca²⁺, releases it on excitation to trigger contraction", BODY)],
        [Paragraph("<b>T-system:</b>", BODY_BOLD),
         Paragraph("Transverse tubules — conducts action potentials from sarcolemma to interior of fiber", BODY)],
    ]
    fs_t = Table(fiber_stats, colWidths=[150, 320])
    fs_t.setStyle(TableStyle([
        ('ROWBACKGROUNDS', (0,0), (-1,-1), [WHITE, GRAY_LIGHT]),
        ('GRID', (0,0), (-1,-1), 0.4, GRAY_MID),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 8),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ]))
    story.append(fs_t)
    story.append(PageBreak())

    # ─── SECTION 7: MOTOR UNITS ───────────────────────────────────────────────
    story.append(chapter_banner("Section 7 — Motor Units", color=MID_BLUE))
    story.append(Spacer(1, 0.3*cm))
    story.append(Paragraph(
        "A <b>motor unit</b> = one alpha motor neuron + ALL the muscle fibers it innervates. "
        "All fibers within a motor unit are of the <b>same fiber type</b> (determined by the "
        "innervating neuron).", BODY))
    story.append(Spacer(1, 0.3*cm))
    story.append(motor_unit_diagram())
    story.append(Spacer(1, 0.3*cm))

    story.append(key_point_box(
        "Size Principle (Henneman, 1965): Motor units are recruited from smallest to largest. "
        "Type I (small, low-force) units are recruited first; Type II (large, high-force) units "
        "are added as force demand increases. This ensures metabolic efficiency."
    ))
    story.append(Spacer(1, 0.3*cm))

    mu_table = multi_col_table(
        ["Feature", "Type I Motor Unit", "Type II Motor Unit"],
        [
            ["Motor neuron size", "Small (slow-conducting)", "Large (fast-conducting)"],
            ["Number of fibers", "Hundreds to thousands", "< 100"],
            ["Force per unit", "Low", "High"],
            ["Recruitment order", "First (low effort)", "Last (high effort)"],
            ["Fatigue", "Resistant", "Rapid"],
        ],
        col_widths=[150, 160, 160],
        header_color=MID_BLUE,
    )
    story.append(mu_table)
    story.append(PageBreak())

    # ─── SECTION 8: FASCIAE ───────────────────────────────────────────────────
    story.append(chapter_banner("Section 8 — Muscle Fasciae", color=DARK_NAVY))
    story.append(Spacer(1, 0.3*cm))
    story.append(Paragraph(
        "Muscle fasciae are sheets of tough collagenous connective tissue forming a continuous "
        "three-dimensional network throughout the body.", BODY))
    story.append(Spacer(1, 0.2*cm))

    fascia_rows = [
        ["Structure", "Collagenous connective tissue in a weblike lattice pattern"],
        ["Lattice advantage", "Bears loads in ANY direction (not only along fiber axis)"],
        ["Function 1", "Maintains shape and position of muscles"],
        ["Function 2", "Permits adjacent muscles/groups to glide past each other with minimal friction"],
        ["Function 3", "Reduces force loss through friction between muscle groups"],
        ["Clinical relevance", "Compartment syndrome — fasciae can limit swelling and create dangerous pressure"],
        ["Modern concept", "Fasciae = continuous 3D network investing ALL body structures, supporting the entire musculoskeletal system"],
    ]
    f_t = Table(fascia_rows, colWidths=[140, 330])
    f_t.setStyle(TableStyle([
        ('ROWBACKGROUNDS', (0,0), (-1,-1), [LIGHT_BLUE, WHITE]),
        ('GRID', (0,0), (-1,-1), 0.4, GRAY_MID),
        ('FONTNAME', (0,0), (0,-1), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,-1), 9.5),
        ('TOPPADDING', (0,0), (-1,-1), 6),
        ('BOTTOMPADDING', (0,0), (-1,-1), 6),
        ('LEFTPADDING', (0,0), (-1,-1), 8),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ]))
    story.append(f_t)
    story.append(PageBreak())

    # ─── SECTION 9: FUNCTIONAL CLASSIFICATION ────────────────────────────────
    story.append(chapter_banner("Section 9 — Functional Classification", color=MID_BLUE))
    story.append(Spacer(1, 0.3*cm))
    story.append(Paragraph(
        "Muscles can be classified by their <b>functional role</b> during a movement:", BODY))
    story.append(Spacer(1, 0.2*cm))

    func_data = multi_col_table(
        ["Role", "Definition", "Contraction Type", "Example"],
        [
            ["Agonist\n(Prime mover)", "Primary muscle generating the movement",
             "Concentric (shortening)", "Biceps brachii in elbow flexion"],
            ["Antagonist", "Opposes the agonist; controls and smooths movement",
             "Eccentric (lengthening)", "Triceps brachii during elbow flexion"],
            ["Synergist", "Assists agonist; fine-tunes movement; stabilizes joints",
             "Varies", "Brachioradialis assists biceps in forearm flexion"],
            ["Fixator\n(Stabilizer)", "Contracts isometrically to stabilize proximal segment",
             "Isometric", "Rotator cuff stabilizes glenohumeral joint during arm abduction"],
        ],
        col_widths=[80, 130, 110, 150],
        header_color=MID_BLUE,
    )
    story.append(func_data)
    story.append(Spacer(1, 0.3*cm))

    story.append(Paragraph("Lever Mechanics", SUBHEAD))
    story.append(Paragraph(
        "Muscle force transmission follows lever principles. The <b>torque</b> = Force × Force arm.", BODY))
    lever_table = multi_col_table(
        ["Lever Class", "Description", "Example in Body"],
        [
            ["One-arm lever", "Muscle force and load act on the SAME side of the joint axis",
             "Elbow joint (biceps and load both act distal to joint)"],
            ["Two-arm lever", "Muscle force and body weight act on OPPOSITE sides of joint axis",
             "Hip joint in single-leg stance"],
        ],
        col_widths=[100, 185, 185],
        header_color=MID_BLUE,
    )
    story.append(lever_table)
    story.append(PageBreak())

    # ─── SECTION 10: TENDONS ─────────────────────────────────────────────────
    story.append(chapter_banner("Section 10 — Tendons: Types and Insertions", color=DARK_NAVY))
    story.append(Spacer(1, 0.3*cm))

    tendon_table = multi_col_table(
        ["Type", "Stress Borne", "Structure", "Vascularization", "Example"],
        [
            ["Traction tendon", "Tensile (pulling)", "Strong parallel collagen fibers",
             "Well vascularized", "Achilles tendon"],
            ["Pressure tendon", "Compressive (pressure)", "Fibrocartilage at bone contact;\nchanges direction around bone",
             "Avascular at compressed area", "Flexor tendons at pulleys"],
        ],
        col_widths=[80, 75, 120, 100, 95],
        header_color=DARK_NAVY,
    )
    story.append(tendon_table)
    story.append(Spacer(1, 0.3*cm))

    story.append(Paragraph("Tendon Insertion Types", SUBHEAD))
    ins_table = multi_col_table(
        ["Insertion Type", "Structure at Bone Interface", "Principle"],
        [
            ["Periosteal diaphyseal", "Collagen fibers → fibrocartilage → mineralized\nfibrocartilage → bone (Sharpey's fibers)",
             "Gradual force dissipation across 4 transitional zones"],
            ["Chondral apophyseal", "Non-mineralized fibrocartilage layer with cartilage cells",
             "Stretch protection: cartilage cells act like springs,\nresisting transverse shortening during contraction"],
        ],
        col_widths=[110, 200, 160],
        header_color=DARK_NAVY,
    )
    story.append(ins_table)
    story.append(PageBreak())

    # ─── SECTION 11: MASTER TABLE ─────────────────────────────────────────────
    story.append(chapter_banner("Section 11 — Master Summary Classification Table", color=colors.HexColor("#4A235A")))
    story.append(Spacer(1, 0.3*cm))

    master = multi_col_table(
        ["Classification Basis", "Categories"],
        [
            ["Control", "Voluntary (skeletal) | Involuntary (cardiac, smooth)"],
            ["Histology", "Striated (skeletal, cardiac) | Non-striated (smooth)"],
            ["Fiber type", "Type I (slow, oxidative) | Type IIA (fast, mixed) | Type IIB (fast, glycolytic)"],
            ["Functional role", "Postural (red) | Phasic/movement (white)"],
            ["Architecture", "Non-pennate (parallel) | Unipennate | Bipennate | Multipennate"],
            ["Action", "Agonist | Antagonist | Synergist | Fixator"],
            ["Lever type", "One-arm lever | Two-arm lever"],
            ["Tendon type", "Traction | Pressure"],
            ["Insertion type", "Periosteal diaphyseal | Chondral apophyseal"],
            ["Motor unit size", "Large (Type I) | Small (Type II)"],
        ],
        col_widths=[180, 290],
        header_color=colors.HexColor("#4A235A"),
    )
    story.append(master)
    story.append(PageBreak())

    # ─── SECTION 12: FLASHCARDS ───────────────────────────────────────────────
    story.append(chapter_banner("Section 12 — Quick-Recall Flashcard Points", color=colors.HexColor("#7D6608")))
    story.append(Spacer(1, 0.3*cm))

    flashcards = [
        ("Q: What is a twitch fiber?",
         "A fiber that responds to a single action potential with a single twitch (all-or-none). Both Type I and II are twitch fibers."),
        ("Q: What is a tonic fiber?",
         "A fiber that gradually depolarizes, causing gradual shortening. Found ONLY in muscle spindles and external eye muscles."),
        ("Q: Which fiber type is PAS-positive?",
         "Type II (fast-twitch) — rich in glycogen; stains positive with Periodic Acid-Schiff."),
        ("Q: Which fiber type fatigues rapidly?",
         "Type II (fast-twitch) — relies on anaerobic glycolysis, which depletes quickly."),
        ("Q: What determines fiber type within a motor unit?",
         "The innervating motor neuron determines the fiber type of all fibers in that motor unit."),
        ("Q: In which athletes do Type I fibers predominate?",
         "Endurance athletes — long-distance runners, cyclists, rowers, cross-country skiers."),
        ("Q: What is the advantage of pennate muscle architecture?",
         "More fibers per physiological cross-section → greater force development and lifting height in a smaller anatomical space."),
        ("Q: What is the 'principle of stretch protection' in tendon insertions?",
         "In chondral apophyseal insertions, cartilage cells in the non-mineralized fibrocartilage zone act like springs, resisting transverse shortening during muscle contraction."),
        ("Q: Name the 3 connective tissue sheaths of skeletal muscle (deep to superficial)",
         "Endomysium → Perimysium → Epimysium"),
        ("Q: What is physiological cross-section?",
         "The cross-section through ALL muscle fibers perpendicular to their long axis. In pennate muscles, this exceeds the anatomic cross-section, allowing more force development."),
        ("Q: What happens to Type I fibers if a muscle is not stretched regularly?",
         "They are prone to SHORTENING (increased resting tonus). Regular stretching is required."),
        ("Q: What happens to Type II fibers with disuse?",
         "They are prone to ATROPHY. Regular strengthening exercises are required."),
    ]

    for i, (q, a) in enumerate(flashcards):
        bg = LIGHT_BLUE if i % 2 == 0 else LIGHT_GREEN
        border = ACCENT_BLUE if i % 2 == 0 else GREEN_ACCT
        card_data = [
            [Paragraph(q, BODY_BOLD)],
            [Paragraph(a, BODY)],
        ]
        card_t = Table(card_data, colWidths=[470])
        card_t.setStyle(TableStyle([
            ('BACKGROUND', (0,0), (-1,0), bg),
            ('BACKGROUND', (0,1), (-1,1), WHITE),
            ('BOX', (0,0), (-1,-1), 1.2, border),
            ('LINEBELOW', (0,0), (-1,0), 0.8, border),
            ('TOPPADDING', (0,0), (-1,-1), 6),
            ('BOTTOMPADDING', (0,0), (-1,-1), 6),
            ('LEFTPADDING', (0,0), (-1,-1), 10),
            ('RIGHTPADDING', (0,0), (-1,-1), 10),
        ]))
        story.append(card_t)
        story.append(Spacer(1, 0.15*cm))

    # ─── FOOTER PAGE ──────────────────────────────────────────────────────────
    story.append(PageBreak())
    story.append(Spacer(1, 3*cm))
    story.append(Paragraph("References & Source", SECTION_HEAD))
    story.append(section_rule())
    story.append(Paragraph(
        "Primary source: <b>General Anatomy and Musculoskeletal System</b>, "
        "THIEME Atlas of Anatomy (ISBN 978-1-62623-718-6), Sections 5.1–5.3, pp. 76–81.",
        BODY))
    story.append(Paragraph(
        "Pette D, Saron RS (2001). Transitions of muscle fiber phenotypic profiles. "
        "<i>Histochem Cell Biol</i>. 115(5):359–72.",
        BODY))
    story.append(Paragraph(
        "Henneman E (1965). Relationship between size of neurons and their susceptibility to discharge. "
        "<i>Science</i>. 126(3287):1345–7. [Size Principle]",
        BODY))
    story.append(Spacer(1, 1*cm))
    story.append(Paragraph(
        "Study Guide compiled by Orris Medical Education · June 2026",
        SMALL))

    # ─── BUILD ────────────────────────────────────────────────────────────────
    doc.build(story)
    print(f"PDF generated: {OUTPUT_PATH}")


if __name__ == "__main__":
    build()
Running Command

cd /home/daytona/workspace/muscle-study-guide && python generate_study_guide.py 2>&1

Editing File

~/muscle-study-guide/generate_study_guide.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/muscle-study-guide/generate_study_guide.py'
Editing File

~/muscle-study-guide/generate_study_guide.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/muscle-study-guide/generate_study_guide.py'
Running Command

cd /home/daytona/workspace/muscle-study-guide && python generate_study_guide.py 2>&1

Running Command

ls -lh /home/daytona/workspace/muscle-study-guide/Muscle_Classification_Study_Guide.pdf

Your study guide PDF is ready! Here's the download link:

Muscle Classification Study Guide

PDF Document · PDF


Here's what's inside the 12-section, A4 guide:
SectionContent
1Three types of muscle tissue — comparison table (skeletal, cardiac, smooth)
2General classification framework for skeletal muscle
3Fiber Type Classification — Type I vs II with visual diagram + full comparison table
4Type IIA vs IIB subtypes — FOG vs FG fibers with real muscle examples
5Architectural Classification — Pennate vs Non-pennate with diagrams of all 4 types
6Histological structure — Endomysium/Perimysium/Epimysium hierarchy diagram + muscle fiber cell details
7Motor Units — size principle, Type I vs II motor unit comparison
8Muscle fasciae — structure, functions, clinical relevance
9Functional classification — agonist/antagonist/synergist/fixator + lever mechanics
10Tendons — traction vs pressure types, periosteal vs chondral insertions
11Master summary classification table
1212 flashcard Q&A pairs for rapid review
All content is sourced from the THIEME Atlas of Anatomy - General Anatomy & Musculoskeletal System, Sections 5.1-5.3.
This is a shared conversation. Sign in to Orris to start your own chat.