
Ipe向量圖形編輯器
我目前正在評估ipe
向量圖形編輯器。一個非常吸引人的特點是可以在其文字物件中使用 LaTeX 命令只要它們在 a \makebox
(對於標籤)或 minipage(對於 minipage)內是合法的。但是,不能使用涉及 PDF 的非線性轉換的命令,例如產生超連結或包含外部圖像的命令。儘管如此,在附加 LaTeX 套件中定義的 LaTeX 命令可以包含在 LaTeX 序言中的命令中,可以在選單下\usepackage
設定。Document properties
Edit
問題
我正在尋找一種將文字包含在左或右箭頭形框中的方法,其中包含 LaTeX 命令ipe
?一個簡單的 LaTeX 包,可以創建類似rarrow
和larrow
的文字框BoxStyle
班級在matplotlib
(請看下面的樣本)就可以了。其他技術也受到歡迎。 LibreOffice Impress 和 PowerPoint 也提供此類帶有文字的箭頭形狀,甚至是彎曲的箭頭形狀。
嘗試
\fbox
在文字物件周圍繪製ipe
可以完美地工作。即使在序言中進行數學旋轉也\ovalbox
沒有問題。\usepackage{rotating, fancybox}
裡面沒有箭頭fancybox
, 儘管。- 我尋找一個 LaTeX 包,其中提供箭頭形框CTAN 上「拳擊」中列出的軟體包。也許我正在查看它,但似乎沒有列出這樣的包。
- 這裡的每個人似乎都使用 TikZ arrows,所以我嘗試了這個例子和這個例子裡面
ipe
。這些失敗的 TikZ 實驗的結果如下圖所示。由於ipe
前面提到的 LaTeX 文字物件限制,它失敗了。
matplotlib Boxstyle 樣本
ipe 中的旋轉橢圓盒
TikZ 箭頭在 ipe 中不起作用
答案1
這是一個基於 LaTeX 圖片模式的「箭頭框」巨集。也許這對你有用?
\documentclass{article}
\makeatletter
\newdimen\ab@texttotalheight
\newdimen\ab@arrowstemwidth
\newdimen\ab@arrowheadwidth
\newdimen\ab@arrowwidth
\newdimen\ab@arrowstemheight
\newdimen\ab@arrowheight
\newcommand\rightarrowbox{\@arrowbox+}
\newcommand\leftarrowbox{\@arrowbox-}
\newcommand\@arrowbox[2]
{%
\begingroup
\setbox\@tempboxa=\hbox{#2}%
\ab@texttotalheight\dimexpr\ht\@tempboxa+\dp\@tempboxa\relax
\ab@arrowstemwidth\dimexpr\wd\@tempboxa\relax
\ab@arrowheadwidth\dimexpr2\fboxsep+.5\ab@texttotalheight\relax
\ab@arrowwidth\dimexpr\ab@arrowstemwidth+\ab@arrowheadwidth\relax
\ab@arrowstemheight\dimexpr2\fboxsep+\ab@texttotalheight\relax
\ab@arrowheight\dimexpr4\fboxsep+\ab@texttotalheight\relax
\thicklines
\unitlength\p@
\edef\@temp{{picture}(\strip@pt\ab@arrowwidth,\strip@pt\ab@arrowheight)\if#1-(-\strip@pt\ab@arrowwidth,0)\fi}%
\expandafter\raisebox\expandafter{\the\dimexpr-\dp\@tempboxa-2\fboxsep\relax}
{%
\expandafter\begin\@temp
\put(#1\strip@pt\@halfwidth,\strip@pt\fboxsep){\line(0,1){\strip@pt\ab@arrowstemheight}}
\@tempdima\dimexpr2\fboxsep+\dp\@tempboxa\relax
\@tempdimb\if#1-\dimexpr\fboxsep+\wd\@tempboxa\relax\else\fboxsep\fi\relax
\put(#1\strip@pt\@tempdimb,\strip@pt\@tempdima){\box\@tempboxa}
\@tempdima\dimexpr3\fboxsep+\ab@texttotalheight\relax
\@tempdimb\dimexpr\ab@arrowstemwidth+\@halfwidth\relax
\put(0,\strip@pt\@tempdima){\line(#11,0){\strip@pt\@tempdimb}}
\put(0,\strip@pt\fboxsep){\line(#11,0){\strip@pt\@tempdimb}}
\put(#1\strip@pt\ab@arrowstemwidth,\strip@pt\@tempdima){\line(0,1){\strip@pt\fboxsep}}
\put(#1\strip@pt\ab@arrowstemwidth,0){\line(0,1){\strip@pt\fboxsep}}
\advance\@tempdima\fboxsep
\put(#1\strip@pt\ab@arrowstemwidth,\strip@pt\@tempdima){\line(#11,-1){\strip@pt\ab@arrowheadwidth}}
\put(#1\strip@pt\ab@arrowstemwidth,0){\line(#11,1){\strip@pt\ab@arrowheadwidth}}
\end{picture}%
}%
\endgroup
}
\begin{document}
\leftarrowbox{\Large\textsf{foo}} \rightarrowbox{\Large\textsf{foo}}
\fbox{\Large\textsf{foo}}
\bigskip
\leftarrowbox{\Large\textsf{goo}} \rightarrowbox{\Large\textsf{goo}}
\fbox{\Large\textsf{goo}}
\bigskip
\leftarrowbox{\Large\textsf{\strut foo}} \rightarrowbox{\Large\textsf{\strut goo}}
\bigskip
\leftarrowbox{\Large\textsf{\begin{tabular}{l}foo\\goo\end{tabular}}}
\rightarrowbox{\Large\textsf{\begin{tabular}{l}foo\\goo\end{tabular}}}
\fbox{\Large\textsf{\begin{tabular}{l}foo\\goo\end{tabular}}}
\end{document}
輸出:
編輯
作為 OP,我已將上述序言添加到ipe
,以及附加的\usepackage{rotating}
.ipe
為了產生傾斜的文字箭頭,文字物件僅包含以下內容:
\begin{turn}{56}
\rightarrowbox{\Large\textbf{yahoo!}}
\end{turn}