attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment

Make note with these pics

attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment

Also add these in the notes

Here are your comprehensive notes from all 14 images — Chapter 20: Small and Large Intestines.

Chapter 20: Small and Large Intestines

(BDC Anatomy Notes)


SMALL INTESTINE

  • Extends from pylorus to ileocaecal junction
  • Length: ~5 meters (3–8.5 m) in living adult; longer in males than females; greater in cadavers
  • Divided into:
    1. Proximal — Duodenum
    2. Middle — Jejunum
    3. Distal — Ileum
  • Duodenum: 25 cm, fixed
  • Jejunum + Ileum: mobile; jejunum = proximal 2/5th, ileum = distal 3/5th

Wall Structure (4 layers, inside out):

  1. Mucosa — lining epithelium + lamina propria + muscularis mucosae
  2. Submucosa — dense irregular connective tissue
  3. Muscularis externa — inner circular + outer longitudinal smooth muscle
  4. Serosa/Adventitia — connective tissue layer

Modifications to Enhance Surface Area:

  1. Plicae circulares (valves of Kerckring) — circumferential permanent submucosal folds; absent in proximal 5–6 cm of duodenum and terminal ileum
  2. Intestinal villi — finger-like mucosal projections
  3. Microvilli — cell-surface projections (microscopic)
  4. Length of intestine + crypts (Crypts of Lieberkühn) — simple tubular intestinal glands lined by tall columnar epithelium; secrete digestive enzymes and mucus

