| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# Everything after a `#' is ignored (in this shell script) |
| 4 |
# |
| 5 |
# remove the string `> /dev/null' if you want more log-output |
| 6 |
# remove the line containing `batchmode' if you want even more |
| 7 |
# log-information while running LaTeX |
| 8 |
# |
| 9 |
#----------------- create a `ltxdoc.cfg': -------------------------- |
| 10 |
|
| 11 |
# Put here a list of options to pass to the class: |
| 12 |
OPT=a4paper |
| 13 |
|
| 14 |
echo "Generating configuration file ltxdoc.cfg for youngtab.dtx" |
| 15 |
|
| 16 |
# Write the file in one pass: |
| 17 |
cat > ltxdoc.cfg <<EOF |
| 18 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 19 |
%% ltxdoc.cfg for youngtab.dtx, generated by makeydoc %% |
| 20 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 21 |
\PassOptionsToClass{$OPT}{article} |
| 22 |
\batchmode |
| 23 |
|
| 24 |
%% Do not uncomment the next 2 lines |
| 25 |
%\AtBeginDocument{\RecordChanges} |
| 26 |
%\AtEndDocument{\PrintChanges} |
| 27 |
|
| 28 |
%% The next 3 lines produce full indexes and change logs |
| 29 |
%% - you may not want those (commented out by default). |
| 30 |
\AtBeginDocument{\CodelineIndex\EnableCrossrefs} |
| 31 |
\AtEndDocument{\PrintIndex} |
| 32 |
\AtEndDocument{\addcontentsline{toc}{section}{Index}} |
| 33 |
|
| 34 |
%% If you do not want any code listings, just documentation, then instead |
| 35 |
%% of the lines above, uncomment the following: |
| 36 |
%\AtBeginDocument{\OnlyDescription} |
| 37 |
EOF |
| 38 |
#---------- latex the documentation using `ltxdoc.cfg': -------------- |
| 39 |
|
| 40 |
ThisDoc=youngtab.dtx |
| 41 |
Base=youngtab |
| 42 |
|
| 43 |
echo;echo "1st latex $ThisDoc" |
| 44 |
if (latex $ThisDoc > /dev/null) |
| 45 |
then |
| 46 |
echo;echo "2nd latex $ThisDoc" |
| 47 |
latex $ThisDoc > /dev/null |
| 48 |
|
| 49 |
echo;echo "makeindex -s gind.ist $Base.idx" |
| 50 |
makeindex -s gind.ist $Base.idx |
| 51 |
echo;echo "3rd latex $ThisDoc" |
| 52 |
latex $ThisDoc > /dev/null |
| 53 |
else |
| 54 |
echo;cat <<EOF |
| 55 |
!!! LaTeX ERROR: $ThisDoc. (See $Base.log.) |
| 56 |
Perhaps a new version of youngtab.sty is missing? |
| 57 |
(Then, generate it by "tex youngtab.ins") |
| 58 |
EOF |
| 59 |
fi |