Explain each and everything about Spinal Cord and Ascending, Descending, and lntersegmental Tracts. I want even the minor details. Also explain all the clinicals along the content. Also create the pdf containing each and everything

Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/spinal-cord-pdf && ls /home/daytona/workspace/s…

Writing File

~/spinal-cord-pdf/generate_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import mm, cm
from reportlab.lib.colors import HexColor, black, white
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, PageBreak, KeepTogether
)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import BaseDocTemplate, PageTemplate, Frame

OUTPUT_PATH = "/home/daytona/workspace/spinal-cord-pdf/Spinal_Cord_Complete_Guide.pdf"

# Colors
DARK_BLUE = HexColor("#1a3a5c")
MED_BLUE = HexColor("#2e6da4")
LIGHT_BLUE = HexColor("#dce8f5")
ACCENT_RED = HexColor("#c0392b")
ACCENT_GREEN = HexColor("#1a7a4a")
ACCENT_ORANGE = HexColor("#d35400")
LIGHT_GRAY = HexColor("#f5f5f5")
DARK_GRAY = HexColor("#333333")
MED_GRAY = HexColor("#666666")
CLINICAL_BG = HexColor("#fff3cd")
CLINICAL_BORDER = HexColor("#e6a817")
TABLE_HEADER = HexColor("#2e6da4")
TABLE_ALT = HexColor("#eaf2fb")

styles = getSampleStyleSheet()

def make_styles():
    s = {}
    s['title'] = ParagraphStyle('title', fontName='Helvetica-Bold', fontSize=28,
        textColor=white, spaceAfter=4, alignment=TA_CENTER, leading=34)
    s['subtitle'] = ParagraphStyle('subtitle', fontName='Helvetica', fontSize=14,
        textColor=HexColor("#cce0ff"), spaceAfter=2, alignment=TA_CENTER, leading=18)
    s['h1'] = ParagraphStyle('h1', fontName='Helvetica-Bold', fontSize=18,
        textColor=white, spaceBefore=8, spaceAfter=4, leading=22,
        backColor=DARK_BLUE, leftIndent=-12, rightIndent=-12, borderPadding=(6,12,6,12))
    s['h2'] = ParagraphStyle('h2', fontName='Helvetica-Bold', fontSize=14,
        textColor=DARK_BLUE, spaceBefore=10, spaceAfter=4, leading=18,
        borderPadding=(4,0,2,0))
    s['h3'] = ParagraphStyle('h3', fontName='Helvetica-Bold', fontSize=12,
        textColor=MED_BLUE, spaceBefore=8, spaceAfter=3, leading=16)
    s['h4'] = ParagraphStyle('h4', fontName='Helvetica-BoldOblique', fontSize=11,
        textColor=ACCENT_ORANGE, spaceBefore=6, spaceAfter=2, leading=14)
    s['body'] = ParagraphStyle('body', fontName='Helvetica', fontSize=10,
        textColor=DARK_GRAY, spaceBefore=3, spaceAfter=3, leading=15,
        alignment=TA_JUSTIFY)
    s['bullet'] = ParagraphStyle('bullet', fontName='Helvetica', fontSize=10,
        textColor=DARK_GRAY, spaceBefore=2, spaceAfter=2, leading=14,
        leftIndent=16, bulletIndent=4)
    s['clinical'] = ParagraphStyle('clinical', fontName='Helvetica', fontSize=10,
        textColor=HexColor("#5a3e00"), spaceBefore=3, spaceAfter=3, leading=14,
        alignment=TA_JUSTIFY)
    s['clinical_title'] = ParagraphStyle('clinical_title', fontName='Helvetica-Bold',
        fontSize=11, textColor=HexColor("#c0392b"), spaceBefore=2, spaceAfter=2, leading=14)
    s['note'] = ParagraphStyle('note', fontName='Helvetica-Oblique', fontSize=9.5,
        textColor=MED_GRAY, spaceBefore=2, spaceAfter=2, leading=13,
        leftIndent=10)
    s['toc_entry'] = ParagraphStyle('toc_entry', fontName='Helvetica', fontSize=10.5,
        textColor=DARK_BLUE, spaceBefore=3, spaceAfter=3, leading=14, leftIndent=10)
    s['toc_sub'] = ParagraphStyle('toc_sub', fontName='Helvetica', fontSize=9.5,
        textColor=MED_GRAY, spaceBefore=1, spaceAfter=1, leading=12, leftIndent=24)
    return s

S = make_styles()

def clinical_box(title, lines, s):
    """Returns a list of flowables forming a clinical note box."""
    content = []
    rows = [[Paragraph(f"⚠  CLINICAL CORRELATE: {title}", s['clinical_title'])]]
    for line in lines:
        rows.append([Paragraph(line, s['clinical'])])
    t = Table(rows, colWidths=[165*mm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), CLINICAL_BG),
        ('BACKGROUND', (0,1), (-1,-1), HexColor("#fffdf0")),
        ('LINEABOVE', (0,0), (-1,0), 2, CLINICAL_BORDER),
        ('LINEBELOW', (0,-1), (-1,-1), 2, CLINICAL_BORDER),
        ('LINEBEFORE', (0,0), (0,-1), 3, CLINICAL_BORDER),
        ('LINEAFTER', (-1,0), (-1,-1), 1, HexColor("#f0d080")),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('LEFTPADDING', (0,0), (-1,-1), 10),
        ('RIGHTPADDING', (0,0), (-1,-1), 8),
    ]))
    content.append(Spacer(1, 4))
    content.append(t)
    content.append(Spacer(1, 4))
    return content

