从.tex 文件生成 pdf 时出错

从.tex 文件生成 pdf 时出错

我是第一次使用 Latex。我有一些 .tex 文件需要以 pdf 版本阅读。它们附有方程式和图表。我读了“关于”的第一个文档,但它没有打开。我使用了pdflatex -synctex=1 -interaction=nonstopmode 01-about.tex命令来生成 pdf。我已附加 .tex 代码和生成的 .log。

.tex 文件:

\section{About {\psiboil}}
\label{sec_about}

{\psiboil} ({\sf P}arallel {\sf SI}mulator of {\sf Boil}ing phenomena) is a
three-dimensional, numerical solver for single- and two-phase flows 
with or without heat transfer. It has the capability to simulate conjugate 
heat transfer problems as well. The discretization of governing equations is
based on the~$2^{nd}$ order accurate Finite Volume~(FV) method,
on staggered orthogonal grids. % REF
%
Two-phase flows are simulated with surface tracking algorithm,
based on conservative Level Set~(LS) approach. % REF
%
Linear solvers are based on the Krylov's sub-space family of algorithms,
which can be accelerated with an algebraic multigrid method. % REF

{\psiboil} is written in {\tt C++} programming language and uses Message
Passing Interface ({\tt MPI}) for parallelization. It compiles on most
Linux-based computers\footnote{\tt www.linux.org}. 
The compilation procedure relies on {\tt autotools},
as well as on the {\tt make} utility. On most computational platforms, 
compilation consists of running {\tt configure}, followed by {\tt make}. 
%
{\psiboil} has been compiled on Linux-based PCs, clusters, as
well as main-frame computers such as Cray-XT3\footnote{Cray is
a registered trademark of Cray Inc.\ ({\tt www.cray.com}).}.
It is also possible to compile it on Windows~XP\footnote{Windows~XP
is a registered trademark of Microsoft Inc.\ ({\tt www.microsoft.com}).}.
Cygwin system\footnote{\tt www.cygwin.com} and without~{\tt MPI}
support.

The development of {\psiboil} has started in the summer of~2006,
at Paul Scherrer Institute~(PSI), as an integral part of the project
on Multi-Scale Modeling Analysis~(MSMA), which focuses on mechanistic
modeling of boiling phenomena at multiple scales. Initially, it is
available only to PSI personnel working on the MSMA project. But, should
it prove useful, it might spread further among the academic
community, presumably under a {\tt GNU} license\footnote{www.gnu.org}.
%
The main purpose of {\psiboil} is not to compete with commercial
Computational Fluid Dynamics~(CFD) packages, but rather to serve
as a tool for academic community.

Since it's aim is not to compete with commercial CFD codes, {\psiboil} 
is not an integral program capable to solve a general fluid
flow problem. Rather, it is a suite of objects an algorithms 
which are used as blocks for building programs for particular flow problems. 
As you will see in this tutorial, for every problem being solved, 
a new program\footnote{A new {\tt main()} function, embodied into a
separate~{\tt main.cpp} file.} is written. These programs are supposed
to be short and highly specialized for a particular task. 

Following this rationale, {\psiboil} does not have any input files. 
It's  main program is re-written for each problem being solved and 
actually serves as an input file itself. 

