Text Formattingsuspend interword kerning?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Meta002
Posts: 22
Joined: Sat Jul 11, 2015 2:15 pm

suspend interword kerning?

Post by Meta002 »

Problem: how to turn off inter-word kerning so the elements of a set display nicely.

Here is the MWE, showing both the problem and my ungainly hack (loses right-justification of the text). Does anyone know the correct way to do this?

Code: Select all

Code, edit and compile here:
\documentclass[11pt]{memoir}
\usepackage{graphics}
\usepackage{fontspec}
\setmainfont{LucidaBright}
\newfontfamily\menlosc[Scale=0.9]{Menlo}
\newcommand{\TBFN}[1]{{\menlosc #1}}
\settypeoutlayoutunit{in}
\typeoutlayout
\setstocksize{10in}{7in}
\settrimmedsize{\stockheight}{\stockwidth}{*}
\settypeblocksize{7.4in}{5.0in}{*}
\setlrmargins{0.7in}{*}{*}
\setulmargins{1in}{*}{*}
\setheadfoot{0.2in}{0.8in}
\setheaderspaces{0.5in}{*}{*}
\checkandfixthelayout
\begin{document}
\noindent Problem: unattractive interword kerning inside the sets :
\begin{itemize}
\item For the xxxxx ‘\TBFN{β ∈ \{CIR DMD CRS\}}’, the set \TBFN{\{CIR DMD CRS\}} is called the \emph{xxxxxxxxxx}.
\item When the xxxxx ‘\TBFN{β ∈ \{CIR DMD CRS\}}’ is employed as a xxxxxxxxxx, the xxxxxxxxxx is called the \emph{xxxxxxxxxx}.
\end{itemize}
\noindent My hack. it works, but lack of right justification looks ugly:
\begin{itemize}
\item For the xxxxx ‘\TBFN{β ∈ \{CIR DMD CRS\}}’, the set \TBFN{\{CIR DMD CRS\}} \\ is called the \emph{xxxxxxxxxx}.
\item When the xxxxx ‘\TBFN{β ∈ \{CIR DMD CRS\}}’ is employed as a \\ xxxxxxxxxx, the xxxxxxxxxx is called the \emph{xxxxxxxxxx}.
\end{itemize}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Attachments
mwe.pdf
(23.42 KiB) Downloaded 332 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: suspend interword kerning?

Post by Johannes_B »

I cannot reproduce this, as i don't have the fonts.

You are talking about maths, right? Use math mode in LaTeX. That's what it was designed for.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

suspend interword kerning?

Post by Stefan Kottwitz »

If you could reproduce the issue with a standard font, we could test it for improving.

I agree with Johannes: you need math kerning, thus math mode, in text mode you get text kerning. So, instead of "β ∈ ..." I would write $\beta\in ...$.

Stefan
LaTeX.org admin
Meta002
Posts: 22
Joined: Sat Jul 11, 2015 2:15 pm

Re: suspend interword kerning?

Post by Meta002 »

'Beta' and 'element-of' are Unicode chars that I use in verbatim listings input from files elsewhere in the text. \beta and \in might render the glyphs correctly, but I don't want to fight this battle if I can avoid it.

My best hope was to enclose the sets inside 'in-line' verbatim commands such as \verb. However, this didn't work. I've recently become familiar with the listings package; maybe its in-line verbatim capabilities will do the trick.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: suspend interword kerning?

Post by Johannes_B »

You will need XeTeX or LuaTeX to render utf8-characters verbatim.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Meta002
Posts: 22
Joined: Sat Jul 11, 2015 2:15 pm

Re: suspend interword kerning?

Post by Meta002 »

I'm already using XeTeX, and it is doing a good job handling utf-8 characters that I read from a file and display verbatim. If I can master the art of inline verbatim display, the problem might be solved.
Post Reply