Skip to content

Commit

Permalink
现在不需要在plantuml开头输入@startuml,@enduml这样的词,默认分辨率也调成了300
Browse files Browse the repository at this point in the history
  • Loading branch information
irhawks committed Jul 12, 2016
1 parent 4211c25 commit c91e09e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 0 additions & 5 deletions main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,19 @@


\begin{plantuml}[width=0.4\textwidth]
@startuml
skinparam dpi 300
class 构件
构件 "1" --> "1..N" 服务
构件 "1" --> "1..N" 接口
接口 "1" -> "1" 服务 : ?
@enduml
\end{plantuml}

\lipsum[2]

\begin{plantuml}
@startuml
class 构件
构件 "1" --> "1..N" 服务X
构件 "1" --> "1..N" 接口
接口 "1" -> "1" 服务 : ?
@enduml
\end{plantuml}

\lipsum[3]
Expand Down
5 changes: 4 additions & 1 deletion plantuml.sty
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,23 @@

\newif\ifplantuml@center
\plantuml@centertrue
\newcommand{\plantumlwidth}{\linewidth} % only fractions of \linewidth
\newcommand{\plantumlwidth}{0.4\linewidth} % only fractions of \linewidth

%%% 主要是定义plantumlipnut输入
\newwrite\plantuml@out
\def\plantuml@startgen{%
\@bsphack
\immediate\openout\plantuml@out\plantuml@tempfile\plantuml@ext
\immediate\write\plantuml@out{@startuml}
\immediate\write\plantuml@out{skinparam dpi 300}
\let\do\@makeother\dospecials
\catcode`\^^M\active \catcode`\^^I=12
\def\verbatim@processline{%
\immediate\write\plantuml@out
{\the\verbatim@line}}%
\verbatim@start}
\def\plantuml@finishgen{%
\immediate\write\plantuml@out{@enduml}
\immediate\closeout\plantuml@out
\@esphack
\plantuml@process
Expand Down

0 comments on commit c91e09e

Please sign in to comment.