Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strikeout(ulem宏包的sout命令) 删除线无法让中文的句子换行 #217

Closed
3 tasks done
asmwarrior opened this issue Oct 24, 2021 · 11 comments
Closed
3 tasks done

Comments

@asmwarrior
Copy link

检查

  • 已在 issues 中进行搜索(包括已关闭的问题)

编译环境

  • 操作系统

    • Windows 7
  • TeX 发行版

    • TeX Live 2021

描述问题

发现在xelatex编译器下,无法用\sout命令来对删除线的文字进行换行。
下面的例子中,中文中文中文中文中文中文中文中文中文中文,英文,英文 正常应该进行换行
我试了texlive2020,而且下午刚装了texlive2021,都是同样的问题。结果截图在后面。
我也试了把\usepackage{ulem} 改成 \usepackage{ulem},同样的不能换行。
示例代码改造自:text decorations - Strikeout - when which package ? ( ulem vs soul vs ...) - TeX - LaTeX Stack Exchange

最小工作示例(MWE)

\documentclass[11pt]{ctexart}

\usepackage{ulem}

\textwidth=2cm % just to force hyphenation to happen

\usepackage{cancel,soul}

\begin{document}
\[
\frac{\cancel{5}*17}{\cancel{5}*23}
\]

X \sout{supercalifragilisticexpialidocious 中文中文中文中文中文中文中文中文中文中文,英文,英文}

X \st{supercalifragilisticexpialidocious}

X \emph{supercalifragilisticexpialidocious}

X \ul{supercalifragilisticexpialidocious}

\end{document}

(用 XeLaTeX 编译后)输出
image

@sikouhjw
Copy link

中文可断行下划线请使用 xeCJKfntef

@asmwarrior
Copy link
Author

中文可断行下划线请使用 xeCJKfntef

谢谢,使用下面的代码,中文可以正常换行了。

下面是代码和输出结果:

\documentclass[11pt]{ctexart}

\usepackage{xeCJKfntef}

\textwidth=2cm % just to force hyphenation to happen

\usepackage{cancel,soul}

\begin{document}
\[
\frac{\cancel{5}*17}{\cancel{5}*23}
\]

X \sout{supercalifragilisticexpialidocious 中文中文中文中文中文中文中文中文中文中文,英文,英文}

X \st{supercalifragilisticexpialidocious}

X \emph{supercalifragilisticexpialidocious}

X \ul{supercalifragilisticexpialidocious}

\end{document}

输出结果如下:

image

@sikouhjw
Copy link

中文可断行下划线请使用 xeCJKfntef

谢谢,使用下面的代码,中文可以正常换行了。

下面是代码和输出结果:

\documentclass[11pt]{ctexart}

\usepackage{xeCJKfntef}

\textwidth=2cm % just to force hyphenation to happen

\usepackage{cancel,soul}

\begin{document}
\[
\frac{\cancel{5}*17}{\cancel{5}*23}
\]

X \sout{supercalifragilisticexpialidocious 中文中文中文中文中文中文中文中文中文中文,英文,英文}

X \st{supercalifragilisticexpialidocious}

X \emph{supercalifragilisticexpialidocious}

X \ul{supercalifragilisticexpialidocious}

\end{document}

输出结果如下:

image

西文请使用正常的单词,不要用连续的字母。

@asmwarrior
Copy link
Author

是的,西文我只是抄了tex.stackexchange.com网站的一个例子,前面的链接已经给出。

我看了一下,找到一个教程:中文加下划线宏包支持断行文字 - xeCJKfntef_哔哩哔哩_bilibili

不错不错,这个英文单词 fntef 是什么的缩写?找了一下没找到,谢谢!

@syvshc
Copy link

syvshc commented Oct 24, 2021

不错不错,这个英文单词 fntef 是什么的缩写?找了一下没找到,谢谢!

font effect

@sikouhjw
Copy link

我看了一下,找到一个教程:中文加下划线宏包支持断行文字 - xeCJKfntef_哔哩哔哩_bilibili

你就没发现什么吗(

@asmwarrior
Copy link
Author

我看了一下,找到一个教程:中文加下划线宏包支持断行文字 - xeCJKfntef_哔哩哔哩_bilibili

你就没发现什么吗(

视频的作者就是你,厉害!

看你这个都搞成商业化latex运作了,更厉害!难能可贵!

@asmwarrior
Copy link
Author

不错不错,这个英文单词 fntef 是什么的缩写?找了一下没找到,谢谢!

font effect

明白,多谢!

@sikouhjw
Copy link

我看了一下,找到一个教程:中文加下划线宏包支持断行文字 - xeCJKfntef_哔哩哔哩_bilibili

你就没发现什么吗(

视频的作者就是你,厉害!

看你这个都搞成商业化latex运作了,更厉害!难能可贵!

我只是投稿赚钱(

@asmwarrior
Copy link
Author

谢谢楼上的各位,问题已经圆满解决,关闭此issue。

@Mikachu2333
Copy link

关联一下便于搜索

\uline{}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants