Hello guys!I have a litle problem in latex. I want to write a linux command in latex and i can`t write it like that:
grep -i '^s.*m.*b.*' /usr/dict/words
The problem is ^ and '
Can anyone help me please?
Text Formatting ⇒ can`t write some text
NEW: TikZ book now 40% off at Amazon.com for a short time.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
can`t write some text
You can write this text in a short verbatim environment.
For more complex structures you may take a look at the listings package.
Best regards and welcome to the board
Thorsten¹
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{lmodern}
\parindent0em
\begin{document}
\verb|grep -i '^s.*m.*b.*' /usr/dict/words|
\end{document}
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10