Give me a structured, organized, simple and categorized, overview of all the muscles of Head, Neck and Face step-by-step with short headings along with their basic actions and nerve supply easier for me to understand.

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
I now have comprehensive data from the textbooks on facial expression muscles and mastication muscles. I have enough from the sources to build a thorough, well-organized overview. Let me now compile the complete structured guide from my knowledge (well-supported by the textbook data retrieved).

Muscles of the Head, Neck & Face - Complete Structured Overview


SECTION 1: MUSCLES OF FACIAL EXPRESSION

All innervated by CN VII (Facial Nerve). They arise from the 2nd branchial arch and insert into skin.

1.1 Scalp & Forehead

MuscleActionNerve Branch (CN VII)
Frontalis (anterior belly of occipitofrontalis)Raises eyebrows; creates horizontal forehead linesTemporal branch
Occipitalis (posterior belly)Pulls scalp backwardPosterior auricular branch
Temporoparietalis (auriculares ant. & sup.)Draws temporal skin back; moves earTemporal branch
Auricularis posteriorPulls ear backwardPosterior auricular branch

1.2 Eye Region (Periorbital)

MuscleActionNerve Branch (CN VII)
Orbicularis oculi (orbital part)Tight/forceful eye closureTemporal + Zygomatic branches
Orbicularis oculi (palpebral part)Gentle closure, blinking, tear drainageTemporal (upper) + Zygomatic (lower)
Corrugator superciliiDraws brows medially and down - creates "scowl/furrowed" lookTemporal branch
ProcerusPulls nasal skin up; creates "bunny lines" and shortens noseZygomatic branch

1.3 Nose Region

MuscleActionNerve Branch (CN VII)
Nasalis (alar part)Flares nostrils (alar flaring and compression)Zygomatic branch
Nasalis (transverse part)Compresses nostrilsBuccal branch
Depressor septi nasiPulls columella down toward lipBuccal branch

1.4 Mouth & Cheek Region

MuscleActionNerve Branch (CN VII)
Zygomaticus majorElevates and retracts mouth angles (smiling)Zygomatic + Buccal branches
Zygomaticus minorElevates and retracts mouth anglesBuccal branch
Levator anguli orisElevates and retracts corners of mouthZygomatic + Buccal branches
Levator labii superiorisElevates upper lipBuccal branch
Levator labii superioris alaeque nasiElevates upper lip and flares nostrilBuccal branch
RisoriusRetracts and elevates mouth corners; creates dimpleBuccal + Marginal mandibular branches
BuccinatorPresses cheek against teeth; prevents cheek bulging; aids whistling and blowingBuccal branch
Orbicularis orisCloses and purses lips; puckering/kissingBuccal + Marginal mandibular branches

1.5 Lower Lip & Chin

MuscleActionNerve Branch (CN VII)
Depressor labii inferiorisDepresses and everts lower lipMarginal mandibular branch
Depressor anguli orisDepresses corners of mouth (frown)Marginal mandibular branch
MentalisEverts lower lip; raises chin skin ("pouting" chin)Marginal mandibular branch
PlatysmaDepresses mandible and lower lip; tenses neck skinCervical branch

SECTION 2: MUSCLES OF MASTICATION

All innervated by CN V3 (Mandibular division of Trigeminal Nerve) - motor branch.
MuscleAction
MasseterElevates mandible (closes jaw); clenching
TemporalisElevates mandible (closes jaw); posterior fibers retract mandible
Medial pterygoidElevates mandible; assists in lateral (side-to-side) movements
Lateral pterygoidOpens jaw (depresses mandible); protrudes mandible; lateral chewing movements
All four receive blood supply from branches of the maxillary artery.

SECTION 3: EXTRAOCULAR MUSCLES (Eye Movement)

Muscles that move the eyeball within the orbit.
MuscleActionNerve Supply
Superior rectusElevates eye; intorts; adductsCN III (Oculomotor)
Inferior rectusDepresses eye; extorts; adductsCN III (Oculomotor)
Medial rectusAdducts eye (moves toward nose)CN III (Oculomotor)
Inferior obliqueElevates; extorts; abductsCN III (Oculomotor)
Lateral rectusAbducts eye (moves toward ear)CN VI (Abducens)
Superior obliqueDepresses; intorts; abductsCN IV (Trochlear)
Levator palpebrae superiorisRaises upper eyelidCN III (Oculomotor); Sympathetic (superior tarsal)
Mnemonic: LR6 SO4 rest are 3 (Lateral Rectus = CN VI, Superior Oblique = CN IV, all others = CN III)

SECTION 4: MUSCLES OF THE TONGUE

Extrinsic muscles move the tongue; intrinsic muscles change its shape.

4.1 Extrinsic Tongue Muscles

MuscleActionNerve Supply
GenioglossusProtrudes tongue; depresses centerCN XII (Hypoglossal)
HyoglossusDepresses and retracts tongueCN XII (Hypoglossal)
StyloglossusRetracts and elevates tongue sidesCN XII (Hypoglossal)
PalatoglossusElevates tongue; narrows oropharyngeal isthmusCN X via pharyngeal plexus

4.2 Intrinsic Tongue Muscles

