# 欢迎使用 iOS 版 MWeb

MWeb 首先是一个 Markdown 编辑器,所使用的 Markdown 语法为 Github Flavored Markdown,简称 GFM,这是一种最为广泛使用的 Markdown 语法之一。如果你不知道什么是 Markdown,建议看一下附带的 Markdown 语法官方说明(Markdown Syntax.md)文档。GFM 除了支持官方的语法外,还扩展了不少语法,具体情况会在本文后说明。这里先介绍一下 iOS 版 MWeb 的基本使用方法。

## MWeb for iOS 基本使用

![mweb-v232-cn-1-w780](media/mweb-v232-cn-1.png)

**上图左图为首页,右图为网盘文档,各种标记如下:**

1. 设置页面。
2. 最近使用的文档。
3. 收藏的项目,文档,文件夹,文档库分类等等都可以收藏。
4. 回首页按钮。
5. 文档库按钮,目前的版本的文档库是需要 MWeb for Mac 配合使用的,不是单独的功能,默认不启用。
6. 网盘文档按钮,点击后会转到右图的网盘文档,目前支持 iCloud Drive 和 Dropbox。
7. 本地文档按钮。
8. 进入网盘文档后,点右下角的按钮可增加 Dropbox 文件夹以同步。
9. 文件夹设置按钮,网盘文档内的文件夹有 (i) 按钮的都可以设置,主要是设置新建文档的默认扩展名、插入图片保存位置和是否自动上传至图床,这个设置和 Mac 版 MWeb 外部模式中引入的文件夹的设置一样。如下图。

![mweb-v232-cn-2-w780](media/mweb-v232-cn-2.png)

**上图左图为文件夹设置画面,右图为点进文件夹后的画面,各标记说明如下:**

1. 设置此文件夹内的文档的默认排序,新建文档的默认扩展名等。
2. 插入图片时图片的保存位置,默认保存在文档所在位置的 media 文件夹内,你可以通过填入文件夹名来修改(上图改为 images)。另外**保存路径**这个很重要,默认是“相对位置”,也就是保存在文档所在位置的文件夹内。如果设置为“绝对位置”,比如 folder/sub/sub2/sub3/doc.md 这个位置的文档插入图片,会保存在 fodler/media 下,而“相对位置”,则会保存在 folder/sub/sub2/sub3/media 下。
3. 插入图片时自动上传至图床:如果启用,则插入图片时,会直接上传至图床。在设置页面可以配置图床信息,目前支持 Google Photos、imgur、七牛和自定义图床。
4. 回首页按钮。
5. 收藏按钮。
6. 排序方式按钮,点击可更改排序方式。
7. 新增文件夹和文件按钮。

![mweb-v232-cn-3-w780](media/mweb-v232-cn-3.png)

**上图左图为打开文档后点击大纲视图的画面,右图为编辑时,切换到 Markdown 键盘的画面**

1. 文档大纲按钮,点击后可快速导航。
2. 收藏按钮。
3. 预览按钮。
4. 新增文档按钮,会在所打开的文档的文件夹内新增文档。
5. 分享按钮,可导出为 HTML、图片、PDF;发布至 WordPress、Wordpress.com、Metaweblog API 、Evernote、Blogger 和 Medium。
6. Markdown 常用语法的快速输入键盘。
7. 编辑器样式和预览样式切换。

![mweb-v232-cn-4-w780](media/mweb-v232-cn-4.png)

**上图左图为点击分享按钮后的画面,右图为切换样式画面**

1. 退出编辑,也可左滑。
2. 发布服务,要在设置页面新增发布服务,支持 WordPress、Wordpress.com、Metaweblog API 、Evernote、Blogger 和 Medium。
3. 切换样式。

## 配置 MWeb for Mac 文档库

iOS 版的文档库目前不可单独使用,只做为 Mac 版文档库的辅助,目前仅支持查看、编辑和新增文档,删除和归类等等功能目前都不支持。要使用 iOS 版文档库,首先要把 Mac 版的 MWeb 的文档库保存到 iCloud Drive 或者 Dropbox 中,等同步完成后,再在 iOS 版 MWeb 中配置文档库的位置。

![-w470](media/14979382840902.jpg)

如上图,用另存为按钮,把文档库保存在 Dropbox 或 iCloud Drive 中,如果选择保存在 iCloud Drive,必须保存在 iCloud Drive 中 MWeb 所属的文件夹内。如果在 Mac 的 iCloud Drive 中看不到 MWeb 所属文件夹,可以试试在 iOS 的 系统设置 – iCloud – 关闭 iCloud Drive,然后再重新打开。

设置好并且文档库完全同步后,在 iOS 版 MWeb 中配置 Mac 版文档库的方法如下图:

![mweb-v232-cn-5-w780](media/mweb-v232-cn-5.png)