def section_header(text, s):
    t = Table([[Paragraph(text, s['h1'])]], colWidths=[165*mm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), DARK_BLUE),
        ('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 [Spacer(1, 8), t, Spacer(1, 4)]

def info_table(headers, rows, col_widths):
    data = [[Paragraph(h, ParagraphStyle('th', fontName='Helvetica-Bold', fontSize=9,
                        textColor=white, leading=12)) for h in headers]]
    for row in rows:
        data.append([Paragraph(str(c), ParagraphStyle('td', fontName='Helvetica',
                        fontSize=9, textColor=DARK_GRAY, leading=12)) for c in row])
    t = Table(data, colWidths=col_widths)
    style = [
        ('BACKGROUND', (0,0), (-1,0), TABLE_HEADER),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [white, TABLE_ALT]),
        ('GRID', (0,0), (-1,-1), 0.5, HexColor("#b0c4de")),
        ('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), 'TOP'),
    ]
    t.setStyle(TableStyle(style))
    return t

def build_pdf():
    doc = SimpleDocTemplate(
        OUTPUT_PATH,
        pagesize=A4,
        leftMargin=22*mm, rightMargin=22*mm,
        topMargin=20*mm, bottomMargin=22*mm,
        title="Spinal Cord: Complete Guide",
        author="Orris Medical Library",
        subject="Neuroanatomy - Spinal Cord"
    )

    story = []

    # ── COVER PAGE ──────────────────────────────────────────────────────────────
    cover_table = Table([[
        Paragraph("SPINAL CORD", S['title']),
    ]], colWidths=[165*mm])
    cover_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), DARK_BLUE),
        ('TOPPADDING', (0,0), (-1,-1), 30),
        ('BOTTOMPADDING', (0,0), (-1,-1), 10),
        ('LEFTPADDING', (0,0), (-1,-1), 10),
        ('RIGHTPADDING', (0,0), (-1,-1), 10),
    ]))
    story.append(cover_table)

    sub_table = Table([[
        Paragraph("Ascending, Descending & Intersegmental Tracts", S['subtitle']),
    ]], colWidths=[165*mm])
    sub_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), MED_BLUE),
        ('TOPPADDING', (0,0), (-1,-1), 10),
        ('BOTTOMPADDING', (0,0), (-1,-1), 14),
        ('LEFTPADDING', (0,0), (-1,-1), 10),
        ('RIGHTPADDING', (0,0), (-1,-1), 10),
    ]))
    story.append(sub_table)

    desc_table = Table([[
        Paragraph("Complete Neuroanatomy with Clinical Correlates", ParagraphStyle(
            'desc', fontName='Helvetica', fontSize=11, textColor=DARK_GRAY,
            alignment=TA_CENTER, leading=16)),
    ]], colWidths=[165*mm])
    desc_table.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), LIGHT_BLUE),
        ('TOPPADDING', (0,0), (-1,-1), 10),
        ('BOTTOMPADDING', (0,0), (-1,-1), 14),
        ('LEFTPADDING', (0,0), (-1,-1), 10),
        ('RIGHTPADDING', (0,0), (-1,-1), 10),
    ]))
    story.append(desc_table)
    story.append(Spacer(1, 20))

    source_text = [
        "Sources: Gray's Anatomy for Students | Neuroanatomy through Clinical Cases |",
        "Localization in Clinical Neurology | Neuroscience: Exploring the Brain |",
        "Histology: A Text and Atlas | Bradley and Daroff's Neurology in Clinical Practice"
    ]
    for st in source_text:
        story.append(Paragraph(st, ParagraphStyle('src', fontName='Helvetica-Oblique',
            fontSize=9, textColor=MED_GRAY, alignment=TA_CENTER, leading=13)))
    story.append(Spacer(1, 10))
    story.append(Paragraph("July 2026", ParagraphStyle('date', fontName='Helvetica',
        fontSize=9, textColor=MED_GRAY, alignment=TA_CENTER)))

    story.append(PageBreak())

    # ── TABLE OF CONTENTS ───────────────────────────────────────────────────────
    story.extend(section_header("TABLE OF CONTENTS", S))
    toc_items = [
        ("1. Overview & General Anatomy", []),
        ("2. Spinal Meninges", []),
        ("3. External Features", []),
        ("4. Internal Features & Gray Matter", ["Rexed's Laminae", "White Matter Funiculi"]),
        ("5. Ascending Tracts", [
            "Anterolateral Pathways (Spinothalamic, Spinoreticular, Spinomesencephalic)",
            "Posterior Column - Medial Lemniscal Pathway",
            "Spinocerebellar Tracts",
        ]),
        ("6. Descending Tracts", [
            "Lateral Motor System (Corticospinal, Rubrospinal)",
            "Medial Motor System (Anterior Corticospinal, Vestibulospinal, Reticulospinal, Tectospinal)",
        ]),
        ("7. Intersegmental Tracts (Fasciculus Proprius)", []),
        ("8. Tract of Lissauer", []),
        ("9. Vascular Supply", []),
        ("10. Clinical Correlates", [
            "Brown-Sequard Syndrome",
            "Central Cord Syndrome & Syringomyelia",
            "Anterior Cord Syndrome",
            "Posterior Cord Syndrome",
            "Complete Cord Transection",
            "Cauda Equina Syndrome",
            "Tabes Dorsalis",
            "UMN vs LMN Lesions",
        ]),
        ("11. Summary Tables", []),
    ]
    for main, subs in toc_items:
        story.append(Paragraph(f"● {main}", S['toc_entry']))
        for sub in subs:
            story.append(Paragraph(f"◦ {sub}", S['toc_sub']))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # SECTION 1: OVERVIEW
    # ══════════════════════════════════════════════════════════════════════════
    story.extend(section_header("1. OVERVIEW & GENERAL ANATOMY", S))
    story.append(Paragraph("Introduction", S['h2']))
    story.append(Paragraph(
        "The spinal cord is a cylindrical structure of the central nervous system (CNS) that is continuous "
        "with the medulla oblongata near the foramen magnum at the base of the skull. It occupies the vertebral "
        "canal of the vertebral column, extending from the foramen magnum down to the LI-LII vertebral level in "
        "an adult (it is relatively longer in newborns, reaching LII-LIII). Numerous ascending and descending "
        "axonal tracts course through the spinal cord, connecting with the brain to convey sensory (afferent) and "
        "motor (efferent) information for facilitation of movement, reflexes, sensory input, and feedback mechanisms.",
        S['body']))

    story.append(Paragraph("Extent and Enlargements", S['h3']))
    rows = [
        ["Feature", "Detail"],
        ["Upper limit", "Foramen magnum (C1 level), continuous with medulla oblongata"],
        ["Lower limit (adult)", "LI-LII vertebral level - terminates as conus medullaris"],
        ["Lower limit (newborn)", "LII-LIII vertebral level"],
        ["Length", "Approximately 40-45 cm in adults"],
        ["Weight", "~30 grams"],
        ["Cervical enlargement", "C5-T1 - gives rise to brachial plexus (upper limb innervation)"],
        ["Lumbosacral enlargement", "L1-S2 - gives rise to lumbosacral plexus (lower limb innervation)"],
        ["Conus medullaris", "Pointed inferior end of spinal cord"],
        ["Filum terminale", "Fibrous extension from conus to coccyx; anchors cord"],
        ["Cauda equina", "Bundle of spinal nerve roots below the conus medullaris"],
    ]
    story.append(info_table(rows[0], rows[1:], [55*mm, 110*mm]))
    story.append(Spacer(1, 6))

    story.append(Paragraph("Spinal Segments and Nerve Roots", S['h3']))
    story.append(Paragraph(
        "The spinal cord has 31 segments, each giving rise to a pair of spinal nerves through anterior (ventral) "
        "and posterior (dorsal) roots:", S['body']))
    seg_rows = [
        ["Region", "No. of Segments", "Vertebral Levels"],
        ["Cervical (C)", "8", "C1-C8"],
        ["Thoracic (T)", "12", "T1-T12"],
        ["Lumbar (L)", "5", "L1-L5"],
        ["Sacral (S)", "5", "S1-S5"],
        ["Coccygeal (Co)", "1", "Co1"],
    ]
    story.append(info_table(seg_rows[0], seg_rows[1:], [55*mm, 55*mm, 55*mm]))
    story.append(Spacer(1, 6))

    story.append(Paragraph(
        "Note: Due to differential growth between the vertebral column and the spinal cord during development, "
        "the spinal cord segments do NOT correspond to the same-numbered vertebral levels below the cervical region. "
        "The nerve roots must travel increasingly longer distances caudally to reach their intervertebral foramina "
        "- this creates the cauda equina.", S['note']))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # SECTION 2: MENINGES
    # ══════════════════════════════════════════════════════════════════════════
    story.extend(section_header("2. SPINAL MENINGES", S))
    story.append(Paragraph(
        "Like the brain, the spinal cord is surrounded by three concentric meninges: the dura mater, "
        "arachnoid mater, and pia mater.", S['body']))

    meninges_rows = [
        ["Meninx", "Extent", "Key Features", "Clinical Importance"],
        ["Dura mater (outer)", "Foramen magnum to S2 vertebra",
         "Continuous with inner cranial dura; separated from bony vertebral canal by epidural/extradural space",
         "Epidural space used for epidural anaesthesia; spinal subdural hematoma rare"],
        ["Arachnoid mater (middle)", "Continuous; subarachnoid space to S2",
         "Less adherent to dura than intracranially; subdural space is a potential space",
         "Subarachnoid space: CSF flows here; lumbar puncture accesses this space safely below L2"],
        ["Pia mater (inner)", "Adherent to cord surface",
         "Highly vascular; forms denticulate ligaments and filum terminale interna",
         "Denticulate ligaments anchor cord in subarachnoid space"],
    ]
    story.append(info_table(meninges_rows[0], meninges_rows[1:], [30*mm, 38*mm, 55*mm, 42*mm]))
    story.append(Spacer(1, 6))

    story.append(Paragraph("Denticulate Ligaments", S['h3']))
    story.append(Paragraph(
        "The pia mater, midway between the anterior and posterior roots, forms a flat continuous sheet called "
        "the denticulate ligament. At the posterior and anterior rootlets, sleeve-like projections extend out "
        "through the arachnoid mater to attach to the dura mater. These delicate attachments anchor and position "
        "the spinal cord within the central area of the subarachnoid space. There are 21 tooth-like projections "
        "on each side.", S['body']))

    story.extend(clinical_box("Lumbar Puncture (Spinal Tap)", [
        "Because the spinal cord ends at LI-LII but the subarachnoid space extends to S2, "
        "lumbar puncture is safely performed at the L3-L4 or L4-L5 interspace (below the conus medullaris) "
        "in adults. The needle passes through: skin → subcutaneous tissue → supraspinous ligament → "
        "interspinous ligament → ligamentum flavum → epidural space → dura mater → subdural space (brief) "
        "→ arachnoid → subarachnoid space (CSF obtained here).",
        "Indications: meningitis workup, subarachnoid hemorrhage diagnosis, intrathecal drug delivery.",
        "Contraindications: raised ICP with papilloedema (herniation risk), local infection, coagulopathy.",
    ], S))

    story.extend(clinical_box("Epidural Anaesthesia", [
        "Local anaesthetics injected into the epidural space (between dura mater and bony vertebral canal) "
        "block nerve roots as they cross this space. Used in obstetric analgesia, post-operative pain, and "
        "surgical anaesthesia for lower body procedures.",
    ], S))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # SECTION 3 & 4: EXTERNAL AND INTERNAL FEATURES
    # ══════════════════════════════════════════════════════════════════════════
    story.extend(section_header("3. EXTERNAL FEATURES", S))
    story.append(Paragraph(
        "The anterior and posterior surfaces of the spinal cord have several longitudinally running fissures and sulci:", S['body']))
    ext_rows = [
        ["Surface Feature", "Location", "Description"],
        ["Anterior median fissure", "Anterior midline", "Deep separation; contains anterior spinal artery"],
        ["Posterior median sulcus", "Posterior midline", "Shallower; continued inward by posterior median septum"],
        ["Posterolateral sulcus", "Bilateral, posterior", "Entry point of posterior (dorsal) nerve root rootlets"],
        ["Anterolateral sulcus", "Bilateral, anterior", "Less distinct; exit point of anterior (ventral) root rootlets"],
        ["Posterior intermediate sulcus", "Between post. median & posterolateral", "Present only in cervical cord; separates fasciculus gracilis from fasciculus cuneatus"],
    ]
    story.append(info_table(ext_rows[0], ext_rows[1:], [42*mm, 48*mm, 75*mm]))
    story.append(Spacer(1, 8))

    story.extend(section_header("4. INTERNAL FEATURES", S))
    story.append(Paragraph("Gray Matter", S['h2']))
    story.append(Paragraph(
        "A cross-section of the spinal cord reveals an inner H-shaped (or butterfly-shaped) gray matter "
        "consisting of neuronal cell bodies and an outer white matter composed of myelinated neuronal axons. "
        "The gray matter has distinct horns:", S['body']))

    horns_rows = [
        ["Horn", "Location", "Contents", "Function"],
        ["Anterior (Ventral) Horn", "Anterior lateral",
         "Alpha motor neurons (large), Gamma motor neurons (small), interneurons",
         "Motor output to skeletal muscles via ventral root"],
        ["Posterior (Dorsal) Horn", "Posterior lateral",
         "Sensory interneurons receiving afferent input",
         "Sensory processing and relay"],
        ["Lateral Horn (Intermediolateral column)", "T1-L2 and S2-S4",
         "Preganglionic autonomic neurons",
         "Sympathetic outflow (T1-L2); Parasympathetic outflow (S2-S4)"],
    ]
    story.append(info_table(horns_rows[0], horns_rows[1:], [38*mm, 30*mm, 52*mm, 45*mm]))
    story.append(Spacer(1, 6))

    story.append(Paragraph("Motor Neuron Types in Anterior Horn", S['h3']))
    story.append(Paragraph(
        "Alpha (α) motor neurons: Large neurons that innervate extrafusal muscle fibers of skeletal muscles. "
        "Their axons constitute the final common pathway for motor control. Gamma (γ) motor neurons: Smaller "
        "neurons that innervate the intrafusal fibers (nuclear chain and nuclear bag fibers) of neuromuscular "
        "spindles - these are the receptors for the muscle stretch reflex. This allows central modulation of "
        "spindle sensitivity. Somatotopic organization: ventral horn neurons innervating flexor muscles lie "
        "dorsal to those innervating extensor muscles; neurons innervating distal muscles (hand) lie laterally "
        "to those innervating proximal/trunk muscles.", S['body']))

    story.append(Paragraph("Rexed's Laminae", S['h2']))
    story.append(Paragraph(
        "The Swedish anatomist Bror Rexed divided the spinal cord gray matter into 10 cytoarchitectural "
        "zones (laminae I-X), based on cell size, density, and arrangement. This system is critical for "
        "understanding synaptic targets of various tracts:", S['body']))

    rexed_rows = [
        ["Lamina", "Location", "Nucleus", "Function / Tract Connection"],
        ["I", "Tip of dorsal horn", "Nucleus posteromarginalis (Marginal zone)", "Receives pain/temp from Aδ & C fibers; origin of STT"],
        ["II", "Dorsal horn", "Substantia gelatinosa of Rolando", "Pain modulation; interneurons; gate control; opioid receptors"],
        ["III, IV", "Dorsal horn", "Nucleus proprius", "Touch, pressure, proprioception relay"],
        ["V", "Neck of dorsal horn", "Nucleus reticularis", "Wide dynamic range neurons; convergence of pain/touch; STT origin"],
        ["VI", "Base of dorsal horn", "Base of dorsal horn", "Present mainly in enlargements; proprioception from muscle spindles"],
        ["VII", "Intermediate zone", "Clarke's nucleus (C8-L2/L3); Intermediolateral column", "Clarke's nucleus: origin of posterior spinocerebellar tract; IML: preganglionic sympathetics"],
        ["VIII", "Ventral horn (medial)", "Commissural nucleus", "Interneurons; receives vestibulospinal and reticulospinal tracts"],
        ["IX", "Ventral horn", "Medial & lateral motor nuclei", "Alpha and gamma lower motor neurons"],
        ["X", "Around central canal", "Grisea centralis", "Surrounds central canal; visceral afferent input"],
    ]
    story.append(info_table(rexed_rows[0], rexed_rows[1:],
        [13*mm, 28*mm, 42*mm, 82*mm]))
    story.append(Spacer(1, 6))

    story.append(Paragraph("White Matter - Funiculi (Columns)", S['h2']))
    story.append(Paragraph(
        "Each half of the spinal cord white matter is separated into three funiculi by the gray matter "
        "and intramedullary portions of the spinal nerve roots:", S['body']))
    funiculi_rows = [
        ["Funiculus", "Location", "Main Tracts", "Function"],
        ["Dorsal (Posterior)", "Between dorsomedian septum and dorsolateral sulcus",
         "Fasciculus gracilis; Fasciculus cuneatus",
         "Conscious proprioception, vibration, discriminative touch (ipsilateral)"],
        ["Lateral", "Between dorsolateral and ventrolateral sulci",
         "Lateral corticospinal (descending); Lateral spinothalamic, Spinocerebellar tracts (ascending); Rubrospinal",
         "Mixed motor and sensory functions"],
        ["Ventral (Anterior)", "Between ventrolateral sulcus and ventromedian fissure",
         "Anterior corticospinal; Anterior spinothalamic; Vestibulospinal; Reticulospinal; Tectospinal",
         "Motor (voluntary and postural); crude touch"],
    ]
    story.append(info_table(funiculi_rows[0], funiculi_rows[1:], [25*mm, 38*mm, 55*mm, 47*mm]))
    story.append(Spacer(1, 6))

    story.append(Paragraph(
        "Important Principle: White matter is thickest at cervical levels (most fibers present) and "
        "thinnest at sacral levels (most fibers have already terminated). Gray matter volume is greatest "
        "at the cervical and lumbosacral enlargements.", S['note']))

    story.extend(clinical_box("Conus Medullaris vs Cauda Equina Lesions", [
        "Conus medullaris lesion (S3-S5): Combined UMN + LMN picture. Bladder: spastic + flaccid (mixed). "
        "Saddle anesthesia. Erectile dysfunction. Perianal areflexia.",
        "Cauda equina lesion (below L2): Pure LMN lesion. Flaccid paralysis. Bladder: atonic/overflow incontinence. "
        "Absent reflexes. Severe radicular pain. Saddle anesthesia.",
        "Key difference: Cauda equina is peripheral nerve roots (PNS), so lesions cause LMN features; "
        "conus is spinal cord (CNS) causing mixed features.",
    ], S))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # SECTION 5: ASCENDING TRACTS
    # ══════════════════════════════════════════════════════════════════════════
    story.extend(section_header("5. ASCENDING TRACTS (SENSORY PATHWAYS)", S))
    story.append(Paragraph(
        "Sensory information entering the CNS from peripheral sensory receptors is conducted through a series "
        "of neurons that synapse with targets in the spinal cord, cerebral cortex, and other brain structures. "
        "The sensory modalities carried in these pathways include pain, temperature, tactile, and proprioceptive "
        "input. All conscious sensory pathways from the body follow a three-neuron chain: "
        "1st-order neuron (peripheral receptor to spinal cord/brainstem), "
        "2nd-order neuron (crosses midline, ascends to thalamus), "
        "3rd-order neuron (thalamus to cortex).", S['body']))

    story.append(Paragraph("Two Major Somatosensory Pathways:", S['h3']))
    story.append(Paragraph(
        "● Anterolateral system (ALS) - Pain, temperature, crude touch (crosses in spinal cord)",
        S['bullet']))
    story.append(Paragraph(
        "● Posterior column-medial lemniscal (PCML) pathway - Fine touch, vibration, conscious proprioception (crosses in medulla)",
        S['bullet']))

    # 5A: Anterolateral System
    story.append(Paragraph("5A. ANTEROLATERAL PATHWAYS", S['h2']))
    story.append(Paragraph(
        "The anterolateral system consists of three tracts that together convey pain, temperature, crude touch, "
        "and itch. They all begin with first-order neurons in the dorsal root ganglion:", S['body']))

    # Spinothalamic Tract
    story.append(Paragraph("i. Lateral Spinothalamic Tract (Neospinothalamic Tract)", S['h3']))
    story.append(Paragraph("Modalities: Sharp, well-localized pain and temperature", S['note']))

    stt_rows = [
        ["Neuron Order", "Cell Body Location", "Pathway", "Target"],
        ["1st Order Neuron", "Dorsal root ganglion (DRG)",
         "Enters spinal cord via posterior root → travels in Lissauer's tract (ascends/descends 1-2 segments) → synapses in posterior horn (laminae I and V)",
         "Posterior horn (ipsilateral)"],
        ["2nd Order Neuron", "Posterior horn (laminae I, V)",
         "Axons cross obliquely over 2-3 segments via anterior commissure → join anterolateral tract on contralateral side → ascend through spinal cord, brainstem",
         "VPL nucleus of thalamus"],
        ["3rd Order Neuron", "VPL nucleus, thalamus",
         "Projects via posterior limb of internal capsule",
         "Primary somatosensory cortex (S1), postcentral gyrus (areas 3,1,2)"],
    ]
    story.append(info_table(stt_rows[0], stt_rows[1:], [30*mm, 35*mm, 65*mm, 35*mm]))
    story.append(Spacer(1, 4))
    story.append(Paragraph(
        "Somatotopic Lamination in STT: Due to the laminar arrangement within the anterolateral tract, "
        "fibers from sacral levels are situated most laterally, and cervical fibers are situated most medially "
        "(or dorsomedially). This is clinically important in cordotomy procedures and in distinguishing "
        "intramedullary from extramedullary lesions.", S['note']))

    story.extend(clinical_box("Spinothalamic Tract - Key Clinical Points", [
        "Lesion ABOVE the level of decussation (e.g., lateral cord compression): Contralateral loss of pain "
        "and temperature sensation BELOW the level of the lesion.",
        "Lesion AT the level of decussation (anterior commissure, e.g., syringomyelia): BILATERAL loss of "
        "pain and temperature in a cape/vest-like distribution, sparing posterior column modalities "
        "(dissociated sensory loss).",
        "Anterolateral cordotomy: Surgical section of the STT for intractable pain relief; "
        "produces contralateral analgesia below the lesion level.",
        "STT carries fibers from OPPOSITE side; thus a right-sided cord lesion causes LEFT-sided pain/temp loss.",
        "Temperature: Temperature fibers are slightly dorsolateral to pain fibers within the STT.",
    ], S))

    story.append(Paragraph("ii. Anterior Spinothalamic Tract", S['h3']))
    story.append(Paragraph("Modalities: Crude (non-discriminative) touch, tickle, pressure", S['note']))
    story.append(Paragraph(
        "The anterior spinothalamic tract has a similar pathway to the lateral spinothalamic tract. "
        "First-order neuron cell bodies in the DRG enter the posterior horn, synapse in laminae VI and VII. "
        "Second-order axons cross via the anterior white commissure and ascend in the anterior funiculus. "
        "They project to the VPL nucleus of the thalamus and then to the somatosensory cortex. "
        "Note: Crude touch has BILATERAL representation to some degree because some uncrossed fibers travel "
        "in the ipsilateral posterior columns. Therefore, unilateral cord lesions may spare crude touch "
        "bilaterally.", S['body']))

    story.append(Paragraph("iii. Spinoreticular Tract", S['h3']))
    story.append(Paragraph("Modalities: Poorly localized, dull, aching, burning pain (affective/motivational component)", S['note']))
    story.append(Paragraph(
        "The spinoreticular tract is also called the paleospinothalamic pathway. First-order neurons "
        "are similar to the STT. Second-order axons ascend bilaterally in the anterolateral funiculus but "
        "instead of reaching the thalamus directly, they terminate on multiple synaptic stations in the "
        "brainstem reticular formation. From there, multisynaptic connections project to the intralaminar "
        "nuclei of the thalamus and then diffusely to the cortex. This pathway mediates the emotional, "
        "unpleasant, motivational, and arousal aspects of pain (suffering). It explains why lesions of the "
        "medial thalamus can relieve the suffering but not the sensation of pain.", S['body']))

    story.append(Paragraph("iv. Spinomesencephalic Tract (Spinotectal Tract)", S['h3']))
    story.append(Paragraph(
        "Second-order axons from the posterior horn ascend in the anterolateral funiculus and terminate in "
        "the midbrain: specifically the periaqueductal gray (PAG) matter and the superior colliculus. "
        "The PAG connection is important for endogenous pain modulation (descending inhibitory pathways). "
        "The superior colliculus connection mediates reflex orientation of head and eyes toward painful stimuli.", S['body']))

    story.extend(clinical_box("Gate Control Theory of Pain (Melzack & Wall, 1965)", [
        "Substantia gelatinosa (Lamina II) acts as a 'gate' modulating pain transmission. "
        "Large-diameter Aβ fibers (touch/vibration) can activate interneurons in SG that INHIBIT transmission "
        "from small C and Aδ fibers (pain). This explains why rubbing an injury reduces pain.",
        "Descending inhibition from PAG (via spinomesencephalic tract feedback), raphe nuclei (serotonin), "
        "and locus coeruleus (noradrenaline) also modulates pain at the dorsal horn level.",
        "Clinical application: TENS (Transcutaneous Electrical Nerve Stimulation) uses this principle.",
    ], S))

    story.append(PageBreak())

    # Posterior Column-Medial Lemniscal
    story.append(Paragraph("5B. POSTERIOR COLUMN - MEDIAL LEMNISCAL PATHWAY (DCML)", S['h2']))
    story.append(Paragraph(
        "Modalities: Fine (discriminative) touch, vibration sense, two-point discrimination, conscious proprioception (joint position sense), stereognosis (object recognition by touch), graphesthesia",
        S['note']))
    story.append(Paragraph(
        "This pathway has a key distinguishing feature: the first-order neurons ascend ipsilaterally all "
        "the way to the caudal medulla BEFORE decussating. Therefore, lesions in the spinal cord cause "
        "ipsilateral loss of these modalities.", S['body']))

    dcml_rows = [
        ["Neuron Order", "Cell Body", "Pathway", "Target"],
        ["1st Order", "DRG (large-diameter Aα, Aβ fibers)",
         "Enters cord via medial bundle of posterior root → ascends IPSILATERALLY in posterior funiculus. "
         "Lower limb fibers (T7 and below) → fasciculus gracilis (medial). "
         "Upper limb/neck fibers (above T6) → fasciculus cuneatus (lateral).",
         "Nucleus gracilis / Nucleus cuneatus (caudal medulla)"],
        ["2nd Order", "Nucleus gracilis (lower body) / Nucleus cuneatus (upper body) in caudal medulla",
         "Axons arc ventrally as internal arcuate fibers → decussate (sensory decussation) → "
         "form medial lemniscus on contralateral side → ascend through brainstem",
         "VPL nucleus of thalamus"],
        ["3rd Order", "VPL nucleus, thalamus",
         "Projects via posterior limb of internal capsule",
         "Primary somatosensory cortex (S1), areas 3,1,2"],
    ]
    story.append(info_table(dcml_rows[0], dcml_rows[1:], [22*mm, 35*mm, 73*mm, 35*mm]))
    story.append(Spacer(1, 4))

    story.append(Paragraph("Key Structures:", S['h3']))
    story.append(Paragraph(
        "Fasciculus Gracilis (Tract of Goll): Carries sensory information from the lower limb and trunk "
        "(T7 and below). Located medially in the posterior funiculus. Narrower in cross-section.",
        S['bullet']))
    story.append(Paragraph(
        "Fasciculus Cuneatus (Tract of Burdach): Carries information from the upper limb and neck "
        "(above T6). Located laterally in the posterior funiculus. Present only in thoracic and cervical cord.",
        S['bullet']))
    story.append(Paragraph(
        "Somatotopic arrangement in posterior columns: Sacral fibers are most medial, cervical fibers most lateral.",
        S['bullet']))

    story.extend(clinical_box("Posterior Column Lesions", [
        "Bilateral posterior column lesion (e.g., Subacute Combined Degeneration in Vit B12 deficiency, "
        "Friedreich's ataxia, Tabes dorsalis from syphilis): Loss of vibration sense, proprioception, "
        "fine touch bilaterally → sensory ataxia, positive Romberg's sign.",
        "Romberg's Sign: Patient can stand with feet together with eyes open (uses visual input) but falls "
        "when eyes closed (proprioceptive input lost). Sensory ataxia - not cerebellar ataxia.",
        "Lhermitte's Sign: Electric shock sensation radiating down spine and limbs on neck flexion - "
        "indicates posterior column pathology, classically seen in multiple sclerosis.",
        "Tabes dorsalis (neurosyphilis): Posterior column degeneration → lightning pains, Argyll Robertson "
        "pupils, sensory ataxia, absent deep tendon reflexes, Charcot joints.",
    ], S))

    # Spinocerebellar Tracts
    story.append(Paragraph("5C. SPINOCEREBELLAR TRACTS", S['h2']))
    story.append(Paragraph(
        "These tracts convey proprioceptive and exteroceptive information to the cerebellum for "
        "subconscious coordination of movement. They do NOT reach conscious awareness. "
        "There are four spinocerebellar tracts:", S['body']))

    sc_rows = [
        ["Tract", "Origin (1st neuron synapse)", "Course", "Enters Cerebellum Via", "Function"],
        ["Posterior Spinocerebellar Tract (PSCT)", "Clarke's nucleus (nucleus dorsalis), lamina VII, C8-L2/L3",
         "UNCROSSED - ascends ipsilaterally in lateral funiculus (posterior part)",
         "Inferior cerebellar peduncle (ICP)",
         "Subconscious proprioception from lower limb (muscle spindles, Golgi tendon organs)"],
        ["Anterior Spinocerebellar Tract (ASCT)", "Spinal border cells (laminae V-VII) lumbosacral",
         "CROSSES twice (once in cord, once in brainstem pons/midbrain) - net IPSILATERAL",
         "Superior cerebellar peduncle (SCP)",
         "Subconscious proprioception and exteroception from lower limb; information about spinal cord interneuronal activity"],
        ["Cuneocerebellar Tract", "Accessory (external/lateral) cuneate nucleus in medulla (C1-T6 input)",
         "UNCROSSED via ICP",
         "Inferior cerebellar peduncle",
         "Subconscious proprioception from upper limb and neck - functionally equivalent to PSCT"],
        ["Rostral Spinocerebellar Tract", "Laminae V, VI, VII in cervical cord",
         "Mostly UNCROSSED",
         "ICP and SCP",
         "Upper limb proprioception - functionally equivalent to ASCT"],
    ]
    story.append(info_table(sc_rows[0], sc_rows[1:], [30*mm, 35*mm, 37*mm, 28*mm, 35*mm]))
    story.append(Spacer(1, 4))

    story.extend(clinical_box("Spinocerebellar Tracts - Clinical", [
        "Friedreich's Ataxia: Degeneration of posterior spinocerebellar tracts AND posterior columns AND "
        "corticospinal tracts → progressive cerebellar + sensory ataxia, areflexia, cardiomyopathy. "
        "GAA trinucleotide repeat expansion in frataxin gene (chromosome 9).",
        "Multiple System Atrophy (MSA): Can affect spinocerebellar projections leading to cerebellar ataxia.",
    ], S))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # SECTION 6: DESCENDING TRACTS
    # ══════════════════════════════════════════════════════════════════════════
    story.extend(section_header("6. DESCENDING TRACTS (MOTOR PATHWAYS)", S))
    story.append(Paragraph(
        "Descending tracts through the spinal cord are involved in voluntary movements, postural control, "
        "and coordination of head, neck, and eye movements. These pathways originate from the cerebral "
        "cortex and brainstem and are influenced by feedback from the cerebellum and basal ganglia. "
        "They are divided into LATERAL and MEDIAL motor systems.", S['body']))

    story.append(Paragraph(
        "Upper Motor Neuron (UMN): Cell bodies in cerebral cortex or brainstem. Axons descend in the spinal cord. "
        "Lower Motor Neuron (LMN): Cell bodies in the anterior horn of spinal cord gray matter (Lamina IX). "
        "LMN axons exit via anterior root to form motor nerves.", S['note']))

    story.append(Paragraph("6A. LATERAL MOTOR SYSTEM", S['h2']))
    story.append(Paragraph(
        "Tracts of the lateral motor system are located in the lateral column of the spinal cord white "
        "matter and synapse on lower motor neurons in the LATERAL aspect of the anterior horn. They control "
        "voluntary movement of the extremities (distal muscles).", S['body']))

    # Lateral Corticospinal Tract
    story.append(Paragraph("i. Lateral Corticospinal Tract (Pyramidal Tract)", S['h3']))
    story.append(Paragraph(
        "This is clinically the MOST IMPORTANT descending tract. It is responsible for fine, voluntary, "
        "skilled movements - especially of the distal extremities (fingers, toes).", S['body']))

    lcst_rows = [
        ["Level", "Description"],
        ["Origin", "Primary motor cortex (M1, area 4), ~30%; premotor cortex (area 6), ~30%; "
         "somatosensory cortex (areas 3,1,2), ~40%"],
        ["Internal capsule", "Axons converge via corona radiata → posterior limb of internal capsule "
         "(somatotopic: face anteriorly, arm middle, leg posteriorly)"],
        ["Midbrain", "Descend in crus cerebri (middle 3/5)"],
        ["Pons", "Scattered into small bundles by transverse pontocerebellar fibers"],
        ["Medulla", "Reunited as pyramids (anterior surface of medulla) - hence 'pyramidal tract'"],
        ["Decussation", "~85-90% of fibers cross at pyramidal decussation (caudal medulla) to form LATERAL "
         "corticospinal tract (contralateral)"],
        ["Remaining fibers", "~10-15% stay ipsilateral → form ANTERIOR corticospinal tract"],
        ["Spinal cord descent", "Lateral funiculus, lateral column"],
        ["Synapse", "Lamina IX (anterior horn) - on alpha and gamma LMN cell bodies, directly or via interneurons"],
        ["Exit", "Anterior root → spinal nerve → motor nerve → neuromuscular junction"],
    ]
    story.append(info_table(lcst_rows[0], lcst_rows[1:], [35*mm, 130*mm]))
    story.append(Spacer(1, 4))

    story.append(Paragraph("Somatotopic Organization in Lateral Corticospinal Tract:", S['note']))
    story.append(Paragraph("In the lateral CST: Cervical fibers (arm) are most medial; Sacral fibers (leg) are most lateral. Clinically relevant when a tumor compresses cord from outside (sacral sparing) vs inside.", S['note']))

    story.extend(clinical_box("UMN vs LMN Syndrome", [
        "UMN lesion (lateral corticospinal tract): Spastic paralysis, hyperreflexia, upgoing plantar response "
        "(Babinski's sign), clonus, no significant muscle atrophy (disuse atrophy only), increased tone, "
        "initial flaccidity then spasticity (due to loss of descending inhibition on LMN).",
        "LMN lesion (anterior horn or peripheral nerve): Flaccid paralysis, hyporeflexia/areflexia, "
        "downgoing plantar, muscle wasting/atrophy, fasciculations, fibrillations on EMG.",
        "Babinski's sign (extensor plantar response): Dorsiflexion of big toe + fanning of other toes "
        "on stroking lateral sole. Present in UMN lesions; normal in infants <1 year.",
        "Clasp-knife rigidity: Velocity-dependent increase in tone (UMN); vs Lead-pipe or "
        "cogwheel rigidity (extrapyramidal).",
    ], S))

    # Rubrospinal Tract
    story.append(Paragraph("ii. Rubrospinal Tract", S['h3']))
    story.append(Paragraph(
        "Cell bodies of upper motor neurons begin in the red nucleus (nucleus ruber) of the midbrain tegmentum. "
        "After leaving the red nucleus, axons immediately cross the midline as the ventral tegmental decussation "
        "(Forel's decussation) in the midbrain. Axons then descend as the rubrospinal tract through the lateral "
        "column of the brainstem and lateral white matter of the spinal cord. These axons descend ONLY to "
        "cervical levels of the spinal cord and synapse with interneurons in the anterior horn gray matter. "
        "They facilitate flexor muscle activity and inhibit extensor muscle activity of the upper limb. "
        "In humans, this tract is relatively less significant than in other mammals, and its functional "
        "contribution may be partially subsumed by the corticospinal tract.", S['body']))

    story.append(Paragraph("6B. MEDIAL MOTOR SYSTEM", S['h2']))
    story.append(Paragraph(
        "Tracts of the medial motor system regulate axial and truncal muscles involved in maintaining "
        "posture, balance, and automatic gait-related movements. They also control orientating movements "
        "of the head and neck. Unlike the lateral motor system, these tracts project BILATERALLY on "
        "interneurons (not directly on LMNs) within the spinal cord. This makes each tract difficult "
        "to test individually in the clinical setting.", S['body']))

    # Anterior CST
    story.append(Paragraph("i. Anterior (Ventral) Corticospinal Tract", S['h3']))
    story.append(Paragraph(
        "Formed by the ~10-15% of corticospinal fibers that did NOT decussate at the pyramidal decussation "
        "in the caudal medulla. These axons remain IPSILATERAL and descend in the medial aspect of the "
        "anterior funiculus. They extend to the UPPER thoracic cord level, where they eventually cross in "
        "the anterior white commissure to synapse on contralateral (bilateral) anterior horn interneurons. "
        "These neurons control axial and proximal limb muscles.", S['body']))

    # Vestibulospinal Tracts
    story.append(Paragraph("ii. Vestibulospinal Tracts (Lateral and Medial)", S['h3']))
    vst_rows = [
        ["Tract", "Origin", "Course", "Function"],
        ["Lateral Vestibulospinal Tract", "Lateral vestibular nucleus (Deiters' nucleus), pons",
         "UNCROSSED; descends ipsilaterally in anterior funiculus throughout entire spinal cord",
         "Facilitates extensor muscle tone (antigravity muscles); inhibits flexors; maintains upright posture; balance"],
        ["Medial Vestibulospinal Tract", "Medial vestibular nucleus, pons",
         "Both CROSSED and UNCROSSED; descends only to cervical/upper thoracic cord in medial longitudinal fasciculus (MLF)",
         "Head and neck righting reflexes; head stabilization during movement"],
    ]
    story.append(info_table(vst_rows[0], vst_rows[1:], [35*mm, 38*mm, 47*mm, 45*mm]))
    story.append(Spacer(1, 4))

    story.extend(clinical_box("Decerebrate vs Decorticate Posturing", [
        "Decerebrate rigidity (midbrain-level lesion): Extension of all four limbs, jaw clenched, "
        "arms pronated. Due to unopposed lateral vestibulospinal tract activity (extensor facilitation). "
        "Indicates brainstem/midbrain compression - very poor prognosis.",
        "Decorticate rigidity (cortical/internal capsule lesion): Flexion of arms and extension of legs. "
        "Due to intact vestibulospinal and rubrospinal tracts with disrupted corticospinal tract. "
        "Less severe prognosis than decerebrate.",
    ], S))

    # Reticulospinal Tracts
    story.append(Paragraph("iii. Reticulospinal Tracts (Pontine and Medullary)", S['h3']))
    rst_rows = [
        ["Tract", "Origin", "Course", "Function"],
        ["Pontine (Medial) Reticulospinal Tract", "Pontine reticular formation (nucleus reticularis pontis caudalis & oralis)",
         "UNCROSSED; descends in anterior funiculus (medial reticulospinal tract)",
         "FACILITATES axial and proximal extensor tone; excites spinal cord LMNs"],
        ["Medullary (Lateral) Reticulospinal Tract", "Medullary reticular formation (nucleus reticularis gigantocellularis)",
         "Bilateral (mostly ipsilateral); descends in lateral funiculus",
         "INHIBITS spinal cord LMNs; regulates tone; pain modulation (endogenous opioid system)"],
    ]
    story.append(info_table(rst_rows[0], rst_rows[1:], [35*mm, 42*mm, 45*mm, 43*mm]))
    story.append(Spacer(1, 4))

    story.append(Paragraph(
        "Both reticulospinal tracts modulate spinal reflexes, muscle tone, and voluntary movement. "
        "They receive inputs from the motor cortex, cerebellum, and basal ganglia. The reticular formation "
        "also controls breathing, cardiovascular function, and consciousness.", S['body']))

    # Tectospinal Tract
    story.append(Paragraph("iv. Tectospinal Tract", S['h3']))
    story.append(Paragraph(
        "Origin: Superior colliculus (tectum) of the midbrain. After leaving the superior colliculus, "
        "axons cross the midline in the dorsal tegmental decussation (Meynert's decussation) in the "
        "midbrain. The tract then descends in the medial aspect of the anterior funiculus, only reaching "
        "the upper cervical cord (C4 or above). It synapses on interneurons in the anterior horn. "
        "Function: Mediates reflex turning of the head and eyes in response to visual stimuli "
        "(orientation reflex) and auditory/visual startle reflexes.", S['body']))

    story.extend(clinical_box("Spastic Gait and Tone Disorders", [
        "Spasticity (UMN syndrome): Results from disruption of cortical inhibitory projections via "
        "corticospinal tract AND disruption of medullary reticulospinal (inhibitory) tract, "
        "leaving pontine reticulospinal (excitatory) and vestibulospinal (facilitatory) tracts unopposed "
        "→ increased extensor tone. Velocity-dependent resistance (clasp-knife).",
        "Spinal Shock: Immediately after acute transection of spinal cord - flaccid paralysis, "
        "areflexia, urinary retention, ileus. Lasts days to weeks. Followed by gradual return of "
        "spasticity and hyperreflexia due to denervation supersensitivity of LMNs.",
    ], S))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # SECTION 7: INTERSEGMENTAL TRACTS
    # ══════════════════════════════════════════════════════════════════════════
    story.extend(section_header("7. INTERSEGMENTAL TRACTS", S))

    story.append(Paragraph("Fasciculus Proprius (Spinospinal Tract / Propriospinal Tract)", S['h2']))
    story.append(Paragraph(
        "The fasciculus proprius (also called the spinospinal tract, propriospinal fibers, or "
        "fasciculus proprius system) is a collection of short axonal fibers that form a thin zone of "
        "white matter surrounding the gray matter of the spinal cord like a sleeve. It is present in "
        "all three funiculi (anterior, posterior, lateral) but is most prominent in the anterior funiculus "
        "adjacent to the gray matter.", S['body']))

    story.append(Paragraph("Components and Structure:", S['h3']))
    story.append(Paragraph(
        "These fibers originate from interneurons within the gray matter and travel for various distances "
        "within the spinal cord - some spanning just one segment, others spanning several segments "
        "(hence 'intersegmental'). Fibers within the fasciculus proprius may be:",
        S['body']))
    story.append(Paragraph("&#9679; Short propriospinal fibers: span 1-2 segments (segmental coordination)", S['bullet']))
    story.append(Paragraph("&#9679; Long propriospinal fibers: span multiple segments (e.g., cervical to lumbar)", S['bullet']))
    story.append(Paragraph("&#9679; Both ascending and descending fibers are present", S['bullet']))
    story.append(Paragraph("&#9679; Most are ipsilateral, but some cross via anterior white commissure", S['bullet']))

    story.append(Paragraph("Functions:", S['h3']))
    fp_rows = [
        ["Function", "Detail"],
        ["Spinal reflex coordination", "Coordinates multi-segmental reflexes (e.g., scratching reflex, spinal locomotor patterns)"],
        ["Intersegmental coordination", "Coordinates activity between cervical and lumbar enlargements during locomotion (arm-leg coordination)"],
        ["Propriospinal rhythm generation", "Contributes to central pattern generators (CPGs) for rhythmic locomotion"],
        ["Autonomic coordination", "Coordinates sympathetic preganglionic cells across segments"],
        ["Alternative motor pathway", "After spinal cord injury, long propriospinal neurons may serve as relay for supraspinal commands, bypassing the lesion - basis for some recovery"],
    ]
    story.append(info_table(fp_rows[0], fp_rows[1:], [50*mm, 115*mm]))
    story.append(Spacer(1, 6))

    story.extend(clinical_box("Intersegmental Tracts - Clinical Relevance", [
        "After spinal cord injury, propriospinal interneurons (especially long propriospinal neurons - LPNs) "
        "can serve as neural detour circuits, relaying cortical commands from above the injury to spinal "
        "circuits below the injury. This is a major target for spinal cord injury rehabilitation research.",
        "Propriospinal myoclonus: A condition characterized by sudden jerks originating from propriospinal "
        "interneurons, often involving axial muscles; can be psychogenic or organic.",
        "Central Pattern Generators (CPGs): Located in the lumbar spinal cord (L1-L2 in humans); "
        "networks of propriospinal interneurons that generate rhythmic locomotor patterns independently of "
        "supraspinal input. Basis for epidural stimulation therapy in spinal cord injury rehabilitation.",
    ], S))

    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # SECTION 8: TRACT OF LISSAUER
    # ══════════════════════════════════════════════════════════════════════════
    story.extend(section_header("8. TRACT OF LISSAUER (POSTEROLATERAL TRACT)", S))
    story.append(Paragraph(
        "The posterolateral tract of Lissauer (zone of Lissauer, Lissauer's marginal zone) is a small "
        "bundle of thinly myelinated (Aδ) and unmyelinated (C) fibers located in the white matter between "
        "the tip of the posterior horn and the surface of the spinal cord. It separates the dorsal gray "
        "column from the surface of the spinal cord.", S['body']))

    story.append(Paragraph("Composition:", S['h3']))
    story.append(Paragraph(
        "&#9679; Primary afferent fibers (Aδ and C fibers) carrying pain, temperature, and itch",
        S['bullet']))
    story.append(Paragraph(
        "&#9679; Short ascending and descending branches of incoming dorsal root fibers",
        S['bullet']))
    story.append(Paragraph(
        "&#9679; Propriospinal axons of Lissauer's tract neurons",
        S['bullet']))
    story.append(Paragraph(
        "&#9679; Contains both pain-carrying and descending modulatory fibers",
        S['bullet']))

    story.append(Paragraph("Function:", S['h3']))
    story.append(Paragraph(
        "After entering the spinal cord via the lateral bundle of the posterior root, small-diameter "
        "pain/temperature fibers bifurcate into short ascending and descending branches within Lissauer's "
        "tract before synapsing on dorsal horn neurons in laminae I and II. This allows each incoming "
        "fiber to synapse on neurons over 1-2 spinal cord segments - an important mechanism for "
        "divergence of sensory input.", S['body']))

    story.extend(clinical_box("Lissauer's Tract - Clinical Note", [
        "The crossing of STT fibers through the anterior commissure takes place over 2-3 spinal cord segments. "
        "This is clinically important: after cordotomy (surgical section of the STT for pain relief), "
        "the surgeon must cut 2-3 segments ABOVE the painful dermatome to achieve adequate analgesia.",
        "The spread of syrinx (syringomyelia) destroys the anterior commissure crossing fibers → "
        "bilateral suspended sensory loss for pain/temperature at the level of the syrinx.",
    ], S))

    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # SECTION 9: VASCULAR SUPPLY
    # ══════════════════════════════════════════════════════════════════════════
    story.extend(section_header("9. VASCULAR SUPPLY OF THE SPINAL CORD", S))
    story.append(Paragraph(
        "The spinal cord has a relatively precarious vascular supply, making it vulnerable to ischemia.", S['body']))

    story.append(Paragraph("Arteries:", S['h3']))
    vasc_rows = [
        ["Artery", "Origin", "Territory", "Clinical Note"],
        ["Anterior Spinal Artery (ASA)", "Formed by convergence of 2 branches from vertebral arteries at foramen magnum; supplemented by radicular arteries",
         "Anterior 2/3 of spinal cord: corticospinal tracts, STT, anterior and lateral horns",
         "Most clinically important; supplies the motor and pain tracts"],
        ["Posterior Spinal Arteries (PSA) x2", "Vertebral arteries or PICA; continuous from medulla to conus",
         "Posterior 1/3 of spinal cord: posterior columns (fasciculus gracilis, cuneatus)",
         "Richer anastomotic network; less vulnerable to ischemia"],
        ["Artery of Adamkiewicz (Great anterior radicular artery)", "Usually from left T8-L2 intercostal or lumbar artery",
         "Critical reinforcement of ASA in thoracolumbar region",
         "Damage during aortic surgery → anterior spinal artery syndrome"],
        ["Radicular (segmental) arteries", "Aorta → intercostal/lumbar → radicular arteries",
         "Reinforce spinal arteries at various levels",
         "Most important: C5-C6 level, T1, and artery of Adamkiewicz"],
    ]
    story.append(info_table(vasc_rows[0], vasc_rows[1:], [38*mm, 42*mm, 42*mm, 43*mm]))
    story.append(Spacer(1, 6))

    story.extend(clinical_box("Anterior Spinal Artery Syndrome", [
        "Caused by occlusion of the anterior spinal artery (thrombosis, aortic dissection, "
        "aortic surgery, hypotension, vasculitis).",
        "Clinical features: Acute flaccid paralysis (later spastic), loss of pain and temperature sensation "
        "BELOW the level of the lesion (bilaterally), but PRESERVED vibration and proprioception "
        "(posterior columns spared) - classic dissociated sensory loss.",
        "Bladder and bowel dysfunction, autonomic disturbance.",
        "Pattern: PARALYSIS + PAIN/TEMP LOSS + PRESERVED PROPRIOCEPTION/VIBRATION.",
    ], S))

    story.extend(clinical_box("Posterior Spinal Artery Syndrome (Rare)", [
        "Occlusion of posterior spinal arteries: Loss of vibration, proprioception, and fine touch "
        "bilaterally BELOW the lesion. Motor function and pain/temperature PRESERVED.",
        "Far less common due to rich anastomotic network.",
    ], S))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # SECTION 10: CLINICAL CORRELATES
    # ══════════════════════════════════════════════════════════════════════════
    story.extend(section_header("10. CLINICAL CORRELATES & SPINAL CORD SYNDROMES", S))

    story.append(Paragraph(
        "Understanding the precise location of each tract allows precise anatomical localization of "
        "spinal cord lesions based on the pattern of neurological deficits.", S['body']))

    # Brown-Sequard
    story.append(Paragraph("10A. BROWN-SEQUARD SYNDROME (Spinal Cord Hemisection)", S['h2']))
    story.append(Paragraph(
        "Brown-Sequard syndrome results from hemisection (damage to one half) of the spinal cord. "
        "It is the classic example of dissociated sensory loss across the midline.", S['body']))

    bs_rows = [
        ["Finding", "Side", "Mechanism"],
        ["Ipsilateral spastic paralysis (UMN)", "SAME side as lesion, BELOW level",
         "Lateral corticospinal tract is ipsilateral (already decussated in medulla)"],
        ["Ipsilateral loss of fine touch, vibration, proprioception", "SAME side as lesion, BELOW level",
         "Posterior columns are ipsilateral (decussate in medulla)"],
        ["Contralateral loss of pain and temperature", "OPPOSITE side as lesion, BELOW level",
         "Spinothalamic tract crosses in anterior commissure 2-3 segments above entry"],
        ["Ipsilateral LMN signs AT the level of lesion", "SAME side, AT the level",
         "Anterior horn cell destruction at the level of injury"],
        ["Ipsilateral loss of all sensation AT the level", "SAME side, AT the level",
         "Dorsal root entry zone and posterior horn destruction"],
        ["Ipsilateral Horner's syndrome", "SAME side (if cervical lesion)",
         "Disruption of descending sympathetic fibers in ventral funiculus"],
    ]
    story.append(info_table(bs_rows[0], bs_rows[1:], [50*mm, 38*mm, 77*mm]))
    story.append(Spacer(1, 4))

    story.append(Paragraph(
        "Causes: Penetrating (stab wounds), herniated disc, tumor (primary/metastatic), multiple sclerosis, "
        "spinal cord ischemia, hematomyelia, spinal cord herniation, post-traumatic arachnoiditis.",
        S['note']))

    # Central Cord
    story.append(Paragraph("10B. CENTRAL CORD SYNDROME", S['h2']))
    story.append(Paragraph(
        "Central cord syndrome results from damage to the central portions of the spinal cord. "
        "The most common incomplete spinal cord injury pattern (50% of all incomplete injuries).", S['body']))

    story.append(Paragraph(
        "The classic presentation: arm weakness > leg weakness (because lateral CST fibers for the "
        "arm are medial and thus closer to the center; leg fibers are more lateral and sometimes spared). "
        "Bladder dysfunction (retention). Variable sensory loss below lesion.", S['body']))

    story.append(Paragraph(
        "Causes: Hyperextension injury in elderly with pre-existing spondylosis (most common), "
        "syringomyelia, hydromyelia, intramedullary tumors, hematomyelia.", S['note']))

    story.extend(clinical_box("Syringomyelia", [
        "A cystic cavity (syrinx) forms within the spinal cord, typically in the cervical region. "
        "The syrinx destroys the anterior commissure (crossing STT fibers) → bilateral suspended sensory "
        "loss for pain and temperature in a 'cape' or 'vest' distribution (upper back, arms, shoulders) - "
        "pain and temperature lost bilaterally at the level of the syrinx, but preserved above and below.",
        "As the syrinx expands: anterior horn → wasting of intrinsic hand muscles (LMN weakness); "
        "lateral horn (T1-L2) → Horner's syndrome (ptosis, miosis, anhidrosis); "
        "posterior columns → late vibration/proprioception loss; "
        "corticospinal tracts → spastic paraparesis.",
        "Associated with Chiari malformation (Type I), trauma, spinal tumors, arachnoiditis.",
        "Charcot joints (neuropathic arthropathy): Pain-insensate joints develop destructive arthropathy.",
    ], S))

    # Complete Cord
    story.append(Paragraph("10C. COMPLETE CORD TRANSECTION", S['h2']))
    story.append(Paragraph(
        "Complete transection (or destruction) of the spinal cord at any level produces:", S['body']))
    story.append(Paragraph("&#9679; Loss of ALL sensation below the level of the lesion (bilateral)", S['bullet']))
    story.append(Paragraph("&#9679; Complete flaccid paralysis initially (spinal shock) → later spastic paraplegia/tetraplegia", S['bullet']))
    story.append(Paragraph("&#9679; Loss of bladder, bowel, and sexual function", S['bullet']))
    story.append(Paragraph("&#9679; Loss of autonomic function below the lesion", S['bullet']))
    story.append(Paragraph("&#9679; Autonomic dysreflexia (if T6 or above): dangerous hypertensive episodes triggered by stimuli below the lesion", S['bullet']))

    story.extend(clinical_box("Autonomic Dysreflexia", [
        "A medical emergency in patients with spinal cord injuries at T6 or above. Triggered by noxious "
        "stimuli below the lesion (full bladder, impacted feces, pressure sores). "
        "Massive, uncontrolled sympathetic discharge below the lesion → severe hypertension. "
        "Bradycardia, sweating, flushing above the lesion (compensatory vagal response). "
        "Treatment: sit patient upright, identify and remove the trigger (most often urinary catheter blockage).",
    ], S))

    # Anterior and Posterior
    story.append(Paragraph("10D. ANTERIOR CORD SYNDROME", S['h2']))
    story.append(Paragraph(
        "Damage to the anterior 2/3 of the spinal cord. Typically caused by anterior spinal artery occlusion "
        "or anterior cord compression. Features: bilateral loss of motor function (corticospinal), bilateral "
        "loss of pain and temperature (STT), preserved posterior column functions (vibration, proprioception, "
        "fine touch). This is the pattern of anterior spinal artery syndrome.", S['body']))

    story.append(Paragraph("10E. POSTERIOR CORD SYNDROME", S['h2']))
    story.append(Paragraph(
        "Damage isolated to the posterior columns. Rare. Causes: posterior spinal artery occlusion, "
        "vitamin B12 deficiency (subacute combined degeneration - also involves lateral columns), "
        "syphilis (tabes dorsalis). Features: bilateral loss of vibration, proprioception, fine touch "
        "below the lesion. Motor function and pain/temperature preserved.", S['body']))

    story.extend(clinical_box("Tabes Dorsalis (Neurosyphilis)", [
        "Syphilitic degeneration of the posterior columns and posterior nerve roots. "
        "Features: Lightning pains (sudden, sharp shooting pains in legs), "
        "progressive sensory ataxia, Romberg's sign positive, wide-based gait, "
        "absent deep tendon reflexes, Charcot joints, bladder dysfunction (atonic bladder), "
        "positive Argyll Robertson pupils (accommodate but do not react to light - 'prostitute's pupil').",
        "Sensory loss: vibration, proprioception, fine touch (posterior column); pain/temp relatively preserved.",
    ], S))

    story.extend(clinical_box("Subacute Combined Degeneration of Spinal Cord (SACD)", [
        "Vitamin B12 (cobalamin) deficiency causes demyelination of posterior columns AND lateral "
        "columns (corticospinal tracts). Causes: pernicious anaemia, strict veganism, gastric surgery, "
        "nitrous oxide anesthesia (oxidizes B12).",
        "Features: Posterior column signs (vibration/proprioception loss, sensory ataxia, Romberg positive) "
        "+ UMN signs (spastic paraparesis, hyperreflexia, extensor plantars) - unique combination.",
        "Initially hyporeflexia (peripheral neuropathy can coexist), then hyperreflexia as cord disease worsens.",
        "SACD = BOTH posterior AND lateral columns (hence 'combined').",
        "Treatment: Intramuscular B12 replacement (hydroxocobalamin).",
    ], S))
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════════════
    # SECTION 11: SUMMARY TABLES
    # ══════════════════════════════════════════════════════════════════════════
    story.extend(section_header("11. SUMMARY TABLES", S))

    story.append(Paragraph("Complete Summary of All Spinal Cord Tracts", S['h2']))

    all_tracts = [
        ["Tract", "Type", "Funiculus", "Crosses?", "Modality/Function"],
        # Ascending
        ["Lateral Spinothalamic", "Ascending", "Lateral", "YES - ant. commissure (2-3 seg)", "Pain, temperature"],
        ["Anterior Spinothalamic", "Ascending", "Anterior", "YES - ant. commissure", "Crude touch, pressure"],
        ["Spinoreticular", "Ascending", "Anterolateral", "Bilateral", "Affective pain (suffering)"],
        ["Spinomesencephalic", "Ascending", "Anterolateral", "Partially", "Pain modulation, reflex orientation"],
        ["Fasciculus Gracilis", "Ascending", "Posterior (medial)", "NO (crosses in medulla)", "Proprioception/vibration/fine touch (lower body)"],
        ["Fasciculus Cuneatus", "Ascending", "Posterior (lateral)", "NO (crosses in medulla)", "Proprioception/vibration/fine touch (upper body)"],
        ["Post. Spinocerebellar", "Ascending", "Lateral (posterior)", "NO (ipsilateral)", "Subconscious proprioception (lower limb)"],
        ["Ant. Spinocerebellar", "Ascending", "Lateral (anterior)", "DOUBLE cross (net ipsilateral)", "Subconscious proprioception (lower limb, spinal cord activity)"],
        # Descending
        ["Lateral Corticospinal", "Descending", "Lateral", "YES - pyramidal decussation (medulla)", "Voluntary skilled movement (contralateral)"],
        ["Anterior Corticospinal", "Descending", "Anterior", "YES - at level in cord", "Axial/proximal muscle control (bilateral)"],
        ["Rubrospinal", "Descending", "Lateral", "YES - midbrain (ventral tegmental dec.)", "Flexor facilitation upper limb"],
        ["Lateral Vestibulospinal", "Descending", "Anterior", "NO (ipsilateral)", "Extensor tone, balance (antigravity)"],
        ["Medial Vestibulospinal", "Descending", "Anterior (MLF)", "Bilateral", "Head-neck righting reflexes"],
        ["Pontine Reticulospinal", "Descending", "Anterior", "NO (ipsilateral)", "Facilitates extensors"],
        ["Medullary Reticulospinal", "Descending", "Lateral", "Bilateral", "Inhibits LMNs, pain modulation"],
        ["Tectospinal", "Descending", "Anterior (medial)", "YES - midbrain (dorsal tegmental dec.)", "Reflex head-eye orientation (visual/auditory)"],
        # Intersegmental
        ["Fasciculus Proprius", "Both", "All (surrounds gray)", "Both ipsi and contra", "Intersegmental coordination, CPG, spinal reflexes"],
        ["Tract of Lissauer", "Both (local)", "Posterior (lateral tip)", "NO (stays within 1-2 segments)", "Entry zone for Aδ/C fibers, divergence of pain input"],
    ]
    story.append(info_table(all_tracts[0], all_tracts[1:], [38*mm, 20*mm, 22*mm, 40*mm, 45*mm]))
    story.append(Spacer(1, 10))

    story.append(Paragraph("Spinal Cord Syndrome Comparison", S['h2']))
    syn_rows = [
        ["Syndrome", "Motor", "Pain/Temp", "Vibration/Proprioception", "Cause"],
        ["Brown-Sequard", "Ipsilateral↓ UMN (below); ipsilateral LMN (at level)",
         "Contralateral↓ (below)", "Ipsilateral↓ (below)",
         "Hemisection: stab, MS, tumor"],
        ["Central Cord", "Arms > legs weakness (UMN)",
         "Bilateral loss (cape-like, at level of syrinx if syringomyelia)",
         "Variable", "Hyperextension, syringomyelia, intramedullary tumor"],
        ["Anterior Cord / ASA", "Bilateral↓ UMN (below)",
         "Bilateral↓ (below)", "PRESERVED",
         "Anterior spinal artery occlusion, aortic surgery"],
        ["Posterior Cord", "NORMAL",
         "NORMAL", "Bilateral↓",
         "Vit B12 deficiency, tabes dorsalis, PSA occlusion"],
        ["Complete Transection", "Bilateral↓ (all below)",
         "Bilateral↓ (all below)", "Bilateral↓",
         "Trauma, tumor, infarction"],
        ["Cauda Equina", "Flaccid↓ (LMN) saddle",
         "Saddle anesthesia", "Saddle loss",
         "Disc prolapse L4/L5, tumor, abscess"],
    ]
    story.append(info_table(syn_rows[0], syn_rows[1:], [32*mm, 33*mm, 33*mm, 33*mm, 34*mm]))
    story.append(Spacer(1, 10))

    story.append(Paragraph("UMN vs LMN Features - Quick Reference", S['h2']))
    ulmn_rows = [
        ["Feature", "UMN Lesion", "LMN Lesion"],
        ["Tone", "Increased (spasticity)", "Decreased (flaccidity)"],
        ["Reflexes (DTR)", "Increased (hyperreflexia)", "Decreased/absent (hypo/areflexia)"],
        ["Plantar response", "Upgoing (Babinski positive)", "Downgoing (normal/mute)"],
        ["Clonus", "Present", "Absent"],
        ["Muscle wasting", "Absent (disuse only)", "Present (neurogenic atrophy, fasciculations)"],
        ["Fasciculations", "Absent", "Present"],
        ["Fibrillations (EMG)", "Absent", "Present"],
        ["Distribution", "Widespread/pyramidal pattern", "Focal/segmental pattern"],
        ["Lesion location", "Brain, brainstem, spinal cord white matter", "Anterior horn, nerve root, peripheral nerve"],
    ]
    story.append(info_table(ulmn_rows[0], ulmn_rows[1:], [50*mm, 57*mm, 58*mm]))
    story.append(Spacer(1, 8))

    # Footer
    story.append(HRFlowable(width="100%", thickness=1, color=MED_BLUE))
    story.append(Spacer(1, 4))
    story.append(Paragraph(
        "Sources: Gray's Anatomy for Students (Elsevier) | Neuroanatomy through Clinical Cases 3rd Ed (Haines) | "
        "Localization in Clinical Neurology 8th Ed | Neuroscience: Exploring the Brain 5th Ed | "
        "Histology: A Text and Atlas (Pawlina) | Bradley and Daroff's Neurology in Clinical Practice | "
        "Compiled by Orris Medical Library, July 2026",
        ParagraphStyle('footer', fontName='Helvetica-Oblique', fontSize=8,
                       textColor=MED_GRAY, alignment=TA_CENTER, leading=11)))

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

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