All 4 (superior/inferior longitudinal, transverse, vertical) are innervated by CN XII (Hypoglossal) and change the shape of the tongue (shorten, widen, curl, etc.).

SECTION 5: PHARYNGEAL & SOFT PALATE MUSCLES

5.1 Pharyngeal Constrictors

MuscleActionNerve Supply
Superior constrictorConstricts upper pharynx in swallowingCN X + CN IX via pharyngeal plexus
Middle constrictorConstricts mid-pharynxCN X via pharyngeal plexus
Inferior constrictorConstricts lower pharynx; important for voicingCN X via pharyngeal plexus

5.2 Longitudinal Pharyngeal Muscles

MuscleActionNerve Supply
StylopharyngeusElevates and widens pharynx/larynxCN IX (Glossopharyngeal) - unique!
PalatopharyngeusRaises larynx and pharynx; closes oropharynxCN X via pharyngeal plexus
SalpingopharyngeusElevates pharynx; opens auditory tubeCN X via pharyngeal plexus

5.3 Soft Palate Muscles

MuscleActionNerve Supply
Levator veli palatiniRaises soft palate to close nasopharynxCN X via pharyngeal plexus
Tensor veli palatiniTenses soft palate; opens Eustachian tubeCN V3 (Mandibular nerve)
Musculus uvulaeShortens/elevates uvulaCN X via pharyngeal plexus
PalatoglossusLowers soft palate; narrows faucesCN X via pharyngeal plexus
PalatopharyngeusElevates larynx and pharynxCN X via pharyngeal plexus
Note: Tensor veli palatini is the only palatal muscle innervated by CN V3 (not CN X).

SECTION 6: MUSCLES OF THE NECK

6.1 Superficial Neck Muscles

MuscleActionNerve Supply
PlatysmaDepresses mandible; tenses neck skinCN VII (Facial - cervical branch)
Sternocleidomastoid (SCM)Unilateral: tilts head to same side, rotates face to opposite side. Bilateral: flexes neck, raises sternum during forced inspirationCN XI (Accessory) + C2-C3 (proprioception)
Trapezius (upper fibers)Elevates and retracts scapula; extends head/neckCN XI (Accessory) + C3-C4

6.2 Suprahyoid Muscles (above hyoid)

All assist in opening the jaw and elevating the hyoid during swallowing.
MuscleActionNerve Supply
Digastric (anterior belly)Depresses mandible; raises hyoidCN V3 (mylohyoid nerve)
Digastric (posterior belly)Depresses mandible; raises hyoidCN VII (Facial)
MylohyoidElevates floor of mouth and hyoid; depresses mandibleCN V3 (mylohyoid nerve)
GeniohyoidElevates and protracts hyoid; depresses mandibleC1 via CN XII
StylohyoidElevates and retracts hyoidCN VII (Facial)

6.3 Infrahyoid "Strap" Muscles (below hyoid)

All depress the hyoid and larynx during swallowing/speaking. All innervated by Ansa cervicalis (C1-C3), except thyrohyoid.
MuscleActionNerve Supply
SternohyoidDepresses hyoidAnsa cervicalis (C1-C3)
SternothyroidDepresses thyroid cartilage and larynxAnsa cervicalis (C1-C3)
ThyrohyoidDepresses hyoid; elevates larynxC1 via CN XII
OmohyoidDepresses, retracts, and steadies hyoidAnsa cervicalis (C1-C3)
Mnemonic for infrahyoid: "Strap muscles = Ansa cervicalis" except thyrohyoid which is C1 via CN XII.

6.4 Anterior Vertebral (Deep Neck) Muscles

Act on the cervical spine.
MuscleActionNerve Supply
Longus capitisFlexes head and upper cervical spineC1-C4 (anterior rami)
Longus colliFlexes and rotates cervical spineC2-C6 (anterior rami)
Rectus capitis anteriorFlexes head at atlanto-occipital jointC1-C2
Rectus capitis lateralisLateral flexion of headC1

6.5 Scalene Muscles (Lateral Neck / Breathing)

MuscleActionNerve Supply
Scalenus anteriorElevates 1st rib; laterally flexes cervical spineC4-C6 (anterior rami)
Scalenus mediusElevates 1st rib; laterally flexes cervical spineC3-C8 (anterior rami)
Scalenus posteriorElevates 2nd rib; laterally flexes cervical spineC6-C8 (anterior rami)

6.6 Posterior (Suboccipital) Muscles of the Head

MuscleActionNerve Supply
Rectus capitis posterior majorExtends and rotates headSuboccipital nerve (C1 posterior ramus)
Rectus capitis posterior minorExtends head at atlanto-occipital jointSuboccipital nerve (C1 posterior ramus)
Obliquus capitis superiorExtends and laterally flexes headSuboccipital nerve (C1 posterior ramus)
Obliquus capitis inferiorRotates atlas (C1) on axis (C2)Suboccipital nerve (C1 posterior ramus)
Semispinalis capitisExtends head; rotates to opposite sideC1-C5 (dorsal rami)
Splenius capitisExtends and rotates head to same sideC2-C3 (dorsal rami)

QUICK NERVE SUPPLY SUMMARY

