mastodon.cardina1.red は、数々の独立したMastodonサーバーのうちのひとつです。サーバーに登録してFediverseのコミュニティに加わってみませんか。

サーバーの情報

3
人のアクティブユーザー

#markdown

00人投稿本日0件

Would you like to add #metadata via the command line, but feel limited because arguments to `--metadata`/`-M` are not treated as #Markdown? Here's a #LuaFilter to solve this:

function Meta (meta)
for key, value in pairs(meta) do
if type(value) == 'string' then
meta[key] = pandoc.utils.blocks_to_inlines(
pandoc.read(value).blocks)
end
end
return meta
end

Example:

pandoc -L parse-md-in-metadata.lua \
-M title='Defend democracy *now*!' …

#Markdown tip: the most commonly used syntax for horizontal rules seems to be three hyphens

---

However, this can sometimes lead to confusion with YAML block delimiters and overlaps with setext headings syntax. It can thus be clearer to use three or more asterisks instead

* * *

The interposed spaces are optional.

#Markdown syntax tip for code block attributes, yielding the best rendering results with both pandoc and on platforms such as #GitLab #GitHub, #Codeberg, etc:

``` lua {#my-id .another-class}
io.stdout:write('hi!')
```

The curly-braces syntax for attributes is ignored when read as #CommonMark, the Markdown variant used by most platforms. The above ensures that syntax highlighting still works with CommonMark, and that the other attributes get respected when converting with #pandoc.

📣 New library: panluna — write customized #Markdown parsers and use them with #pandoc.
Some Markdown syntax extensions cannot be realized via filters but require custom readers. The #panluna library provides a new method to build such readers, based on the lunamark parser. The latter was written by John MacFarlane, who also authored pandoc.
github.com/tarleb/panluna

GitHubGitHub - tarleb/panluna: Custom pandoc reader that uses the extensible lunamark Markdown parser.Custom pandoc reader that uses the extensible lunamark Markdown parser. - tarleb/panluna

>脱Word、脱Markdown、asciidocでドキュメント作成する際のアレコレ #Markdown - Qiita qiita.com/tamikura@github/item

markdown は『表でセルの結合ができない』などの理由でイマイチと言われている。Excel ではセルの結合が忌むべきものとされていたりするので、このあたり面白いところである。

まぁ、これはExcel がワードプロセッサのように使われているのがそもそも悪いためなのであるが(初期の Word があまりにも酷かったのが一因)、日本人はなんでも表で表現しようという癖がある(悪癖とまでは言わないが)

Qiita脱Word、脱Markdown、asciidocでドキュメント作成する際のアレコレ - QiitaasciidocとはasciidocはMarkdownなどのような軽量マークアップ言語の一つで、Webページなどをプレーンテキストで記述することができる(拡張子は.adoc)asciidocを使…

#Markdown has two kinds of #links:

[inline links](pandoc.org/MANUAL#inline-links)

and

[reference links][1]

[1]: pandoc.org/MANUAL#reference-li

The former is the default when producing Markdown, but the latter can be generated by calling pandoc with the `--reference-links` option. Control the placement of reference lists with `--reference-location`: either after each block, after each section, or all together at the very end of the document.

pandoc.orgPandoc - Pandoc User’s Guide

There are four ways to add #metadata to a document: in ascending order of precedence, with latter options overriding earlier options, these are:

• dedicated metadata YAML file passed via `--metadata-file`,
• metadata in the input document (e.g., #YAML blocks in #Markdown),
• entries below the `metadata` field in a defaults file, and
• values given via the command line (`--metadata` or `-M`).

Also, if a value is defined more than once in an input doc, then the last one wins.

Hi @pandoc!

I am writing my thesis in #Markdown, obviously using #Pandoc, but without using any template because I want to keep things as simple as possible.

I simply run the command pandoc -s thesis.md -C -o thesis.pdf (details in this page).

I have one problem, though: all #HTML tags used inside Markdown (such as <u>, <q>, and <cite>) are not rendered, and they disappear in the final PDF (therefore, if I underlined something with <u>, in the PDF it is not underlined).

Do you have any suggestions about how I can fix this?

Thank you so much!

Tommi’s mindMy workflow for academic writing, based on Pandoc, and using Markdown, Zotero, and Obsidian.Tommi

Make sure to enable the `gfm_auto_identifier` extension on a reader when converting to GitHub Flavored Markdown, especially when adding a Table of Contents with `--toc -s`. E.g.:
pandoc -f markdown+gfm_auto_identifiers -t gfm --toc -s

This is a bit awkward, but ensures that all links and header IDs are in the format expected by GitHub.
#Markdown #gfm #toc