summaryrefslogtreecommitdiff
path: root/latex
diff options
context:
space:
mode:
authorSashi202019-06-25 14:10:05 +0530
committerSashi202019-06-25 14:10:05 +0530
commita0d5d78d2664f9e1abe68b2722a0d15c33955b97 (patch)
tree3400335baf9ac51090dd2cb9ac008505ca3aff4f /latex
parentd9e3be601ad7b8706dd4885fba6e44c23f477ae4 (diff)
downloadr_textbook_companion-a0d5d78d2664f9e1abe68b2722a0d15c33955b97.tar.gz
r_textbook_companion-a0d5d78d2664f9e1abe68b2722a0d15c33955b97.tar.bz2
r_textbook_companion-a0d5d78d2664f9e1abe68b2722a0d15c33955b97.zip
Enable link to download pdf
Diffstat (limited to 'latex')
-rwxr-xr-xlatex/Initial_body112
-rwxr-xr-xlatex/bck_latex_test.sh2
-rwxr-xr-xlatex/latex_test.sh12
-rwxr-xr-xlatex/pdf_creator.sh9
4 files changed, 67 insertions, 68 deletions
diff --git a/latex/Initial_body b/latex/Initial_body
index c8d3576..c0a6b63 100755
--- a/latex/Initial_body
+++ b/latex/Initial_body
@@ -1,58 +1,58 @@
\nonstopmode
-\documentclass[12pt]{report}
-\usepackage{hyperref}
-\hypersetup{colorlinks=true,linkcolor=blue}
-\usepackage{theorem,graphicx}
-\usepackage{listings,alltt}
-\bibliographystyle{plain}
-
-
-\lstset{ %configuring the display of scilab codes
- tabsize=4,
- language=scilab,
- basicstyle=\ttfamily,
- aboveskip={1\baselineskip},
- showstringspaces=false,
- breaklines=true,
- showspaces=false,
- numbers=left,
- numberstyle=\small,
- stringstyle=\normalfont,
- keywordstyle=\color{red},
- emph={clc, all, gca},
- emphstyle=\color{red},
- commentstyle=\color{blue}\normalfont}
-
-
-% code environment
-{\theorembodyfont{\rmfamily} \newtheorem{codemass}{Scilab code}[chapter]}
-\newenvironment{code}%
-{\begin{codemass}}{\hrule \end{codemass}}
-
-{\theorembodyfont{\rmfamily} \newtheorem{accmass}{Acc}[chapter]}
-\newenvironment{acc-code}%
-{\begin{accmass}}{\end{accmass}}
-
-
-% create listing for code
-
-\newcommand\tcaption[1]
- {\addcontentsline{cod}{section}{\protect\numberline {\thecodemass}#1}}
-\makeatletter \newcommand\listofcode
- {\chapter*{List of Scilab Codes\markboth%
- {\bf List of Scilab Codes}{}}%
-\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{5em}}%
-\addcontentsline{toc}{chapter}{\protect\numberline{List of Scilab Codes}}
-\@starttoc{cod}}
-\newcommand\l@matlab[3]
- {#1 \par\noindent#2, #3 \par}
-\renewcommand\@pnumwidth{2.1em}
-%\makeatother
-
-\makeatletter
-\def\curlable#1{\def\thecodemass{#1}\def\@currentlabel{#1}}
-\makeatother
-
-\newcommand{\coderef}[1]{Exa~\ref{#1}}
-\newcommand{\figref}[1]{Fig.~\ref{#1}}
+\documentclass[12pt]{report}
+\usepackage{hyperref}
+\hypersetup{colorlinks=true,linkcolor=blue}
+\usepackage{theorem,graphicx}
+\usepackage{listings,alltt}
+\bibliographystyle{plain}
+
+
+\lstset{ %configuring the display of scilab codes
+ tabsize=4,
+ language=R,
+ basicstyle=\ttfamily,
+ aboveskip={1\baselineskip},
+ showstringspaces=false,
+ breaklines=true,
+ showspaces=false,
+ numbers=left,
+ numberstyle=\small,
+ stringstyle=\normalfont,
+ keywordstyle=\color{red},
+ emph={clc, all, gca},
+ emphstyle=\color{red},
+ commentstyle=\color{blue}\normalfont}
+
+
+% code environment
+{\theorembodyfont{\rmfamily} \newtheorem{codemass}{Scilab code}[chapter]}
+\newenvironment{code}%
+{\begin{codemass}}{\hrule \end{codemass}}
+
+{\theorembodyfont{\rmfamily} \newtheorem{accmass}{Acc}[chapter]}
+\newenvironment{acc-code}%
+{\begin{accmass}}{\end{accmass}}
+
+
+% create listing for code
+
+\newcommand\tcaption[1]
+ {\addcontentsline{cod}{section}{\protect\numberline {\thecodemass}#1}}
+\makeatletter \newcommand\listofcode
+ {\chapter*{List of Scilab Codes\markboth%
+ {\bf List of Scilab Codes}{}}%
+\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{5em}}%
+\addcontentsline{toc}{chapter}{\protect\numberline{List of Scilab Codes}}
+\@starttoc{cod}}
+\newcommand\l@matlab[3]
+ {#1 \par\noindent#2, #3 \par}
+\renewcommand\@pnumwidth{2.1em}
+%\makeatother
+
+\makeatletter
+\def\curlable#1{\def\thecodemass{#1}\def\@currentlabel{#1}}
+\makeatother
+
+\newcommand{\coderef}[1]{Exa~\ref{#1}}
+\newcommand{\figref}[1]{Fig.~\ref{#1}}
diff --git a/latex/bck_latex_test.sh b/latex/bck_latex_test.sh
index 6cfe29a..b7c0513 100755
--- a/latex/bck_latex_test.sh
+++ b/latex/bck_latex_test.sh
@@ -134,7 +134,7 @@ fi
j=$col1
done < database_sort
-rm Figure_files
+#rm Figure_files
if [ -s $Dep_dat ]
diff --git a/latex/latex_test.sh b/latex/latex_test.sh
index 5d67cb5..ebd71eb 100755
--- a/latex/latex_test.sh
+++ b/latex/latex_test.sh
@@ -1,9 +1,9 @@
#!/bin/bash
clear
-Bk_details=$1
-Contrib_details=$2
+CBk_details=$1
+CContrib_details=$2
Data_all=$3
-Dep_dat=$4
+#Dep_dat=$4
CURDIR=$PWD;
@@ -24,8 +24,8 @@ fi
IFS_old="$IFS"
-IFS=# read col1 col2 col3 col4 col5 col6 col7 col8 < $Contrib_details;
-IFS=# read colB1 colB2 colB3 colB4 colB5 colB6 colB7 < $Bk_details;
+IFS=# read col1 col2 col3 col4 col5 col6 col7 col8 < "$CContrib_details";
+IFS=# read colB1 colB2 colB3 colB4 colB5 colB6 colB7 < "$CBk_details";
col1=${col1/&/\\&};
col2=${col2/&/\\&};
col3=${col3/&/\\&};
@@ -152,7 +152,7 @@ fi
j=$col1
done < database_sort
-rm Figure_files
+#rm Figure_files
if [ -s $Dep_dat ]
diff --git a/latex/pdf_creator.sh b/latex/pdf_creator.sh
index 2e2cbe0..afc2ce0 100755
--- a/latex/pdf_creator.sh
+++ b/latex/pdf_creator.sh
@@ -1,4 +1,4 @@
-$ cat changedir.sh
+#$ cat changedir.sh
#!/bin/bash
@@ -6,14 +6,13 @@ if [ -f TEX_final.tex ]
then
rm TEX_final.*
rm database_sort
- rm database_sort.csv
rm TEX
fi
./latex_test.sh $1 $2 $3 $4
pdflatex TEX_final.tex > log.txt
pdflatex TEX_final.tex >> log1.txt
-pdflatex TEX_final.tex >> log1.txt
-pdflatex TEX_final.tex >> log1.txt
-
+#pdflatex TEX_final.tex >> log1.txt
+#pdflatex TEX_final.tex >> log1.txt
+mv -v TEX_final.pdf $4 >> log.txt
rm log1.txt