From 92dcbe052659746c04ad085f48344858f19516c2 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Mon, 16 Dec 2024 17:37:02 +0100 Subject: [PATCH 1/2] replace page for converter without gitlab submodule --- book/_toc.yml | 1 + book/helper_code/converter.md | 8 ++++++++ book/helper_code/intro.md | 1 + 3 files changed, 10 insertions(+) create mode 100644 book/helper_code/converter.md diff --git a/book/_toc.yml b/book/_toc.yml index 56d53cb..427397e 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -104,6 +104,7 @@ parts: - file: tools/figmaker - file: helper_code/intro.md sections: + - file: helper_code/converter.md - file: external/Useful_python_code/snippit.ipynb - file: external/Useful_python_code/extensionfildownloadreturn.ipynb - file: external/Useful_python_code/figshrinker.ipynb diff --git a/book/helper_code/converter.md b/book/helper_code/converter.md new file mode 100644 index 0000000..686d580 --- /dev/null +++ b/book/helper_code/converter.md @@ -0,0 +1,8 @@ +(tex_md_converter)= +# Convert LaTeX to Markdown + +A script is to convert LaTeX files to Markdown, for use in Jupyter Books, which has been used successfully on at least one book in the TU Delft OPEN library: [Introduction to particle and continuum mechanics, by Timon Idema](https://textbooks.open.tudelft.nl/textbooks/catalog/book/81). The author is able to convert nearly everything in this book automatically, with only a few manual adjustments needed (e.g., a special character and a figure caption). + +Depending on the number of custom LaTeX commands used in your book, you may need to adjust the script to handle them. + +Additional information about the script, along with the source code itself, is available at the following link on TU Delft GitLab: [gitlab.tudelft.nl/opentextbooks/latex-to-markdown-conversion](https://gitlab.tudelft.nl/opentextbooks/latex-to-markdown-conversion). \ No newline at end of file diff --git a/book/helper_code/intro.md b/book/helper_code/intro.md index 0886e9e..6e8f8e7 100644 --- a/book/helper_code/intro.md +++ b/book/helper_code/intro.md @@ -1,6 +1,7 @@ # Scripts for automating workflow This chapter contains a few scripts which can be useful in the book-editing process: + - [LaTeX to markdown conversion](tex_md_converter) to convert a LaTeX file into jupyter-book compatible markdown. - [Snippitall](Snippitall) to insert the same code snippet at a certain point in each md file in a specific folder and all subfolder. - [Snippitonce](Snippitonce) to insert the same code snippet at a certain point in each md file only in a specific folder. - [Extensionchecker](Extensionchecker) to identify the kind of files present in subfolder From 607cb29b723484bdd8dd41136708492e771b1385 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Tue, 17 Dec 2024 04:14:18 +0100 Subject: [PATCH 2/2] oops, forgot to update license page --- book/credits.md | 2 +- book/helper_code/converter.md | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/book/credits.md b/book/credits.md index e545095..f1982a8 100644 --- a/book/credits.md +++ b/book/credits.md @@ -31,7 +31,7 @@ Ths doesn't include small contributions from various people from within and outs Parts of this book are taken from other external resources. If an author is not listed on a particular page, it is by the Authors. The following pages are not edited by the TeachBooks Team: -- [](external/latex-to-markdown-conversion/README.md) by {cite:t}`timon_latex`, [BSD 3-clause license](https://opensource.org/license/BSD-3-Clause). +- _Work in progress: list the numerous README pages and include their respective licenses with the source code of this manual._ ## Acknowledgements Big thanks to the various colleagues and teaching assistant part of the [TeachBooks](https://teachbooks.io/) for developing tools and providing support to improve this book. diff --git a/book/helper_code/converter.md b/book/helper_code/converter.md index 686d580..b90bdcb 100644 --- a/book/helper_code/converter.md +++ b/book/helper_code/converter.md @@ -1,8 +1,10 @@ (tex_md_converter)= # Convert LaTeX to Markdown -A script is to convert LaTeX files to Markdown, for use in Jupyter Books, which has been used successfully on at least one book in the TU Delft OPEN library: [Introduction to particle and continuum mechanics, by Timon Idema](https://textbooks.open.tudelft.nl/textbooks/catalog/book/81). The author is able to convert nearly everything in this book automatically, with only a few manual adjustments needed (e.g., a special character and a figure caption). +A script is to convert LaTeX files to Markdown for use in Jupyter Books {cite:p}`timon_latex`. + +This script has been used successfully on at least one book in the TU Delft OPEN library: [Introduction to particle and continuum mechanics, by Timon Idema](https://textbooks.open.tudelft.nl/textbooks/catalog/book/81). The author is able to convert nearly everything in this book automatically, with only a few manual adjustments needed (e.g., a special character and a figure caption). Depending on the number of custom LaTeX commands used in your book, you may need to adjust the script to handle them. -Additional information about the script, along with the source code itself, is available at the following link on TU Delft GitLab: [gitlab.tudelft.nl/opentextbooks/latex-to-markdown-conversion](https://gitlab.tudelft.nl/opentextbooks/latex-to-markdown-conversion). \ No newline at end of file +Additional information about the script, along with the source code itself which is distributed under a [BSD 3-clause license](https://opensource.org/license/BSD-3-Clause), is available at the following link on TU Delft GitLab: [gitlab.tudelft.nl/opentextbooks/latex-to-markdown-conversion](https://gitlab.tudelft.nl/opentextbooks/latex-to-markdown-conversion). \ No newline at end of file