Change chapter numbering into words instead of numbers in Latex

  • #1
Qatawna blitz
3
0
TL;DR Summary
I need to write chapter names as (Chapter One, Chapter Two,...) instead of (Chapter 1, Chapter 2, ...), how can I do that?
I need to write chapter names as (Chapter One, Chapter Two,...) instead of (Chapter 1, Chapter 2, ...), how can I do that?
 
Physics news on Phys.org
  • #2
One common technique (in C and other languages) is to define an array with text elements that correspond to the index number into the array. That way you can convert from the number to the word.

https://opentextbc.ca/pressbooks/chapter/arrays/
 
  • #3
Here's a simple illustration in Python:
Python:
chapters5 = ["Zero", "One", "Two", "Three", "Four", "Five"]
print(chapters5)
for index in range(1,6):
    print("Chapter", chapters5[index])

Output:
['Zero', 'One', 'Two', 'Three', 'Four', 'Five']
Chapter One
Chapter Two
Chapter Three
Chapter Four
Chapter Five

Process finished with exit code 0
 

Similar threads

Replies
4
Views
948
Replies
4
Views
3K
Replies
4
Views
2K
Replies
8
Views
2K
Replies
36
Views
2K
Replies
8
Views
2K
Back
Top