diff --git a/.gitignore b/.gitignore index 1e3eb7de..2a64506b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,3 @@ /Home/Master/.index* /Home/Master/.metadata* - -# --- Only for develop --- -/Home/* -/ContentsPlanet.php diff --git a/ContentsPlanet.php b/ContentsPlanet.php new file mode 100644 index 00000000..81dde8a7 --- /dev/null +++ b/ContentsPlanet.php @@ -0,0 +1,107 @@ +ContentsPlanet ' . VERSION . '' . + ' © 2016-2022' . + ' ContentsPlanet Development Team' +); + +/** + * Defines the default internal character encoding. + * This deprecated feature will certainly be removed in the future. + * + * + * Users should leave this empty and set default_charset instead. + */ +// ini_set('mbstring.internal_encoding' , ''); + +ini_set('default_charset' , 'UTF-8'); + +define('ROOT_DIR' , dirname(__FILE__)); +define('MODULE_DIR' , ROOT_DIR . DIRECTORY_SEPARATOR . 'Module'); +define('CONTENTS_HOME_DIR', ROOT_DIR . DIRECTORY_SEPARATOR . 'Home'); +define('SERVICE_DIR' , ROOT_DIR . DIRECTORY_SEPARATOR . 'Service'); +define('CLIENT_DIR' , ROOT_DIR . DIRECTORY_SEPARATOR . 'Client'); +define('CACHE_DIR' , ROOT_DIR . DIRECTORY_SEPARATOR . 'Cache'); +define('FRONTEND_DIR' , ROOT_DIR . DIRECTORY_SEPARATOR . 'Frontend'); +define('LOCALES_DIR' , ROOT_DIR . DIRECTORY_SEPARATOR . 'Locales'); +define('LOG_DIR' , ROOT_DIR); + + +$rootURI = str_replace(str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']), '', str_replace('\\', '/', __DIR__)); +if(strlen($rootURI) != 0 && strpos($rootURI, '/') !== 0){ + // パスがあって最初に'/'がないときは追加する. + $rootURI = '/' . $rootURI; +} + +// +// + $_SERVER['DOCUMENT_ROOT'] +// + ContentsPlanet +// + index.php +// + ... +// +// https://contentsviewer.work/ContentsPlanet/Master/Root +// >---------------------------< ... $_SERVER['REQUEST_URI'] +// "/ContentsPlanet/Master/Root" +// >---------------< ... ROOT_URI +// "/ContentsPlanet" +// >------------< ... $vars['subURI'] +// "/Master/Root" +// + +// +// + $_SERVER['DOCUMENT_ROOT'] +// + index.php +// + ... +// +// https://contentsviewer.work/Master/Root +// >------------< ... $_SERVER['REQUEST_URI'] +// "/Master/Root" +// >< ... ROOT_URI +// "" +// >------------< ... $vars['subURI'] +// "/Master/Root" +// + +/** + * ex) + * "/ContentsPlanet", + * "" + */ +define('ROOT_URI', $rootURI); + +define('CLIENT_URI', ROOT_URI . '/Client'); +define('SERVICE_URI', ROOT_URI . '/Service'); + +/** + * サブURIに何も設定されていないときに参照される. + */ +define('DEFAULT_SUB_URI', '/Master/Root'); + +define('DEFAULT_CONTENTS_FOLDER', './Master/Contents'); +define('META_FILE_NAME', '.metadata'); +define('ROOT_FILE_NAME', 'Root'); +define('INDEX_FILE_NAME', '.index'); +define('DEFAULT_LAYER_NAME', 'en'); + +define('REDIRECT_HTTPS_ENABLED', false); + +/** + * Session cookie parameter settings + */ +ini_set('session.cookie_secure', !empty($_SERVER["HTTPS"])); +ini_set('session.cookie_httponly', true); + +define('USER_TABLE', [ + 'master' => [ + 'hashedPassword' => '', + 'digest' => '', + 'contentsFolder' => './Master/Contents', + 'isPublic' => true, + 'enableRemoteEdit' => false, + 'remoteURL' => '', + 'notifyingList' => [ + // ['type' => 'mail', 'destination' => 'your.mail@address'], + ] + ], +]); diff --git a/Home/Master/Contents/.plugins/common/user-scripts.content b/Home/Master/Contents/.plugins/common/user-scripts.content new file mode 100644 index 00000000..e69de29b diff --git a/Home/Master/Contents/.plugins/contents-viewer/user-scripts.content b/Home/Master/Contents/.plugins/contents-viewer/user-scripts.content new file mode 100644 index 00000000..e69de29b diff --git a/Home/Master/Contents/.plugins/viewer/user-scripts.content b/Home/Master/Contents/.plugins/viewer/user-scripts.content new file mode 100644 index 00000000..e69de29b diff --git a/Home/Master/Contents/Images/ContentsPlanet.jpg b/Home/Master/Contents/Images/ContentsPlanet.jpg new file mode 100644 index 00000000..25b373f5 Binary files /dev/null and b/Home/Master/Contents/Images/ContentsPlanet.jpg differ diff --git a/Home/Master/Contents/Messages.content b/Home/Master/Contents/Messages.content new file mode 100644 index 00000000..8e98035f --- /dev/null +++ b/Home/Master/Contents/Messages.content @@ -0,0 +1,10 @@ +--- +date: 2019-04-26 +tags: noindex +--- + +Messages management. Displayed on all content pages. + +=== + +// Currently under maintenance. You may have some trouble in page viewing. \ No newline at end of file diff --git a/Home/Master/Contents/Messages_ja.content b/Home/Master/Contents/Messages_ja.content new file mode 100644 index 00000000..8f8c72bb --- /dev/null +++ b/Home/Master/Contents/Messages_ja.content @@ -0,0 +1,10 @@ +--- +date: 2019-04-26 +tags: noindex +--- + +Messages管理. すべてのコンテンツページで表示される. + +=== + +// 現在メンテナンス中です...
動作に問題が出る可能性があります. m(_ _)m diff --git a/Home/Master/Contents/Root.content b/Home/Master/Contents/Root.content new file mode 100644 index 00000000..4768b550 --- /dev/null +++ b/Home/Master/Contents/Root.content @@ -0,0 +1,34 @@ +--- +title: Welcome to ContentsPlanet! +date: 2018-10-07 +tags: Root +children: + Setup/Setup + Syntax/Syntax +--- + +Welcome to ContentsPlanet! + +![ContentsPlanet](CURRENT_DIR/Images/ContentsPlanet.jpg) + +If you are starting up for the **first time**, +please set up your __username__ and __password__ according to the [./Setup/Setup]. + +[::CAUTION] +===================== + + * You need to setup your __username__ and __password__ before editing. + +===================== + + +[::NOTE] +====================== + + * You can edit the current page from the `Edit` link at the top of the page. + * From the `Log in` menu in the header menu, you can manage (add, delete) the content files and so on. + * To see how to write contents, see the [./Syntax/Syntax]. + +====================== + +=== diff --git a/Home/Master/Contents/Root_ja.content b/Home/Master/Contents/Root_ja.content new file mode 100644 index 00000000..833c3054 --- /dev/null +++ b/Home/Master/Contents/Root_ja.content @@ -0,0 +1,34 @@ +--- +title: ようこそ! ContentsPlanet へ +date: 2018-10-07 +tags: Root +children: + Setup/Setup_ja + Syntax/Syntax_ja +--- + +ようこそ! ContentsPlanet へ + +![ContentsPlanet](CURRENT_DIR/Images/ContentsPlanet.jpg) + +**はじめて立ち上げた方**は, まず, [./Setup/Setup_ja]を参考に, +__ユーザ名__と__パスワード__の設定を行ってください. + +[::CAUTION] +===================== + + * 編集するためには, __ユーザ名__, __パスワード__が必要です. + +===================== + + +[::NOTE] +====================== + + * ページ上部にある`編集`から現在のページを編集できます. + * ヘッダメニュー内にある`Log in`から, コンテンツファイルの管理(追加, 削除)などが行えます. + * コンテンツの書き方は, [./Syntax/Syntax_ja]をご覧ください. + +====================== + +=== diff --git a/Home/Master/Contents/Setup/Setup.content b/Home/Master/Contents/Setup/Setup.content new file mode 100644 index 00000000..92a63683 --- /dev/null +++ b/Home/Master/Contents/Setup/Setup.content @@ -0,0 +1,65 @@ +--- +parent: ../Root +title: Setup Guide +date: 2020-5-5 +tags: Guide, Manual +--- + +Initial Setup of this CMS. + +=== + +# Introduction + * This setup guide explains **how to set up your Master user account**, which is required for this CMS. + + * If you are not a Master user, all you have to do is to **change the content folder path** described in this setup guide, and the configuration is **basically the same**. + + * Run this setup guide on the server **where this CMS is actually placed**. + + * After the setup, you must **erase** your **username** and **password** from the setup script. + +# Instructions + # 1. Set `$username` and `$password` in the setup script `Frontend/setup.php` + ```php + // === Please Set below variables ==================================== + + $username = ""; + $password = ""; + + // =================================================================== + ``` + + * You don't need to change your username to `master` to be a master user.^[note.what-master]. + + # 2. Check setup script. + [Setup Script](ROOT_URI/setup) + + # 3. Edit configurations in `ContentsPlanet.php->USER_TABLE->'master'`. + ```php + define('USER_TABLE', [ + 'master' => [ + 'hashedPassword' => '', + 'digest' => '', + 'contentsFolder' => './Master/Contents', + 'isPublic' => true, + 'enableRemoteEdit' => false, + 'remoteURL' => '', + 'notifyingList' => [ + // ['type' => 'mail', 'destination' => 'your.mail@address'], + ] + ], + ]); + ``` + + # 3.1. Copy & Paste the values displayed in [Setup Script](ROOT_URI/setup) into `hashedPassword`, `digest`. + + # 3.2. Change username `$username` you want in `'master'`. + + # 3.3. (If private contents) Set `isPublic` to `false`. + + # 4. Go to [Login Page](ROOT_URI/login) and check if you can login. + + # 5. Check if you can access the [Front Page](ROOT_URI). + +--- +[note.what-master]: A Master user is the user who owns the `Home/Master` directory. \ No newline at end of file diff --git a/Home/Master/Contents/Setup/Setup_ja.content b/Home/Master/Contents/Setup/Setup_ja.content new file mode 100644 index 00000000..1c0b8dd2 --- /dev/null +++ b/Home/Master/Contents/Setup/Setup_ja.content @@ -0,0 +1,65 @@ +--- +parent: ../Root_ja +title: セットアップガイド +date: 2020-5-5 +tags: ガイド, マニュアル +--- + +本CMSの初期セットアップ + +=== + +# はじめに + * このセットアップガイドは, 本CMSに必ず必要となる**Masterユーザの設定方法**を説明します. + + * Masterユーザ以外のユーザ設定でも, このセットアップガイドに書かれている**コンテンツフォルダパス**を読み替えるだけで, **基本的に同じ**です. + + * このセットアップガイドは, **本CMSが実際に置かれるサーバ上**で動作させてください. + + * セットアップ終了後, **必ず**セットアップスクリプト上に書いた**ユーザ名**, **パスワード**は**消去**してください. + +# 手順 + # 1. セットアップスクリプト`Frontend/setup.php`内にある`$username`と`$password`を設定 + ```php + // === Please Set below variables ==================================== + + $username = ""; + $password = ""; + + // =================================================================== + ``` + + * Masterユーザであるからといって,ユーザ名を`master`にする必要はありません^[注.what-master]. + + # 2. セットアップスクリプトの確認 + [セットアップスクリプト](ROOT_URI/setup) + + # 3. `ContentsPlanet.php->USER_TABLE->'master'`情報の書き換え + ```php + define('USER_TABLE', [ + 'master' => [ + 'hashedPassword' => '', + 'digest' => '', + 'contentsFolder' => './Master/Contents', + 'isPublic' => true, + 'enableRemoteEdit' => false, + 'remoteURL' => '', + 'notifyingList' => [ + // ['type' => 'mail', 'destination' => 'your.mail@address'], + ] + ], + ]); + ``` + + # 3.1. `hashedPassword`, `digest`に[セットアップスクリプト](ROOT_URI/setup)で表示されている値をコピー&ペースト + + # 3.2. `'master'` を設定したいユーザ名`$username`に変更 + + # 3.3. (コンテンツ非公開の場合) `isPublic`を`false`に設定 + + # 4. [ログインページ](ROOT_URI/login)にアクセスし, ログインできるか確認 + + # 5. [フロントページ](ROOT_URI)にアクセスできるか確認 + +--- +[注.what-master]: Masterユーザとは, `Home/Master`ディレクトリを保有するユーザを指します. \ No newline at end of file diff --git a/Home/Master/Contents/Syntax/Images/OutlineText.png b/Home/Master/Contents/Syntax/Images/OutlineText.png new file mode 100644 index 00000000..9a686e59 Binary files /dev/null and b/Home/Master/Contents/Syntax/Images/OutlineText.png differ diff --git a/Home/Master/Contents/Syntax/Syntax.content b/Home/Master/Contents/Syntax/Syntax.content new file mode 100644 index 00000000..55ca9f2e --- /dev/null +++ b/Home/Master/Contents/Syntax/Syntax.content @@ -0,0 +1,946 @@ +--- +parent: ../Root +title: Syntax +date: 2018-9-19 +tags: lightweight-markup-language, Syntax +--- + +This section shows the syntax of OutlineText. +It's basically similar to Markdown, but the indentation behavior is different. +If you take care to write //easy-to-read// text, OutlineText will be interpreted and structured naturally. + +=== + +# Paragraph +_____________________ + # Basic Writing + ```xml + Paragraphs, like most markup languages, do not require any special markup. + By writing a series of lines, the line block becomes a paragraph. + + Paragraphs are separated by a blank line like this. + ``` + + [Result] + ========== + Paragraphs, like most markup languages, do not require any special markup. + By writing a series of lines, the line block becomes a paragraph. + + Paragraphs are separated by a blank line like this. + ========== + + # Line break + ```xml + If you have two backslashes `\\` at the end of a line, a line break will occur.\\ + \\ + When I looked at Sazae-san's family tree, \\ + It turned out that \\ + Sazae is the daughter of Hune, \\ + Tarao is the son of a Sazae. + ``` + + [Result] + ========== + If you have two backslashes `\\` at the end of a line, a line break will occur.\\ + \\ + When I looked at Sazae-san's family tree, \\ + It turned out that \\ + Sazae is the daughter of Hune, \\ + Tarao is the son of a Sazae. + ========== + +# Heading +____________________ + + # Normal heading + + ```xml + # Section + # SubSection + ``` + + [Result] + ========== + # Section + # SubSection + ========== + + Section headings start with a `#`. + + The section level is determined by the number of indents. + + # Other heading + ```xml + # Heading by only `#` + Putting `#` at the beginning of the title makes it a heading. + + + Heading by `_` + _______________ + Putting a `_` under the title creates a heading. + + + # Heading by `#` and `_` + ___________________ + Even if you put `#` and `_` at the same time, it becomes a heading. + + ``` + + [Result] + ========== + # Heading by only `#` + Putting `#` at the beginning of the title makes it a heading. + + + Heading by `_` + _______________ + Putting a `_` under the title creates a heading. + + + # Heading by `#` and `_` + ___________________ + Even if you put `#` and `_` at the same time, it becomes a heading. + + ========== + + +# Section +_____________________ + + ```xml + This format has a section. + + Elements that start with the same number of indents are in the same section. + + One level of indentation raises the section hierarchy by one level. + + When you revert to the original indentation level, you return to the same section again. + + # Heading + It is usual to add a heading before a section is raised by one. + ``` + + [Result] + ========== + This format has a section. + + Elements that start with the same number of indents are in the same section. + + One level of indentation raises the section hierarchy by one level. + + When you revert to the original indentation level, you return to the same section again. + + # Heading + It is usual to add a heading before a section is raised by one. + ========== + +# List +_________________ + + # Unordered list + + ```xml + * Level 1 + * Level 2 + * Level 3 + * Level 2 + ``` + + [Result] + ========== + * Level 1 + * Level 2 + * Level 3 + * Level 2 + ========== + + # Ordered list + ```xml + 1. Level 1 + 1.1. Level 2 + 2. Level 1 + ``` + + [Result] + ========== + 1. Level 1 + 1.1. Level 2 + 2. Level 1 + ========== + + `(number).` to become a numbered list. + + Don't forget the last `.`. + + # Tree + ```xml + + root + + file + + folder + + file + ``` + + [Result] + ========== + + root + + file + + folder + + file + ========== + + # Alphabet ordered list + ```xml + A. Condition + a. Process 1 + b. Process 2 + B. Condition + a. Process 3 + ``` + + [Result] + ========== + A. Condition + a. Process 1 + b. Process 2 + B. Condition + a. Process 3 + ========== + + # Roman numeric ordered list + ```xml + I. Chapter 1 + i. Section 1 + ii. Section 2 + II. Chapter 2 + i. Section 1 + ``` + + [Result] + ========== + I. Chapter 1 + i. Section 1 + ii. Section 2 + II. Chapter 2 + i. Section 1 + ========== + + # Combination + ```xml + * list + 1. order + 2. order + * list + + tree + + tree + ``` + + [Result] + ========== + * list + 1. order + 2. order + * list + + tree + + tree + ========== + +# Definition List +______________ + ```xml + Takuma Nakajo: + Sportsboy. He's convinced that he can live with a soccer ball. + + Satomi Nakajo: + Takuma's sister. + She is good at cooking. She's busy taking care of her free-spirited brother. + + Satsuki Mizukami: + She's Satomi's friend and Takuma's ex-girlfriend. + She is a very quiet person, but is rumored to have been a fighter in the past. + ``` + + [Result] + ========== + Takuma Nakajo: + Sportsboy. He's convinced that he can live with a soccer ball. + + Satomi Nakajo: + Takuma's sister. + She is good at cooking. She's busy taking care of her free-spirited brother. + + Satsuki Mizukami: + She's Satomi's friend and Takuma's ex-girlfriend. + She is a very quiet person, but is rumored to have been a fighter in the past. + ========== + +# Table +______________ + + # Horizontal label + + + ```xml + | label 0 | label 1 | label 2 | + |---------|---------|---------| + | A | B | C | + | D | E | F | + ``` + + [Result] + ========== + | label 0 | label 1 | label 2 | + |---------|---------|---------| + | A | B | C | + | D | E | F | + ========== + + + # Vertical label + + ```xml + |---------||---|---| + | label 0 || A | B | + | label 1 || C | D | + | label 2 || E | F | + ``` + + [Result] + ========== + |---------||---|---| + | label 0 || A | B | + | label 1 || C | D | + | label 2 || E | F | + ========== + + # Vertical and Horizontal label + + ```xml + | label || type A | type B | + |----------||--------|--------| + | label 0 || A | B | + | label 1 || C | D | + | label 2 || E | F | + ``` + + [Result] + ========== + | label || type A | type B | + |----------||--------|--------| + | label 0 || A | B | + | label 1 || C | D | + | label 2 || E | F | + ========== + + + # With caption + + ```xml + |[caption] + |---------||---|---| + | label 0 || A | B | + | label 1 || C | D | + | label 2 || E | F | + ``` + + [Result] + ========== + |[caption] + |---------||---|---| + | label 0 || A | B | + | label 1 || C | D | + | label 2 || E | F | + ========== + +# Link +____________ + # Normal link + ```xml + It is possible to put a link [ContentsViewer](http://contentsviewer.work) in the text in this way. + ``` + + [Result] + ========== + It is possible to put a link [ContentsViewer](http://contentsviewer.work) in the text in this way. + ========== + + # in-line anchor + ```xml + # [[amazing-title]] Amazing title + Prepare anchors like above, + + It is possible to make a [link](#amazing-title) in the page like this. + ``` + + [Result] + ========== + # [[amazing-title]] Amazing title + Prepare anchors like above, + + It is possible to make a [link](#amazing-title) in the page like this. + ========== + + # URL, Email address + ```xml + By enclosing the URL and email address in `<`, you can make it a link. + + \\ + + ``` + + [Result] + ========== + By enclosing the URL and email address in `<`, you can make it a link. + + \\ + + ========= + +# Image +_____________ + + ```xml + ![OutlineText](CURRENT_DIR/Images/OutlineText.png) + ``` + + [Result] + ========== + ![OutlineText](CURRENT_DIR/Images/OutlineText.png) + ========== + +# Horizontal line +__________ + ```xml + Three or more of `-` form a horizontal line. + + -------------------------------------- + + It is separated like above. + ``` + + [Result] + ========== + Three or more of `-` form a horizontal line. + + -------------------------------------- + + It is separated like above. + ========== + + +# Text formatting +______________________ + # Strong Importance phrase + + ```xml + When a phrase of **importance, seriousness, or urgency** is present in a sentence, it is sandwiched by `**`. + ``` + + [Result] + ========== + When a phrase of **importance, seriousness, or urgency** is present in a sentence, it is sandwiched by `**`. + ========== + + + # Emphasis phrase + ```xml + When there is a phrase in a sentence that you want to //emphasize// by comparing it with the surrounding string, put it in between `//`. + It is usually limited to one or a few words in a sentence and affects the meaning of the sentence itself. + ``` + + [Result] + ========== + When there is a phrase in a sentence that you want to //emphasize// by comparing it with the surrounding string, put it in between `//`. + It is usually limited to one or a few words in a sentence and affects the meaning of the sentence itself. + ========== + + + # Mark + + ```xml + Use `__` in the text to __put attention__ on the reader and writer. + It does not depend on the importance of the text, but only on its __appearance__. + It is similar to the act of __drawing a marker__ in a textbook. + ``` + + [Result] + ========== + Use `__` in the text to __put attention__ on the reader and writer. + It does not depend on the importance of the text, but only on its __appearance__. + It is similar to the act of __drawing a marker__ in a textbook. + ========== + + + # Deleted Text + ```xml + When you use strikethrough lines in a sentence, enclose ~~the parts you want to strike out~~ with `~~`. + ``` + + [Result] + ========== + When you use strikethrough lines in a sentence, enclose ~~the parts you want to strike out~~ with `~~`. + ========== + +# Code +___________________ + # Inline + + ```xml + You can use `Code notation` like this in your text. + + The html tag `

