summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-02-19 23:39:34 +0000
committerKarl Berry <karl@freefriends.org>2016-02-19 23:39:34 +0000
commitf095179c38e70c6e2f4a8c32f261538846db66be (patch)
tree9c50d8df3565b61b07e0a643b1035267f48ffd01 /Master/texmf-dist/tex
parentcc6d5df3c982e2d54aedb383e7d02874380f09d0 (diff)
bibletext (19feb16)
git-svn-id: svn://tug.org/texlive/trunk@39785 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/bibletext/bibletext.sty41
1 files changed, 41 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/bibletext/bibletext.sty b/Master/texmf-dist/tex/latex/bibletext/bibletext.sty
new file mode 100644
index 00000000000..af777ac6784
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/bibletext/bibletext.sty
@@ -0,0 +1,41 @@
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{bibletext}
+ [2016/02/18 v0.1 Insert Bible texts]
+
+\DeleteShortVerb{\|}
+
+\RequirePackage{pgfkeys}
+
+\newif\ifbibletextRef
+\newif\ifbibletextOmitChapter
+\newif\ifbibletextOmitRepeatedChapter
+\pgfkeys{
+ /bibletext/.is family, /bibletext,
+ default/.style={
+ translation=kjv,
+ ref=false,
+ omitchapter=false,
+ },
+ translation/.estore in = \bibletextTranslation, % unused for now
+ ref/.is if=bibletextRef,
+ omitchapter/.is if=bibletextOmitChapter,
+ omitrepeatedchapter/.is if=bibletextOmitRepeatedChapter,
+}
+\newcommand\bibletext[2][]{%
+ \pgfkeys{/bibletext, default, #1}%
+ \ifbibletextRef%
+ \ifbibletextOmitRepeatedChapter%
+ \input{|"bible -f '#2' | grep -o '[[:digit:]].*' | head -n1"}%
+ \input{|"bible -f '#2' | grep -o '[[:digit:]][[:digit:]]*[[:space:]].*' | tail -n+2"}%
+ \else\ifbibletextOmitChapter%
+ \input{|"bible -f '#2' | grep -o '[[:digit:]][[:digit:]]*[[:space:]].*'"}%
+ \else%
+ \input{|"bible -f '#2' | grep -o '[[:digit:]].*'"}%
+ \fi\fi%
+ \else%
+ \input{|"bible -f '#2' | cut -d' ' -f2-"}%
+ \fi%
+}
+
+\endinput
+