1
0
Эх сурвалжийг харах

move latex.sh to Scripts folder

Dongliang Mu 7 жил өмнө
parent
commit
0c5ebb0990

BIN
LinuxKernelInsides.pdf → Scripts/LinuxKernelInsides.pdf


+ 8 - 0
Scripts/README.md

@@ -4,6 +4,8 @@
 
 `get_all_links.py` : justify one link is live or dead with network connection
 
+`latex.sh` : a script for converting Markdown files in each of the subdirectories into a unified PDF typeset in LaTeX
+
 ## Usage
 
 `get_all_links.py` :
@@ -11,3 +13,9 @@
 ```
 ./get_all_links.py ../
 ```
+
+`latex.sh` :
+
+```
+./latex.sh
+```

+ 4 - 5
latex.sh → Scripts/latex.sh

@@ -5,11 +5,11 @@
 #!/bin/bash
 rm -r build 
 mkdir build
-for D in *; do
-    if [ -d "${D}" ] && [ "${D}" != "build" ]
+for D in $(ls ../); do
+    if [ -d "../${D}" ]
     then
         echo "Converting $D . . ."
-        pandoc ./$D/README.md ./$D/linux-*.md -o build/$D.tex --template default
+        pandoc ../$D/README.md ../$D/linux-*.md -o build/$D.tex --template default
     fi
 done
 
@@ -20,8 +20,7 @@ do
 done
 
 cd ../
-pandoc README.md SUMMARY.md CONTRIBUTING.md CONTRIBUTORS.md \
+pandoc ../README.md ../SUMMARY.md ../CONTRIBUTING.md ../contributors.md \
    -o ./build/Preface.tex --template default
 
 pdfunite ./build/*.pdf LinuxKernelInsides.pdf
-