AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1698139
Accepted
christopher2007
christopher2007
Asked: 2022-01-09 02:33:36 +0800 CST2022-01-09 02:33:36 +0800 CST 2022-01-09 02:33:36 +0800 CST

pandoc 给讲师/读者的评论和笔记

  • 772

例如,当使用pandoc将 Markdown 文件转换为 pdf 文件进行讲座时,除了评论之外的所有内容

<!---
comment
-->

将出现在输出 pdf 文件中。

但是有没有更优雅的方式在源 Markdown 文件中添加注释而不是使用此类注释?也许生成两个输出文件:

  • 一个带有幻灯片的 pdf 文件,供内容较少的观众使用
  • 一个带有注释和注释的 pdf 文件,供讲师/读者阅读,内容更多

是否已经有机制、标签、命令等?或者这样的评论是要走的路吗?

目前我在 KUBUNTU 20 上使用以下设置,但我不需要坚持下去。我需要的只是最后的幻灯片 pdf 和注释 pdf 文件(或带有附加文本的幻灯片):

依赖项:

  • 潘多克
  • XeTeX(带sudo apt install texlive-xetex)
  • latexmk(带sudo apt install latexmk)
  • mtheme全局安装make install

项目结构:

  • slides.md用 Markdown 编写的带有演示内容的文件,例如
---
author: Author
title: Presentation Title
date: \today
---

# first chapter

## sub title

<!---
a comment for `point 1` with additional information to
say but not to display for the listeners.
-->
- point 1

<!---
a comment for `point 2` with additional information to
say but not to display for the listeners.
-->
- point 2
  • 一个类似的makefile东西:
default:
    @pandoc -t beamer -H settings.tex \
        --pdf-engine=xelatex --highlight-style=espresso \
        -V lang=en -V theme:metropolis \
        -o dist/output.pdf slides.md
  • 和settings.tex:
%% Metro Settings
\metroset{numbering=fraction,
            progressbar=frametitle,
            background=dark,
            block=fill}
pdf latex
  • 1 1 个回答
  • 139 Views

1 个回答

  • Voted
  1. Best Answer
    samcarter_is_at_topanswers.xyz
    2022-01-09T08:53:35+08:002022-01-09T08:53:35+08:00

    您可以使用投影仪的笔记机制。如果您使用宏添加笔记\note{...}

    ---
    author: Author
    title: Presentation Title
    date: \today
    ---
    
    # first chapter
    
    ## sub title
    
    \note{a comment for `point 1` with additional information to
    say but not to display for the listeners}
    - point 1
    
    
    <!---
    a comment for `point 2` with additional information to
    say but not to display for the listeners.
    -->
    - point 2
    

    然后您可以在 settings.tex 文件中打开/关闭注释的显示:

    %% Metro Settings
    \metroset{numbering=fraction,
                progressbar=frametitle,
                background=dark,
                block=fill}
    
    
    \setbeameroption{show notes on second screen}
    

    在此处输入图像描述

    如果您要截取中间 .tex 文件,然后手动运行 latexmk,您甚至可以一次生成两个 pdf 文件。戳

    \ifnotes
      \setbeameroption{show notes on second screen}
    \fi
    

    进入你的settings.tex文件,然后运行

    latexmk -pdf -interaction=nonstopmode -synctex=1 -jobname=filename -pretex="\newif\ifnotes \notesfalse" -usepretex filename 
    latexmk -pdf -interaction=nonstopmode -synctex=1 -jobname=filename_notes -pretex="\newif\ifnotes \notestrue" -usepretex filename
    

    (替换filename为您的文件名)

    • 1

相关问题

  • Chrome 一直要求保存 PDF 并且从不打开它

  • 是否可以将保存为 PDF 文件的网页还原为网页?

  • CMYK 打印

  • 将双面扫描的 A3 pdf 裁剪并重新排列为 A4 格式

  • WebBrowser 刷新不会刷新 PDF 缩放级别

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 为什么通过电缆(同轴电缆)的千兆位/秒 Internet 连接不能像光纤一样提供对称速度? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve