bibleref.sty (1.17a): a L A TEX 2ε package for typesetting bible references

Similar documents
Citation guide. Carleton College L A TEX workshop. You don t have to keep track of what sources you cite in your document.

mfirstuc.sty v2.06: uppercasing first letter

The MathType Window. The picture below shows MathType with all parts of its toolbar visible: Small bar. Tabs. Ruler. Selection.

The nbaseprt package

glossaries-extra.sty v1.38: documented code

Table of Contents. How to use this document. How to use the template. Page 1 of 9

Documented Code For glossaries v3.02

APPM 2460 Matlab Basics

glossaries-extra.sty v1.29: an extension to the glossaries package

lexref Contents 1 Introduction 1.1 Purposes Adrien Vion adrien[dot]vion3[at]gmail[dot]com

The svn package. Richard Lewis 25th September 2007

Designing BIBTEX Styles

An Introduction to. Rado Ivanov CIS400 Senior Design Tutorial September 18, 2014

The listproc package

Documented Code For glossaries v4.40

The newcommand.py utility

The hypbmsec package

Manuscripts description for philology with biblatex New data types

glossaries-extra.sty v1.26: an extension to the glossaries package

The makebase L A TEX 2ε package

L A TEX Tutorial. 1 Introduction. 2 Running L A TEX. J. E. Rice. May 2010

The authorindex Package

Documented Code For glossaries v4.35

Documentation for xcomment.sty

Switched-On Schoolhouse 2014 User Guide Resource Center & Messaging System

pressrelease v1.0: typesetting press releases

Comments on drafts of final paper

L A TEX Primer. Randall R. Holmes. August 17, 2018

probsoln v3.0: creating problem sheets optionally with solutions

Resource Center & Messaging System

Wiley-Blackwell Geographical Analysis (GA) Content Style Sheet THIS DOCUMENT LAST UPDATED ON: 16/JUN/2011. Journal house style points

EXCEL 2003 DISCLAIMER:

The newunicodechar package

Meeting One. Aaron Ecay. February 2, 2011

Typesafe cross-referencing with typedref

The isodateo package

Formal Figure Formatting Checklist

MLA Format. Example and Formatting Instructions. Prepared by the Clarendon College English Department and Computer Science Department

datetime.sty v2.43: Formatting Current Date and Time

6. Essential Spreadsheet Operations

The twoopt package. Definitions with two optional arguments. 1999/04/12, v1.3. Heiko Oberdiek 1

Electronic Production Guidelines

Peter Wilson Catholic University of America Now at 1999/02/13

The abstract package

Travels in TEX Land: Using memoir for a book

The hanging package. Contents. 1 Introduction

TUGboat, Volume 31 (2010), No. 1 83

T H E I N T E R A C T I V E S H E L L

fetchbibpes: Fetch Bible passages from DEF files

LOGGING IN TO EASYBIB 1. Using Google Chrome, go to and click on Login: 2. Click on the option Sign in with Google:

The gloss Package. Jose Luis Díiaz Javier Bezos. October 10, 1999

EndNote Class Outline Advanced Tips and Tricks

The alphalph package

SwordSearcher Bible Software

Introduction to Scientific Typesetting Lesson 1: Getting Started

Manual for uoftexam.sty by Martin J. Osborne Version 1.8, October 2017

The lips LaTeX package Chicago Manual text ellipses (Frankenstein s lips)

International Studies Association Table Preparation Guidelines

Latex Tutorial. CIS400 Senior Design 9/5/2013

chapterbib multiple bibliographies in L A TEX

Using L A TEX. A numbered list is just that a collection of items sorted and labeled by number.

Chapter 13: Bible integration

The multicap L A TEX2ε package

Creating a LaTeX Minimal Example

The exam-randomizechoices package

Using L A T E X for scientific writing

nomencl A Package to Create a Nomenclature

Documented Code For glossaries v4.11

Excel Expert Microsoft Excel 2010

