This is my code:
\documentclass[a4paper, 12pt]{report}
\usepackage{adjustbox}
\usepackage{makecell}
\usepackage{booktabs}
\usepackage{tabularray}
\usepackage{color, xcolor}
\usepackage{amsmath, amsfonts, amssymb, amsthm}
\usepackage{array}
\usepackage{floatrow}
\begin{document}
\begin{table}[H]
\centering
\begin{adjustbox}{width=\textwidth}
\begin{tabular}{|p{195pt}|p{195pt}|}
\hline
\textbf{Modul} & \textbf{Description} \\ \hline
\texttt{python.package.name.submodul.class.method} & Test\\ \hline
\end{tabular}
\end{adjustbox}
\end{table}
\end{document}
This is the poor output without linebreak:
Here is the code with just text:
\documentclass[a4paper, 12pt]{report}
\usepackage{adjustbox}
\usepackage{makecell}
\usepackage{booktabs}
\usepackage{tabularray}
\usepackage{color, xcolor}
\usepackage{amsmath, amsfonts, amssymb, amsthm}
\usepackage{array}
\usepackage{floatrow}
\begin{document}
\begin{table}[H]
\centering
\begin{adjustbox}{width=\textwidth}
\begin{tabular}{|p{195pt}|p{195pt}|}
\hline
\textbf{Modul} & \textbf{Description} \\ \hline
\texttt{This is a very very long sentence. How can I do a line break here? It doesn't work with package names in Python.} & Test\\ \hline
\end{tabular}
\end{adjustbox}
\end{table}
\end{document}
For some reason this one does a linebreak:
Why does LaTeX not break long technical names, such as Python package names, at dots inside \texttt{…} in a table cell, and how can I automatically enable such line breaks (e.g., using \allowbreak or \discretionary)?
Do you have an idea?



