General ⇒ Display backtick character
Display backtick character
Code I am inserting:
\begin{verbatim}
`include "file1"
`include "file2"
\end{verbatim}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Display backtick character
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Display backtick character
Display backtick character
Code: Select all
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{fancyvrb}
\begin{document}
\newcommand{\BInclude}{\symbol{0}include}
\begin{Verbatim}[commandchars=ç¿?]
çBInclude "file1"
çBInclude "file2"
\end{Verbatim}
\end{document}
Re: Display backtick character
Display backtick character
Code: Select all
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[upquote=true]
`include "file1"
`include "file2"
\end{lstlisting}
\end{document}
-
- Posts: 2
- Joined: Thu May 01, 2008 11:23 pm
Re: Display backtick character
The current solution puts everything into the new format, or just the backtick but with a blank line above and before it. What I really need is a command like \textbackslash something like \textbacktick. Could this be built into LaTeX 3 do you think?
Any help would be appreciated.
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Display backtick character
Re: Display backtick character
Display backtick character
Forget textcomp and fontenc... they are not required. Instead, use the following:
Code: Select all
\lstset{language=Verilog,literate={`}{{$^{\backprime}$}}1}
\lstinputlisting{verilog.v}