QUIZ. How could we disable the automatic creation of copyconstructors

Course contents. Overview: Goodbye, calculator. Lesson 1: Get started. Lesson 2: Use cell references. Lesson 3: Simplify formulas by using functions

Cindex 3.0 for Windows. Release Notes

Text Input and Conditionals

The threadcol package

Introduction to Regular Expressions Version 1.3. Tom Sgouros

SwordSearcher Bible Software

CSCI 195 Intro to Programming w/python Parsing the Bible Text into a Python data structure

todo package test file and sample

The listofsymbols.sty package (v0.2)

Shorthand for values: variables

QUIZ. How could we disable the automatic creation of copyconstructors

Using Custom Number Formats

Pimp your thesis: a minimal introduction to L A T E X.

(N.B., the original name for this program was makeindex but CMS limits program names (and any filename) to 8 characters so...)

*roff code is suitable for display on a terminal using nroff(1), normally via man(1), or printing using troff(1).

Karlen Communications Citations and Bibliography in Word. Karen McCall, M.Ed.

Formulas and Functions

OER Publishing with LaTeX and GitHub

The lips LaTeX package Chicago Manual text ellipses (Frankenstein s lips)

WBJS Grammar Glossary Punctuation Section

Using Text in Photoshop

Your Audio Project. Everything you need to prepare an audio project and load it onto the MegaVoice Herald audio player.

Preparing Z specifications using LaTeX markup

Excel 2016: Part 1. Updated January 2017 Copy cost: $1.50

NOTES ON MATHEMATICAL TYPING

Introduction to BibL a TEX

Documented Code For glossaries v4.15

Table of Contents Headings:... 2 Changing text to a heading... 2 Modifying Style settings for current and future documents... 2

Installing the TX/PX fonts for SWP5/pdfTeX

How to Properly Format Word for MLA Format and keep it that way!

Transcription:

bibleref.sty (1.17a): a L A TEX 2ε package for typesetting bible references Nicola Talbot (inactive) Maïeul Rouquette (active) 2018/06/05 Contents 1 General use 1 1.1 Basic............................................ 1 1.2 Choosing the book.................................... 2 1.3 Choosing the chapters and verses........................... 2 1.4 Examples.......................................... 3 1.5 Style............................................. 3 2 Defining New Styles 4 3 Indexing Bible References 5 3.1 Index Categories..................................... 6 3.2 The bibleref-xidx Package................................ 6 3.3 Separate Scripture Index................................. 7 3.4 Changing the Sort Order................................. 7 4 Distributing New Styles 8 5 Acknowledgements 9 6 Bug and feature request 9 Index 10 1 General use 1.1 Basic The bibleref package was designed to provide consistent formatting for referencing parts of the bible. 1

\bibleverse \bibleverse{ book title }( chapter : verse(s) ) This command can be used to cite a bible book, chapter or verse or range of chapters or verses. Be careful if you use bibleref with babel as some of babel s language options make the colon character active, which will cause a problem for \bibleverse (and \ibibleverse, described later). Check the babel documentation to find out how to make the colon non-active. 1.2 Choosing the book The book title, book title, may be given either as the full title (e.g. Matthew) or as an abbreviation (e.g. Mt or Matt), most standard abbreviations are recognised. Books with multiple parts should be preceded by the book number in uppercase Roman numerals. For example, the second book of Kings should be entered as \bibleverse{iikings} 1.3 Choosing the chapters and verses You may have any number, or zero, sets of parenthesis ( chapter : verse(s) ), indicating the chapter and verse or verses. Verses can be specified as a comma separated list of individual verses or range of verses. A range of verses should be written with a single hyphen, e.g. 2-4. In the typeset output the range of verses will be separated with \BRvrsep \BRvrsep (an en-dash by default.) A chapter may be referenced without a verse, but the colon must remain, e.g. (12:) simply indicates chapter 12. A range of verses spanning more than one chapter can be entered as ( ch : v )-( ch : v ) If there is no verse, but there are multiple chapters ranges, these may be specified in the chapter part, using a comma to separate individual chapters and a hyphen to separate ranges. Note that you still need a colon at the end of the list. You must not use this syntax: ( ch :)-( ch :) Despite this syntax make a good typesetting, it make a problematic index: the chapter are typeset after the verses contained inside. For the book without chapter (Obadiah; 1 John; 2 John; Philemon; Jude), you must add an empty chapter: (: v - v ) You must not use this syntax: ( v - v :) With this syntax, the verses would be formatted as if they were chapters. 2

