Give answer for all question , for 5 or 10 marks
| Lesion Site | Defect |
|---|---|
| One optic nerve | Monocular blindness (same eye) |
| Optic chiasma (central, e.g., pituitary tumor) | Bitemporal hemianopia |
| Optic tract | Contralateral homonymous hemianopia |
| Meyer's loop (temporal lobe) | Contralateral upper quadrantanopia ("pie in the sky") |
| Parietal optic radiation | Contralateral lower quadrantanopia |
| Complete optic radiation / visual cortex | Contralateral homonymous hemianopia with macular sparing (macular sparing is due to dual blood supply of occipital pole) |
| Taste | Mechanism |
|---|---|
| Salty | Na⁺ enters taste cells through amiloride-sensitive Na⁺ channels → direct depolarization |
| Sour | H⁺ (acid) blocks K⁺ channels AND directly enters through H⁺-gated channels → depolarization |
| Bitter | Binds G-protein-coupled receptor (T2R family) → activates gustducin → ↑IP₃ → Ca²⁺ release from ER → depolarization; also can close K⁺ channels |
| Sweet | Binds G-protein-coupled receptor (T1R2 + T1R3) → ↑cAMP → PKA → closes K⁺ channels → depolarization |
| Umami | Binds T1R1 + T1R3 receptor → similar to sweet pathway |
Create a comprehensive study guide PDF covering all special senses pathways
mkdir -p /tmp/workspace/special-senses-pdf && ls /tmp/workspace/
~/special-senses-pdf/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.lib import colors
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak, KeepTogether
)
from reportlab.platypus.flowables import BalancedColumns
from reportlab.lib.colors import HexColor
import os
OUTPUT_PATH = "/tmp/workspace/special-senses-pdf/Special_Senses_Study_Guide.pdf"
# ── Colour palette ──────────────────────────────────────────────────────────
DARK_NAVY = HexColor("#1A2B4A")
MID_BLUE = HexColor("#2E5FA3")
LIGHT_BLUE = HexColor("#D6E4F7")
TEAL = HexColor("#1B7A8A")
TEAL_LIGHT = HexColor("#D0EFF3")
GOLD = HexColor("#C8922A")
GOLD_LIGHT = HexColor("#FDF3DC")
RED_ACCENT = HexColor("#B33000")
GREEN = HexColor("#2A6B3A")
GREEN_LIGHT = HexColor("#DCF0E2")
GRAY_BG = HexColor("#F4F6F9")
GRAY_LINE = HexColor("#BEC8D9")
WHITE = colors.white
# ── Document setup ───────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT_PATH,
pagesize=A4,
rightMargin=1.8*cm, leftMargin=1.8*cm,
topMargin=2*cm, bottomMargin=2*cm,
title="Special Senses – Comprehensive Study Guide",
author="Orris Medical",
subject="Physiology – Special Senses Pathways"
)
W, H = A4
CONTENT_W = W - 3.6*cm
# ── Base styles ──────────────────────────────────────────────────────────────
base = getSampleStyleSheet()
def S(name, **kw):
"""Create a ParagraphStyle inheriting from 'Normal'."""
return ParagraphStyle(name, parent=base["Normal"], **kw)
style_cover_title = S("CoverTitle",
fontSize=32, textColor=WHITE, fontName="Helvetica-Bold",
alignment=TA_CENTER, leading=38, spaceAfter=6)
style_cover_sub = S("CoverSub",
fontSize=15, textColor=HexColor("#D6E4F7"), fontName="Helvetica",
alignment=TA_CENTER, leading=20, spaceAfter=4)
style_cover_tag = S("CoverTag",
fontSize=11, textColor=GOLD_LIGHT, fontName="Helvetica-Oblique",
alignment=TA_CENTER, leading=16)
style_toc_head = S("TOCHead",
fontSize=18, textColor=DARK_NAVY, fontName="Helvetica-Bold",
alignment=TA_CENTER, spaceAfter=12, spaceBefore=8)
style_toc_item = S("TOCItem",
fontSize=11, textColor=MID_BLUE, fontName="Helvetica",
leading=18, leftIndent=10)
style_ch_title = S("ChTitle",
fontSize=22, textColor=WHITE, fontName="Helvetica-Bold",
alignment=TA_CENTER, leading=28)
style_ch_num = S("ChNum",
fontSize=11, textColor=HexColor("#A8C4E8"), fontName="Helvetica-Oblique",
alignment=TA_CENTER, leading=16, spaceAfter=2)
style_h1 = S("H1",
fontSize=14, textColor=DARK_NAVY, fontName="Helvetica-Bold",
spaceBefore=10, spaceAfter=4, leading=18)
style_h2 = S("H2",
fontSize=12, textColor=MID_BLUE, fontName="Helvetica-Bold",
spaceBefore=8, spaceAfter=3, leading=16)
style_h3 = S("H3",
fontSize=11, textColor=TEAL, fontName="Helvetica-Bold",
spaceBefore=6, spaceAfter=2, leading=14)
style_body = S("Body",
fontSize=10, textColor=HexColor("#1E1E2E"), fontName="Helvetica",
leading=15, spaceAfter=4, alignment=TA_JUSTIFY)
style_bullet = S("Bullet",
fontSize=10, textColor=HexColor("#1E1E2E"), fontName="Helvetica",
leading=14, leftIndent=14, firstLineIndent=-8, spaceAfter=2)
style_subbullet = S("SubBullet",
fontSize=9.5, textColor=HexColor("#2E2E3E"), fontName="Helvetica",
leading=13, leftIndent=26, firstLineIndent=-8, spaceAfter=2)
style_numbered = S("Numbered",
fontSize=10, textColor=HexColor("#1E1E2E"), fontName="Helvetica",
leading=14, leftIndent=18, firstLineIndent=-12, spaceAfter=3)
style_box_title = S("BoxTitle",
fontSize=11, textColor=DARK_NAVY, fontName="Helvetica-Bold",
leading=15, spaceAfter=3)
style_box_body = S("BoxBody",
fontSize=9.5, textColor=HexColor("#1E1E2E"), fontName="Helvetica",
leading=14, spaceAfter=2)
style_note = S("Note",
fontSize=9.5, textColor=RED_ACCENT, fontName="Helvetica-BoldOblique",
leading=13, spaceBefore=3, spaceAfter=3)
style_source = S("Source",
fontSize=8.5, textColor=HexColor("#556070"), fontName="Helvetica-Oblique",
leading=12, alignment=TA_CENTER, spaceAfter=6)
style_footer_pg = S("FooterPg",
fontSize=8, textColor=HexColor("#8090A0"), fontName="Helvetica",
alignment=TA_CENTER)
# ── Helper flowables ─────────────────────────────────────────────────────────
def hr(color=GRAY_LINE, thickness=0.8):
return HRFlowable(width="100%", thickness=thickness, color=color, spaceAfter=4, spaceBefore=4)
def sp(h=6):
return Spacer(1, h)
def bullet(text, style=style_bullet):
return Paragraph(f"\u2022 {text}", style)
def subbullet(text):
return Paragraph(f"\u2013 {text}", style_subbullet)
def numbered(n, text):
return Paragraph(f"{n}. {text}", style_numbered)
def chapter_header(num, title, subtitle=""):
"""A full-width coloured chapter header block."""
rows = [[Paragraph(f"Chapter {num}", style_ch_num)],
[Paragraph(title, style_ch_title)]]
if subtitle:
rows.append([Paragraph(subtitle, S("ChSub",
fontSize=11, textColor=HexColor("#B0CCEE"), fontName="Helvetica-Oblique",
alignment=TA_CENTER, leading=16))])
t = Table(rows, colWidths=[CONTENT_W])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_NAVY),
("ROWBACKGROUNDS", (0,0), (-1,-1), [DARK_NAVY]),
("TOPPADDING", (0,0), (-1,-1), 14),
("BOTTOMPADDING", (0,0), (-1,-1), 14),
("LEFTPADDING", (0,0), (-1,-1), 12),
("RIGHTPADDING", (0,0), (-1,-1), 12),
("ROUNDEDCORNERS", [8]),
]))
return t
def section_title(text, color=MID_BLUE):
bar = Table([[Paragraph(text, S("SecTitle",
fontSize=13, textColor=WHITE, fontName="Helvetica-Bold",
leading=18, leftIndent=4))]],
colWidths=[CONTENT_W])
bar.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), color),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
]))
return bar
def callout_box(title, items, bg=TEAL_LIGHT, border=TEAL):
"""A highlighted callout/info box."""
content = [Paragraph(title, style_box_title)]
for item in items:
content.append(Paragraph(f"\u2022 {item}", style_box_body))
t = Table([[content]], colWidths=[CONTENT_W])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("BOX", (0,0), (-1,-1), 1.2, border),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
]))
return t
def memory_box(title, items):
return callout_box(title, items, bg=GOLD_LIGHT, border=GOLD)
def clinical_box(title, items):
return callout_box(title, items, bg=GREEN_LIGHT, border=GREEN)
def pathway_table(headers, rows, col_widths=None):
"""Styled pathway/comparison table."""
if col_widths is None:
n = len(headers)
col_widths = [CONTENT_W/n]*n
data = [headers] + rows
t = Table(data, colWidths=col_widths, repeatRows=1)
style = [
("BACKGROUND", (0,0), (-1,0), MID_BLUE),
("TEXTCOLOR", (0,0), (-1,0), WHITE),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,0), 10),
("ALIGN", (0,0), (-1,0), "CENTER"),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, LIGHT_BLUE]),
("FONTNAME", (0,1), (-1,-1), "Helvetica"),
("FONTSIZE", (0,1), (-1,-1), 9.5),
("ALIGN", (0,1), (-1,-1), "LEFT"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("GRID", (0,0), (-1,-1), 0.5, GRAY_LINE),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 7),
("RIGHTPADDING", (0,0), (-1,-1), 7),
]
t.setStyle(TableStyle(style))
return t
# ── Page templates (header/footer) ───────────────────────────────────────────
def on_page(canvas, doc):
canvas.saveState()
pg = doc.page
# header bar
canvas.setFillColor(DARK_NAVY)
canvas.rect(1.8*cm, H - 1.4*cm, CONTENT_W, 0.55*cm, fill=1, stroke=0)
canvas.setFont("Helvetica-Bold", 8)
canvas.setFillColor(WHITE)
canvas.drawString(2.1*cm, H - 1.1*cm, "SPECIAL SENSES — COMPREHENSIVE STUDY GUIDE")
canvas.drawRightString(W - 1.8*cm, H - 1.1*cm, "Orris Medical | Physiology")
# footer
canvas.setFillColor(GRAY_LINE)
canvas.rect(1.8*cm, 1.3*cm, CONTENT_W, 0.04*cm, fill=1, stroke=0)
canvas.setFont("Helvetica", 8)
canvas.setFillColor(HexColor("#8090A0"))
canvas.drawCentredString(W/2, 1.0*cm, f"Page {pg}")
canvas.restoreState()
def on_cover(canvas, doc):
# No header/footer on cover
pass
# ── Build content ─────────────────────────────────────────────────────────────
story = []
# ════════════════════════════════════════════════════════
# COVER PAGE
# ════════════════════════════════════════════════════════
# Full-page navy background
cover_bg = Table([
[Paragraph("", style_cover_title)],
], colWidths=[CONTENT_W], rowHeights=[2*cm])
cover_bg.setStyle(TableStyle([("BACKGROUND",(0,0),(-1,-1), DARK_NAVY)]))
# Cover box
cover_inner = [
sp(40),
Table([[Paragraph("✦ PHYSIOLOGY ✦", style_cover_tag)]], colWidths=[CONTENT_W]),
sp(16),
Table([[Paragraph("SPECIAL SENSES", style_cover_title)]], colWidths=[CONTENT_W]),
sp(8),
Table([[Paragraph("Comprehensive Study Guide", style_cover_sub)]], colWidths=[CONTENT_W]),
sp(6),
Table([[Paragraph("All Pathways · Mechanisms · Clinical Applications", style_cover_tag)]], colWidths=[CONTENT_W]),
sp(30),
hr(GOLD, 1.5),
sp(14),
Table([[Paragraph(
"Auditory • Visual • Taste • Olfactory • Hearing • Colour Vision",
S("CovList", fontSize=11, textColor=LIGHT_BLUE, fontName="Helvetica",
alignment=TA_CENTER, leading=18)
)]], colWidths=[CONTENT_W]),
sp(14),
hr(GOLD, 1.5),
sp(30),
Table([[Paragraph("For MBBS / MD Examinations | 5 & 10 Mark Questions",
S("CovExam", fontSize=10, textColor=HexColor("#A8C4E8"), fontName="Helvetica-Oblique",
alignment=TA_CENTER, leading=16)
)]], colWidths=[CONTENT_W]),
sp(10),
Table([[Paragraph("Sources: Ganong's 26th Ed. · Junqueira's 17th Ed. · Neuroscience 5th Ed.",
style_source
)]], colWidths=[CONTENT_W]),
]
for fl in cover_inner:
story.append(fl)
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# TABLE OF CONTENTS
# ════════════════════════════════════════════════════════
story.append(sp(8))
story.append(Paragraph("TABLE OF CONTENTS", style_toc_head))
story.append(hr(MID_BLUE, 1.5))
story.append(sp(6))
toc_entries = [
("1", "Auditory Pathway", "Central auditory pathway, tonotopy, cortical areas"),
("2", "Visual Pathway & Defects", "Optic nerve to cortex, field defects"),
("3", "Taste Pathway", "Cranial nerves, NTS, cortex"),
("4", "Olfactory Pathway", "Transduction, bulb, cortical projections"),
("5", "Middle Ear Functions", "Impedance matching, ossicular chain, Eustachian tube"),
("6", "Theories of Hearing", "Place, Frequency, Volley theories"),
("7", "Theories of Colour Vision", "Trichromatic, Opponent, Zone theory"),
("8", "Phototransduction", "Rhodopsin cycle, cGMP cascade, rods & cones"),
("9", "Dark Adaptation", "Two phases, rhodopsin regeneration, Purkinje shift"),
("10", "Light Reflex Pathway", "Afferent, pretectal, efferent limbs"),
("11", "Accommodation Reflex", "Near response, ciliary muscle, clinical"),
("12", "Endocochlear Potential", "Stria vascularis, K+ gradient, 80 mV"),
("13", "Physiology of Taste", "5 modalities, receptor mechanisms, depolarisation"),
("14", "Physiology of Smell", "Transduction, cAMP pathway, anosmia"),
("15", "Physiology of Hearing", "Hair cells, basilar membrane, organ of Corti"),
]
for num, title, desc in toc_entries:
row_data = [
[Paragraph(f"<font color='#2E5FA3'><b>{num}.</b></font> {title}", S("TOCTitle",
fontSize=11, textColor=DARK_NAVY, fontName="Helvetica-Bold", leading=16)),
Paragraph(desc, S("TOCDesc",
fontSize=9.5, textColor=HexColor("#556070"), fontName="Helvetica-Oblique", leading=14))],
]
t = Table(row_data, colWidths=[5.5*cm, CONTENT_W - 5.5*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), GRAY_BG),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story.append(t)
story.append(sp(3))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 1 – AUDITORY PATHWAY
# ════════════════════════════════════════════════════════
story.append(chapter_header("1", "AUDITORY PATHWAY", "Central pathway from cochlea to auditory cortex"))
story.append(sp(10))
story.append(section_title("Overview"))
story.append(sp(4))
story.append(Paragraph(
"Sound waves → Hair cells (Organ of Corti) → Cochlear nerve (CN VIII) → "
"Cochlear nuclei → Superior olive → Lateral lemniscus → Inferior colliculus → "
"Medial Geniculate Body → Auditory Cortex.",
style_body))
story.append(sp(6))
story.append(Paragraph("Step-by-Step Pathway", style_h1))
steps = [
("Hair Cells / Organ of Corti",
"Mechanotransduction: stereocilia deflection → K⁺ influx → depolarisation → glutamate release → CN VIII action potentials."),
("Cochlear Nerve (CN VIII)",
"Enters brainstem at the pontomedullary junction. Bifurcates to end in dorsal and ventral cochlear nuclei (medulla)."),
("Cochlear Nuclei (Medulla)",
"First synapse. Responses are similar to individual auditory nerve fibres. Second-order neurons show sharper low-frequency cutoff due to brainstem inhibition."),
("Superior Olivary Nucleus (Pons)",
"First site of BINAURAL convergence (inputs from both ears). Critical for sound localisation — detects interaural time & intensity differences."),
("Lateral Lemniscus",
"Ascending tract carrying auditory fibres rostrally; most fibres have already crossed the midline."),
("Inferior Colliculus (Midbrain tectum)",
"Centre for auditory REFLEXES (e.g., head-turning toward sound). All ascending fibres synapse here."),
("Medial Geniculate Body / MGB (Thalamus)",
"Thalamic relay station for auditory signals. Projects via auditory radiations to the cortex."),
("Primary Auditory Cortex — A1",
"Superior temporal gyrus (Heschl's gyrus), Brodmann areas 41 & 42. Tonotopic: low tones anterolateral, high tones posteromedial."),
]
for i, (title, desc) in enumerate(steps, 1):
story.append(numbered(i, f"<b>{title}:</b> {desc}"))
story.append(sp(6))
story.append(Paragraph("Key Features", style_h2))
story.append(bullet("Decussation: Most fibres cross at the trapezoid body (pons); hence each auditory cortex receives bilateral input."))
story.append(bullet("Tonotopic organisation preserved from cochlea all the way to cortex."))
story.append(bullet("Hemispheric specialisation: Wernicke area (left) — speech; Right hemisphere — melody, pitch, sound intensity."))
story.append(bullet("Auditory cortex is highly plastic: sign language activates auditory areas in pre-lingually deaf individuals."))
story.append(sp(6))
story.append(memory_box("MNEMONIC: Auditory pathway stations",
["Cochlear nerve (CN VIII)",
"Cochlear Nuclei (dorsal & ventral)",
"Superior Olive — binaural convergence",
"Inferior Colliculus — auditory reflexes",
"Medial Geniculate Body (thalamus)",
"Auditory Cortex (superior temporal gyrus)"]))
story.append(sp(8))
story.append(Paragraph("Hearing Loss", style_h2))
story.append(pathway_table(
["Type", "Site", "Character", "Tuning Fork Tests"],
[["Sensorineural", "Cochlear hair cells / CN VIII / central", "Frequency-specific loss",
"Rinne +ve (AC>BC); Weber lateralises to GOOD ear"],
["Conductive", "External or middle ear", "Affects all frequencies equally",
"Rinne -ve (BC>AC); Weber lateralises to AFFECTED ear"]],
col_widths=[3.2*cm, 4.2*cm, 4.5*cm, 4.5*cm]
))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's Review of Medical Physiology, 26th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 2 – VISUAL PATHWAY & DEFECTS
# ════════════════════════════════════════════════════════
story.append(chapter_header("2", "VISUAL PATHWAY & DEFECTS",
"Retina → Optic nerve → Chiasma → LGB → Visual cortex"))
story.append(sp(10))
story.append(section_title("Pathway"))
story.append(sp(4))
steps_vis = [
("Retina", "Photoreceptors → Bipolar cells → Ganglion cells. Axons of ganglion cells form the optic nerve (~1.2 million fibres per nerve)."),
("Optic Nerve (CN II)", "Carries all visual information from one eye."),
("Optic Chiasma", "PARTIAL decussation: Nasal (medial) retinal fibres cross; Temporal fibres stay ipsilateral. Lesion here → bitemporal hemianopia."),
("Optic Tract", "Each tract carries: ipsilateral temporal + contralateral nasal retinal fibres → represents CONTRALATERAL visual field."),
("Lateral Geniculate Body / LGB (Thalamus)", "Main thalamic relay. 6 layers: layers 1,2 = magnocellular (M-pathway, motion/depth); layers 3-6 = parvocellular (P-pathway, colour/detail)."),
("Optic Radiations (Geniculocalcarine tract)", "Upper fibres → parietal lobe → inferior calcarine cortex (lower visual field). Lower fibres = Meyer's loop → temporal lobe → superior calcarine cortex (upper visual field)."),
("Primary Visual Cortex — V1 (Area 17)", "Calcarine fissure of occipital lobe. Retinotopic map: macula over-represented posteriorly (dual blood supply → macular sparing in occipital lesions)."),
]
for i, (t, d) in enumerate(steps_vis, 1):
story.append(numbered(i, f"<b>{t}:</b> {d}"))
story.append(sp(8))
story.append(section_title("Visual Field Defects"))
story.append(sp(4))
story.append(pathway_table(
["Lesion Site", "Defect", "Notes"],
[["Optic nerve (1 eye)", "Monocular blindness", "Same eye only"],
["Optic chiasma — central (e.g. pituitary tumour)", "Bitemporal hemianopia", "Nasal fibres from both eyes cut"],
["Optic tract", "Contralateral homonymous hemianopia", "Incongruous (unequal)"],
["Meyer's loop (temporal lobe)", "Contralateral upper quadrantanopia", "'Pie-in-the-sky' defect"],
["Upper optic radiation (parietal lobe)", "Contralateral lower quadrantanopia", "'Pie-on-the-floor'"],
["Complete optic radiation or V1", "Contralateral homonymous hemianopia", "Macular sparing (occipital)"]],
col_widths=[5.5*cm, 5.5*cm, 4.5*cm]
))
story.append(sp(6))
story.append(clinical_box("Clinical Pearl — Macular Sparing",
["Lesions of the occipital cortex spare central (macular) vision.",
"Reason: Macular cortex at the occipital pole has a dual blood supply (MCA + PCA).",
"This differentiates occipital lesions from optic tract lesions (which do NOT spare macula)."]))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's 26th Ed.; Gray's Anatomy for Students", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 3 – TASTE PATHWAY
# ════════════════════════════════════════════════════════
story.append(chapter_header("3", "TASTE PATHWAY",
"Gustatory pathway from tongue to cortex"))
story.append(sp(10))
story.append(section_title("Peripheral Cranial Nerves"))
story.append(sp(4))
story.append(pathway_table(
["Region", "Cranial Nerve", "Branch", "Nucleus"],
[["Anterior 2/3 tongue", "CN VII (Facial)", "Chorda tympani", "NTS"],
["Posterior 1/3 tongue", "CN IX (Glossopharyngeal)", "Lingual branch", "NTS"],
["Epiglottis & pharynx", "CN X (Vagus)", "Superior laryngeal nerve", "NTS"]],
col_widths=[3.5*cm, 3.5*cm, 4.5*cm, 4*cm]
))
story.append(sp(8))
story.append(section_title("Central Pathway"))
story.append(sp(4))
central_steps = [
"CN VII, IX, X → Nucleus of Tractus Solitarius (NTS), rostral gustatory nucleus, medulla",
"NTS → Central tegmental tract → Ventral Posteromedial (VPM) nucleus of thalamus (medial part)",
"VPM → Primary Gustatory Cortex: anterior insula + adjacent frontal operculum (area 43)",
"Also projects to Orbitofrontal Cortex — conscious taste perception, food reward, flavour",
]
for i, s in enumerate(central_steps, 1):
story.append(numbered(i, s))
story.append(sp(6))
story.append(memory_box("Note on Decussation",
["Unlike other sensory pathways, the gustatory pathway does NOT completely decussate.",
"There is BILATERAL cortical representation of taste.",
"Therefore, unilateral cortical lesions rarely cause complete ageusia."]))
story.append(sp(8))
story.append(section_title("Five Basic Taste Modalities"))
story.append(sp(4))
story.append(pathway_table(
["Taste", "Stimulus", "Receptor Mechanism", "Depolarisation Pathway"],
[["Salty", "Na⁺", "Amiloride-sensitive ENaC channels", "Direct Na⁺ influx → depolarisation"],
["Sour", "H⁺ (acid)", "H⁺ blocks K⁺ channels; H⁺-gated channels", "Reduced K⁺ efflux → depolarisation"],
["Bitter", "Various toxins", "T2R GPCRs → gustducin → ↑IP₃ → ↑Ca²⁺", "Ca²⁺ from ER → vesicle release"],
["Sweet", "Sugars", "T1R2+T1R3 GPCRs → ↑cAMP → PKA", "Closes K⁺ channels → depolarisation"],
["Umami", "Glutamate", "T1R1+T1R3 GPCRs → similar to sweet", "↑cAMP → depolarisation"]],
col_widths=[2.0*cm, 2.5*cm, 5.5*cm, 5.5*cm]
))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's 26th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 4 – OLFACTORY PATHWAY
# ════════════════════════════════════════════════════════
story.append(chapter_header("4", "OLFACTORY PATHWAY",
"From olfactory epithelium to orbitofrontal cortex"))
story.append(sp(10))
story.append(section_title("Key Features of Olfactory Neurons"))
story.append(sp(4))
for b in [
"Only cranial nerve that projects DIRECTLY to cortex WITHOUT first synapsing in thalamus",
"Receptor neurons are TRUE BIPOLAR NEURONS (not modified epithelial cells, unlike taste)",
"Unique ability to REGENERATE (lifespan ~30-60 days, replaced from basal cells)",
"~400 functional olfactory receptor genes in humans; ~1000 in rodents",
"Each neuron expresses only ONE type of odorant receptor",
"Each odorant activates a pattern of multiple receptor types (combinatorial coding)",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(section_title("Pathway"))
story.append(sp(4))
olf_steps = [
("Olfactory Sensory Neurons", "In olfactory epithelium (roof of nasal cavity). Dendrites project as cilia into mucus layer. Axons form CN I (olfactory nerve)."),
("Cribriform Plate", "Axons pass through foramina in the cribriform plate of the ethmoid bone to reach the olfactory bulb. (Fracture here → anosmia / CSF rhinorrhoea)"),
("Olfactory Bulb", "Axons synapse on mitral cells & tufted cells forming OLFACTORY GLOMERULI. Each glomerulus receives neurons with the same receptor type → odorant-specific 2D map. Periglomerular & granule cells provide lateral inhibition (sharpening)."),
("Lateral Olfactory Stria", "Axons of mitral/tufted cells travel to 5 areas of the primary olfactory cortex."),
("Primary Olfactory Cortex", "5 regions: (a) Anterior olfactory nucleus, (b) Olfactory tubercle, (c) Piriform cortex (main), (d) Amygdala (emotional responses), (e) Entorhinal cortex (olfactory memory)"),
("Higher Cortex", "Piriform cortex / entorhinal → Orbitofrontal cortex (via thalamus) → conscious odour discrimination. Amygdala → emotional/fear responses to odours. Entorhinal → hippocampus → olfactory memories."),
]
for i, (t, d) in enumerate(olf_steps, 1):
story.append(numbered(i, f"<b>{t}:</b> {d}"))
story.append(sp(6))
story.append(section_title("Transduction Mechanism"))
story.append(sp(4))
trans_steps = [
"Odorant binds to G-protein-coupled olfactory receptor",
"Activates Golf (olfactory Gs-type G-protein)",
"Golf activates Adenylyl cyclase III → ↑cAMP",
"cAMP opens cAMP-gated cation channels (CNG channels) → Na⁺ & Ca²⁺ influx",
"Ca²⁺ also opens Ca²⁺-activated Cl⁻ channels → amplifies depolarisation",
"Action potential generated in olfactory neuron → CN I",
]
for i, s in enumerate(trans_steps, 1):
story.append(numbered(i, s))
story.append(sp(6))
story.append(clinical_box("Clinical — Anosmia",
["Loss of smell; can be unilateral or bilateral.",
"Causes: Cribriform plate fracture (shearing CN I), viral infection (COVID-19, flu), Zinc deficiency, Kallmann syndrome (anosmia + hypogonadism).",
"Early sign in Parkinson's and Alzheimer's disease (before motor symptoms).",
"Kallmann syndrome: GnRH neurons fail to migrate from olfactory placode → hypogonadotropic hypogonadism + anosmia."]))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's 26th Ed.; Eric Kandel Principles of Neural Science, 6th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 5 – MIDDLE EAR FUNCTIONS
# ════════════════════════════════════════════════════════
story.append(chapter_header("5", "MIDDLE EAR FUNCTIONS",
"Sound conduction, impedance matching & protection"))
story.append(sp(10))
story.append(Paragraph("Structure of the Middle Ear", style_h1))
story.append(bullet("Air-filled space in the temporal bone; lined by mucosa."))
story.append(bullet("Contains the ossicular chain: Malleus → Incus → Stapes."))
story.append(bullet("The stapes footplate articulates with the oval window of the cochlea."))
story.append(bullet("Divided into: Hypotympanum, Mesotympanum, and Epitympanum."))
story.append(sp(6))
story.append(section_title("Functions"))
story.append(sp(4))
functions = [
("1. Impedance Matching (Most important)",
["Air and cochlear fluid have very different acoustic impedances.",
"Without the middle ear, ~99.9% of sound energy would be reflected at the air-fluid interface (30 dB loss).",
"Middle ear achieves ~22-fold (25-30 dB) pressure amplification via:",
"Area effect: Tympanic membrane area (~55 mm²) >> Oval window area (~3.2 mm²) → ratio ~17:1",
"Lever action of ossicles: Malleus arm > Incus arm → additional ~1.3:1 amplification",
"Total amplification = 17 × 1.3 ≈ 22× (~25 dB)"]),
("2. Sound Conduction",
["Sound waves → Tympanic membrane vibrates → Malleus → Incus → Stapes footplate",
"Stapes pushes on oval window → pressure wave in perilymph of scala vestibuli",
"Waves travel up scala vestibuli → displace Reissner's membrane & basilar membrane",
"Round window acts as pressure-release valve (compensatory bulge)"]),
("3. Acoustic Reflex (Attenuation Reflex)",
["Loud sounds (>80 dB) trigger contraction of Stapedius (CN VII) and Tensor tympani (CN V).",
"Stiffens the ossicular chain → reduces transmission of LOW-frequency sounds.",
"Protects cochlea from loud sustained noise. Latency ~150 ms — too slow to protect from sudden loud sounds (gunshot).",
"Loss of stapedius reflex → Hyperacusis (sounds seem too loud) in Bell's palsy."]),
("4. Eustachian (Auditory) Tube",
["Connects middle ear to nasopharynx; normally collapsed, opens during swallowing/yawning.",
"Functions: Equalises middle ear pressure with atmosphere; drains secretions.",
"Tensor veli palatini muscle opens the tube (CN V).",
"Dysfunction → negative pressure in middle ear → serous otitis media, retracted TM."]),
("5. Round Window",
["Membrane-covered opening between middle and inner ear on the scala tympani side.",
"When the oval window moves in, round window moves out — allows cochlear fluid to move.",
"Without this pressure relief, sound transmission through the cochlea would be impossible."]),
]
for title, pts in functions:
story.append(Paragraph(title, style_h2))
for p in pts:
story.append(bullet(p))
story.append(sp(4))
story.append(Paragraph("Sources: Cummings Otolaryngology, 6th Ed.; Ganong's 26th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 6 – THEORIES OF HEARING
# ════════════════════════════════════════════════════════
story.append(chapter_header("6", "THEORIES OF HEARING",
"How the cochlea analyses frequency"))
story.append(sp(10))
theories = [
("A. Place Theory (Resonance / Travelling Wave Theory)",
"Helmholtz (1857); refined by von Bekesy (Nobel Prize 1961)",
[
"Basilar membrane vibrates differently along its length depending on the frequency of sound.",
"HIGH frequencies → maximal vibration at the BASE of the cochlea (narrow, stiff).",
"LOW frequencies → maximal vibration at the APEX (wide, flexible, near helicotrema).",
"Von Bekesy demonstrated a 'travelling wave' that peaks at a specific location for each frequency.",
"This is the basis of TONOTOPIC organisation preserved from cochlea → cortex.",
"BEST supported theory for frequency discrimination above 4000 Hz.",
"Limitation: Cannot fully explain discrimination of very low frequencies.",
]),
("B. Frequency (Telephone) Theory",
"Rutherford (1886)",
[
"The basilar membrane vibrates as a whole at the same frequency as the incoming sound.",
"Nerve fibres fire at the same frequency as the sound → brain interprets frequency.",
"Limitation: Nerve fibres cannot fire faster than ~1000 Hz (absolute refractory period ~1 ms).",
"Cannot explain hearing frequencies up to 20,000 Hz.",
"Works only for very low frequencies (<400 Hz).",
]),
("C. Volley Theory",
"Wever & Bray (1937)",
[
"Modification of frequency theory: Groups of nerve fibres fire in TURNS (volleys).",
"While one group is in its refractory period, another fires → combined discharge matches sound frequency.",
"Extends the frequency range of neural coding up to ~4000 Hz.",
"Above 4000 Hz, place theory dominates.",
]),
]
for name, author, pts in theories:
story.append(Paragraph(name, style_h2))
story.append(Paragraph(f"Proposed by: <i>{author}</i>", style_box_body))
for p in pts:
story.append(bullet(p))
story.append(sp(5))
story.append(memory_box("Current Understanding — Combined Theory",
["< 400 Hz → Frequency / Volley Theory (firing rate encodes frequency)",
"400 – 4000 Hz → Volley Theory (groups of fibres fire in volleys)",
"> 4000 Hz → Place Theory (location of maximal basilar membrane vibration)",
"Place theory governs most of the human hearing range (up to 20,000 Hz)"]))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's 26th Ed.; Neuroscience: Exploring the Brain, 5th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 7 – THEORIES OF COLOUR VISION
# ════════════════════════════════════════════════════════
story.append(chapter_header("7", "THEORIES OF COLOUR VISION",
"Trichromatic theory, opponent process theory & zone theory"))
story.append(sp(10))
story.append(Paragraph("A. Young-Helmholtz Trichromatic Theory", style_h2))
story.append(Paragraph("Thomas Young (1801), Hermann von Helmholtz (1850s)", style_box_body))
story.append(sp(3))
for b in [
"Three types of cone photoreceptors, each with maximum sensitivity at a different wavelength:",
"All colours perceived by combining outputs of these three cone types.",
"Explains colour mixing and colour blindness.",
]:
story.append(bullet(b))
story.append(pathway_table(
["Cone Type", "Peak Wavelength", "Perceived Colour", "Opsin Gene"],
[["S-cones (Short)", "~420 nm", "Blue/Violet", "OPN1SW (autosome)"],
["M-cones (Medium)", "~530 nm", "Green", "OPN1MW (X-linked)"],
["L-cones (Long)", "~560 nm", "Red/Yellow", "OPN1LW (X-linked)"]],
col_widths=[3*cm, 3.5*cm, 3.5*cm, 5.5*cm]
))
story.append(sp(4))
story.append(Paragraph("B. Hering's Opponent Colour Theory", style_h2))
story.append(Paragraph("Ewald Hering (1878)", style_box_body))
story.append(sp(3))
for b in [
"Colour is processed in OPPONENT PAIRS — each channel signals one or the other, not both:",
"Pair 1: Red ↔ Green (excitatory-inhibitory)",
"Pair 2: Blue ↔ Yellow",
"Pair 3: Black ↔ White (luminance channel)",
"Explains colour AFTERIMAGES: After staring at red, you see green (opponent rebound).",
"Explains why 'reddish-green' and 'yellowish-blue' colours do not exist.",
"Explains simultaneous colour contrast.",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(Paragraph("C. Zone Theory (Stage Theory) — Modern Combined Approach", style_h2))
story.append(Paragraph("Both theories are correct at different stages of the visual pathway:", style_body))
story.append(pathway_table(
["Stage", "Location", "Theory Operating", "Mechanism"],
[["Stage 1", "Photoreceptors (retina)", "Trichromatic", "3 cone types absorb light based on wavelength"],
["Stage 2", "Retinal ganglion cells & LGB", "Opponent Process", "Ganglion cells: centre-surround colour opponency (R+G-, G+R-, B+Y-)"],
["Stage 3", "Visual cortex (V1, V4)", "Complex colour processing", "Double-opponent cells; colour constancy in V4"]],
col_widths=[2.2*cm, 3.8*cm, 3.5*cm, 5.9*cm]
))
story.append(sp(6))
story.append(clinical_box("Colour Blindness",
["Protanopia: Missing L (red) cones — cannot distinguish red/green",
"Deuteranopia: Missing M (green) cones — most common form of colour blindness",
"Tritanopia: Missing S (blue) cones — rare, autosomal; cannot distinguish blue/yellow",
"Red-green colour blindness: X-linked recessive; 8% of males, 0.5% of females",
"Achromatopsia (monochromacy): Complete absence of colour vision, all cones absent; extremely rare"]))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's 26th Ed.; Neuroscience: Exploring the Brain, 5th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 8 – PHOTOTRANSDUCTION
# ════════════════════════════════════════════════════════
story.append(chapter_header("8", "PHOTOTRANSDUCTION",
"Conversion of light into electrical signal"))
story.append(sp(10))
story.append(section_title("The Rhodopsin Molecule"))
story.append(sp(4))
for b in [
"Rhodopsin = Retinal (chromophore, vitamin A derivative) + Opsin (7-transmembrane GPCR protein, 41 kDa)",
"Located in the membranous discs of rod outer segments; makes up 90% of total disc protein",
"One rod contains ~1 BILLION rhodopsin molecules",
"Retinal is attached to opsin at Lysine-296 in the 7th transmembrane domain",
"Cones use iodopsins (photopsins): L-opsin (red), M-opsin (green), S-opsin (blue)",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(section_title("In DARKNESS — The Dark Current"))
story.append(sp(4))
for b in [
"Phosphodiesterase (PDE) activity is LOW → cGMP levels are HIGH",
"High cGMP keeps cGMP-gated Na⁺/Ca²⁺ channels OPEN in the outer segment",
"Na⁺ and Ca²⁺ continuously enter → cell is DEPOLARISED (~−40 mV)",
"This inward current is called the DARK CURRENT",
"Depolarised cell continuously releases GLUTAMATE at synapse with bipolar cells",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(section_title("When LIGHT Hits — The Phototransduction Cascade"))
story.append(sp(4))
cascade_steps = [
"Photon absorbed by 11-cis-retinal → isomerises to ALL-TRANS-RETINAL (within 1 picosecond)",
"Conformational change in opsin → ACTIVE opsin (Metarhodopsin II / R*)",
"R* activates TRANSDUCIN (Gt protein) → GDP exchanged for GTP → α-subunit released",
"α-subunit activates PHOSPHODIESTERASE (PDE)",
"PDE hydrolyses cGMP → 5'-GMP → intracellular cGMP FALLS",
"cGMP-gated channels CLOSE → less Na⁺/Ca²⁺ entry → cell HYPERPOLARISES (~−70 mV)",
"Reduced GLUTAMATE release → change in bipolar cell activity → ganglion cell → optic nerve",
"Ca²⁺ also decreases → removes negative feedback on guanylyl cyclase → cGMP regeneration begins (adaptation)",
]
for i, s in enumerate(cascade_steps, 1):
story.append(numbered(i, s))
story.append(sp(6))
story.append(section_title("Signal Termination & Recovery"))
story.append(sp(4))
for b in [
"Rhodopsin kinase phosphorylates active opsin → β-arrestin binds → terminates transducin activation",
"All-trans-retinal detaches from opsin ('bleaching') → moves to pigment epithelium",
"Retinal isomerase converts all-trans → 11-cis-retinal → transported back to rod",
"11-cis-retinal recombines with opsin → rhodopsin restored",
"Rate of rhodopsin regeneration determines the rate of dark adaptation",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(memory_box("Rods vs. Cones — Quick Comparison",
["RODS: 120 million/eye; periphery; scotopic vision (dim light); 1 type; very sensitive (respond to single photon); no colour; convergent pathway",
"CONES: 6 million/eye; fovea; photopic vision (bright light); 3 types (L/M/S); low sensitivity; colour vision; point-to-point pathway (high acuity)",
"Fovea: contains ONLY cones; each cone → 1 bipolar → 1 ganglion cell → highest visual acuity",
"Outer hair cells: Active amplification (electromotility, prestin protein) → cochlear amplifier"]))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's 26th Ed.; Junqueira's Basic Histology, 17th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 9 – DARK ADAPTATION
# ════════════════════════════════════════════════════════
story.append(chapter_header("9", "DARK ADAPTATION",
"Increasing retinal sensitivity in the dark"))
story.append(sp(10))
story.append(Paragraph("Definition", style_h1))
story.append(Paragraph(
"Dark adaptation is the progressive decrease in visual threshold (increase in sensitivity) "
"that occurs when a person moves from a brightly lit to a dark environment. "
"It takes approximately 20 minutes to become nearly maximal.",
style_body))
story.append(sp(6))
story.append(section_title("Two Phases of Dark Adaptation"))
story.append(sp(4))
story.append(pathway_table(
["Phase", "Photoreceptor", "Time Course", "Magnitude", "Mechanism"],
[["Phase 1 (fast)", "Cones", "0–8 minutes", "Small drop in threshold",
"Regeneration of cone iodopsins"],
["Phase 2 (slow)", "Rods", "8–20+ minutes", "Large drop in threshold (~10,000×)",
"Slow regeneration of rhodopsin from vitamin A"]],
col_widths=[2.5*cm, 2.5*cm, 3*cm, 3.5*cm, 4.9*cm]
))
story.append(sp(6))
story.append(Paragraph("The Duplicity Theory and Purkinje Shift", style_h1))
for b in [
"In photopic (bright) conditions, CONES are active; peak spectral sensitivity ~555 nm (yellow-green).",
"In scotopic (dim) conditions, RODS are active; peak spectral sensitivity shifts to ~505 nm (blue-green).",
"This shift in spectral sensitivity with illumination is called the PURKINJE SHIFT.",
"Clinically: red objects appear relatively darker in dim light than blue-green objects.",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(section_title("Mechanism of Rhodopsin Regeneration"))
story.append(sp(4))
for b in [
"In bright light, rhodopsin is continuously BLEACHED (11-cis-retinal → all-trans-retinal → released from opsin).",
"In darkness, all-trans-retinal is transported to the pigment epithelium.",
"Retinal isomerase converts it back to 11-cis-retinal.",
"11-cis-retinal returns to the rod outer segment and recombines with opsin → rhodopsin.",
"The rate of rhodopsin regeneration is the rate-limiting step for dark adaptation.",
"Vitamin A deficiency → insufficient retinal → impaired rhodopsin synthesis → night blindness (nyctalopia).",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(memory_box("Practical Application",
["Aircraft pilots and radiologists can maintain dark adaptation by wearing RED GOGGLES in bright light.",
"Red light (~700 nm) stimulates L-cones (colour vision preserved) but barely stimulates rods.",
"This allows rods to remain dark-adapted while cones are still functional for fine work.",
"Light adaptation (bright light after dark) takes only ~5 minutes (reverse of dark adaptation)."]))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's Review of Medical Physiology, 26th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 10 – LIGHT REFLEX PATHWAY
# ════════════════════════════════════════════════════════
story.append(chapter_header("10", "LIGHT REFLEX PATHWAY",
"Pupillary light reflex — afferent & efferent limbs"))
story.append(sp(10))
story.append(Paragraph("Definition", style_h1))
story.append(Paragraph(
"The pupillary light reflex is the constriction of the pupil (miosis) in response to light. "
"It has two forms: the DIRECT reflex (same eye) and the CONSENSUAL reflex (opposite eye).",
style_body))
story.append(sp(6))
story.append(section_title("Pathway"))
story.append(sp(4))
light_reflex_steps = [
("Retina — Afferent", "Light → retinal photoreceptors → bipolar cells → intrinsically photosensitive retinal ganglion cells (ipRGCs, using melanopsin pigment). These are a special class of irradiance detectors distinct from visual ganglion cells."),
("Optic Nerve (CN II)", "Afferent fibres travel in the optic nerve."),
("Optic Chiasma", "Partial decussation occurs (same as visual pathway)."),
("Optic Tract", "Fibres travel in the optic tract but LEAVE BEFORE the LGB."),
("Pretectal Nucleus (Midbrain)", "Light reflex fibres branch off and synapse in the PRETECTAL NUCLEUS at the level of the superior colliculus. This is the key relay point."),
("Bilateral Projection", "Each pretectal nucleus sends fibres bilaterally to BOTH Edinger-Westphal (EW) nuclei — this explains the CONSENSUAL reflex."),
("Edinger-Westphal Nucleus — Efferent", "Preganglionic parasympathetic nucleus (accessory CN III nucleus). Preganglionic fibres travel in the oculomotor nerve (CN III)."),
("Ciliary Ganglion", "Postganglionic parasympathetic synapse in the orbit."),
("Short Ciliary Nerves", "Postganglionic fibres → SPHINCTER PUPILLAE muscle → MIOSIS (pupil constriction)."),
]
for i, (t, d) in enumerate(light_reflex_steps, 1):
story.append(numbered(i, f"<b>{t}:</b> {d}"))
story.append(sp(6))
story.append(section_title("Clinical Applications"))
story.append(sp(4))
story.append(pathway_table(
["Condition", "Finding", "Lesion / Cause"],
[["RAPD (Marcus Gunn pupil)", "Swinging flashlight test: affected eye shows paradoxical pupil dilation", "Afferent limb lesion (optic nerve disease, e.g., optic neuritis)"],
["CN III palsy (Hutchinson pupil)", "Dilated, fixed pupil; no direct or consensual reflex", "Efferent limb; CN III compression (uncal herniation, posterior communicating artery aneurysm)"],
["Horner syndrome", "Miosis + ptosis + anhidrosis", "Sympathetic pathway lesion (any level from hypothalamus to eye)"],
["Argyll Robertson pupil", "No light reflex; accommodation reflex INTACT", "Pretectal lesion (classically neurosyphilis)"],
["Adie's tonic pupil", "Poorly reactive to light; slow to accommodate", "Ciliary ganglion degeneration; benign"]],
col_widths=[4*cm, 4.5*cm, 7*cm]
))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's 26th Ed.; Adams & Victor's Principles of Neurology, 12th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 11 – ACCOMMODATION REFLEX
# ════════════════════════════════════════════════════════
story.append(chapter_header("11", "ACCOMMODATION REFLEX PATHWAY",
"The near triad — accommodation, convergence & miosis"))
story.append(sp(10))
story.append(Paragraph("Definition & Components", style_h1))
story.append(Paragraph(
"When gaze shifts from a far to a near object, three simultaneous responses occur (the 'Near Triad'):",
style_body))
story.append(sp(3))
for b in [
"ACCOMMODATION — lens becomes more convex (increased refractive power)",
"CONVERGENCE — both eyes turn medially (medial rectus muscles contract)",
"MIOSIS — pupils constrict (reduces optical aberrations, increases depth of focus)",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(section_title("Pathway"))
story.append(sp(4))
acc_steps = [
("Afferent — Retina", "Blurred image on retina (near object) → retinal ganglion cells → optic nerve."),
("Afferent — Optic pathway", "Optic nerve → chiasma → optic tract → LGB → Optic radiations → Primary visual cortex (Area 17)."),
("Higher cortex", "V1 → Visual association areas (Areas 18, 19) → Frontal eye fields (Area 8)."),
("Efferent — Midbrain", "Cortical signals descend to the pretectal area and SUPERIOR COLLICULUS → Edinger-Westphal (EW) nucleus."),
("Efferent — CN III", "EW nucleus → preganglionic parasympathetic fibres travel in CN III."),
("Ciliary Ganglion", "Synapse here; postganglionic fibres travel in short ciliary nerves."),
("Ciliary muscle", "Contraction of the circular ciliary muscle → RELAXES zonular fibres (suspensory ligament of lens) → lens becomes MORE CONVEX → increased refractive power."),
("Medial Rectus (CN III)", "Simultaneous contraction of both medial recti → CONVERGENCE."),
("Sphincter Pupillae", "Contraction → MIOSIS (same efferent pathway as light reflex)."),
]
for i, (t, d) in enumerate(acc_steps, 1):
story.append(numbered(i, f"<b>{t}:</b> {d}"))
story.append(sp(6))
story.append(Paragraph("Mechanism of Accommodation", style_h2))
for b in [
"Ciliary body muscle = CIRCULAR/SPHINCTER type smooth muscle innervated by parasympathetics.",
"At rest (far vision): ciliary muscle RELAXED → zonules TAUT → lens is FLAT (less powerful).",
"Near vision: ciliary muscle CONTRACTS → zonules RELAX → lens becomes CONVEX (more powerful).",
"Near point: closest point at which clear focus is possible; recedes with age (presbyopia).",
"Presbyopia: At 40-45 years, lens hardness increases, reducing accommodation amplitude → reading glasses (convex lens).",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(clinical_box("Key Clinical Distinctions",
["Accommodation reflex pathway goes through LGB and VISUAL CORTEX (unlike light reflex, which bypasses LGB).",
"Argyll Robertson pupil: Light reflex ABSENT; Accommodation reflex PRESENT → lesion in pretectal area (above EW nucleus), typically neurosyphilis.",
"Adie's tonic pupil: Both reflexes sluggish → ciliary ganglion degeneration.",
"CN III palsy: Both reflexes absent (efferent limb affected) + ptosis + 'down and out' eye.",
"Convergence insufficiency: Near triad breaks down → esophoria, eyestrain when reading."]))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's 26th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 12 – ENDOCOCHLEAR POTENTIAL
# ════════════════════════════════════════════════════════
story.append(chapter_header("12", "ENDOCOCHLEAR POTENTIAL",
"The cochlear battery that drives hearing"))
story.append(sp(10))
story.append(Paragraph("The Fluid Compartments of the Cochlea", style_h1))
story.append(pathway_table(
["Compartment", "Fluid", "K⁺ (mEq/L)", "Na⁺ (mEq/L)", "Electrical Potential"],
[["Scala Vestibuli (above Reissner's membrane)", "Perilymph", "~5", "~150", "~0 mV (reference)"],
["Scala Media / Cochlear Duct", "Endolymph", "~150 (HIGH)", "~1 (low)", "+80 to +85 mV (ECP)"],
["Scala Tympani (below basilar membrane)", "Perilymph", "~5", "~150", "~0 mV"]],
col_widths=[4.8*cm, 2.5*cm, 2.2*cm, 2.2*cm, 3.7*cm]
))
story.append(sp(6))
story.append(Paragraph("The Endocochlear Potential (ECP)", style_h1))
for b in [
"The scala media (endolymph) is +80 to +85 mV relative to the perilymph — this is the ECP.",
"Generated and maintained by the STRIA VASCULARIS (metabolically active epithelium on the lateral wall of scala media).",
"Stria vascularis contains marginal cells, intermediate cells, and basal cells with extensive gap junctions.",
"K⁺ recycling pathway: Hair cells → supporting cells → spiral ligament → stria vascularis → back to endolymph.",
"The ECP is unique in being the ONLY positive potential in the extracellular fluid of the body.",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(Paragraph("Why the ECP is Critical for Hearing", style_h1))
for b in [
"Hair cell resting membrane potential = ~−60 mV.",
"When stereocilia are deflected, the hair cell tip (bathed in endolymph at +80 mV) opens K⁺ channels.",
"Total electrical gradient = Endolymph (+80 mV) − Intracell (−60 mV) = 140 mV driving force for K⁺ influx.",
"This huge driving force gives the cochlea exceptional sensitivity — enabling detection of extremely faint sounds.",
"Without the ECP, the cochlear amplifier would not function; even moderate sounds would not generate responses.",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(clinical_box("Clinical Relevance",
["Aminoglycoside antibiotics (streptomycin, gentamicin) damage stria vascularis and hair cells → loss of ECP → sensorineural hearing loss.",
"Loop diuretics (furosemide/frusemide) → inhibit Na-K-2Cl cotransporter in stria vascularis → temporarily reduce ECP → reversible hearing loss.",
"Noise-induced hearing loss: Destroys outer hair cells → loss of cochlear amplifier (40-60 dB loss).",
"Connexin 26 (GJB2) mutations: Most common cause of hereditary sensorineural hearing loss; disrupts K⁺ recycling pathway."]))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's 26th Ed.; Neuroscience: Exploring the Brain, 5th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 13 – PHYSIOLOGY OF TASTE
# ════════════════════════════════════════════════════════
story.append(chapter_header("13", "PHYSIOLOGY OF TASTE",
"Receptor mechanisms and depolarisation"))
story.append(sp(10))
story.append(Paragraph("Taste Receptor Cells", style_h1))
for b in [
"Modified epithelial cells (NOT neurons) organised into TASTE BUDS (~10,000 in humans).",
"Each taste bud has ~50-150 receptor cells, with microvilli (taste hairs) projecting through a TASTE PORE.",
"Taste buds located on: Fungiform papillae (anterior tongue), Circumvallate papillae (posterior tongue), Foliate papillae, Soft palate, Epiglottis.",
"Lifespan: ~10 days; constantly replaced from basal cells.",
"Receptor cells release ATP and serotonin as neurotransmitters onto afferent nerve fibres.",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(section_title("Receptor Mechanisms for 5 Tastes"))
story.append(sp(4))
story.append(pathway_table(
["Taste", "Stimulus", "Receptor Type", "Mechanism of Depolarisation"],
[["Salty", "Na⁺ ions", "ENaC (amiloride-sensitive Na⁺ channel)", "Direct Na⁺ influx → membrane depolarisation"],
["Sour", "H⁺ ions (acids)", "H⁺-gated channels + K⁺ channel blockade", "Block of K⁺ efflux + direct H⁺ entry → depolarisation"],
["Bitter", "Alkaloids, toxins", "T2R family (~25 types); GPCR via gustducin", "↑IP₃ → Ca²⁺ release from ER → vesicle fusion + ATP release"],
["Sweet", "Sugars, saccharin", "T1R2 + T1R3 heterodimer GPCR", "↑cAMP → PKA → close K⁺ channels → depolarisation"],
["Umami", "L-Glutamate, MSG", "T1R1 + T1R3 heterodimer GPCR", "↑cAMP (similar to sweet) → depolarisation"]],
col_widths=[1.8*cm, 2.5*cm, 3.8*cm, 7.3*cm]
))
story.append(sp(6))
story.append(Paragraph("Taste Quality and Receptor Specificity", style_h2))
for b in [
"Labelled line theory: Different receptor cells are tuned to specific taste modalities; these project to distinct brain areas.",
"Each taste quality is encoded by dedicated neural channels from receptor to cortex.",
"Bitter receptors are most diverse (25 types) — evolutionary mechanism to detect diverse toxins.",
"Sweet and umami receptors share the T1R3 subunit (heterodimeric GPCRs).",
]:
story.append(bullet(b))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's 26th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 14 – PHYSIOLOGY OF SMELL
# ════════════════════════════════════════════════════════
story.append(chapter_header("14", "PHYSIOLOGY OF SMELL",
"Olfactory transduction and neural coding"))
story.append(sp(10))
story.append(Paragraph("Olfactory Receptor Neurons (ORNs)", style_h1))
for b in [
"10-12 million ORNs in the olfactory epithelium (roof of nasal cavity, covering ~5 cm² in humans).",
"TRUE BIPOLAR NEURONS: cell body in epithelium; dendrites project as CILIA into the mucus layer; axons form CN I.",
"Unique regeneration: lifespan ~30-60 days; replaced from BASAL CELLS — the only known regenerating CNS neurons.",
"~400 functional olfactory receptor genes (largest gene family in the human genome).",
"Each neuron expresses ONLY ONE receptor type.",
"All neurons expressing the same receptor converge on 1-2 specific glomeruli in the olfactory bulb.",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(section_title("Transduction Mechanism (step-by-step)"))
story.append(sp(4))
smell_steps = [
"Odorant molecules dissolved in nasal mucus (odorant-binding proteins facilitate delivery)",
"Odorant binds to GPCR olfactory receptor on cilia membrane",
"Receptor activates Golf (olfactory Gs-type G-protein) → GDP → GTP exchange",
"Golf-GTP activates ADENYLYL CYCLASE III → cAMP increases",
"cAMP opens CNG (cyclic nucleotide-gated) cation channels → Na⁺ and Ca²⁺ influx",
"Ca²⁺ activates Ca²⁺-sensitive Cl⁻ channels → Cl⁻ efflux → further depolarisation (amplification step)",
"Action potential generated and propagated along axon to olfactory bulb",
"Adaptation: Calmodulin binds Ca²⁺ → reduces CNG channel sensitivity → receptor desensitisation",
]
for i, s in enumerate(smell_steps, 1):
story.append(numbered(i, s))
story.append(sp(6))
story.append(Paragraph("Odour Coding", style_h2))
for b in [
"COMBINATORIAL CODING: Each odorant activates a unique PATTERN of multiple receptor types.",
"~400 receptor types can theoretically distinguish >10,000 distinct odours.",
"Each glomerulus in the olfactory bulb receives input from neurons with the same receptor → spatial map.",
"Odour identity = which combination of glomeruli is activated.",
"Odour intensity = firing frequency within activated channels.",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(clinical_box("Anosmia — Clinical Causes",
["Head trauma: Shearing of CN I axons at cribriform plate (most common traumatic cause).",
"Viral: COVID-19, influenza (direct olfactory epithelium damage; often recovers).",
"Kallmann syndrome: Failure of GnRH neurons to migrate (anosmia + hypogonadotropic hypogonadism).",
"Zinc deficiency: Cofactor for olfactory processing enzymes.",
"Neurodegenerative: Early sign of Parkinson's and Alzheimer's disease (before motor/cognitive symptoms).",
"Sinonasal disease: Chronic rhinitis, polyps, sinusitis → conductive anosmia (treatable)."]))
story.append(sp(4))
story.append(Paragraph("Sources: Ganong's 26th Ed.; Eric Kandel Principles of Neural Science, 6th Ed.", style_source))
story.append(PageBreak())
# ════════════════════════════════════════════════════════
# CHAPTER 15 – PHYSIOLOGY OF HEARING
# ════════════════════════════════════════════════════════
story.append(chapter_header("15", "PHYSIOLOGY OF HEARING",
"From sound wave to action potential"))
story.append(sp(10))
story.append(Paragraph("Step-by-Step Hearing Process", style_h1))
hear_steps = [
("Outer Ear", "Pinna collects sound; external auditory canal funnels it to the tympanic membrane. The pinna is slightly forward-facing → important for vertical sound localisation."),
("Tympanic Membrane", "Vibrates in response to sound pressure waves. Connected to the malleus via the manubrium."),
("Ossicular Chain (Middle Ear)", "Malleus → Incus → Stapes. Achieves IMPEDANCE MATCHING (~22-fold pressure amplification). Stapes footplate vibrates at the oval window."),
("Oval Window → Perilymph", "Stapes movement creates travelling pressure waves in the PERILYMPH of the scala vestibuli."),
("Basilar Membrane", "Pressure waves displace the basilar membrane. TONOTOPIC: High frequencies → base (narrow, stiff); Low frequencies → apex (wide, flexible). This is the physical basis of Place Theory (von Bekesy)."),
("Hair Cells / Organ of Corti", "Basilar membrane vibration causes SHEARING of stereocilia against the tectorial membrane. Deflection toward the tallest stereocilium → TIP LINKS pull open K⁺/Ca²⁺ channels → K⁺ influx (from endolymph) → depolarisation → Ca²⁺ influx at basolateral membrane → GLUTAMATE release."),
("Outer Hair Cells (OHCs)", "3 rows of OHCs per row of IHCs. Have PRESTIN protein (molecular motor) → electromotility. The cochlear AMPLIFIER: active mechanical amplification of basilar membrane vibration (~40-60 dB gain). Damage → significant sensorineural hearing loss."),
("Inner Hair Cells (IHCs)", "1 row; TRUE sensory transducers. 95% of CN VIII afferent fibres arise from IHCs. Each IHC contacts ~10-20 afferent fibres."),
("Cochlear Nerve (CN VIII)", "Carries action potentials to the cochlear nuclei in the brainstem → central auditory pathway (see Ch. 1)."),
]
for i, (t, d) in enumerate(hear_steps, 1):
story.append(numbered(i, f"<b>{t}:</b> {d}"))
story.append(sp(6))
story.append(section_title("Sound Localisation"))
story.append(sp(4))
for b in [
"HORIZONTAL LOCALISATION: Detected by the Superior Olivary Nucleus (SON) using two cues:",
" — Interaural TIME difference (ITD): which ear receives sound first; dominant <3000 Hz",
" — Interaural LEVEL difference (ILD): sound is louder in the nearer ear; dominant >3000 Hz",
"VERTICAL LOCALISATION: Relies on the shape of the pinna modifying the sound spectrum (head-related transfer function).",
"Sound localisation is severely disrupted by lesions of the auditory cortex.",
]:
story.append(bullet(b))
story.append(sp(6))
story.append(memory_box("Organ of Corti Summary",
["Located on the basilar membrane within the scala media",
"Contains ~15,500 hair cells total (3500 IHCs + 12,000 OHCs) in humans",
"Tectorial membrane: overlies the stereocilia; provides the shearing force",
"Endocochlear potential (+80 mV in endolymph) provides ~140 mV driving force for K⁺ into hair cells",
"Reissner's membrane: separates scala media from scala vestibuli; maintains endolymph composition"]))
story.append(sp(6))
story.append(section_title("Quick Summary Table — Special Senses"))
story.append(sp(4))
story.append(pathway_table(
["Sense", "Receptor", "Cranial Nerve", "First Cortex"],
[["Hearing", "Hair cells (Organ of Corti)", "CN VIII", "Superior temporal gyrus (A1, areas 41/42)"],
["Vision", "Rods & Cones", "CN II", "Calcarine fissure, occipital (V1, area 17)"],
["Taste", "Taste receptor cells (taste buds)", "CN VII, IX, X", "Anterior insula / operculum (area 43)"],
["Smell", "Olfactory sensory neurons", "CN I", "Piriform cortex (no thalamic relay!)"],
["Touch/pain", "Mechanoreceptors, nociceptors", "CN V / spinal", "Primary somatosensory cortex (areas 1,2,3)"]],
col_widths=[2.8*cm, 4.5*cm, 3.2*cm, 5*cm]
))
story.append(sp(6))
story.append(Paragraph(
"Sources: Ganong's Review of Medical Physiology 26th Ed. | Neuroscience: Exploring the Brain 5th Ed. | "
"Junqueira's Basic Histology 17th Ed. | Adams & Victor's Principles of Neurology 12th Ed. | "
"Cummings Otolaryngology 6th Ed.",
style_source))
# ════════════════════════════════════════════════════════
# BUILD PDF
# ════════════════════════════════════════════════════════
doc.build(story, onFirstPage=on_cover, onLaterPages=on_page)
print(f"PDF created: {OUTPUT_PATH}")
print(f"File size: {os.path.getsize(OUTPUT_PATH)/1024:.1f} KB")
cd /tmp/workspace/special-senses-pdf && python generate_pdf.py 2>&1
Special Senses Study Guide
PDF Document · PDF
| Chapter | Topic |
|---|---|
| 1 | Auditory Pathway — full central pathway, tonotopy, hearing loss table |
| 2 | Visual Pathway & Defects — step-by-step, complete defect table, macular sparing |
| 3 | Taste Pathway — cranial nerves, NTS, 5 modalities receptor table |
| 4 | Olfactory Pathway — transduction mechanism, 6-step pathway, anosmia box |
| 5 | Middle Ear Functions — impedance matching, acoustic reflex, Eustachian tube |
| 6 | Theories of Hearing — Place, Frequency, Volley + combined theory mnemonic |
| 7 | Theories of Colour Vision — Trichromatic, Opponent, Zone Theory + colour blindness |
| 8 | Phototransduction — dark current, rhodopsin cascade, rods vs. cones table |
| 9 | Dark Adaptation — two phases, Purkinje shift, red goggles tip |
| 10 | Light Reflex Pathway — 9-step pathway, pupil disorders clinical table |
| 11 | Accommodation Reflex — near triad, ciliary mechanism, Argyll Robertson vs. Adie |
| 12 | Endocochlear Potential — fluid compartments table, stria vascularis, 140 mV driving force |
| 13 | Physiology of Taste — 5-modality receptor mechanism table |
| 14 | Physiology of Smell — olfactory transduction cascade, combinatorial coding |
| 15 | Physiology of Hearing — 9-step mechanism, hair cells, sound localisation + master summary table |