Lymphatic Follicles:

  • Solitary lymph follicles — 1–2 mm, distributed throughout small and large intestine
  • Aggregated lymph follicles (Peyer's patches) — circular/oval, 2–10 cm, 10–200 in number, more in terminal ileum, along antimesenteric border; longitudinally oriented → typhoid/TB causes longitudinal oval ulcers (typhoid ulcers do NOT heal with scar)
  • Circular tubercular ulcers — due to infection of lymphatic vessels

Arterial Supply:

  1. Duodenum — branches of coeliac trunk and superior mesenteric artery
  2. Jejunum and ileum — jejunal and ileal branches of superior mesenteric artery (12–15 branches from left side)
  3. These form arterial arcades in mesentery
  4. Vasa recta — straight parallel branches from terminal arcade; anastomosis between them is poorly developed

Venous Drainage:

  • Veins correspond to branches of superior mesenteric artery → drain into portal vein

Lymphatics:

  • Lacteals — small lymphatic capillaries in intestinal villi; absorb dietary fat; circular course in intestinal walls
  • Pass through mesenteric nodes → around beginning of superior mesenteric artery

Nerve Supply:

  • Parasympathetic — vagus nerve via coeliac and superior mesenteric plexuses → stimulates peristalsis, inhibits sphincters, enhances intestinal secretions
  • Sympathetic — T9 and T11 spinal cord via splanchnic nerves → join celiac and superior mesenteric plexus; stimulates sphincters, inhibits peristalsis and secretions
  • Myenteric plexus of Auerbach — between circular and longitudinal muscle coats
  • Submucous plexus of Meissner — in submucosa
  • Both contain parasympathetic ganglia → form enteric nervous system

Mesentery of Small Intestine:

  • Peritoneal fold covering the small intestine
  • Due to rotation of gut and zygosis in embryo → duodenum becomes retroperitoneal; mesentery hangs jejunum and ileum only
  • Broad fan-shaped double-layered fold
  • Attached border (root): fixed to posterior abdominal wall, obliquely, 15 cm long, from duodenojejunal flexure (left of L2) to upper part of right sacroiliac joint
  • Free/intestinal border: encloses jejunum and ileum

DUODENUM

  • Shortest, widest, most fixed part of small intestine
  • Extends from pylorus to duodenojejunal flexure
  • Curved around head of pancreas in form of letter 'C'
  • Lies above level of umbilicus, opposite L1, L2, L3
  • Lies on posterior abdominal wall with pancreas → least accessible for clinical examination

Length and Parts:

PartLength
1st (superior)5 cm / 2 inches
2nd (descending)7.5 cm / 3 inches
3rd (horizontal)10 cm / 4 inches
4th (ascending)2.5 cm / 1 inch

JEJUNUM AND ILEUM

  • Suspended from posterior abdominal wall by mesentery → considerable mobility
  • Jejunum = upper 2/5th; Ileum = lower 3/5th of mobile small intestine
  • Jejunum begins at duodenojejunal flexure
  • Ileum terminates at ileocaecal junction

Blood Supply:

  • Superior mesenteric artery branches; drained by corresponding veins

Lymphatic Drainage:

  • Lacteals → plexuses in gut wall → lymphatic vessels in mesentery → lymph nodes along superior mesenteric artery → para-aortic and preaortic nodes

Nerve Supply:

  • Sympathetic: T9–T11
  • Parasympathetic: vagus

Histology (4 layers):

  1. Mucosa — simple columnar epithelium with striated border of microvilli; tongue-shaped villi in jejunum, finger-like in ileum; Peyer's patches and M cells (antigen-presenting) in lamina propria of ileum
  2. Submucosa — no Brunner's glands (distinguishes from duodenum)
  3. Muscularis externa — inner circular + outer longitudinal
  4. Serosa — peritoneum externally

Differences Between Jejunum and Ileum (Table 20.1):

FeatureJejunumIleum
LocationUpper and left intestinal areaLower and right intestinal area
WallsThicker, more vascularThinner, less vascular
LumenWider, often emptyNarrower, often loaded
Mesentery windowsPresentAbsent
Fat in mesenteryLess abundantMore abundant
Arterial arcades1 or 23 or 6
Vasa rectaLonger and fewerShorter and more numerous
Circular mucosal foldsLarger, closely setSmaller and sparse
Villi (microscopic)Large, thick (leaf-like), abundantShorter, thinner (finger-like), less abundant
Peyer's patchesAbsentPresent, more numerous
Solitary lymphatic folliclesFewerMore

MECKEL'S DIVERTICULUM (Diverticulum Ilei)

  • Persistent proximal part of vitellointestinal duct
  • True congenital diverticulum of small intestine
  • Rule of 2s mnemonic: 2% subjects, Male:Female = 2:1, 2 inches long, 2 feet from ileocaecal valve, 2 years most common age at clinical presentation, 2 types of ectopic tissue (gastric + pancreatic)
  • Attached to antimesenteric border of ileum
  • Caliber equal to ileum
  • Apex may be free or attached to umbilicus/mesentery/abdominal structure by fibrous band
  • Clinical: may cause intestinal obstruction; acute inflammation mimics appendicitis
  • Umbilical faecal fistula (vitelline fistula): patent vitellointestinal duct → communication of small intestine with exterior → faecal matter discharged
  • Enterocystoma (vitelline cyst): cyst of vitellointestinal duct from small persistent middle part

LARGE INTESTINE

  • Extends from ileocaecal junction to anus
  • Length: ~1.5 m

Functions:

  1. Absorption of water and minerals
  2. Secretion of mucus to lubricate faeces
  3. Storage and expulsion of faeces
  4. Synthesis of vitamin B (bacterial flora)
  5. Protection from microorganisms by secreting IgA antibodies

Parts:

  1. Caecum
  2. Appendix
  3. Colon (ascending colon, right/hepatic flexure, transverse colon, left/splenic flexure, descending colon, sigmoid colon)
  4. Rectum
  5. Anal canal

Three Cardinal Features of Large Intestine:

  1. Taenia coli — three ribbon-like bands of longitudinal muscle layer of muscularis externa of colon
  2. Appendices epiploicae — small bags of peritoneum filled with fat; scattered over large intestine surface except at appendix, caecum and rectum
  3. Sacculations (haustrations) — series of dilations of wall of caecum and colon; produced by shorter length of taenia coli than circular muscle coat → puckered appearance

Other Features:

  • Wide caliber (larger than small intestine)
  • Most of large intestine is retroperitoneal and fixed (except transverse and sigmoid colons)
  • Appendices epiploicae most numerous on sigmoid colon and posterior surface of transverse colon
  • No villi, no transverse muscular folds, no Peyer's patches; large number of goblet cells

Positions of Taenia Coli:

  • Taenia libera: anteriorly (inferiorly in transverse colon)
  • Taenia mesocolica: posteromedially (anterosuperiorly in transverse colon)
  • Taenia omentalis: posterolaterally (anterosuperiorly in transverse colon)
  • Change in position due to twist in transverse colon

Arterial Supply:

  • From marginal artery of Drummond — formed by colic branches of superior and inferior mesenteric arteries
  • Terminal branches: vasa longa and vasa brevia distributed to intestine
  • Anastomosis between amesocolic taeniae is extremely poor → longitudinal incisions along this line
  • Arc of Riolon (mesenteric artery of Moskowitz) — connects superior and inferior mesenteric arteries

Venous Drainage:

  • Follows corresponding branches of superior and inferior mesenteric arteries → portal vein via superior and inferior mesenteric veins

Lymphatic Drainage (Fig. 20.15):

  1. Epiploic nodes — on wall of gut
  2. Paracolic nodes — medial side of ascending/descending colons and mesocolic border of transverse and sigmoid colon
  3. Intermediate nodes — along branches of main arteries
  4. Terminal nodes — superior and inferior mesenteric nodes
Note (carcinoma of colon): paracolic and intermediate nodes must be removed → requires ligature of main mesenteric artery branch → large segment of bowel removed to avoid gangrene

Nerve Supply:

  • Sympathetic fibres — from coeliac and superior mesenteric plexuses (T11 and L1 segment); vasomotor + motor for internal anal sphincter + inhibitory for colon; carry pain sensations from large intestine up to descending colon (Note: pelvic splanchnic nerves carry sensations from sigmoid colon and rectum)
  • Parasympathetic fibres — pelvic splanchnic nerves (nervi erigentes) via superior and inferior mesenteric plexuses; motor to large intestine; inhibitory to internal anal sphincter

Histology of Large Intestine (Colon):

  1. Mucosa — simple columnar absorptive cells with microvilli and goblet cells; intestinal glands (crypts of Lieberkühn) lined by goblet cells; discrete lymphatic follicles in lamina propria
  2. Submucosa — dense irregular connective tissue
  3. Muscularis externa — inner circular + outer longitudinal (forms three bands of taenia coli)
  4. Serosa/Adventitia
  • Colon does NOT have: plicae circulares, villi, Paneth cells

Differences: Small vs. Large Intestine (Table 20.2):

FeatureSmall IntestineLarge Intestine
Appendices epiploicaeAbsentPresent
Taenia coliAbsentPresent
SacculationsAbsentPresent
Distensibility/diameterLessMore
FixityMostly freely mobileMostly fixed
VilliPresentAbsent
Transverse mucosal foldsPermanentObliterated when longitudinal muscle relaxes
Peyer's patchesPresent in ileumAbsent
Common infectionsWorms, typhoid, TBEntamoeba histolytica, dysentery, carcinoma
Effects of infectionDiarrhoeaDysentery

Clinical Anatomy:

  • Large intestine viewed by colonoscopy
  • Diverticulum: small evagination of mucous membrane at entry point of arteries → inflammation = diverticulitis
  • Barium enema visualizes internal structure on radiograph

CAECUM

  • Large blind sac (Latin: blind); commencement of large intestine
  • Location: right iliac fossa, above lateral half of inguinal ligament; anterior to iliacus and psoas major
  • Dimensions: L = 6 cm, W = 7.5 cm (Note: broader than longer; organs with greater width than length = caecum, prostate, pons, pituitary)
  • Completely covered by peritoneum (intraperitoneal)

Visceral Relations:

  • Anterior: coils of intestine + anterior abdominal wall
  • Posterior:
    1. Right psoas + iliacus muscles
    2. Genitofemoral, femoral, lateral cutaneous nerve of thigh (all right side)
    3. Testicular or ovarian vessels
    4. Appendix in retrocaecal recess

Communications:

  1. Superiorly — ascending colon
  2. Medially — ileum via ileocaecal junction
  3. Posteromedially — appendix

Peritoneal Folds Related to Caecum (Plate 20.8):

  1. Superior ileocaecal fold (vascular fold of caecum): connects caecum with terminal ileum, mesentery and posterior abdominal wall; contains anterior caecal artery; superior ileocaecal recess lies deep to it
  2. Inferior ileocaecal fold (bloodless fold of Treves): anteroinferior terminal ileum to caecum/appendix; no blood vessels; inferior ileocaecal recess lies deep
  3. Caecal fold: posterior surface of caecum to posterior abdominal wall; retrocaecal recess lies inferomedial to it

Vessels and Nerves:

  • Arterial supply from ileocolic artery (Fig. 20.18)
  • Veins drain to superior mesenteric vein
  • Nerve supply: same as midgut (T11–L1; parasympathetic = vagus)

Development and Types of Caecum:

  • Caecum and appendix develop from caecal bud arising from postarterial segment of midgut loop
  • Proximal bud → caecum; distal part → appendix
  • Types:
    1. Conical/foetal (type I) — appendix attached to apex
    2. Intermediate (13%) — right and left caecal pouches equal
    3. Ampullary (73–74%) — largest right caecal pouch; appendix attached posteromedially, 2 cm below ileocaecal junction
    4. Exaggerated (4–5%) — large right caecal pouch; left saccule absent; appendix just below ileocaecal junction

Internal Appearance:

  • Two orifices: ileocaecal orifice + appendicular orifice (visualized by colonoscopy)

Ileocaecal Orifice (Ileal Papilla):

  • Projecting terminal end of ileum into caecum; posteromedial wall of caecum, at junction with ascending colon; ~2.5 cm transversely
  • Guarded by ileocaecal valve
  • Valve structure: upper lip (horizontal mucosal fold at ileum-colon junction) + lower lip (longer, concave, at ileum-caecum junction) + two frenula (right/posterior and left/anterior)
  • Functions: prevents reflux of faecal matter to ileum; regulates flow of ileal contents to caecum

VERMIFORM APPENDIX

  • Worm-like diverticulum from posteromedial wall of caecum, 2 cm below ileocaecal orifice
  • Dimensions: Length 6–10 cm (up to 3 years in adults; reference: Gray's Anatomy, 42nd ed.); Diameter: 5 mm; Lumen narrow (obliterated after mid-adult life)
  • Parts: Base (fixed, posteromedial caecal wall, 2 cm below ileocaecal junction; convergence of taenia coli = surgical guide for appendicectomy), Body (narrow, tubular, uniform diameter), Tip (rounded blind end, least vascular)

Positions of Appendix (Fig. 20.20):

  1. Paracolic (11 o'clock) — 2%: passes upward and right of ascending colon
  2. Retrocaecal/Retrocolic (12 o'clock) — 65.28%: most common; passes behind caecum and ascending colon
  3. Splenic (2 o'clock): passes upward medially; may pass anterior (preileal) or posterior (postileal) to terminal ileum
  4. Promonteric (3 o'clock) <1%: passes horizontally left toward sacral promontory
  5. Pelvic (4 o'clock) — 31.01%: second most common; descends downward medially; crosses pelvic brim into true pelvis
  6. Midinguinal/Subcaecal (6 o'clock) — 2%: lies below caecum; points toward midinguinal point
Pre-ileal splenic (2 o'clock) is most dangerous — infection may spread to general peritoneal cavity

Appendicular Orifice:

  • Small circular opening on posteromedial caecal wall, 2 cm below ileocaecal orifice
  • Guarded by indistinct semilunar mucosal folds called valve of Gerlach
  • Surface marking: point 2 cm below junction of transtubercular and right lateral planes (Fig. 20.21)
  • McBurney's point: maximum tenderness in appendicitis; junction of lateral 1/3rd and medial 2/3rd of line from right ASIS to umbilicus

Lumen: Small; may be obliterated after mid-adult life

Peritoneal Relations:

  • Intraperitoneal organ
  • Mesoappendix: small triangular double-layered fold of peritoneum suspending appendix from lower end of mesentery; close to ileocaecal junction
  • Contents of mesoappendix: appendicular artery and vein, autonomic nerves, lymphatic vessels, lymph nodes

Blood Supply:

  • Appendicular artery — branch of lower division of ileocolic artery; runs behind terminal ileum to mesoappendix; toward tip along free margin; gives recurrent branch anastomosing with posterior caecal artery; end artery → poorly supplies tip → prone to gangrenous changes in appendicitis
  • Veins drain to appendicular, ileocolic, and superior mesenteric veins → portal vein

Nerve Supply:

  • Sympathetic: T9 and T10 (coeliac plexus) → referred pain felt at umbilicus (similar to small intestine and testis)
  • Parasympathetic: vagus

Lymphatic Drainage:

  • Most lymphatics → ileocolic nodes directly
  • Few → indirectly via appendicular nodes in mesoappendix

Histology (4 layers):

  1. Mucosa — simple columnar epithelium with goblet cells and M cells; lamina propria has short tubular intestinal glands; mostly occupied by large and small lymphatic follicles (may cross muscularis mucosae into submucosa)
  2. Submucosa — connective tissue; many lymphatic follicles extend from lamina propria
  3. Muscularis externa — inner circular + outer longitudinal; no taenia coli (though part of large intestine)
  4. Serosa — entirely covered by peritoneum

Clinical Anatomy (Appendix):

  • Appendicitis — inflammation; symptoms: right lower abdominal pain, nausea, vomiting, fever; initially periumbilical then localizes to right iliac fossa
    1. Tenderness at McBurney's point
    2. Psoas test: retrocaecal position → forced extension of right thigh induces pain in right iliac fossa
    3. Obturator test: pelvic position → flexion + medial rotation of right thigh causes pain in lower abdomen
    4. Rovsing sign: palpation of left iliac region induces pain in right iliac region
    • Treatment: Appendicectomy
  • Appendicular dyspepsia: chronic appendicitis → dyspepsia resembling stomach/duodenum/gallbladder disease; infected lymph passes to subpyloric nodes causing pyloric irritation

Clinical Anatomy (Caecum):

  • Typhlitis/caecitis — inflammation of caecum
  • Caecal volvulus — twisting of caecum + ascending colon (persistent mesentery); usually occurs
  • Caecum may be site for amoebic dysentery, intestinal TB, carcinoma
  • Surgical guide: caecum acts as guide in surgeries for intestinal obstructions; distended in large intestinal obstruction, empty in small intestinal obstruction

ASCENDING COLON

  • ~15–20 cm long; extends from caecum to inferior surface of right lobe of liver → bends left to form right colic flexure
  • Covered by peritoneum on three sides
  • Anteriorly: coils of small intestine, right edge of greater omentum, anterior abdominal wall
  • Posteriorly: iliacus, quadratus lumborum, transversus abdominis, lateral cutaneous + ilioinguinal + iliohypogastric nerves, right kidney

Right Colic Flexure (Hepatic Flexure):

  • Junction of ascending and transverse colon
  • Colon bends forward, downward, left
  • Lies on lower part of right kidney
  • Anterosuperiorly related to colic impression on inferior surface of right lobe of liver

TRANSVERSE COLON

  • ~50 cm long; extends across abdomen from right colic flexure to left colic flexure
  • Not truly transverse — hangs as a loop to variable extent
  • Suspended by transverse mesocolon attached to anterior border of pancreas; wide mobility
  • Anteriorly: greater omentum + anterior abdominal wall
  • Posteriorly: 2nd part of duodenum, head of pancreas, coils of small intestine

LEFT COLIC FLEXURE (Splenic Flexure)

  • Junction of transverse and descending colon
  • Colon bends downward and backward
  • Lies on lower part of left kidney and diaphragm, behind stomach, below anterior end of spleen
  • Attached to 11th rib (midaxillary line) by phrenicocolic ligament — supports spleen; forms partial upper limit of left paracolic gutter

Differences: Hepatic vs. Splenic Flexure (Table 20.4):

FeatureRight colic (Hepatic) flexureLeft colic (Splenic) flexure
LocationRight lumbar regionLeft hypochondrium
Main visceral relationInferior surface of right lobe of liverSpleen
Level1 inch below transpyloric plane1 inch above transpyloric plane
Vertebral levelL2T12
AngulationWiderAcute
Peritoneal ligamentAbsentPhrenicocolic ligament
Blood supplyRight colic arteryLeft colic artery

DESCENDING COLON

  • ~25–30 cm long; extends from left colic flexure to sigmoid colon
  • Runs vertically to iliac crest → inclines medially on iliacus and psoas major → reaches pelvic brim → continuous with sigmoid colon
  • Narrower than ascending colon
  • Anteriorly: coils of small intestine
  • Posteriorly: transversus abdominis, quadratus lumborum, iliacus, psoas; iliohypogastric, ilioinguinal, lateral cutaneous, femoral, genitofemoral nerves; gonadal and external iliac vessels

SIGMOID COLON (Pelvic Colon)

  • ~37.5 cm long; from pelvic brim to 3rd piece of sacrum → becomes rectum
  • Forms sinuous loop hanging down in pelvis over bladder and uterus
  • Occasionally very short; takes straight course
  • Suspended by sigmoid mesocolon; covered by coils of small intestine

Differences: Right 2/3rd vs. Left 1/3rd Transverse Colon (Table 20.3):

FeatureRight 2/3rdLeft 1/3rd
PositionDescending till umbilicusAscending to left hypochondrium
Arterial supplyMiddle colic branch of SMALeft colic artery / branch of IMA
Nerve supply/developmentVagus branches; develops from midgutPelvic splanchnic, S2,3,4; develops from hindgut

FACTS TO REMEMBER

  • Small intestine characterised by evaginations called villi
  • Most of duodenum is fixed and retroperitoneal
  • 2nd part of duodenum contains openings of bile and pancreatic ducts
  • 3rd part of duodenum is crossed anteriorly by superior mesenteric vessels
  • Duodenal cap = triangular shadow of 1st part on barium meal X-ray
  • Transverse colon = most mobile part of large intestine
  • Meckel's diverticulum = proximal persistent part of vitellointestinal duct
  • Caecum is broader than longer
  • Most common position of appendix = retrocaecal
  • Pain of early appendicitis referred to umbilicus (T10 spinal segment)
  • McBurney's point = junction of medial 2/3rd and lateral 1/3rd of line from umbilicus to right ASIS
  • Ileocaecal junction = most common site of intestinal TB
  • Cancer of colon mostly occurs at rectosigmoid junction

Give me pdf format

Reading File
Running Command

mkdir -p /tmp/workspace/anatomy-notes && ls /tmp/workspace/anatomy-notes/

Writing File

~/anatomy-notes/generate_pdf.py

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

doc = SimpleDocTemplate(
    "/tmp/workspace/anatomy-notes/Ch20_Small_Large_Intestines.pdf",
    pagesize=A4,
    rightMargin=2*cm, leftMargin=2*cm,
    topMargin=2*cm, bottomMargin=2*cm
)

styles = getSampleStyleSheet()

# Custom styles
title_style = ParagraphStyle('Title', parent=styles['Title'],
    fontSize=20, textColor=colors.HexColor('#1a3a5c'),
    spaceAfter=6, alignment=TA_CENTER)

subtitle_style = ParagraphStyle('Subtitle', parent=styles['Normal'],
    fontSize=11, textColor=colors.HexColor('#444444'),
    spaceAfter=12, alignment=TA_CENTER)

h1_style = ParagraphStyle('H1', parent=styles['Heading1'],
    fontSize=14, textColor=colors.white,
    backColor=colors.HexColor('#1a3a5c'),
    spaceBefore=14, spaceAfter=4,
    leftIndent=-10, rightIndent=-10,
    borderPad=5)

h2_style = ParagraphStyle('H2', parent=styles['Heading2'],
    fontSize=12, textColor=colors.HexColor('#1a3a5c'),
    spaceBefore=10, spaceAfter=3,
    borderPad=2)

h3_style = ParagraphStyle('H3', parent=styles['Heading3'],
    fontSize=10.5, textColor=colors.HexColor('#2e6da4'),
    spaceBefore=7, spaceAfter=2)

body_style = ParagraphStyle('Body', parent=styles['Normal'],
    fontSize=9.5, leading=14, spaceAfter=3,
    alignment=TA_JUSTIFY)

bullet_style = ParagraphStyle('Bullet', parent=styles['Normal'],
    fontSize=9.5, leading=13, spaceAfter=2,
    leftIndent=14, bulletIndent=4)

subbullet_style = ParagraphStyle('SubBullet', parent=styles['Normal'],
    fontSize=9, leading=12, spaceAfter=2,
    leftIndent=28, bulletIndent=14)

note_style = ParagraphStyle('Note', parent=styles['Normal'],
    fontSize=9, leading=12, spaceAfter=4,
    leftIndent=10, textColor=colors.HexColor('#555555'),
    borderPad=4, backColor=colors.HexColor('#f5f5f5'))

clinical_style = ParagraphStyle('Clinical', parent=styles['Normal'],
    fontSize=9.5, leading=13, spaceAfter=3,
    leftIndent=10, textColor=colors.HexColor('#7b0000'))

def h1(text): return Paragraph(text, h1_style)
def h2(text): return Paragraph(text, h2_style)
def h3(text): return Paragraph(text, h3_style)
def body(text): return Paragraph(text, body_style)
def bullet(text): return Paragraph(f"&#8226; {text}", bullet_style)
def subbullet(text): return Paragraph(f"&#8211; {text}", subbullet_style)
def note(text): return Paragraph(f"<i>Note: {text}</i>", note_style)
def clinical(text): return Paragraph(f"<b>&#9654; Clinical:</b> {text}", clinical_style)
def sp(h=4): return Spacer(1, h)
def hr(): return HRFlowable(width="100%", thickness=0.5, color=colors.HexColor('#aaaaaa'), spaceAfter=4, spaceBefore=4)

def make_table(header, rows, col_widths=None):
    data = [header] + rows
    if col_widths is None:
        n = len(header)
        col_widths = [doc.width / n] * n
    t = Table(data, colWidths=col_widths, repeatRows=1)
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a3a5c')),
        ('TEXTCOLOR', (0,0), (-1,0), colors.white),
        ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
        ('FONTSIZE', (0,0), (-1,0), 9),
        ('FONTSIZE', (0,1), (-1,-1), 8.5),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#eef3f9')]),
        ('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#aaaaaa')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('TOPPADDING', (0,0), (-1,-1), 3),
        ('BOTTOMPADDING', (0,0), (-1,-1), 3),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('RIGHTPADDING', (0,0), (-1,-1), 5),
        ('WORDWRAP', (0,0), (-1,-1), True),
    ]))
    return t

story = []

# ── TITLE PAGE ─────────────────────────────────────────────────────────────
story.append(sp(30))
story.append(Paragraph("Chapter 20", subtitle_style))
story.append(Paragraph("Small and Large Intestines", title_style))
story.append(Paragraph("BDC Anatomy — Complete Notes", subtitle_style))
story.append(sp(10))
story.append(hr())
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# SMALL INTESTINE
# ═══════════════════════════════════════════════════════════════════════════
story.append(h1("SMALL INTESTINE"))
story.append(sp())
story.append(bullet("Extends from <b>pylorus</b> to <b>ileocaecal junction</b>"))
story.append(bullet("Length: ~<b>5 meters</b> (3–8.5 m) in living adult; longer in males than females; greater in cadavers"))
story.append(bullet("Divided into: (1) Proximal — <b>Duodenum</b>, (2) Middle — <b>Jejunum</b>, (3) Distal — <b>Ileum</b>"))
story.append(bullet("Duodenum: <b>25 cm</b>, fixed. Jejunum + Ileum: mobile"))
story.append(bullet("Jejunum = proximal <b>2/5th</b>; Ileum = distal <b>3/5th</b>"))
story.append(sp())

story.append(h2("Wall Structure (4 layers, inside out)"))
story.append(bullet("<b>Mucosa</b> — lining epithelium + lamina propria + muscularis mucosae"))
story.append(bullet("<b>Submucosa</b> — dense irregular connective tissue"))
story.append(bullet("<b>Muscularis externa</b> — inner circular + outer longitudinal smooth muscle"))
story.append(bullet("<b>Serosa/Adventitia</b> — connective tissue layer (serosa = peritoneum; adventitia = connective tissue only)"))
story.append(sp())

story.append(h2("Modifications to Enhance Surface Area"))
story.append(bullet("<b>Plicae circulares</b> (valves of Kerckring) — circumferential permanent submucosal folds; NOT obliterated by distension; absent in proximal 5–6 cm of duodenum and terminal ileum"))
story.append(bullet("<b>Intestinal villi</b> — finger-like mucosal projections making the intestine velvety"))
story.append(bullet("<b>Microvilli</b> — cell-surface projections seen under microscope"))
story.append(bullet("<b>Length of intestine</b> + <b>Crypts of Lieberkühn</b> — simple tubular intestinal glands lined by tall columnar epithelium; secrete digestive enzymes and mucus"))
story.append(sp())

story.append(h2("Lymphatic Follicles"))
story.append(bullet("<b>Solitary lymph follicles</b> — 1–2 mm; distributed throughout small and large intestine"))
story.append(bullet("<b>Aggregated lymph follicles (Peyer's patches)</b> — circular/oval, 2–10 cm long, 10–200 in number; more numerous in terminal ileum; placed longitudinally along antimesenteric border"))
story.append(subbullet("In typhoid/TB: longitudinally oriented patches → <b>longitudinal oval ulcers</b>"))
story.append(subbullet("Typhoid ulcers do <b>NOT</b> heal with scar"))
story.append(bullet("<b>Circular tubercular ulcers</b> — due to infection of lymphatic vessels (circular course)"))
story.append(sp())

story.append(h2("Arterial Supply"))
story.append(bullet("Duodenum — branches of <b>coeliac trunk</b> and <b>superior mesenteric artery</b>"))
story.append(bullet("Jejunum and Ileum — <b>12–15 jejunal and ileal branches</b> from left side of SMA"))
story.append(bullet("These form <b>arterial arcades</b> in mesentery"))
story.append(bullet("<b>Vasa recta</b> — straight parallel branches from terminal arcade; pass alternately to opposite surfaces; anastomosis between them is <b>poorly developed</b>"))
story.append(sp())

story.append(h2("Venous Drainage"))
story.append(bullet("Veins correspond to SMA branches → drain into <b>portal vein</b>"))
story.append(sp())

story.append(h2("Lymphatics"))
story.append(bullet("<b>Lacteals</b> — small lymphatic capillaries in intestinal villi; absorb dietary fat; circular course in intestinal walls"))
story.append(bullet("Pass through mesenteric nodes → around beginning of superior mesenteric artery"))
story.append(sp())

story.append(h2("Nerve Supply"))
story.append(bullet("<b>Parasympathetic</b> — vagus via coeliac and superior mesenteric plexuses → stimulates peristalsis, inhibits sphincters, enhances secretions"))
story.append(bullet("<b>Sympathetic</b> — T9 and T11 via splanchnic nerves → inhibits peristalsis/secretions, stimulates sphincters"))
story.append(bullet("<b>Myenteric plexus of Auerbach</b> — between circular and longitudinal muscle coats"))
story.append(bullet("<b>Submucous plexus of Meissner</b> — in submucosa"))
story.append(bullet("Both contain parasympathetic ganglia → form <b>enteric nervous system</b>"))
story.append(sp())

story.append(h2("Mesentery of Small Intestine"))
story.append(bullet("Peritoneal fold covering small intestine; due to embryonic gut rotation + zygosis → duodenum becomes retroperitoneal; mesentery hangs jejunum and ileum only"))
story.append(bullet("<b>Attached border (root):</b> fixed obliquely to posterior abdominal wall; 15 cm long; from duodenojejunal flexure (left of L2) → upper part of right sacroiliac joint"))
story.append(bullet("<b>Free/intestinal border:</b> encloses jejunum and ileum"))
story.append(sp(8))

# ═══════════════════════════════════════════════════════════════════════════
# DUODENUM
# ═══════════════════════════════════════════════════════════════════════════
story.append(h1("DUODENUM"))
story.append(sp())
story.append(bullet("Shortest, widest, most fixed part of small intestine"))
story.append(bullet("Extends from pylorus to duodenojejunal flexure"))
story.append(bullet("Curved around head of pancreas — letter <b>'C'</b>"))
story.append(bullet("Lies above level of umbilicus, opposite L1, L2, L3"))
story.append(bullet("Deep location → least accessible for clinical examination"))
story.append(sp())

story.append(h2("Length and Parts"))
tbl = make_table(
    ['Part', 'Description', 'Length'],
    [
        ['1st (Superior)', 'Duodenal cap on barium', '5 cm / 2 inches'],
        ['2nd (Descending)', 'Opening of bile and pancreatic ducts', '7.5 cm / 3 inches'],
        ['3rd (Horizontal)', 'Crossed anteriorly by superior mesenteric vessels', '10 cm / 4 inches'],
        ['4th (Ascending)', 'Ends at duodenojejunal flexure', '2.5 cm / 1 inch'],
    ],
    col_widths=[4*cm, 9*cm, 4*cm]
)
story.append(tbl)
story.append(sp(8))

# ═══════════════════════════════════════════════════════════════════════════
# JEJUNUM AND ILEUM
# ═══════════════════════════════════════════════════════════════════════════
story.append(h1("JEJUNUM AND ILEUM"))
story.append(sp())
story.append(bullet("Suspended from posterior abdominal wall by <b>mesentery</b> → considerable mobility"))
story.append(bullet("Jejunum = upper 2/5th; Ileum = lower 3/5th of mobile small intestine"))
story.append(bullet("Jejunum begins at <b>duodenojejunal flexure</b>"))
story.append(bullet("Ileum terminates at <b>ileocaecal junction</b>"))
story.append(sp())

story.append(h2("Histology (4 layers)"))
story.append(bullet("<b>Mucosa</b> — simple columnar epithelium with striated microvilli border; tongue-shaped villi in jejunum, finger-like in ileum; Peyer's patches and M cells (antigen-presenting) in lamina propria of ileum"))
story.append(bullet("<b>Submucosa</b> — no Brunner's glands (distinguishes from duodenum)"))
story.append(bullet("<b>Muscularis externa</b> — inner circular + outer longitudinal"))
story.append(bullet("<b>Serosa</b> — peritoneum externally"))
story.append(sp())

story.append(h2("Differences Between Jejunum and Ileum (Table 20.1)"))
tbl2 = make_table(
    ['Feature', 'Jejunum', 'Ileum'],
    [
        ['Location', 'Upper and left intestinal area', 'Lower and right intestinal area'],
        ['Walls', 'Thicker, more vascular', 'Thinner, less vascular'],
        ['Lumen', 'Wider, often empty', 'Narrower, often loaded'],
        ['Mesentery windows', 'Present', 'Absent'],
        ['Fat in mesentery', 'Less abundant', 'More abundant'],
        ['Arterial arcades', '1 or 2', '3 or 6'],
        ['Vasa recta', 'Longer and fewer', 'Shorter and more numerous'],
        ['Circular mucosal folds', 'Larger, closely set', 'Smaller and sparse'],
        ['Villi', 'Large, thick (leaf-like), abundant', 'Shorter, thinner (finger-like)'],
        ["Peyer's patches", 'Absent', 'Present, more numerous'],
        ['Solitary lymphatic follicles', 'Fewer', 'More'],
    ],
    col_widths=[5*cm, 6.5*cm, 5.5*cm]
)
story.append(tbl2)
story.append(sp(8))

# ═══════════════════════════════════════════════════════════════════════════
# MECKEL'S DIVERTICULUM
# ═══════════════════════════════════════════════════════════════════════════
story.append(h1("MECKEL'S DIVERTICULUM (Diverticulum Ilei)"))
story.append(sp())
story.append(bullet("Persistent <b>proximal part of vitellointestinal duct</b>"))
story.append(bullet("True congenital diverticulum of small intestine"))
story.append(bullet("Attached to <b>antimesenteric border</b> of ileum; caliber equal to ileum"))
story.append(bullet("Apex may be free or attached to umbilicus/mesentery by fibrous band"))
story.append(sp())
story.append(h3("Rule of 2s (Mnemonic: 'di' = two)"))
story.append(bullet("2% subjects | Male:Female = 2:1 | 2 inches long"))
story.append(bullet("2 feet from ileocaecal valve | 2 years = most common clinical age"))
story.append(bullet("2 types of ectopic tissue (gastric + pancreatic)"))
story.append(sp())
story.append(h3("Clinical Anatomy"))
story.append(clinical("May cause <b>intestinal obstruction</b>"))
story.append(clinical("Acute inflammation mimics <b>appendicitis</b>"))
story.append(clinical("<b>Umbilical faecal fistula (vitelline fistula):</b> patent vitellointestinal duct → faecal matter from umbilicus"))
story.append(clinical("<b>Enterocystoma (Vitelline cyst):</b> cyst from small persistent middle part of duct"))
story.append(sp(8))

# ═══════════════════════════════════════════════════════════════════════════
# LARGE INTESTINE
# ═══════════════════════════════════════════════════════════════════════════
story.append(h1("LARGE INTESTINE"))
story.append(sp())
story.append(bullet("Extends from <b>ileocaecal junction to anus</b>"))
story.append(bullet("Length: ~<b>1.5 m</b>"))
story.append(sp())

story.append(h2("Functions"))
for i, f in enumerate([
    "Absorption of water and minerals",
    "Secretion of mucus to lubricate faeces",
    "Storage and expulsion of faeces",
    "Synthesis of vitamin B (bacterial flora)",
    "Protection from microorganisms by secreting <b>IgA antibodies</b>",
], 1):
    story.append(bullet(f"{i}. {f}"))
story.append(sp())

story.append(h2("Parts"))
story.append(bullet("Caecum | Appendix | Colon (ascending, hepatic flexure, transverse, splenic flexure, descending, sigmoid) | Rectum | Anal canal"))
story.append(sp())

story.append(h2("Three Cardinal Features"))
story.append(bullet("<b>Taenia coli</b> — three ribbon-like bands of longitudinal muscle layer of muscularis externa (absent at appendix, rectum)"))
story.append(bullet("<b>Appendices epiploicae</b> — small bags of peritoneum filled with fat; scattered over large intestine except appendix, caecum and rectum"))
story.append(bullet("<b>Sacculations (haustrations)</b> — series of dilations of caecum and colon wall; caused by shorter length of taenia coli than circular muscle coat"))
story.append(sp())

story.append(h2("Positions of Taenia Coli"))
story.append(bullet("<b>Taenia libera:</b> anteriorly (inferiorly in transverse colon)"))
story.append(bullet("<b>Taenia mesocolica:</b> posteromedially (anterosuperiorly in transverse colon)"))
story.append(bullet("<b>Taenia omentalis:</b> posterolaterally (anterosuperiorly in transverse colon)"))
story.append(note("Change in position due to twist in transverse colon"))
story.append(sp())

story.append(h2("Arterial Supply"))
story.append(bullet("<b>Marginal artery of Drummond</b> — formed by colic branches of superior and inferior mesenteric arteries"))
story.append(bullet("Terminal branches: <b>vasa longa</b> and <b>vasa brevia</b>"))
story.append(bullet("<b>Arc of Riolon</b> (mesenteric artery of Moskowitz) — connects SMA and IMA"))
story.append(bullet("Anastomosis between amesocolic taeniae is <b>extremely poor</b> → longitudinal incisions along this line"))
story.append(sp())

story.append(h2("Venous Drainage"))
story.append(bullet("Follows branches of SMA and IMA → <b>portal vein</b> via superior and inferior mesenteric veins"))
story.append(sp())

story.append(h2("Lymphatic Drainage"))
story.append(bullet("<b>Epiploic nodes</b> — on wall of gut"))
story.append(bullet("<b>Paracolic nodes</b> — medial sides of ascending/descending colons and mesocolic border of transverse and sigmoid colon"))
story.append(bullet("<b>Intermediate nodes</b> — along branches of main arteries"))
story.append(bullet("<b>Terminal nodes</b> — superior and inferior mesenteric nodes"))
story.append(sp())

story.append(h2("Nerve Supply"))
story.append(bullet("<b>Sympathetic:</b> T11 and L1 (coeliac and superior mesenteric plexuses); vasomotor + motor for internal anal sphincter + inhibitory for colon; carry pain from large intestine up to descending colon"))
story.append(note("Pelvic splanchnic nerves carry sensations from sigmoid colon and rectum"))
story.append(bullet("<b>Parasympathetic:</b> pelvic splanchnic nerves (nervi erigentes) via superior and inferior mesenteric plexuses; motor to large intestine; inhibitory to internal anal sphincter"))
story.append(sp())

story.append(h2("Histology of Large Intestine (Colon)"))
story.append(bullet("<b>Mucosa</b> — simple columnar absorptive cells with microvilli and goblet cells; crypts of Lieberkühn; discrete lymphatic follicles in lamina propria"))
story.append(bullet("<b>Submucosa</b> — dense irregular connective tissue"))
story.append(bullet("<b>Muscularis externa</b> — inner circular + outer longitudinal (forms 3 bands of taenia coli)"))
story.append(bullet("<b>Serosa/Adventitia</b> — externally"))
story.append(bullet("Colon does NOT have: plicae circulares, villi, Paneth cells"))
story.append(sp())
story.append(clinical("<b>Colonoscopy</b> — direct visualization of large intestine"))
story.append(clinical("<b>Diverticulum</b> — small evagination of mucous membrane at entry point of arteries; inflammation = <b>diverticulitis</b>"))
story.append(clinical("<b>Barium enema</b> — visualizes internal structure on radiograph"))
story.append(sp())

story.append(h2("Differences: Small vs. Large Intestine (Table 20.2)"))
tbl3 = make_table(
    ['Feature', 'Small Intestine', 'Large Intestine'],
    [
        ['Appendices epiploicae', 'Absent', 'Present'],
        ['Taenia coli', 'Absent', 'Present'],
        ['Sacculations', 'Absent', 'Present'],
        ['Distensibility/diameter', 'Less', 'More'],
        ['Fixity', 'Mostly freely mobile', 'Mostly fixed'],
        ['Villi', 'Present', 'Absent'],
        ['Transverse mucosal folds', 'Permanent', 'Obliterated when longitudinal muscle relaxes'],
        ["Peyer's patches", 'Present in ileum', 'Absent'],
        ['Common infections', 'Worms, typhoid, TB', 'Entamoeba histolytica, dysentery, carcinoma'],
        ['Effects of infection', 'Diarrhoea', 'Dysentery'],
    ],
    col_widths=[5*cm, 5.5*cm, 6.5*cm]
)
story.append(tbl3)
story.append(sp(8))

# ═══════════════════════════════════════════════════════════════════════════
# CAECUM
# ═══════════════════════════════════════════════════════════════════════════
story.append(h1("CAECUM"))
story.append(sp())
story.append(bullet("Large blind sac; commencement of large intestine"))
story.append(bullet("<b>Location:</b> right iliac fossa, above lateral half of inguinal ligament; anterior to iliacus and psoas major"))
story.append(bullet("<b>Dimensions:</b> L = 6 cm, W = 7.5 cm — <b>broader than longer</b>"))
story.append(note("Organs with greater width than length: caecum, prostate, pons, pituitary"))
story.append(bullet("Completely covered by peritoneum (intraperitoneal)"))
story.append(sp())

story.append(h2("Relations"))
story.append(bullet("<b>Anterior:</b> coils of intestine + anterior abdominal wall"))
story.append(bullet("<b>Posterior:</b> right psoas + iliacus; genitofemoral, femoral, lateral cutaneous nerve of thigh (all right side); testicular/ovarian vessels; appendix in retrocaecal recess"))
story.append(bullet("<b>Communications:</b> Superiorly — ascending colon | Medially — ileum via ileocaecal junction | Posteromedially — appendix"))
story.append(sp())

story.append(h2("Peritoneal Folds Related to Caecum"))
story.append(bullet("<b>Superior ileocaecal fold</b> (vascular fold of caecum): connects caecum with terminal ileum + posterior abdominal wall; contains anterior caecal artery; superior ileocaecal recess lies deep to it"))
story.append(bullet("<b>Inferior ileocaecal fold</b> (bloodless fold of Treves): from anteroinferior terminal ileum to caecum/appendix; no blood vessels; inferior ileocaecal recess lies deep"))
story.append(bullet("<b>Caecal fold:</b> posterior surface of caecum to posterior abdominal wall; retrocaecal recess lies inferomedial"))
story.append(sp())

story.append(h2("Types of Caecum"))
story.append(bullet("<b>Type I — Conical/Foetal:</b> appendix attached to apex"))
story.append(bullet("<b>Type II — Intermediate (13%):</b> right and left caecal pouches equal"))
story.append(bullet("<b>Type III — Ampullary (73–74%):</b> largest right caecal pouch; appendix attached posteromedially, 2 cm below ileocaecal junction — MOST COMMON"))
story.append(bullet("<b>Type IV — Exaggerated (4–5%):</b> large right caecal pouch; left saccule absent; appendix just below ileocaecal junction"))
story.append(sp())

story.append(h2("Ileocaecal Orifice (Ileal Papilla)"))
story.append(bullet("Projecting terminal end of ileum into caecum; posteromedial wall of caecum; ~2.5 cm transversely; guarded by <b>ileocaecal valve</b>"))
story.append(bullet("<b>Valve structure:</b> upper lip (horizontal fold at ileum-colon junction) + lower lip (longer, concave, at ileum-caecum junction) + two frenula (right/posterior and left/anterior)"))
story.append(bullet("<b>Functions:</b> prevents reflux of faecal matter to ileum; regulates flow of ileal contents to caecum"))
story.append(sp(8))

# ═══════════════════════════════════════════════════════════════════════════
# VERMIFORM APPENDIX
# ═══════════════════════════════════════════════════════════════════════════
story.append(h1("VERMIFORM APPENDIX"))
story.append(sp())
story.append(bullet("Worm-like diverticulum from <b>posteromedial wall of caecum</b>, 2 cm below ileocaecal orifice"))
story.append(bullet("<b>Dimensions:</b> Length 6–10 cm | Diameter: 5 mm | Lumen narrow (obliterated after mid-adult life)"))
story.append(bullet("<b>Parts:</b> Base (fixed, posteromedial caecal wall, 2 cm below ileocaecal junction; convergence of taenia coli = surgical guide for appendicectomy) | Body (narrow, tubular) | Tip (rounded blind end, least vascular)"))
story.append(sp())

story.append(h2("Positions of Appendix (Fig. 20.20)"))
tbl4 = make_table(
    ['Position', 'Clock', 'Frequency', 'Description'],
    [
        ['Retrocaecal/Retrocolic', '12 o\'clock', '65.28%', 'Most common; behind caecum and ascending colon'],
        ['Pelvic', '4 o\'clock', '31.01%', '2nd most common; crosses pelvic brim'],
        ['Paracolic', '11 o\'clock', '2%', 'Right of ascending colon'],
        ['Midinguinal/Subcaecal', '6 o\'clock', '2%', 'Points toward midinguinal point'],
        ['Pre-ileal Splenic', '2 o\'clock', 'Rare', 'MOST DANGEROUS — infection may spread to general peritoneal cavity'],
        ['Promonteric', '3 o\'clock', '<1%', 'Toward sacral promontory'],
    ],
    col_widths=[4.5*cm, 2.5*cm, 2.5*cm, 7.5*cm]
)
story.append(tbl4)
story.append(sp())

story.append(h2("Appendicular Orifice"))
story.append(bullet("Small circular opening on posteromedial caecal wall, 2 cm below ileocaecal orifice"))
story.append(bullet("Guarded by indistinct semilunar mucosal fold = <b>valve of Gerlach</b>"))
story.append(bullet("<b>McBurney's point:</b> junction of lateral 1/3rd and medial 2/3rd of line from right ASIS to umbilicus; site of maximum tenderness in appendicitis"))
story.append(sp())

story.append(h2("Mesoappendix"))
story.append(bullet("Small, triangular, double-layered peritoneal fold suspending appendix from lower end of mesentery"))
story.append(bullet("<b>Contents:</b> appendicular artery and vein | autonomic nerves | lymphatic vessels | lymph nodes"))
story.append(sp())

story.append(h2("Blood Supply"))
story.append(bullet("<b>Appendicular artery</b> — branch of lower division of ileocolic artery"))
story.append(bullet("Runs behind terminal ileum → tip along free margin of mesoappendix"))
story.append(bullet("Gives recurrent branch anastomosing with posterior caecal artery"))
story.append(bullet("It is an <b>end artery</b> → poorly supplies tip → prone to <b>gangrenous changes</b> in appendicitis"))
story.append(sp())

story.append(h2("Nerve Supply"))
story.append(bullet("<b>Sympathetic:</b> T9 and T10 via coeliac plexus → referred pain felt at <b>umbilicus</b> (similar to small intestine and testis)"))
story.append(bullet("<b>Parasympathetic:</b> vagus"))
story.append(sp())

story.append(h2("Histology of Appendix"))
story.append(bullet("<b>Mucosa</b> — simple columnar epithelium with goblet cells and M cells; lamina propria mostly occupied by large and small <b>lymphatic follicles</b> (may cross muscularis mucosae into submucosa); short tubular intestinal glands"))
story.append(bullet("<b>Submucosa</b> — connective tissue; many lymphatic follicles extend from lamina propria"))
story.append(bullet("<b>Muscularis externa</b> — inner circular + outer longitudinal; <b>no taenia coli</b>"))
story.append(bullet("<b>Serosa</b> — entirely covered by peritoneum"))
story.append(sp())

story.append(h2("Clinical Anatomy — Appendicitis"))
story.append(clinical("<b>Appendicitis:</b> inflammation; symptoms: right lower abdominal pain, nausea, vomiting, fever; pain initially periumbilical then localizes to right iliac fossa"))
story.append(clinical("<b>McBurney's point tenderness</b>"))
story.append(clinical("<b>Psoas test:</b> retrocaecal position → forced extension of right thigh → pain in right iliac fossa"))
story.append(clinical("<b>Obturator test:</b> pelvic position → flexion + medial rotation of right thigh → pain in lower abdomen"))
story.append(clinical("<b>Rovsing sign:</b> palpation of left iliac region → pain in right iliac region"))
story.append(clinical("<b>Treatment:</b> Appendicectomy"))
story.append(clinical("<b>Appendicular dyspepsia:</b> chronic appendicitis → dyspepsia resembling stomach/duodenum/gallbladder disease; infected lymph → subpyloric nodes → pyloric irritation"))
story.append(sp(8))

# ═══════════════════════════════════════════════════════════════════════════
# COLON SEGMENTS
# ═══════════════════════════════════════════════════════════════════════════
story.append(h1("COLON SEGMENTS"))
story.append(sp())

story.append(h2("Ascending Colon"))
story.append(bullet("~15–20 cm long; caecum → inferior surface of right lobe of liver → bends left = <b>right colic (hepatic) flexure</b>"))
story.append(bullet("Covered by peritoneum on three sides; mostly retroperitoneal"))
story.append(bullet("<b>Anteriorly:</b> coils of small intestine, right edge of greater omentum, anterior abdominal wall"))
story.append(bullet("<b>Posteriorly:</b> iliacus, quadratus lumborum, transversus abdominis, lateral cutaneous + ilioinguinal + iliohypogastric nerves, right kidney"))
story.append(sp())

story.append(h2("Right Colic Flexure (Hepatic Flexure)"))
story.append(bullet("Junction of ascending and transverse colon"))
story.append(bullet("Colon bends forward, downward and to the left"))
story.append(bullet("Lies on lower part of right kidney"))
story.append(bullet("Anterosuperiorly related to colic impression on inferior surface of right lobe of liver"))
story.append(sp())

story.append(h2("Transverse Colon"))
story.append(bullet("~50 cm long; right colic flexure → left colic flexure"))
story.append(bullet("Not truly transverse — hangs as a loop; <b>most mobile part</b> of large intestine"))
story.append(bullet("Suspended by <b>transverse mesocolon</b> attached to anterior border of pancreas"))
story.append(bullet("<b>Anteriorly:</b> greater omentum + anterior abdominal wall"))
story.append(bullet("<b>Posteriorly:</b> 2nd part of duodenum, head of pancreas, coils of small intestine"))
story.append(sp())

story.append(h2("Left Colic Flexure (Splenic Flexure)"))
story.append(bullet("Junction of transverse and descending colon"))
story.append(bullet("Colon bends downward and backward"))
story.append(bullet("Lies on lower part of left kidney and diaphragm, behind stomach, below anterior end of spleen"))
story.append(bullet("Attached to 11th rib (midaxillary line) by <b>phrenicocolic ligament</b> — supports spleen; forms partial upper limit of left paracolic gutter"))
story.append(sp())

story.append(h2("Hepatic vs. Splenic Flexure (Table 20.4)"))
tbl5 = make_table(
    ['Feature', 'Right colic (Hepatic)', 'Left colic (Splenic)'],
    [
        ['Alternate name', 'Hepatic flexure', 'Splenic flexure'],
        ['Location', 'Right lumbar region', 'Left hypochondrium'],
        ['Main visceral relation', 'Inferior surface of right lobe of liver', 'Spleen'],
        ['Level', '1 inch below transpyloric plane', '1 inch above transpyloric plane'],
        ['Vertebral level', 'L2', 'T12'],
        ['Angulation', 'Wider', 'Acute'],
        ['Peritoneal ligament', 'Absent', 'Phrenicocolic ligament'],
        ['Blood supply', 'Right colic artery', 'Left colic artery'],
    ],
    col_widths=[4.5*cm, 5.5*cm, 7*cm]
)
story.append(tbl5)
story.append(sp())

story.append(h2("Descending Colon"))
story.append(bullet("~25–30 cm long; left colic flexure → sigmoid colon; runs vertically to iliac crest"))
story.append(bullet("Narrower than ascending colon; retroperitoneal"))
story.append(bullet("<b>Anteriorly:</b> coils of small intestine"))
story.append(bullet("<b>Posteriorly:</b> transversus abdominis, quadratus lumborum, iliacus, psoas; iliohypogastric, ilioinguinal, lateral cutaneous, femoral, genitofemoral nerves; gonadal and external iliac vessels"))
story.append(sp())

story.append(h2("Sigmoid Colon (Pelvic Colon)"))
story.append(bullet("~37.5 cm long; pelvic brim → 3rd piece of sacrum → becomes rectum"))
story.append(bullet("Sinuous loop in pelvis over bladder and uterus"))
story.append(bullet("Suspended by <b>sigmoid mesocolon</b>; covered by coils of small intestine"))
story.append(sp())

story.append(h2("Differences: Right 2/3rd vs. Left 1/3rd of Transverse Colon (Table 20.3)"))
tbl6 = make_table(
    ['Feature', 'Right 2/3rd', 'Left 1/3rd'],
    [
        ['Position', 'Descending till umbilicus', 'Ascending to left hypochondrium'],
        ['Arterial supply', 'Middle colic branch of SMA', 'Left colic artery / branch of IMA'],
        ['Nerve supply/development', 'Vagus; develops from midgut', 'Pelvic splanchnic S2,3,4; develops from hindgut'],
    ],
    col_widths=[5*cm, 5.5*cm, 6.5*cm]
)
story.append(tbl6)
story.append(sp(8))

# ═══════════════════════════════════════════════════════════════════════════
# FACTS TO REMEMBER
# ═══════════════════════════════════════════════════════════════════════════
story.append(h1("FACTS TO REMEMBER"))
story.append(sp())
facts = [
    "Small intestine characterised by evaginations called <b>villi</b>",
    "Most of duodenum is <b>fixed and retroperitoneal</b>",
    "2nd part of duodenum contains openings of <b>bile and pancreatic ducts</b>",
    "3rd part of duodenum is crossed anteriorly by <b>superior mesenteric vessels</b>",
    "<b>Duodenal cap</b> = triangular shadow of 1st part on barium meal X-ray",
    "<b>Transverse colon</b> = most mobile part of large intestine",
    "Meckel's diverticulum = proximal persistent part of <b>vitellointestinal duct</b>",
    "<b>Caecum is broader than longer</b>",
    "Most common position of appendix = <b>retrocaecal (65.28%)</b>",
    "Pain of early appendicitis referred to umbilicus (<b>T10 spinal segment</b>)",
    "<b>McBurney's point</b> = junction of medial 2/3rd and lateral 1/3rd of line from umbilicus to right ASIS",
    "<b>Ileocaecal junction</b> = most common site of intestinal TB",
    "<b>Cancer of colon</b> mostly occurs at rectosigmoid junction",
]
for f in facts:
    story.append(bullet(f))
story.append(sp(6))
story.append(hr())
story.append(Paragraph("<i>Notes compiled from BDC Anatomy, Chapter 20 — Small and Large Intestines</i>",
    ParagraphStyle('footer', parent=styles['Normal'], fontSize=8, textColor=colors.grey, alignment=TA_CENTER)))

doc.build(story)
print("PDF generated successfully!")
Running Command

cd /tmp/workspace/anatomy-notes && python generate_pdf.py

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

Ch20 Small Large Intestines

PDF Document · PDF

The PDF includes:
  • All content from all 14 images (Chapter 20: Small and Large Intestines)
  • Color-coded section headers (navy blue)
  • Formatted tables for all comparisons (jejunum vs. ileum, small vs. large intestine, hepatic vs. splenic flexure, duodenum parts, appendix positions, etc.)
  • Bullet-point notes with bold key terms
  • Clinical anatomy sections highlighted in dark red
  • Notes/mnemonics in shaded boxes
  • "Facts to Remember" summary at the end
This is a shared conversation. Sign in to Orris to start your own chat.