Cranial NerveMuscles Supplied
CN V3 (Mandibular)Muscles of mastication, tensor veli palatini, mylohyoid, anterior digastric
CN VII (Facial)All muscles of facial expression, posterior digastric, stylohyoid
CN IX (Glossopharyngeal)Stylopharyngeus only
CN X (Vagus)Pharyngeal constrictors, most palate muscles, palatoglossus
CN XI (Accessory)SCM, trapezius
CN XII (Hypoglossal)Most tongue muscles (extrinsic + intrinsic except palatoglossus)
CN III, IV, VIExtraocular muscles (see Section 3)
Ansa cervicalis (C1-C3)Infrahyoid strap muscles (except thyrohyoid)
C1 via CN XIIThyrohyoid, geniohyoid

Sources: Dermatology 2-Volume Set 5e (Elsevier); K.J. Lee's Essential Otolaryngology; General Anatomy and Musculoskeletal System - THIEME Atlas of Anatomy; Netter's Atlas of Human Anatomy

Generate a PDF quick reference card with muscle origins, insertions & actions

Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null && echo "---" && mkdir -p /home/dayt…

Writing File

~/muscles-ref-card/generate_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm
from reportlab.platypus import (
    SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer,
    HRFlowable, KeepTogether
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.platypus import PageBreak

OUTPUT = "/home/daytona/workspace/muscles-ref-card/Muscles_Head_Neck_Face_QuickRef.pdf"

# ── Colour palette ────────────────────────────────────────────────
C_DARK_BLUE   = colors.HexColor("#1a3a5c")
C_MID_BLUE    = colors.HexColor("#2b6cb0")
C_LIGHT_BLUE  = colors.HexColor("#ebf4ff")
C_ACCENT      = colors.HexColor("#e53e3e")
C_GOLD        = colors.HexColor("#d4a017")
C_SECTION_BG  = [
    colors.HexColor("#e8f0fe"),  # blue-ish  – face expression
    colors.HexColor("#fef3e8"),  # orange-ish – mastication
    colors.HexColor("#e8fef0"),  # green-ish – extraocular
    colors.HexColor("#fde8f0"),  # pink-ish  – tongue
    colors.HexColor("#f0e8fe"),  # purple-ish – pharynx/palate
    colors.HexColor("#e8fefe"),  # teal-ish  – neck
]
C_HDR = [
    colors.HexColor("#1a3a5c"),
    colors.HexColor("#7b3a10"),
    colors.HexColor("#1a5c3a"),
    colors.HexColor("#5c1a3a"),
    colors.HexColor("#3a1a5c"),
    colors.HexColor("#1a5c5c"),
]
C_WHITE = colors.white

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=10*mm, rightMargin=10*mm,
    topMargin=12*mm, bottomMargin=12*mm,
    title="Muscles of Head, Neck & Face – Quick Reference Card",
    author="Orris Medical"
)

styles = getSampleStyleSheet()

# Custom styles
title_style = ParagraphStyle(
    "CardTitle", fontSize=18, textColor=C_WHITE,
    alignment=TA_CENTER, fontName="Helvetica-Bold", leading=22
)
subtitle_style = ParagraphStyle(
    "CardSubtitle", fontSize=9, textColor=C_LIGHT_BLUE,
    alignment=TA_CENTER, fontName="Helvetica", leading=12
)
section_style = ParagraphStyle(
    "SectionTitle", fontSize=11, textColor=C_WHITE,
    alignment=TA_LEFT, fontName="Helvetica-Bold", leading=14,
    leftIndent=4
)
cell_bold = ParagraphStyle(
    "CellBold", fontSize=7, fontName="Helvetica-Bold",
    textColor=C_DARK_BLUE, leading=9, wordWrap='LTR'
)
cell_normal = ParagraphStyle(
    "CellNormal", fontSize=6.5, fontName="Helvetica",
    textColor=colors.HexColor("#222222"), leading=8.5, wordWrap='LTR'
)
cell_nerve = ParagraphStyle(
    "CellNerve", fontSize=6.5, fontName="Helvetica-Bold",
    textColor=C_ACCENT, leading=8.5, wordWrap='LTR'
)
note_style = ParagraphStyle(
    "Note", fontSize=7, fontName="Helvetica-Oblique",
    textColor=colors.HexColor("#555555"), leading=9
)
footer_style = ParagraphStyle(
    "Footer", fontSize=7, fontName="Helvetica",
    textColor=colors.HexColor("#888888"), alignment=TA_CENTER, leading=9
)

def B(text): return Paragraph(text, cell_bold)
def N(text): return Paragraph(text, cell_normal)
def NR(text): return Paragraph(text, cell_nerve)
def note(text): return Paragraph(text, note_style)

# ── Column widths for main table (A4 minus margins = 190mm) ───────
W = 190 * mm
COL = [32*mm, 35*mm, 35*mm, 40*mm, 28*mm]  # muscle | origin | insertion | action | nerve

COL_HDR = ["Muscle", "Origin", "Insertion", "Action(s)", "Nerve Supply"]

