On Tue, Jan 2, 2024 at 3:42 PM Daniel via lyx-users
<lyx-users@lists.lyx.org> wrote:
>
> On 2023-12-31 21:59, Paul Rubin wrote:
> >
> > On 12/31/23 13:08, Blake McBride wrote:
> >> Greetings,
> >>
> >> I am using LyX 2.3.7 on a Linux box.  I have some text in which I'd
> >> like to use the straight, type-writer-like single quote instead of a
> >> curved one.  I tried adding the TeX code \texttt{'} but that didn't
> >> work.  I then went into Document / Settings / Fonts and played with
> >> the Typewriter setting.  That changed the quiet but I never got the
> >> straight single quote I am looking for.  Sure appreciate some help.
>

Using  XeTeX or LuaTeX you can deactivate the default font feature
(Ligatures=TeX in fontspec's jargon), the whole purpose of this feature
is to mimic the ligatures knuth created in his fonts, which are not very
common in modern fonts.

You can do that by adding the line
\defaultfontfeatures[\rmfamily,\sffamily]{}
before you load any font. Because LyX loads
the fonts very early, you will need to load the fonts
in the preamble (in LyX 2.4 you'll be able to pass options
to the selected fonts in the fonts dialog).

Note that it will not affect anything other than the straight quotes
because LyX inserts the appropriate unicode character directly for
e.g. en dash, which is the recommended thing to do.

I attached an example file, Times New Roman is not necessary for that,
but you will need a font that supports straight quotes.

Attachment: straigntsinglequote.lyx
Description: application/lyx

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to