{"id":16314911,"url":"https://github.com/cebe/markdown-latex","last_synced_at":"2025-03-16T14:30:52.786Z","repository":{"id":14500177,"uuid":"17213318","full_name":"cebe/markdown-latex","owner":"cebe","description":"A markdown parser for converting markdown to LaTeX written in PHP.","archived":false,"fork":false,"pushed_at":"2021-08-28T11:38:31.000Z","size":145,"stargazers_count":50,"open_issues_count":4,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-26T13:49:39.109Z","etag":null,"topics":["hacktoberfest","latex","markdown","markdown-parser","markdown-to-pdf","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cebe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-26T14:33:00.000Z","updated_at":"2025-02-21T08:43:28.000Z","dependencies_parsed_at":"2022-09-18T05:01:19.235Z","dependency_job_id":null,"html_url":"https://github.com/cebe/markdown-latex","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebe%2Fmarkdown-latex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebe%2Fmarkdown-latex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebe%2Fmarkdown-latex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebe%2Fmarkdown-latex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cebe","download_url":"https://codeload.github.com/cebe/markdown-latex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243818192,"owners_count":20352629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","latex","markdown","markdown-parser","markdown-to-pdf","php"],"created_at":"2024-10-10T21:55:34.942Z","updated_at":"2025-03-16T14:30:52.140Z","avatar_url":"https://github.com/cebe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"markdown-latex\n==============\n\n[![Latest Stable Version](https://poser.pugx.org/cebe/markdown-latex/v/stable.png)](https://packagist.org/packages/cebe/markdown-latex)\n[![Total Downloads](https://poser.pugx.org/cebe/markdown-latex/downloads.png)](https://packagist.org/packages/cebe/markdown-latex)\n[![Build Status](https://travis-ci.org/cebe/markdown-latex.svg?branch=master)](https://travis-ci.org/cebe/markdown-latex)\n[![Code Coverage](https://scrutinizer-ci.com/g/cebe/markdown-latex/badges/coverage.png?s=db6af342d55bea649307ef311fbd536abb9bab76)](https://scrutinizer-ci.com/g/cebe/markdown-latex/)\n[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/cebe/markdown-latex/badges/quality-score.png?s=17448ca4d140429fd687c58ff747baeb6568d528)](https://scrutinizer-ci.com/g/cebe/markdown-latex/)\n\n\n\nA markdown parser for converting markdown to LaTeX written in PHP.\n\nImplementation based on [cebe/markdown][].\n\n[cebe/markdown]: https://github.com/cebe/markdown \"A markdown parser for PHP\"\n\n\nInstallation\n------------\n\nPHP 5.4 or higher is required to use it.\n\nInstallation is recommended to be done via [composer][] by adding the following to the `require` section in your `composer.json`:\n\n```json\n\"cebe/markdown-latex\": \"*\"\n```\n\nRun `composer update` afterwards.\n\n[composer]: https://getcomposer.org/ \"The PHP package manager\"\n\nUsage\n-----\n\n### In your PHP project\n\nTo use the parser as is, you just create an instance of a provided flavor class and call the `parse()`-\nor `parseParagraph()`-method:\n\n```php\n// default markdown and parse full text\n$parser = new \\cebe\\markdown\\latex\\Markdown();\n$parser-\u003eparse($markdown);\n\n// use github\n$parser = new \\cebe\\markdown\\latex\\GithubMarkdown();\n$parser-\u003eparse($markdown);\n\n// parse only inline elements (useful for one-line descriptions)\n$parser = new \\cebe\\markdown\\latex\\GithubMarkdown();\n$parser-\u003eparseParagraph($markdown);\n```\n\n### The command line script\n\nYou can use it to render this readme:\n\n    bin/markdown-latex README.md \u003e output.tex\n\nUsing github flavored markdown:\n\n    bin/markdown-latex --flavor=gfm README.md \u003e output.tex\n\nor convert the original markdown description to html using the unix pipe:\n\n    curl http://daringfireball.net/projects/markdown/syntax.text | bin/markdown-latex \u003e output.tex\n\nTo create a latex document you have to include the generated latex source in a latex document `main.tex`:\n\n```tex\n\\documentclass[a4paper, 12pt]{article}\n\n% english and utf8\n\\usepackage[british]{babel}\n\\usepackage[utf8]{inputenc}\n\n% url support\n\\usepackage{url}\n\n% make links clickable\n\\usepackage{hyperref}\n\n% code listings\n\\usepackage{listings}\n\n% include images\n\\usepackage{graphicx}\n\n% better tables using tabularx\n\\usepackage{tabularx}\n\n% support github markdown strikethrough\n% http://tex.stackexchange.com/questions/23711/strikethrough-text\n\\usepackage{ulem}\n\n\\begin{document}\n\n\t\\include{output.tex}\n\n\\end{document}\n```\n\nmake a PDF with `pdflatex main.tex`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcebe%2Fmarkdown-latex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcebe%2Fmarkdown-latex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcebe%2Fmarkdown-latex/lists"}