Commit f1dfabc8 authored by ch's avatar ch
Browse files

fix/adjust to updated lib/

parent 2b128a47
......@@ -107,7 +107,8 @@ function ATTACHMENT() {
egrep -v "^-|-$" | # IGNORE ISOLATED -
grep -v "^[ ]*$" | tail -n 1` # NO EMPTY / LAST LINE ONLY
IDT=`echo "$1" | sed 's,http.\?://,,' | sed 's/ //g' | md5sum | cut -c 1-8`
IDT=`echo "$SRCHREF" | sed 's,http.\?://,,' | #
sed 's/ //g' | md5sum | cut -c 1-8`
ATTID=`echo ${IDT} | md5sum | cut -d " " -f 1 | #
base64 | tr [:upper:] [:lower:] | cut -c 1-8` #
......@@ -156,6 +157,7 @@ function SEEALSO() {
SEAID=`echo ${IDA} | md5sum | cut -d " " -f 1 | #
base64 | tr [:upper:] [:lower:] | cut -c 1-8` #
echo "${SEAID}:2:$*" >> ${TMPID}.index
}
# --------------------------------------------------------------------------- #
......@@ -473,6 +475,8 @@ function LARGE() {
function SHOW() {
THISCMD="SHOW"
# EXTRACT FILE ARGUMENT
# ------------------------------------ #
SHOWTHIS=`echo $* | sed 's/ /\n/g' | # DISPLAY ALL / ON SEP LINES
......@@ -499,22 +503,29 @@ function SHOW() {
getFile $INCLUDEPATH/$SHOWTHIS ${TMPSVG}
# CHECK/EXTRACT CAPTION
# ---------------------------------------------- #
# ------------------------------------------------------------ #
THISARGUMENTS=`echo $* | sed 's/\([ ]*\)\(.*\)\([ ]*\)/\2/'`
# ----
# GET LN NUM FOR CMD IN (UNPROCESSED) MDSH SRC
LNCMD=`grep -n "^% SHOW: $*" $MDSH | # FIND CMD LINE
head -n 1 | cut -d ":" -f 1` # SELECT FIRST MATCH
LNCMD=`grep -n "^% ${THISCMD}:" $MDSH | # FIND CMD LINE
grep "$THISARGUMENTS" | # MATCH OPTIONS
head -n 1 | cut -d ":" -f 1` # SELECT LAST MATCH
# ----
# DISABLE/TAG CMD LINE IN MDSH SRC (PREVENT DOUBLE MATCH)
T="$RANDOM"
sed -i "${LNCMD}s/^% SHOW:/%${T}SHOW:/" $MDSH
if [ "$LNCMD" != "" ];then
T="$RANDOM"
sed -i "${LNCMD}s/^% ${THISCMD}:/%${T}${THISCMD}:/" $MDSH
# ----
# EXTRACT CAPTION FOR TAGGED '% SHOW'
CAPTION=`grep -A 1 "%${T}SHOW: $*" $MDSH | # FIND CMD + CONTEXT
grep "^% INFO:" | # GET INFO
head -n 1 | # ONLY FIRST
cut -d ":" -f 2- | # CUT INFO
$PANDOCACTION | # DISPLAY/TRANSLATE
sed 's,</*p>,,g'` # REMOVE <P> TAGS
CAPTION=`grep -A 1 "^%${T}${THISCMD}:" $MDSH | # FIND CMD + CONTEXT
grep "^% INFO:" | # GET INFO
head -n 1 | # ONLY FIRST
cut -d ":" -f 2- | # CUT INFO
$PANDOCACTION | # DISPLAY/TRANSLATE
sed 's,</*p>,,g'` # REMOVE <p> TAGS
else
CAPTION=""
fi
# KEEP ON GOING (IF SUCCESSFUL) #
# ---------------------------------------------- #
......@@ -677,18 +688,18 @@ function PDF() {
# CHECK/EXTRACT CAPTION
# ------------------------------------------------ #
CAPTION="" # RESET
CAPTION=`grep -A 1 "% PDF: $*" $MDSH | # FIND CMD + CONTEXT
grep "^% INFO:" | # GET INFO
head -n 1 | # ONLY FIRST
cut -d ":" -f 2- | # CUT INFO
$PANDOCACTION | # DISPLAY/TRANSLATE
sed 's,</*p>,,g'` # REMOVE <P> TAGS
CAPTION=`grep -A 1 "^% ${THISCMD}:" $MDSH | # FIND CMD + CONTEXT
grep "^% INFO:" | # GET INFO
head -n 1 | # ONLY FIRST
cut -d ":" -f 2- | # CUT INFO
$PANDOCACTION | # DISPLAY/TRANSLATE
sed 's,</*p>,,g'` # REMOVE <p> TAGS
# DISABLE CAPTION
# ------------------------------------------------ #
LNCMD=`grep -n "^% PDF: $*" $MDSH | # FIND CMD LINE
head -n 1 | cut -d ":" -f 1` # SELECT LAST MATCH
sed -i "${LNCMD}s/^% PDF:/%X${THISCMD}:/" $MDSH
LNCMD=`grep -n "^% ${THISCMD}:" $MDSH | # FIND CMD LINE
head -n 1 | cut -d ":" -f 1` # SELECT LAST MATCH
sed -i "${LNCMD}s/^% ${THISCMD}:/%X${THISCMD}:/" $MDSH
# CHECK/EXTRACT REF
# ------------------------------------------------ #
......@@ -743,7 +754,10 @@ function SRCCODE() {
# ------------------------------------------------------------------------ #
ALL="$*";THISCMD="SRCCODE";
ENVIRONMENT="" # RESET
SRCLANG=`echo $1 | sed 's/ //g' | sed 's/[^a-z]//g'`
SRCLANG=`echo $* | tr -s ' ' | #
cut -d " " -f 1 | #
sed 's/ //g' | #
sed 's/[^a-z]//g'`
if [ "$SRCLANG" != "" ];then
ENVIRONMENT=`grep -ih "newenvironment{$SRCLANG" ${TMPID}*.sty | #
......@@ -756,12 +770,15 @@ function SRCCODE() {
else
echo $ALL > ${TMPID}.xtract
fi
# GET NUMBER FOR CMD LINE IN (UNPROCESSED) MDSH SRC AND
# DISABLE CMD LINE IN MDSH SRC (PREVENT DOUBLE MATCH)
# ----
LNCMD=`grep -n "^% $THISCMD:" $MDSH | # FIND CMD LINE
head -n 1 | cut -d ":" -f 1` # SELECT LAST MATCH
sed -i "${LNCMD}s/^% $THISCMD:/%X${THISCMD}:/" $MDSH
THISARGUMENTS=`echo $* | sed 's/\([ ]*\)\(.*\)\([ ]*\)/\2/'`
# ----
# GET NUMBER FOR CMD LINE IN (UNPROCESSED) MDSH SRC AND
# DISABLE CMD LINE IN MDSH SRC (PREVENT DOUBLE MATCH)
# ----
LNCMD=`grep -n "^% ${THISCMD}:" $MDSH | # FIND CMD LINE
grep "$THISARGUMENTS" | # MATCH OPTIONS
head -n 1 | cut -d ":" -f 1` # SELECT LAST MATCH
sed -i "${LNCMD}s/^% $THISCMD:/%X${THISCMD}:/" $MDSH
else
getVerbatim "$THISCMD" ${TMPID}.xtract
fi
......@@ -1043,6 +1060,7 @@ function CLEARTORIGHT() {
function VFILL() {
if [ "$OUTPUTFORMAT" == pdf ];then
write2src ''
write2src '\vfill'
fi
......
......@@ -7,30 +7,30 @@
% -> bibtex references: http://freeze.sh/etherpad/bibref
% -> markdown reference: http://daringfireball.net/projects/markdown
% DOCUMENTCLASS: [8pt,cleardoubleempty]{scrbook}
% EXTENDFUNCTIONS: tgsoguide.functions
% --------------------------------------------------------------------------- %
% EXTENDFUNCTIONS: ../lib/mdsh/book-A6.functions
% PDFXTITLE: a guide to techno-galactic software observation
% --------------------------------------------------------------------------- %
% DOCUMENTCLASS: [8pt,cleardoubleempty]{scrbook}
% PDFXTITLE: The Techno-Galactic Guide to Software Observation
% PDFXORG: Constant VZW
% PDFXAUTHOR: TGSO Editorial Team
% MKPDFXCOMPLIANT:
% --------------------------------------------------------------------------- %
% USEPACKAGE: ../lib/tex/conditions
% USEPACKAGE: ../lib/tex/listingcustom
% USEPACKAGE: ../lib/tex/lstlanguages
% --
% USEPACKAGE: tgsoguide
% --------------------------------------------------------------------------- %
% EXTENDFUNCTIONS: ../lib/mdsh/keywordize.functions
% ADD2PREAMBLE: \usepackage{makeidx}
% ADD2PREAMBLE: \makeindex
% --------------------------------------------------------------------------- %
% EXTENDFUNCTIONS: ../lib/mdsh/bibref.functions
% BIBREF: references.bib
% ----
% HREF: OFF
% BIBREF: https://pad.constantvzw.org/p/observatory.bib/export/txt
% --------------------------------------------------------------------------- %
% EXTENDFUNCTIONS: tgsoguide.functions
% --------------------------------------------------------------------------- %
% =========================================================================== %
% INCLUDE: https://pad.constantvzw.org/p/observatory.guide/export/txt 1-180
% INCLUDE: https://pad.constantvzw.org/p/observatory.guide/export/txt 1-40
% =========================================================================== %
......@@ -48,6 +48,8 @@
\usepackage[natbib=true,hyperref=false,
style=musuos,backend=biber]{biblatex}
\usepackage{bibentry}
\usepackage{textcomp}
\DeclareUnicodeCharacter{00A0}{ }
\newcounter{floats} % COUNT FLOATS TO ADD LABELS
\newcounter{pagenow} % MOSTLY EMPTY/USED TO STORE
......@@ -454,10 +456,11 @@
% --------------------------------------------------------------------------- %
% C O D E E N V I R O N M E N T S
% --------------------------------------------------------------------------- %
\newcommand{\emptylinelst}{\vspace{-.5\baselineskip}}
\renewcommand{\kwa}{\bfseries}
\renewcommand{\kwb}{\kwa}
\renewcommand{\kwc}{}
\newcommand{\kwa}{\bfseries}
\newcommand{\kwb}{\kwa}
\newcommand{\kwc}{}
\lstdefinestyle{inline}{basicstyle=\ttfamily}
......@@ -488,7 +491,16 @@
literate={}{{\symrect}}1
{}{{\symrhombus}}1
{}{{\symtrapez}}1
{}{{\symarrowright}}1,
{}{{\symarrowright}}1
{Á}{{\'A}}1 {Ã}{{\~A}}1 {É}{{\'E}}1
{á}{{\'a}}1 {ã}{{\~a}}1 {é}{{\'e}}1
{À}{{\`A}}1 {è}{{\`E}}1 {Ò}{{\`O}}1
{à}{{\`a}}1 {è}{{\`e}}1 {ò}{{\`o}}1
{Ö}{{\"O}}1 {Ü}{{\"ü}}1 {Ä}{{\"A}}1
{ö}{{\"o}}1 {ü}{{\"u}}1 {ä}{{\"a}}1
{»}{\guillemotleft}1 {«}{\guillemotright}1
{'}{\textquotesingle}1 {}{\euro}1
{-}{\textemdash}1 { }{{\,}}1,
escapechar=°
}\renewcommand{\emptylinelst}{\vspace{-1\baselineskip}
\vfill\pagebreak[0]}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment