-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07e64b7
commit 079342b
Showing
36 changed files
with
2,795 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# pandoc Support | ||
# | ||
|
||
find_program(PANDOC_EXECUTABLE | ||
NAMES pandoc | ||
) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Pandoc DEFAULT_MSG | ||
PANDOC_EXECUTABLE) | ||
|
||
if(PANDOC_FOUND) | ||
# check for eisvogel.latex | ||
execute_process( | ||
COMMAND ${PANDOC_EXECUTABLE} --version | ||
OUTPUT_VARIABLE pandoc_output | ||
RESULT_VARIABLE result | ||
) | ||
string(REGEX MATCH "User data directory: ([^\n\r]*)" _ ${pandoc_output}) | ||
|
||
if (NOT CMAKE_MATCH_COUNT) | ||
string(REGEX MATCH "Default user data directory: ([^ ]+)" _ ${pandoc_output}) | ||
set(EISVOGEL_TEMPLATE_PATH "${CMAKE_MATCH_1}/templates/eisvogel.latex") | ||
else() | ||
set(EISVOGEL_TEMPLATE_PATH "${CMAKE_MATCH_1}/templates/eisvogel.latex") | ||
endif() | ||
|
||
if(EXISTS "${EISVOGEL_TEMPLATE_PATH}") | ||
message(STATUS "Found eisvogel template at ${EISVOGEL_TEMPLATE_PATH}") | ||
else() | ||
message(STATUS "eisvogel template not found at ${EISVOGEL_TEMPLATE_PATH}. The generation process will be skipped.") | ||
set(generation FALSE) | ||
endif() | ||
|
||
endif() | ||
|
||
mark_as_advanced(PANDOC_EXECUTABLE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# | ||
# pdflatex Support | ||
# | ||
|
||
find_program(PDFLATEX_EXECUTABLE | ||
NAMES pdflatex | ||
) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Pdflatex DEFAULT_MSG | ||
PDFLATEX_EXECUTABLE) | ||
|
||
if(PDFLATEX_FOUND) | ||
|
||
# check for kpsewhich | ||
find_program(KPSEWHICH kpsewhich) | ||
if(NOT KPSEWHICH) | ||
set(generation FALSE) | ||
message(STATUS "kpsewhich not found. The generation process will be skipped.") | ||
return() | ||
endif() | ||
|
||
# check for packages | ||
set(check_next TRUE) | ||
macro(check_latex_package PACKAGE_NAME) | ||
if(check_next) | ||
execute_process( | ||
COMMAND ${KPSEWHICH} ${PACKAGE_NAME} | ||
OUTPUT_VARIABLE PATH | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
if(NOT PATH) | ||
set(generation FALSE) | ||
message(STATUS "${PACKAGE_NAME} not found. The generation process will be skipped.") | ||
set(check_next FALSE) # Disable further checks | ||
else() | ||
message(STATUS "${PACKAGE_NAME} found at: ${PATH}") | ||
endif() | ||
endif() | ||
endmacro() | ||
|
||
# Use the macro to check for packages | ||
check_latex_package("footnote.sty") | ||
check_latex_package("footnotebackref.sty") | ||
check_latex_package("pagecolor.sty") | ||
check_latex_package("hardwrap.sty") | ||
check_latex_package("mdframed.sty") | ||
check_latex_package("sourcesanspro.sty") | ||
check_latex_package("ly1enc.def") | ||
check_latex_package("sourcecodepro.sty") | ||
check_latex_package("titling.sty") | ||
check_latex_package("csquotes.sty") | ||
check_latex_package("zref-abspage.sty") | ||
check_latex_package("needspace.sty") | ||
|
||
endif() | ||
|
||
mark_as_advanced(PDFLATEX_EXECUTABLE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.