On 2018-01-29, Jürgen Spitzmüller wrote: > Am Montag, den 29.01.2018, 10:55 +0100 schrieb S. Noble:
>> Thanks, Scott and Günter, for your quick, helpful replies. >> I had followed Scott’s advice and found the offending character. It >> was indeed the lower-case Greek letter “sigma”, not in a word-final >> position (i.e., “σ”). (There was just one of them in the document). >> I was then puzzling over LyX’s error message — “There is no v in font >> LinLibertineT-osf-lgr”. > That's not LyX's error message, but LaTeX's (or polyglossia's for that > matter). While Polyglossia is known for a lot of false positives when checking character support, it is not to blame here. Polyglossia tests for script support in the used fonts, relying on often missing information in the font metadata and gives errors (not just warnings). The "There is no … in font …" warnings are from TeX. >> It didn’t seem to make sense, for two reasons: (1) the problem >> was certainly the letter “sigma”, but in principle it has nothing to >> do with a “v”; and (2) in the PDF print-out, the letter “sigma” is >> printed correctly. So, all in all, nothing is missing. I couldn’t >> figure it out or find anything about it, and then came Günter’s >> explanation. The problem is that currently, in LyX's Unicode translation file we use the Latin transcription for Greek: In the Latin transcription, "s" stands for "\textautosigma", which depending on the next characters is printed as "sigma" or "finalsigma". This is fine if you type Greek text using Latin characters but bad if in a document you write a single literal "σ" and in the PDF you get a single "ς". Therefore, LyX uses the "never-to-become-finalsigma" transcript "sv" with the "LGR ligature break character" "v" (cf. https://www.lyx.org/trac/ticket/4966): 0x03c3 "\\textgreek{sv}" "textgreek" "force=iso8859-7;cp437;cp437de;cp865,mathalpha" "\\sigma" "" # GREEK SMALL LETTER SIGMA That "v" is missing in Libertine LGR is a bug in this font. May be they call it a feature, because the effect of a missing character is almost the same as a "ligature break" character: it prevents ligating (fine) but * it also triggers a warning * there is a/no ligature break in the text if you copy-paste from the PDF. LyX turns warnings about missing characters into errors for good reason. Unfortunately this can give rise to false positives in rare cases. We had a similar problem with Unicode fonts lacking the ligature break character (u200C, ZWNJ). However, we cannot tell LyX to ignore missing "v" characters (which stand for ZWNJ in the LGR font encoding but are printable characters normally). The proper solution is to use the LaTeX internal character representation (LICR) in the Unicode translation file: 0x03c3 "\\textgreek{\\textsigma}" "textgreek" "force=iso8859-7,mathalpha" "\\sigma" "" # GREEK SMALL LETTER SIGMA A patch is ready since some years but hold back because Greek LICR macros were a new feature at this time. I believe it is time to apply the patch now. It works stable on my local installation and fixes the problem + some others. >> So at least I’ve understood (sort of), but this is strange behaviour >> from LyX. LaTeX, on the other hand, doesn’t complain and prints the >> “sigma” identically. > You get the message as well, LaTeX is just not aborted (since it's a > warning, actually). This depends: If you use literal Greek characters in the LaTeX source, there is no warning. A simple workaround in LyX is to set the LaTeX input encoding to UTF-8: Document>Settings>Language>Encoding>Other: Unicode (utf8) ("Language default" does not work, because we force-convert sigma to override inputenc's "iso8859-7.def" replacing it with "autosigma". https://www.lyx.org/trac/ticket/8509) >> I'm wondering if the problem might be solved by LyX following LaTeX's >> advice. If, as LaTeX complains, "The libertine-type1 package is >> obsolete", then perhaps LyX should be using, as >> LaTeX's suggests, "\usepackage[type1]{libertineRoman}" in the >> Preamble instead of "\usepackage{libertine-type1}". This will not solve the warning issue (the font itself is the same). Nevertheless, it may be a good idea to update the font call once we can safely expect users to have the new interface or after a test in the LaTeX configuration. ... Günter Test document: #LyX 2.2 created this file. For more info see http://www.lyx.org/ \lyxformat 508 \begin_document \begin_header \save_transient_properties true \origin unavailable \textclass scrartcl \begin_preamble \usepackage[type1]{libertineRoman} \end_preamble \use_default_options false \maintain_unincluded_children false \language ngerman \language_package default \inputencoding utf8 \fontencoding global \font_roman "default" "default" \font_sans "default" "default" \font_typewriter "default" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \spacing single \use_hyperref true \pdf_bookmarks false \pdf_bookmarksnumbered false \pdf_bookmarksopen false \pdf_bookmarksopenlevel 1 \pdf_breaklinks false \pdf_pdfborder true \pdf_colorlinks true \pdf_backref section \pdf_pdfusetitle true \papersize a4paper \use_geometry false \use_package amsmath 1 \use_package amssymb 1 \use_package cancel 1 \use_package esint 1 \use_package mathdots 1 \use_package mathtools 1 \use_package mhchem 1 \use_package stackrel 1 \use_package stmaryrd 1 \use_package undertilde 1 \cite_engine basic \cite_engine_type default \biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \justification true \use_refstyle 0 \index Stichwortverzeichnis \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \quotes_language german \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Standard Unicode literals: \lang greek ροσε ερος \end_layout \begin_layout Standard LICR macros: \lang greek \begin_inset ERT status open \begin_layout Plain Layout \backslash textrho \backslash textomicron \backslash textsigma \backslash textepsilon{} \backslash textepsilon \backslash textrho \backslash textomicron \backslash textvarsigma \end_layout \end_inset \end_layout \begin_layout Standard Latin transcription with autosigma: \lang greek rose eros \end_layout \begin_layout Standard Latin transcription with sigma: \lang greek rosve eros \end_layout \end_body \end_document