Change doc output dir & fix make pdf

This commit is contained in:
John Zhao
2018-03-26 13:50:13 +08:00
parent d7271ffe07
commit 4aa6a58797
4 changed files with 18 additions and 7 deletions

View File

@@ -15,7 +15,20 @@ _detect "pdflatex" 1
source "$BASE_DIR/langs.sh"
DOXYFILE="api.doxyfile"
OUTPUT="$BASE_DIR/output"
OUTPUT="$BASE_DIR/_output"
# \usepackage{CJKutf8}
# \begin{document}
# \begin{CJK}{UTF8}{gbsn}
# ...
# \end{CJK}
# \end{document}
_texcjk() {
tex="$1"; shift;
_echo_in "add cjk to $tex"
sed -i "" -e $'s/^\\\\begin{document}$/\\\\usepackage{CJKutf8}\\\n\\\\begin{document}\\\n\\\\begin{CJK}{UTF8}{gbsn}/g' $tex
sed -i "" -e $'s/^\\\\end{document}$/\\\\end{CJK}\\\n\\\\end{document}/g' $tex
}
for lang in "${LANGS[@]}"; do
_echo_s "Build doc $lang"
@@ -27,7 +40,7 @@ for lang in "${LANGS[@]}"; do
doxygen $DOXYFILE
if [ $pdflatex_FOUND ] && [ -f "$OUTPUT/$lang/latex/Makefile" ]; then
_echo_in "doxygen make latex"
cd "$OUTPUT/$lang/latex" && make
cd "$OUTPUT/$lang/latex" && _texcjk refman.tex && make
[ -f "refman.pdf" ] && mv "refman.pdf" "../mynteye-apidoc.pdf"
fi
_echo_d "doxygen completed"

View File

@@ -58,7 +58,7 @@ PROJECT_LOGO = ../static/images/icon.png
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = ../output/zh-Hans
OUTPUT_DIRECTORY = ../_output/zh-Hans
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and