1. 首先是启用 MWeb for Mac 的文档库。
2. 点击“更改文档库位置”按钮,选择文档库的位置。文档库位置的文件夹内,必然会有一个名为 mainlib.db 的文件和一个 docs 文件夹。
3. 设置完后,点完成,回到首页,再点首页底部的“文档库”按钮,即可进入文档库,如上图右图。

**使用 iOS 版文档库要注意的地方为:**在 iOS 文档库新增的文档总是在“所有文档”和“未分类文档”中。

## 其它参考:

* [iOS 版 MWeb 发布到自建 WordPress 和 Metaweblog API 使用指南](http://zh.mweb.im/how_to_use_wordpress_url.html)
* [MWeb 图片及图床使用完全指南](http://zh.mweb.im/how_to_use_images_in_mweb.html)
* [iOS 版 MWeb 图床功能及七牛图床使用指南](http://zh.mweb.im/how_to_use_qiniu_url.html)
* [iOS 版 MWeb 图床功能中自定义图床的使用指南](http://zh.mweb.im/how_to_use_custom_image_upload_url.html)
* [在 iOS 中如何使用 MWeb for Mac 文档库](http://zh.mweb.im/how_to_use_library_in_ios.html)

## GFM 语法简介和 MWeb 所支持的扩展语法

### 回车转为换行

官方的语法规定结尾加 2 个以上空格加换行才会转成换行,也就是 `
` 标签。MWeb 中有个选项可以直接把换行转成 `
`,不用加上 2 个以上空格,这个选项默认是开启的。如果要关闭,请在设置页面关闭。

### 任务列表(Task lists)

Markdown 语法:

“`
– [ ] 任务一 未做任务 `- + 空格 + [ ]`
– [x] 任务二 已做任务 `- + 空格 + [x]`
“`

效果如下:

– [ ] 任务一 未做任务 `- + 空格 + [ ]`
– [x] 任务二 已做任务 `- + 空格 + [x]`

### 图片大小及对齐

官方和 GFM 都不支持图片大小控制及对齐设置,MWeb 引入的特别的语法来设置图片宽度和居左、居右、居中。如:`![图片说明-w450](pic.jpg)` 这样表示设置图片宽度为 450。其中 -w450 为设置语法,生成 HTML 时会自动移除。w 表示设置宽度,居左为:-l400,居右为 -r400,居中为 -c400,比如设置一图片宽度为 500 并居中:`![-c500](pic.jpg)`。 可以看出,MWeb 引入的语法的特点是兼容原来的语法和仅支持设置宽度。

### 多行或者一段代码

Markdown 语法:

“`js
function fancyAlert(arg) {
if(arg) {
$.facebox({div:’#foo’})
}

}
“`

效果如下:

“`js
function fancyAlert(arg) {
if(arg) {
$.facebox({div:’#foo’})
}

}
“`

这个语法目前在 MWeb 中使用,必须前后空一行,才会正确解析。我觉得,在写 Markdown 文档过程中,运用空行很有必要,基本上,块级元素(标题、列表、引用、代码块、表格、段落等),都建议前后空一行。

### 表格

Markdown 语法:

“`
第一格表头 | 第二格表头
——— | ————-
内容单元格 第一列第一格 | 内容单元格第二列第一格
内容单元格 第一列第二格 多加文字 | 内容单元格第二列第二格
“`

效果如下:

第一格表头 | 第二格表头
——— | ————-
内容单元格 第一列第一格 | 内容单元格第二列第一格
内容单元格 第一列第二格 多加文字 | 内容单元格第二列第二格

### 删除线

Markdown 语法:

加删除线像这样用: ~~删除这些~~

效果如下:

加删除线像这样用: ~~删除这些~~

### LaTeX

Markdown 语法:

“`
块级公式:
$$ x = \dfrac{-b \pm \sqrt{b^2 – 4ac}}{2a} $$

\\[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
{1+\frac{e^{-8\pi}} {1+\ldots} } } } \\]

行内公式: $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$
“`

效果如下(在设置页面中启用 LaTeX 才会看到效果,默认为启用):

块级公式:
$$ x = \dfrac{-b \pm \sqrt{b^2 – 4ac}}{2a} $$

\\[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
{1+\frac{e^{-8\pi}} {1+\ldots} } } } \\]

行内公式: $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$

### 脚注(Footnote)

Markdown 语法:

“`
这是一个脚注:[^sample_footnote]
“`

效果如下:

这是一个脚注:[^sample_footnote]

[^sample_footnote]: 这里是脚注信息

### 注释和阅读更多


**注** 阅读更多的功能只用在文档库生成静态网站或发布到 WordPress 博客时,插入时注意要后空一行。

### TOC

Markdown 语法:

“`
[TOC]
“`

效果如下:

[TOC]

435 个评论

  1. Have you ever thought about adding a little bit more than just your articles?
    I mean, what you say is fundamental and all. But think of if you added some
    great visuals or video clips to give your posts more,
    “pop”! Your content is excellent but with pics and clips, this site could undeniably
    be one of the greatest in its field. Awesome blog!

  2. certainly like your web site but you need to check the spelling on quite a few
    of your posts. A number of them are rife with spelling issues and I in finding
    it very troublesome to tell the truth then again I will certainly come again again.

  3. This design is spectacular! You most certainly know how to keep a reader amused.
    Between your wit and your videos, I was almost moved to start
    my own blog (well, almost…HaHa!) Wonderful job.
    I really enjoyed what you had to say, and more than that, how you presented it.
    Too cool!

  4. The beauty about free online roulette is always that it will give you valuable glimpse on the live casino environment through the time you enter in the live competitive casino
    foray you would have shed off some sort of intimidation and insufficient
    knowledge. One very significant issue to look at heed of is online casinos isn’t
    just an origin of entertainment but sometimes be described as a major source of slaughter or even played with the
    right mind as well as the use of the best skills and lastly the luck
    factor that not everyone possesses. Presently mobile poker games
    may be conveniently played even though you are actually out and about. https://www.woocasite.com/obamacasino

  5. you’re truly a ϳust right webmaster. Thе site loɑding velocity iѕ amazing.
    It seems that you’re doing any unique trick. Moreover,
    The contents are maѕterpiece. you’ve done a great job on this subject!

    DRB
  6. Attractive section of content. I just stumbled upon your website and in accession capital to assert that I get in fact enjoyed account your blog posts. Any way Ill be subscribing to your feeds and even I achievement you access consistently rapidly. kddgfkdkkabe

    Johne991
  7. naturally like your web site however you have to check the spelling on several of your posts.
    Many of them are rife with spelling problems and I in finding it very troublesome to tell the
    reality then again I’ll definitely come back again.

  8. Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something. I think that you could do with a few pics to drive the message home a little bit, but other than that, this is great blog. An excellent read. I will certainly be back. dcaaagffkffd

    Johnd66
  9. Hey I know this is off topіc but I waas wߋnderіng if you кnew of anny ѡidgets I coᥙld add to my blog that automatically tweet my newеst twiutter
    updates. I’ve Ƅeen looking for a pⅼug-in liҝe this for
    quite some tme and was hoping maybe yyou would ave
    some expeᴡriеnce with something like this. Pleaѕe
    let me know iff you run into anything. I truly enjoy reaԀing yor
    blog ɑnd I look forward to your new updates. http://Www.Ininvention.com/UserPagezcskathiekbewvbtt

  10. 通告:buy cialis

  11. 通告:buy viagra

  12. 通告:buy cialis online

  13. 通告:buy viagra online

  14. 通告:generic cialis

  15. 通告:generic viagra

  16. 通告:cialis generic

  17. 通告:viagra generic

  18. 通告:tadalafil

  19. 通告:buy cialis generic tadalafil

  20. 通告:sildenafil 100mg

  21. 通告:cialis

  22. 通告:5mg cialis

  23. 通告:cialis canada

  24. 通告:cialis online

  25. 通告:sildenafil coupons

  26. 通告:cialis 20 mg

  27. 通告:buying cialis online

  28. 通告:cialis cost

  29. 通告:cialis online pharmacy

  30. 通告:sildenafil tablets

  31. I am really impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you modify it yourself? Anyway keep up the excellent quality writing, its rare to see a great blog like this one nowadays akebbedbebed

    Johnd487
  32. I enjoy you because of all of the labor on this web page. Gloria really likes working on internet research and it’s really easy to understand why. My partner and i know all relating to the dynamic form you give practical secrets via the website and even welcome participation from others about this point so our favorite simple princess is always learning a lot. Enjoy the remaining portion of the year. You are always carrying out a splendid job.

  33. Do you mind if I quote a few of your articles as long as I
    provide credit and sources back to your website?
    My blog is in the exact same area of interest as yours and my users
    would truly benefit from some of the information you provide here.
    Please let me know if this alright with you. Thank you! http://Www.vintagehouserestaurant.com/

  34. I really wanted to develop a simple note in order to express gratitude to you for all of the superb instructions you are placing here. My time intensive internet lookup has finally been compensated with pleasant knowledge to share with my co-workers. I would say that we site visitors are quite fortunate to dwell in a great site with many perfect professionals with beneficial points. I feel quite privileged to have come across your entire website page and look forward to some more fun times reading here. Thank you once again for a lot of things.

  35. I as well as my buddies came reviewing the good helpful tips from your site while suddenly came up with a horrible suspicion I had not expressed respect to you for those techniques. Most of the people came as a consequence stimulated to read all of them and have seriously been using these things. Appreciation for turning out to be really considerate and for choosing these kinds of wonderful guides most people are really needing to be aware of. My personal honest apologies for not expressing appreciation to you sooner.

  36. Admiring the time and energy you put into your website and detailed information you offer.
    It’s great to come across a blog every once in a while that
    isn’t the same out of date rehashed information. Fantastic read!

    I’ve saved your site and I’m including your RSS feeds to my Google
    account. https://nicolitalia.com

评论功能已关闭。