How to underline CJK with soul?
up vote
1
down vote
favorite
I was using soul
to underline text.
It works until I tried to underline some CJK text.
When I have
def mytest {测试test very long text blah blah blah ...}
ulmytest
in the document, it complains:
Package soul Error: Reconstruction failed.
I also tried CJKunderline
. But it does not auto-wrap for this long text.
cjk soul underline
add a comment |
up vote
1
down vote
favorite
I was using soul
to underline text.
It works until I tried to underline some CJK text.
When I have
def mytest {测试test very long text blah blah blah ...}
ulmytest
in the document, it complains:
Package soul Error: Reconstruction failed.
I also tried CJKunderline
. But it does not auto-wrap for this long text.
cjk soul underline
There is ctan.org/pkg/soulutf8, which might help (I didn't test). Do you use pdfLaTeX, LuaLaTeX or XeLaTeX? But as always: Underlining is hard in TeX andsoul
as well asulem
have restrictions in what their underlining macros can accept as input. It may well be that neither can accept CJK characters without exploding. You already know about Paul Isambert's LuaLaTeX underlining code that should work here (again I didn't test), but of course requires LuaLaTeX (tex.stackexchange.com/q/435962/35864).
– moewe
Nov 27 at 7:21
I tried soulutf8, with XeLaTeX. And It does not help. But thank you for your suggestion.
– jiewuza
Nov 28 at 9:53
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I was using soul
to underline text.
It works until I tried to underline some CJK text.
When I have
def mytest {测试test very long text blah blah blah ...}
ulmytest
in the document, it complains:
Package soul Error: Reconstruction failed.
I also tried CJKunderline
. But it does not auto-wrap for this long text.
cjk soul underline
I was using soul
to underline text.
It works until I tried to underline some CJK text.
When I have
def mytest {测试test very long text blah blah blah ...}
ulmytest
in the document, it complains:
Package soul Error: Reconstruction failed.
I also tried CJKunderline
. But it does not auto-wrap for this long text.
cjk soul underline
cjk soul underline
asked Nov 27 at 6:51
jiewuza
506
506
There is ctan.org/pkg/soulutf8, which might help (I didn't test). Do you use pdfLaTeX, LuaLaTeX or XeLaTeX? But as always: Underlining is hard in TeX andsoul
as well asulem
have restrictions in what their underlining macros can accept as input. It may well be that neither can accept CJK characters without exploding. You already know about Paul Isambert's LuaLaTeX underlining code that should work here (again I didn't test), but of course requires LuaLaTeX (tex.stackexchange.com/q/435962/35864).
– moewe
Nov 27 at 7:21
I tried soulutf8, with XeLaTeX. And It does not help. But thank you for your suggestion.
– jiewuza
Nov 28 at 9:53
add a comment |
There is ctan.org/pkg/soulutf8, which might help (I didn't test). Do you use pdfLaTeX, LuaLaTeX or XeLaTeX? But as always: Underlining is hard in TeX andsoul
as well asulem
have restrictions in what their underlining macros can accept as input. It may well be that neither can accept CJK characters without exploding. You already know about Paul Isambert's LuaLaTeX underlining code that should work here (again I didn't test), but of course requires LuaLaTeX (tex.stackexchange.com/q/435962/35864).
– moewe
Nov 27 at 7:21
I tried soulutf8, with XeLaTeX. And It does not help. But thank you for your suggestion.
– jiewuza
Nov 28 at 9:53
There is ctan.org/pkg/soulutf8, which might help (I didn't test). Do you use pdfLaTeX, LuaLaTeX or XeLaTeX? But as always: Underlining is hard in TeX and
soul
as well as ulem
have restrictions in what their underlining macros can accept as input. It may well be that neither can accept CJK characters without exploding. You already know about Paul Isambert's LuaLaTeX underlining code that should work here (again I didn't test), but of course requires LuaLaTeX (tex.stackexchange.com/q/435962/35864).– moewe
Nov 27 at 7:21
There is ctan.org/pkg/soulutf8, which might help (I didn't test). Do you use pdfLaTeX, LuaLaTeX or XeLaTeX? But as always: Underlining is hard in TeX and
soul
as well as ulem
have restrictions in what their underlining macros can accept as input. It may well be that neither can accept CJK characters without exploding. You already know about Paul Isambert's LuaLaTeX underlining code that should work here (again I didn't test), but of course requires LuaLaTeX (tex.stackexchange.com/q/435962/35864).– moewe
Nov 27 at 7:21
I tried soulutf8, with XeLaTeX. And It does not help. But thank you for your suggestion.
– jiewuza
Nov 28 at 9:53
I tried soulutf8, with XeLaTeX. And It does not help. But thank you for your suggestion.
– jiewuza
Nov 28 at 9:53
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
Run the document with xelatex
or lualatex
:
documentclass{article}
usepackage{fontspec}
setmainfont{Noto Sans CJK JP}
usepackage{soul}
begin{document}
def mytest {测试test very long text blah blah blah ...}
ulmytest
end{document}
I haveusepackage{xeCJK}
afterusepackage{fontspec}
, and the same complain remains.
– jiewuza
Nov 28 at 9:51
I checked the document of xeCJK. It usesfontspec
inside. I doubtsoul
is not compatible withxeCJK
.
– jiewuza
Nov 28 at 10:12
yes, seems so. It is the way howxeCJK
redefines character setting
– Herbert
Nov 28 at 10:23
Well, I guess I cannot get rid of xeCJK. I use it to set font.
– jiewuza
Nov 28 at 10:48
fontsetting can also be done with fontspec. But I am not an CJK expert ...
– Herbert
Nov 28 at 11:15
|
show 3 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Run the document with xelatex
or lualatex
:
documentclass{article}
usepackage{fontspec}
setmainfont{Noto Sans CJK JP}
usepackage{soul}
begin{document}
def mytest {测试test very long text blah blah blah ...}
ulmytest
end{document}
I haveusepackage{xeCJK}
afterusepackage{fontspec}
, and the same complain remains.
– jiewuza
Nov 28 at 9:51
I checked the document of xeCJK. It usesfontspec
inside. I doubtsoul
is not compatible withxeCJK
.
– jiewuza
Nov 28 at 10:12
yes, seems so. It is the way howxeCJK
redefines character setting
– Herbert
Nov 28 at 10:23
Well, I guess I cannot get rid of xeCJK. I use it to set font.
– jiewuza
Nov 28 at 10:48
fontsetting can also be done with fontspec. But I am not an CJK expert ...
– Herbert
Nov 28 at 11:15
|
show 3 more comments
up vote
1
down vote
Run the document with xelatex
or lualatex
:
documentclass{article}
usepackage{fontspec}
setmainfont{Noto Sans CJK JP}
usepackage{soul}
begin{document}
def mytest {测试test very long text blah blah blah ...}
ulmytest
end{document}
I haveusepackage{xeCJK}
afterusepackage{fontspec}
, and the same complain remains.
– jiewuza
Nov 28 at 9:51
I checked the document of xeCJK. It usesfontspec
inside. I doubtsoul
is not compatible withxeCJK
.
– jiewuza
Nov 28 at 10:12
yes, seems so. It is the way howxeCJK
redefines character setting
– Herbert
Nov 28 at 10:23
Well, I guess I cannot get rid of xeCJK. I use it to set font.
– jiewuza
Nov 28 at 10:48
fontsetting can also be done with fontspec. But I am not an CJK expert ...
– Herbert
Nov 28 at 11:15
|
show 3 more comments
up vote
1
down vote
up vote
1
down vote
Run the document with xelatex
or lualatex
:
documentclass{article}
usepackage{fontspec}
setmainfont{Noto Sans CJK JP}
usepackage{soul}
begin{document}
def mytest {测试test very long text blah blah blah ...}
ulmytest
end{document}
Run the document with xelatex
or lualatex
:
documentclass{article}
usepackage{fontspec}
setmainfont{Noto Sans CJK JP}
usepackage{soul}
begin{document}
def mytest {测试test very long text blah blah blah ...}
ulmytest
end{document}
answered Nov 27 at 8:03
Herbert
266k23405716
266k23405716
I haveusepackage{xeCJK}
afterusepackage{fontspec}
, and the same complain remains.
– jiewuza
Nov 28 at 9:51
I checked the document of xeCJK. It usesfontspec
inside. I doubtsoul
is not compatible withxeCJK
.
– jiewuza
Nov 28 at 10:12
yes, seems so. It is the way howxeCJK
redefines character setting
– Herbert
Nov 28 at 10:23
Well, I guess I cannot get rid of xeCJK. I use it to set font.
– jiewuza
Nov 28 at 10:48
fontsetting can also be done with fontspec. But I am not an CJK expert ...
– Herbert
Nov 28 at 11:15
|
show 3 more comments
I haveusepackage{xeCJK}
afterusepackage{fontspec}
, and the same complain remains.
– jiewuza
Nov 28 at 9:51
I checked the document of xeCJK. It usesfontspec
inside. I doubtsoul
is not compatible withxeCJK
.
– jiewuza
Nov 28 at 10:12
yes, seems so. It is the way howxeCJK
redefines character setting
– Herbert
Nov 28 at 10:23
Well, I guess I cannot get rid of xeCJK. I use it to set font.
– jiewuza
Nov 28 at 10:48
fontsetting can also be done with fontspec. But I am not an CJK expert ...
– Herbert
Nov 28 at 11:15
I have
usepackage{xeCJK}
after usepackage{fontspec}
, and the same complain remains.– jiewuza
Nov 28 at 9:51
I have
usepackage{xeCJK}
after usepackage{fontspec}
, and the same complain remains.– jiewuza
Nov 28 at 9:51
I checked the document of xeCJK. It uses
fontspec
inside. I doubt soul
is not compatible with xeCJK
.– jiewuza
Nov 28 at 10:12
I checked the document of xeCJK. It uses
fontspec
inside. I doubt soul
is not compatible with xeCJK
.– jiewuza
Nov 28 at 10:12
yes, seems so. It is the way how
xeCJK
redefines character setting– Herbert
Nov 28 at 10:23
yes, seems so. It is the way how
xeCJK
redefines character setting– Herbert
Nov 28 at 10:23
Well, I guess I cannot get rid of xeCJK. I use it to set font.
– jiewuza
Nov 28 at 10:48
Well, I guess I cannot get rid of xeCJK. I use it to set font.
– jiewuza
Nov 28 at 10:48
fontsetting can also be done with fontspec. But I am not an CJK expert ...
– Herbert
Nov 28 at 11:15
fontsetting can also be done with fontspec. But I am not an CJK expert ...
– Herbert
Nov 28 at 11:15
|
show 3 more comments
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461957%2fhow-to-underline-cjk-with-soul%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
There is ctan.org/pkg/soulutf8, which might help (I didn't test). Do you use pdfLaTeX, LuaLaTeX or XeLaTeX? But as always: Underlining is hard in TeX and
soul
as well asulem
have restrictions in what their underlining macros can accept as input. It may well be that neither can accept CJK characters without exploding. You already know about Paul Isambert's LuaLaTeX underlining code that should work here (again I didn't test), but of course requires LuaLaTeX (tex.stackexchange.com/q/435962/35864).– moewe
Nov 27 at 7:21
I tried soulutf8, with XeLaTeX. And It does not help. But thank you for your suggestion.
– jiewuza
Nov 28 at 9:53