Skip to content

benseitz/md-to-tex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

md-to-tex

GitHub Action to compile Markdown documents to LaTeX and then to PDF.

The markdown files in ./<input-path>/ is compiled to ./<output-path>/content.tex. This file needs to be included inside ./<output-path>/main.tex via \include{content}.

./<output-path>/content.tex will be treated as the root file of the LaTeX project for the PDF compiler.

The comnplete content of <output-path>, including the .tex and .pdf files, are uploaded to the GitHub Action Artefacts.

It uses markedjs/marked and xu-cheng/latex-action. See their documentation for more details.

Inputs

Each input is provided as a key inside the with section of the action.

  • input-path (required)

    The path to a .md file or a directory containing multiple .md files. For example:

    - uses: benseitz/md-to-tex@v1
      with:
        input-path: ./documents
        output-path: ./latex
  • output-path (required)

    The path to a directory, containing an existing main.tex. For example:

    - uses: benseitz/md-to-tex@v1
      with:
        input-path: ./documents
        output-path: ./latex

Example

name: Build PDF from Markdown documents
on: [push]
jobs:
  build_latex:
    runs-on: ubuntu-latest
    steps:
      - name: Set up Git repository
        uses: actions/checkout@v3
      - name: Compile MD to TEX to PDF
        uses: benseitz/md-to-tex@v1
        with:
          input-path: ./documents
          output-path: ./latex

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published