` in the code notation and the markup in this format `[ContentsViewer](./)` in this format are ignored. + + Characters `&<>` in code notation are automatically escaped. + ``` + + [Result] + ========== + You can use `Code notation` like this in your text. + + The html tag `

` in the code notation and the markup in this format `[ContentsViewer](./)` in this format are ignored. + + Characters `&<>` in code notation are automatically escaped. + ========== + + + # Block + ```xml + You can insert a code block in `backquote x3` in this way. + + You can highlight the code by adding an attribute after the `backquote x3`. + + ```cpp + #include + + using namespace std; + + int main(){ + cout << "Hello World!" << endl; + + return 0; + } + ``` + ``` + + [Result] + ========== + You can insert a code block in `backquote x3` in this way. + + You can highlight the code by adding an attribute after the `backquote x3`. + + ```cpp + #include + + using namespace std; + + int main(){ + cout << "Hello World!" << endl; + + return 0; + } + ``` + ========== + + The code is highlighted using an external library, SyntaxHighlighter. + See [SyntaxHighlighter](https://github.com/syntaxhighlighter/syntaxhighlighter) for details. + + The supported codes are as follows. + + |[Supported codes] + | Alias | Code | + |-----------------------------|-------------| + | `applescript` | AppleScript | + | `actionscript3` `as3` | AS3 | + | `bash` `shell` | Bash | + | `coldfusion` `cf` | ColdFusion | + | `cpp` `c` | Cpp | + | `c#` `c-sharp` `csharp` | CSharp | + | `css` | Css | + | `delphi` `pascal` | Delphi | + | `diff` `patch` `pas` | Diff | + | `erl` `erlang` | Erlang | + | `groovy` | Groovy | + | `java` | Java | + | `jfx` `javafx` | JavaFX | + | `js` `jscript` `javascript` | JScript | + | `perl` `pl` | Perl | + | `php` | Php | + | `text` `plain` | Plain | + | `ps` `powershell` | PowerShell | + | `py` `python` | Python | + | `ruby` `rails` `ror` `rb` | Ruby | + | `sass` `scss` | Sass | + | `scala` | Scala | + | `sql` | Sql | + | `vb` `vbnet` | Vb | + | `xml` `xhtml` `xslt` `html` | Xml | + +# Block +__________________ + + ```xml + [Note] + ======================= + Inside the box, __the markup is available as usual__. + + [Nested] + ============ + It is possible to nest the boxes. + ============ + + ======================= + + [Box style :: NOTE] + ============== + It is possible to add attributes next to the box title. + + If it is omitted, `NOTE` is applied. + + `CAUTION` and `WARNING` are also available. + + [:: CAUTION] + ============ + CAUTION box + ============ + + [:: WARNING] + ============ + WARNING box + ============ + + [:: NOTE] + ========= + If you omit the title, the attribute name becomes the title as it is. + ========= + + ============== + ``` + + [Result] + ========== + [Note] + ======================= + Inside the box, __the markup is available as usual__. + + [Nested] + ============ + It is possible to nest the boxes. + ============ + + ======================= + + [Box style :: NOTE] + ============== + It is possible to add attributes next to the box title. + + If it is omitted, `NOTE` is applied. + + `CAUTION` and `WARNING` are also available. + + [:: CAUTION] + ============ + CAUTION box + ============ + + [:: WARNING] + ============ + WARNING box + ============ + + [:: NOTE] + ========= + If you omit the title, the attribute name becomes the title as it is. + ========= + + ============== + ========== + +# Blockquote +_____________ + ```xml + About grammar to genocide, John explained. + + >>> + We’re talking about at a deep structural level, + not something noticeable in the surface structures that non-linguists are used to accepting at face value. + >>> + ``` + + [Result] + ========== + About grammar to genocide, John explained. + + >>> + We’re talking about at a deep structural level, + not something noticeable in the surface structures that non-linguists are used to accepting at face value. + >>> + ========== + +# References +_______________________________________________ + + ```xml + Label the reference in this way^[label1]. + + * It is known that there is a Sazae-san street in Tokyo^[wiki1], but I did not know that. + * "Gentlemen, I love the war."^[movie1] + + If you list the references at the end of the text, they are linked to the label assigned to them. + + The list of references is sorted by the order in which they are referred to. + + The unreferenced references are not displayed. + + Each label has its own group. + You can specify the group by setting `^[group.label]`. + If it is omitted, the group name is `cite`. + For example, if you want to annotate a sentence, you can do this^[note.annotation]. + + ---------------------------------------------- + # Note + [note.annotation]: Annotations are supplements, explanations, or commentary on the previously mentioned text or technical terms^[wiki-annotation] + + # References + [label1]: details of reference + [movie1]: Hellsing Anime The Major + [wiki1]: [wikipedia-Sazae san](https://ja.wikipedia.org/wiki/%E3%82%B5%E3%82%B6%E3%82%A8%E3%81%95%E3%82%93) + [wiki-annotation]: [wikipedia-annotation](https://ja.wikipedia.org/wiki/%E6%B3%A8%E9%87%88) + + ``` + + [Result] + ========== + Label the reference in this way^[label1]. + + * It is known that there is a Sazae-san street in Tokyo^[wiki1], but I did not know that. + * "Gentlemen, I love the war."^[movie1] + + If you list the references at the end of the text, they are linked to the label assigned to them. + + The list of references is sorted by the order in which they are referred to. + + The unreferenced references are not displayed. + + Each label has its own group. + You can specify the group by setting `^[group.label]`. + If it is omitted, the group name is `cite`. + For example, if you want to annotate a sentence, you can do this^[note.annotation]. + + ---------------------------------------------- + # Note + [note.annotation]: Annotations are supplements, explanations, or commentary on the previously mentioned text or technical terms^[wiki-annotation] + + # References + [label1]: details of reference + [movie1]: Hellsing Anime The Major + [wiki1]: [wikipedia-Sazae san](https://ja.wikipedia.org/wiki/%E3%82%B5%E3%82%B6%E3%82%A8%E3%81%95%E3%82%93) + [wiki-annotation]: [wikipedia-annotation](https://ja.wikipedia.org/wiki/%E6%B3%A8%E9%87%88) + + ========== + + +# Math +_________________________________________ + # Inline + ```xml + + The famous Euler formula is $e^{i\theta}=\cos\theta+i\sin\theta$. + + ``` + + [Result] + ========== + + The famous Euler formula is $e^{i\theta}=\cos\theta+i\sin\theta$. + + ========== + + # Displayed equations + ```xml + Equation \eqref{eq:Homogeneous-Transformation} is an expression for an homotopic transformation from the local to the world coordinate system. + + ```math + \begin{align} + \left[ \begin{matrix} x_w \\ y_w \\ z_w \\ 1 \end{matrix} \right] + = + \left[ \begin{matrix} R_{xx} & R_{xy} & R_{xz} & T_x \\ + R_{yx} & R_{yy} & R_{yz} & T_y \\ + R_{zx} & R_{zy} & R_{zz} & T_z \\ + 0 & 0 & 0 & 1 \end{matrix} \right] + \left[ \begin{matrix} x \\ y \\ z \\ 1 \end{matrix} \right] + \label{eq:Homogeneous-Transformation} + \end{align} + + ``` + ``` + + [Result] + ========== + Equation \eqref{eq:Homogeneous-Transformation} is an expression for an homotopic transformation from the local to the world coordinate system. + + ```math + \begin{align} + \left[ \begin{matrix} x_w \\ y_w \\ z_w \\ 1 \end{matrix} \right] + = + \left[ \begin{matrix} R_{xx} & R_{xy} & R_{xz} & T_x \\ + R_{yx} & R_{yy} & R_{yz} & T_y \\ + R_{zx} & R_{zy} & R_{zz} & T_z \\ + 0 & 0 & 0 & 1 \end{matrix} \right] + \left[ \begin{matrix} x \\ y \\ z \\ 1 \end{matrix} \right] + \label{eq:Homogeneous-Transformation} + \end{align} + + ``` + ========== + + The math features are provided by MathJax, an external library. + MathJax is a library to convert the mathematical expressions in html written in LateX into normal mathematical expressions. + For more information on MathJax and how to introduce it, see [MathJax](https://www.mathjax.org/). + +# Comment +_________________________________________ + ```xml + There's something in the text so far, + + + The comment text above is not displayed. + + + + Commentsof an article will not be commented out. + + ``` + + [実行結果] + ========== + There's something in the text so far, + + + The comment text above is not displayed. + + + + Commentsof an article will not be commented out. + + ========== + + +# Auto-escape +_________________________________________ + ```xml + In the text, <, >, & in the code are automatically escaped. + + However,
bold and so on, which act as html tags in the text, are not escaped. + ``` + + [実行結果] + ========== + In the text, <, >, & in the code are automatically escaped. + + However,
bold and so on, which act as html tags in the text, are not escaped. + ========== + + +# Html tag +_________________________________________________________________ + + ```xml + It is possible to use html tags in the text. + +

