mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 19:09:16 +02:00
* added
This commit is contained in:
parent
dcfb717050
commit
3cfc189a84
36
docs/tex2htex
Normal file
36
docs/tex2htex
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# generate sed file for filename replaces
|
||||||
|
echo "# Don't edit this file is generated" > htex.sed
|
||||||
|
for i in *.tex
|
||||||
|
do
|
||||||
|
j=${i/.tex/.htex}
|
||||||
|
echo "s/$i/$j/" >> htex.sed
|
||||||
|
done
|
||||||
|
|
||||||
|
for i in *.tex
|
||||||
|
do
|
||||||
|
htex=${i/.tex/.htex}
|
||||||
|
|
||||||
|
echo "$i -> $htex"
|
||||||
|
|
||||||
|
# retrieve exampledir
|
||||||
|
exdir=`grep exampledir $i | sed "s+\(.*\)FPCexampledir{\(.*\)}+\2+"`
|
||||||
|
|
||||||
|
# replace FPCexample calls
|
||||||
|
if [ "$exdir" != "" ]
|
||||||
|
then
|
||||||
|
j=${i/.tex/.tmp}
|
||||||
|
sed "s/FPCexample{\(.*\)}/input{$exdir\/\1.tex}/" $i > $j
|
||||||
|
k=$j
|
||||||
|
else
|
||||||
|
j=$i
|
||||||
|
k=""
|
||||||
|
fi
|
||||||
|
sed -f htex.sed $j > $htex
|
||||||
|
|
||||||
|
# remove temp
|
||||||
|
[ $k ] && [ -e $k ] && rm $k
|
||||||
|
done
|
||||||
|
|
||||||
|
rm htex.sed
|
Loading…
Reference in New Issue
Block a user