我有一个 tex 代码,我尝试在其中生成一些简单的流程。我像这样编译它:
latex toc.tex
dvips toc.dvi
pstopdf toc.ps
我得到的输出:
我想删除msc IJS_{NK, dec/enc}
左上角的文字,或者至少将其移动到其他地方。
我的代码:
\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage{tkz-base,tkz-fct}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{psfrag}
\usepackage{amsmath}
\usepackage{msc}
\begin{document}
\begin{figure*}[!h]
\center
\resizebox{12cm}{!} {
\begin{msc}{$IJS_{NK, dec/enc}$}
\small
\setlength{\instwidth}{1.7 cm}
\setlength{\instdist}{4.3 cm}
\setlength{\bottomfootdist}{0.2 cm}
%\setlength{\instwidth}{2 cm}
%\setlength{\instdist}{3.75 cm}
\setlength{\envinstdist}{1.2 cm}
\setlength{\topheaddist}{0.5 cm}
\instfoot
\declinst{I}{\scriptsize new node}{$I$}
\declinst{R}{\scriptsize neighbour node}{$R$}
\declinst{J1k-1}{\scriptsize intermediate nodes}{$J_{1:k-1}$}
\declinst{Jk}{\scriptsize \:\: intermediate node}{$J_{k}$}
\declinst{S}{\scriptsize Sink}{$S$}
% left to right messages
\mess{$m_1 = \{n_I, I, R\}_{K_{DH}(I,S)}$}{I}{R}
\nextlevel
\mess{$\{n_R, m_1\}_{NK}$}{R}{J1k-1}
\nextlevel
\mess{$\{n_{J_{k-1}}, ..., n_{J_1}, n_R, m_1\}_{NK}$}{J1k-1}{Jk}
\nextlevel
\mess{$\{n_{J_k}, ..., n_{J_1}, n_R, m_1\}_{NK}$}{Jk}{S}
\nextlevel
% right to left messages
\nextlevel
\mess{$\{n_{J_k}, ..., n_{J_1}, n_R, m_2\}_{NK}$}{S}{Jk}
\nextlevel
\mess{$\{n_{J_{k-1}}, ..., n_{J_1}, n_R, m_2\}_{NK}$}{Jk}{J1k-1}
\nextlevel
\mess{$\{n_R, m_2\}_{NK}$}{J1k-1}{R}
\nextlevel
\mess{$m_3$}{R}{I}
%\nextlevel
\end{msc}
}
\fbox{
\begin{minipage}{11.5 cm}
$m_2 = \{pk(I), \{n_I, I, R, S\}_{K_{DH}(I,S)}\}_{K_{DH}(R,S)}$\\
$m_3 = \{K(R,I), \{n_I, I, R, S\}_{K_{DH}(I,S)} \}_{pk(I)}$
\end{minipage}
}
\caption{$IJS_{NK, dec/enc}$: Proof by Induction.}
\label{figure : IJS-NK-dec-enc Induction}
\end{figure*}
\end{document}
解决了!
添加就足够了
\renewcommand\msckeyword{}
\renewcommand\hmsckeyword{}
\renewcommand\mscdockeyword{}
之前\begin{document}
和..完成!这个答案帮助了我:如何使用 msc 包从消息序列图中删除单词“msc”?。
答案1
使用空参数执行\setmsckeyword{}
并调用。msc
msc
我还重新排序了输入:最好在要调整大小的框外设置参数。我将两个框都设置为\textwidth
;将其更改为明确的尺寸或 的因子,\textwidth
例如0.8\textwidth
。
使用\centering
而不是\center
。
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{msc}
\begin{document}
\begin{figure*}[!htp]
\centering
\setmsckeyword{}% remove the word msc
\setlength{\instwidth}{1.7 cm}
\setlength{\instdist}{4.3 cm}
\setlength{\bottomfootdist}{0.2 cm}
%\setlength{\instwidth}{2 cm}
%\setlength{\instdist}{3.75 cm}
\setlength{\envinstdist}{1.2 cm}
\setlength{\topheaddist}{0.5 cm}
\resizebox{\textwidth}{!}{% <-- don't forget this %
\begin{msc}{}
\declinst{I}{\scriptsize new node}{$I$}
\declinst{R}{\scriptsize neighbour node}{$R$}
\declinst{J1k-1}{\scriptsize intermediate nodes}{$J_{1:k-1}$}
\declinst{Jk}{\scriptsize \:\: intermediate node}{$J_{k}$}
\declinst{S}{\scriptsize Sink}{$S$}
%
% left to right messages
\mess{$m_1 = \{n_I, I, R\}_{K_{DH}(I,S)}$}{I}{R}
\nextlevel
\mess{$\{n_R, m_1\}_{NK}$}{R}{J1k-1}
\nextlevel
\mess{$\{n_{J_{k-1}}, \dots, n_{J_1}, n_R, m_1\}_{NK}$}{J1k-1}{Jk}
\nextlevel
\mess{$\{n_{J_k}, \dots, n_{J_1}, n_R, m_1\}_{NK}$}{Jk}{S}
\nextlevel
%
% right to left messages
\nextlevel
\mess{$\{n_{J_k}, \dots, n_{J_1}, n_R, m_2\}_{NK}$}{S}{Jk}
\nextlevel
\mess{$\{n_{J_{k-1}}, \dots, n_{J_1}, n_R, m_2\}_{NK}$}{Jk}{J1k-1}
\nextlevel
\mess{$\{n_R, m_2\}_{NK}$}{J1k-1}{R}
\nextlevel
\mess{$m_3$}{R}{I}
%\nextlevel
\end{msc}% <-- don't forget this %
}
\fbox{% <-- don't forget this %
\begin{minipage}{\dimexpr\textwidth-2\fboxsep-2\fboxrule}
$m_2 = \{pk(I), \{n_I, I, R, S\}_{K_{DH}(I,S)}\}_{K_{DH}(R,S)}$\\
$m_3 = \{K(R,I), \{n_I, I, R, S\}_{K_{DH}(I,S)} \}_{pk(I)}$
\end{minipage}% <-- don't forget this %
}
\caption{$IJS_{NK, \mathrm{dec}/\mathrm{enc}}$: Proof by Induction.}
\label{figure : IJS-NK-dec-enc Induction}
\end{figure*}
\end{document}