def make_table(rows, bg, hdr_bg):
    data = [[B(h) for h in COL_HDR]]
    for r in rows:
        data.append([
            B(r[0]),
            N(r[1]),
            N(r[2]),
            N(r[3]),
            NR(r[4]),
        ])
    t = Table(data, colWidths=COL, repeatRows=1)
    style_cmds = [
        ("BACKGROUND",    (0,0), (-1,0),  hdr_bg),
        ("TEXTCOLOR",     (0,0), (-1,0),  C_WHITE),
        ("FONTNAME",      (0,0), (-1,0),  "Helvetica-Bold"),
        ("FONTSIZE",      (0,0), (-1,0),  7.5),
        ("ROWBACKGROUNDS",(0,1), (-1,-1), [bg, C_WHITE]),
        ("GRID",          (0,0), (-1,-1), 0.3, colors.HexColor("#cccccc")),
        ("VALIGN",        (0,0), (-1,-1), "TOP"),
        ("TOPPADDING",    (0,0), (-1,-1), 2),
        ("BOTTOMPADDING", (0,0), (-1,-1), 2),
        ("LEFTPADDING",   (0,0), (-1,-1), 3),
        ("RIGHTPADDING",  (0,0), (-1,-1), 3),
    ]
    t.setStyle(TableStyle(style_cmds))
    return t

def section_header(text, bg):
    data = [[Paragraph(text, section_style)]]
    t = Table(data, colWidths=[W])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), bg),
        ("TOPPADDING",    (0,0), (-1,-1), 4),
        ("BOTTOMPADDING", (0,0), (-1,-1), 4),
        ("LEFTPADDING",   (0,0), (-1,-1), 6),
    ]))
    return t

# ════════════════════════════════════════════════════════════════
#  DATA
# ════════════════════════════════════════════════════════════════

sec1_facial = [
    # scalp/forehead
    ("Frontalis",
     "Galea aponeurotica (anterior)",
     "Skin of forehead, eyebrows; blends with procerus & corrugator",
     "Raises eyebrows; wrinkles forehead horizontally",
     "CN VII – Temporal br."),
    ("Occipitalis",
     "Superior nuchal line (lateral); mastoid process",
     "Galea aponeurotica (posterior)",
     "Pulls scalp backward",
     "CN VII – Posterior auricular br."),
    ("Corrugator supercilii",
     "Medial superciliary arch (frontal bone)",
     "Skin of medial eyebrow",
     "Draws brow medially & down; vertical glabellar lines ('scowl')",
     "CN VII – Temporal br."),
    ("Procerus",
     "Fascia over lower nasal bone & upper lateral nasal cartilage",
     "Skin between eyebrows",
     "Depresses medial brow; creates transverse nasal lines ('bunny lines')",
     "CN VII – Zygomatic br."),
    # eye
    ("Orbicularis oculi\n(orbital part)",
     "Medial orbital margin; medial palpebral ligament; lacrimal bone",
     "Encircles orbit; returns to origin",
     "Forceful tight eye closure",
     "CN VII – Temporal + Zygomatic br."),
    ("Orbicularis oculi\n(palpebral part)",
     "Medial palpebral ligament",
     "Lateral palpebral raphe",
     "Gentle eye closure; blinking; aids tear drainage",
     "CN VII – Temporal (upper) + Zygomatic (lower)"),
    # nose
    ("Nasalis (alar part)",
     "Maxilla (above lateral incisor)",
     "Alar cartilage & skin of nose",
     "Flares nostrils; dilates naris",
     "CN VII – Zygomatic br."),
    ("Nasalis (transverse)",
     "Maxilla (above canine)",
     "Aponeurosis across nasal bridge",
     "Compresses nostrils",
     "CN VII – Buccal br."),
    ("Depressor septi nasi",
     "Maxilla (above central incisor)",
     "Nasal septum & alar cartilage",
     "Pulls columella and nasal tip downward",
     "CN VII – Buccal br."),
    # mouth/cheek
    ("Zygomaticus major",
     "Zygomatic bone (lateral surface)",
     "Modiolus (angle of mouth)",
     "Draws angle of mouth upward & laterally (smiling)",
     "CN VII – Zygomatic + Buccal br."),
    ("Zygomaticus minor",
     "Zygomatic bone (anterior surface)",
     "Upper lip (lateral orbicularis)",
     "Elevates upper lip; deepens nasolabial fold",
     "CN VII – Buccal br."),
    ("Levator labii\nsuperioris",
     "Infraorbital margin of maxilla",
     "Upper lip (orbicularis oris)",
     "Elevates upper lip; deepens nasolabial fold",
     "CN VII – Buccal br."),
    ("Levator labii sup.\nalaeque nasi",
     "Frontal process of maxilla",
     "Upper lip & alar cartilage",
     "Elevates upper lip; flares nostril",
     "CN VII – Buccal br."),
    ("Levator anguli oris",
     "Canine fossa of maxilla (below infra-orbital foramen)",
     "Modiolus (angle of mouth)",
     "Raises angle of mouth (smile)",
     "CN VII – Zygomatic + Buccal br."),
    ("Buccinator",
     "Alveolar processes of maxilla & mandible; pterygomandibular raphe",
     "Modiolus; blends into orbicularis oris",
     "Compresses cheek; keeps food between teeth; aids whistling/blowing",
     "CN VII – Buccal br."),
    ("Risorius",
     "Parotid fascia; platysma",
     "Modiolus / skin at angle of mouth",
     "Retracts angle of mouth laterally (forced grin/dimple)",
     "CN VII – Buccal + Marginal mandibular br."),
    ("Orbicularis oris",
     "Modiolus & maxilla/mandible near midline (no bony origin; mostly muscular)",
     "Mucous membrane; skin of lips",
     "Closes & purses lips; puckering; kissing; aids speech",
     "CN VII – Buccal + Marginal mandibular br."),
    # lower lip/chin
    ("Depressor labii\ninferioris",
     "Mandible (between symphysis & mental foramen)",
     "Skin and mucosa of lower lip",
     "Depresses and everts lower lip",
     "CN VII – Marginal mandibular br."),
    ("Depressor anguli\noris",
     "Oblique line of mandible",
     "Modiolus (angle of mouth)",
     "Depresses corner of mouth (frowning)",
     "CN VII – Marginal mandibular br."),
    ("Mentalis",
     "Incisive fossa of mandible",
     "Skin of chin",
     "Everts lower lip; raises & wrinkles chin skin ('pouting')",
     "CN VII – Marginal mandibular br."),
    ("Platysma",
     "Fascia over pectoralis major & deltoid",
     "Mandible (lower border); skin of cheek & mouth angle; blends with depressor anguli oris",
     "Depresses mandible & lower lip; tenses neck skin; draws lower face downward",
     "CN VII – Cervical br."),
]