cd /home/daytona/workspace/spinal-cord-pdf && python generate_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/spinal-cord-pdf/Spinal_Cord_Complete_Guide.pdf

Here is the complete, detailed explanation of the spinal cord, its tracts, and all clinical correlates - compiled from authoritative neuroanatomy textbooks (Gray's Anatomy for Students, Neuroanatomy through Clinical Cases, Localization in Clinical Neurology, Neuroscience: Exploring the Brain, and Bradley and Daroff's Neurology in Clinical Practice).

[Download the full PDF here]

Spinal Cord Complete Guide

PDF Document · PDF


OVERVIEW & GENERAL ANATOMY

The spinal cord is a cylindrical CNS structure continuous with the medulla oblongata at the foramen magnum. In adults it extends to LI-LII (conus medullaris), while in newborns it reaches LII-LIII. Length is ~40-45 cm; weight ~30 g. It has 31 pairs of spinal nerves (8 cervical, 12 thoracic, 5 lumbar, 5 sacral, 1 coccygeal). Two enlargements supply the limbs: the cervical enlargement (C5-T1, for the brachial plexus) and the lumbosacral enlargement (L1-S2, for the lumbosacral plexus).

SPINAL MENINGES

Three concentric layers surround the cord:
  • Dura mater: extends to S2, separated from bone by the epidural space (site of epidural anaesthesia)
  • Arachnoid mater: the subdural space beneath it is a potential space; the subarachnoid space (CSF) extends to S2
  • Pia mater: adherent to cord surface; forms the 21-pair denticulate ligaments (anchor the cord) and the filum terminale
