3
votes
1answer
41 views

LaTeX Macro for “code” style, underscore package and hyphenation

I'm looking for a way to nicely set code inside my document. I used \def\code#1{{\texttt{#1}}}, but it still allows the text to be hyphenated. To prevent that, I tried the advise from Prevent ...
3
votes
1answer
162 views

Hyphenation when using \verb command

I'm having a problem using \verb command. Usually when I want some verbatim font in the current line (not in a new paragraph) I use the \verb command, not the verbatim environment. So, when I use ...
10
votes
1answer
93 views

Hyphenate when using underscore as a letter

In many place in my current text I have to insert something like Name_of_model for instance. I found the last suggestion in this answer very helpful. However, I am facing a problem when it come to ...
5
votes
2answers
324 views

Text created with a \newcommand overflows into margin (not xspace question)

I am aware of the use of xspace to handle the space after a macro in different situations. However, it seems that I cannot avoid having my text created with a \newcommand from running into the ...
11
votes
2answers
326 views

Using breakable hyphen "= in \newcommand

I want to use a breakable hyphen "= in a command: \documentclass[a4paper]{article} \usepackage[ngerman]{babel} \newcommand{\TT}{Test"=Text } \begin{document} This is a test whether the hyphen in \TT ...
13
votes
1answer
208 views

Lines too long due to text inside custom command not being hyphenated

I'm having some problems with lines that turn out to be too long. There are correct hyphenation rules for the word but they aren't being applied. Let me first give the sentence that is too long: An ...
10
votes
2answers
515 views

How to add hyphenation support for custom command?

Given the following custom commands: \newcommand{\topic}[1]{#1\index{#1}} \newcommand{\class}[1]{\textsf{\topic{#1}}} which is used for Java classes with full package name, like: ...