sec2_mastication = [
    ("Masseter",
     "Zygomatic arch (lower border & medial surface)",
     "Lateral surface of mandibular ramus & angle",
     "Elevates mandible (closes jaw); clenching; slight protrusion",
     "CN V3 – Masseteric n."),
    ("Temporalis",
     "Temporal fossa (floor) & temporal fascia",
     "Coronoid process & anterior ramus of mandible",
     "Elevates mandible; posterior fibers retract mandible",
     "CN V3 – Deep temporal nn."),
    ("Medial pterygoid",
     "Medial surface of lateral pterygoid plate; pterygoid fossa; pyramidal process of palatine bone",
     "Medial surface of mandibular angle & ramus",
     "Elevates mandible; assists in protrusion & lateral chewing movements",
     "CN V3 – Medial pterygoid n."),
    ("Lateral pterygoid\n(superior head)",
     "Infratemporal surface of greater wing of sphenoid",
     "Articular disc & capsule of TMJ",
     "Stabilises articular disc; involved in mouth opening & lateral jaw movements",
     "CN V3 – Lateral pterygoid n."),
    ("Lateral pterygoid\n(inferior head)",
     "Lateral surface of lateral pterygoid plate",
     "Pterygoid fovea (neck of mandibular condyle)",
     "Protrudes mandible; depresses (opens) jaw; lateral chewing",
     "CN V3 – Lateral pterygoid n."),
]

sec3_extraocular = [
    ("Superior rectus",
     "Common tendinous ring (annulus of Zinn)",
     "Sclera (superior surface, anterior to equator)",
     "Elevates eyeball; intorsion; adduction",
     "CN III – Oculomotor (superior div.)"),
    ("Inferior rectus",
     "Common tendinous ring",
     "Sclera (inferior surface)",
     "Depresses eyeball; extorsion; adduction",
     "CN III – Oculomotor (inferior div.)"),
    ("Medial rectus",
     "Common tendinous ring",
     "Sclera (medial surface)",
     "Adducts eyeball (moves toward nose)",
     "CN III – Oculomotor (inferior div.)"),
    ("Lateral rectus",
     "Common tendinous ring",
     "Sclera (lateral surface)",
     "Abducts eyeball (moves toward ear)",
     "CN VI – Abducens n."),
    ("Superior oblique",
     "Body of sphenoid (above optic canal)",
     "Sclera (posterolateral, via trochlea pulley)",
     "Depresses; intorts; abducts eyeball",
     "CN IV – Trochlear n."),
    ("Inferior oblique",
     "Orbital floor (lateral to nasolacrimal groove)",
     "Sclera (posterolateral surface)",
     "Elevates; extorts; abducts eyeball",
     "CN III – Oculomotor (inferior div.)"),
    ("Levator palpebrae\nsuperioris",
     "Lesser wing of sphenoid (above optic canal)",
     "Tarsal plate of upper eyelid; skin of upper lid",
     "Raises upper eyelid",
     "CN III (main); Sympathetic n. (superior tarsal / Müller's m.)"),
]

sec4_tongue = [
    ("Genioglossus",
     "Mental spine (superior genial tubercle) of mandible",
     "Dorsum of tongue (fan-shaped); body of hyoid",
     "Protrudes tongue; depresses centre; retracts tip",
     "CN XII – Hypoglossal n."),
    ("Hyoglossus",
     "Body & greater horn of hyoid bone",
     "Lateral sides of tongue",
     "Depresses and retracts tongue",
     "CN XII – Hypoglossal n."),
    ("Styloglossus",
     "Styloid process (anterior surface); stylohyoid ligament",
     "Lateral tongue (merges with hyoglossus)",
     "Retracts and elevates sides of tongue",
     "CN XII – Hypoglossal n."),
    ("Palatoglossus",
     "Palatine aponeurosis (soft palate undersurface)",
     "Lateral tongue",
     "Elevates tongue; narrows oropharyngeal isthmus",
     "CN X via pharyngeal plexus"),
    ("Intrinsic muscles\n(superior & inferior longitudinal, transverse, vertical)",
     "No bony attachments (within tongue substance)",
     "Within tongue substance",
     "Change shape: shorten/lengthen, widen/narrow, curl tip",
     "CN XII – Hypoglossal n."),
]

