Skip to content

改进复制 PDF 标注到笔记中时对换行的处理 #5213

Closed
@mlzxy

Description

@mlzxy

该问题是否已经被报告过了? Is there an existing issue for this?

  • 我已经搜索了 Issues,没有发现类似问题
    I have searched the existing issues

描述问题 Describe the problem

在 Siyuan 中标记 PDF,并把 Annotation 复制到笔记中是个常用操作 (尤其对于经常用 Siyuan 读书的用户)。

但我发现,当复制PDF高亮到笔记时,文字的换行符会被删除,这对于CJK语言是合理的,因为CJK语言不存在单词这个概念。

但对于使用单词的语言(如英语),”删除换行符“存在如下问题:

  1. 当”旧的行末“和”新的行始“是两个词时,这两个词会被连接在一起
  2. 当”旧的行末“和”新的行始“是一个词时,往往会用 ”-“ 断开,此时单词中出现 ”-“

如下图GIF所示

1

期待的结果 Expected result

当复制英语时,作如下处理

  1. 如果行末是 “-“,删除 ”-“ 和 换行符
  2. 如果不是,替换换行符为“空格”

事实上,这就是 PDF Expert 的做法(OSX 下最好的 PDF 阅读器),我也尝试了 OSX 的 Preview,它的做法是把换行符替换为 “空格”,没有第一个优化。

截屏或者录屏演示 Screenshot or screen recording presentation

No response

版本环境 Version environment

- Version: 2.0.20
- Operating System: osx bigsur 11.6.6
- Browser (if used):

日志文件 Log file

skip

更多信息 More information

No response

Activity

Vanessa219

Vanessa219 commented on Jun 18, 2022

@Vanessa219
Member

可以传一下这个 PDF 么?

added a commit that references this issue on Jun 22, 2022
added this to the 2.0.24 milestone on Jun 22, 2022
changed the title [-]复制 PDF 高亮 Annotation 到笔记中时,对换行符的处理方式不适合英语[/-] [+]改进复制 PDF 标注到笔记中时对换行的处理[/+] on Jun 22, 2022
added a commit that references this issue on Jun 22, 2022
added a commit that references this issue on Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @Vanessa219@mlzxy

      Issue actions

        改进复制 PDF 标注到笔记中时对换行的处理 · Issue #5213 · siyuan-note/siyuan