标题和作者未显示在 PDF 查看器中(Texmaker)

标题和作者未显示在 PDF 查看器中(Texmaker)

我正在尝试让标题和作者姓名出现在文档顶部。但是,预览 PDF 后,只显示文档主体,而标题和作者姓名不出现在页面顶部。以下是我目前所得到的结果:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\author{Federico}
\title{Probability Theory}

\begin{document}

We know that if X$\sim$B(n,p), then we have that:



\[\mathbb{P}(X=3)= \binom{n}{3}p^3(1-p)^{n-3}\]

And more generally, we have the following result:

\[\mathbb{P}(X=i)=\binom{n}{i}p^i(1-p)^{n-i}\]

    A random variable X is said to be continuous if it is a map        $X:S\longrightarrow  \mathbb{R}$ equipped with a probability density function $f_X:\mathbb{R}\longrightarrow [0, +\infty)$ so that when $B \subset \mathbb{R}$ we have \[\mathbb{P}(X \subset B)= \int_B f_X (x)dx \]

The expected value of a continuous random variable X is defined as 

\[\mathbb{E}[X]=\int_{-\infty} ^\infty x f_X(x) dx\]



\end{document}

答案1

\maketitle后面添加即可\begin{document}

完整代码:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\author{Federico}
\title{Probability Theory}

\begin{document}

\maketitle % <==========================================================

We know that if X$\sim$B(n,p), then we have that:

\[\mathbb{P}(X=3)= \binom{n}{3}p^3(1-p)^{n-3}\]

And more generally, we have the following result:

\[\mathbb{P}(X=i)=\binom{n}{i}p^i(1-p)^{n-i}\]

    A random variable X is said to be continuous if it is a map        $X:S\longrightarrow  \mathbb{R}$ equipped with a probability density function $f_X:\mathbb{R}\longrightarrow [0, +\infty)$ so that when $B \subset \mathbb{R}$ we have \[\mathbb{P}(X \subset B)= \int_B f_X (x)dx \]

The expected value of a continuous random variable X is defined as 

\[\mathbb{E}[X]=\int_{-\infty} ^\infty x f_X(x) dx\]

\end{document}

结果:

在此处输入图片描述

答案2

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\author{Federico}
\title{Probability Theory}
\maketitle


We know that if X$\sim$B(n,p), then we have that:



\[\mathbb{P}(X=3)= \binom{n}{3}p^3(1-p)^{n-3}\]

And more generally, we have the following result:

\[\mathbb{P}(X=i)=\binom{n}{i}p^i(1-p)^{n-i}\]

A random variable X is said to be continuous if it is a map         $X:S\longrightarrow  \mathbb{R}$ equipped with a probability density function $f_X:\mathbb{R}\longrightarrow [0, +\infty)$ so that when $B     \subset \mathbb{R}$ we have \[\mathbb{P}(X \subset B)= \int_B f_X (x)dx \]

The expected value of a continuous random variable X is defined as 

\[\mathbb{E}[X]=\int_{-\infty} ^\infty x f_X(x) dx\]



\end{document}

相关内容