sec5_pharynx = [
    # constrictors
    ("Superior constrictor",
     "Pterygoid hamulus; pterygomandibular raphe; mylohyoid line of mandible; side of tongue",
     "Pharyngeal tubercle of occipital bone; pharyngeal raphe (posterior midline)",
     "Constricts upper pharynx during swallowing",
     "CN X + CN IX via pharyngeal plexus"),
    ("Middle constrictor",
     "Greater & lesser horns of hyoid; stylohyoid ligament",
     "Pharyngeal raphe (posterior midline)",
     "Constricts mid-pharynx during swallowing",
     "CN X via pharyngeal plexus"),
    ("Inferior constrictor",
     "Oblique line of thyroid cartilage; lateral surface of cricoid cartilage",
     "Pharyngeal raphe (posterior midline)",
     "Constricts lower pharynx; cricopharyngeus acts as UES",
     "CN X via pharyngeal plexus; RLN (cricopharyngeus)"),
    ("Stylopharyngeus",
     "Styloid process (medial surface, base)",
     "Posterior border of thyroid cartilage; blends with constrictors",
     "Elevates and widens pharynx & larynx during swallowing",
     "CN IX – Glossopharyngeal n. (unique!)"),
    ("Palatopharyngeus",
     "Palatine aponeurosis (hard palate)",
     "Posterior border of thyroid cartilage; pharyngeal wall",
     "Elevates larynx & pharynx; closes oropharynx",
     "CN X via pharyngeal plexus"),
    # palate
    ("Levator veli palatini",
     "Petrous part of temporal bone; medial auditory tube cartilage",
     "Palatine aponeurosis",
     "Elevates soft palate to close off nasopharynx during swallowing/speech",
     "CN X via pharyngeal plexus"),
    ("Tensor veli palatini",
     "Scaphoid fossa of sphenoid; lateral auditory tube cartilage",
     "Palatine aponeurosis (hooks around pterygoid hamulus)",
     "Tenses soft palate; opens Eustachian tube",
     "CN V3 – Medial pterygoid n. (only palatal muscle NOT CN X)"),
    ("Musculus uvulae",
     "Posterior nasal spine; palatine aponeurosis",
     "Mucosa of uvula",
     "Shortens and elevates uvula",
     "CN X via pharyngeal plexus"),
]

