On the question How to automatically hyphenate within \texttt? is explained a lot of things, but I could not understand, or at make it work some things.
On the question Example about hyphenation with ttfamily font I is showed to to apply the ttfont to all text, for example:
\ttfamily
Typewriter/teletype family - (encoding: T1, family: pcr, series: m,
shape: n, size: 10.5, baseline: 11.0pt)
But how can I wrap it around some words like \texttt{Some text} or an environment?
\documentclass[10pt,a5paper,twoside]{memoir}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[main=english]{babel}
\usepackage[showframe,pass]{geometry}
\begin{document}
\frenchspacing
\texttt{Typewriter/teletype family - (encoding: T1, family: pcr, series: m, shape: n, size: 10.5, baseline: 11.0pt)}
\begin{texttt}
Typewriter/teletype family - (encoding: T1, family: pcr, series: m, shape: n, size: 10.5, baseline: 11.0pt)
\end{texttt}
\end{document}
The texttt is not hyphenating and it generation the warnings:
test2.tex:182: Overfull \hbox (11.9992pt too wide) in paragraph at lines 182--183[]\T1/lmtt/m/n/10 Typewriter/teletype family - (encoding: T1, family:
test2.tex:182: Overfull \hbox (33.7491pt too wide) in paragraph at lines 182--183\T1/lmtt/m/n/10 pcr, series: m, shape: n, size: 10.5, baseline: 11.0pt)
Related:

\ttfamilyas shown in the answer to https://tex.stackexchange.com/questions/386665/example-about-hyphenation-with-ttfamily-font it will affect\texttttoo. – Ulrike Fischer Aug 22 '17 at 07:46