如何在标题页的标题下方添加图像?

时间:2019-06-10 20:37:57

标签: r pdf latex yaml r-markdown

我正在编写数据分析报告。在我的封面上,我想在标题下方和作者上方的空白处插入图片。

我的代码如下所示。

    serverVersion: SSH-2.0-WS_FTP-SSH_8.6.0.1027
    KeyExchangeAlgs:
      algorithm: diffie-hellman-group1-sha1
      algorithm: diffie-hellman-group14-sha1
      algorithm: diffie-hellman-group14-sha256
      algorithm: diffie-hellman-group-exchange-sha256
    --KeyExchangeAlgs
    HostKeyAlgs:
      algorithm: ssh-dss
      algorithm: ssh-rsa
    --HostKeyAlgs
    EncCS:
      algorithm: aes256-ctr
      algorithm: aes192-ctr
      algorithm: aes128-ctr
      algorithm: 3des-cbc
      algorithm: blowfish-cbc
      algorithm: aes256-cbc
      algorithm: aes128-cbc
      algorithm: cast128-cbc
    --EncCS
    EncSC:
      algorithm: aes256-ctr
      algorithm: aes192-ctr
      algorithm: aes128-ctr
      algorithm: 3des-cbc
      algorithm: blowfish-cbc
      algorithm: aes256-cbc
      algorithm: aes128-cbc
      algorithm: cast128-cbc
    --EncSC
    MacCS:
      algorithm: hmac-sha1
      algorithm: hmac-sha1-96
      algorithm: hmac-md5
      algorithm: hmac-md5-96
      algorithm: hmac-sha2-256
      algorithm: hmac-sha2-384
      algorithm: hmac-sha2-512
    --MacCS
    MacSC:
      algorithm: hmac-sha1
      algorithm: hmac-sha1-96
      algorithm: hmac-md5
      algorithm: hmac-md5-96
      algorithm: hmac-sha2-256
      algorithm: hmac-sha2-384
      algorithm: hmac-sha2-512
    --MacSC
    CompCS:
      algorithm: none
    --CompCS
    CompSC:
      algorithm: none
    --CompSC
    ChosenIncomingEncryption: aes128-ctr
    ChosenOutgoingEncryptoin: aes128-ctr
    ChosenIncomingMac: hmac-sha1
    ChosenOutgoingMac: hmac-sha1
    ChosenIncomingCompression: none
    ChosenOutgoingCompression: none
    ChosenKexAlgorithm: diffie-hellman-group-exchange-sha256
    ChosenHostKeyAlgorithm: ssh-rsa
    sshRawPacket: Socket connection closed.
    sshDhGex: Socket connection closed.
    Failed to read KEX_DH_GEX_REQUEST response
  --sshSetupConnection
--connectInner
Failed.

它生成以下输出:

enter image description here

由于我已经成功添加了徽标,因此我尝试将同一行的副本放置到代码中的不同位置,但是我遇到一个错误,提示它无法编译(当我尝试将其编织为pdf时)或图像不显示。

1 个答案:

答案 0 :(得分:2)

要使其尽可能简单,只需使用subtitle

---
output:
  pdf_document: 
    keep_tex: true
title: "Test"
subtitle: "\\includegraphics{unnamed.png}\\vspace{4in}"
author: "Martin \\vfill University of Duisburg-Essen \\newpage"
---

enter image description here