sec6_neck = [
    # superficial
    ("Sternocleidomastoid\n(SCM)",
     "Sternal head: manubrium sterni (anterior surface)\nClavicular head: medial 1/3 of clavicle",
     "Mastoid process; lateral superior nuchal line",
     "Unilateral: ipsilateral neck tilt + contralateral face rotation. Bilateral: neck flexion; raises thorax in forced inspiration",
     "CN XI – Accessory n. + C2–C3 (proprioception)"),
    ("Trapezius\n(upper fibers)",
     "External occipital protuberance; medial superior nuchal line; ligamentum nuchae; C7–T12 spinous processes",
     "Lateral 1/3 of clavicle; acromion; spine of scapula",
     "Elevates & retracts scapula; extends & rotates head/neck to opposite side",
     "CN XI – Accessory n. + C3–C4"),
    # suprahyoid
    ("Digastric\n(anterior belly)",
     "Digastric fossa of mandible (inner surface)",
     "Intermediate tendon (attached to hyoid via fibrous sling)",
     "Depresses mandible; elevates hyoid during swallowing",
     "CN V3 – Mylohyoid n."),
    ("Digastric\n(posterior belly)",
     "Mastoid notch (medial to mastoid process)",
     "Intermediate tendon",
     "Elevates and retracts hyoid; opens jaw",
     "CN VII – Facial n. (digastric br.)"),
    ("Mylohyoid",
     "Mylohyoid line of mandible",
     "Hyoid bone (body); median raphe meeting partner muscle",
     "Elevates floor of mouth & tongue; elevates hyoid; depresses mandible",
     "CN V3 – Mylohyoid n."),
    ("Geniohyoid",
     "Inferior genial tubercle of mandible",
     "Body of hyoid bone",
     "Elevates & protracts hyoid; depresses mandible; widens pharynx",
     "C1 via CN XII"),
    ("Stylohyoid",
     "Styloid process (posterior surface)",
     "Body of hyoid (at junction with greater horn)",
     "Elevates and retracts hyoid",
     "CN VII – Facial n. (stylohyoid br.)"),
    # infrahyoid
    ("Sternohyoid",
     "Manubrium sterni (posterior surface); medial clavicle",
     "Body of hyoid bone (lower border)",
     "Depresses hyoid after swallowing",
     "Ansa cervicalis C1–C3"),
    ("Sternothyroid",
     "Manubrium sterni (posterior surface; 1st costal cartilage)",
     "Oblique line of thyroid cartilage",
     "Depresses thyroid cartilage and larynx",
     "Ansa cervicalis C1–C3"),
    ("Thyrohyoid",
     "Oblique line of thyroid cartilage",
     "Greater horn & body of hyoid",
     "Depresses hyoid; elevates larynx when hyoid is fixed",
     "C1 via CN XII"),
    ("Omohyoid\n(superior belly)",
     "Intermediate tendon",
     "Body of hyoid (lower border, lateral to sternohyoid)",
     "Depresses, retracts, and steadies hyoid",
     "Ansa cervicalis C1–C3"),
    ("Omohyoid\n(inferior belly)",
     "Superior border of scapula (medial to suprascapular notch)",
     "Intermediate tendon",
     "Depresses, retracts, and steadies hyoid",
     "Ansa cervicalis C1–C3"),
    # deep anterior
    ("Longus capitis",
     "Anterior tubercles of C3–C6 transverse processes",
     "Basilar part of occipital bone",
     "Flexes head; flexes upper cervical spine",
     "C1–C4 anterior rami"),
    ("Longus colli",
     "Vertebral bodies C3–T3; transverse processes C3–C6",
     "Atlas anterior tubercle; vertebral bodies C2–C4; transverse processes C5–C6",
     "Flexes and rotates cervical spine; anterior cervical stabiliser",
     "C2–C6 anterior rami"),
    ("Rectus capitis\nanterior",
     "Lateral mass of atlas (C1)",
     "Basilar part of occipital bone (anterior to condyle)",
     "Flexes head at atlanto-occipital joint",
     "C1–C2 anterior rami"),
    ("Rectus capitis\nlateralis",
     "Transverse process of atlas (C1)",
     "Jugular process of occipital bone",
     "Lateral flexion of head at atlanto-occipital joint",
     "C1 anterior ramus"),
    # scalenes
    ("Scalenus anterior",
     "Anterior tubercles of C3–C6 transverse processes",
     "Scalene tubercle on 1st rib",
     "Elevates 1st rib (forced inspiration); flexes & laterally tilts neck; rotates to opposite side",
     "C4–C6 anterior rami"),
    ("Scalenus medius",
     "Posterior tubercles of C2–C7 transverse processes",
     "1st rib (posterior to subclavian groove)",
     "Elevates 1st rib; laterally flexes neck",
     "C3–C8 anterior rami"),
    ("Scalenus posterior",
     "Posterior tubercles of C4–C6 transverse processes",
     "Outer surface of 2nd rib",
     "Elevates 2nd rib; laterally flexes neck",
     "C6–C8 anterior rami"),
    # suboccipital
    ("Rectus capitis\nposterior major",
     "Spinous process of axis (C2)",
     "Lateral inferior nuchal line (occipital bone)",
     "Extends head; rotates head to same side",
     "Suboccipital n. (C1 posterior ramus)"),
    ("Rectus capitis\nposterior minor",
     "Posterior tubercle of atlas (C1)",
     "Medial inferior nuchal line (occipital bone)",
     "Extends head at atlanto-occipital joint",
     "Suboccipital n. (C1 posterior ramus)"),
    ("Obliquus capitis\nsuperior",
     "Transverse process of atlas (C1)",
     "Occipital bone (between nuchal lines, lateral)",
     "Extends and laterally flexes head",
     "Suboccipital n. (C1 posterior ramus)"),
    ("Obliquus capitis\ninferior",
     "Spinous process of axis (C2)",
     "Transverse process of atlas (C1)",
     "Rotates atlas on axis (ipsilateral head rotation)",
     "Suboccipital n. (C1 posterior ramus)"),
    ("Semispinalis capitis",
     "Articular processes of C4–C6; transverse processes of C7–T7",
     "Between superior & inferior nuchal lines (occipital bone)",
     "Extends head and neck; contralateral rotation",
     "C1–C5 dorsal rami"),
    ("Splenius capitis",
     "Ligamentum nuchae; spinous processes of C7–T3",
     "Mastoid process; lateral superior nuchal line",
     "Extends head & neck; ipsilateral rotation & lateral flexion",
     "C2–C3 dorsal rami"),
]

# ════════════════════════════════════════════════════════════════
#  BUILD PDF
# ════════════════════════════════════════════════════════════════
story = []

# ── Title Banner ─────────────────────────────────────────────────
title_data = [[
    Paragraph("MUSCLES OF HEAD, NECK & FACE", title_style),
]]
title_table = Table(title_data, colWidths=[W])
title_table.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), C_DARK_BLUE),
    ("TOPPADDING",    (0,0), (-1,-1), 10),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
]))
story.append(title_table)

subtitle_data = [[Paragraph("Quick Reference Card  ·  Origins · Insertions · Actions · Nerve Supply", subtitle_style)]]
sub_table = Table(subtitle_data, colWidths=[W])
sub_table.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), C_MID_BLUE),
    ("TOPPADDING",    (0,0), (-1,-1), 3),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
]))
story.append(sub_table)
story.append(Spacer(1, 4*mm))

