summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-09-02 21:42:48 +0000
committerKarl Berry <karl@freefriends.org>2017-09-02 21:42:48 +0000
commitdbd8aabd96c560c57b1f6bce21b484468eb729e4 (patch)
tree8ba566a06cad9c5a87b139b74124245886d91137 /Master/texmf-dist
parent5ec14a45caec6cf280a15720b306cbfd85f45dca (diff)
bibletext (2sep17)
git-svn-id: svn://tug.org/texlive/trunk@45196 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/bibletext/LICENSE21
-rw-r--r--Master/texmf-dist/doc/latex/bibletext/bibletext.pdfbin136914 -> 139812 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bibletext/bibletext.tex58
-rw-r--r--Master/texmf-dist/tex/latex/bibletext/bibletext.sty80
4 files changed, 108 insertions, 51 deletions
diff --git a/Master/texmf-dist/doc/latex/bibletext/LICENSE b/Master/texmf-dist/doc/latex/bibletext/LICENSE
new file mode 100644
index 00000000000..38669306c23
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bibletext/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016-2017 Camil Staps
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Master/texmf-dist/doc/latex/bibletext/bibletext.pdf b/Master/texmf-dist/doc/latex/bibletext/bibletext.pdf
index 6ee4947dfd0..28324fe464b 100644
--- a/Master/texmf-dist/doc/latex/bibletext/bibletext.pdf
+++ 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
index a7872894ad6..d51f86acd80 100644
--- a/Master/texmf-dist/doc/latex/bibletext/bibletext.tex
+++ b/Master/texmf-dist/doc/latex/bibletext/bibletext.tex
@@ -2,59 +2,75 @@
\usepackage[hidelinks]{hyperref}
-\title{Inserting Bible texts with the \textsf{bible} package}
+\title{Typesetting Bible texts with the \textsf{bible} package}
\author{Camil Staps\footnote{info@camilstaps.nl}}
-\date{Version 0.1\\2016-02-18}
+\date{Version 0.1.2\\2017-09-01}
\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}}
+ {\VerbatimOut{\jobname.tmp}}
+ {\endVerbatimOut%
+ \begin{framed}
+ \setlength{\parskip}{-10pt}
+ \inputminted[gobble=8]{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.
+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.
+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.
+
+Because this package uses a binary program under the hood
+ (which is a potential security vulnerability),
+ you need to add the \texttt{-shell-escape} option to the command line arguments of your TeX processor.
+
+\section{Installation and source code}
+The \textsf{bible} package is available from CTAN: \url{https://ctan.org/pkg/bibletext}.
+The source code is on GitHub: \url{https://github.com/camilstaps/bibletext}.
\section{Examples}
\begin{example}
- \bibletext{Jn 1:1-2}
+ \bibletext{Jn 1:1-2}
\end{example}
\begin{example}
- \bibletext[ref=true]{Jn 1:1-2}
+ \bibletext[ref=true]{Jn 1:1-2}
\end{example}
\begin{example}
- \bibletext[ref=true,omitrepeatedchapter=true]{Jn 1:1-2}
+ \bibletext[ref=true,omitrepeatedchapter=true]{Jn 1:1-2}
\end{example}
\begin{example}
- \bibletext[ref=true,omitchapter=true]{Jn 1:1-2}
+ \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.
+ \item When \verb$omitrepeatedchapter=true$,
+ the chapter should again be outputted when a new chapter has 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}.}.
+The \textsf{bible} package needs to pipe shell commands,
+ for which it needs to do \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
index af777ac6784..21abb5a97de 100644
--- a/Master/texmf-dist/tex/latex/bibletext/bibletext.sty
+++ b/Master/texmf-dist/tex/latex/bibletext/bibletext.sty
@@ -1,41 +1,61 @@
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{bibletext}
- [2016/02/18 v0.1 Insert Bible texts]
+ [2017/09/01 v0.1.2 Insert Bible texts]
-\DeleteShortVerb{\|}
+\newif\ifbibletext@defined
+\bibletext@definedfalse
+\newcommand{\bibletext@checkdefined}[1]{%
+ \ifcsname#1\endcsname%
+ \bibletext@definedtrue%
+ \else%
+ \bibletext@definedfalse%
+ \fi%
+}
+
+\bibletext@checkdefined{DeleteShortVerb}
+\ifbibletext@defined%
+ \DeleteShortVerb{\|}%
+\fi
\RequirePackage{pgfkeys}
+\RequirePackage{pdftexcmds}
-\newif\ifbibletextRef
-\newif\ifbibletextOmitChapter
-\newif\ifbibletextOmitRepeatedChapter
+\newif\ifbibletext@Ref
+\newif\ifbibletext@OmitChapter
+\newif\ifbibletext@OmitRepeatedChapter
\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,
+ /bibletext/.is family, /bibletext,
+ default/.style={
+ translation=kjv,
+ ref=false,
+ omitchapter=false,
+ },
+ translation/.estore in = \bibletext@Translation, % unused for now
+ ref/.is if=bibletext@Ref,
+ omitchapter/.is if=bibletext@OmitChapter,
+ omitrepeatedchapter/.is if=bibletext@OmitRepeatedChapter,
}
\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%
+ \pgfkeys{/bibletext, default, #1}%
+ \ifbibletext@Ref%
+ \ifbibletext@OmitRepeatedChapter%
+ \input{|"bible -f '#2' | grep -o '[[:digit:]].*' | head -n1"}%
+ \input{|"bible -f '#2' | grep -o '[[:digit:]][[:digit:]]*[[:space:]].*' | tail -n+2"}%
+ \else\ifbibletext@OmitChapter%
+ \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%
+ \unskip%
}
-
+\AtEndOfPackage{
+ \ifnum\pdf@shellescape=1\relax\else
+ \PackageError{bibletext}
+ {You must invoke LaTeX with the -shell-escape flag}
+ {Pass the -shell-escape flag to LaTeX. Refer to the bibletext.sty
+ documentation for more information.}
+ \fi}
\endinput
-