包含错误消息的 .log 文件:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2021.11.18)  20 NOV 2021 18:28
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**01-about.tex
(./01-about.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 3 language(s) loaded.
! Undefined control sequence.
l.1 \section
            {About {\psiboil}}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.1 \section{A
              bout {\psiboil}}
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

Missing character: There is no A in font nullfont!
Missing character: There is no b in font nullfont!
Missing character: There is no o in font nullfont!
Missing character: There is no u in font nullfont!
Missing character: There is no t in font nullfont!
! Undefined control sequence.
l.1 \section{About {\psiboil
                            }}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


Overfull \hbox (20.0pt too wide) in paragraph at lines 1--3
[]
 []

! Undefined control sequence.
l.4 {\psiboil
             } ({\sf P}arallel {\sf SI}mulator of {\sf Boil}ing phenomena) is a
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.4 {\psiboil} (
                {\sf P}arallel {\sf SI}mulator of {\sf Boil}ing phenomena) is a

You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

Missing character: There is no ( in font nullfont!
! Undefined control sequence.
l.4 {\psiboil} ({\sf
                     P}arallel {\sf SI}mulator of {\sf Boil}ing phenomena) is a
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Missing character: There is no P in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no r in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no l in font nullfont!
! Undefined control sequence.
l.4 {\psiboil} ({\sf P}arallel {\sf
                                    SI}mulator of {\sf Boil}ing phenomena) is a


 
Here is how much of TeX's memory you used:
 9 strings out of 494953
 172 string characters out of 6180976
 47251 words of memory out of 5000000
 3394 multiletter control sequences out of 15000+600000
 3640 words of font info for 14 fonts, out of 8000000 for 9000
 14 hyphenation exceptions out of 8191
 18i,5n,12p,103b,104s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

答案1

您的代码无法自行编译,它一定是更大文档的特定部分。但是,我通过假设命令\psiboil在数学模式下类似于 $\psi_boil$ 来修复您的代码。以下是输出:

\documentclass{article}
\newcommand*{\psiboil}{$\psi_{boil}$}
\begin{document}

\section{About {\psiboil}}
\label{sec_about}
{\psiboil} ({\sf P}arallel {\sf SI}mulator of {\sf Boil}ing phenomena) is a
three-dimensional, numerical solver for single- and two-phase flows with or without heat transfer. It has the capability to simulate conjugate 
heat transfer problems as well. The discretization of governing equations isbased on the~$2^{nd}$ order accurate Finite Volume~(FV) method,
on staggered orthogonal grids. % REF
Two-phase flows are simulated with surface tracking algorithm,based on conservative Level Set~(LS) approach. % REF
Linear solvers are based on the Krylov's sub-space family of algorithms,
which can be accelerated with an algebraic multigrid method. % REF
{\psiboil} is written in {\tt C++} programming language and uses Message
Passing Interface ({\tt MPI}) for parallelization. It compiles on most
Linux-based computers\footnote{\tt www.linux.org}. 
The compilation procedure relies on {\tt autotools},
as well as on the {\tt make} utility. On most computational platforms, compilation consists of running {\tt configure}, followed by {\tt make}. 
{\psiboil} has been compiled on Linux-based PCs, clusters, as well as main-frame computers such as Cray-XT3\footnote{Cray is a registered trademark of Cray Inc.\ ({\tt www.cray.com}).}.
It is also possible to compile it on Windows~XP\footnote{Windows~XP is a registered trademark of Microsoft Inc.\ ({\tt www.microsoft.com}).}. Cygwin system\footnote{\tt www.cygwin.com} and without~{\tt MPI} support.
The development of {\psiboil} has started in the summer of~2006, at Paul Scherrer Institute~(PSI), as an integral part of the project 
on Multi-Scale Modeling Analysis~(MSMA), which focuses on mechanistic modeling of boiling phenomena at multiple scales. Initially, it is
available only to PSI personnel working on the MSMA project. But, should it prove useful, it might spread further among the academic community, presumably under a {\tt GNU} license\footnote{www.gnu.org}.
The main purpose of {\psiboil} is not to compete with commercial Computational Fluid Dynamics~(CFD) packages, but rather to serve as a tool for academic community. 
Since it's aim is not to compete with commercial CFD codes, {\psiboil}  is not an integral program capable to solve a general fluid flow problem. Rather, it is a suite of objects an algorithms  which are used as blocks for building programs for particular flow problems.  As you will see in this tutorial, for every problem being solved, 
a new program\footnote{A new {\tt main()} function, embodied into a separate~{\tt main.cpp} file.} is written. These programs are supposed to be short and highly specialized for a particular task. 
Following this rationale, {\psiboil} does not have any input files. It's  main program is re-written for each problem being solved and actually serves as an input file itself. 

\end{document}

在此处输入图片描述

答案2

我猜是你的\psibol命令定义得不太好。我觉得你试图使用PSIBOIL无衬线字体,这似乎是问题所在。

正如@L Mascolo 指出的那样,您只需要创建一个不包含任何错误且不会与您周围的其他内容发生冲突的命令。

例子:

\documentclass{article}

\newcommand*{\psiboil}{\textsf{PSIBOIL}}

\begin{document}
    \section{About {\psiboil}}
    \label{sec_about}

    {\psiboil} (\textsf{P}arallel \textsf{SI}mulator of \textsf{Boil}ing phenomena) is a
three-dimensional, numerical solver for single- and two-phase flows 
with or without heat transfer. It has the capability to simulate conjugate 
heat transfer problems as well. The discretization of governing equations is
based on the~$2^{nd}$ order accurate Finite Volume~(FV) method,
on staggered orthogonal grids. % REF
%
Two-phase flows are simulated with surface tracking algorithm,
based on conservative Level Set~(LS) approach. % REF
%
Linear solvers are based on the Krylov's sub-space family of algorithms,
which can be accelerated with an algebraic multigrid method. % REF

{\psiboil} is written in {\tt C++} programming language and uses Message
Passing Interface ({\tt MPI}) for parallelization. It compiles on most
Linux-based computers\footnote{\tt www.linux.org}. 
The compilation procedure relies on {\tt autotools},
as well as on the {\tt make} utility. On most computational platforms, 
compilation consists of running {\tt configure}, followed by {\tt make}. 
%
{\psiboil} has been compiled on Linux-based PCs, clusters, as
well as main-frame computers such as Cray-XT3\footnote{Cray is
a registered trademark of Cray Inc.\ ({\tt www.cray.com}).}.
It is also possible to compile it on Windows~XP\footnote{Windows~XP
is a registered trademark of Microsoft Inc.\ ({\tt www.microsoft.com}).}.
Cygwin system\footnote{\tt www.cygwin.com} and without~{\tt MPI}
support.

The development of {\psiboil} has started in the summer of~2006,
at Paul Scherrer Institute~(PSI), as an integral part of the project
on Multi-Scale Modeling Analysis~(MSMA), which focuses on mechanistic
modeling of boiling phenomena at multiple scales. Initially, it is
available only to PSI personnel working on the MSMA project. But, should
it prove useful, it might spread further among the academic
community, presumably under a {\tt GNU} license\footnote{www.gnu.org}.
%
The main purpose of {\psiboil} is not to compete with commercial
Computational Fluid Dynamics~(CFD) packages, but rather to serve
as a tool for academic community.

Since it's aim is not to compete with commercial CFD codes, {\psiboil} 
is not an integral program capable to solve a general fluid
flow problem. Rather, it is a suite of objects an algorithms 
which are used as blocks for building programs for particular flow problems. 
As you will see in this tutorial, for every problem being solved, 
a new program\footnote{A new {\tt main()} function, embodied into a
separate~{\tt main.cpp} file.} is written. These programs are supposed
to be short and highly specialized for a particular task. 

Following this rationale, {\psiboil} does not have any input files. 
It's  main program is re-written for each problem being solved and 
actually serves as an input file itself.

 \end{document}

输出:

在此处输入图片描述

相关内容