summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/bibletext/README.md6
-rw-r--r--Master/texmf-dist/doc/latex/bibletext/bibletext.pdfbin0 -> 136914 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bibletext/bibletext.tex60
-rw-r--r--Master/texmf-dist/tex/latex/bibletext/bibletext.sty41
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/bibletext.tlpsrc0
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
7 files changed, 109 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/bibletext/README.md b/Master/texmf-dist/doc/latex/bibletext/README.md
new file mode 100644
index 00000000000..69bc09e9b6c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bibletext/README.md
@@ -0,0 +1,6 @@
+# bible
+LaTeX bibletext package
+
+Copyright © 2016 Camil Staps. Licensed under MIT (see the LICENSE file).
+
+This is a LaTex package that allows you to insert Bible texts in a document by specifying references. Compile `bibletext.tex` to get the documentation.
diff --git a/Master/texmf-dist/doc/latex/bibletext/bibletext.pdf b/Master/texmf-dist/doc/latex/bibletext/bibletext.pdf
new file mode 100644
index 00000000000..6ee4947dfd0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bibletext/bibletext.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bibletext/bibletext.tex b/Master/texmf-dist/doc/latex/bibletext/bibletext.tex
new file mode 100644
index 00000000000..a7872894ad6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bibletext/bibletext.tex
@@ -0,0 +1,60 @@
+\documentclass[a4paper]{ltxguide}
+
+\usepackage[hidelinks]{hyperref}
+
+\title{Inserting Bible texts with the \textsf{bible} package}
+\author{Camil Staps\footnote{info@camilstaps.nl}}
+\date{Version 0.1\\2016-02-18}
+
+\usepackage{bibletext}
+
+\usepackage{framed}
+\usepackage{minted}
+\newenvironment{example}
+ {\VerbatimOut{\jobname.tmp}}
+ {\endVerbatimOut
+ \begin{framed}
+ \setlength{\parskip}{-10pt}
+ \inputminted[xleftmargin=-8pt]{latex}{\jobname.tmp}
+ \medskip
+ \input{\jobname.tmp}
+ \end{framed}}
+
+\begin{document}
+
+\maketitle
+
+\section{Introduction}
+This package allows you to add Bible texts by specifying references, rather than copying the text into the document.
+
+Under the hood, this uses the \texttt{bible} command, for which you need to install \texttt{bible-kjv}. This means that by default you will have the KJV translation. Because of the need for this package and other implementation details, this package won't work on Windows.
+
+\section{Examples}
+\begin{example}
+ \bibletext{Jn 1:1-2}
+\end{example}
+
+\begin{example}
+ \bibletext[ref=true]{Jn 1:1-2}
+\end{example}
+
+\begin{example}
+ \bibletext[ref=true,omitrepeatedchapter=true]{Jn 1:1-2}
+\end{example}
+
+\begin{example}
+ \bibletext[ref=true,omitchapter=true]{Jn 1:1-2}
+\end{example}
+
+\section{Future work}
+\begin{itemize}
+ \item When \verb$omitrepeatedchapter=true$, the chapter should again be outputted when a new chapter is begun.
+ \item The verse indications should be parsed and a \verb$\versefont$ command should be defined.
+ \item Implement the \verb$translation$ option to allow the writer to select a specific translation.
+\end{itemize}
+
+\section{Incompatibilities}
+The \textsf{bible} package needs to pipe shell commands, for which it needs to \verb$\DeleteShortVerb{\|}$. This means that you cannot use \verb$|foo|$ as shorthand for \verb$\verb|foo|$\footnote{Credits go to egreg on TeX.SE, \url{http://tex.stackexchange.com/q/294732/23992}.}.
+
+\end{document}
+
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
+
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 89b140b157b..7faac2aeb77 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -94,7 +94,7 @@ my @TLP_working = qw(
biblatex-source-division biblatex-subseries biblatex-swiss-legal
biblatex-trad biblatex-true-citepages-omit
bibleref bibleref-french bibleref-german bibleref-lds bibleref-mouth
- bibleref-parse
+ bibleref-parse bibletext
biblist bibtex bibtexperllibs bibtopic
bibtopicprefix bibexport bibunits
bidi bidi-atbegshi bidicontour bidihl
diff --git a/Master/tlpkg/tlpsrc/bibletext.tlpsrc b/Master/tlpkg/tlpsrc/bibletext.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/bibletext.tlpsrc
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index cf31f5a4768..3b02b175716 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -73,6 +73,7 @@ depend bewerbung
depend bez123
depend bezos
depend bhcexam
+depend bibletext
depend bigfoot
depend bigints
depend bizcard