![使用 feynmf/feynmp 包的空图或不可编译的图](https://linux22.com/image/437243/%E4%BD%BF%E7%94%A8%20feynmf%2Ffeynmp%20%E5%8C%85%E7%9A%84%E7%A9%BA%E5%9B%BE%E6%88%96%E4%B8%8D%E5%8F%AF%E7%BC%96%E8%AF%91%E7%9A%84%E5%9B%BE.png)
feynmf
奇怪的是,今天我想用/包创建一个图表feynmp
,但以@egreg的答案为例这里我什么也没看到(我用 TeXworks 编译)。
这种异常只发生在我身上吗?
第一个代码:
\documentclass[11pt]{article}
\usepackage{feynmp-auto}
\begin{document}
\begin{fmffile}{afilename}% choose something better!
\begin{fmfgraph}(40,25)
\fmfpen{thick}
\fmfleft{i1,i2}
\fmfright{o1,o2}
\fmf{fermion}{i1,v1,v3,o1}
\fmf{fermion}{o2,v4,v2,i2}
\fmf{photon}{v1,v2}
\fmf{photon}{v3,v4}
\fmfdotn{v}{4}
\end{fmfgraph}
\end{fmffile}
\end{document}
第二段代码:
\documentclass[11pt]{article}
\usepackage{feynmp}
\DeclareGraphicsRule{*}{mps}{*}{} % for being able to read the produced file
\begin{document}
\begin{fmffile}{afilename}% choose something better!
\begin{fmfgraph}(40,25)
\fmfpen{thick}
\fmfleft{i1,i2}
\fmfright{o1,o2}
\fmf{fermion}{i1,v1,v3,o1}
\fmf{fermion}{o2,v4,v2,i2}
\fmf{photon}{v1,v2}
\fmf{photon}{v3,v4}
\fmfdotn{v}{4}
\end{fmfgraph}
\end{fmffile}
\end{document}
截屏:
我已经轻松地编译并看到了图表:请参阅我最近的回答:如何更改“feynmp”中的箭头大小(最后编辑于 2021/07/14)。此外,使用我的代码我什么也看不到。
如果我使用这个 MWE:
第三个代码:
\documentclass[11pt]{article}
\usepackage{feynmf}%%%% using this package instead of feynmp-auto or feynmp%
\begin{document}
\begin{fmffile}{afilename}
\begin{fmfgraph}(40,25)
\fmfpen{thick}
\fmfleft{i1,i2}
\fmfright{o1,o2}
\fmf{fermion}{i1,v1,v3,o1}
\fmf{fermion}{o2,v4,v2,i2}
\fmf{photon}{v1,v2}
\fmf{photon}{v3,v4}
\fmfdotn{v}{4}
\end{fmfgraph}
\end{fmffile}
\end{document}
它是相同的,但我有这个错误:
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (MiKTeX 21.7 32-bit)
entering extended mode
(C:/Users/utente/Desktop/new question/Test3.tex
LaTeX2e <2021-06-01> patch level 1
L3 programming layer <2021-07-12>
(C:\Program Files\MiKTeX 2.9\tex/latex/base\article.cls
Document Class: article 2021/02/12 v1.4n Standard LaTeX document class
(C:\Program Files\MiKTeX 2.9\tex/latex/base\size11.clo))
(C:\Program Files\MiKTeX 2.9\tex/latex/feynmf\feynmf.sty)
(C:\Program Files\MiKTeX 2.9\tex/latex/l3backend\l3backend-pdftex.def)Running miktex-makemf.exe...
Sorry, but miktex-makemf did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\utente\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makemf.log
Running miktex-hbf2gf.exe...
Couldn't open `afilena.cfg'
hbf2gf (CJK ver. 4.8.4)
Sorry, but miktex-maketfm did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\utente\AppData\Local\MiKTeX\2.9\miktex\log\miktex-maketfm.log
No file Test3.aux.
feynmf: Files afilename.mf and afilename.tfm not found:
feynmf: This job will create afilename.mf, process it later with METAFONT
feynmf: and then reprocess this file. Don't worry about a harmless premature
feynmf: MakeTeXTFM that might have failed just a moment ago!
[1{C:/Users/utente/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
(Test3.aux) )<C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.
pfb>
Output written on Test3.pdf (1 page, 14615 bytes).
SyncTeX written on Test3.synctex.gz.
Transcript written on Test3.log.
Sorry, but "MiKTeX Compiler Driver" did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\utente\AppData\Local\MiKTeX\2.9\miktex\log\texify.log
開幕miktex-makemf
:
2021-07-26 13:51:36,873+0200 INFO miktex-makemf - this process (5320) started by 'miktex-maketfm' with command line: miktex-makemf.exe --miktex-disable-maintenance --miktex-disable-diagnose --verbose diagram
2021-07-26 13:51:36,904+0200 FATAL miktex-makemf - The diagram source file could not be found.
2021-07-26 13:51:36,904+0200 FATAL miktex-makemf - The diagram source file could not be found.
2021-07-26 13:51:36,904+0200 FATAL miktex-makemf - Info:
2021-07-26 13:51:36,904+0200 FATAL miktex-makemf - Source:
2021-07-26 13:51:36,904+0200 FATAL miktex-makemf - Line: 0
2021-07-26 13:51:36,935+0200 INFO miktex-makemf - this process (5320) finishes with exit code 1
2021-07-26 13:52:18,624+0200 INFO miktex-makemf - this process (4544) started by 'miktex-maketfm' with command line: miktex-makemf.exe --miktex-disable-maintenance --miktex-disable-diagnose --verbose diagram
2021-07-26 13:52:18,655+0200 FATAL miktex-makemf - The diagram source file could not be found.
2021-07-26 13:52:18,655+0200 FATAL miktex-makemf - The diagram source file could not be found.
2021-07-26 13:52:18,655+0200 FATAL miktex-makemf - Info:
2021-07-26 13:52:18,655+0200 FATAL miktex-makemf - Source:
2021-07-26 13:52:18,655+0200 FATAL miktex-makemf - Line: 0
2021-07-26 13:52:18,686+0200 INFO miktex-makemf - this process (4544) finishes with exit code 1
2021-07-26 13:58:22,388+0200 INFO miktex-makemf - this process (4120) started by 'miktex-maketfm' with command line: miktex-makemf.exe --miktex-disable-maintenance --miktex-disable-diagnose --verbose afilename
2021-07-26 13:58:22,420+0200 FATAL miktex-makemf - The afilename source file could not be found.
2021-07-26 13:58:22,420+0200 FATAL miktex-makemf - The afilename source file could not be found.
2021-07-26 13:58:22,420+0200 FATAL miktex-makemf - Info:
2021-07-26 13:58:22,420+0200 FATAL miktex-makemf - Source:
2021-07-26 13:58:22,420+0200 FATAL miktex-makemf - Line: 0
2021-07-26 13:58:22,451+0200 INFO miktex-makemf - this process (4120) finishes with exit code 1
2021-07-26 13:59:19,568+0200 INFO miktex-makemf - this process (4892) started by 'miktex-maketfm' with command line: miktex-makemf.exe --miktex-disable-maintenance --miktex-disable-diagnose --verbose mygraph
2021-07-26 13:59:19,615+0200 FATAL miktex-makemf - The mygraph source file could not be found.
2021-07-26 13:59:19,615+0200 FATAL miktex-makemf - The mygraph source file could not be found.
2021-07-26 13:59:19,615+0200 FATAL miktex-makemf - Info:
2021-07-26 13:59:19,615+0200 FATAL miktex-makemf - Source:
2021-07-26 13:59:19,615+0200 FATAL miktex-makemf - Line: 0
2021-07-26 13:59:19,646+0200 INFO miktex-makemf - this process (4892) finishes with exit code 1
2021-07-26 14:00:04,917+0200 INFO miktex-makemf - this process (5616) started by 'miktex-maketfm' with command line: miktex-makemf.exe --miktex-disable-maintenance --miktex-disable-diagnose --verbose mygraph
2021-07-26 14:00:04,948+0200 FATAL miktex-makemf - The mygraph source file could not be found.
2021-07-26 14:00:04,948+0200 FATAL miktex-makemf - The mygraph source file could not be found.
2021-07-26 14:00:04,948+0200 FATAL miktex-makemf - Info:
2021-07-26 14:00:04,948+0200 FATAL miktex-makemf - Source:
2021-07-26 14:00:04,948+0200 FATAL miktex-makemf - Line: 0
2021-07-26 14:00:04,979+0200 INFO miktex-makemf - this process (5616) finishes with exit code 1
2021-07-26 14:01:53,748+0200 INFO miktex-makemf - this process (668) started by 'miktex-maketfm' with command line: miktex-makemf.exe --miktex-disable-maintenance --miktex-disable-diagnose --verbose mygraph
2021-07-26 14:01:53,763+0200 FATAL miktex-makemf - The mygraph source file could not be found.
2021-07-26 14:01:53,795+0200 FATAL miktex-makemf - The mygraph source file could not be found.
2021-07-26 14:01:53,795+0200 FATAL miktex-makemf - Info:
2021-07-26 14:01:53,795+0200 FATAL miktex-makemf - Source:
2021-07-26 14:01:53,795+0200 FATAL miktex-makemf - Line: 0
2021-07-26 14:01:53,857+0200 INFO miktex-makemf - this process (668) finishes with exit code 1
2021-07-26 14:13:52,195+0200 INFO miktex-makemf - this process (2588) started by 'miktex-maketfm' with command line: miktex-makemf.exe --miktex-disable-maintenance --miktex-disable-diagnose --verbose afilename
2021-07-26 14:13:52,211+0200 FATAL miktex-makemf - The afilename source file could not be found.
2021-07-26 14:13:52,211+0200 FATAL miktex-makemf - The afilename source file could not be found.
2021-07-26 14:13:52,211+0200 FATAL miktex-makemf - Info:
2021-07-26 14:13:52,211+0200 FATAL miktex-makemf - Source:
2021-07-26 14:13:52,211+0200 FATAL miktex-makemf - Line: 0
2021-07-26 14:13:52,242+0200 INFO miktex-makemf - this process (2588) finishes with exit code 1
这是.log
文件:
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (MiKTeX 21.7 32-bit) (preloaded format=pdflatex 2021.7.26) 26 JUL 2021 14:13
entering extended mode
**"C:/Users/utente/Desktop/new question/Test3.tex"
(C:/Users/utente/Desktop/new question/Test3.tex
LaTeX2e <2021-06-01> patch level 1
L3 programming layer <2021-07-12>
(C:\Program Files\MiKTeX 2.9\tex/latex/base\article.cls
Document Class: article 2021/02/12 v1.4n Standard LaTeX document class
(C:\Program Files\MiKTeX 2.9\tex/latex/base\size11.clo
File: size11.clo 2021/02/12 v1.4n Standard LaTeX file (size option)
)
\c@part=\count182
\c@section=\count183
\c@subsection=\count184
\c@subsubsection=\count185
\c@paragraph=\count186
\c@subparagraph=\count187
\c@figure=\count188
\c@table=\count189
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
(C:\Program Files\MiKTeX 2.9\tex/latex/feynmf\feynmf.sty
Package: feynmf 1996/12/02 v1.08 LaTeX/Metafont Feynman Diagram Package (ohl)
\@outfmf=\write3
\fmfbuf@=\toks16
\c@fmfgraph=\count190
\grep@infile=\read2
\grep@outfile=\write4
)
(C:\Program Files\MiKTeX 2.9\tex/latex/l3backend\l3backend-pdftex.def
File: l3backend-pdftex.def 2021-07-12 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count191
\l__pdf_internal_box=\box50
)
No file Test3.aux.
\openout1 = `Test3.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
! Font \f@ynmf:afilename=afilename not loadable: Metric (TFM) file not found.
<to be read again>
\@interactionmode
l.6 \begin{fmffile}{afilename}
I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.
feynmf: Files afilename.mf and afilename.tfm not found:
feynmf: This job will create afilename.mf, process it later with METAFONT
feynmf: and then reprocess this file. Don't worry about a harmless premature
feynmf: MakeTeXTFM that might have failed just a moment ago!
\openout3 = `afilename.mf'.
[1
{C:/Users/utente/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
(Test3.aux) )
Here is how much of TeX's memory you used:
560 strings out of 478832
8840 string characters out of 2855361
302483 words of memory out of 3000000
18569 multiletter control sequences out of 15000+600000
403730 words of font info for 28 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
32i,5n,41p,237b,107s stack positions out of 5000i,500n,10000p,200000b,80000s
<C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.
pfb>
Output written on Test3.pdf (1 page, 14615 bytes).
PDF statistics:
11 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
发生了什么事?我不明白原因。
使用纸属植物所有代码均能正常工作:
答案1
我已经设置我的编辑TeXworks
器优先(您可以看到顶部的黄色矩形)。
在我点击pdfLaTeX+MakeIndex+BibTeX
(您可以看到绿色矩形)并在配置工具上添加(可以看到橙色矩形)之后,
这条线,
--tex-option=--shell-escape
我看到了图表,例如我的问题如下:如何更改“feynmp”中的箭头大小