Clinical - Lumbar Puncture: The cord ends at L1-L2, but the subarachnoid space continues to S2. LP is safely done at L3-L4 or L4-L5. Needle passes: skin → supraspinous lig → interspinous lig → ligamentum flavum → epidural space → dura → arachnoid → subarachnoid space (CSF here).

EXTERNAL FEATURES

FeatureLocationNotes
Anterior median fissureAnterior midlineDeep; contains anterior spinal artery
Posterior median sulcusPosterior midlineShallow; continued by posterior median septum
Posterolateral sulcusBilateral posteriorEntry of dorsal roots
Anterolateral sulcusBilateral anteriorExit of ventral roots
Posterior intermediate sulcusCervical cord onlySeparates gracilis from cuneatus

INTERNAL FEATURES

Gray Matter (H-shaped):
  • Anterior (ventral) horn: alpha-motor neurons (extrafusal fibers) + gamma-motor neurons (intrafusal spindle fibers). Somatotopy: flexors dorsal to extensors; distal muscles lateral to proximal.
  • Posterior (dorsal) horn: sensory interneurons
  • Lateral horn (T1-L2, S2-S4): preganglionic sympathetics (T1-L2) and parasympathetics (S2-S4)
Rexed's Laminae (I-X):
LaminaNucleusKey Function
IMarginal zoneAδ/C pain/temp; STT origin
IISubstantia gelatinosaGate control; pain modulation; opioid receptors
III-IVNucleus propriusTouch, pressure
VNucleus reticularisWide dynamic range neurons; STT origin
VIBase of dorsal hornProprioception (present mainly in enlargements)
VIIClarke's nucleus + IMLPSCT origin (Clarke's C8-L2); preganglionic sympathetics
VIIICommissural nucleusInterneurons; vestibulo/reticulospinal input
IXMotor nucleiAlpha + gamma LMNs
XGrisea centralisAround central canal; visceral afferents
White Matter Funiculi:
  • Posterior funiculus: fasciculus gracilis (medial, lower body) + fasciculus cuneatus (lateral, upper body)
  • Lateral funiculus: mixed (lateral CST descending; spinothalamic + spinocerebellar ascending; rubrospinal)
  • Anterior funiculus: anterior CST, vestibulospinal, reticulospinal, tectospinal, anterior STT

