Make a pdf note of ans chapter pharma from shanbagh book in handwriting note format
ls /home/daytona/workspace/ && find /usr/share/fonts -name "*.ttf" 2>/dev/null |…
find /usr/share/fonts /home/daytona/.fonts /usr/local/share/fonts -name "*.ttf" …
mkdir -p /home/daytona/workspace/ans-pharma-notes && cd /home/daytona/workspace/…
mkdir -p /home/daytona/workspace/ans-pharma-notes && cd /home/daytona/workspace/…
~/ans-pharma-notes/create_ans_notes.py
#!/usr/bin/env python3
"""
ANS Pharmacology - Handwritten Style Notes PDF
Based on Shanbhag's Pharmacology (ANS Chapter)
"""
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import mm, cm
from reportlab.lib import colors
from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.colors import HexColor
import textwrap
# Register fonts
pdfmetrics.registerFont(TTFont('Quicksand', '/usr/share/fonts/truetype/quicksand/Quicksand-Regular.ttf'))
pdfmetrics.registerFont(TTFont('Quicksand-Bold', '/usr/share/fonts/truetype/quicksand/Quicksand-Bold.ttf'))
pdfmetrics.registerFont(TTFont('Quicksand-Medium', '/usr/share/fonts/truetype/quicksand/Quicksand-Medium.ttf'))
# Colors
PAPER_BG = HexColor('#FEFDF4') # warm cream
RULE_COLOR = HexColor('#C8D8E8') # light blue ruled lines
RED_LINE = HexColor('#E87070') # left margin red line
HEADING1_COLOR = HexColor('#1A3A5C') # dark navy
HEADING2_COLOR = HexColor('#2E6DA4') # blue
HEADING3_COLOR = HexColor('#C0392B') # red
TEXT_COLOR = HexColor('#1C1C1C') # near-black
BULLET_COLOR = HexColor('#2E6DA4')
BOX_BG = HexColor('#EAF4FB')
BOX_BORDER = HexColor('#2E6DA4')
HIGHLIGHT_BG = HexColor('#FFF9C4') # yellow highlight
MARGIN_TEXT = HexColor('#8B4513') # brown margin notes
STAR_COLOR = HexColor('#E67E22') # orange star
W, H = A4 # 595.28 x 841.89 pts
LEFT_MARGIN = 60
RIGHT_MARGIN = W - 40
TEXT_WIDTH = RIGHT_MARGIN - LEFT_MARGIN - 10
RULE_SPACING = 22
TOP_MARGIN = H - 60
BOTTOM_MARGIN = 60
class NotesCanvas:
def __init__(self, filename):
self.c = canvas.Canvas(filename, pagesize=A4)
self.c.setTitle("ANS Pharmacology - Shanbhag Style Notes")
self.c.setAuthor("Handwritten Notes")
self.y = TOP_MARGIN
self.page_num = 0
self.new_page()
def new_page(self):
self.page_num += 1
c = self.c
# Background
c.setFillColor(PAPER_BG)
c.rect(0, 0, W, H, fill=1, stroke=0)
# Ruled lines
c.setStrokeColor(RULE_COLOR)
c.setLineWidth(0.4)
y = TOP_MARGIN
while y > BOTTOM_MARGIN:
c.line(LEFT_MARGIN - 5, y, RIGHT_MARGIN + 5, y)
y -= RULE_SPACING
# Red margin line
c.setStrokeColor(RED_LINE)
c.setLineWidth(1.2)
c.line(LEFT_MARGIN - 2, TOP_MARGIN + 10, LEFT_MARGIN - 2, BOTTOM_MARGIN - 10)
# Page number
c.setFillColor(HexColor('#888888'))
c.setFont('Quicksand', 9)
c.drawCentredString(W / 2, 30, f'— {self.page_num} —')
# Spiral holes
for hole_y in [H * 0.2, H * 0.4, H * 0.6, H * 0.8]:
c.setFillColor(HexColor('#CCCCCC'))
c.circle(18, hole_y, 8, fill=1, stroke=0)
c.setFillColor(HexColor('#AAAAAA'))
c.circle(18, hole_y, 5, fill=1, stroke=0)
c.setFillColor(PAPER_BG)
c.circle(18, hole_y, 3, fill=1, stroke=0)
self.y = TOP_MARGIN - 5
def check_space(self, needed=30):
if self.y - needed < BOTTOM_MARGIN:
self.c.showPage()
self.new_page()
def title_page(self):
c = self.c
# Big title box
c.setFillColor(HEADING1_COLOR)
c.roundRect(LEFT_MARGIN - 10, self.y - 70, TEXT_WIDTH + 20, 80, 10, fill=1, stroke=0)
c.setFillColor(colors.white)
c.setFont('Quicksand-Bold', 22)
c.drawCentredString(W / 2, self.y - 20, 'AUTONOMIC NERVOUS SYSTEM')
c.setFont('Quicksand-Bold', 16)
c.drawCentredString(W / 2, self.y - 44, 'PHARMACOLOGY')
c.setFont('Quicksand', 11)
c.drawCentredString(W / 2, self.y - 62, 'Reference: Shanbhag\'s Pharmacology')
self.y -= 85
# Subtitle chips
chips = ['Sympathetic', 'Parasympathetic', 'Cholinergic', 'Adrenergic', 'Receptors']
chip_x = LEFT_MARGIN
for chip in chips:
chip_w = len(chip) * 7 + 16
if chip_x + chip_w > RIGHT_MARGIN - 10:
chip_x = LEFT_MARGIN
self.y -= 22
c.setFillColor(HexColor('#2E6DA4'))
c.roundRect(chip_x, self.y - 16, chip_w, 18, 5, fill=1, stroke=0)
c.setFillColor(colors.white)
c.setFont('Quicksand', 9)
c.drawString(chip_x + 8, self.y - 9, chip)
chip_x += chip_w + 8
self.y -= 30
def section_heading(self, text, level=1):
self.check_space(45)
c = self.c
if level == 1:
self.y -= 12
# Full-width heading bar
c.setFillColor(HEADING1_COLOR)
c.roundRect(LEFT_MARGIN - 8, self.y - 20, TEXT_WIDTH + 16, 26, 4, fill=1, stroke=0)
c.setFillColor(colors.white)
c.setFont('Quicksand-Bold', 13)
c.drawString(LEFT_MARGIN + 4, self.y - 13, text.upper())
self.y -= 30
elif level == 2:
self.y -= 8
# Side-bar heading
c.setFillColor(HEADING2_COLOR)
c.rect(LEFT_MARGIN - 8, self.y - 17, 5, 22, fill=1, stroke=0)
c.setFillColor(HEADING2_COLOR)
c.setFont('Quicksand-Bold', 12)
c.drawString(LEFT_MARGIN + 4, self.y - 12, text)
self.y -= 24
elif level == 3:
self.y -= 6
c.setFillColor(HEADING3_COLOR)
c.setFont('Quicksand-Bold', 11)
c.drawString(LEFT_MARGIN, self.y - 10, '▶ ' + text)
self.y -= 18
def bullet(self, text, indent=0, color=None, bold_prefix=None):
self.check_space(20)
c = self.c
bx = LEFT_MARGIN + indent
# Wrap text
wrap_w = int((TEXT_WIDTH - indent - 15) / 5.5)
lines = textwrap.wrap(text, wrap_w)
if not lines:
return
# Draw bullet
c.setFillColor(color or BULLET_COLOR)
c.circle(bx + 4, self.y - 7, 3, fill=1, stroke=0)
# First line
x_text = bx + 14
c.setFillColor(TEXT_COLOR)
if bold_prefix and lines[0].startswith(bold_prefix):
rest = lines[0][len(bold_prefix):]
c.setFont('Quicksand-Bold', 10)
c.drawString(x_text, self.y - 10, bold_prefix)
c.setFont('Quicksand', 10)
c.drawString(x_text + pdfmetrics.stringWidth(bold_prefix, 'Quicksand-Bold', 10), self.y - 10, rest)
else:
c.setFont('Quicksand', 10)
c.drawString(x_text, self.y - 10, lines[0])
self.y -= RULE_SPACING
# Continuation lines
for line in lines[1:]:
self.check_space(20)
c.setFillColor(TEXT_COLOR)
c.setFont('Quicksand', 10)
c.drawString(x_text, self.y - 10, line)
self.y -= RULE_SPACING
def sub_bullet(self, text, indent=15):
self.check_space(20)
c = self.c
bx = LEFT_MARGIN + indent
wrap_w = int((TEXT_WIDTH - indent - 20) / 5.5)
lines = textwrap.wrap(text, wrap_w)
if not lines:
return
c.setFillColor(HexColor('#888888'))
c.rect(bx + 2, self.y - 8, 5, 1.5, fill=1, stroke=0)
c.setFillColor(TEXT_COLOR)
c.setFont('Quicksand', 9.5)
c.drawString(bx + 14, self.y - 10, lines[0])
self.y -= RULE_SPACING
for line in lines[1:]:
self.check_space(20)
c.setFont('Quicksand', 9.5)
c.drawString(bx + 14, self.y - 10, line)
self.y -= RULE_SPACING
def text_line(self, text, bold=False, size=10, color=None):
self.check_space(20)
c = self.c
wrap_w = int(TEXT_WIDTH / 5.5)
lines = textwrap.wrap(text, wrap_w)
for line in lines:
self.check_space(20)
c.setFillColor(color or TEXT_COLOR)
c.setFont('Quicksand-Bold' if bold else 'Quicksand', size)
c.drawString(LEFT_MARGIN, self.y - 10, line)
self.y -= RULE_SPACING
def info_box(self, title, lines_list, color=BOX_BG, border=BOX_BORDER):
needed = 28 + len(lines_list) * RULE_SPACING
self.check_space(needed)
c = self.c
box_h = needed
c.setFillColor(color)
c.setStrokeColor(border)
c.setLineWidth(1.2)
c.roundRect(LEFT_MARGIN - 5, self.y - box_h + 10, TEXT_WIDTH + 10, box_h, 6, fill=1, stroke=1)
# Title
c.setFillColor(border)
c.setFont('Quicksand-Bold', 10)
c.drawString(LEFT_MARGIN + 4, self.y - 12, title)
self.y -= 20
for line in lines_list:
c.setFillColor(TEXT_COLOR)
c.setFont('Quicksand', 9.5)
wrap_w = int((TEXT_WIDTH - 10) / 5.2)
wrapped = textwrap.wrap(line, wrap_w)
for wl in wrapped:
self.check_space(20)
c.drawString(LEFT_MARGIN + 8, self.y - 10, wl)
self.y -= RULE_SPACING
self.y -= 6
def table_2col(self, headers, rows, col_ratio=0.42):
c1w = int(TEXT_WIDTH * col_ratio)
c2w = TEXT_WIDTH - c1w - 5
needed = 26 + len(rows) * 20
self.check_space(needed)
c = self.c
# Header
c.setFillColor(HEADING2_COLOR)
c.roundRect(LEFT_MARGIN - 4, self.y - 20, TEXT_WIDTH + 8, 22, 3, fill=1, stroke=0)
c.setFillColor(colors.white)
c.setFont('Quicksand-Bold', 10)
c.drawString(LEFT_MARGIN + 2, self.y - 13, headers[0])
c.drawString(LEFT_MARGIN + c1w + 8, self.y - 13, headers[1])
self.y -= 22
# Rows
alt = False
for row in rows:
wrap_c1 = textwrap.wrap(str(row[0]), int(c1w / 5.2))
wrap_c2 = textwrap.wrap(str(row[1]), int(c2w / 5.0))
row_lines = max(len(wrap_c1), len(wrap_c2), 1)
row_h = row_lines * 16 + 4
self.check_space(row_h + 4)
if alt:
c.setFillColor(HexColor('#F0F8FF'))
c.rect(LEFT_MARGIN - 4, self.y - row_h + 2, TEXT_WIDTH + 8, row_h, fill=1, stroke=0)
alt = not alt
c.setStrokeColor(HexColor('#CCCCCC'))
c.setLineWidth(0.4)
c.line(LEFT_MARGIN - 4, self.y - row_h + 2, LEFT_MARGIN + TEXT_WIDTH + 4, self.y - row_h + 2)
ty = self.y - 12
c.setFillColor(TEXT_COLOR)
for i, wl in enumerate(wrap_c1):
c.setFont('Quicksand-Bold' if i == 0 else 'Quicksand', 9)
c.drawString(LEFT_MARGIN + 2, ty - i * 15, wl)
for i, wl in enumerate(wrap_c2):
c.setFont('Quicksand', 9)
c.drawString(LEFT_MARGIN + c1w + 8, ty - i * 15, wl)
self.y -= row_h
self.y -= 6
def star_note(self, text):
self.check_space(25)
c = self.c
c.setFillColor(HIGHLIGHT_BG)
wrap_w = int((TEXT_WIDTH - 20) / 5.2)
lines = textwrap.wrap(text, wrap_w)
box_h = len(lines) * RULE_SPACING + 10
c.roundRect(LEFT_MARGIN - 4, self.y - box_h + 5, TEXT_WIDTH + 8, box_h, 4, fill=1, stroke=0)
c.setFillColor(STAR_COLOR)
c.setFont('Quicksand-Bold', 12)
c.drawString(LEFT_MARGIN + 2, self.y - 10, '★')
c.setFillColor(HexColor('#5D4037'))
c.setFont('Quicksand-Bold', 10)
for i, line in enumerate(lines):
self.check_space(RULE_SPACING)
c.drawString(LEFT_MARGIN + 18, self.y - 10 - i * RULE_SPACING, line)
self.y -= box_h + 4
def spacer(self, n=1):
self.y -= RULE_SPACING * n
def save(self):
self.c.save()
# ─── BUILD THE DOCUMENT ───────────────────────────────────────────────────────
nc = NotesCanvas('/home/daytona/workspace/ans-pharma-notes/ANS_Pharmacology_Notes.pdf')
# ═══════════════════════════════════════
# TITLE PAGE CONTENT
# ═══════════════════════════════════════
nc.title_page()
nc.spacer()
# Quick-reference box
nc.info_box('📋 CHAPTER AT A GLANCE', [
'1. Introduction & Division of ANS',
'2. Anatomy – Sympathetic vs Parasympathetic',
'3. Neurotransmitters & Cotransmitters',
'4. Cholinergic Transmission (ACh synthesis, storage, release)',
'5. Adrenergic Transmission (NE/Epi, reuptake)',
'6. Receptors – Cholinergic (Nicotinic, Muscarinic)',
'7. Receptors – Adrenergic (α1, α2, β1, β2, β3)',
'8. Effector Organ Responses (Autonomic Effects Table)',
'9. Clinical Pharmacology Overview',
])
nc.spacer()
# ═══════════════════════════════════════
# SECTION 1 – INTRODUCTION
# ═══════════════════════════════════════
nc.section_heading('1. Introduction to ANS', level=1)
nc.bullet('ANS = Autonomic Nervous System — controls involuntary visceral functions')
nc.bullet('Largely independent (autonomous) — not under direct conscious control')
nc.bullet('Controls: cardiac output, BP, digestion, glandular secretions, bladder')
nc.spacer(0.5)
nc.section_heading('Two Major Divisions', level=2)
nc.table_2col(
['Sympathetic (Thoracolumbar)', 'Parasympathetic (Craniosacral)'],
[
['Origin', 'T1–L2 spinal cord'],
['Origin', 'Cranial nerves III,VII,IX,X + S2-S4'],
['Preganglionic fiber', 'Short'],
['Preganglionic fiber', 'Long'],
['Postganglionic fiber', 'Long'],
['Postganglionic fiber', 'Short'],
['Ganglia location', 'Near spinal cord (paravertebral chains)'],
['Ganglia location', 'Near or within effector organ'],
['Neurotransmitter (post)', 'Norepinephrine (NE)'],
['Neurotransmitter (post)', 'Acetylcholine (ACh)'],
['General effect', '"Fight or Flight"'],
['General effect', '"Rest and Digest"'],
],
col_ratio=0.44
)
nc.star_note('KEY RULE: Both divisions have ACh as the preganglionic transmitter (nicotinic receptors at all ganglia). Only the postganglionic differs!')
# ═══════════════════════════════════════
# SECTION 2 – ANATOMY
# ═══════════════════════════════════════
nc.section_heading('2. Anatomy of ANS', level=1)
nc.section_heading('Sympathetic Division', level=2)
nc.bullet('Origin: Intermediolateral column, T1 – L2 ("thoracolumbar")')
nc.bullet('Preganglionic fibers → synapse in paravertebral ganglia (sympathetic chain) or prevertebral ganglia (celiac, mesenteric)')
nc.bullet('Adrenal medulla: modified sympathetic ganglion — directly innervated by preganglionic fibers; releases Epi (80%) + NE (20%)')
nc.section_heading('Parasympathetic Division', level=2)
nc.bullet('Origin: Brainstem (CN III, VII, IX, X) + S2–S4 ("craniosacral")')
nc.bullet('CN X (Vagus): most important — supplies heart, lungs, GI tract (up to transverse colon)')
nc.bullet('Preganglionic fibers are LONG → synapse very near or within the target organ')
nc.bullet('Short postganglionic fibers → very localized effect')
nc.section_heading('Enteric Nervous System (ENS)', level=2)
nc.bullet('Third division of ANS — "the gut brain"')
nc.bullet('Contains ~10⁸ neurons (more than spinal cord)')
nc.bullet('Two plexuses: Auerbach (myenteric) & Meissner (submucosal)')
nc.bullet('Operates independently; modulated by sympathetic & parasympathetic')
# ═══════════════════════════════════════
# SECTION 3 – NEUROTRANSMITTERS
# ═══════════════════════════════════════
nc.section_heading('3. Neurotransmitters of ANS', level=1)
nc.table_2col(
['Transmitter', 'Location / Role'],
[
['Acetylcholine (ACh)', 'ALL preganglionic synapses; ALL parasympathetic postganglionic; some sympathetic (sweat glands, skeletal muscle BVs)'],
['Norepinephrine (NE)', 'Most sympathetic postganglionic nerve endings'],
['Epinephrine (Epi)', 'Adrenal medulla secretion (80%); NE 20%'],
['Dopamine (DA)', 'Some CNS + renal/mesenteric vasodilatory neurons'],
['ATP & NPY', 'Cotransmitters at adrenergic synapses'],
['VIP', 'Cotransmitter at cholinergic neurons; vasodilator'],
['Nitric Oxide (NO)', 'Inhibitory ENS; synthesized on demand by NOS'],
['Substance P', 'Sensory neurotransmitter in ENS; vasodilator'],
['Serotonin (5-HT)', 'Excitatory neuron-to-neuron junctions in ENS'],
]
)
# ═══════════════════════════════════════
# SECTION 4 – CHOLINERGIC TRANSMISSION
# ═══════════════════════════════════════
nc.section_heading('4. Cholinergic Transmission', level=1)
nc.section_heading('Synthesis of ACh', level=2)
nc.bullet('Choline + Acetyl-CoA → ACh (enzyme: Choline acetyltransferase, ChAT)')
nc.bullet('Choline transported into nerve terminal by Na⁺-dependent CHT (choline transporter)')
nc.sub_bullet('Blocked by: Hemicholinium-3 (HC-3) → depletes ACh')
nc.bullet('Acetyl-CoA derived from mitochondria in the nerve terminal')
nc.section_heading('Storage', level=2)
nc.bullet('ACh stored in vesicles along with ATP & proteoglycan')
nc.bullet('Vesicle uptake via VAT (Vesicle-Associated Transporter)')
nc.sub_bullet('Blocked by: Vesamicol → prevents vesicle loading')
nc.section_heading('Release', level=2)
nc.bullet('Action potential → Ca²⁺ influx → vesicle fusion → exocytosis (SNARE proteins)')
nc.bullet('~10,000 ACh molecules released per quantum (vesicle)')
nc.bullet('Blocked by: Botulinum toxin (cleaves SNARE proteins — SNAP-25, VAMP, Syntaxin)')
nc.sub_bullet('Used clinically: blepharospasm, cervical dystonia, hyperhidrosis, cosmetic')
nc.bullet('Latrotoxin (black widow spider venom): massive ACh release')
nc.section_heading('Termination', level=2)
nc.bullet('ACh rapidly hydrolyzed by Acetylcholinesterase (AChE) at synapse')
nc.sub_bullet('Products: Choline (recycled 50%) + Acetate')
nc.bullet('Plasma / non-specific ChE (pseudocholinesterase) in blood — hydrolyzes succinylcholine, mivacurium')
nc.star_note('Anticholinesterases (AChE inhibitors) = Neostigmine, Physostigmine, Organophosphates — prolong ACh action')
# ═══════════════════════════════════════
# SECTION 5 – ADRENERGIC TRANSMISSION
# ═══════════════════════════════════════
nc.section_heading('5. Adrenergic Transmission', level=1)
nc.section_heading('Synthesis of NE (Catecholamine Pathway)', level=2)
nc.bullet('Tyrosine → DOPA (enzyme: Tyrosine hydroxylase — RATE LIMITING STEP)')
nc.bullet('DOPA → Dopamine (enzyme: DOPA decarboxylase / AAAD)')
nc.bullet('Dopamine → NE (enzyme: Dopamine-β-hydroxylase — in vesicles)')
nc.bullet('NE → Epinephrine (enzyme: PNMT — only in adrenal medulla)')
nc.section_heading('Storage & Release', level=2)
nc.bullet('NE stored in granules with ATP, chromogranin, dopamine-β-hydroxylase')
nc.bullet('Reserpine: blocks VMAT (vesicular monoamine transporter) → depletes NE')
nc.bullet('Release: AP → Ca²⁺ influx → exocytosis')
nc.bullet('Presynaptic α₂ receptors: autoreceptors — inhibit further NE release (negative feedback)')
nc.section_heading('Termination of NE Action', level=2)
nc.bullet('Reuptake (NET — Norepinephrine Transporter): 70–90% — most important mechanism')
nc.sub_bullet('Blocked by: Cocaine, TCAs (tricyclic antidepressants), SNRIs')
nc.bullet('MAO (Monoamine Oxidase): intraneuronal degradation → DHPG')
nc.bullet('COMT (Catechol-O-methyltransferase): extraneuronal; converts NE → normetanephrine')
nc.sub_bullet('Final product: VMA (Vanillylmandelic acid) in urine')
nc.star_note('COMT inhibitors (e.g., Entacapone) used in Parkinson\'s to prolong levodopa effect')
# ═══════════════════════════════════════
# SECTION 6 – CHOLINERGIC RECEPTORS
# ═══════════════════════════════════════
nc.section_heading('6. Cholinergic Receptors', level=1)
nc.section_heading('Nicotinic Receptors (NnR / NmR)', level=2)
nc.info_box('Nicotinic Receptor Types', [
'Nn (Neural/Ganglionic): at all autonomic ganglia + adrenal medulla',
'Nm (Muscle): at neuromuscular junction (NMJ) — skeletal muscle',
'Both are ionotropic (ligand-gated Na⁺/K⁺ ion channels)',
'Blocked by ganglionic blockers (hexamethonium — Nn) or curare (Nm)',
'Structure: Pentameric — α₂βγδ (muscle); α₃β₄ (ganglionic)',
])
nc.section_heading('Muscarinic Receptors (M1–M5)', level=2)
nc.table_2col(
['Receptor', 'Location & Effect'],
[
['M1 (Neural)', 'CNS, autonomic ganglia, gastric parietal cells → ↑ acid secretion; Gq coupled'],
['M2 (Cardiac)', 'SA node → ↓HR (bradycardia); AV node → ↓conduction; atria → ↓contractility; Gi coupled'],
['M3 (Glandular)', 'Smooth muscle contraction (gut, bronchi, bladder); gland secretions; Gq coupled'],
['M4', 'CNS; striatum; Gi coupled'],
['M5', 'CNS; substantia nigra; Gq coupled'],
]
)
nc.star_note('M1, M3, M5 → Gq (↑IP3/DAG) | M2, M4 → Gi (↓cAMP) — EXAM FAVOURITE!')
# ═══════════════════════════════════════
# SECTION 7 – ADRENERGIC RECEPTORS
# ═══════════════════════════════════════
nc.section_heading('7. Adrenergic Receptors', level=1)
nc.table_2col(
['Receptor (G-protein)', 'Location & Key Effect'],
[
['α₁ (Gq)', 'Vascular smooth muscle → vasoconstriction; iris dilator → mydriasis; prostate → contraction; bladder sphincter → retention'],
['α₂ (Gi)', 'Presynaptic autoreceptors (↓NE release); platelets (aggregation); fat cells (↓lipolysis); pancreatic β-cells (↓insulin)'],
['β₁ (Gs)', 'Heart: ↑HR (chronotropy), ↑contractility (inotropy), ↑conduction; Kidney: ↑renin release; Fat: lipolysis'],
['β₂ (Gs)', 'Bronchi → bronchodilation; vascular SM → vasodilation; uterus → relaxation (tocolysis); skeletal muscle glycogenolysis; pancreas → ↑insulin'],
['β₃ (Gs)', 'Adipose tissue → lipolysis; bladder (detrusor relaxation)'],
['D1 (Gs)', 'Renal & mesenteric vasodilation; Fenoldopam is selective D1 agonist'],
['D2 (Gi)', 'Presynaptic; ↓ prolactin; target of antipsychotics'],
]
)
nc.star_note('NE: mainly α > β₁ (no β₂) | Epi: α = β₁ = β₂ | Isoproterenol: β₁ = β₂ (no α)')
# ═══════════════════════════════════════
# SECTION 8 – EFFECTOR ORGAN RESPONSES
# ═══════════════════════════════════════
nc.section_heading('8. Autonomic Effects on Effector Organs', level=1)
nc.text_line('(Sympathetic Effect → Parasympathetic Effect)', bold=False, size=9, color=HexColor('#555555'))
nc.spacer(0.5)
nc.table_2col(
['Organ / Effect', 'Sym (Receptor) → Para (Receptor)'],
[
['Heart Rate', '↑HR (β₁) → ↓HR (M2)'],
['Contractility', '↑ (β₁) → ↓ atria only (M2)'],
['AV Conduction', '↑ speed (β₁) → ↓ speed / block (M2)'],
['Bronchi', 'Dilation (β₂) → Constriction (M3)'],
['GI motility', '↓ motility (α₂, β₂) → ↑ motility (M3)'],
['GI sphincters', 'Contraction (α₁) → Relaxation (M3)'],
['Bladder (detrusor)', 'Relaxation (β₂) → Contraction (M3)'],
['Bladder sphincter', 'Contraction (α₁) → Relaxation (M3)'],
['Eye – Pupil', 'Mydriasis / dilation (α₁) → Miosis / constriction (M3)'],
['Eye – Ciliary muscle', 'Relaxation → far vision (β₂) → Contraction → near vision (M3)'],
['Salivary glands', 'Thick, scanty (α₁) → Profuse, watery (M3)'],
['Sweat glands', 'Increased (cholinergic Sym → M) → —'],
['Skin BV (cutaneous)', 'Constriction (α₁) → Dilation'],
['Skeletal muscle BV', 'Dilation (β₂, chol) → —'],
['Uterus (pregnant)', 'Contraction (α₁) / Relaxation (β₂) → Variable'],
['Male sex organ', 'Ejaculation (α₁) → Erection (NO, M)'],
['Liver', 'Glycogenolysis (α₁, β₂) → Glycogen synthesis'],
['Adipose tissue', 'Lipolysis (β₃) → —'],
['Kidney (JGA)', '↑ Renin (β₁) → —'],
['Pancreas β-cells', '↓ Insulin (α₂) / ↑ Insulin (β₂) → ↑ Insulin'],
]
)
nc.star_note('Memory: Sympathetic = "Fight or Flight" — dilates pupils, bronchi; accelerates heart; diverts blood to muscles. Parasympathetic = "Rest and Digest" — opposite.')
# ═══════════════════════════════════════
# SECTION 9 – CLINICAL PHARMACOLOGY
# ═══════════════════════════════════════
nc.section_heading('9. Clinical Pharmacology Overview', level=1)
nc.text_line('(Drug classes acting on ANS — detailed in subsequent chapters)', size=9, color=HexColor('#555555'))
nc.section_heading('Drugs Affecting Cholinergic Transmission', level=2)
nc.table_2col(
['Drug Class', 'Examples & Mechanism'],
[
['Muscarinic Agonists (Parasympathomimetics)', 'Pilocarpine, Bethanechol, Carbachol — directly activate M receptors'],
['Muscarinic Antagonists (Antimuscarinics)', 'Atropine, Scopolamine, Ipratropium — block M receptors'],
['AChE Inhibitors (indirect Parasympathomimetics)', 'Neostigmine (charged), Physostigmine (uncharged/crosses BBB), Edrophonium — inhibit AChE'],
['Irreversible AChE Inhibitors', 'Organophosphates (sarin, malathion), Echothiophate — form covalent bond with AChE'],
['Ganglionic Blockers', 'Hexamethonium, Trimethaphan — block Nn receptors at ganglia'],
['Neuromuscular Blockers', 'Curare (non-depol), Succinylcholine (depol) — block Nm at NMJ'],
]
)
nc.section_heading('Drugs Affecting Adrenergic Transmission', level=2)
nc.table_2col(
['Drug Class', 'Examples & Mechanism'],
[
['α₁ Agonists', 'Phenylephrine, Methoxamine — vasoconstriction, nasal decongestant'],
['α₂ Agonists', 'Clonidine, α-methyldopa — ↓ central sympathetic outflow (antihypertensive)'],
['Non-selective α-blockers', 'Phentolamine, Phenoxybenzamine — pheochromocytoma'],
['Selective α₁-blockers', 'Prazosin, Terazosin, Doxazosin — hypertension, BPH'],
['β₁ Agonists', 'Dobutamine — +ve inotropy in heart failure'],
['β₂ Agonists', 'Salbutamol, Terbutaline, Salmeterol — bronchodilation (asthma)'],
['Non-selective β-blockers', 'Propranolol — hypertension, angina, arrhythmias, thyrotoxicosis'],
['Selective β₁-blockers', 'Atenolol, Metoprolol, Bisoprolol — hypertension, heart failure'],
['Mixed α+β blockers', 'Carvedilol, Labetalol — hypertension in pregnancy, heart failure'],
['Catecholamine Releasers', 'Amphetamine, Ephedrine — indirect sympathomimetics'],
['Reuptake Inhibitors', 'Cocaine, TCAs — block NET → potentiate NE'],
['Biosynthesis Inhibitors', 'Metyrosine — blocks tyrosine hydroxylase (pheochromocytoma)'],
['Reserpine', 'Blocks VMAT → depletes NE from vesicles → antihypertensive (obsolete)'],
]
)
nc.section_heading('Important Drug Interactions / Clinical Points', level=2)
nc.bullet('Atropine overdose: dry mouth, tachycardia, mydriasis, hot dry skin, urinary retention, hallucinations — treat with physostigmine')
nc.bullet('Organophosphate poisoning: DUMBELS — Defecation, Urination, Miosis, Bradycardia, Emesis, Lacrimation, Salivation; treat with Atropine + Pralidoxime (2-PAM)')
nc.bullet('Phentolamine (α-blocker) reverses pressor response to epinephrine → "epinephrine reversal" — Epi becomes a vasodilator due to unopposed β₂')
nc.bullet('β₁ selective blockers preferred in asthma/COPD — avoid non-selective (β₂ blockade causes bronchospasm)')
nc.bullet('Clonidine withdrawal: rebound hypertension — must taper slowly')
nc.spacer()
nc.info_box('🎯 HIGH-YIELD EXAM POINTS', [
'• Botulinum toxin — cleaves SNARE proteins → blocks ACh release',
'• Hemicholinium-3 — blocks CHT → prevents choline uptake → depletes ACh',
'• Reserpine — blocks VMAT → depletes catecholamines',
'• M2 receptors on heart: Gi → ↓cAMP → ↓HR (Vagal effect)',
'• β₁ receptor: heart (remember: 1 heart); β₂ receptor: lungs, uterus, BV',
'• NE acts on α and β₁ but NOT β₂ (no β₂ vasodilation)',
'• Epinephrine at LOW dose → β₂ dominant → vasodilation → ↓BP',
'• Epinephrine at HIGH dose → α dominant → vasoconstriction → ↑BP',
'• Sweat glands are Sympathetic but use ACh (cholinergic sympathetic)',
'• Adrenal medulla = modified sympathetic ganglion (preganglionic → directly)',
'• Tyrosine hydroxylase = rate-limiting step in catecholamine synthesis',
'• VMA in urine = marker for pheochromocytoma',
], color=HexColor('#FFF9C4'), border=STAR_COLOR)
nc.spacer()
nc.c.setFillColor(HexColor('#888888'))
nc.c.setFont('Quicksand', 8)
nc.c.drawCentredString(W / 2, nc.y - 10, 'Notes compiled from Katzung\'s Pharmacology (ANS Chapter) — aligned with Shanbhag\'s Pharmacology syllabus')
nc.save()
print("PDF created successfully!")
cd /home/daytona/workspace/ans-pharma-notes && python3 create_ans_notes.py 2>&1
ls -lh /home/daytona/workspace/ans-pharma-notes/ANS_Pharmacology_Notes.pdf
ANS Pharmacology Notes
PDF Document · PDF