Commit df1e2e44 authored by ch's avatar ch
Browse files

image captions are now mixed in the method, breaking the text flow.

could there just be a list of all the image captions at the end of each method?
and could page references of image captions be treated in the same way as the
'see also' page references (which work really good)?

to be tested.
parent 370fe54c
......@@ -5,6 +5,8 @@
function GROUPING() {
FLUSHIMGREF
GROUPINGID=`echo $* | tr [:upper:] [:lower:] | #
cut -d "-" -f 1 | sed 's/ //g' | #
sed 's/[^a-z]//g'`
......@@ -46,6 +48,8 @@ function GROUPING() {
function SEEHERE() {
FLUSHIMGREF
SRCBASE=`echo $* | sed 's/ //g'`;SRCPLUS="$SRCBASE/export/txt"
REPLYPLUS=`curl -s -o /dev/null -IL -w "%{http_code}" $SRCPLUS`
if [ $REPLYPLUS == '200' ]; then
......@@ -498,7 +502,6 @@ function SHOW() {
# ----
# DISABLE/TAG CMD LINE IN MDSH SRC (PREVENT DOUBLE MATCH)
T="$RANDOM"
#sed -i "${LNCMD}s/^% SHOW:$*/%${T}SHOW:$*/" $MDSH
sed -i "${LNCMD}s/^% SHOW:/%${T}SHOW:/" $MDSH
# ----
# EXTRACT CAPTION FOR TAGGED '% SHOW'
......@@ -581,10 +584,15 @@ function SHOW() {
# WRITE TO SRC #
# ----------------------------------------------------------- #
if [ "$OUTPUTFORMAT" == pdf ];then
if [ "$PFLAG" == H ];then
write2src "\imghere{$PDFHERE}{$CNT}$RFC"
# COLLECT CAPTIONS TO BE CLEARED BEFORE NEXT METHOD #
# ------------------------------------------------- #
if [ "$CAPTION" != "" ];then
echo "\refimg{$REF}{$CAPTION}" >> ${TMPID}.imgref;fi
elif [ "$PFLAG" == I ];then
W=`echo $* | sed 's/ /\n/g' | # DISPLAY, SPACES2LINEBREAKS
egrep '^W:' | # EXTRACT W:
......@@ -595,10 +603,14 @@ function SHOW() {
write2src ""
write2src "$PDFCMD"
write2src ""
# COLLECT CAPTIONS TO BE CLEARED BEFORE NEXT METHOD #
# ------------------------------------------------- #
if [ "$CAPTION" != "" ];then
echo "\refimg{$REF}{$CAPTION}" >> ${TMPID}.imgref;fi
fi
elif [ "$OUTPUTFORMAT" == html ];then
elif [ "$OUTPUTFORMAT" == html ];then
write2src "<span class=\"$THISCLASS descriptor\">"
write2src "<span>$THISDESCRIPTION</span>"
write2src "$DESCRIPTION</span>"
......@@ -619,6 +631,20 @@ function SHOW() {
# --------------------------------------------------------------------------- #
function FLUSHIMGREF() {
# FLUSH PREVIOUS IMAGES
if [ -f $TMPID.imgref ];then
write2src "\flushrefimg"
cat $TMPID.imgref >> $SRCDUMP
echo "" >> $SRCDUMP
rm $TMPID.imgref
fi
}
# --------------------------------------------------------------------------- #
function PDF() {
THISCMD="PDF"
......
......@@ -245,7 +245,7 @@
\newpage\subsection{#1}%
\markboth{#1}{#1}}
%\renewcommand{\bibsetup}{\setlength\textheight{.8\paperheight}}
\renewcommand{\bibsetup}{\setlength\textheight{.8\paperheight}}
%\usepackage{url}
% https://tex.stackexchange.com/questions/134191/
......@@ -695,6 +695,22 @@
\end{minipage}\hfill%
}%
}
% --------------------------------------------------------------------------- %
\newcommand\refimg[2]{%
\if\relax\detokenize{#2}\relax
% #2 EMPTY -> DO NOTHING
\else
{\small #2~\textbf{P.\pageref{#1}}}
\fi
}
% ----------------------- %
\newcommand\flushrefimg{
\vfill\vfill
\grafikinline{\iconrelatepages} %
{\hspace{0em}}
\descriptorlabel{IMAGES}
}
% --------------------------------------------------------------------------- %
\newcommand\anchor[3]{%
\if\relax\detokenize{#3}\relax
......@@ -748,7 +764,7 @@
\newcommand{\imgasap}[5]{
% ------------------------------------ %
% INSERT ANCHOR (OPTIONAL)
\anchor{#5}{#3}{#4}
% \anchor{#5}{#3}{#4}
% ------------------------------------ %
% INSERT FULL SIZE IMAGE (+SHIFT) ASAP
\begin{figure}[p]
......
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