Regression while adding unnumbered chapters to ToC?

Scott Kostyshak skostysh at lyx.org
Mon Oct 19 17:19:12 UTC 2020


On Mon, Oct 19, 2020 at 06:50:33PM +0200, Günter Milde wrote:
> On 18.10.20, Scott Kostyshak wrote:
> > On Tue, Sep 29, 2020 at 10:45:11AM -0400, Scott Kostyshak wrote:
> > > On Thu, Sep 17, 2020 at 02:11:19PM -0400, Scott Kostyshak wrote:
> > > > On Thu, Sep 17, 2020 at 01:51:08PM +0200, Günter Milde wrote:
> > > > > On 17.09.20, Scott Kostyshak wrote:
> > > > > > On Sat, Sep 05, 2020 at 05:22:00PM +0000, V K wrote:
> > > > > > > On Saturday, September 5, 2020, 08:08:20 PM GMT+3, V K <sovhist at yahoo.com> wrote:
> > > > > 
> > > > > ...
> > > > >  
> > > > > > > So I opened file of the book (report class) I was writing in Lyx 2.3
> > > > > > > (and it compiles) in Lyx 2.4 and it won't compile with error: "!
> > > > > > > LaTeX Error: Command \k unavailable in encoding OT1." I tried various
> > > > > > > options to find the cause (maybe that depends on the fact that I
> > > > > > > constantly need use cyrillic Russian books in bibliography and so on
> > > > > > > – some of errors while changing options pointed to cyrrilic
> > > > > > > footnotes, but that can be another issue). I think I narrowed cause
> > > > > > > and the problem is with ERT solutions how to insert unnumbered
> > > > > > > chapter to ToC. If I remove line
> > > > > > > \addcontentsline{toc}{chapter}{Įvadas} document compiles. It compiles
> > > > > > > even after removing unicode letter "Į" from that line:
> > > > > > > \addcontentsline{toc}{chapter}{vadas} (it compiles from the second
> > > > > > > try). The same thing is with longer solution to add all unnumbered
> > > > > > > chapters to ToC from there:
> > > > > > > https://tex.stackexchange.com/questions/185367/add-an-unnmbered-section-to-the-table-of-contents-in-lyx
> > > > > > > Line \markboth{Įvadas}{Įvadas} creates problem using fancy pagestyle
> > > > > > > and removing "Į" cures that. So I can't add unnumbered chapters to
> > > > > > > ToC. I changed language of the document to Latvian, English and it
> > > > > > > compiles fine. Maybe the cause is that there wasn't Lithuanian .lbx
> > > > > > > biblatex file till now (I created such and it is incorporated in
> > > > > > > biblatex 3.15, but version in my computer is 3.14). There is a lot of
> > > > > > > languages without .lbx. So this is regression?
> > > > > 
> > > > > ...
> > > > > 
> > > > > I believe the reason is that in 2.3, two font encodings "T1,L7x" are
> > > > > auto-loaded by lyx but in 2.4 only "L7x".
> > > > > 
> > > > > LaTeX then falls back to the legacy 7-bit font encoding "OT1" for text that
> > > > > is not marked up ad Lithuanian and "OT1" does not support the ogonek accent
> > > > > (\k).
> > > > > 
> > > > > Adding T1 to the additional fontenc loading in the user preamble as
> > > > > 
> > > > >   \usepackage[T2A,T1]{fontenc}
> > > > >  
> > > > > solves this. 
> > > > > 
> > > > > Alternatively, set "Document>Settings>Fonts>LaTeX font encoding" to
> > > > > 
> > > > >   [Custom] T1,T7x
> > > > > 
> > > > > > A git bisect suggests that 29265ce7 changed the behavior. Günter, can
> > > > > > you take a look?
> > > > > 
> > > > > It seems the fix for the infinite loop with \textcopyright is a second
> > > > > condition required to trigger the error.
> > > > > 
> > > > > We may consider adding T1 to the auto-loaded font encodings for Lithuanian
> > > > > (similar to the way we do it in Azerbaijani):
> > > > > 
> > > > > diff --git a/lib/languages b/lib/languages
> > > > > index bcaf88240c..5f9a7dc82f 100644
> > > > > --- a/lib/languages
> > > > > +++ b/lib/languages
> > > > > @@ -1074,14 +1074,14 @@ Language lithuanian
> > > > >  	XindyName        lithunian
> > > > >  	QuoteStyle       german
> > > > >  	Encoding         iso8859-13
> > > > > -	FontEncoding     L7x
> > > > > +	FontEncoding     L7x,T1
> > > > >  	# L7x defines \copyright as TextSymbol which leads to an endless loop
> > > > >          # when it is used in other font encodings.
> > > > >  	PostBabelPreamble
> > > > >  	  % restore \coyright definition corrupted by l7xenc.def
> > > > >            \DeclareRobustCommand{\copyright}{%
> > > > >              \ifmmode{\nfss at text{\textcopyright}}\else\textcopyright\fi}
> > > > > -	    \addto\noextraslithuanian{\latintext}
> > > > > +	  \addto\noextraslithuanian{\latintext}
> > > > >  	EndPostBabelPreamble
> > > > >  	DateFormats      "yyyy 'm.' MMMM d 'd.'|yyyy 'm.' MMMM d 'd.'|yyyy-MM-dd"
> > > > >  	LangCode         lt_LT
> > > > 
> > > > Thanks for the quick reply and for taking a look, Günter! I don't
> > > > understand this issue well and don't know what the best approach is. I
> > > > hope others can participate on the correct fix, or if not just do what
> > > > you think is best.
> > > 
> > > What should we do? Günter, since no one else responded I suggest to do
> > > what you think is best.
> 
> > Günter, is there anything left to be done or did we decide it's best to not change anything?
> 
> I would add the proposed change to lib/languages in the next weeks/months
> unless you beet me to it.
> 
> Thank you for reminding,

Sounds good. I am quite sure you will beat me to it, considering I don't understand any of this :)

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20201019/e209e28e/attachment.asc>


More information about the lyx-devel mailing list