Limit word studies to 1 per verse

Prevents sidenote collision when two word studies appear
on the same line, which causes horizontal displacement.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-04 23:26:36 -05:00
parent bd6ce112d9
commit f8640eadbb
+3 -4
View File
@@ -430,11 +430,10 @@ def generate_word_study_sidenotes(verse_text, book, chapter, verse_num, shown_wo
import random
random.seed(f"{book}{chapter}{verse_num}")
# Show 1-2 sidenotes max
# Every 3rd odd verse (1, 7, 13, etc.) gets 2 sidenotes, others get 1
max_sidenotes = 2 if (verse_num % 6 == 1) else 1
# Show only 1 sidenote per verse to prevent horizontal collision in margin
max_sidenotes = 1
# Randomly select which word studies to show from those available
# Randomly select which word study to show from those available
selected = random.sample(potential_sidenotes, min(max_sidenotes, len(potential_sidenotes)))
return selected