panMagUseAa.sty

Parent Previous Next

This is a bad example of a .sty, hobbled together through Google searches! There are some latent errors in places, and superfluous code.


I am not a LateX or TeX guru by any means at all!


View it in TeXworks and use the tag Window.


\NeedsTeXFormat{LaTeX2e}

\ProvidesPackage{panMagUseAa}[2009/09/05 Misc commands]

\RequirePackage{setspace}

%

%: Drop Cap - Use As   \cappar Blah Dah De Blah

%\newcommand{\panyinipar}[1]{\par\noindent\paninitpar{#1}}

%\newcommand{\paninitpar}[1]{\setbox0=\hbox{{\fontfamily{times}\fontsize{30pt}{42pt}\selectfont #1}}%

%\hangindent=\wd0\hangafter=-4\advance\hangindent by .25em

%{\dimen@=-3\baselineskip

%\dimen@=\baselinestretch\dimen@

%\hskip-\wd0 \hskip-.25em

%\raisebox{\dimen@}[0pt][0pt]{\unhbox0}\hskip.25em}}

%

\font\capfont=cmbx12 at 40 pt % or yinit, or...?

\newbox\capbox \newcount\capl \def\a{A}

\def\docappar{\medbreak\noindent\setbox\capbox\hbox{\capfont\a\hskip0.05em}%

\hangindent=\wd\capbox%

\capl=\ht\capbox\divide\capl by\baselineskip\advance\capl by1\hangafter=-2%\capl%

\hbox{\vbox to10pt{\hbox to0pt{\hss\box\capbox}\vss}}}

\def\cappar{\afterassignment\docappar\noexpand\let\a }

%

%: \doDropCap

\newcommand{\doDropCap}[1]{

\def\dropcapLetter{\StrLeft{#1}{1}}

\def\restPlain{\StrGobbleLeft{#1}{1}}

\newdimen\holdbaselineskip

\setlength\holdbaselineskip{\baselineskip}

\setlength{\baselineskip}{24pt}

\setstretch{2.0}

\noindent  \cappar \dropcapLetter {\fontfamily{bch}\fontsize{12pt}{42pt}\selectfont \restPlain%

}

\setlength\baselineskip{\holdbaselineskip}\setstretch{1}

\par}

%: \RequirePackages

\RequirePackage{suffix}

\RequirePackage[greek, english]{babel}

\RequirePackage[OT1]{fontenc}% OT2

\RequirePackage{xkeyval}

\RequirePackage{calc}

\RequirePackage[svgnames, hyperref, x11names,rgb,usenames,table]{xcolor}

\RequirePackage{xifthen}

\RequirePackage{boolexpr} % SWITCH CASE

\RequirePackage{pgf}

\RequirePackage{xstring}

\RequirePackage[hyphens]{url}

\RequirePackage{boites,boites_exemples}

\RequirePackage{forarray}

%: --   hyperref stuff

%

\RequirePackage[bookmarks,bookmarksopen=true,colorlinks,breaklinks,hyperindex,pdfpagetransition=Glitter, backref=pages,hyperfootnotes=true, pageanchor,pagebackref=true,pdfdisplaydoctitle=true]{hyperref}

\renewcommand{\backrefxxx}[3]{%

\hyperlink{page.#1}{\textcolor[rgb]{.1,.2,.9}{ Pg. #1}}}

\urlstyle{tt}

%: \ReverseHeading Preamble

%

% \makeatletter

\define@boolkey{ReverseHeading}{subLine}[true]{\def\ReverseHeadingsubLine{#1}}

\define@key{ReverseHeading}{sublineWidth}

{\def\ReverseHeadingsublineWidth{#1}}

\define@key{ReverseHeading}{sublineStart}

{\def\ReverseHeadingsublineStart{#1}}

\define@boolkey{ReverseHeading}{putinToc}[true]{\def\ReverseHeadingputinToc{#1}}

\define@key{ReverseHeading}{logoA}

{\def\ReverseHeadinglogoA{#1}}

\define@key{ReverseHeading}{logoB}

{\def\ReverseHeadinglogoB{#1}}

\define@key{ReverseHeading}{logoC}

{\def\ReverseHeadinglogoC{#1}}

\define@key{ReverseHeading}{TopHeading}

{\def\ReverseHeadingTopHeading{#1}}

\define@key{ReverseHeading}{SubHeading}

{\def\ReverseHeadingSubHeading{#1}}

\savekeys{ReverseHeading}{logoA,logoB,logoC,TopHeading,SubHeading,subLine,putinToc,sublineWidth,sublineStart}

\presetkeys{ReverseHeading}%

{logoA=0,logoB=0,logoC=0,TopHeading=Type TopHeading,SubHeading=Type SubHeading,subLine,putinToc,sublineWidth=364.955703bp,sublineStart=14.255828bp}%

{}

%: ReverseHeading*

\newcommand*\ReverseHeading[2][]{%

\setkeys{ReverseHeading}{#1}%

{\vspace{15pt}

\ifthenelse{\boolean{\ReverseHeadingputinToc}}{%

%: -- Headings Footers TOC

\markright{\ReverseHeadingSubHeading}%

\phantomsection%

\addcontentsline{toc}{section}{\ReverseHeadingTopHeading}%

\sectionmark{\ReverseHeadingTopHeading}%

\phantomsection%

\addcontentsline{toc}{subsection}{\ReverseHeadingSubHeading}%

\subsectionmark{\ReverseHeadingSubHeading}%

\markright{\ReverseHeadingSubHeading}%

}{}%

\noindent\begin{pgfpicture}%{0bp}{0bp}{496.028168bp}{84.785092bp}

\begin{pgfscope}

\pgftransformcm{1.0}{0.0}{0.0}{1.0}{\pgfpoint{13.864171bp}{23.11675bp}}

% SUB HEADING UNDER A REVERSE

\pgftext[left,base]{\fontfamily{bch}\selectfont\itshape\Large

\color[rgb]{0.0,0.0,0.0}\makebox[\textwidth][c]{\ReverseHeadingSubHeading}}

\end{pgfscope}

\begin{pgfscope}

\pgfsetlinewidth{1.1200000047683716bp}

\pgfsetrectcap

\pgfsetmiterjoin \pgfsetmiterlimit{10.0}

% Topheading reverse whjite on darkgray

\pgfpathmoveto{\pgfpoint{0.56bp}{81.225093bp}}

\pgfpathlineto{\pgfpoint{0.56bp}{49.333437bp}}

\pgfpathlineto{\pgfpoint{495.468156bp}{49.333437bp}}

\pgfpathlineto{\pgfpoint{495.468156bp}{81.225093bp}}

\pgfpathlineto{\pgfpoint{0.56bp}{81.225093bp}}

\pgfclosepath

\color[rgb]{0.5,0.5,0.5}\pgfseteorule\pgfusepath{fill}

% Topheading revers whjite on darkgray

\pgfpathmoveto{\pgfpoint{0.56bp}{81.225093bp}}

\pgfpathlineto{\pgfpoint{0.56bp}{49.333437bp}}

\pgfpathlineto{\pgfpoint{495.468156bp}{49.333437bp}}

\pgfpathlineto{\pgfpoint{495.468156bp}{81.225093bp}}

\pgfpathlineto{\pgfpoint{0.56bp}{81.225093bp}}

\pgfclosepath

\color[rgb]{0.5,0.5,0.5}

\pgfusepath{stroke}

\end{pgfscope}

\begin{pgfscope}

\pgftransformcm{1.0}{0.0}{0.0}{1.0}{\pgfpoint{12.168343bp}{59.11675bp}}

\pgftext[left,base]{\fontfamily{bch}\selectfont\bfseries\LARGE%\slshape

\color[rgb]{1.0,1.0,1.0}\ReverseHeadingTopHeading}

\end{pgfscope}

\ifthenelse{\equal{\ReverseHeadinglogoA}{0}}{}{%

\begin{pgfscope}

\pgftransformcm{0.5}{-0.0}{0.0}{0.5}{\pgfpoint{370.53914bp}{37.5bp}}

\pgfputat{\pgfpoint{0pt}{0pt}}{\pgftext[top,left]{\pgfimage{\ReverseHeadinglogoA}}}

\end{pgfscope}%

}%

\ifthenelse{\equal{\ReverseHeadinglogoB}{0}}{}{\begin{pgfscope}

\pgftransformcm{0.5}{-0.0}{0.0}{0.5}{\pgfpoint{413.876625bp}{37.5bp}}

\pgfputat{\pgfpoint{0pt}{0pt}}{\pgftext[top,left]{\pgfimage{\ReverseHeadinglogoB}}}

\end{pgfscope}%

}%

\ifthenelse{\equal{\ReverseHeadinglogoC}{0}}{}{\begin{pgfscope}

\pgftransformcm{0.5}{-0.0}{0.0}{0.5}{\pgfpoint{457.214109bp}{37.5bp}}

\pgfputat{\pgfpoint{0pt}{0pt}}{\pgftext[top,left]{\pgfimage{\ReverseHeadinglogoC}}}

\end{pgfscope}%

}%

\ifthenelse{\boolean{\ReverseHeadingsubLine}}{\begin{pgfscope}

\pgfsetlinewidth{1.4943959712982178bp}

\pgfsetrectcap

\pgfsetmiterjoin \pgfsetmiterlimit{10.0}

\pgfpathmoveto{\pgfpoint{\ReverseHeadingsublineStart}{8.995953bp}}%14.255828bp

\pgfpathlineto{\pgfpoint{\ReverseHeadingsublineWidth}{8.995953bp}}

\color[rgb]{0.0,0.0,0.0}\pgfseteorule\pgfusepath{fill}

\pgfpathmoveto{\pgfpoint{\ReverseHeadingsublineStart}{8.995953bp}}%14.255828bp

\pgfpathlineto{\pgfpoint{\ReverseHeadingsublineWidth}{8.995953bp}}

\color[rgb]{0.25,0.25,0.25}

\pgfusepath{stroke}

\end{pgfscope}

}{}

\end{pgfpicture}

\par

\ifthenelse{\boolean{\ReverseHeadingsubLine}}{}{\vspace{10pt}}

\ifthenelse{\equal{#2}{}}{\vspace{4pt}\noindent}{

\def\dropcapLetter{\StrLeft{#2}{1}}

\def\restPlain{\StrGobbleLeft{#2}{1}}

\newdimen\holdbaselineskip

\setlength\holdbaselineskip{\baselineskip}

\setlength{\baselineskip}{16pt}

\noindent  \cappar \dropcapLetter {\fontfamily{bch}\fontsize{12pt}{36pt}\selectfont \restPlain}

\setlength\baselineskip{\holdbaselineskip}

\par}

}

}

%\makeatother

\RequirePackage{xkeyval}

%

% \makeatletter

\newdimen\shadowsize

\define@boolkey{Fbox}{frame}[true]{}

\define@boolkey{Fbox}{shadow}[true]{}

\define@key{Fbox}{framecolor}%

{\def\Fboxframecolor{#1}}

\define@key{Fbox}{shadowcolor}%

{\def\Fboxshadowcolor{#1}}

\define@key{Fbox}{framesize}%

{\setlength\fboxrule{#1}}

\define@key{Fbox}{shadowsize}%

{\setlength\shadowsize{#1}}

\savekeys{Fbox}{frame,framecolor,framesize}

\presetkeys{Fbox}%

{frame,framecolor=black,framesize=0.5pt}%

{shadow=\usevalue{frame},

shadowcolor=\usevalue{framecolor}!40,

shadowsize=\usevalue{framesize}*4}

\newcommand*\Fbox[2][]{%

\setkeys{Fbox}{#1}%

{\ifKV@Fbox@frame\else\fboxrule0pt\fi

\ifKV@Fbox@shadow\else\shadowsize0pt\fi

\sbox0{\fcolorbox{\Fboxframecolor}{white}{#2}}%

\hskip\shadowsize

\color{\Fboxshadowcolor}%

\rule[-\dp0]{\wd0}{\ht0+\dp0}%

\llap{\raisebox{\shadowsize}%

{\box0\hskip\shadowsize}}}%

}

%\makeatother

%

%

%: BoldColSubHd

\newcommand{\BoldColSubHd}[1]{

\vspace{5pt}

\phantomsection%

\addcontentsline{toc}{subsection}{#1}\subsectionmark{#1}%

\noindent \begin{center}\begin{minipage}[c]{\columnwidth}\LARGE\textbf{#1} \end{minipage}\end{center}\\[5pt]

}

%: FootNote struff

%

% \setFooteNoteFont

\newcommand{\setFootNoteFont}{\setstretch{0.89}\fontsize{9}{7}\selectfont\itshape}%

%

%:       \RequirePackage{endnotes}

\RequirePackage{endnotes}

%:       \let\footnote=\endnote

\let\footnote=\endnote

%:       \RequirePackage{footmisc}

\RequirePackage{footmisc}

\renewcommand\footnotelayout{\setFootNoteFont}

%

%: -- reset endnotes

%\makeatletter

%from endnotes.sty ADDED: [pg \thepage] as below

\long\def\@endnotetext#1{%

    \if@enotesopen \else \@openenotes \fi

    \immediate\write\@enotes{\@doanenote{\@theenmark ,\ Pg \thepage}}

     \begingroup

       \def\next{\setFootNoteFont #1}

       \newlinechar='40

       \immediate\write\@enotes{\meaning\next}%

    \endgroup

    \immediate\write\@enotes{\@endanenote}}

%\makeatother

%

%: Notes width etc

%

%:            \notesWidth \noteGap

\newcommand{\notesWidth}{8.2cm}%

%

\newcommand{\noteGapOffset}{-0.8mm}%

%

%:            \plainNote

\newcommand{\plainNote}[1]{% no url or heading or caption pre-set, all user controlled

\footnote{\begin{samepage}\vspace{\noteGapOffset}\setFootNoteFont\\\parbox[t]{\notesWidth}{\ #1 \\}\setstretch{1.0}\end{samepage}}%

}%

%

%:             \urlNote

\newcommand{\urlNote}[2]{%url then Note

\href{#1}{#2}\footnote{\begin{samepage}\vspace{\noteGapOffset}\setFootNoteFont\\\parbox[t]{\notesWidth}{\ #2 \\ {\url{#1}}}\setstretch{1.0}\end{samepage}}%

}%

%:             \urlCaption

\newcommand{\urlCaption}[2]{%url then Caption

\href{#1}{#2}\footnote{\begin{samepage}\vspace{\noteGapOffset}\setFootNoteFont\\\parbox[t]{\notesWidth}{\ \bf #2} \\ \url{#1}}\setstretch{1.0}\end{samepage}%

}%

%:             \urlCaptionNote

\newcommand{\urlCaptionNote}[3]{% #1 - url, #2 - Caption, #3 -  Note

\href{#1}{#2}\footnote{\begin{samepage}\vspace{\noteGapOffset}\setFootNoteFont\\\parbox[t]{\notesWidth}{\ {\bf #2}\\ \\{\it #3} \\ {\url{#1}}}\setstretch{1.0}\end{samepage}}%

}%

%:             \captionNote

\newcommand{\captionNote}[2]{% #1 - Caption, #2 -  Note

\footnote{\begin{samepage}\vspace{\noteGapOffset}\setFootNoteFont\\\parbox[t]{\notesWidth}{\ {\bf #1}\\ \\ \textit{#2}}\setstretch{1.0}\end{samepage}}%

}%

%:             \captionCentredNote

\newcommand{\captionCentredNote}[2]{% #1 - Caption, #2 -  Note

\noindent\begin{center}{\bf #1}\captionNote{#1}{#2}

\end{center}%

}        

%: -- \internalLink

%

\newcommand{\internalLink}[2]{% makes footnote text sized link to #1 {\label} #2 {shown text}

\hyperref[#1]{\textcolor{DodgerBlue4}{\footnotesize \textsc{#2}}\ref*{#1}}

}

%: electronic or printed \livePdfPrinted{#1 - live pdf version}{#2 - printed version}

\newcommand{\electronicPdf}{yes}% if wanted - \renewcommand{\electronicPdf}{no} in document preamble

\newcommand{\electronicOrPrinted}[2]{

\ifthenelse{\equal{\electronicPdf}{yes}}{#1}{#2}%

}

%:

%: -- Packages --

%:

\RequirePackage{minitoc}

\RequirePackage{eso-pic}

\RequirePackage{everyshi}

\RequirePackage{pdfpages}

\RequirePackage{framed}

%: fullRef

\newcommand{\fullref}[1]{\ref{#1} on page~\pageref{#1}}%

%: Colour Bible Verses

%:                 Count Verses

\newcommand{\twScriptPhp}[1]{/LaTeXPortable/LatexUtils/TeXworks/TeXworks/config/scripts/PHPtexworks/#1}

% See script helper_twPan.mod   bibleNamesAbrvs :  [...] and macro in here %:                 \showBibleVerseCount

\newcounter{versesCount}

%:       Package bibleref

\RequirePackage{bibleref}

%:                \bibleFontText

\newcommand{\bibleFontText}[1]{``{\fontfamily{ppl}\fontsize{10.25pt}{11pt}\selectfont \textit{#1}}''}% double quoted

%

%:                \bibleNumeral

\def\BibleVersion#1{\global\def\bibleVersion{#1}}% for 2nd \stepcounter statement below

%

%\global\def\versionList{UNSP,WEB,NKJV,NET,RSV,OLB,NIV2011,NIV,MKJV,KJV,JPS,ISV,AMP}%

\immediate\write18{php "\twScriptPhp{getBibleAbrsCommaList.php}" >  getBibleAbrvs.txt}

%

%\global\def\versionList{\input{getBibleAbrvs.txt}}%

%\newcommand{\versionListComma{\input{getBibleAbrvs.txt}}}%

%\global\def\versionList{\versionListComma}%

\RequirePackage{catchfile}%

\CatchFileDef{\versionList}{getBibleAbrvs.txt}{}

%

%

%\newcommand{\makeCounters}{%

\@for\val:=\versionList\do{%

\newcounter{ver\val}%

}

%}

%

\newcommand{\bibleAbr}[1]{% helper function

\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #1}%

%

\newcommand{\checkVersion}[1]{% helper function

\@for\val:=\versionList\do{%

\IfSubStr{#1}{\val}{\global\let\bibleVersion\val}{}%

}

}%

%:                \addVerses

\newcommand{\addVerses}[2]{% #1 - version e.g. NIV , #2 - how many verses

% Used when \bibleNumeral type of macro can not be used for one reason or another

\addtocounter{ver#1}{#2}

\addtocounter{versesCount}{#2}

}

\newcounter{refLength}%

%

% This one is used for when we do not want to count the verses as they have been used already and counted in.

\newcommand{\bibleNumeralColour}[1]{\textcolor{bibleNumeral}{\textbf{#1}}}

%:  \bibleNumeralDuplicate

\newcommand{\bibleNumeralDuplicate}[1]{\textcolor{bibleNumeral}{\textbf{#1}}

%: index to bible

% xstrings package \IfSubStr

\IfSubStr{#1}{---}{\index{bible}{\cleanIndexEntry{#1}{-}}}{

\IfSubStr{#1}{:}{% a Bible reference - so add to bible index

\index{bible}{#1}

}{}%

}%

}%

%

% This one counts the verses used and if necessary first sets the version if that is named in the line e.g. NIV

%

\newcommand{\bibleNumeral}[1]{\textcolor{bibleNumeral}{\textbf{#1}}%

\processNumeral{#1}%

}

%

\newcommand{\bibleNumeralPlain}[1]{\textbf{#1}%

\processNumeral{#1}%

}

%

% Helper

\newcommand{\processNumeral}[1]{

\stepcounter{versesCount}%

%: index to bible

% xstrings package \IfSubStr

\IfSubStr{#1}{---}{\index{bible}{\cleanIndexEntry{#1}{-}}}{

\IfSubStr{#1}{:}{% a Bible reference - so add to bible index

\index{bible}{#1}

}{}%

}%

% selects/sets the current counter for verse counting and remains same until changed here again-

\checkVersion{#1}%

%

% So each call of \bibleNumeral will use current \bibleVersion to count verse versions

\stepcounter{ver\bibleVersion}% I was surprised this worked it must fully expand - was using a switch statement

%

}%

%:                \showBibleVerseCount  #1 - Extra un-Tabulated #2 - known doubleups and non copyright verses

% See script helper_twPan.mod   bibleNamesAbrvs :  [...] and list in here %:                 Count Verses

\newcommand{\showBibleVerseCount}[2]{%

\addtocounter{versesCount}{#1}%

\addtocounter{versesCount}{#2}%

\noindent{\scriptsize \textit{Total Bible Verse Count Estimate for Copyright Requirements (may include double ups):} \arabic{versesCount}%

} \\

Version---Verse Count Estimate for Copyright Requirements\\ (may include some double ups):\\*[16pt]

\newcounter{totaledVerses}%

\@for\val:=\versionList\do{%

\addtocounter{totaledVerses}{\value{ver\val}}%

}

\newcounter{otherVersions}%

\setcounter{otherVersions}{\value{versesCount}}

\addtocounter{otherVersions}{-\value{totaledVerses}}

\begin{tabular}{rcr}

% getBibleNameAbrvasTabeLine.php

%\versionList

\@for\val:=\versionList\do{%

\ifthenelse{\value{ver\val}>0}{%

\immediate\write18{php "\twScriptPhp{getBibleNameAbrvasTabeLine.php}"  "\val"  >  getBibleNames\val.txt}

\input{getBibleNames\val.txt}}{}}%

\ifthenelse{\value{verotherVersions}>0}{Other Versions & \dots &\arabic{otherVersions}\\}{}

&&\uline{ \ \ \ \ \ \ \ }\\*[2pt]

&\textbf{Total: }&\uuline{\arabic{totaledVerses}}\\

\end{tabular}

}

%:                \bibleVerse

\newcounter{pl}%

\newcommand{\bibleVerse}[4]{% title, columns, verses, toc entry

% \definecolor{shadecolor}{named}{Ivory2} //Above\\

\definecolor{shadecolor}{named}{bibleBack}

\ifthenelse{\equal{#4}{}}{}{\phantomsection%

\addcontentsline{toc}{subsubsection}{\textsc{#4}}}

\begin{shaded}\protect\begin{samepage}%

\begin{center}\large{\textsc{#1}}\end{center}%

\nopagebreak%

\stepcounter{pl}\label{pl-\thepl}%

\ifthenelse{\isodd{\pageref{pl-\thepl}}}%

{\dtpvpos{1mm}{-16mm}{\magScrollxiimm}}% from dtp.sty

{\dtpvpos{158mm}{-14mm}{\magScrollxiimmRev}}%

\vspace{-3mm}%

\ifthenelse{\equal{#2}{1}}{}{\begin{multicols}{#2}}%  


\setstretch{0.94}\begin{verse}

{\fontfamily{ppl}\fontsize{10.25pt}{12pt}\selectfont  

#3}%

\end{verse}

%

\ifthenelse{\equal{#2}{1}}{}{\end{multicols}}%  

\setstretch{1}%

\protect\end{samepage}\end{shaded}%                    

}% end \bibleVerse

%

%:      \bibleAllUsedCopyrights    \bibleCopyright{ useabreviation from MySql/bible_ref/bibles/Abbr}    and    \bibleAllUsedCopyrights does all were verse count above zero

\newcommand{\bibleAllUsedCopyrights}{%

\@for\val:=\versionList\do{%

\ifthenelse{\value{ver\val}>0}{\bibleCopyright{\val}}{}% // some verses from this bible version

}}

%

\newcommand{\bibleCopyright}[1]{

\immediate\write18{php "\twScriptPhp{doBibleInfo.php}"  "copyright" "#1" "Abbr"  >  getScripturePermissions#1.txt}

\input{getScripturePermissions#1.txt}}

%

%:          \bibleListAllAbrvsNamesCopyrights  backup-archival purposes

\newcommand{\bibleListAllAbrvsNamesCopyrights}{


\@for\val:=\versionList\do{%

\begin{tabular}{rcr}

\immediate\write18{php "\twScriptPhp{getBibleNameAbrvasTabeLine.php}"  "\val"  >  getBibleNames\val.txt}%

\input{getBibleNames\val.txt}

\end{tabular}\\%

%\immediate\write18{php "\twScriptPhp{doBibleInfo.php}"  "http" "\val" "Abbr"  >  getScriptureUrl.txt}

%\url{\input{getScriptureUrl.txt}}\\*[3pt]

\immediate\write18{php "\twScriptPhp{doBibleInfo.php}"  "copyright" "\val" "Abbr"  >  getScripturePermissions\val.txt}

\input{getScripturePermissions\val.txt}

}%


}

%:  \indentBible Range

%:                  \indentBible  NO extra right edge background

\newcommand{\indentBible}[1]{% indents and leaves a bit at end of block

\noindent\colorbox{bibleBack}{\hspace{0.025\columnwidth}\parbox{0.87\columnwidth}%bodoni

{\fontfamily{anttlc}\fontsize{10.5pt}{11.25pt}\selectfont #1}\hspace{0.025\columnwidth}}%

\vspace{-0.85mm}}

%

%:                  \indentBible* with extra right edge background - #1}\hspace{0.05\columnwidth}

% suffix package

\WithSuffix\newcommand\indentBible*[1]{% indents and leaves a bit at end of block

\noindent\colorbox{bibleBack}{\hspace{0.05\columnwidth}\parbox{0.87\columnwidth}{\fontfamily{anttl}\fontsize{10.5pt}{11.25pt}\selectfont #1\vspace*{0.007\columnwidth}}\hspace{0.025\columnwidth}}%

\vspace{-0.85mm}}

%

%:                  \indentAlone

\newcommand{\indentAlone}[1]{% sets up with no heading or border \indentBible chunk/verse(s)


\vspace*{10pt}

#1

\\*[3pt]


\noindent }

%:                  \indentPlain

\newcommand{\indentPlain}[1]{% indents and leaves a bit at end of block

\vspace*{1mm}%

\noindent\colorbox{plainBack}{\hspace{0.05\columnwidth}\parbox{0.87\columnwidth}%gfsartemisia-euler ptm ppl

{\fontfamily{ptm}\fontsize{10.5pt}{11.75pt}\selectfont #1\vspace*{0.007\columnwidth}}\hspace{0.025\columnwidth}}%

\vspace{-0.85mm}}

%

%:                \bibleHeading

\newcommand{\bibleHeading}[1]{\textbf{\textsc{\textcolor{bibleHeading}{#1}}}%

\index{bible}{#1}}%

%

%:       \strongsRef

%\strongsRef #1 - number, #2 - Heading/Title/Word, #3 - information

\newcommand{\strongsRef}[3]{\textnormal{\textbf{Strongs} \bibleNumeral{#1} #2\\

\indentPlain{#3}}}

%

%:                \bibleVersePar

% {Heading-Reference}{verses - newline each}{toc entry or blank}{if toc, then level 1,2,3 (section -> subsubsection)}{ref - NIV ...}

\def\SectionVal#1{\def\sectionVal{#1}}%

\newcommand{\bibleVersePar}[5]{

\ifthenelse{\equal{#3}{}}{}{%

\switch[\pdfstrcmp{#4}]%

\case{{1}}\SectionVal{section}%

\case{{2}}\SectionVal{subsection}%

\case{{3}}\SectionVal{subsubsection}%

\otherwise%        

\endswitch%

\vspace*{0.06\columnwidth}

\phantomsection\addcontentsline{toc}{\sectionVal}{\textsc{#3}}%

}% end conditonial toc entry

\begin{boitecoloriee}\setstretch{0.92}

\noindent\colorbox{biblePanels}{\hspace{0.05\columnwidth}\parbox{0.870\columnwidth}{\fontfamily{ppl}\fontsize{10.45pt}{12pt}\selectfont%  

\begin{center}\bibleHeading{#1}\end{center}}}\nopagebreak\vspace*{-1.5mm}\nopagebreak#2%

\setstretch{1}%

%\indentBible{\byLine{\textcolor{bibleRef}{#5}}}

\colorbox{biblePanels}{\parbox{0.92\columnwidth}{\vspace*{0.03\columnwidth}\hfill\textcolor{bibleRef}{#5}}}

\end{boitecoloriee}\vspace*{0.06\columnwidth}\noindent%

%:  Index Bible

\index{bible}{#1}}%

%: end  \bibleVersePar

%

%: Colour Blocks

%:           \colourBlock used in \item lists

\newlength{\blockWidth}

\newcommand{\colourBlock}[3]{

% colour, width, text (width can be empty defaults to :

\ifthenelse{\equal{#2}{}}{\setlength{\blockWidth}{0.82\columnwidth}}{\setlength{\blockWidth}{#2}}

\colorbox{#1}{\parbox[t]{\blockWidth}{#3}}}

%: indexHere

\newcommand{\indexHere}[1]{\index{#1} #1}

\DeclareGraphicsExtensions{.pdf,.png,.jpg}%

%: byLine

\newcommand{\byLine}[1]{\begin{flushright}

\small #1

\end{flushright}\\%

}%

%: Set Spaces  dimensions

%: Graphics Related

%:     \ScaleIfNeeded  http://ctan.unsw.edu.au/info/l2picfaq/german/l2picfaq.pdf  GNU doc 1.2 http://texblog.wordpress.com/category/latex/

% Usage: \includegraphics[width=\ScaleIfNeeded]{Bild}

\def\ScaleIfNeeded{%

\ifdim\Gin@nat@width>\linewidth

\linewidth

\else

\Gin@nat@width

\fi

}

%

\RequirePackage[absolute]{textpos}

%: pictOneCol

\newcommand{\pictOneCol}[4]{% {pict.png.pdf,jpg}{quote text -optional}{brief description/caption}{copyright info}

%\rule{\columnwidth}{1pt}%

\vspace*{1mm}

\noindent

\begin{minipage}{\columnwidth}

\begin{center}

\includegraphics[width=\ScaleIfNeeded]{#1}  

\\*[2mm]  

\parbox[t]{0.92\columnwidth} {

\ifthenelse{\equal{#2}{}}{}{#2}%

       \begin{flushright}\urlCaptionNote{}{\textsc{\protect\small{#3}}}{#4 }\end{flushright}}% end \parbox

\end{center}%

\vspace{-3.2mm}%

\rule{\columnwidth}{1pt}

\end{minipage}

%\vspace{-1.2mm}%

\\*[1mm]

}

%

%: pictTwoCol

\newcommand{\pictTwoCol}[4]{% {pict.png.pdf,jpg}{quote text -optional}{brief description/caption}{copyright info}

\noindent% \rule{\columnwidth}{1pt}

\begin{center}

\includegraphics[width=\ScaleIfNeeded]{#1}  

\\*[2mm]  

\begin{minipage}[t]{0.92\columnwidth}  

\ifthenelse{\equal{#2}{}}{}{#2}%

       \begin{flushright}\urlCaptionNote{}{\textsc{\protect\small{#3}}}{#4 }\end{flushright}  

\end{minipage}

\end{center}

%\vspace{-1.2mm}%

%\rule{\columnwidth}{1pt}

\\*[1mm]%

}

%

%: Other

 %:  \thiswidth \thisheight

\newlength{\thiswidth}%

\newlength{\thisheight}%

\setlength{\thiswidth}{0pt}%

\setlength{\thisheight}{0pt}%

\newlength{\storedwidth}%

\newlength{\storedheight}%

%:      \makewidth

\newcommand{\makewidth}[1]{% measures but no text  insert

\setlength{\storedwidth}{\thiswidth}%

\settowidth{\thiswidth}{#1}}%

%:      \makeheight

\newcommand{\makeheight}[1]{% measures but no text  insert

\setlength{\storedheight}{\thisheight}%

\settoheight{\thisheight}{#1}}%

\newcommand{\makewidthShow}[1]{% measures and inserts text in place

\setlength{\storedwidth}{\thiswidth}%

\settowidth{\thiswidth}{#1}#1}%

%:      \makeheight

\newcommand{\makeheightShow}[1]{% measures and inserts text in place

\setlength{\storedheight}{\thisheight}%

\settoheight{\thisheight}{#1}#1}%

%:      \insertwidth{}

\newcommand{\insertwidth}[1]{

\makewidth{#1}%

\hspace*{\thiswidth}%

}%

%:      \insertheight{}

\newcommand{\insertheight}[1]{

\makeheight{#1}%

\vspace*{\thisheight}%

}%

%:      \insertstrut{}

\newcommand{\insertstrut}[1]{

\makeheight{#1}%

\mbox{0}{\thisheight}%

}%

%: \textReuse

%  #1- new command name e..g.  \tRmyAddress, #2 - text or other contents  

%%  #3 - =show for first Appearance or not where you define it (must be before first re-use)

% from then on use \tRmyAddress whereever you want it repeated

\newcommand{\textReuse}[2]{\def#1{#2}}%

%\ifthenelse{\equal{#3}{show}}{ #2}{}}% whether to show it in the document when/where defined first time

%: mainStory

\newcommand{\mainStory}[1]{{\fontfamily{bch}\fontsize{12pt}{14pt}\selectfont\noindent #1}}%

%: Headings

%:             centreHead

\newcommand{\centreHead}[3]{

\vspace{3mm}

{\centering\fontfamily{bch}\fontsize{#1pt}{#2pt}\selectfont\noindent #3\\[2mm]}


\ifthenelse{#1<15}{\phantomsection\addcontentsline{toc}{subsubsection}{#3}\subsectionmark{#3}}{}%

\ifthenelse{#1=15}{\phantomsection\addcontentsline{toc}{subsection}{#3}\subsectionmark{#3}}{}%

\ifthenelse{#1>15}{\phantomsection\addcontentsline{toc}{section}{#3}\sectionmark{#3}}{}%

%\phantomsection\addcontentsline{toc}{subsection}{#3}\subsectionmark{#3}

}

%:             centreHeadToc

\newcommand{\centreHeadToc}[4]{

\vspace{3mm}

{\centering\fontfamily{bch}\fontsize{#1pt}{#2pt}\selectfont\noindent #3\\[2mm]}

% \SectionVal defined in \bibleVersePar

\ifthenelse{\equal{#3}{}}{}{%

\switch[\pdfstrcmp{#4}]%

\case{{1}}\SectionVal{section}\subsectionmark{#3}\sectionmark{#3}\subsectionmark{#3}%

\case{{2}}\SectionVal{subsection}\subsectionmark{#3}%sub

\case{{3}}\SectionVal{subsubsection}\subsectionmark{#3} %sub

\otherwise%        

\endswitch%

\phantomsection\addcontentsline{toc}{\sectionVal}%{\ifthenelse{\equal{\pdfstrcmp{#4}}{1}}{\textsc{#3}}{#3}}%

{#3}

}% end conditonial toc entry\sectionmark{#3}}{}%

%\phantomsection\addcontentsline{toc}{subsection}{#3}\subsectionmark{#3}

}

%

%: quotePerson

\newcommand{\quotePerson}[1]{\\[\baselineskip]

\hspace*{0.05\columnwidth}\begin{minipage}[t]{0.9\columnwidth}\fontfamily{pplr}\fontsize{11pt}{14pt}\selectfont\noindent\linespread{1.05}  #1\end{minipage}\vspace{1mm}}%

%from http://anthony.liekens.net/index.php/LaTeX/SubscriptAndSuperscriptInTextMode

%: super/sub shorts CO2

\newcommand{\superscript}[1]{\ensuremath{^{\textrm{#1}}}}

\newcommand{\subscript}[1]{\ensuremath{_{\textrm{#1}}}}

\newcommand{\Cgass}{CO\subscript{2} }

\newcommand{\smallgod}{{\footnotesize `god' }}

%: addToc

\newcommand{\addToc}[2]{

\phantomsection

\ifthenelse{\equal{#2}{1}}{\phantomsection\addcontentsline{toc}{section}{#1}

\sectionmark{#1}}{}

\ifthenelse{\equal{#2}{2}}{\phantomsection\addcontentsline{toc}{subsection}{#1}\subsectionmark{#1}}{}

\ifthenelse{\equal{#2}{3}}{\phantomsection\addcontentsline{toc}{subsubsection}{#1}\subsubsectionmark{#1}}{}

}

%: magfollow

\newcommand{\magfollow}{``Following Jesus''}

%

%: newCols

\newcommand{\newCols}[1]{\end{multicols}

\begin{multicols}{#1}}

%: centreRule

\newcommand{\centreRule}{

\begin{center}\rule{7cm}{1pt}\end{center}

\\}

%: boxCentred #1 text #2 Colour

\newcommand{\boxCentred}[2]{\vspace{1mm}

\begin{center}\protect\framebox[0.797\textwidth][t]{\hspace*{0mm}{\fboxsep 3mm\colorbox{#2}{\parbox{0.75\textwidth}{\fontfamily{bch}\fontsize{12pt}{14pt}\selectfont\textit #1\\*[1mm]}}}}

\vspace*{2mm}\end{center}}

%

\RequirePackage{dtp}% local sty some Destop Publishing macros

%\RequirePackage{kdgreek}

%: Greek Stuff

%: ==font stuff

%\usepackage{palatinox}

\usepackage{iwona}%kurier

%----------------------------------------------------

% Greek Keyboard Shortcuts

\newcommand {\gt}{\greektext} %Set the language from now on

\newcommand {\lt}{\latintext}

\newcommand {\tg}{\textgreek} %Next argument will be the language you set.

\newcommand {\tl}{\textlatin}

%: == font package

\RequirePackage{mathptmx} % Times

%: \showGreek \bothGreek \fontfamily{kurier}\fontencoding{OT2}\selectfont

\newcommand{\showGreek}[1]{{\usefont{OT2}{iwona}{m}{b}\greektext #1}}

\newcommand{\bothGreek}[1]{#1 -- \showGreek{#1}}%{\usefont{OT2}{iwona}{m}{b}\greektext #1}

%: Cardinals

% #1 Heading - can be blank, cardinals #2 - text, #3 - byline, #4 Img, #5 - ImgRev

\newcommand{\giftS}{UK Cardinals' \textit{``The Gift of Scripture''} }

\newcounter{cardnl}%

\newcommand{\cardinals}[5]{\setlength{\columnseprule}{1pt}%

\setstretch{0.92}%

\begin{quote}\begin{multicols}{2}%

\ifthenelse{\equal{#1}{}}{}{

{\centering\fontfamily{bch}\fontsize{13pt}{15pt}\selectfont\noindent #1\\[2mm]}

\phantomsection\addcontentsline{toc}{subsubsection}{#1}\subsectionmark{#1}}%

%

%

\stepcounter{cardnl}\label{cardnl-\thecardnl}%

\ifthenelse{\isodd{\pageref{cardnl-\thecardnl}}}%

{\dtpvpos{159mm}{-2mm}{#5}}%

{\dtpvpos{-16mm}{2mm}{#4}}% from dtp.sty

#2

\ifthenelse{\equal{#3}{}}{\byLine{\textcolor{red}{ref needed}}}{ \byLine{{\fontsize{9.5pt}{12pt}\selectfont#3}}}%

\end{multicols}\end{quote}

\setstretch{1}

\setlength{\columnseprule}{0pt}%

}

%\newcommand{\cardinals}[5]{#1 #2 #3 #4 #5 } % for debugging



%: goodQuote Environement

\newenvironment{goodQuote}{\definecolor{shadecolor}{named}{LightYellow1}\begin{shaded}\begin{multicols}{2}\begin{quote}}{\end{quote}\end{multicols}\end{shaded}}

%: various adjustment settings

%: 1. margin notes

\setlength{\marginparsep}{15mm}

\reversemarginpar

%: 2. Widows orphans

\widowpenalty=300

\clubpenalty=300

%: Shading

%:   Colours as \defines and \commands

%: table shades

\definecolor{tableiTunes}{HTML}{F1F5FA}   %iTunes

\definecolor{tableFinder}{HTML}{ECF3FE} %Finder

%\def\rangeGray{99}

\definecolor{bibleBack}{HTML}{ECF3FE}%{gray}{0.89}%0.98964

\definecolor{plainBack}{rgb}{0.94901, 0.94901, 0.92156} % HTML CCCC99 Ivory1

\definecolor{bibleParaMark}{named}{IndianRed4}

%\definecolor{bibleNumeral}{named}{DarkSeaGreen4}

\definecolor{bibleNumeral}{named}{SteelBlue4}

\definecolor{bibleHeading}{named}{DarkSeaGreen4}

\definecolor{bibleRef}{named}{DarkSeaGreen4}

\definecolor{biblePanels}{rgb}{0.91372, 0.94117, 1}

% http://www.cv-templates.info/2009/07/alternate-row-shading-latex/

\newcommand{\colourUN}{AliceBlue}

\newcommand{\colourBad}{MistyRose1}

%: \backColourBlock   #1 - Colour (named) , #2 - Text Block

\newcommand{\backColourBlock}[2]{\definecolor{shadecolor}{named}{#1}\begin{shaded}

#2

\end{shaded}}

%

%: Logos and placement

%

%: Placement

\newcounter{placelogo}\setcounter{placelogo}{1}%

%

\newcommand{\placeLogo}[4]{% #1 odd pages logo, #2 odd x axis, #3 even pages logo, #4 even x axis

\stepcounter{placelogo}\label{here-\theplacelogo}%

\ifthenelse{\isodd{\pageref{here-\theplacelogo}}}%

{\ifthenelse{\equal{#2}{}}{\dtpvpos{-3mm}{-12mm}{#1}}{\dtpvpos{-8mm}{#2}{#1}}}%

{\ifthenelse{\equal{#4}{}}{\dtpvpos{-3mm}{-12mm}{#3}}{\dtpvpos{-8mm}{#4}{#3}}}% from dtp.sty

}% end \placeLogo

%

%: Logos

\newcommand{\magCross}{\includegraphics[scale=0.8]{magStandard-Cross-1cm.jpg}}

\newcommand{\magScroll}{\includegraphics[scale=1]{magStandard-Scroll-1cm-WhiteBckGrnd.jpg}}

\newcommand{\magScrollxiimm}{\includegraphics[scale=0.9]{bibleScroll12mm.png}}

\newcommand{\magScrollxiimmRev}{\reflectbox{\includegraphics[scale=0.9]{bibleScroll12mm.png}}}

\newcommand{\magCardinal}{\includegraphics[scale=0.9]{magStandard-Cardinal.png}}

\newcommand{\magCardinalRev}{\reflectbox{\includegraphics[scale=0.9]{magStandard-Cardinal.png}}}

\newcommand{\magUN}{\includegraphics[scale=0.9]{UN-Flag-Thumbnail.png}}

\newcommand{\magRome}{\includegraphics[scale=1]{magStabdard-popeXIII.jpg}}

\newcommand{\magRomeRev}{\reflectbox{\includegraphics[scale=1]{magStabdard-popeXIII.jpg}}}

%: boite modification

\RequirePackage{pstricks}

%\newcolour{gris}{0.9}

\def\boitecoloriee{%

 \def\bkvz@before@breakbox{\ifhmode\par\fi\vskip\breakboxskip\relax}%

 \def\bkvz@set@linewidth{\advance\linewidth -2\fboxrule

   \advance\linewidth -2\fboxsep} %

 \def\bk@line{\hbox to \linewidth{%

     \ifbkcount\smash{\llap{\the\bk@lcnt\ }}\fi

     \psframebox*[framesep=0pt,fillcolor=bibleBack,linewidth=0pt]{%

       \vrule\@width\fboxrule \hskip\fboxsep

       \box\bk@bxa

       \hskip\fboxsep \vrule\@width\fboxrule

       }%

     }}%

 %\def\bkvz@top{\hrule\@height\fboxrule}

 \def\bkvz@top{\hrule height .6pt}%%% Pourquoi faut-il ajouter 0.2pt ???

 \def\bkvz@bottom{\hrule\@height\fboxrule}%

 \breakbox}

\def\endboitecoloriee{\endbreakbox}

%

%: Specific Characters etc ...

%\DeclareUnicodeCharacter{002C}{\coma}

% "Cannot define Unicode char value < 00A0."

\newcommand{\coma}{, }%

\newcommand{\kgk}{\textit{Koiné} Greek }

% http://www.technovelty.org/linux/tips/latex-tick.html

%\usepackage{amsfonts}

\newcommand{\tickYes}{\checkmark}

\usepackage{pifont}

\newcommand{\tickNo}{\hspace{1pt}\ding{55}}

%: counters etc

%: table row

\newcounter{tableRowx}

\newcommand{\startTablerowx}{\setcounter{tableRowx}{-1}}%

\newcommand{\tablerowx}{\stepcounter{tableRowx}%

\ifthenelse{\value{tableRowx} < 1}{}{% next insert space if < 10

\ifthenelse{\value{tableRowx} < 10}%

{ \ \arabic{tableRowx}. \ \ }%

{ \ \arabic{tableRowx}. \ }%

}% end of value{tableRowx} < 1

}

%: pdfcomments

%:                       \showComment

\newcommand{\showComment}[2]{#1\footnote{#1---#2} \hspace*{2mm} \pdfcomment[color=bibleBack,icon=Comment,author={#1},hoffset={-5mm}]{#2}%

}% /End.

%: Indexes

\RequirePackage{multind}

\makeindex{general}

\makeindex{bible}

\newcommand{\printIndicesHere}{%


\printindex{general}{General index}%


\printindex{bible}{Scripture index}%


}

%: \indexShow #1 index name e.g. bible, #2 index contents (will be shown in doc as well))

\newcommand{\indexShow}[2]{%

#2\index{#1}{#2}%

%

}%

\newcommand{\cleanIndexEntry}[2]{

\protect\StrDel{#1}{#2}}

\newcounter{bibleRef}%

\newcommand{\checkLength}[2]{

\setcounter{bibleRef}{StrLen{#1}}%

\protect\ifthenelse{\protect\value{bibleRef} > #2}{#1}{}}

%: File Out

%: \setupKeep #1 filename

\newcommand{\setupKeep}[1]{

\newwrite\file

\immediate\openout\file=#1.keep

}

%: \finishupKeep

\newcommand{\finishupKeep}{

\closeout\file}

%: \keepTrack #1 filename no .extn, #2text

\newcommand{\keepTrack}[1]{

\immediate\write\file{#1}

}

\endinput

%

%\newcounter{verNIV}% version verse counting

%\newcounter{verWEB}%

%\newcounter{verNET}%

%\newcounter{verISV}%

%\newcounter{verAMP}%

%\newcounter{verRSV}%

%

Created with the Personal Edition of HelpNDoc: Full featured multi-format Help generator