sections = [
    ("1. MUSCLES OF FACIAL EXPRESSION  (CN VII – Facial Nerve)", sec1_facial, C_SECTION_BG[0], C_HDR[0]),
    ("2. MUSCLES OF MASTICATION  (CN V3 – Mandibular Nerve)", sec2_mastication, C_SECTION_BG[1], C_HDR[1]),
    ("3. EXTRAOCULAR MUSCLES  (CN III / IV / VI)", sec3_extraocular, C_SECTION_BG[2], C_HDR[2]),
    ("4. MUSCLES OF THE TONGUE  (CN XII – Hypoglossal + CN X for palatoglossus)", sec4_tongue, C_SECTION_BG[3], C_HDR[3]),
    ("5. PHARYNGEAL & SOFT PALATE MUSCLES  (CN X pharyngeal plexus, CN IX, CN V3)", sec5_pharynx, C_SECTION_BG[4], C_HDR[4]),
    ("6. MUSCLES OF THE NECK  (CN XI, CN VII, CN V3, Ansa cervicalis, C1–C8)", sec6_neck, C_SECTION_BG[5], C_HDR[5]),
]

for title, rows, bg, hdr_bg in sections:
    story.append(KeepTogether([
        section_header(title, hdr_bg),
        Spacer(1, 1.5*mm),
        make_table(rows, bg, hdr_bg),
        Spacer(1, 4*mm),
    ]))

# ── Nerve Supply Summary box ──────────────────────────────────────
story.append(Spacer(1, 2*mm))
nerve_summary_hdr = section_header("NERVE SUPPLY AT A GLANCE", C_DARK_BLUE)
nerve_rows = [
    ["CN V3 (Mandibular)", "Masseter, Temporalis, Medial & Lateral Pterygoids, Tensor veli palatini, Mylohyoid, Anterior Digastric"],
    ["CN VII (Facial)", "All muscles of facial expression, Posterior Digastric, Stylohyoid, Platysma"],
    ["CN IX (Glossopharyngeal)", "Stylopharyngeus (sole muscle – unique)"],
    ["CN X (Vagus)", "Pharyngeal constrictors, Palatopharyngeus, Levator veli palatini, Musculus uvulae, Palatoglossus, Salpingopharyngeus"],
    ["CN XI (Accessory)", "Sternocleidomastoid, Trapezius (+ C3–C4 proprioception)"],
    ["CN XII (Hypoglossal)", "All intrinsic tongue muscles; Genioglossus, Hyoglossus, Styloglossus"],
    ["CN III / IV / VI", "Extraocular muscles (LR₆SO₄ rest III)"],
    ["Ansa cervicalis (C1–C3)", "Sternohyoid, Sternothyroid, Omohyoid"],
    ["C1 via CN XII", "Thyrohyoid, Geniohyoid"],
    ["C1 post. ramus (Suboccipital n.)", "Rectus capitis post. major & minor, Obliquus capitis sup. & inf."],
    ["C2–C6 anterior rami", "Longus capitis, Longus colli, Scalenes (varying levels)"],
    ["C2–C3 dorsal rami", "Splenius capitis, Semispinalis capitis"],
]
ns_data = [
    [Paragraph("<b>Nerve</b>", cell_bold), Paragraph("<b>Muscles Supplied</b>", cell_bold)]
] + [
    [Paragraph(r[0], cell_nerve), Paragraph(r[1], cell_normal)] for r in nerve_rows
]
ns_table = Table(ns_data, colWidths=[55*mm, 135*mm])
ns_table.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0),  C_DARK_BLUE),
    ("TEXTCOLOR",     (0,0), (-1,0),  C_WHITE),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [C_LIGHT_BLUE, C_WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.3, colors.HexColor("#aaaaaa")),
    ("VALIGN",        (0,0), (-1,-1), "TOP"),
    ("TOPPADDING",    (0,0), (-1,-1), 2),
    ("BOTTOMPADDING", (0,0), (-1,-1), 2),
    ("LEFTPADDING",   (0,0), (-1,-1), 4),
    ("RIGHTPADDING",  (0,0), (-1,-1), 4),
]))
story.append(nerve_summary_hdr)
story.append(Spacer(1, 1.5*mm))
story.append(ns_table)

# ── Footer note ───────────────────────────────────────────────────
story.append(Spacer(1, 4*mm))
story.append(Paragraph(
    "Sources: Dermatology 2-Volume Set 5e | K.J. Lee's Essential Otolaryngology | THIEME Atlas of Anatomy | Netter's Atlas of Human Anatomy  ·  Generated by Orris Medical AI",
    footer_style
))

doc.build(story)
print("PDF generated:", OUTPUT)
Running Command

cd /home/daytona/workspace/muscles-ref-card && python generate_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/muscles-ref-card/

Your PDF quick reference card is ready for download:

Muscles Head Neck Face QuickRef

PDF Document · PDF


What's inside the PDF (18 KB, A4, color-coded):
The card is organized into 6 color-coded sections, each with a 5-column table (Muscle | Origin | Insertion | Action | Nerve Supply):
#SectionColor
1Muscles of Facial Expression (21 muscles)Blue
2Muscles of Mastication (5 muscles)Orange
3Extraocular Muscles (7 muscles)Green
4Muscles of the Tongue (5 entries)Pink
5Pharyngeal & Soft Palate Muscles (8 muscles)Purple
6Muscles of the Neck (24 muscles - SCM, trapezius, supra/infrahyoid, deep, scalenes, suboccipital)Teal
Plus a "Nerve Supply at a Glance" summary table at the end covering all cranial nerves and cervical roots in one view. Nerve names are highlighted in red throughout for quick identification.
This is a shared conversation. Sign in to Orris to start your own chat.