이 질문에 대한 David Carlisle의 답변을 정리합니다.명사와 동사의 순열을 통해 ~와 함께
\input{pgfutil-common}
\input{pgfmath.code}
답변과 같이 추가되었습니다.전체 pgf 패키지를 로드하지 않고 pgfmath를 로드할 수 있습니까?, 즉 다음 코드
\documentclass{article}
\usepackage{pgfmath,color}
\input{pgfutil-common}
\input{pgfmath.code}
\def\noun{%
{{Fu}},{Fa}{ra},{{Uta}},{Ma}{ma},%
{Ma}{mi},{{Ralf}},{La}{ra},%
{Ma}{ra},{Mu}{rat},{Mar}{ta},%
{Ma}{mut},{Ir}{a},{Mir}{a},{Ma}{ri}{a}%
}
\def\verb{{malt},{ruft},{um}{armt}%
}
\def\zc{\expandafter\zzblue}
\def\zzblue#1{%
\ifx\relax#1\else\textcolor{blue}{#1}%
\expandafter\zzred
\fi}
\def\zzred#1{%
\ifx\relax#1\else\textcolor{red}{#1}%
\expandafter\zzblue
\fi}
\begin{document}
\makeatletter
\@for\za:=\noun\do{%
\@for\zb:=\noun\do{%
\ifx\za\zb\else
\@for\v:=\verb\do{
\par\zc\za\relax\ \zc\v\relax\ \zc\zb\relax
\pgfmathparse{random(2)}%
\ifnum\pgfmathresult=1\ \textcolor{blue}{mit mir}\fi.
}%
\fi
}}
\end{document}
다음 오류가 발생합니다(첫 번째 오류에 대한 로그 파일).
This is pdfTeX, Version 3.1415926-1.40.11 (MiKTeX 2.9)
entering extended mode
(D:/PSch/Stack/mami2.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
senglishmax, welsh, loaded.
(D:\PSch\Stack\article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\pgf\math\pgfmath.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmath.code.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathcalc.code.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathutil.code.tex")
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathparser.code.tex")
("C:\Program Files\MiKTeX 2.9\tex\generic\pgf\math\pgfmathfunctions.code.tex"
! Undefined control sequence.
l.108 \pgfkeys
{%
?
내가 뭘 잘못하고 있는 걸까요?