在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):rhwilr/markdown-documentation-template开源软件地址(OpenSource Url):https://github.com/rhwilr/markdown-documentation-template开源编程语言(OpenSource Language):TeX 96.7%开源软件介绍(OpenSource Introduction):Pandoc document templateDescriptionThis repository contains a simple template for building Pandoc documents; Pandoc is a suite of tools to compile markdown files into readable files (PDF, EPUB, HTML...). UsageInstallingIn order to use this makefile you will need to make sure that the following dependencies are installed on your system:
Folder structureHere's a folder structure for a Pandoc document:
Setup generic dataEdit the metadata.yml file to set configuration data: ---
title: My document title
author: Ralph Huwiler
rights: Creative Commons Attribution 4.0 International
language: en-US
tags: [document, my-document, etc]
abstract: |
Your summary text.
--- You can find the list of all available keys on this page. Creating chaptersCreating a new chapter is as simple as creating a new markdown file in the src/ folder; you'll end up with something like this:
Pandoc and Make will join them automatically ordered by name; that's why the numeric prefixes are being used. All you need to specify for each chapter at least one title: # Introduction
This is the first paragraph of the introduction chapter.
## First
This is the first subsection.
## Second
This is the second subsection. Each title (#) will represent a chapter, while each subtitle (##) will represent a chapter's section. You can use as many levels of sections as markdown supports. Links between chaptersAnchor links can be used to link chapters within the document: // src/01-introduction.md
# Introduction
For more information, check the [Usage] chapter.
// src/02-installation.md
# Usage
... If you want to rename the reference, use this syntax: For more information, check [this](#usage) chapter. Anchor names should be downcased, and spaces, colons, semicolons... should be
replaced with hyphens. Instead of Links between sectionsIt's the same as anchor links: # Introduction
## First
For more information, check the [Second] section.
## Second
... Or, with al alternative name: For more information, check [this](#second) section. Inserting objectsText. That's cool. What about images and tables? Insert an imageUse Markdown syntax to insert an image with a caption: ![A cool seagull.](images/seagull.png) Pandoc will automatically convert the image into a figure (image + caption). If you want to resize the image, you may use this syntax, available in Pandoc 1.16: ![A cool seagull.](images/seagull.png){ width=50% height=50% } Also, to reference an image, use LaTeX labels: Please, admire the gloriousnes of Figure \ref{seagull_image}.
![A cool seagull.\label{seagull_image}](images/seagull.png) Insert a tableUse markdown table, and use the | Index | Name |
| ----- | ---- |
| 0 | AAA |
| 1 | BBB |
| ... | ... |
Table: This is an example table. If you want to reference a table, use LaTeX labels: Please, check Table /ref{example_table}.
| Index | Name |
| ----- | ---- |
| 0 | AAA |
| 1 | BBB |
| ... | ... |
Table: This is an example table.\label{example_table} Insert an equationWrap a LaTeX math equation between This, $\mu = \sum_{i=0}^{N} \frac{x_i}{N}$, the mean equation, ... Pandoc will transform them automatically into images using online services. If you want to center the equation instead of inlining it, use double $$\mu = \sum_{i=0}^{N} \frac{x_i}{N}$$ Here's an online equation editor. OutputThis template uses Makefile to automatize the building process. Instead of using the pandoc cli util, we're going to use some make commands. Export to PDFUse this command: make pdf The generated file will be placed in build/pdf. Please, note that PDF file generation requires some extra dependencies (~ 800 MB): sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-latex-extra Export to EPUBUse this command: make epub The generated file will be placed in build/epub. Export to HTMLUse this command: make html The generated file(s) will be placed in build/html. References |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论