conf/printstyle.css
多くの他のプラグインの機能を兼ね備えた普遍的なプラグイン。Wiki テキストをコンテナ(div 又は span)で包み込みます。そのコンテナに対して、クラス(予め設定された様々なクラスの中から選択)・幅・方向を指定された言語を付与します。
Compatible with DokuWiki
2010-11-07 "Anteater", 2011-05-25 "Rincewind", 2012-01-25 "Angua", 2012-10-13 "Adora Belle", "Weatherwax", 2013-12-08 "Binky", 2014-05-05 "Ponder Stibbons", 2014-09-29 "Hrun", 2015-08-10 "Detritus"
多くの他のプラグインの機能を兼ね備えた普遍的なプラグイン。Wiki テキストをコンテナ(div 又は span)で包み込みます。そのコンテナに対して、クラス(予め設定された様々なクラスの中から選択)・幅・方向を指定された言語を付与します。
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
This extension is not in the 'plugin' or 'template' namespace and is therefore ignored.
Similar to adhoctags, adhocwrap, admnote, alertbox, alignment, anchor, block, bootnote, bootswrapper, box, box2, button, class, clearer, clearfloat, color, columnlist, columns, comment, commentsrc, commentsyntax, div_span_shorthand, divalign, divalign2, emphasis, floatdiv, fontcolor, fontfamily, fontsize, fontsize2, hide, highlight, htmlcomment, htmldetailstag, important_paragraf, importanttext, instructions, jokuwiki, lang, layout, ltr, mikioplugin, noprint, note, outdent, pagebreak, passwordgrey, qna, side_note, spoiler, styler, tab, tablelayout, tablewidth, tip, typography, wpre
Needed for jorgchart, lastcomp, newsboard, orgchart, pdftools, togglewrap, wrapadd
Wiki テキストをコンテナ(div 又は span)で包み込みます。 そのコンテナに対して、以下を付与します。
これは、他の潜在的プラグインの多くを置き換えて、私のの控え目な意見では、多くのより良い代替手段です。
完全に代替可能:class プラグイン, clearfloat プラグイン, div_span_shorthand プラグイン, divalign2 プラグイン, divalign プラグイン, emphasis プラグイン, hide プラグイン, important_paragraf プラグイン, importanttext プラグイン, lang プラグイン, ltr プラグイン, noprint プラグイン, pagebreak プラグイン, side_note プラグイン, tip プラグイン, wpre プラグイン
部分的に代替可能:box プラグイン, button プラグイン, color プラグイン, columns, fontcolor, fontfamily, fontsize2, fontsize, highlight, layout, note, styler, tab, tablewidth, typography
基本構文:
<WRAP classes #id width :language> "big" content </WRAP> or <block classes #id width :language> "big" content </block> or <div classes #id width :language> "big" content </div>
上の例では <WRAP>(あるいは <block> や <div>)を div
を作成し、段落・リスト・テーブル等を包み込む“大きな”容器として使用します。
<wrap classes #id width :language>"small" content</wrap> or <inline classes #id width :language>"small" content</inline> or <span classes #id width :language>"small" content</span>
下の例では <wrap>(あるいは <inline> や <span>)を span
を作成し、段落・リスト・テーブル等を包み込む“小さな”容器として使用します。
Since version 2013-06-13 there is also a shorthand syntax (for wraps without content):
<WRAP classes #id /> or <block classes #id /> or <div classes #id />
and
<wrap classes #id /> or <inline classes #id /> or <span classes #id />
Please note, some things won't work with spans: alignments (including alignments generated by changing the text direction), multi-columns and widths if the according wrap isn't floated as well.
プラグインにはサンプルページが付属しています。 このページは多くの例を解説し、デフォルトテンプレート上では次のようになります(下記参照)。
現在以下のクラスが使用できます:
クラス名 | 説明/注釈 |
---|---|
columns – 類似プラグイン columns, side_note, styler, tip | |
column | LTR 言語では left と同じ。RTL 言語では right と同じ。 |
left | column と同じで、容器を左寄せします。 |
right | 容器を右寄せします。 |
center | 容器を水平方向の真ん中寄せします。 |
col2 ..col5 | 文字情報を多段組み(2段~5段)で表示します。新しいブラウザ (Firefox, Chrome, Safari) でしか機能しません。 |
widths – 実験扱い 期待通りに動作しない可能性あり。モバイル対応を含む。 | |
half | 一行二列に適合。二個組みで使用すべき。 |
third | 一行三列に適合。三個組みで使用すべき。 |
quarter | 一行四列に適合。四個組みで使用すべき。 |
alignments – 類似プラグイン divalign, columns, styler – span では機能しない! | |
leftalign | 文字情報を左揃えします。 |
rightalign | 文字情報を右揃えします。 |
centeralign | 文字情報を中央揃します。 |
justify | 文字情報を両端揃えします。 |
boxes and notes – 類似プラグイン box, note, tip | |
box | 容器の周囲に枠を作成(style.ini の色を使用する) |
info (最初のバージョンでは information ) | 情報アイコン付きの青色の枠を作成 |
important | 重要アイコン付きのオレンジ色の枠を作成 |
alert ( 以前のバージョンでは warning ) | 警告アイコン付きの赤色の枠を作成 |
tip | ヒントアイコン付きの黄色の枠を作成 |
help | ヘルプアイコン付きの紫色の枠を作成 |
todo | TODOアイコン付きのシアン色の枠を作成 |
download | ダウンロードアイコン付きの緑色の枠を作成 |
round | 背景色か縁取りのある全ての容器に角丸を与える(新しいブラウザしか有効になりません。例:IE 以外) |
danger | 赤色の危険メモを作成 |
warning | オレンジ色の警告メモを作成 |
caution | 黄色の注意メモを作成 |
notice | 青色の注記メモを作成 |
safety | 緑色の安全メモを作成 |
marks – 類似プラグイン emphasis, important_paragraf, importanttext | |
hi | marks text as highlighted |
lo | marks text as less significant |
em | marks text as especially emphasised |
miscellaneous | |
clear | 類似プラグイン clearfloat。div 要素(例えば、大文字の <WRAP> )と一緒に使用する必要がある。 |
tabs | リンク一覧を包み込んだ場合、タブとして表示します |
hide | CSS による文字情報の非表示(文字情報はソースコード内や古いブラウザには表示され、検索可能です) |
noprint | 文字情報を画面上は表示、印刷上は非表示。類似プラグイン noprint |
onlyprint | 文字情報を印刷上は表示、画面上は非表示 |
pagebreak | 印刷時に強制改ページ(画面上は非表示)。類似プラグイン pagebreak |
nopagebreak | 印刷時に改ページを回避(画面上は非表示) |
spoiler | 強調表示した時だけ現れるように、白色背景上に白色で文字情報を表示。類似プラグイン hide |
indent | 文字情報をインデント。tab の代わりに使用可能 |
outdent | 文字情報をレベル上げ。outdent の代わりに使用可能 |
prewrap | フォーマットされたコードブロック内で、文字情報を折り返す。類似プラグイン wpre |
段組や枠の中のテーブルは常に 100% 幅です。これはテーブルの位置や大きさを決定できることを意味します。 tablewidth プラグインを部分的に代替可能です。
テンプレートによっては、幾つかのクラスを調整する必要があります。暗いテーマや重い色のテーマな場合、hi
lo
em
クラスは特に必要です。
クラスは簡単に調整・拡張可能です。すべての要望を受け入れます。
全ての大文字 <WRAP> 容器で有効幅を設定できます: %, px, em, ex, pt, pc, cm, mm, in
。クラスの前・後・中の幅を設定します:例)
<WRAP someclass 50% anotherclass>...
また half
, third
, quarter
という幅のキーワードも利用できます。
しかしまだ実験扱いで、期待通りに動作しないこともあります。 例えば、
<WRAP group> <WRAP half column>...</WRAP> <WRAP half column>...</WRAP> </WRAP>
は横二列になりますが、小さな画面やモバイル機器では下に折り返されます。
以下のように、言語コードに続けてコロンを追加するだけで、容器の中の言語と文章の向きを変更できます:
<wrap :en>This text is explicitly marked as English.</wrap>
文章の向き(rtl
右から左、ltr
左から右)は、自動的に挿入され、完全に言語に依存します。現在サポートしている言語のリストは次から取得しています:http://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code
デフォルトとは異なる方向で文書情報を表示したい場合、div 要素(大文字の <WRAP>
)を使う必要があります。そうしないと文章の向きは変更されません。
これはltr プラグインやlang プラグインの良い代替になります。
このプラグインのデモはdemo.selfthinker.orgにあります。
ロシア語のサンプル(デモ)(2011-05-15 バージョン用)ソース。
Option | Description | Default value |
---|---|---|
noPrefix | Which (comma separated) class names should be excluded from being prefixed with “wrap_” | tabs, group |
restrictedClasses | restrict usage of plugin to these (comma separated) classes | (empty) |
restrictionType | restriction type, specifies if classes above shall be included or excluded | 0 |
syntaxDiv | Which syntax should be used in the toolbar picker for block wraps? | WRAP (other choices: div, block) |
syntaxSpan | Which syntax should be used in the toolbar picker for inline wraps? | wrap (other choices: span, inline) |
darkTpl | Optimise colours for dark templates? | 0 |
Since version 2015-06-13 the Wrap plugin supports exporting most of its functionality/styling to ODT when using at least version 2015-06-29 of the ODT Plugin. By default, Wrap syntax will be exported to ODT using 'print' CSS styles. This means the exported Wrap elements will look the same when printing a wiki page. If you want to have the ODT exported Wrap elements look like displayed in the browser (i.e. with 'screen' CSS styles), then use the following ODT plugin configuration settings:
If you prefer a user defined CSS style for the Wrap ODT export, then simply place a file 'odt.css' into the Wrap plugin folder with your own CSS code (and set config setting 'media_sel' to 'print').
Here is what is currently not supported:
編集画面のツールバー内の Wrap 選択は汎用性の高い Wrap 構文を追加します。
<WRAP clear></WRAP>
を作成します。
If you like to add your own classes and styles to the plugin, you can simply add the styles for your class preceded by “wrap_
” to your user styles. Please note, any classes need to be lower case.
例)<WRAP myclass>
が必要な場合、conf/userstyle.css
ファイルを編集(ない場合は作成)し、style 定義と共に .wrap_myclass{}
を追加します。
必要があれば以下のファイルを編集します。
conf/userprint.css
1) ファイルconf/userrtl.css
2) ファイルconf/userall.css
3) ファイル)全ての使用ファイルに対するアクセス権は、オリジナルの DokuWiki のファイルと同じにする必要があります。
バージョン 2010-03-14 以降、“wrap_” を前置した特定のクラス名を除外することも可能です。 設定管理において、“noPrefix” という設定オプションの中にカンマ区切りのクラス名リストを追加するだけです。
style.css 内
.dokuwiki div.wrap_note{ /* added */ background-color: #eee; color: #000; padding: .5em .5em .5em .5em; margin-bottom: 1em; overflow: hidden; }
Dokuwiki ページ内:
<WRAP note>...</WRAP>
Here are some useful wrap extensions created by users of this plugin.
旧タイポグラフィクラスは 2011-05-15 バージョンで削除されました。 類似の機能が必要な場合、代わりに block プラグインを使って下さい。 又は、自分の style を使って、(custom styles による拡張 を参考に)自分の style にコピーすることができます。
(プラグイン開発者向け情報)
2011-05-15 バージョンから、他のプラグインにクラスや幅、言語/文章の向きを追加できるヘルパープラグインを含んでいます。
// get lang from wrap helper plugin $lang = ''; if(!plugin_isdisabled('wrap')) { $wrap = plugin_load('helper', 'wrap'); $attr = $wrap->getAttributes($data); if($attr['dir']) $lang = ' lang="'.$attr['lang'].'" xml:lang="'.$attr['lang'].'" dir="'.$attr['dir'].'"'; } // add lang to your plugin's output $renderer->doc .= '<span '.$lang.' class="foo">';
getAttributes()
は “classes #id width :language” を持った文字列を想定し以下の配列を返します。
$attr['class']
: CSS クラス$attr['id']
: CSS ID$attr['width']
: 幅$attr['lang']
and $attr['dir']
: 言語と文章の向き// get attributes from wrap helper plugin $attr = ''; if(!plugin_isdisabled('wrap')) { $wrap = plugin_load('helper', 'wrap'); $attr = $wrap->buildAttributes($data, 'additionalClass'); } // add those attributes to your plugin's output $renderer->doc .= '<div '.$attr.'">';
buildAttributes()
上記と同じ “classes #id width :language” を持った文字列と、プラグインが最良する必要のある独自の CSS クラスを持っている場合、追加のクラスを設定するオプション文字列を想定します。
HTMLに用意された全ての属性と文字列を返します。
各言語に翻訳し、言語ファイルを更新して下さい。 翻訳すべき2つのファイルがあります:
すべての問題(バグや要求)を報告する前に、プラグインの問題に関する FAQを確認して下さい。
問題追跡上か独立した議論ページ上のどちらかに、すべての問題を報告できます。
ÛNot understand how works “tabs”, I create the tabs but how I add the content of the tabs ? If I click on a tab redirect me to page that not exist. — adrianvesa 2016-03-30 19:58