// https://asymptote.sourceforge.io/gallery/CDlabel.asy
//settings.tex="pdflatex";
size(10cm);
usepackage("graphicx");
import labelpath;
fill(unitcircle^^(scale(0.15)*unitcircle),evenodd+rgb(0.5,1,0.83));
label(minipage(
"\centering\scriptsize
\textbf{
\LARGE {\tt Your Title}\\
\smallskip
\small The authors}\\
\smallskip
\today\\
",6cm),(0,0.5));
label("Your Texts",(-0.6,0));
label("Your Texts",(0.6,0));
//https://en.wikipedia.org/wiki/LaTeX#/media/File:LaTeX_project_logo_bird.svg
// label(graphic("logo.svg","height=2cm"),(0,-0.5));
labelpath("\textbf{ \large MACROPODS - Their Care, Breeding and the Rearing of Their Young\, by: David McCauley}",
reverse(arc((0,0),0.88,-80,260)));
// https://asymptote.sourceforge.io/gallery/CDlabel.asy
settings.tex="pdflatex";
size(10cm);
usepackage("graphicx");
import labelpath;
fill(unitcircle^^(scale(0.15)*unitcircle),evenodd+rgb(0.5,1,0.83));
label(minipage(
"\centering\scriptsize
\textbf{
\LARGE {\tt Your Title}\\
\smallskip
\small The authors}\\
\smallskip
\today\\
",6cm),(0,0.5));
label("Your Texts",(-0.6,0));
label("Your Texts",(0.6,0));
//https://en.wikipedia.org/wiki/LaTeX#/media/File:LaTeX_project_logo_bird.svg
label(graphic("logo.svg","height=2cm"),(0,-0.5));
質問:
画像とラベルパスをどのように接続できますか?
答え1
labelpath
には が必要なのでsettings.tex="latex";
、回避策としては、 で両方の出力を別々に生成し、それらをオーバーレイすることです。したがって、 を2 回実行してから、もう一度asy
実行する必要があります 。このようにすると、CD ラベルの出力はととなり、そのうちの 1 つは最初の環境と同様に含めることができます。pdfLaTeX
Asymptote
pdfLaTeX
filename-2.eps
filename-2.eps-converted-to.pdf
label(graphic("filename-2.eps"),(0,0));
asy
このコマンドは、clip
現在のコンテンツを CD ラベル領域にクリップし、2 つのグラフィックを中央に配置します。path c=circle((0,0),1); draw(c,white);
正方形の画像 (ほぼ 100 x 100) を取得するためのファントムの白い円です。
注:filename
ファイル名を参照します.tex
。例:filename.tex
TeXstudio
MWE は3.0.0 およびTeX Live
2020 ( )でテスト済みですfilename.tex
。
\documentclass{standalone}
\usepackage{asymptote}
\begin{document}
\begin{asy}
//https://en.wikipedia.org/wiki/LaTeX#/media/File:LaTeX_project_logo_bird.svg
settings.tex="pdflatex";
size(10cm);
fill(unitcircle^^(scale(0.15)*unitcircle),evenodd+rgb(0.5,1,0.83));
label(minipage(
"\centering\scriptsize
\textbf{
\LARGE {\tt Your Title}\\
\smallskip
\small The authors}\\
\smallskip
\today\\
",6cm),(0,0.5));
label("Your Texts",(-0.6,0));
label("Your Texts",(0.6,0));
label(graphic("logo.pdf","height=2cm"),(0,-0.5));
label(graphic("filename-2.eps"),(0,0));
clip(unitcircle^^(scale(0.15)*unitcircle),evenodd);
\end{asy}
\begin{asy}
// https://asymptote.sourceforge.io/gallery/CDlabel.asy
settings.tex="latex";
size(10cm);
import labelpath;
labelpath("\textbf{ \large MACROPODS - Their Care, Breeding and the Rearing of Their Young\, by: David McCauley}",
reverse(arc((0,0),0.88,-80,260)));
label(graphic("logo.pdf","height=2cm"),(0,-0.5));
path c=circle((0,0),1);
draw(c,white);
\end{asy}
\end{document}