1 babel

1.1 设置plantuml生成的图片在html及pdf中的size

#+BEGIN_SRC plantuml :file testffu :width 200 :height 200

Alice->Bob : hello
note left: this is a first note

Bob->Alice : ok
note right: this is another note

Bob->Bob : I am thinking
note left
a note
can also be defined
on several lines
end note

#+ENpD_SRC

#+ATTR_HTML: :width 1000
#+ATTR_LATEX: :width 1cm
#+RESULTS:
[[file:testffu.svg]]

2 plantuml 示例

2.1 实体

CLASS 基金 {
净值

}
CLASS 投资人{
登陆ID
手机
邮箱
登陆密码
支付密码

}
CLASS 基金账户 {
 投资人
}
CLASS 银行卡 {
 基金账户
}

CLASS 支付渠道 {
 支付
}

CLASS 收银台 {
  支付方式选择
交易密码输入
申购按钮

}

CLASS 批量申购生成器{
}

CLASS 费用计算器 {
}



CLASS 申购 {
  支付申请()
  返回成功信息EEEW()
申购申请批量生成()
计算费用()
发送批量申请()
接收交易申请批量确认, 进行内部处理()

}


CLASS 备付金 {

}

CLASS 费用{
管理费
托管费
申购费
赎回费

}
NOTE LEFT OF 费用
申购费,回费
2选一

END NOTE




基金账户 *-> 投资人
银行卡 *-> 基金账户

生成的结果如下:

48915t2J.png

2.2 顺序图

Alice->Bob : hello
note left: this is a first note

Bob->Alice : ok
note right: this is another note

Bob->Bob : I am thinking
note left
	a note
	can also be defined
	on several lines
end note

生成的结果如下:

48915upo.png

2.3 流程图

start
:客户填写基本信息;
:调用新浪内部黑名单;
:调用前海征信黑名单;
:调用同盾;
:调用NCIIC数据库。保留查询的结果及储存查询到的照片;
:银行卡要素验证;
:规则引擎变量输入准备;
:规则引擎;
If (规则引擎输出变量:workflow code= reject) then (yes)
  :微信端显示:尊敬的客户你暂时不符合贷款申请条件;
else (no)
:输入产品及个人补充信息;
endif
note right
 必要内容:
1. 手机号
2. 手机验证码
3. 登陆密码
end note

:前海好信常贷客;
:前海好信度评估;
:前海地址通验证;
:规则引擎变量输入准备;
:规则引擎;
If (规则引擎输出变量:workflow code= reject) then (是)
 :计算提交申请单当前的时间,5分钟后把审批结果显示至微信端;
else (否)
:照片检查:包括NCIIC照片及客户上传的照片;
endif
If (规则引擎输出变量:workflow code= reject) then (yes)
  :微信端显示:尊敬的客户你暂时不符合贷款申请条件;
:计算提交申请单当前的时间,5分钟后把审批结果显示至微信端;
stop
else (no)
:照片检查:包括NCIIC照片及客户上传的照片;


If (检查结果是否有可疑) then (是,NCIIC照片不一致或审核人员点击“转反欺诈”)
  :微信端显示:尊敬的客户你暂时不符合贷款申请条件;
else (无可疑)
:计算提交申请单当前的时间,
5分钟后把审批结果显示至微信端;
:照片检查:包括NCIIC照片及客户上传的照片;
endif

endif




stop

生成的结果如下:

48915u3Q.png

"This file was last evaluated on test"
This file was last evaluated on test
words <- tolower(scan("/Applications/workspace/project/fund/request/用户期望.org", what="", na.strings=c("|",":")))
t(sort(table(words[nchar(words) > 3]), decreasing=TRUE)[1:10])

2.4 组件图

package "Some Group" {
  HTTP - [First Component]
  [Another Component]
}

node "Other Groups" {
  FTP - [Second Component]
  [First Component] --> FTP
}

cloud {
  [Example 1]
}


database "MySql" {
  folder "This is my folder" {
    [Folder 3]
  }
  frame "Foo" {
    [Frame 4]
  }
}


[Another Component] --> [Example 1]
[Example 1] --> [Folder 3]
[Folder 3] --> [Frame 4]

生成的图片如下:

3349dss.png

2.5 ditaa

+---------+
| cBLU    |
|         |
|    +----+
|    |cPNK|
|    |    |
+----+----+

生成的结果如下:

3349-cR.png

import time
print("Hello, today's date is %s" % time.ctime())
print('Two plus two is')
(defun fibonacci (n)
(if (or (= n 0) (= n 1))
n
(+ (fibonacci (- n 1)) (fibonacci (- n 2)))))


(mapcar (lambda (row)
(mapcar #'fibonacci row)) fib-inputs)

3 下划线转义配置为无效

#+OPTIONS: ^:nil