Tag Info

New answers tagged typewriter

1

Here are two ways: 1) with microtype's \textls macro, and the other, \spaceout, without any packages. I have wrapped those macros into \textttA and \textttB invocation forms. The \textls macro uses an optional argument to specify the compression or expansion, while \spaceout uses the values of \theLetterSpace and \extraWordSpace to modify the default ...

0

Just to add on to what @TH mentioned, \texttt also works well inside equation/eqnarray environments and TikZ code. \verb (in its primitive form) doesn't work very well in such cases.

4

To get verbatim content inside the align* environments, my verbatimbox package can help. \documentclass{article} \usepackage{amsmath,verbatimbox} \begin{document} \begin{myverbbox}{\lineA}\int \sin x\,dx\end{myverbbox} \begin{myverbbox}{\lineB}\int{\sin x}\,dx\end{myverbbox} \begin{align*} \int \sin x\,dx && \lineA\\ \int{\sin x}\,dx && ...

2

You can't use \verb inside align*, just like in the argument to any other command; align is a special environment that reads its contents before starting typesetting and this has the consequence that \verb is not allowed. If you want to make examples of input and output, you can use array: \documentclass{article} \usepackage{array,booktabs} ...

6

If you want that the line which can't contain the text in typewriter font be broken at the spot, here's a variation of the \filbreak macro in the TeXbook (page 111): \documentclass{article} \newcommand\wtt[1]{% \hfil\penalty0\hfilneg\texttt{#1}% } \begin{document} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean ...

2

The suggestion here would be to allow your paragraphs to be a little \sloppy: \documentclass{article} \begin{document} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean \texttt{commodo.ligula.eget} dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, ...

0

Just remove \usepackage{polski} altogether and you should be fine. All its functionality is covered by \usepackage[polish]{babel}.

Top 50 recent answers are included