# Tag Info

1

This works fine with pdflatex: \documentclass[10pt,a4paper,final]{article} \usepackage[T1]{fontenc} \usepackage{mathpazo,euler} \usepackage[scaled=0.9]{DejaVuSansMono} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usepackage{listings} \lstset{basicstyle=\ttfamily} \begin{document} Se utiliza un valor \lstinline!boolean! para poder tener en ...

0

The hyphenat-package works fine. \usepackage[htt]{hyphenat}

0

This solves the problem. \usepackage[htt]{hyphenat}

1

By default, LaTeX doesn't hyphenate typewriter type text. With fontspec you can revert this decision quite easily, but you have to newly define a monospaced font. \documentclass{scrartcl} \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage[spelling=new]{german} \setmonofont{Latin Modern Mono}[HyphenChar={-}] \usepackage{tabu} ...

1

Here's another enumitem approach, but automatic switching to \ttfamily using before={\ttfamily}. \documentclass[11pt]{report} \usepackage[utf8]{inputenc} \usepackage{textcomp} \usepackage[T1]{fontenc} \usepackage{enumitem} \newlist{itemtt}{itemize}{1} \setlist[itemtt,1]{label={\textbullet},before={\ttfamily}} \begin{document} \begin{itemtt} \item This ...

1

something like this : \documentclass{article} \usepackage{enumitem} \begin{document} \ttfamily \begin{itemize}[label=\textbullet] \item item1 \item item2 \end{itemize} \end{document}

0

Thanks to all information in the answers and other questions on tex, I finally found a 100% working solution for my situation. I was probably not clear enough in my question. What I want is: use \mon everywhere I want, inside tables and items, but also in other commands. (Which doesn't work for verbatim) use monospace maybe use a gray background Some ...

2

You can possibly do it with \verb. But let's look what happens with your attempt. In \newcommand{\mon}[1]{% \mbox{% \texttt{% \protect\detokenize{#1}% }% }% } there is a misplaced \protect that however does nothing bad. The problem is that TeX sees #6 before the “detokenization” actually takes place and this results in a bad token list ...

0

After reading this answer detailling which does what, and what \sloppy internally does, I’ve decided to go with the following, for now: % Zu lange Zeilen \emergencystretch 5em% The value of 5 em is probably too large, but it doesn’t seem to hurt so far and judging from the documentation.

1

Rather than allow hyphenation I would just allow things to break after _ most easily using url package. Also beware your definitions added a lot of spurious white space from ends of lines in the definitions. \documentclass[draft,11pt]{article} \usepackage{url} \begin{document} \newcommand{\isnormalized}[1]{% \path{is_normalized}($#1$)% } ...

Top 50 recent answers are included