Revision 4c25cbbba0f9eeadaf5b43907bbbce945089c4f2

root/GW4reports/GW2reports.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash

#LatexCommand="pdflatex -shell-escape pool.tex "
#LatexCommand="pdflatex --interaction=nonstopmode pool.tex "
LatexCommand="pdflatex pool.tex "


GWpath="/GW";\
if [ -f latexsrc.page ]; then 
# JDE O SLIDE
rm slide.html slide.pdf
if [ `grep GWslide latexsrc.page |wc -l` -eq 1 ]; then \
{ echo "\def\GW{$GWpath}\def\GWinclMovie{0}\def\visibility{true}"; cat /GW/root/GW4reports/GWlatexBeamerHead.tex ; echo "\\begin{document} " ; cat latexsrc.page ; echo "\GWslide\bibliographystyle{apalike}\bibliography{/GW/root/bibtex/golem,/GW/root/bibtex/others}\\end{document}" ; } >pool.tex
$LatexCommand
#BIBTEX stuff
if grep -q  citation pool.aux
then 
   echo "CIT OK";
  bibtex latexsrc #BIBTEX line
   bibtex pool #BIBTEX line
   $LatexCommand;$LatexCommand
   #pdflatex pool.tex;pdflatex pool.tex
fi
mv pool.pdf slide.pdf;\
rm slide*.jpg # old stuff
echo "<html><body><embed src='slide.pdf#view=fit&toolbar=0&navpanes=0&scrollbar=0' type='application/pdf' width='100%' height='100%'></embed></body></html>">slide.html
#rm $file.pdf;\	
fi;
# JDE O PASAZ
rm pargrph.html pargrph.pdf
if [ `grep default latexsrc.page |wc -l` -ge 1 ]; then \
{ echo "\def\GW{$GWpath}\def\visibility{true}"; cat /GW/root/GW4reports/GWlatexPargrphHead.tex ; echo "\usepackage[a4paper, margin=2cm,portrait]{geometry}\\begin{document}" ; cat latexsrc.page ; echo "{\Large\bf \title}\newline\default\references\\end{document}" ; } > pool.tex;
$LatexCommand;$LatexCommand
#pdflatex pool.tex
#BIBTEX stuff
if grep -q  citation pool.aux
then 
   echo "CIT OK";
   bibtex pool #BIBTEX line
   #biber pool #BIBTEX line
   $LatexCommand;$LatexCommand
   #pdflatex pool.tex;pdflatex pool.tex
fi
mv pool.pdf pargrph.pdf;\
echo "<html><body><embed src='pargrph.pdf#view=fit&toolbar=0&navpanes=0&scrollbar=0' type='application/pdf' width='100%' height='100%'></embed></body></html>">pargrph.html
fi
fi
if [ -f FIGdescr.page ]; then
# JDE O Figure
rm figure.html figure.pdf
{ echo "\def\GW{$GWpath}\def\visibility{true}"; cat /GW/root/GW4reports/GWlatexPargrphHead.tex ; echo "\usepackage[a4paper, total={170mm,257mm}, left=20mm, top=20mm,]{geometry}\\begin{document}" ; cat FIGdescr.page ; echo "\begin{figure}[h]\centering\href{http://golem.fjfi.cvut.cz/wiki/\FGpath}{\includegraphics[width=0.8\tw]{\FGpath}}\caption{\FGcapt}\label{\FGlabel}\end{figure}\bibliographystyle{apalike}\bibliography{/GW/root/bibtex/golem,/GW/root/bibtex/others}\\end{document}" ; } > pool.tex;
#{ echo "\def\GW{$GWpath}\def\visibility{true}"; cat /GW/root/GW4reports/GWlatexPargrphHead.tex ; echo "\usepackage[a4paper, total={170mm,257mm}, left=20mm, top=20mm,]{geometry}\\begin{document}" ; cat FIGdescr.page ; echo "\centering\href{http://golem.fjfi.cvut.cz/wiki/\FGpath}{\includegraphics[width=0.8\tw]{\FGpath}}\newline Figure: \FGcapt\bibliographystyle{apalike}\bibliography{/GW/root/bibtex/golem,/GW/root/bibtex/others}\\end{document}" ; } > pool.tex;
$LatexCommand
#pdflatex pool.tex
#BIBTEX stuff
if grep -q  citation pool.aux
then 
   echo "CIT OK";
   bibtex pool #BIBTEX line
   $LatexCommand;$LatexCommand
   #pdflatex pool.tex;pdflatex pool.tex
fi
mv pool.pdf figure.pdf;\
echo "<html><body><embed src='figure.pdf#view=fit&toolbar=0&navpanes=0&scrollbar=0' type='application/pdf' width='100%' height='100%'></embed></body></html>">figure.html
fi

if [ -f DFIGdescr.page ]; then
# JDE O DFigure
rm figure.html figure.pdf
{ echo "\def\GW{$GWpath}\def\visibility{true}"; cat /GW/root/GW4reports/GWlatexPargrphHead.tex ; echo "\usepackage[a4paper, total={170mm,257mm}, left=20mm, top=20mm,]{geometry}\\begin{document}" ; cat DFIGdescr.page ; echo "\begin{figure}[h]\centering\href{http://golem.fjfi.cvut.cz/wiki/\FGpathA}{\includegraphics[width=0.45\tw]{\FGpathA}}\href{http://golem.fjfi.cvut.cz/wiki/\FGpathB}{\includegraphics[width=0.45\tw]{\FGpathB}}\caption{\FGcapt}\label{\FGlabel}\end{figure}\bibliographystyle{apalike}\bibliography{/GW/root/bibtex/golem,/GW/root/bibtex/others}\\end{document}" ; } > pool.tex;
$LatexCommand
#pdflatex pool.tex 
#BIBTEX stuff
if grep -q  citation pool.aux
then 
   echo "CIT OK";
   bibtex pool #BIBTEX line
   $LatexCommand;$LatexCommand
   #pdflatex pool.tex;pdflatex pool.tex
fi
mv pool.pdf figure.pdf;\
echo "<html><body><embed src='figure.pdf#view=fit&toolbar=0&navpanes=0&scrollbar=0' type='application/pdf' width='100%' height='100%'></embed></body></html>">figure.html
fi



#rm pool.tex;
rm *.aux  *.log *.run.xml *.nav *.out *.snm *.toc *.bbl *.blg *.pyg; \
echo "xterm -hold -e \"cd $PWD;bash /GW/root/GW4reports/GW2reports.sh $1\"">/home/svoboda/Sprava/bin/F12
echo Hotovo!

exit