Ankr.

Beitrag

Teile dein Wissen.

Peera Protocol.
Dec 10, 2024
Diskussion

错误:使用 Pandoc 命令时出现 “找不到数据文件模板\ eisvogel.latex”

错误:使用 Pandoc 命令时'找不到数据文件模板\ eisvogel.latex'

运行以下 Pandoc 命令时,我遇到了错误 “找不到数据文件模板\ eisvogel.latex”:

pandoc report.md -o report.pdf --from markdown --template=eisvogel --listings 尽管创建了一个

.pandoc

我的主存储库中的目录并添加 templates 目录和

eisvogel.latex

,错误仍然存在. 我该如何解决这个问题?

  • Polywrap
  • Hackathon
  • Event
0
1
Teilen
Kommentare
.

Antworten

1
Ameta1.
Dec 10 2024, 12:31

To resolve the issue, follow these steps:

  1. Install Pandoc:

  2. Download the latest Pandoc binary for Linux from the official Pandoc download page.

  3. Select the .deb file suitable for Debian/Ubuntu systems if you are using Windows 11, Ubuntu, or WSL.

  4. Determine your system architecture by running the command uname -m in your terminal.

  5. If the output is x86_64, your system uses the amd64 architecture.

  6. If the output is aarch64, your system uses the arm64 architecture. Download the corresponding file.

  7. Navigate to the directory where the .deb file is downloaded using the terminal:

cd /mnt/c/Users/<your_username>/Downloads Install the downloaded Pandoc package with the dpkg command:

sudo dpkg -i pandoc-3.1.11-1-.deb

Replace with either amd64 or arm64, depending on your system's architecture. Resolve any dependency issues by running: sudo apt-get install -f Setup Pandoc Templates:

Create a directory for Pandoc templates: sudo mkdir -p /home/<your_username>/.pandoc/templates/ Note: Replace <your_username> with your actual username. Move the eisvogel.latex file to the templates directory: mv /home/<your_username>/Downloads/eisvogel.latex /home/<your_username>/.pandoc/templates/ This command moves the eisvogel.latex file to the templates folder. Generate PDF using Pandoc:

"Copy the" content of the eisvogel.latex file from GitHub. Execute the following command to convert a Markdown file (Reports.md) to PDF using the eisvogel template:

pandoc /path/to/Reports.md -o report.pdf --from markdown --template=/home/<your_username>/.pandoc/templates/eisvogel.latex --listings
Replace /path/to/Reports.md with the actual path to your Markdown file and ensure the correct path to the eisvogel.latex template is provided.
By following these steps, you should be able to successfully generate a PDF report using Pandoc with the specified template

.

0
Kommentare
.

Weißt du die Antwort?

Bitte melde dich an und teile sie.

Wir verwenden Cookies, um sicherzustellen, dass Sie die beste Erfahrung auf unserer Website haben.
Mehr Infos