ASCENDING TRACTS

All conscious sensory pathways follow a 3-neuron chain: DRG (1st) → thalamus/brainstem (2nd, crosses) → cortex (3rd).

Anterolateral System (ALS)

1. Lateral Spinothalamic Tract (Neospinothalamic)
  • Modality: Sharp, well-localized pain + temperature
  • 1st neuron: DRG → posterior root → Lissauer's tract (ascends/descends 1-2 seg) → synapses lamina I and V
  • 2nd neuron: Crosses in anterior commissure (obliquely, over 2-3 segments) → contralateral anterolateral tract → VPL nucleus of thalamus
  • 3rd neuron: VPL → posterior limb internal capsule → somatosensory cortex (areas 3,1,2)
  • Somatotopy in cord: Sacral fibers most lateral, cervical most medial
2. Anterior Spinothalamic Tract
  • Modality: Crude touch, tickle, pressure
  • Similar pathway; some bilateral representation → crude touch may be preserved in unilateral cord lesions
3. Spinoreticular Tract (Paleospinothalamic)
  • Modality: Poorly localized, dull, burning pain (the "suffering" component)
  • 2nd neuron ends in brainstem reticular formation → intralaminar thalamic nuclei → diffuse cortex
  • Explains why lesions of medial thalamus relieve suffering but not sharp pain
