Histological difference between skeletal and cardiac musckes pdf
skeletal muscle histology cross section longitudinal
cardiac muscle histology intercalated disc H&E stain
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace does not exist ye…
mkdir -p /home/daytona/workspace/muscle-histology
~/muscle-histology/generate_pdf.py
#!/usr/bin/env python3
"""
Histological Differences Between Skeletal and Cardiac Muscle - PDF Generator
Sources: Histology A Text and Atlas (Ross & Pawlina), Junqueira's Basic Histology
"""
import json
import subprocess
import base64
import os
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
PageBreak, HRFlowable, Image, KeepTogether
)
from reportlab.platypus.flowables import Flowable
from reportlab.lib.utils import ImageReader
from io import BytesIO
# ── Output path ──────────────────────────────────────────────────────────────
OUTPUT = "/home/daytona/workspace/muscle-histology/Skeletal_vs_Cardiac_Muscle_Histology.pdf"
# ── Image URLs from textbook CDN ─────────────────────────────────────────────
IMAGE_URLS = {
"cardiac_lm": "https://cdn.orris.care/cdss_images/391f41bfa649d042d01002e0b38691d1bb4ef7575c10ae99a09641d500aaf629.png",
"intercalated_diagram": "https://cdn.orris.care/cdss_images/71dc164b00486e448dbab4bd8eb727cf08c28c1cd5f03620dc0e596b119b6d19.png",
"cardiac_tem": "https://cdn.orris.care/cdss_images/645e67e980c7697bd020c2254b864d986840a363b5783693989caa29923f2711.png",
"skeletal_histology": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_d9195fcbef0e26bf29c9f18c92512128990918af096510b54a111b83c332a549.jpg",
}
def fetch_images(urls_dict):
"""Download images via fetch_images.js helper."""
url_list = list(urls_dict.values())
try:
result = subprocess.check_output(
["node", "/home/daytona/skills/shared/scripts/fetch_images.js"] + url_list,
timeout=60
)
data = json.loads(result)
fetched = {}
for key, url in urls_dict.items():
for item in data:
if item["url"] == url and item.get("base64"):
raw = base64.b64decode(item["base64"].split(",")[1])
fetched[key] = BytesIO(raw)
break
return fetched
except Exception as e:
print(f"Image fetch warning: {e}")
return {}
# ── Styles ────────────────────────────────────────────────────────────────────
def build_styles():
styles = getSampleStyleSheet()
styles.add(ParagraphStyle(
name='DocTitle',
fontSize=22,
leading=28,
textColor=colors.HexColor('#1a3a5c'),
alignment=TA_CENTER,
fontName='Helvetica-Bold',
spaceAfter=6,
))
styles.add(ParagraphStyle(
name='DocSubtitle',
fontSize=12,
leading=16,
textColor=colors.HexColor('#4a7fab'),
alignment=TA_CENTER,
fontName='Helvetica',
spaceAfter=4,
))
styles.add(ParagraphStyle(
name='SectionHead',
fontSize=15,
leading=20,
textColor=colors.white,
fontName='Helvetica-Bold',
leftIndent=8,
spaceAfter=0,
spaceBefore=14,
))
styles.add(ParagraphStyle(
name='SubHead',
fontSize=12,
leading=16,
textColor=colors.HexColor('#1a3a5c'),
fontName='Helvetica-Bold',
spaceBefore=10,
spaceAfter=4,
))
styles.add(ParagraphStyle(
name='Body',
fontSize=10,
leading=15,
textColor=colors.HexColor('#2c2c2c'),
fontName='Helvetica',
alignment=TA_JUSTIFY,
spaceAfter=6,
leftIndent=0,
))
styles.add(ParagraphStyle(
name='BulletItem',
fontSize=10,
leading=15,
textColor=colors.HexColor('#2c2c2c'),
fontName='Helvetica',
leftIndent=14,
bulletIndent=4,
spaceAfter=3,
))
styles.add(ParagraphStyle(
name='Caption',
fontSize=8.5,
leading=12,
textColor=colors.HexColor('#555555'),
fontName='Helvetica-Oblique',
alignment=TA_CENTER,
spaceAfter=8,
))
styles.add(ParagraphStyle(
name='TableHeader',
fontSize=10,
leading=13,
textColor=colors.white,
fontName='Helvetica-Bold',
alignment=TA_CENTER,
))
styles.add(ParagraphStyle(
name='TableCell',
fontSize=9.5,
leading=13,
textColor=colors.HexColor('#1a1a1a'),
fontName='Helvetica',
alignment=TA_LEFT,
))
styles.add(ParagraphStyle(
name='TableCellCenter',
fontSize=9.5,
leading=13,
textColor=colors.HexColor('#1a1a1a'),
fontName='Helvetica',
alignment=TA_CENTER,
))
styles.add(ParagraphStyle(
name='Source',
fontSize=8,
leading=11,
textColor=colors.HexColor('#777777'),
fontName='Helvetica-Oblique',
alignment=TA_CENTER,
spaceAfter=4,
))
return styles
class ColorBar(Flowable):
"""A colored horizontal bar used for section headings."""
def __init__(self, text, style, bar_color, width=None, height=28):
Flowable.__init__(self)
self.text = text
self.style = style
self.bar_color = bar_color
self._width = width or (A4[0] - 4*cm)
self._height = height
def wrap(self, avail_width, avail_height):
self.avail_width = avail_width
return (avail_width, self._height)
def draw(self):
c = self.canv
c.setFillColor(self.bar_color)
c.rect(0, 0, self.avail_width, self._height, fill=1, stroke=0)
c.setFillColor(colors.white)
c.setFont('Helvetica-Bold', 13)
c.drawString(10, 8, self.text)
def build_comparison_table(styles):
"""Main comparison table: Skeletal vs Cardiac muscle."""
TH = styles['TableHeader']
TC = styles['TableCell']
TCC = styles['TableCellCenter']
DARK_BLUE = colors.HexColor('#1a3a5c')
SKEL_BLUE = colors.HexColor('#2a6496')
CARD_RED = colors.HexColor('#8b1a1a')
ALT1 = colors.HexColor('#f0f5fa')
ALT2 = colors.white
SKEL_LIGHT = colors.HexColor('#dce8f5')
CARD_LIGHT = colors.HexColor('#f5dede')
rows = [
# Header
[
Paragraph('<b>Feature</b>', TH),
Paragraph('<b>Skeletal Muscle</b>', TH),
Paragraph('<b>Cardiac Muscle</b>', TH),
],
# 1
[
Paragraph('<b>Cell shape</b>', TC),
Paragraph('Long cylindrical fibers (up to 30 cm); do not branch', TC),
Paragraph('Short, branched, cylindrical cells (~15–30 µm diam, 85–120 µm long)', TC),
],
# 2
[
Paragraph('<b>Nuclei — number</b>', TC),
Paragraph('Multinucleated (hundreds per fiber)', TC),
Paragraph('Usually 1 nucleus per cell; occasionally 2 (binucleated)', TC),
],
# 3
[
Paragraph('<b>Nuclei — position</b>', TC),
Paragraph('Peripheral (subsarcolemmal); pushed to the periphery by myofibrils', TC),
Paragraph('Central location within the cell; myofibrils splay around it creating a biconical juxtanuclear zone', TC),
],
# 4
[
Paragraph('<b>Cross-striations</b>', TC),
Paragraph('Prominent; highly regular A, I, H bands and Z lines', TC),
Paragraph('Present but slightly less distinct; same sarcomeric organization as skeletal muscle', TC),
],
# 5
[
Paragraph('<b>Intercalated discs</b>', TC),
Paragraph('Absent', TC),
Paragraph('Characteristic feature — dense transverse bands at cell junctions; contain fascia adherens, desmosomes, and gap junctions', TC),
],
# 6
[
Paragraph('<b>Branching</b>', TC),
Paragraph('No branching; fibers run parallel', TC),
Paragraph('Cells branch and interconnect, forming a functional syncytium', TC),
],
# 7
[
Paragraph('<b>Sarcolemma junctions</b>', TC),
Paragraph('Neuromuscular junctions (motor end plates); no gap junctions between fibers', TC),
Paragraph('Gap junctions (connexin 43) in intercalated discs enable electrical coupling and coordinated contraction', TC),
],
# 8
[
Paragraph('<b>T-tubule position</b>', TC),
Paragraph('At A-I band junction (level of Z line in some species); paired with 2 terminal cisternae → TRIAD', TC),
Paragraph('At Z line; paired with only 1 terminal cisterna → DIAD (less organized SR)', TC),
],
# 9
[
Paragraph('<b>Sarcoplasmic reticulum (SR)</b>', TC),
Paragraph('Well-developed; surrounds each myofibril; rapid Ca2+ release via RyR1', TC),
Paragraph('Less extensive; Ca2+ release via RyR2 (calcium-induced calcium release from SR); Ca2+ entry from T-tubule lumen also essential', TC),
],
# 10
[
Paragraph('<b>Mitochondria</b>', TC),
Paragraph('Variable; slow-oxidative fibers: numerous; fast-glycolytic: sparse; subsarcolemmal and intermyofibrillar', TC),
Paragraph('Very abundant; up to 40% of cell volume; large, closely-packed cristae between every myofibril (continuous aerobic metabolism)', TC),
],
# 11
[
Paragraph('<b>Energy source</b>', TC),
Paragraph('Variable: glucose/glycogen (fast-twitch); fatty acids + oxidative phosphorylation (slow-twitch)', TC),
Paragraph('Primarily fatty acids (60–70%); also glucose, lactate, ketones; entirely aerobic', TC),
],
# 12
[
Paragraph('<b>Connective tissue</b>', TC),
Paragraph('Endomysium, perimysium, epimysium; each fiber individually ensheathed', TC),
Paragraph('Thin endomysium with rich capillary network; perimysium separates bundles; cardiac skeleton of fibrous CT', TC),
],
# 13
[
Paragraph('<b>Innervation / control</b>', TC),
Paragraph('Voluntary; each fiber receives a motor end plate from an alpha-motor neuron (somatic nervous system)', TC),
Paragraph('Involuntary; modulated by autonomic nervous system and intrinsic conduction system; inherent automaticity (pacemaker activity)', TC),
],
# 14
[
Paragraph('<b>Regeneration capacity</b>', TC),
Paragraph('Moderate — satellite cells (myogenic stem cells) under basal lamina can regenerate damaged fibers', TC),
Paragraph('Very limited — cardiomyocytes are terminally differentiated; minimal renewal from cardiac progenitor cells; damaged tissue replaced by fibrosis', TC),
],
# 15
[
Paragraph('<b>Myoglobin content</b>', TC),
Paragraph('Variable: red (oxidative) fibers rich; white (glycolytic) fibers poor', TC),
Paragraph('High in all regions — sustains continuous oxygen delivery for aerobic metabolism', TC),
],
# 16
[
Paragraph('<b>Lipofuscin / ANF granules</b>', TC),
Paragraph('Lipofuscin may be present in aged fibers; no ANF granules', TC),
Paragraph('Perinuclear lipofuscin present; atrial cells contain atrial natriuretic factor (ANF) and BNF granules (0.3–0.4 µm)', TC),
],
# 17
[
Paragraph('<b>Mode of contraction</b>', TC),
Paragraph('All-or-none per motor unit; graded force by recruitment and rate coding; can sustain tetanus', TC),
Paragraph('All-or-none as a syncytium; cannot sustain tetanus (absolute refractory period lasts nearly as long as contraction)', TC),
],
]
col_widths = [4.5*cm, 7.0*cm, 7.0*cm]
table = Table(rows, colWidths=col_widths, repeatRows=1)
style_cmds = [
# Header row
('BACKGROUND', (0,0), (-1,0), DARK_BLUE),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('FONTSIZE', (0,0), (-1,0), 10),
('ALIGN', (0,0), (-1,0), 'CENTER'),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
# Column header colours
('BACKGROUND', (1,0), (1,0), SKEL_BLUE),
('BACKGROUND', (2,0), (2,0), CARD_RED),
# Feature column: light gray
('BACKGROUND', (0,1), (0,-1), colors.HexColor('#e8ecf0')),
('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'),
# Alternating rows
*[('BACKGROUND', (1,i), (1,i), SKEL_LIGHT if i % 2 == 1 else ALT2) for i in range(1, len(rows))],
*[('BACKGROUND', (2,i), (2,i), CARD_LIGHT if i % 2 == 1 else colors.HexColor('#fff5f5')) for i in range(1, len(rows))],
# Padding
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 6),
('LEFTPADDING', (0,0), (-1,-1), 6),
('RIGHTPADDING', (0,0), (-1,-1), 6),
# Grid
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('LINEBELOW', (0,0), (-1,0), 1.5, DARK_BLUE),
]
table.setStyle(TableStyle(style_cmds))
return table
def add_image_safely(images, key, width, caption, styles, story):
"""Add image to story if available."""
buf = images.get(key)
if buf:
try:
buf.seek(0)
img = Image(buf, width=width, height=width*0.75)
img.hAlign = 'CENTER'
story.append(img)
story.append(Paragraph(caption, styles['Caption']))
except Exception as e:
story.append(Paragraph(f"[Image unavailable: {e}]", styles['Caption']))
else:
story.append(Paragraph("[Image could not be loaded]", styles['Caption']))
def build_pdf():
print("Fetching images...")
images = fetch_images(IMAGE_URLS)
print(f" Fetched {len(images)}/{len(IMAGE_URLS)} images.")
styles = build_styles()
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=2*cm, rightMargin=2*cm,
topMargin=2.5*cm, bottomMargin=2.5*cm,
)
story = []
W = A4[0] - 4*cm # usable width
DARK_BLUE = colors.HexColor('#1a3a5c')
SKEL_BLUE = colors.HexColor('#2a6496')
CARD_RED = colors.HexColor('#8b1a1a')
# ── Title Page ───────────────────────────────────────────────────────────
story.append(Spacer(1, 1.5*cm))
story.append(Paragraph(
"Histological Differences Between<br/>Skeletal and Cardiac Muscle",
styles['DocTitle']
))
story.append(Spacer(1, 0.3*cm))
story.append(HRFlowable(width=W*0.6, thickness=2, color=DARK_BLUE, hAlign='CENTER'))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
"A Comprehensive Comparison for Medical Students",
styles['DocSubtitle']
))
story.append(Paragraph(
"Sources: Histology: A Text and Atlas (Ross & Pawlina, 8e) · Junqueira's Basic Histology (17e)",
styles['Source']
))
story.append(Spacer(1, 1.2*cm))
# ── Introduction ─────────────────────────────────────────────────────────
story.append(ColorBar("1. Introduction", styles['SectionHead'], DARK_BLUE))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
"Skeletal and cardiac muscles are both classified as <b>striated muscle</b> — they share the same fundamental "
"contractile machinery based on thin (actin) and thick (myosin) filaments organized into sarcomeres, which "
"produce the characteristic cross-striated banding pattern visible under light microscopy. Despite this "
"ultrastructural similarity, the two muscle types differ substantially in their histological organization, "
"cellular properties, innervation, and regenerative capacity, reflecting their distinct functional roles.",
styles['Body']
))
story.append(Paragraph(
"Skeletal muscle provides <b>voluntary movement</b> of the body, organized into discrete fibers controlled "
"by the somatic nervous system. Cardiac muscle, forming the myocardium, contracts <b>involuntarily and "
"rhythmically</b> throughout life without fatigue, driven by intrinsic pacemaker activity and coordinated "
"via specialized junctions between cells.",
styles['Body']
))
story.append(Spacer(1, 0.5*cm))
# ── Skeletal Muscle Section ───────────────────────────────────────────────
story.append(ColorBar("2. Skeletal Muscle — Histological Features", styles['SectionHead'], SKEL_BLUE))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("2.1 Cell Structure", styles['SubHead']))
story.append(Paragraph(
"Each skeletal muscle fiber is a <b>single, enormously long multinucleated cell</b> (syncytium) formed by "
"the fusion of many myoblasts during development. Fibers can extend up to 30 cm in length. The numerous "
"nuclei are <b>peripherally located</b>, immediately beneath the sarcolemma (plasma membrane), pushed to "
"the edges by the densely packed myofibrils filling the interior of the fiber.",
styles['Body']
))
story.append(Paragraph(
"The cytoplasm (sarcoplasm) is packed with parallel <b>myofibrils</b>, each composed of repeating "
"sarcomeres (A band, I band, H band, Z line, M line). The well-developed <b>sarcoplasmic reticulum (SR)</b> "
"forms a network surrounding each myofibril, with <b>terminal cisternae</b> flanking each T-tubule to form "
"<b>triads</b> at the A-I junction. Ca<super>2+</super> is rapidly released via <b>RyR1 receptors</b> upon "
"action potential arrival.",
styles['Body']
))
story.append(Paragraph("2.2 Fiber Types", styles['SubHead']))
story.append(Paragraph(
"Skeletal muscle fibers are heterogeneous and classified into three main types based on metabolic profile:",
styles['Body']
))
fiber_data = [
[Paragraph('<b>Type</b>', styles['TableHeader']),
Paragraph('<b>Speed</b>', styles['TableHeader']),
Paragraph('<b>Metabolism</b>', styles['TableHeader']),
Paragraph('<b>Mitochondria</b>', styles['TableHeader']),
Paragraph('<b>Myoglobin</b>', styles['TableHeader']),
Paragraph('<b>Fatigue</b>', styles['TableHeader'])],
[Paragraph('Type I (Slow Oxidative)', styles['TableCell']),
Paragraph('Slow', styles['TableCellCenter']),
Paragraph('Oxidative phosphorylation', styles['TableCell']),
Paragraph('Many', styles['TableCellCenter']),
Paragraph('High (red)', styles['TableCellCenter']),
Paragraph('Resistant', styles['TableCellCenter'])],
[Paragraph('Type IIa (Fast Oxidative-Glycolytic)', styles['TableCell']),
Paragraph('Fast', styles['TableCellCenter']),
Paragraph('Oxidative + glycolytic', styles['TableCell']),
Paragraph('Many', styles['TableCellCenter']),
Paragraph('High (red)', styles['TableCellCenter']),
Paragraph('Intermediate', styles['TableCellCenter'])],
[Paragraph('Type IIb (Fast Glycolytic)', styles['TableCell']),
Paragraph('Fast', styles['TableCellCenter']),
Paragraph('Anaerobic glycolysis', styles['TableCell']),
Paragraph('Few', styles['TableCellCenter']),
Paragraph('Low (white)', styles['TableCellCenter']),
Paragraph('Rapid', styles['TableCellCenter'])],
]
fiber_table = Table(fiber_data, colWidths=[4.5*cm, 2*cm, 4*cm, 3*cm, 2.5*cm, 2.5*cm])
fiber_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), SKEL_BLUE),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('BACKGROUND', (0,1), (-1,1), colors.HexColor('#dce8f5')),
('BACKGROUND', (0,2), (-1,2), colors.white),
('BACKGROUND', (0,3), (-1,3), colors.HexColor('#dce8f5')),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 5),
]))
story.append(fiber_table)
story.append(Spacer(1, 0.4*cm))
# Skeletal muscle image
story.append(Paragraph("2.3 Light Microscopy Appearance", styles['SubHead']))
story.append(Paragraph(
"In H&E-stained sections, skeletal muscle fibers appear as elongated structures with prominent cross-striations. "
"Peripheral flattened nuclei are visible just beneath the sarcolemma. In transverse sections, fibers appear "
"polygonal with peripheral nuclei, organized into fascicles separated by perimysium. The endomysium is a thin "
"layer of connective tissue enclosing each individual fiber.",
styles['Body']
))
add_image_safely(images, 'skeletal_histology',
width=10*cm,
caption="Figure 1. Skeletal muscle — transverse section (H&E). Polygonal fibers with peripheral nuclei "
"arranged into fascicles. Note perimysial connective tissue between fascicles. (Panel d, ×100)",
styles=styles, story=story)
# ── Cardiac Muscle Section ────────────────────────────────────────────────
story.append(PageBreak())
story.append(ColorBar("3. Cardiac Muscle — Histological Features", styles['SectionHead'], CARD_RED))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("3.1 Cell Structure", styles['SubHead']))
story.append(Paragraph(
"Cardiac muscle cells (cardiomyocytes) are <b>short, branched, cylindrical cells</b>, approximately "
"<b>15–30 µm in diameter and 85–120 µm in length</b>. Each cell typically has a <b>single, centrally "
"located nucleus</b> (occasionally two). The nucleus is surrounded by a <b>biconical juxtanuclear zone</b> "
"rich in mitochondria, Golgi apparatus, glycogen granules, and lipofuscin pigment. In atrial cardiomyocytes, "
"perinuclear <b>atrial natriuretic factor (ANF) and brain natriuretic factor (BNF) granules</b> "
"(0.3–0.4 µm) are also found here.",
styles['Body']
))
story.append(Paragraph(
"The sarcoplasm contains densely packed large mitochondria occupying <b>up to 40% of cell volume</b>, "
"reflecting the heart's dependence on continuous aerobic metabolism. Glycogen stores are also present "
"between myofibrils. Fatty acids are the primary fuel, stored as triglycerides in small lipid droplets.",
styles['Body']
))
story.append(Paragraph("3.2 Intercalated Discs — Unique to Cardiac Muscle", styles['SubHead']))
story.append(Paragraph(
"The most diagnostically distinctive feature of cardiac muscle is the <b>intercalated disc</b> — "
"a specialized cell-to-cell attachment seen as densely staining transverse bands in longitudinal sections. "
"They may run straight across a fiber or appear as step-like (staircase) structures. Each disc contains "
"three types of junction:",
styles['Body']
))
junctions = [
("<b>Fascia adherens</b>", "Anchors thin actin filaments of the terminal sarcomere to the cell membrane; analogous to zonula adherens; the main component of the transverse segment; responsible for the disc's staining in H&E."),
("<b>Maculae adherentes (Desmosomes)</b>", "Provide strong mechanical adhesion, preventing cells from pulling apart during constant repetitive contraction; found in both transverse and lateral components."),
("<b>Gap junctions (Nexus)</b>", "Located in the lateral component of the disc; formed by connexin 43 channels; provide ionic/electrical continuity allowing rapid impulse propagation through the myocardium — cardiac muscle behaves as a functional syncytium."),
]
for title, desc in junctions:
story.append(Paragraph(f"• {title}: {desc}", styles['BulletItem']))
story.append(Spacer(1, 0.3*cm))
# Cardiac LM image
add_image_safely(images, 'cardiac_lm',
width=10*cm,
caption="Figure 2. Cardiac muscle — longitudinal section (H&E, ×360). Arrows indicate intercalated discs "
"crossing the fibers as darkly staining transverse bands. Note the branching of fibers and centrally "
"placed nuclei. (Histology: A Text and Atlas, Ross & Pawlina)",
styles=styles, story=story)
story.append(Paragraph("3.3 T-Tubules and Sarcoplasmic Reticulum", styles['SubHead']))
story.append(Paragraph(
"Unlike skeletal muscle where T-tubules occur at the A-I junction to form <b>triads</b> with two terminal "
"cisternae, cardiac T-tubules are situated at the <b>Z line</b> and associate with a single expanded "
"terminal cisterna to form a <b>diad</b>. The cardiac SR is less extensive and less organized than in "
"skeletal muscle. Importantly, Ca<super>2+</super> entry from the T-tubule lumen itself (not only from the SR) "
"is essential to trigger contraction via <b>calcium-induced calcium release (CICR)</b> through RyR2 receptors.",
styles['Body']
))
# Intercalated disc diagram
add_image_safely(images, 'intercalated_diagram',
width=11*cm,
caption="Figure 3. Diagram of cardiac muscle fiber sarcomere and intercalated disc structure, showing "
"the staircase arrangement of the disc and its ultrastructural components. "
"(Histology: A Text and Atlas, Fig. 11.21)",
styles=styles, story=story)
# Cardiac TEM
story.append(PageBreak())
story.append(Paragraph("3.4 Ultrastructure (TEM)", styles['SubHead']))
add_image_safely(images, 'cardiac_tem',
width=10*cm,
caption="Figure 4. TEM of cardiac muscle showing abundant mitochondria (M) and sarcoplasmic reticulum (SR). "
"Dyads (D) formed by T-tubule and one SR terminal cisterna visible at Z lines. "
"(Junqueira's Basic Histology, Fig. 10-17, ×30,000)",
styles=styles, story=story)
story.append(Spacer(1, 0.4*cm))
# ── Master Comparison Table ───────────────────────────────────────────────
story.append(ColorBar("4. Comprehensive Comparison Table", styles['SectionHead'], DARK_BLUE))
story.append(Spacer(1, 0.4*cm))
story.append(build_comparison_table(styles))
story.append(Spacer(1, 0.6*cm))
# ── Key Diagnostic Differences ────────────────────────────────────────────
story.append(ColorBar("5. Key Diagnostic Pointers in Histology", styles['SectionHead'], DARK_BLUE))
story.append(Spacer(1, 0.3*cm))
diag_data = [
[Paragraph('<b>Feature to Look For</b>', styles['TableHeader']),
Paragraph('<b>Skeletal Muscle</b>', styles['TableHeader']),
Paragraph('<b>Cardiac Muscle</b>', styles['TableHeader'])],
[Paragraph('Nuclear position', styles['TableCell']),
Paragraph('Peripheral (subsarcolemmal)', styles['TableCell']),
Paragraph('Central', styles['TableCell'])],
[Paragraph('Nuclear number per cell', styles['TableCell']),
Paragraph('Many (multinucleated)', styles['TableCell']),
Paragraph('1 (rarely 2)', styles['TableCell'])],
[Paragraph('Intercalated discs', styles['TableCell']),
Paragraph('Absent', styles['TableCell']),
Paragraph('Present — pathognomonic', styles['TableCell'])],
[Paragraph('Fiber branching', styles['TableCell']),
Paragraph('No', styles['TableCell']),
Paragraph('Yes', styles['TableCell'])],
[Paragraph('Fiber length', styles['TableCell']),
Paragraph('Very long (up to 30 cm)', styles['TableCell']),
Paragraph('Short (~85-120 µm)', styles['TableCell'])],
[Paragraph('T-tubule / SR arrangement', styles['TableCell']),
Paragraph('Triads (A-I junction)', styles['TableCell']),
Paragraph('Diads (Z line)', styles['TableCell'])],
[Paragraph('Mitochondria abundance', styles['TableCell']),
Paragraph('Variable by fiber type', styles['TableCell']),
Paragraph('Extremely abundant (up to 40% vol)', styles['TableCell'])],
]
diag_table = Table(diag_data, colWidths=[5*cm, 6.25*cm, 6.25*cm])
diag_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), DARK_BLUE),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('BACKGROUND', (1,0), (1,0), SKEL_BLUE),
('BACKGROUND', (2,0), (2,0), CARD_RED),
('BACKGROUND', (0,1), (-1,1), colors.HexColor('#f0f5fa')),
('BACKGROUND', (0,3), (-1,3), colors.HexColor('#f0f5fa')),
('BACKGROUND', (0,5), (-1,5), colors.HexColor('#f0f5fa')),
('BACKGROUND', (0,7), (-1,7), colors.HexColor('#f0f5fa')),
('BACKGROUND', (0,1), (0,-1), colors.HexColor('#e8ecf0')),
('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#b0bec5')),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 6),
('LEFTPADDING', (0,0), (-1,-1), 6),
]))
story.append(diag_table)
story.append(Spacer(1, 0.6*cm))
# ── Functional Significance ───────────────────────────────────────────────
story.append(ColorBar("6. Functional Significance of Histological Differences", styles['SectionHead'], DARK_BLUE))
story.append(Spacer(1, 0.3*cm))
points = [
("<b>Central nucleus in cardiac muscle</b>", "Allows the biconical juxtanuclear region to concentrate mitochondria and energy-generating machinery immediately around the nucleus, supporting the cell's massive metabolic demands."),
("<b>Intercalated discs & gap junctions</b>", "Enable the myocardium to function as a <i>functional syncytium</i>: an electrical impulse initiated at the SA node propagates rapidly through the gap junctions of intercalated discs, ensuring synchronized contraction of the entire heart chamber."),
("<b>Abundant mitochondria in cardiac muscle</b>", "The heart cannot rest; it requires continuous aerobic ATP production. Occupying up to 40% of cell volume, mitochondria ensure an uninterrupted energy supply for constant, lifelong contractions."),
("<b>Peripheral nuclei & multinucleation in skeletal muscle</b>", "Positions the contractile apparatus centrally for maximal force generation. Multinucleation supports the high transcriptional demands of a large cell."),
("<b>Triads in skeletal vs. diads in cardiac</b>", "Faster, more synchronized Ca2+ release in skeletal muscle (both sides of the SR terminal cisterna are triggered simultaneously). In cardiac muscle, Ca2+ from T-tubule lumen acts as a trigger for CICR from the adjacent SR terminal cisterna."),
("<b>Limited cardiac regeneration</b>", "Cardiomyocytes are terminally differentiated with negligible renewal; myocardial infarction leads to permanent replacement of contractile tissue with fibrotic scar, explaining the severity and irreversibility of ischemic heart disease."),
]
for title, desc in points:
story.append(Paragraph(f"<b>•</b> {title}: {desc}", styles['BulletItem']))
story.append(Spacer(1, 0.15*cm))
story.append(Spacer(1, 0.6*cm))
# ── Summary ───────────────────────────────────────────────────────────────
story.append(ColorBar("7. Summary", styles['SectionHead'], DARK_BLUE))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
"Both skeletal and cardiac muscles share the striated sarcomeric organization, but their histological "
"differences reflect profound functional divergence. The pathognomonic features of <b>cardiac muscle</b> — "
"central nuclei, intercalated discs with gap junctions, cell branching, and mitochondria-rich sarcoplasm — "
"underpin its role as an involuntary, perpetually contracting pump. <b>Skeletal muscle</b>, with its "
"peripheral multinucleation, parallel fiber organization, triadic T-tubule system, and satellite cell "
"reserve, is built for controlled, forceful, and reparable voluntary movement.",
styles['Body']
))
story.append(Spacer(1, 0.5*cm))
# ── References ────────────────────────────────────────────────────────────
story.append(HRFlowable(width=W, thickness=0.5, color=colors.HexColor('#b0bec5')))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
"<b>References</b><br/>"
"1. Ross MH, Pawlina W. <i>Histology: A Text and Atlas with Correlated Cell and Molecular Biology</i>, 8th ed. Wolters Kluwer; 2020. Chapter 11: Muscle Tissue.<br/>"
"2. Mescher AL. <i>Junqueira's Basic Histology: Text and Atlas</i>, 17th ed. McGraw-Hill; 2024. Chapter 10: Muscle Tissue.<br/>"
"3. Sobotta. <i>Color Atlas of Human Anatomy, Vol. 2: Internal Organs</i>, 6th ed. Thieme; 2019.",
styles['Source']
))
print("Building PDF...")
doc.build(story)
print(f"PDF saved to: {OUTPUT}")
if __name__ == "__main__":
build_pdf()
cd /home/daytona/workspace/muscle-histology && python3 generate_pdf.py 2>&1
ls -lh /home/daytona/workspace/muscle-histology/Skeletal_vs_Cardiac_Muscle_Histo…
Skeletal vs Cardiac Muscle Histology
PDF Document · PDF
| Section | Content |
|---|---|
| 1. Introduction | Why both are "striated" yet histologically distinct |
| 2. Skeletal Muscle | Cell structure, fiber types table (Type I/IIa/IIb), LM appearance with image |
| 3. Cardiac Muscle | Cell structure, intercalated discs in detail, T-tubule/SR diads, TEM image |
| 4. Comprehensive Comparison Table | 17-row side-by-side comparison of every major feature |
| 5. Key Diagnostic Pointers | Quick-reference table for exam/histology spot questions |
| 6. Functional Significance | Why each structural difference matters clinically |
| 7. Summary + References | Concise recap and full citations |
| Feature | Skeletal | Cardiac |
|---|---|---|
| Nuclei | Multiple, peripheral | Single (rarely 2), central |
| Intercalated discs | Absent | Pathognomonic — contain gap junctions, fascia adherens, desmosomes |
| T-tubule complex | Triad (2 SR cisternae) at A-I junction | Diad (1 SR cisterna) at Z line |
[5/21, 8:51 PM] +92 329 1859593: اسائنمنٹ؛ اسلام میں حقوق العباد کی اہمیت بالخصوص والدین کے اولاد پر حقوق [5/21, 8:51 PM] +92 329 1859593: کم از کم 5 صفحات پر مشتمل ہو۔ قرآن وحدیث سے مواد لیا ہو