我试图帮助别人与乳胶,但已失去联系,需要一些帮助。他们需要一个与他们的公司标志和章节名称的页眉。和一个与网站地址等页脚。我已经能够得到它的大部分,但是页面的文字太靠近页眉和页脚了。页眉和页脚的位置很完美,我想保留这一点。但是我想把课文的开头往下推一点,把课文的结尾往上推一点。
这是我正在使用的代码:
---
title: "CBSE 8 Math Sample Papers"
author: "CodingHero"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
output: bookdown::gitbook
documentclass: book
bibliography: [book.bib, packages.bib]
biblio-style: apalike
link-citations: yes
github-repo: rstudio/bookdown-demo
description: "This is a minimal example of using the bookdown package to write a book. The output format for this example is bookdown::gitbook."
geometry: left=3cm, right=3cm, tmargin=2cm, bmargin=2cm, top= 2cm,
header-includes:
\usepackage{fancyhdr}
\usepackage{graphicx}
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
\fancyhead[L]{\nouppercase{\rightmark}}
\fancyhead[R]{\nouppercase{\leftmark}}
\pagestyle{fancy}
\lhead{\includegraphics[width = 100pt]{Logo.png}}
\chead{}
\lfoot{https://codinghero.ai}
\cfoot{\thepage}
\rfoot{learn@codinghero.ai}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}}
输出如下所示:
![](https://i.stack.imgur.com/eLKKQ.png)
![](https://i.stack.imgur.com/Bzmqv.png)
1条答案
按热度按时间tjjdgumg1#
您可以执行以下操作:
如果您希望所有边都有1英寸的边距,页眉/页脚与文本区域之间有0.5英寸的空间。