2010-01-04 19 views
87

我正在使用Symphony CMS,它使用Markdown進行文章撰寫。我需要做一個本傑明富蘭克林引用的引文,希望引用下面的引文,但現在它所做的只是引用全部引用。在降價語法中如何做到這一點?引用使用Markdown語法的blockquote作者

回答

116

Markdown沒有專用的引用語法。

最好的辦法是這樣的:

> Quote here. 
> 
> -- <cite>Benjamin Franklin</cite> 

導致:這裏

報價。

- 本傑明·富蘭克林

+19

我會用一個—,而不是兩個連字符。 – Evan 2010-01-05 00:13:59

+2

@Evan Style完全取決於用戶。我的Markdown安裝包括Smartypants,它變成了一個emdash。 – ceejayoz 2010-01-05 03:35:44

+2

引用不正確的標記人的名字。 http://dev.w3.org/html5/spec/single-page.html#the-cite-element – Atadj 2012-09-08 12:48:21

58
> The secret to creativity is knowing how to hide your sources. 
> -- <cite>[Albert Einstein][1]</cite> 

[1]:http://www.quotedb.com/quotes/2112 

如果你有一個風格手冊,用它的指導方針,以確定究竟在何處放置引文等

降價+聰明的傢伙的輸出,用於以上是

創造力的祕訣是知道如何隱藏你的來源。 - Albert Einstein

+2

「我會用'—'而不是兩個連字符。」 - - @Evan,http://stackoverflow.com/a/2002150/934739#comment1923634_2002150。 – 2016-09-10 08:10:13

+0

要將引文推送到換行符,請在前一行末尾添加2個空格,例如上面在「來源」後面加上2個空格。 – 2016-09-10 08:19:26

1

我個人更喜歡在blockquote中嵌套blockquote。

這裏是我喜歡做它:

> Quote here. 
> 
>> <cite>Benjamin Franklin</cite> 

輸出你如何風格都各不相同,但使用普通的`醇github上看起來是這樣的,我個人認爲好看!

enter image description here

https://gist.github.com/nahtnam/63e3a14acd0f02313ec0

+6

儘管Markdown預覽器看起來不錯,但這在語義上並不正確。 – joeyhoer 2016-03-31 13:19:33

2

在此處添加另一參考樣本。從https://en.wikipedia.org/wiki/Special:CiteThisPage

> Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the software is improved to pass the new tests, only. 
> 
> --- [Test-driven development. (2016, November 20). In Wikipedia, The Free Encyclopedia. Retrieved 23:45, November 20, 2016](https://en.wikipedia.org/w/index.php?title=Test-driven_development&oldid=750634597) 

產生產生如下:

測試驅動開發(TDD)是一個軟件開發的過程,它依賴於一個極短的開發週期的重複:要求都變成了非常具體的測試用例,那麼只有改進軟件才能通過新的測試。

--- Test-driven development. (2016, November 20). In Wikipedia, The Free Encyclopedia. Retrieved 23:45, November 20, 2016

相關問題