4. Spinomesencephalic Tract
  • 2nd neuron ends in periaqueductal gray (PAG) and superior colliculus
  • PAG: endogenous pain modulation (descending inhibition)
  • Superior colliculus: reflex orientation to painful stimuli
Clinical - Gate Control Theory: Aβ fibers (touch) activate SG interneurons that inhibit C/Aδ pain transmission. Basis for TENS therapy.
Clinical - STT lesion: Contralateral pain/temperature loss below lesion. Anterior commissure lesion (syringomyelia): BILATERAL suspended pain/temp loss.

Posterior Column - Medial Lemniscal Pathway (DCML)

  • Modality: Fine touch, vibration, conscious proprioception, two-point discrimination, stereognosis, graphesthesia
  • Key: Crosses in medulla, NOT spinal cord → spinal lesion = ipsilateral loss
NeuronLocationCourse
1stDRG (large Aα, Aβ fibers)Enters cord via medial bundle → ascends ipsilaterally in posterior funiculus (gracilis = lower body T7 below; cuneatus = upper body above T6)
2ndNucleus gracilis / Nucleus cuneatus (caudal medulla)Internal arcuate fibers cross at sensory decussation → medial lemniscus → VPL thalamus
3rdVPL thalamusPosterior limb internal capsule → S1 cortex
Clinical: Posterior column lesion → sensory ataxia, positive Romberg's sign (falls with eyes closed), Lhermitte's sign (neck flexion → electric shock sensation - classic in MS). Tabes dorsalis (syphilis): posterior column degeneration + lightning pains + Argyll Robertson pupils + Charcot joints.

