awesome-cv 缩进问题

awesome-cv 缩进问题

我正在使用 awesome-cv 模板,在某些类别中,第一个条目之后的第二个条目有一个缩进。

下面是我简化的代码来说明这个问题:

---
name: name
position: "position"
address: "address"
phone: "number"
www: website
email: email
twitter: twitter
github: github
linkedin: linkedin
headcolor: 54a474
date: "`r format(Sys.time(), '%B %Y')`"
output: vitae::awesomecv
always_allow_html: yes
header-includes:
  \usepackage{multicol}
  \usepackage{colortbl}
  \arrayrulecolor{white}
  \usepackage{hhline}
  \definecolor{light-gray}{gray}{0.95}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(vitae)
library(tidyverse)
library(pander)
library(googlesheets4)
library(glue)
library(yaml)
library(knitr)
library(tinytex)

# Define a custom function for printing nice lists for the publication and talks sections:
catList <- function(x, out.format = knitr::opts_knit$get("out.format"),
                      environment = "itemize",
                      marker = NULL) {
  if (out.format == "markdown") {
    if (!missing(environment) || !missing(marker)) {
      warning("Ignoring arguments that are not supported for markdown output.")
    }
    out <- sprintf("\n\n%s\n \n", paste("*", x, collapse = "\n"))
  } else {
    if (out.format == "latex") {
      itemCommand <- if (missing(marker)) {
        "\\item"
      } else {
          sprintf("\\item[%s]", marker)
      }
      listEnv <- c(
        sprintf("\\begin{%s}\n", environment),
        sprintf("\n\\end{%s}\n", environment))
      out <- paste(itemCommand, x, collapse = "\n")
      out <- sprintf("%s%s%s", listEnv[1], out, listEnv[2])
    } else {
      stop("Output format not supported.")
    }
  }
    return(knitr::asis_output(out))
}

# Read in data:
gs4_deauth()
CVData <- read_sheet("https://docs.google.com/spreadsheets/d/1eHyUH_B97kMHDvq4De-o3_97gVJZiHv1gEAxwBdxLiA/edit?usp=sharing")

# Process data into sub-tibbles:
Education <- dplyr::filter(CVData, Category == "Education")
Experience <- dplyr::filter(CVData, Category == "Experience")
Teaching <- dplyr::filter(CVData, Category == "Teaching")
Awards <- dplyr::filter(CVData, Category == "Awards")
Service <- dplyr::filter(CVData, Category == "Service")
Outreach <- dplyr::filter(CVData, Category == "Media & Outreach")
Publications <- dplyr::filter(CVData, Category == "Publications")
Talks <- dplyr::filter(CVData, Category == "Talks")
Skills <- dplyr::filter(CVData, Category == "Skills and Training")
Societies <- dplyr::filter(CVData, Category == "Societies")
Collections <- dplyr::filter(CVData, Category == "Collections Visited")
```

# Education 
```{r}
detailed_entries(Education, 
                 when = glue("{Start}--{End}"),
                 what = Supervisor,
                 where = Institution,
                 with = Position,
                 why = Details)
```

# Publications
**In Review:**
\scriptsize
```{r}
Publications %>%
filter(Type == "In Review") %>%
pull("Details") %>%
catList()

```
\normalsize
**In Preparation:**
\scriptsize
```{r}
Publications %>%
filter(Type == "In Preparation") %>%
pull("Details") %>%
catList()

```
\normalsize

\scriptsize
```{r}
#Publications %>%
#filter(Type != "Published") %>%
#pull("Details") %>%
#catList()
```
\normalsize[![enter image description here][1]][1]

以下是该问题的屏幕截图:在此处输入图片描述

如果还有什么我可以做的来帮助解决问题,请告诉我。

答案1

不确定你在做什么,而且很确定它无法在我的系统中编译;-)

作为一种模板,你的代码至少应该具备以下3个元素:

  • 文档类
  • 您正在使用的包
  • 文档环境中的代码

即它至少应该看起来像这样:

\documentclass{article}% i.e. the documentclass, you are using
\usepackage{multicol}
% other packages you use

\begin{document}
    % put your code here
\end{document}

让我猜一下:你使用 overleaf 吗?https://www.overleaf.com/latex/templates/awesome-cv/dfnvtnhzhhbm?如果是的话,下次请将其放在您的开场问题中。这个小组都是关于问答的,与其他讨论论坛略有不同 ;-)

我必须停下来,因为我没有提供解决方案(至少目前很难做到),而且我开始发表意见......这不符合这个地方的规则。

相关内容