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

\uchyph=0 on XeLaTeX #4

Closed
aminophen opened this issue Dec 20, 2017 · 5 comments
Closed

\uchyph=0 on XeLaTeX #4

aminophen opened this issue Dec 20, 2017 · 5 comments

Comments

@aminophen
Copy link
Contributor

Brief outline of the bug

I think \uchyph=0 is not working on XeLaTeX.

  • LuaLaTeX, pdfLaTeX, LaTeX: OK
  • XeLaTeX: NG

Strangely, plain XeTeX (replace the first 3 lines with \hsize=345pt) seems OK; so I don't think XeTeX engine itself is doing something wrong.

Your minimal example showing the bug

The code is based on https://tex.stackexchange.com/questions/107208 (Joseph's answer).

\RequirePackage{latexbug}
\documentclass{article}
\begin{document}

\uchyph=0 %

\begingroup
  \lccode`C=`C
  Some filler text.
  Some filler text.
  Some filler text.
  Some filler text.
  Capitalised word. % Capi-talised
  \par
\endgroup

\begingroup
  \lccode`C=`c
  Some filler text. 
  Some filler text. 
  Some filler text. 
  Some filler text. 
  Capitalised word. % (no hyphenation)
  \par
\endgroup

\begingroup
  \uccode`C=`C
  Some filler text. 
  Some filler text. 
  Some filler text. 
  Some filler text. 
  Capitalised word. % (no hyphenation)
  \par
\endgroup

\begingroup
  \uccode`C=`c
  Some filler text. 
  Some filler text. 
  Some filler text. 
  Some filler text. 
  Capitalised word. % (no hyphenation)
  \par
\endgroup

\end{document}

Log (and possibly PDF) file

@FrankMittelbach
Copy link
Member

looks to me like an engine bug after all (on first glance). It works with plain xetex only because then \tenrm 8bit font is used, while latex uses a unicode font (TU encoded). The moment you force xelatex to use OT1 or T1 via \usepackage[OT1]{fontenc} \fontamily{cmr}\selectfont the result is like with the other engines. So my initial guess is that xetex ignores the uhyph setting somehow with unicode fonts.

@aminophen
Copy link
Contributor Author

So my initial guess is that xetex ignores the uhyph setting somehow with unicode fonts.

Thanks for the hint: I wrote a patch to fix that: see my gist

I'm glad if someone can test it

@josephwright
Copy link
Member

josephwright commented Dec 21, 2017

Seems clear this is an engine issue, so 'report elsewhere' for us (not a LaTeX bug).

@FrankMittelbach
Copy link
Member

FrankMittelbach commented Dec 21, 2017 via email

@aminophen
Copy link
Contributor Author

I was planning to do that, of course ;-) Done: https://sourceforge.net/p/xetex/bugs/145/

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

No branches or pull requests

3 participants