Spinocerebellar Tracts (Subconscious Proprioception)

TractOriginCrosses?Enters CerebellumFunction
Posterior SCTClarke's nucleus (C8-L2)NO (ipsilateral)ICPLower limb subconscious proprioception
Anterior SCTSpinal border cells (lumbosacral)Twice (net ipsilateral)SCPLower limb + spinal cord activity
CuneocerebellarAccessory cuneate nucleus (medulla)NOICPUpper limb subconscious proprioception
Rostral SCTCervical laminae V-VIIMostly NOICP + SCPUpper limb
Clinical: Friedreich's Ataxia (GAA repeat, frataxin gene) - PSCT + posterior columns + CST degeneration → progressive cerebellar + sensory ataxia, areflexia, cardiomyopathy.

DESCENDING TRACTS

Lateral Motor System (controls extremity skilled movement)

1. Lateral Corticospinal Tract (Pyramidal Tract) - most clinically important
  • Origin: M1 (area 4, ~30%), premotor (area 6, ~30%), S1 (areas 3,1,2, ~40%)
  • Course: corona radiata → posterior limb of internal capsule → crus cerebri → scattered in pons → pyramids of medulla → pyramidal decussation (caudal medulla, ~85-90% cross) → lateral funiculus → lamina IX (LMN)
  • Somatotopy: arm fibers medial, leg fibers lateral in lateral column
