Skip to content

(WIP) Feature/ieee format output #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 53 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ markdown: dst dst/index.html dst/style.css

server: dst dst/style.css dst/index.md dst/sitemap.xml



dst/index.html: dst/index.md src/references.bib src/template/index.html dst/style.css
pandoc dst/index.md --template src/template/index.html -s --table-of-contents --bibliography=src/references.bib --citeproc --columns 1000 -H src/header.html -V lang=en -o $@

dst/index_shortcode.md: dst/index.md
node addons/emoji-to-shortcode/main.js dst/index.md > $@

dst/index.pdf: dst/index_shortcode.md src/references.bib
cd dst && pandoc -f markdown+emoji -L../addons/latex-emoji.lua index_shortcode.md -s -N --pdf-engine=lualatex --shift-heading-level-by=-1 --bibliography=../src/references.bib --citeproc -o index.pdf
# use index_tex.pdf instead.
# This has a bug, citations in raw LaTeX blocks show up as ?
# (e.g. \cite{yin-etal-2021-including} in fig:continuous)
# https://github.com/cleong110/sign-language-processing.github.io/issues/26#issuecomment-2192220912
# dst/index.pdf: dst/index_shortcode.md src/references.bib
# cd dst && pandoc -f markdown+emoji -L../addons/latex-emoji.lua index_shortcode.md -s -N --pdf-engine=lualatex --shift-heading-level-by=-1 --bibliography=../src/references.bib --citeproc -o index.pdf

dst/thesis.pdf: dst/index_shortcode.md src/references.bib
#pandoc -f markdown+emoji -L addons/latex-emoji.lua src/thesis/main.tex -s -N --pdf-engine=lualatex --shift-heading-level-by=-1 --bibliography=src/references.bib --citeproc -o index.pdf
Expand Down Expand Up @@ -59,7 +65,7 @@ overleaf: dst/sections tmp
rm -f tmp/overleaf/parts/background/assets/.DS_Store
cd tmp/overleaf && \
git add -A && \
git commit -am "autoamtic sections upload" && \
git commit -am "automatic sections upload" && \
git push

#
Expand All @@ -69,12 +75,55 @@ overleaf: dst/sections tmp
# mkdir $@
#
dst/index_emoji.tex: dst dst/index_shortcode.md src/references.bib
pandoc -f markdown+emoji -L addons/latex-emoji.lua dst/index_shortcode.md --shift-heading-level-by=-1 -s -N --natbib -o $@
pandoc -f markdown+emoji \
-L addons/latex-emoji.lua dst/index_shortcode.md --shift-heading-level-by=-1 -s -N --natbib --bibliography=references.bib -o $@

dst/index.tex: dst/index_emoji.tex src/replace_gifs.py
python src/replace_gifs.py dst/index_emoji.tex $@

# index to .tex, then compile to PDF
dst/index.pdf: dst/index.tex
cp src/references.bib dst
cd dst && lualatex index
cd dst && bibtex index
cd dst && lualatex index
cd dst && lualatex index


# TODO: output in IEEE format.
# IEEE requires LaTeX format.
dst/ieee_journal_2024_emoji.tex: dst dst/index_shortcode.md src/references.bib
cp addons/ieee_journal_2024_template.latex dst
cp addons/bibliography.csl dst
# cp src/styles/ieee-transactions-on-emerging-topics-in-computing.csl dst
pandoc -f markdown+emoji \
-L addons/latex-emoji.lua dst/index_shortcode.md \
--shift-heading-level-by=-1 \
-s \
-N \
--bibliography=dst/references.bib \
--template=dst/ieee_journal_2024_template.latex \
--csl=dst/bibliography.csl \
-o $@

# requires imageio library
dst/ieee_journal_2024.tex: dst/ieee_journal_2024_emoji.tex
python src/replace_gifs.py dst/ieee_journal_2024_emoji.tex $@


dst/ieee_journal_2024.pdf: dst/ieee_journal_2024.tex
cp src/references.bib dst
cd dst && lualatex ieee_journal_2024
cd dst && bibtex ieee_journal_2024
cd dst && lualatex ieee_journal_2024
cd dst && lualatex ieee_journal_2024


clean:
rm -r dst
rm -r tmp
#
#
#tex/references.bib: src/references.bib tex
# cp src/references.bib $@

Loading