// 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));
질문:
image와 labelpath를 어떻게 연결할 수 있나요?
답변1
labelpath
need 이므로 settings.tex="latex";
해결 방법은 asy
환경에서 두 출력을 별도로 생성한 다음 오버레이하는 것입니다. 따라서 를 실행 pdfLaTeX
한 다음 Asymptote
두 번, 다시 실행해야 합니다 pdfLaTeX
. 이러한 방식으로 CD 레이블의 출력은 filename-2.eps
및 이며, 그 중 하나는 첫 번째 환경에서 filename-2.eps-converted-to.pdf
와 같이 포함될 수 있습니다 .label(graphic("filename-2.eps"),(0,0));
asy
이 명령은 clip
현재 내용을 CD 레이블 영역에 맞춰 잘라내어 두 그래픽을 중앙에 배치합니다. path c=circle((0,0),1); draw(c,white);
정사각형 이미지(거의 100x100)를 얻기 위한 환상의 흰색 원입니다.
참고: 다음과 같은 파일 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}