Guenter Milde wrote:

> Dear Georg, dear all,
> 
> On 2015-11-05, Georg Baum wrote:
> 
>> I started to work on bug 9744 in order tor get better test results, as
>> discussed. Attached is a proof of concept for the automatic font
>> selection.
> 
> Thanks for your work and thanks for the patch.
> 
> For the Document>Settings>Fonts GUI, I suggest
> 
> * radiobuttons or drop-down list for the "fontspec" setting
>   (auto, tex, non-tex)
> 
> * two tabs for tex vs. non-tex fonts settings.
> 
> This would make it obvious to the user that the settings can be specified
> and are kept independently.

Since GUI design is not my most advanced skill, I will implement the most 
simple solution which is possible, or will need help from others.

> Currently, it is also not clear which font set is displayed/configured
> with the "automatic" setting.

As I wrote: The GUI part of the patch is unfinished. The GUI is not supposed 
to stay like that if the automatic switch is implemented.

> One reason for this "double automatic" is, that due to the current setup
> we have two competing "Default Output Formats" under
> Tools>Preferences>File Handling¹
> 
>   With TeX fonts:
>   With non-TeX fonts:
>   
> With automatic selection of TeX vs. non-TeX fonts, there could be just one
> Default Output Format (and maybe a list of substitutes in case the
> document settings prevent the user preverence).

Even with automatic it would still be possible to make an explicit choice 
for the fonts. This would not work with only one default output format. 
Having a hard coded internal substitution list can look like black magic to 
the user, and if you make the substitution list configurable then you have 
more than two formats, and essentially the same problem as we have now with 
the two formats.

> ¹ why are they under "File Handling" and not "Output"?????

Good question. There is even space in the general tab.

> The tests were a trigger for #9744, but the motivation behind it is stated
> in the description:
> 
>   The usual advise for users experiencing problems with 8-bit TeX is «use
>   XeTeX» or «use LuaTeX».
>     
> With the current LyX GUI, the most obvious user reaction would be to click
> the "view other formats" button and try XeTeX or LuaTeX. However, this
> will usually not solve, but worse the problem.
> 
> The reason is, that the common advise "use XeTeX"
> 
>   usually implies also to select OpenType fonts with the "fontspec"
>   package.
> 
>   With LyX, this requires checking Document>Settings>Fonts>Use non-TeX
>   fonts.

I understood that. What I do not understand is why it is so important that 
this button does not need to be pressed (assuming that the font selections 
survive for switching back and forth). If the document does not compile with 
one format, then I can toggle the button, configure the fonts (if needed), 
and be done with it. The font configuration step will also be needed with 
automatic font selection btw.

>> The other motivation would be real use cases by users, and here I am
>> not sure: Do such uses cases exist? I am not aware of any. Without the
>> automatic setting, the user would have to chose betwen TeX and non-TeX
>> fonts, and the recommendation would be to use the default output format
>> for viewing. Then we would not have two competing automatic settings,
>> and I believe that it is quite unusual to switch frequently between TeX
>> engines (but please correct me if I am wrong).
> 
> I tend to use the "View other formats" options a lot to try how a document
> looks in different output formats. I really like the possibility to test
> different formats without the need to change the document.

I understand, but are you the only one who likes that, or is this more wide 
spread? This is no rethorical question, I honestly don't know, because for 
my documents it simply does not matter which engine I use.
 
> For HTML or OpenOffice the font set is chosen according to "best practice"
> (or just not chosen at all).
> 
> For XeTeX/LuaTeX, the "best practice" (use together with fontspec) is only
> available after an explicit change to the document, which has to be
> reverted to be able to export to 8-bit TeX again.
> 
>> The test problem could easily be solved in the test machinery instead:
>> When exporting via XeTeX or LuaTeX, switch to non-TeX fonts, even if the
>> document has a different setting.
> 
> Yes, this is possible. However, if a user wants to compare how our
> manuals look after export with LyX-HTML, PDF (ps2pdf), PDF (pdflatex),
> PDF (luatex), the comparison is unfair, because luatex is used with a
> non-recommended setting.

He would need to toggle the tex fonts switch. And of course all manuals 
should have configured suitable fonts for both choices.

Apart from that there will always be output formats that produce ugly 
results. For example, we have lots of ERT in our manuals, and I don't think 
that lyxhtml export will look good without doing major changes first.

Please do not get me wrong, I understand that the automatic font choice is 
useful. However, we do not yet have a transparent and easy to understand 
solution for the "double automatic" problem. Once we have such a solution I 
am also fine with having the automatic switch.


Georg


Reply via email to