Skip to content

Commit 380b27f

Browse files
committed
Make tex script more configurable
1 parent a30a782 commit 380b27f

1 file changed

Lines changed: 18 additions & 10 deletions

File tree

sbndcode/CRT/CRTEventDisplay/build_tex.sh

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1+
version=$1
2+
gdml=$2
3+
author=$3
4+
email=$4
5+
edition=$5
6+
7+
mkdir /exp/sbnd/data/users/hlay/crt_channel_mapping/${edition}/tex_work
8+
19
echo "\documentclass{article}
210
\usepackage[a4paper, margin=3cm]{geometry}
311
\usepackage{graphicx}
412
\usepackage{pgffor}
513
\usepackage[hidelinks]{hyperref}
614
7-
\title{SBND CRT Channel Mapping Displays \\\\ \vspace{1em} \small \textit{Produced using} \texttt{sbndcode v10\_04\_01} \textit{\&} \texttt{sbnd\_v02\_05.gdml}}
8-
\author{Henry Lay \\\\ \small h.lay@sheffield.ac.uk}" > crt_channel_mapping_evds.tex
15+
\title{SBND CRT Channel Mapping Displays \\\\ \vspace{1em} \small \textit{Produced using} \texttt{sbndcode ${version}} \textit{\&} \texttt{${gdml}}}
16+
\author{${author} \\\\ \small ${email}}" > crt_channel_mapping_evds.tex
917

1018
walls=(bottom south north west east toplow tophigh)
1119
wallnames=(Bottom South North West East "Top Low" "Top High")
1220

1321
for wall in "${walls[@]}"
1422
do
15-
list=$(ls /exp/sbnd/data/users/hlay/crt_channel_mapping/mar2025/${wall}_wall/*_front.pdf)
23+
list=$(ls /exp/sbnd/data/users/hlay/crt_channel_mapping/${edition}/${wall}_wall/*_front.pdf)
1624
echo -n "\newcommand*{\\"$wall"ids}{" >> crt_channel_mapping_evds.tex
1725

1826
for item in ${list}
@@ -33,10 +41,10 @@ echo "\begin{document}
3341
\centering
3442
\vspace{2em}
3543
36-
\includegraphics[width=.6\textwidth]{/exp/sbnd/data/users/hlay/crt_channel_mapping/mar2025/UOSLogo_Primary_Violet_RGB.png}
44+
\includegraphics[width=.6\textwidth]{/nashome/h/hlay/UOSLogo_Primary_Violet_RGB.png}
3745
\vspace{2em}
3846
39-
\includegraphics[width=.5\textwidth]{/exp/sbnd/data/users/hlay/crt_channel_mapping/mar2025/sbnd_pride_transparent.png}
47+
\includegraphics[width=.5\textwidth]{/nashome/h/hlay/sbnd_pride_transparent.png}
4048
\flushleft
4149
\newpage
4250
\tableofcontents
@@ -55,15 +63,15 @@ do
5563
\newpage
5664
\subsection{volCRTModule\x\_\x}
5765
\begin{center}
58-
\includegraphics[width=.85\textwidth]{/exp/sbnd/data/users/hlay/crt_channel_mapping/mar2025/${walls[i]}_wall/volCRTModule\x_\x_front.pdf}\\\\
59-
\includegraphics[width=.85\textwidth]{/exp/sbnd/data/users/hlay/crt_channel_mapping/mar2025/${walls[i]}_wall/volCRTModule\x_\x_top.pdf}\\\\
60-
\includegraphics[width=.85\textwidth]{/exp/sbnd/data/users/hlay/crt_channel_mapping/mar2025/${walls[i]}_wall/volCRTModule\x_\x_side.pdf}
66+
\includegraphics[width=.85\textwidth]{/exp/sbnd/data/users/hlay/crt_channel_mapping/${edition}/${walls[i]}_wall/volCRTModule\x_\x_front.pdf}\\\\
67+
\includegraphics[width=.85\textwidth]{/exp/sbnd/data/users/hlay/crt_channel_mapping/${edition}/${walls[i]}_wall/volCRTModule\x_\x_top.pdf}\\\\
68+
\includegraphics[width=.85\textwidth]{/exp/sbnd/data/users/hlay/crt_channel_mapping/${edition}/${walls[i]}_wall/volCRTModule\x_\x_side.pdf}
6169
\end{center}
6270
}
6371
\endgroup" >> crt_channel_mapping_evds.tex
6472
done
6573

6674
echo "\end{document}" >> crt_channel_mapping_evds.tex
6775

68-
pdflatex --shell-escape -output-directory /exp/sbnd/data/users/hlay/crt_channel_mapping/mar2025/tex_work crt_channel_mapping_evds.tex
69-
pdflatex --shell-escape -output-directory /exp/sbnd/data/users/hlay/crt_channel_mapping/mar2025/tex_work crt_channel_mapping_evds.tex
76+
pdflatex --shell-escape -output-directory /exp/sbnd/data/users/hlay/crt_channel_mapping/${edition}/tex_work crt_channel_mapping_evds.tex
77+
pdflatex --shell-escape -output-directory /exp/sbnd/data/users/hlay/crt_channel_mapping/${edition}/tex_work crt_channel_mapping_evds.tex

0 commit comments

Comments
 (0)