Clinical UMN lesion: Spastic paralysis, hyperreflexia, Babinski sign (extensor plantar), clonus, clasp-knife rigidity, no wasting. Initial flaccidity in spinal shock (days to weeks), then spasticity.
2. Rubrospinal Tract
  • Origin: Red nucleus (midbrain); crosses immediately (ventral tegmental decussation = Forel's decussation)
  • Descends only to cervical cord; facilitates flexors, inhibits extensors of upper limb

Medial Motor System (controls axial/postural muscles, bilateral)

3. Anterior Corticospinal Tract
  • The ~10-15% of corticospinal fibers that did NOT decussate at medulla
  • Descends in anterior funiculus to upper thoracic cord → crosses in anterior white commissure at level of termination
  • Controls axial and proximal muscles bilaterally
4. Lateral Vestibulospinal Tract
  • Origin: Deiters' nucleus (lateral vestibular nucleus); uncrossed; full cord length
  • Facilitates extensors (antigravity), inhibits flexors → maintains upright posture
5. Medial Vestibulospinal Tract
  • Origin: Medial vestibular nucleus; bilateral; only cervical cord (via MLF)
  • Head-neck righting reflexes; head stabilization
6. Pontine (Medial) Reticulospinal Tract
  • Uncrossed; anterior funiculus; facilitates extensor LMNs
7. Medullary (Lateral) Reticulospinal Tract
  • Bilateral; lateral funiculus; inhibits LMNs; pain modulation (endogenous opioids)
8. Tectospinal Tract
  • Origin: Superior colliculus; crosses (dorsal tegmental = Meynert's decussation); medial anterior funiculus; only upper cervical (C4 and above)
  • Reflex head-eye orientation toward visual/auditory stimuli
Clinical: Decerebrate rigidity (midbrain lesion) - all 4 limbs extended, jaw clenched = unopposed lateral vestibulospinal + pontine reticulospinal (extensors). Decorticate rigidity (cortical lesion) - arms flexed, legs extended = intact vestibulospinal + rubrospinal, disrupted CST. Spasticity from disruption of corticospinal + medullary reticulospinal (inhibitory) tracts leaving pontine reticulospinal/vestibulospinal unopposed.

INTERSEGMENTAL TRACTS (Fasciculus Proprius)

The fasciculus proprius (propriospinal tract) is a sleeve of white matter directly surrounding the gray matter, present in all three funiculi (most prominent anteriorly). It consists of short and long propriospinal interneuron axons running between cord segments - both ascending and descending, ipsilateral and contralateral.
Functions:
  • Multi-segmental reflex coordination (scratch reflex, flexor reflex)
  • Coordination between cervical and lumbar enlargements during locomotion
  • Central Pattern Generators (CPGs) in L1-L2 for rhythmic locomotion
  • Autonomic coordination across segments
  • After spinal cord injury: long propriospinal neurons (LPNs) can serve as neural detour circuits for partial motor recovery - major target for rehabilitation research
Clinical: Propriospinal myoclonus (sudden axial jerks, may be psychogenic or organic). CPGs are the basis for epidural stimulation therapy in spinal cord injury rehabilitation.

TRACT OF LISSAUER (Posterolateral Tract)

Located at the tip of the dorsal horn between the posterior horn and the cord surface. Contains thinly myelinated Aδ and unmyelinated C fibers entering via the lateral bundle of the posterior root. Fibers bifurcate into ascending and descending branches spanning 1-2 segments before synapsing on laminae I and II. Allows divergence/spread of sensory input.
Clinical: The 2-3 segment spread of fibers in Lissauer's tract means that after cordotomy for pain relief, the surgeon must cut 2-3 segments above the painful dermatome.

VASCULAR SUPPLY

  • Anterior Spinal Artery (ASA): Supplies anterior 2/3 of cord (motor tracts + STT). Most clinically vulnerable.
  • Posterior Spinal Arteries (x2): Supply posterior 1/3 (posterior columns). Rich anastomotic network, less vulnerable.
  • Artery of Adamkiewicz: Usually from left T8-L2; critical reinforcement of ASA in thoracolumbar region. Vulnerable in aortic surgery.
Clinical - Anterior Spinal Artery Syndrome: Bilateral motor loss + bilateral pain/temperature loss BELOW lesion + PRESERVED vibration/proprioception (posterior columns intact). Pattern = paralysis + STT loss + intact DCML.

CLINICAL SYNDROMES SUMMARY

SyndromeMotorPain/TempVibration/PropCause
Brown-SequardIpsilateral UMN below; LMN at levelContralateral belowIpsilateral belowHemisection: stab, MS, tumor
Central CordArms > legs weaknessBilateral cape-like (at level)VariableHyperextension, syringomyelia
Anterior Cord (ASA)Bilateral belowBilateral belowPRESERVEDASA occlusion, aortic surgery
Posterior CordNormalNormalBilateral lossB12 deficiency, tabes dorsalis
Complete TransectionAll belowAll belowAll belowTrauma, tumor
Cauda EquinaFlaccid LMN (saddle)Saddle lossSaddle lossDisc prolapse L4/5, tumor

Key Clinical Distinctions:
  • UMN lesion: Spasticity, hyperreflexia, Babinski positive, clonus, no wasting
  • LMN lesion: Flaccidity, areflexia, downgoing plantar, wasting, fasciculations
  • Syringomyelia: Bilateral suspended pain/temp loss (cape distribution) - anterior commissure destroyed; spares posterior columns early
  • SACD (B12 deficiency): Posterior + lateral column combined - UMN + sensory ataxia
  • Tabes dorsalis: Posterior columns only - sensory ataxia, lightning pains, Argyll Robertson pupils
  • Autonomic dysreflexia: Emergency in T6+ injuries - hypertensive crisis from sublesional noxious stimulus

Sources: Gray's Anatomy for Students (Elsevier) | Neuroanatomy through Clinical Cases 3rd Ed (Haines) | Localization in Clinical Neurology 8th Ed | Neuroscience: Exploring the Brain 5th Ed | Bradley and Daroff's Neurology in Clinical Practice
This is a shared conversation. Sign in to Orris to start your own chat.