错误符号与积分符号一起出现

错误符号与积分符号一起出现

我正在 Lyx 中撰写一篇论文,相对成功,但每当我添加带有积分符号的数学方程式时,它都会将其编译成完全不同的符号(就像中间带有加号的交叉点/拱门符号!)。知道是什么原因造成的吗?无论我直接输入 TeX 代码还是单击带有积分符号的按钮,结果都一样。

%% LyX 2.0.7.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}
\usepackage{mathrsfs}
\usepackage{amstext}
\usepackage{esint}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
%
% tocprelim option must be included to put the roman numeral pages in the
% table of contents
%
% The cornellheadings option will make headings completely consistent with
% guidelines.
%
% This sample lyx document is based on a sample latex document originally provided by Blake Jacquot, and
% fixed up by Andrew Myers.
%
%Some possible packages to include
\usepackage{pstricks}
\usepackage{graphics}
\usepackage{moreverb}
\usepackage{subfigure}
\usepackage{epsfig}
\usepackage{subfigure}
\usepackage{hangcaption}
\usepackage{txfonts}
\usepackage{palatino}
\usepackage{amsbsy} % for bold math (use \boldsymbol in math env.)

%if you're having problems with overfull boxes, you may need to increase
%the tolerance to 9999
\tolerance=9999

% commented this out from downloaded tmplate
%\bibliographystyle{IEEEbib}

\renewcommand{\caption}[1]{\singlespacing\hangcaption{#1}\normalspacing}
\renewcommand{\topfraction}{0.85}
\renewcommand{\textfraction}{0.1}
\renewcommand{\floatpagefraction}{0.75}

\title {Title}
\author {B}
% don't forget to change master/phd option under "document class"

% to fix cross-reference formats:
%\newrefformat{fig}{figure~\ref{#1}}
%\newrefformat{sub}{section~\ref{#1}}
%\newrefformat{sec}{section~\ref{#1}}
%\newrefformat{cha}{chapter~\ref{#1}}
%\newrefformat{eq}{equation~\ref{#1}}
%\newrefformat{tab}{table~\ref{#1}}

% this can be removed before the final version
%\usepackage{watermark}
%\usepackage{datetime}
%\watermark{DRAFT \jobname; generated  \today{} \currenttime}

%\usepackage[colorlinks=false,bookmarks=true,breaklinks=true,pdfborder=0 0 0]{hyperref}

\makeatother

\usepackage{babel}
\begin{document}
The integral length scale can be computed directly as $\text{\ensuremath{\mathscr{L}}}_{L}=\int a_{11,1}(r)\ dr$
(should be integral sign!) at every height. 
\end{document}

答案1

加载txfonts然后完全没有意义palatino。前者为文本和数学设置 Times 字体,后者基本上已经过时了。这就是问题的根源。

此外,序言很糟糕。

  1. pstricks应避免在不需要的情况下加载
  2. 而不是graphics,加载graphicx更强大的
  3. subfigure已经过时了 15 年;对于子浮筒,推荐的软件包是subcaption

  4. epsfig已被弃用 20 多年;它的存在只是为了与旧文档兼容

  5. hangcaption是一个 LaTeX2.09 包,所以非常过时的

  6. amstext应该amsmathamsbsy由自动加载amsmath

  7. 设置\tolerance=9999是导致排版不佳的必然原因

最后,

\text{\ensuremath{\mathscr{L}}}

是一种非常复杂的方法,可以达到同样的效果

\mathscr{L}

我希望这不是 LyX 主动这么做的。

函数与微分之间的单词间距是错误的:

$\mathscr{L}_{L}=\int a_{11,1}(r) \, dr$

是正确的输入。


您如何解决这个问题?如果您希望 Palatino 作为文本和数学字体,请删除

\usepackage{esint}
\usepackage{txfonts}
\usepackage{palatino}

并输入

\usepackage{newpxtext,newpxmath}

反而。

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}

\usepackage{amsmath}
\usepackage{newpxtext,newpxmath}
\usepackage{mathrsfs}

%\usepackage[colorlinks=false,bookmarks=true,breaklinks=true,pdfborder=0 0 0]{hyperref}

\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}

% commented this out from downloaded tmplate
%\bibliographystyle{IEEEbib}



\title {Title}
\author {B}


\begin{document}

The integral length scale can be computed directly as 
$\mathscr{L}_{L}=\int a_{11,1}(r) \, dr$
(should be integral sign!) at every height. 

\end{document}

在此处输入图片描述

相关内容