在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):cebe/markdown-latex开源软件地址(OpenSource Url):https://github.com/cebe/markdown-latex开源编程语言(OpenSource Language):PHP 77.9%开源软件介绍(OpenSource Introduction):markdown-latexA markdown parser for converting markdown to LaTeX written in PHP. Implementation based on cebe/markdown. InstallationPHP 5.4 or higher is required to use it. Installation is recommended to be done via composer by adding the following to the "cebe/markdown-latex": "*" Run UsageIn your PHP projectTo use the parser as is, you just create an instance of a provided flavor class and call the // default markdown and parse full text
$parser = new \cebe\markdown\latex\Markdown();
$parser->parse($markdown);
// use github
$parser = new \cebe\markdown\latex\GithubMarkdown();
$parser->parse($markdown);
// parse only inline elements (useful for one-line descriptions)
$parser = new \cebe\markdown\latex\GithubMarkdown();
$parser->parseParagraph($markdown); The command line scriptYou can use it to render this readme:
Using github flavored markdown:
or convert the original markdown description to html using the unix pipe:
To create a latex document you have to include the generated latex source in a latex document \documentclass[a4paper, 12pt]{article}
% english and utf8
\usepackage[british]{babel}
\usepackage[utf8]{inputenc}
% url support
\usepackage{url}
% make links clickable
\usepackage{hyperref}
% code listings
\usepackage{listings}
% include images
\usepackage{graphicx}
% better tables using tabularx
\usepackage{tabularx}
% support github markdown strikethrough
% http://tex.stackexchange.com/questions/23711/strikethrough-text
\usepackage{ulem}
\begin{document}
\include{output.tex}
\end{document} make a PDF with |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论