【问题标题】:How to resume a parent section in MediaWiki如何在 MediaWiki 中恢复父部分
【发布时间】:2014-07-30 17:27:26
【问题描述】:

我希望在创建子部分后能够在父部分中继续撰写。例如:

=section 1=
some section 1 text

==sub-section 1.1==
some sub-section 1.1 text
==sub-section 1.2==
some sub-section 1.2 text

done with sub-sections 1.1, 1.2  and want to resume more section 1

有没有办法做到这一点?我觉得总是要把所有小节都推到最后有点尴尬。

【问题讨论】:

  • 这是不可能的。

标签: mediawiki sections


【解决方案1】:

我建议通过在您的通用 css 样式表中创建新类来蒙混过关。在那里创建一个名为“subsection”的类,并让代码将该 div 部分中的文本与其周围的其余文本区分开来 ---

div#subsection {
margin: 6px;  
padding: 10px;
padding-right: 12px; 
background: yellow; 
border: 1px solid black; 
padding: 1em;
}

该示例颜色鲜艳,因此您可以更轻松地看到它是如何工作的。然后把它塞进你的页面标题下,像这样---

== Alice in Wonderland ==

Alice was beginning to get very tired of sitting by her sister on the
bank, and of having nothing to do. Once or twice she had peeped into the
book her sister was reading, but it had no pictures or conversations in
it, "and what is the use of a book," thought Alice, "without pictures or
conversations?"

<div id="subsection">
=== About Alice ===
You may have noticed Alice is a bit of a drip. 
</div>

So she was considering in her own mind (as well as she could, for the
day made her feel very sleepy and stupid), whether the pleasure of
making a daisy-chain would be worth the trouble of getting up and
picking the daisies, when suddenly a White Rabbit with pink eyes ran
close by her.

等等。生成 TOC 时,它应该将该单独的位列为父标题的子部分。那里的格式很奇怪——你可能想对浮动和边距和其他东西大惊小怪——但希望它能让你大致了解该做什么。您可以根据需要使小节样式不显眼,这样它就可以与页面的其余部分无缝融合。

这不是最方便的代码,但出于样式和页面布局的目的,它可以工作。这也是制作侧边栏的好方法。

【讨论】:

    猜你喜欢
    • 2011-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-12
    • 2011-03-26
    • 1970-01-01
    • 2013-08-12
    相关资源
    最近更新 更多