For the book of Psalms, there is a double numbering: one following the Massoretic Texts, the other one following the Septuagint. Depending on your field, you may use one numbering or the other one. However, you can also provide both numbers. In this case, use the slash (/) to separate the two numbers : \bibleverse{ps}(23/22:) The alternative number will be, by default, typeset between parenthesis. However, you can redefine the \BRotherchapterstyle macro to modify the way this number is inserted. For example, to print it in superscript: \renewcommand{\brotherchapterstyle}[1]{\textsuperscript{#1}} or to delete it: \renewcommand{\brotherchapterstyle}[1]{} 1.4 Examples 1.5 Style \bibleverse{ex} Exodus \bibleverse{exodus}(20:) Exodus 20 \bibleverse{exod}(20:17) Exodus 20:17 \bibleverse{exod}(20-21:) Exodus 20 21 \bibleverse{ps}(23/22:) Psalms 23(22) \bibleverse{iico}(12:21) 2 Corinthians 12:21 \bibleverse{ex}(20:17)(21:3) Exodus 20:17;21:3 \bibleverse{ex}(15:)(17:)(20:) Exodus 15;17;20 \bibleverse{rev}(1:2,5,7-9,11) Revelation 1:2,5,7 9,11 \bibleverse{ichronicles}(1:3)-(2:7) 1 Chronicles 1:3 2:7 \bibleverse{luke}(1,4-5,8:) Luke 1,4 5,8 \bibleverse{phm}(1-3:) Philemon 1 3 The style of the reference can be specified either by package option or as the argument to the command \biblerefstyle \biblerefstyle{ style } Styles are listed in Table 1. You can change the name of a book using \setbooktitle \setbooktitle{ name }{ new title } 3

Table 1: Bible Citation Styles (can be used as package option or in the argument to \biblerefstyle) Style Example default 2 Corinthians 12:1 5 jerusalem 2 Co 12:1 5 anglosaxon II Cor. XII.1 5 JEH 2 Cor. xii. 1 5 NTG 2 Cor xii,1 5 MLA 2 Cor. xii.1 5 chicago 2 Cor. xii : 1 5 text Second Epistle to the Corinthians, chapter twelve verse one to five Note that name must be the full name, not the abbreviated name of the book. For example, to change Revelation to Apoc, do \setbookname{revelation}{apoc} (Note that you shouldn t do \setbookname{rev}{apoc}) If you want a different title for a book depending on whether it s in the main body of the document or in the index, you can set the index version using: indexbooktitle \setindexbooktitle{ name }{ title } In this case, name should be the name you ll use in \ibibleverse. For example, if you do: \setbooktitle{psalms}{psalm} \setindexbooktitle{psalms}{psalms} Then \ibibleverse{psalms}(2:) will print Psalm the document and Psalms in the index, but \ibibleverse{ps}(2:) will print Psalms in both the document and the index. You can add a book using \addbiblebook \addbiblebook{ name }{ title } For example: \addbiblebook{susanna}{story of Susanna} 2 Defining New Styles You can define a new style using the command wbiblerefstyle \newbiblerefstyle{ style-name }{ commands } 4

where commands are the commands needed to modify the citation style. Example: This new style is based on the default style, but has verses in lower case Roman numerals, and redefines Revelation as Apocalypse. \newbiblerefstyle{sample}{% \biblerefstyle{default}% \renewcommand{\brversestyle}[1]{\romannumeral##1}% \setbooktitle{revelation}{apocalypse}% } Note the use of ##1 instead of #1. If you want to distribute a new style, see section 4. 3 Indexing Bible References \ibibleverse \ibibleverse[ format ]{ book title }({ chapter }: verse(s) ) This does the same as \bibleverse but also adds an index entry (provided you have used \makeindex in the preamble.) The default page number format is given by the command \bvidxpgformat \bvidxpgformat This is textrm by default, but can be redefined. To override the page number format for a particular entry you can use the optional argument to \ibibleverse. For example: \ibibleverse[textit]{exodus} (Note there is no backslash.) \ibiblechvs \ibiblechvs[ format ]{ book title }({ chapter }: verse(s) ) This is similar to \ibibleverse except that it doesn t display the book name in the text. The reference is indexed under the book title in the same way as \ibibleverse. \ibiblevs \ibiblevs[ format ]{ book title }({ chapter }: verse(s) ) This is similar to \ibiblechvs except that it only displays the verse(s) in the text. You may need to create your own custom makeindex style file as the default uses a comma and space to separate the item from the page number, which may cause confusion. For example, you could create a file called sample.ist and write in the lines: delim_0 "\\dotfill " delim_1 "\\dotfill " delim_2 "\\dotfill " See the makeindex documentation for further details. 5

3.1 Index Categories You may prefer to index the bible reference under a category with the book title as a sub item of that category. This can be achieved using: blerefcategory \biblerefcategory[ sort key ]{ category title } The optional argument is the sort key to be used by makeindex or xindy. If omitted category title is used. Note that \ibibleverse, \ibiblechvs and \ibiblevs use the category that is currently set. If you need to keep switching categories, you may find it easier to define a shortcut command. For example, suppose you re discussing the differences between the King James and the New Jerusalem versions, you could define the following: \newcommand{\kjref}{\biblerefcategory{king James}\ibibleverse} \newcommand{\njref}{\biblerefcategory{new Jerusalem}\ibibleverse} You can now use \kjref and \njref in the same way that you would use \ibibleverse You can disable the category by setting it to nothing: \biblerefcategory{} 3.2 The bibleref-xidx Package The bibleref package comes with a supplementary package bibleref-xidx that modifies the way bible references are added to the index. With no package options, i.e., just \usepackage{bibleref-xidx} the verses will appear as sub-items of the chapters. Note that a verse range will be considered a single item so, for example, \ibibleverse{ex}(9:1) \ibibleverse{ex}(9:4) \ibibleverse{ex}(9:1-4) will occur as three separate entries under Exodus chapter 9. Also note that (9-14:) and (9:)-(14:) will be treated differently. The bibleref-xidx package can be loaded with the following options: noverses Don t show the verses in the index. verses Show the verses (and chapters) in the index (default). nochapters Don t show the chapters (and verses) in the index. chapters Show the chapters in the index (default). All other package options will be passed to the bibleref package, which bibleref-xidx automatically loads. 6

3.3 Separate Scripture Index If you want a separate index for bible verses, in addition to a general index, you can redefine \biblerefindex \biblerefindex This command defaults to \index, but can be changed to the appropriate indexing command. For example, suppose you are using the indextools package and you want a general index and a scripture index, you can do something like: \documentclass{article} \usepackage{bibleref} \usepackage{indextools} \makeindex[title=scripture,name=scr]} \makeindex[title=general] \renewcommand{\biblerefindex}{\index[scr]} In the document, you can use \ibibleverse as before, and the scripture index is displayed using \printindex[scr] You will find the index. See the indextools documentation for further details. 3.4 Changing the Sort Order The bible reference entries will be sorted alphabetically by makeindex. However you may prefer the entries to be sorted according to their order in the bible. This can either be done using xindy instead of makeindex and creating your own custom alphabet (see xindy manual for details) or you can use bibleref s mapping command. \biblerefmap \biblerefmap{ label }{ new sort key } For example, in the preamble: \biblerefmap{genesis}{01} \biblerefmap{exodus}{02} \biblerefmap{leviticus}{03} \biblerefmap{numbers}{04} \biblerefmap{deuteronomy}{05}... When you run makeindex, the references will now be sorted in numerical order. If you want to subdivide the index into, say, old and new testament, you can add this to the mapping. For example: \biblerefmap{genesis}{1@old Testament!01} 7

\biblerefmap{exodus}{1@old Testament!02} \biblerefmap{leviticus}{1@old Testament!03} \biblerefmap{numbers}{1@old Testament!04} \biblerefmap{deuteronomy}{1@old Testament!05}... \biblerefmap{matthew}{2@new Testament!01} \biblerefmap{mark}{2@new Testament!02}... 4 Distributing New Styles If you want a new bible reference style (or translation) publicly available, then it s a good idea to upload it to CTAN (www.ctan.org). If you ve never done this before, you might find it a bit daunting, so here are a few pointers. I suggest that you give the name of your new package the prefix bibleref- as then it will appear close to bibleref in the alphabetical list in the catalogue. Suppose your new style is called mystyle 1, then create a file called bibleref-mystyle.sty. At the start of the file, do: \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bibleref-mystyle}[2011/01/19 v1.0 Bible reference style conforming to something or other] (Change the date and the brief description in the line above to something more appropriate.) Next you need to load bibleref: \RequirePackage{bibleref} Now do the new style stuff (or redefine styles to provide translations): \newbiblerefstyle{mystyle}{% \biblerefstyle{default}% \renewcommand{\brversestyle}[1]{\romannumeral##1}% \setbooktitle{revelation}{apocalypse}% } (Again change the above to whatever is appropriate.) Put any new book definitions that your style may require, for example: \addbiblebook{susanna}{story of Susanna} and add any \biblerefmap commands that are required. Then set your new style as the current style, if appropriate: \biblerefstyle{mystyle} On the last line of the file add: \endinput 1 Choose a more descriptive name than this. 8

Next you need to create a file called README that contains some information about your new package, including what license you want to distribute it under. (If you don t know anything about licenses, I recommend you choose the LATEX Project Public License, LPPL.) It s worth adding a sample file or a little bit of documentation that illustrates how the references appear. Put your.sty file, README file and samples or documentation into a zip archive. You re now ready to upload it. There are several upload pages. The main one is at http://www.ctan. org/upload.html. The name of your contribution is the name of your package ( biblerefmystyle in this example). Remember to put your name and email in the relevant input boxes. Sometime after you ve uploaded your zip file, you ll get a copy of the announcement from one of the CTAN maintainers. It usually takes a day to establish itself. After that people can download and use it. 5 Acknowledgements Many thanks to all the useful comments from comp.text.tex, especially from Jesse Billett, Brooks Moses and Ulrich M. Schwarz. Many thanks also to Raphaël Pinson, which have debbuged indexing for books without chapter. 6 Bug and feature request For all bug and feature requests, please open an issue on https://git.framasoft.org/maieul/bibleref/issues 9

Index Numbers written in italic refer to the page where the corresponding entry is described; numbers underlined refer to the code line of the definition; numbers in roman refer to the code lines where the entry is used. A \addbiblebook......... 4 B babel package........... 2 bibleref package.... 1, 2, 6 8 bibleref-xidx package...... 6 \biblerefcategory..... 6 \biblerefindex........ 7 \biblerefmap.......... 7 \biblerefstyle........ 3 \bibleverse........... 1 \BRvrsep.............. 2 \bvidxpgformat........ 5 I \ibiblechvs........... 5 \ibibleverse.......... 5 \ibiblevs............. 5 indextools package....... 7 M makeindex............ 5 7 N \newbiblerefstyle..... 4 P package options: chapters............. 6 nochapters........... 6 noverses............. 6 verses............... 6 S \setbooktitle......... 3 \setindexbooktitle.... 4 X xindy................ 6, 7 10