內容簡介
Lineate 提供了兩個簡單的短碼,可輕鬆在 WordPress 編輯器中格式化詩歌。
第一個是 stanza 短碼。為了標示一個 stanza,請使用以下語法將相應的文字包裹在 [stanza] ... [/stanza] 短碼中:
[stanza]
In Xanadu did Kubla Khan
A stately pleasure-dome decree :
Where Alph, the sacred river, ran
Through caverns measureless to man
Down to a sunless sea.
[/stanza]
可以在 Lineate 設置頁面上設置各個 stanza 之間的垂直距離。
第二個短碼用於標示 stanza 內的單行。為了確保上面的示例中每行都被正確呈現,請使用以下 [lineate] 短碼:
[stanza]
[lineate]In Xanadu did Kubla Khan[/lineate]
[lineate]A stately pleasure-dome decree :[/lineate]
[lineate]Where Alph, the sacred river, ran[/lineate]
[lineate]Through caverns measureless to man[/lineate]
[lineate]Down to a sunless sea.[/lineate]
[/stanza]
在視覺化編輯器中新增了一個按鈕,可自動將單行包裹在 lineate 短碼之內。為使用此按鈕,請選擇一行文本,並點擊帶有斜杠的按鈕。
lineate 短碼還支持縮進或“下降”行,有三個縮進級別。
每個縮進的水平寬度通過 Lineate 設置頁面上的基本縮進值設置。默認值為 30 個像素。
為了標示下降的行,請包含以下縮進屬性:
[stanza]
[lineate]In Xanadu did Kubla Khan[/lineate]
[lineate indent=1]A stately pleasure-dome decree :[/lineate]
[lineate indent=2]Where Alph, the sacred river, ran[/lineate]
[lineate indent=3]Through caverns measureless to man[/lineate]
[/stanza]
在此示例中,假定基本縮進設置為 20 個像素,則 stanza 中的第二行將距離左邊緣 20 像素,第三行將距離左邊緣 40 像素,第四行將距離左邊緣 60 像素。
外掛標籤
開發者團隊
原文外掛簡介
Lineate provides two simple shortcodes for easily formatting poetry in the WordPress editor.
The first is the stanza shortcode. To indicate a stanza, wrap the appropriate text the [stanza]…[/stanza] shortcode as follows:
[stanza]
In Xanadu did Kubla Khan
A stately pleasure-dome decree :
Where Alph, the sacred river, ran
Through caverns measureless to man
Down to a sunless sea.
[/stanza]
The amount of vertical distance between stanzas can be set on the Lineate settings page.
The second shortcode is for indicating individual lines within a stanza. To ensure that each line in the above example was rendered correctly, you would use the [lineate] shortcode as follows:
[stanza]
[lineate]In Xanadu did Kubla Khan[/lineate]
[lineate]A stately pleasure-dome decree :[/lineate]
[lineate]Where Alph, the sacred river, ran[/lineate]
[lineate]Through caverns measureless to man[/lineate]
[lineate]Down to a sunless sea.[/lineate]
[/stanza]
A new button is included in the visual editor for automatically wrapping individual lines in the lineate shortcode. To use the button, hightlight a single line, and click the button with the line break symbol (a red slash).
The lineate shortcode also supports indented or “dropped” lines, with three levels of indentation.
The horizontal width of each indent is set through the base indent value on the Lineate settings page. The default value is 30 pixels.
To indicate dropped lines, include the indent attribute as follows:
[stanza]
[lineate]In Xanadu did Kubla Khan[/lineate]
[lineate indent=1]A stately pleasure-dome decree :[/lineate]
[lineate indent=2]Where Alph, the sacred river, ran[/lineate]
[lineate indent=3]Through caverns measureless to man[/lineate]
[/stanza]
In this example, assuming the base indent was set at 20 pixels, the second line in the stanza would be 20 pixels from the left margin, the third line would be 40 pixels from the left margin, and the fourth line would be 60 pixels from the left margin.
