Questions tagged [markdown]

A markup language that focuses on human readability, widely used on the Web.

Markdown is a markup language emphasising the ease of writing and reading. Like many great things, it comes in many flavors and variants, but it generally provides the basic formatting options:

  • Text emphasis (bold and/or italic)
  • Paragraphs
  • Lists (bulleted, numbered)
  • Code
  • Multi-level headers
  • ...

Mardown interpreter usually translate the code into HTML before rendering.

Example

## Header2: How to write lists

**NB**: This text is emphasised in *italic* or further in **bold**!

### Unordered list
 - Item1
 - Item2
 - Item3

### Ordered list
 1. Item1
 2. Item2
 3. Item3

StackOverflow and Stack Exchange

Note that a custom variant of markdown is used consistently across all the websites of the Stack Exchange network.

53 questions
269
votes
34 answers

Markdown Viewer

I found a file formatted with Markdown. Could you suggest what viewer I could use to view this type of file? Hopefully one without a GUI, if it's possible. I am looking for a viewer that could parse markdown file format that does not need any…
Amree
  • 3,037
  • 4
  • 19
  • 14
18
votes
3 answers

Markdown to PDF conversion in Pandoc: making pages landscape?

I am converting a document from Pandoc markdown to .pdf. I run the conversion like this, and everything works fine: pandoc test.MD -f markdown -o test.pdf However, I would like pandoc to output my PDF pages in landscape, rather than portrait,…
patrick
  • 1,002
  • 1
  • 10
  • 16
17
votes
2 answers

Copy markdown input to the clipboard as rich text

I'm about to get involved in some collaborative prose writing with a friend of mine via email. As a regular person, he will of course be using MS Word document formats; as a massive nerd, I prefer to use markdown when writing on a computer. What I…
evilsoup
  • 6,727
  • 3
  • 33
  • 40
14
votes
1 answer

generate a hyperlinked table of contents and insert into existing PDF

I have an existing PDF (without any corresponding source file), and a text file which is a list of items referencing sections within the PDF file, along with a page number for each item. I would like to generate a new PDF which starts with a…
Adam Spiers
  • 892
  • 7
  • 14
12
votes
1 answer

Save HTML from clipboard as markdown text

I want to be able to highlight a section of a web page and copy it to the clipboard then save it to my local disk as markdown. I need an efficient way to do that. My current cumbersome method is: highlight section and copy to clipboard open Libre…
MountainX
  • 17,168
  • 59
  • 155
  • 264
9
votes
4 answers

How do you search and print multiple matches per line with grep -o?

I have a mkdocs instance and am writing a script to print internal links in a page. I cannot get grep to print only the matches if there are multiple per line. This is what I currently have: $ grep -Eon…
Jake
  • 101
  • 1
  • 2
9
votes
2 answers

Avoid reformatting bullet lists with formatoptions+=a

I am using Vim with formatoptions +=a as described in Vim: word wrap for documents to format lines automatically while I write documents, expecially Markdown documents. My problem is that Vim wants to reformat also bullet lists because there is…
gioele
  • 2,090
  • 2
  • 22
  • 30
8
votes
1 answer

convert markdown to pdf in commandline

what is the simplest tool to convert markdown to pdf in commandline? I have found howtos where people suggest to use pandoc, but the required packages need gigabytes of dependencies: apt-get install pandoc texlive-latex-base…
400 the Cat
  • 819
  • 4
  • 37
  • 85
8
votes
4 answers

The best Linux Open-source wiki with native support for Windows (NTLM) authentication

I need to set up a wiki for our engineering group; we are part of an Enterprise-wide Windows Active Directory domain. Most of the corporate IT applications use NTLM to authenticate (automatically via Internet Exploder); while I'm not part of…
7
votes
2 answers

How to compile a selection of Markdown documents

Processing a single Markdown file to HTML: pandoc -f markdown -t html inputfile.md Although I can use Pandoc like this to process individual Markdown files, I want to compile a list of selected Markdown files and process them to a single file. If I…
johntait.org
  • 1,322
  • 4
  • 12
  • 19
7
votes
4 answers

Get Apache to serve Markdown as HTML

Like many people, I prefer writing in Markdown - is there a mod_markdown or similar that will let Apache serve Markdown content but render as HTML ?
warren
  • 1,778
  • 3
  • 21
  • 38
6
votes
1 answer

How can I git diff markdown (.md) files

I have some markdown files but I can't git diff them. No result at the command line and not supported in gitg (visual git) Is that possible with the files as they are, without converting them to something else?
Michael Durrant
  • 41,213
  • 69
  • 165
  • 232
5
votes
1 answer

Replace every odd or even occurrence of a pattern in a file

I want to replace either every odd or even occurrence of a pattern. Look at the following example: $ echo aaaaa | sed -e 's/a/b/' -e 's/a/c/' -e 's/a/b/' -e 's/a/c/' -e 's/a/b/' bcbcb Is there some command that can do this more concisely? What I'm…
evilsoup
  • 6,727
  • 3
  • 33
  • 40
5
votes
2 answers

Generic Preprocessor adds extra whitespace

Following up on this article I use GPP to empower Markdown parser pandoc with some macros. Unfortunately, gpp seems to copy all whitespace into the result. For example, consider file test.md % Title % Raphael % 2012 \lorem \ipsum with…
Raphael
  • 2,035
  • 1
  • 21
  • 34
5
votes
1 answer

Is there an easy way to strip all markdown from a text file from the command line?

Is there an easy way to strip all markdown from a text file from the command line? A solution that is installable with apt is preferable. But failing that apt is better than pip is better than gem is better than npm (for me).
Att Righ
  • 1,176
  • 11
  • 29
1
2 3 4