gpt4 book ai didi

latex - 使用 pandoc 保留标题中的换行符

转载 作者:行者123 更新时间:2023-12-03 17:12:43 24 4
gpt4 key购买 nike

考虑 pandoc flavor 的 Markdown 中的以下标题块:

% Higgelty Pigglety Pop!
or
There Must Be More to Life
% Maurice Sendak

在这里,换行符是标题的一部分。可以重新格式化标题以将其插入到常规文本流中,例如“Higgelty Pigglety Pop!或者,生活中必须有更多”,但是当没有被提及但在文档的标题页上使用时,保留换行符是至关重要的。根据样式,它可能如下所示:

Higgelty Pigglety 流行音乐!
或者
生活一定还有更多

莫里斯·森达克

我的问题:如何在 pandoc 的输出中实现正确的多行标题显示?

可移植版本将是首选,但我也满足于只使用 LaTeX 的 hack。

最佳答案

% Higgelty Pigglety Pop! \
or \
There Must Be More to Life
% Maurice Sendak

Pandoc Markdown 启用 escaped_line_breaks extension默认情况下:

A backslash followed by a newline is also a hard line break. Note: in multiline and grid table cells, this is the only way to create a hard line break, since trailing spaces in the cells are ignored.

关于latex - 使用 pandoc 保留标题中的换行符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28283008/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com