Skip to content

Commit

Permalink
фильтр upper
Browse files Browse the repository at this point in the history
  • Loading branch information
true-grue committed Nov 26, 2021
1 parent 62a7ef4 commit 0f50331
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

## Благодарности

* [gostdown](https://gitlab.iaaras.ru/iaaras/gostdown) за CSL-файл.
Проекту [gostdown](https://gitlab.iaaras.ru/iaaras/gostdown) за CSL-файл.

Студентам:

* [TMentosT](https://github.com/TMentosT) за демонстрацию работы с шаблонным docx-файлом.
* [HaidesAidoseus](https://github.com/HaidesAidoseus) за рисунки.
19 changes: 19 additions & 0 deletions filters/upper.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- we use preloaded text to get a UTF-8 aware 'upper' function
local text = require('text')

function Header(el)
if el.level == 1 then
return pandoc.walk_block(el, {
Str = function(el)
return pandoc.Str(text.upper(el.text))
end })
end
end

function Link(el)
return el.content
end

function Note(el)
return {}
end
10 changes: 9 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ HTML_FILE = build/kisscm.html
PDF_FILE = build/kisscm.pdf
DOCX_FILE = build/kisscm.docx

OPTIONS = -d default.yaml --from=markdown+tex_math_single_backslash+tex_math_dollars+raw_tex --toc --resource-path=images -F pandoc-crossref --columns=1 --citeproc --lua-filter=filters/pagebreak.lua
OPTIONS = -d default.yaml \
--from=markdown+tex_math_single_backslash+tex_math_dollars+raw_tex \
--toc \
--resource-path=images \
-F pandoc-crossref \
--columns=1 \
--citeproc \
--lua-filter=filters/pagebreak.lua \
--lua-filter=filters/upper.lua

all: html pdf docx

Expand Down
2 changes: 1 addition & 1 deletion md/bibliography.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
\newpage
# Литература {-}
# Список литературы {-}

0 comments on commit 0f50331

Please sign in to comment.