3

The \st command drops the Unicode letters coming at the end.

I use LuaLatex most of the time on TexLive 2020.

Here is my MWE.

\documentclass[a4paper,openany,14pt,oneside,]{extbook}

\usepackage{soul} \usepackage{xcolor} \newcommand{\strkfade}[1] {{\color{black!50}\st{#1}}}

\begin{document}

This is normal text.

\strkfade{This is striked through faded text}

This is striked through faded Unicode text, which prints correctly: \strkfade{distance between İstanbul - Iğdır}

This is striked through faded Unicode text, which prints uncorrectly: \strkfade{Iğdırı}. It must have printed \emph{Iğdırı} i.e. an ı'' at the end. But it drops thatı''. \end{document}

How to fix this problem?

UPDATE My question has been closed by leaving this link: soul dropping some accented letters from the end of words

I've tried the solution in the link but it didn't work, see the note below.

NOTE She solution suggested adding these codes

\makeatletter
\let\SOUL@tt\relax
\newfontface{\SOUL@tt}{FreeMono}
\makeatother

after loading the soul After I've applied it, I got this error:

! Package soul Error: Reconstruction failed.

  • Which engine do you use? – Ulrike Fischer Dec 27 '22 at 12:27
  • With XeLaTeX, I get 11 errors like "Missing character: There is no İ ("130) in font ectt1000!". Two for "İ ("130)", four for "ğ ("11F)", and five for "ı ("131)". – Teepeemm Dec 27 '22 at 12:31
  • I use lualatex most of the time. – Lars Malmsteen Dec 27 '22 at 16:06
  • @LarsMalmsteen For your interest: No moderator of this site was involved in marking your question as duplicate. – samcarter_is_at_topanswers.xyz Dec 27 '22 at 16:59
  • If no moderator has closed down my question then who did it? Some AI bot? – Lars Malmsteen Dec 27 '22 at 17:03
  • 3 regular community members. Could you word your appeal in a bit more neutral way? The chances for reopening might be better then ... – samcarter_is_at_topanswers.xyz Dec 27 '22 at 17:04
  • (if you are using lualatex, why use soul? lua-ul is more robust and solves a lot of the limitations of soul, including the problem you are asking about) – samcarter_is_at_topanswers.xyz Dec 27 '22 at 17:08
  • How to use that lua-ul I've tried: \usepackage{lua-ul} but then it complained with: , ! Undefined control sequence. \strkfade #1 -{\color {black!50} ...` – Lars Malmsteen Dec 27 '22 at 17:17
  • 1
    here is an example for lua-ul https://tex.stackexchange.com/a/533377/2388. – Ulrike Fischer Dec 27 '22 at 18:42
  • 1
    @UlrikeFischer Thank you for the comment. Actually, I've solved the problem just a while ago, after taking a look at the lua-ul package's CTAN page. There in the PDF documentation, the required command was given as strikeThrough (in the place of st) So I've renamed the st to strikeThrough and there you go. It worked out! – Lars Malmsteen Dec 27 '22 at 19:30
  • @samcarter_is_at_topanswers.xyz I've solved the problem after adding \usepackage{lua-ul} and replacing st with the lua-ul's strikeThrough If you feel like, you could post this as an answer and I'd select it as accepted. Thanks! – Lars Malmsteen Dec 27 '22 at 19:34
  • 1
    you can use \st if you load the package with the option soul: \usepackage[soul]{lua-ul} – Ulrike Fischer Dec 27 '22 at 19:43
  • @LarsMalmsteen I added an answer, but please take some time to edit your question and remove unfair statements like "This act of closing has caused more harm than good, by depriving my question of the views it deserved." The only reason I saw your question and suggested lua-ul was because I came across it in the review queue - something that would never have happened if your question had not been closed. You probably have gotten more views because of this. – samcarter_is_at_topanswers.xyz Dec 27 '22 at 20:46

2 Answers2

4

As you are using lualatex, there is really no good reason to use soul when there is the fantastic lua-ul package:

% !TeX TS-program = lualatex

\documentclass[a4paper,openany,14pt,oneside,]{extbook}

\usepackage{lua-ul} \usepackage{xcolor} \newcommand{\strkfade}[1] {{\color{black!50}\strikeThrough{#1}}}

\begin{document}

This is normal text.

\strkfade{This is striked through faded text}

This is striked through faded Unicode text, which prints correctly: \strkfade{distance between İstanbul - Iğdır}

This is striked through faded Unicode text, which prints uncorrectly: \strkfade{Iğdırı}. It must have printed \emph{Iğdırı} i.e. an ı'' at the end. But it drops thatı''. \end{document}

2

Edit: souland soulutf8have been merged:

This version is a merge of the original soul package from Melchior Franz and the soulutf8 package from Heiko Oberdiek and supports also UTF8.


You can use the package soulutf8

Result

result

anis
  • 1,510
  • 5
  • 13