summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/youngtab/makeydoc
blob: d0fda75af83259ad016241c0da81c55eb558149f (plain)
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
#!/bin/sh
#
# Everything after a `#' is ignored (in this shell script)
#
# remove the string `> /dev/null' if you want more log-output
# remove the line containing `batchmode' if you want even more 
#  log-information while running LaTeX
#
#----------------- create a `ltxdoc.cfg': --------------------------

# Put here a list of options to pass to the class:
OPT=a4paper

echo "Generating configuration file ltxdoc.cfg for youngtab.dtx"

# Write the file in one pass:
cat > ltxdoc.cfg <<EOF
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ltxdoc.cfg for youngtab.dtx, generated by makeydoc %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\PassOptionsToClass{$OPT}{article}
\batchmode

%% Do not uncomment the next 2 lines
%\AtBeginDocument{\RecordChanges}
%\AtEndDocument{\PrintChanges}

%% The next 3 lines produce full indexes and change logs
%% - you may not want those (commented out by default).
\AtBeginDocument{\CodelineIndex\EnableCrossrefs}
\AtEndDocument{\PrintIndex}
\AtEndDocument{\addcontentsline{toc}{section}{Index}}

%% If you do not want any code listings, just documentation, then instead
%% of the lines above, uncomment the following:
%\AtBeginDocument{\OnlyDescription}
EOF
#---------- latex the documentation using `ltxdoc.cfg': --------------

ThisDoc=youngtab.dtx
Base=youngtab

echo;echo "1st latex $ThisDoc"
if (latex $ThisDoc > /dev/null) 
then
  echo;echo "2nd latex $ThisDoc"
  latex $ThisDoc > /dev/null

  echo;echo "makeindex -s gind.ist $Base.idx"
  makeindex -s gind.ist $Base.idx
  echo;echo "3rd latex $ThisDoc"
  latex $ThisDoc > /dev/null
else
  echo;cat <<EOF
  !!! LaTeX ERROR: $ThisDoc. (See $Base.log.)
  Perhaps a new version of youngtab.sty is missing?
  (Then, generate it by "tex youngtab.ins")
EOF
fi