Lyx - 模板和求和参数

Lyx - 模板和求和参数

我对 LyX 还不太熟悉。我最近为我的数学作业导入了一个模板,它运行得很好,除了当我使用 时\stackrelthree;我的总和(大西格玛)上方和下方的参数到处都是,奇怪的是只发生在\stackrelthree- 而不是像 这样的事物上\underset。我猜这与我导入的模板有关,因为在没有模板的情况下使用 LyX(默认)时它不会产生相同的效果。我在下面附上了一张图片来说明我的 LyX 文档是什么样子,评估(PDF)是什么样子

PDF 中的显示方式:

PDF 格式

它在 Lyx 中的显示方式:

PDF 格式

以下是 Lyx 的最小示例:

#LyX 2.1 created this file. For more info see http://www.lyx.org/
\lyxformat 474
\begin_document
\begin_header
\textclass scrartcl
\begin_preamble
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Short Sectioned Assignment
% LaTeX Template
% Version 1.0 (5/5/12)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Frits Wenneker (http://www.howtotex.com)
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

% A4 paper and 11pt font size

% Use 8-bit encoding that has 256 glyphs
%\usepackage{fourier} % Use the Adobe Utopia font for the document - comment this line to return to the LaTeX default
\usepackage[english]{babel}
% English language/hyphenation
\usepackage{amsfonts}\usepackage{amsthm}% Math packages

\usepackage{lipsum}% Used for inserting dummy 'Lorem ipsum' text into the template

\usepackage{sectsty}% Allows customizing section commands
\allsectionsfont{\centering \normalfont\scshape} % Make all sections centered, the default font and small caps

\usepackage{fancyhdr}% Custom headers and footers
 % Makes all pages in the document conform to the custom headers and footers
\fancyhead{} % No page header - if you want one, create it in the same way as the footers below
\fancyfoot[L]{} % Empty left footer
\fancyfoot[C]{} % Empty center footer
\fancyfoot[R]{\thepage} % Page numbering for right footer
\renewcommand{\headrulewidth}{0pt} % Remove header underlines
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
\setlength{\headheight}{13.6pt} % Customize the height of the header

\numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)

 % Removes all indentation from paragraphs - comment this line for an assignment with lots of text

%----------------------------------------------------------------------------------------
%   TITLE SECTION
%----------------------------------------------------------------------------------------

\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height

\title{ 
\normalfont \normalsize 
\textsc{AUSTRALIAN NATIONAL UNIVERSITY} \\ [25pt] % Your university, school and/or department name(s)
\horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule
\huge MATH1116, Advanced Mathematics and Applications 2, Assignment 2 \\ % The assignment title
\horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule
}

\author{Charles Bray} % Your name

\date{17 August, 2015} % Today's date or a custom date
\end_preamble
\options paper=a4,fontsize=11pt
\use_default_options false
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding T1
\font_roman default
\font_sans default
\font_typewriter default
\font_math auto
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_package amsmath 2
\use_package amssymb 0
\use_package cancel 0
\use_package esint 1
\use_package mathdots 0
\use_package mathtools 0
\use_package mhchem 0
\use_package stackrel 0
\use_package stmaryrd 0
\use_package undertilde 0
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle fancyplain
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Standard
\begin_inset Formula ${\displaystyle \stackrel[i=1]{n}{\sum}a_{i}f_{i}}$
\end_inset


\end_layout

\end_body
\end_document

答案1

添加行

\usepackage{stackrel}

到文档 > 设置 > LaTeX 序言中的序言顶部。

或者,您可以考虑以下方法,而不是使用stackrel:创建和符号。然后,在 LyX 中按_将其放入下标中。输入i=1下标。然后按空格键(这会让您退出下标)。然后按^(这会让您进入上标)并输入n。最后(光标仍在上标中),转到编辑 > 数学 > 更改限制类型并选中“显示”。

相关内容