+ Thus, it is possible to generate a paragraph with a p tag. +

+ +
+

+ You can use a from nested elements. +

+ +

Note, however, that __any markup in this format__ will not work.

+
+ + |-------------------|------| + | If you work hard, |
    +
  • you can put the list
  • +
  • in the cells.
  • +
| + ``` + + [Result] + ========== + It is possible to use html tags in the text. + +

+ Thus, it is possible to generate a paragraph with a p tag. +

+ +
+

+ You can use a from nested elements. +

+ +

Note, however, that __any markup in this format__ will not work.

+
+ + |-------------------|------| + | If you work hard, |
    +
  • you can put the list
  • +
  • in the cells.
  • +
| + ========== + + [::WARNING] + =========== + If there is a closing tag, be sure to close with it. + Can't recognize that it exited the html tag... + =========== + +# Literal +__________ + # Continuation character + ```xml + If you put a backslash `\` at the end of a line, + the line break after it is ignored and the line is assumed to be continued. + + [Long URL](https://ja.wikipedia.org/wiki/%E8%BB%BD%E9%87%8F%E3%83%9E\ + %E3%83%BC%E3%82%AF%E3%82%A2%E3%83%83%E3%83%97%E8%A8%80%E8%AA%9E) + + * A list item containing such long sentences \ + can be divided into multiple lines by placing a backlash `\` in it. + ``` + + [Result] + ========== + If you put a backslash `\` at the end of a line, + the line break after it is ignored and the line is assumed to be continued. + + [Long URL](https://ja.wikipedia.org/wiki/%E8%BB%BD%E9%87%8F%E3%83%9E\ + %E3%83%BC%E3%82%AF%E3%82%A2%E3%83%83%E3%83%97%E8%A8%80%E8%AA%9E) + + * A list item containing such long sentences \ + can be divided into multiple lines by placing a backlash `\` in it. + ========== + + +# Text replacement +________________ + + |[Text replacement table] + | before || after | + |----------||-----------| + | `(C)` || (C) | + | `(R)` || (R) | + | `(TM)` || (TM) | + | `--` || -- | + | `...` || ... | + | `->` || -> | + | `=>` || => | + | `<-` || <- | + | `<=` || <= | + | `'` || ' | + diff --git a/Home/Master/Contents/Syntax/Syntax_ja.content b/Home/Master/Contents/Syntax/Syntax_ja.content new file mode 100644 index 00000000..60d798ee --- /dev/null +++ b/Home/Master/Contents/Syntax/Syntax_ja.content @@ -0,0 +1,973 @@ +--- +parent: ../Root_ja +title: 文法一覧 +date: 2018-9-19 +tags: 軽量マークアップ言語, 文法 +--- + +ここでは, OutlineText の文法を示していきます. +基本的に Markdown と似せていますが, インデントに対する挙動が異なります. +//見やすい文章//を書くことを注意すれば, OutlineText は自然に解釈し構造化します. + +=== + +# 段落 +_____________________ + # 基本的な書き方 + ```xml + + 段落は, 多くのマークアップ言語と同様に, 特別なマークアップは不要です. + 行を連続して書くことで, その行ブロックが段落になります. + + 段落を分けるときは, このように空行を挟みます. + + ``` + + [実行結果] + ========== + 段落は, 多くのマークアップ言語と同様に, 特別なマークアップは不要です. + 行を連続して書くことで, その行ブロックが段落になります. + + 段落を分けるときは, このように空行を挟みます. + ========== + + # 改行 + ```xml + バックスラッシュ`\`を2つ行末に書くと, 改行になります. \\ + \\ + サザエさんの家系図を見ると, \\ + サザエはフネの娘で, \\ + タラオはサザエの息子である \\ + ことが分かった. + ``` + + [実行結果] + ========== + バックスラッシュ`\`を2つ行末に書くと, 改行になります. \\ + \\ + サザエさんの家系図を見ると, \\ + サザエはフネの娘で, \\ + タラオはサザエの息子である \\ + ことが分かった. + ========== + +# 見出し +____________________ + + # 通常の見出し + + ```xml + # Section + # SubSection + ``` + + [実行結果] + ========== + # Section + # SubSection + ========== + + セクションの見出しは`#`で始めます. + + セクションのレベルはインデントの数で決まります. + + # そのほかの見出し + ```xml + # `#`のみの見出し + `#`を先頭にタイトルを書くと,見出しになります. + + + `_`による見出し + _______________ + `_`をタイトルの下に書くことで,見出しになります. + + + # `#`と`_`による見出し + ___________________ + `#`と`_`を同時につけても見出しになります. + + ``` + + [実行結果] + ========== + # `#`のみの見出し + `#`を先頭にタイトルを書くと,見出しになります. + + + `_`による見出し + _______________ + `_`をタイトルの下に書くことで,見出しになります. + + + # `#`と`_`による見出し + ___________________ + `#`と`_`を同時につけても見出しになります. + + ========== + + +# セクション +_____________________ + + ```xml + このフォーマットにはセクションというものがあります. + + このように同じインデント数で始まる要素は同じセクションになります. + + インデントのレベルが一つ上がると, セクションの階層が一つ上がります. + + インデントをもとに戻すと, また同じセクションに戻ります. + + # 見出し + セクションが一つ上がる前に, 見出しを付けるのが通例です. + ``` + + [実行結果] + ========== + このフォーマットにはセクションというものがあります. + + このように同じインデント数で始まる要素は同じセクションになります. + + インデントのレベルが一つ上がると, セクションの階層が一つ上がります. + + インデントをもとに戻すと, また同じセクションに戻ります. + + # 見出し + セクションが一つ上がる前に, 見出しを付けるのが通例です. + ========== + +# リスト +_________________ + + # 順序なしリスト + + ```xml + * レベル1 + * レベル2 + * レベル3 + * レベル2 + ``` + + [実行結果] + ========== + * レベル1 + * レベル2 + * レベル3 + * レベル2 + ========== + + # 順序ありリスト + ```xml + 1. レベル1 + 1.1. レベル2 + 2. レベル1 + ``` + + [実行結果] + ========== + 1. レベル1 + 1.1. レベル2 + 2. レベル1 + ========== + + `(番号).`で番号付きリストになります. + + 最後の`.`を忘れないでください. + + # ツリーリスト + ```xml + + root + + file + + folder + + file + ``` + + [実行結果] + ========== + + root + + file + + folder + + file + ========== + + # アルファベット順序リスト + ```xml + A. 条件 + a. 処理1 + b. 処理2 + B. 条件 + a. 処理3 + ``` + + [実行結果] + ========== + A. 条件 + a. 処理1 + b. 処理2 + B. 条件 + a. 処理3 + ========== + + # ローマ数字順序リスト + ```xml + I. 第一章 + i. 第一節 + ii. 第二節 + II. 第二章 + i. 第一節 + ``` + + [実行結果] + ========== + I. 第一章 + i. 第一節 + ii. 第二節 + II. 第二章 + i. 第一節 + ========== + + # 組み合わせ + ```xml + * リスト + 1. 順序 + 2. 順序 + * リスト + + ツリー + + ツリー + ``` + + [実行結果] + ========== + * リスト + 1. 順序 + 2. 順序 + * リスト + + ツリー + + ツリー + ========== + +# 定義リスト +______________ + ```xml + 中条琢磨: + スポーツ少年. サッカーボールがあれば生きていけると確信している. + + 中条里美: + 琢磨の姉. 料理が得意. + 自由奔放な弟の世話に手を焼いてる. + + 水上さつき: + 里美の友達で, 琢磨の元カノ. + 非常におとなしいが, 昔は喧嘩番長であったといううわさがある. + ``` + + [実行結果] + ========== + 中条琢磨: + スポーツ少年. サッカーボールがあれば生きていけると確信している. + + 中条里美: + 琢磨の姉. 料理が得意. + 自由奔放な弟の世話に手を焼いてる. + + 水上さつき: + 里美の友達で, 琢磨の元カノ. + 非常におとなしいが, 昔は喧嘩番長であったといううわさがある. + ========== + +# テーブル +______________ + + # 横ラベル + + + ```xml + | ラベル0 | ラベル1 | ラベル2 | + |---------|---------|---------| + | A | B | C | + | D | E | F | + ``` + + [実行結果] + ========== + | ラベル0 | ラベル1 | ラベル2 | + |---------|---------|---------| + | A | B | C | + | D | E | F | + ========== + + + # 縦ラベル + + ```xml + |---------||---|---| + | ラベル0 || A | B | + | ラベル1 || C | D | + | ラベル2 || E | F | + ``` + + [実行結果] + ========== + |---------||---|---| + | ラベル0 || A | B | + | ラベル1 || C | D | + | ラベル2 || E | F | + ========== + + # 縦横ラベル + + ```xml + | ラベル名 || 種類A | 種類B | + |----------||-------|-------| + | ラベル0 || A | B | + | ラベル1 || C | D | + | ラベル2 || E | F | + ``` + + [実行結果] + ========== + | ラベル名 || 種類A | 種類B | + |----------||-------|-------| + | ラベル0 || A | B | + | ラベル1 || C | D | + | ラベル2 || E | F | + ========== + + + # キャプション付き + + ```xml + |[キャプション付き] + |---------||---|---| + | ラベル0 || A | B | + | ラベル1 || C | D | + | ラベル2 || E | F | + ``` + + [実行結果] + ========== + |[キャプション付き] + |---------||---|---| + | ラベル0 || A | B | + | ラベル1 || C | D | + | ラベル2 || E | F | + ========== + +# リンク +____________ + # 通常のリンク + ```xml + 文章中にこのようにしてリンク[ContentsViewer](http://contentsviewer.work)を張ることが可能です. + ``` + + [実行結果] + ========== + 文章中にこのようにしてリンク[ContentsViewer](http://contentsviewer.work)を張ることが可能です. + ========== + + # インラインアンカー + ```xml + # [[sugoi-title]] すごいタイトル + 上のようにアンカーを用意して, + + このようにページ内で[リンク](#sugoi-title)を張ることが可能です. + ``` + + [実行結果] + ========== + # [[sugoi-title]] すごいタイトル + 上のようにアンカーを用意して, + + このようにページ内で[リンク](#sugoi-title)を張ることが可能です. + ========== + + # URLとEmailアドレス + ```xml + URLとEmailアドレスを`<`で囲むことで, リンクになります. + + \\ + + ``` + + [実行結果] + ========== + URLとEmailアドレスを`<`で囲むことで, リンクになります. + + \\ + + ========= + +# 画像 +_____________ + + ```xml + ![OutlineText](CURRENT_DIR/Images/OutlineText.png) + ``` + + [実行結果] + ========== + ![OutlineText](CURRENT_DIR/Images/OutlineText.png) + ========== + +# 水平線 +__________ + ```xml + `-`を3つ以上並べると水平線になります. + + -------------------------------------- + + このように区切られます. + ``` + + [実行結果] + ========== + `-`を3つ以上並べると水平線になります. + + -------------------------------------- + + このように区切られます. + ========== + + +# テキストフォーマット +______________________ + # 重要句 + + ```xml + 文章内で**重要性, 深刻性, 緊急性**を持つ句があるとき`**`で挟みます. + ``` + + [実行結果] + ========== + 文章内で**重要性, 深刻性, 緊急性**を持つ句があるとき`**`で挟みます. + ========== + + + # 強調句 + ```xml + 文章内で周囲の文字列と比較して//強調したい句//があるとき`//`で挟みます. + ふつうは文内の一語または数語に限定され, 文自体の意味に影響します. + ``` + + [実行結果] + ========== + 文章内で周囲の文字列と比較して//強調したい句//があるとき`//`で挟みます. + ふつうは文内の一語または数語に限定され, 文自体の意味に影響します. + ========== + + + # マーカー + + ```xml + 文章内で読み手, 書き手に__意識を向けたい部分__には`__`で挟みます. + 文章の重要性などには関係はなくただ__目立たせること__に注意してください. + 参考書などに__マーカー__を引く行為に近いです. + ``` + + [実行結果] + ========== + 文章内で読み手, 書き手に__意識を向けたい部分__には`__`で挟みます. + 文章の重要性などには関係はなくただ__目立たせること__に注意してください. + 参考書などに__マーカー__を引く行為に近いです. + ========== + + + # 打消し線 + ```xml + 文章内で打消し線を使用するときは, ~~打ち消したい部分~~を`~~`で囲みます. + ``` + + [実行結果] + ========== + 文章内で打消し線を使用するときは, ~~打ち消したい部分~~を`~~`で囲みます. + ========== + +# コード +___________________ + # インライン + + ```xml + 文章中にこのようにして`Code表記する`ことが可能です. + + コード表記内のhtmlタグ`

`や, + このフォーマットのマークアップ`[ContentsViewer](./)`は無視されます. + + `コード表記内の文字&<>`は自動でエスケープされます. + ``` + + [実行結果] + ========== + 文章中にこのようにして`Code表記する`ことが可能です. + + コード表記内のhtmlタグ`

`や, + このフォーマットのマークアップ`[ContentsViewer](./)`は無視されます. + + `コード表記内の文字&<>`は自動でエスケープされます. + ========== + + + # ブロック + ```xml + このようにして`バッククオートx3`でコードブロックを挿入することができます. + + `バッククオートx3`の後ろに属性を追加することでコードをハイライトすることが可能です. + + ```cpp + #include + + using namespace std; + + int main(){ + cout << "Hello World!" << endl; + + return 0; + } + ``` + ``` + + [実行結果] + ========== + このようにして`バッククオートx3`でコードブロックを挿入することができます. + + `バッククオートx3`の後ろに属性を追加することでコードをハイライトすることが可能です. + + ```cpp + #include + + using namespace std; + + int main(){ + cout << "Hello World!" << endl; + + return 0; + } + ``` + ========== + + + コードのハイライトに, 外部ライブラリ`SyntaxHighlighter`を使用しています. + 詳細は, [SyntaxHighlighter](https://github.com/syntaxhighlighter/syntaxhighlighter)を参照してください. + + 対応しているコードは以下の通りです. + + |[対応表] + | Alias | Code | + |-----------------------------|-------------| + | `applescript` | AppleScript | + | `actionscript3` `as3` | AS3 | + | `bash` `shell` | Bash | + | `coldfusion` `cf` | ColdFusion | + | `cpp` `c` | Cpp | + | `c#` `c-sharp` `csharp` | CSharp | + | `css` | Css | + | `delphi` `pascal` | Delphi | + | `diff` `patch` `pas` | Diff | + | `erl` `erlang` | Erlang | + | `groovy` | Groovy | + | `java` | Java | + | `jfx` `javafx` | JavaFX | + | `js` `jscript` `javascript` | JScript | + | `perl` `pl` | Perl | + | `php` | Php | + | `text` `plain` | Plain | + | `ps` `powershell` | PowerShell | + | `py` `python` | Python | + | `ruby` `rails` `ror` `rb` | Ruby | + | `sass` `scss` | Sass | + | `scala` | Scala | + | `sql` | Sql | + | `vb` `vbnet` | Vb | + | `xml` `xhtml` `xslt` `html` | Xml | + + +# ブロック +__________________ + + ```xml + [補足事項] + ======================= + ボックスの中では, __通常通りマークアップが使用可能__です. + + [入れ子] + ============ + ボックスを入れ子にすることが可能です. + ============ + + ======================= + + [ボックスのスタイル :: NOTE] + ============== + ボックスのタイトルの横に属性を追加することが可能です. + + 省略時は, `NOTE`が適用されます. + + このほかにも, `CAUTION`, `WARNING`があります. + + [:: CAUTION] + ============ + 注意ボックス + ============ + + [:: WARNING] + ============ + 警告ボックス + ============ + + [:: NOTE] + ========= + タイトルを省略すると, 属性名がそのままタイトルになります. + ========= + + + ============== + ``` + + [実行結果] + ========== + [補足事項] + ======================= + ボックスの中では, __通常通りマークアップが使用可能__です. + + [入れ子] + ============ + ボックスを入れ子にすることが可能です. + ============ + + ======================= + + [ボックスのスタイル :: NOTE] + ============== + ボックスのタイトルの横に属性を追加することが可能です. + + 省略時は, `NOTE`が適用されます. + + このほかにも, `CAUTION`, `WARNING`があります. + + [:: CAUTION] + ============ + 注意ボックス + ============ + + [:: WARNING] + ============ + 警告ボックス + ============ + + [:: NOTE] + ========= + タイトルを省略すると, 属性名がそのままタイトルになります. + ========= + + + ============== + ========== + +# 引用ブロック +_____________ + ```xml + 虐殺の言語の動作原理についてジョンは次のように語った. + + >>> + 言語の違いによらない深層の文法だから, + そのことばを享受するきみたち自身にはそれが見えない + >>> + + ``` + + [実行結果] + ========== + 虐殺の言語の動作原理についてジョンは次のように語った. + + >>> + 言語の違いによらない深層の文法だから, + そのことばを享受するきみたち自身にはそれが見えない + >>> + ========== + +# 文献参照 +_______________________________________________ + + ```xml + このようにして参考にした部分にラベルを振り^[label1]ます. + + * 東京都にサザエさん通りがある^[wiki1]のが知られているが, 私は知らなかった. + * 「諸君 私は戦争が好きだ」^[movie1] + + 文章最後で文献リストを列挙すると振られたラベルとリンクされます. + + 文献リストは, 参照された順番に並び替えられます. + + 参照されなかった文献は表示されません. + + ラベルには,グループがあります.`^[group.label]`とすることで,グループを指定できます. + 省略時は,`cite`というグループになります. + 例えば,文章に注釈をつけたい場合は,このようにします^[注.annotation]. + + + ---------------------------------------------- + # 注釈 + [注.annotation]: 注釈とは,既述の文章や専門用語についての補足・説明・解説のこと^[wiki-annotation] + + # 参考文献 + [label1]: 文献の詳細 + [movie1]: Hellsingアニメ 少佐 + [wiki1]: [wikipedia-サザエさん](https://ja.wikipedia.org/wiki/%E3%82%B5%E3%82%B6%E3%82%A8%E3%81%95%E3%82%93) + [wiki-annotation]: [wikipedia-注釈](https://ja.wikipedia.org/wiki/%E6%B3%A8%E9%87%88) + + ``` + + [実行結果] + ========== + このようにして参考にした部分にラベルを振り^[label1]ます. + + * 東京都にサザエさん通りがある^[wiki1]のが知られているが, 私は知らなかった. + * 「諸君 私は戦争が好きだ」^[movie1] + + 文章最後で文献リストを列挙すると振られたラベルとリンクされます. + + 文献リストは, 参照された順番に並び替えられます. + + 参照されなかった文献は表示されません. + + ラベルには,グループがあります.`^[group.label]`とすることで,グループを指定できます. + 省略時は,`cite`というグループになります. + 例えば,文章に注釈をつけたい場合は,このようにします^[注.annotation]. + + + ---------------------------------------------- + # 注釈 + [注.annotation]: 注釈とは,既述の文章や専門用語についての補足・説明・解説のこと^[wiki-annotation] + + # 参考文献 + [label1]: 文献の詳細 + [movie1]: Hellsingアニメ 少佐 + [wiki1]: [wikipedia-サザエさん](https://ja.wikipedia.org/wiki/%E3%82%B5%E3%82%B6%E3%82%A8%E3%81%95%E3%82%93) + [wiki-annotation]: [wikipedia-注釈](https://ja.wikipedia.org/wiki/%E6%B3%A8%E9%87%88) + + ========== + + + + +# 数式 +_________________________________________ + # インライン + ```xml + + 有名なオイラーの公式は,$e^{i\theta}=\cos\theta+i\sin\theta$ です. + + ``` + + [実行結果] + ========== + + 有名なオイラーの公式は,$e^{i\theta}=\cos\theta+i\sin\theta$ です. + + ========== + + # 別行立て + ```xml + + 式\eqref{eq:Homogeneous-Transformation}は同次変換の式です. ローカル座標系からワールド座標系への変換です. + + ```math + \begin{align} + \left[ \begin{matrix} x_w \\ y_w \\ z_w \\ 1 \end{matrix} \right] + = + \left[ \begin{matrix} R_{xx} & R_{xy} & R_{xz} & T_x \\ + R_{yx} & R_{yy} & R_{yz} & T_y \\ + R_{zx} & R_{zy} & R_{zz} & T_z \\ + 0 & 0 & 0 & 1 \end{matrix} \right] + \left[ \begin{matrix} x \\ y \\ z \\ 1 \end{matrix} \right] + \label{eq:Homogeneous-Transformation} + \end{align} + + ``` + + ``` + + [実行結果] + ========== + + 式\eqref{eq:Homogeneous-Transformation}は同次変換の式です. ローカル座標系からワールド座標系への変換です. + + ```math + \begin{align} + \left[ \begin{matrix} x_w \\ y_w \\ z_w \\ 1 \end{matrix} \right] + = + \left[ \begin{matrix} R_{xx} & R_{xy} & R_{xz} & T_x \\ + R_{yx} & R_{yy} & R_{yz} & T_y \\ + R_{zx} & R_{zy} & R_{zz} & T_z \\ + 0 & 0 & 0 & 1 \end{matrix} \right] + \left[ \begin{matrix} x \\ y \\ z \\ 1 \end{matrix} \right] + \label{eq:Homogeneous-Transformation} + \end{align} + + ``` + + ========== + + + 数式は外部ライブラリ`MathJax`を用いることで実現しています. + MathJaxは, html内にあるLateX表記された数式を通常の数式に変換するライブラリです. + MathJaxに関する詳しい説明と導入方法は本家サイト[MathJax](https://www.mathjax.org/)を参照してください. + + +# コメント +_________________________________________ + ```xml + ここまで何か本文が書かれて, + + + 上のコメント文は表示されません. + + + + + 記事本文はコメントアウトされません. + + ``` + + [実行結果] + ========== + ここまで何か本文が書かれて, + + + 上のコメント文は表示されません. + + + + + 記事本文はコメントアウトされません. + + ========== + + +# 自動エスケープ +_________________________________________ + ```xml + 本文中, コード内に含まれる, <, >, &は自動的にエスケープされます. + + ただし, 本文中においてhtmlタグとして機能する
bold + などは, エスケープされません. + ``` + + [実行結果] + ========== + 本文中, コード内に含まれる, <, >, &は自動的にエスケープされます. + + ただし, 本文中においてhtmlタグとして機能する
bold + などは, エスケープされません. + ========== + + +# Htmlタグ +_________________________________________________________________ + + ```xml + 本文でhtmlタグを使用することは可能です. + +

+ このように, pタグで段落を生成することが可能になったりします. +

+ +
+

+ 入れ子になっている要素からを出したりできます. +

+ +

ただし, __いかなるこのフォーマットのマークアップ__が機能しないことに注意しましょう.

+
+ + |----------|------| + | 頑張れば |
    +
  • セル内にリスト
  • +
  • を入れることが可能です
  • +
| + + ``` + + [実行結果] + ========== + 本文でhtmlタグを使用することは可能です. + +

+ このように, pタグで段落を生成することが可能になったりします. +

+ +
+

+ 入れ子になっている要素からを出したりできます. +

+ +

ただし, __いかなるこのフォーマットのマークアップ__が機能しないことに注意しましょう.

+
+ + |----------|------| + | 頑張れば |
    +
  • セル内にリスト
  • +
  • を入れることが可能です
  • +
| + + ========== + + [::WARNING] + =========== + 閉じタグが存在するものは必ずそれで閉じてください. + htmlタグから出たことを認知できません... + =========== + +# リテラル +__________ + # 継続文字 + ```xml + 行末にバックスラッシュ`\`を置くと, そのあとの改行が無視され, + 行が継続しているとみなされます. + + [長いURL](https://ja.wikipedia.org/wiki/%E8%BB%BD%E9%87%8F%E3%83%9E\ + %E3%83%BC%E3%82%AF%E3%82%A2%E3%83%83%E3%83%97%E8%A8%80%E8%AA%9E) + + * このように長い文を含むリストアイテムも, \ + バックスラッシュ`\`を置くことで複数行に分けて書くことができる. + + ``` + + [実行結果] + ========== + 行末にバックスラッシュ`\`を置くと, そのあとの改行が無視され, + 行が継続しているとみなされます. + + [長いURL](https://ja.wikipedia.org/wiki/%E8%BB%BD%E9%87%8F%E3%83%9E\ + %E3%83%BC%E3%82%AF%E3%82%A2%E3%83%83%E3%83%97%E8%A8%80%E8%AA%9E) + + * このように長い文を含むリストアイテムも, \ + バックスラッシュ`\`を置くことで複数行に分けて書くことができる. + + ========== + + +# テキスト置換 +________________ + + |[テキスト置換表] + | テキスト || 置き換え後 | + |----------||------------| + | `(C)` || (C) | + | `(R)` || (R) | + | `(TM)` || (TM) | + | `--` || -- | + | `...` || ... | + | `->` || -> | + | `=>` || => | + | `<-` || <- | + | `<=` || <= | + | `'` || ' | + + + diff --git a/Home/Master/Contents/Tips.content b/Home/Master/Contents/Tips.content new file mode 100644 index 00000000..e78d0e3c --- /dev/null +++ b/Home/Master/Contents/Tips.content @@ -0,0 +1,16 @@ +--- +date: 2016-8-28 +tags: noindex +--- + +Tips Management. Displayed in FileManager. + +=== + +It's good to write contents for organizing your knowledge! +Welcome back. +Click the path part to copy the path. +Use "//" to enclose the text, and it becomes italicized. +Use "**" to enclose the text, and then it becomes bold. +The headings are prefixed with "#". +Don't forget to log out! diff --git a/Home/Master/Contents/Tips_ja.content b/Home/Master/Contents/Tips_ja.content new file mode 100644 index 00000000..7941f822 --- /dev/null +++ b/Home/Master/Contents/Tips_ja.content @@ -0,0 +1,27 @@ +--- +date: 2016-8-28 +tags: noindex +--- + +Tips管理. FileManagerで表示される. + +=== + +まとめることはいいことです! +今日もお疲れ様です. +おかえりなさい. +パス部分をクリックするとパスがコピーされます. +"//"で文字を囲むと, 斜体になります. +"**"で文字を囲むと, 太字になります. +"* "ではじめると, リストになります. +見出しは"#"で始めます. +自分自身を信じてみるだけでいい。

きっと、生きる道が見えてくる。by ゲーテ +夢中で日を過ごしておれば、

いつかはわかる時が来る。by 坂本龍馬 +データを失わないようにこまめなSaveを... +バックアップはしっかりと... +[Title]
============
    本文
============
で補足ボックス +ログアウトを忘れずに! +ファイルの追加, 削除, 表示, には少し時間がかかるかもです. +再ログインで直前のユーザとしてログインしてしまうときは, ブラウザを終了してください. +アウトラインから文章本体を作成するのがおすすめです. +