Cómo obtener comillas simples textuales y en código de ejemplo

Cómo obtener comillas simples textuales y en código de ejemplo

Tengo en mi documentación cosas como print('abc'), pero se convierte en print(’abc’)(tenga en cuenta la cita modificada), lo que interrumpe la compilación.

¿Cómo podría crear los entornos \begin{codeexample}e \begin{verbatim}imprimir (bonificación) citas verdaderas? (tenga en cuenta que todavía quiero que la fuente contenga un verdadero, 'ya que todavía quiero poder copiar/pegar cosas del archivo fuente que sea más confiable que el PDF).

MWE:

\documentclass[a4paper,doc2]{ltxdoc} % doc2 is needed to force the old version, or links get colored in a weird red way even with hidelinks. https://github.com/latex3/latex2e/issues/822

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Warning: if you compile and get:
%% ERROR: Argument of \tikz@lib@matrix@with@options has an extra }.
%% make sure to fix catcodes around it as | is given a different meaning in ltxdoc.

\usepackage{amsmath}
\usepackage[margin=3cm]{geometry}
\usepackage{calc}
\usepackage{tikz}
\input{pgfmanual-en-macros.tex}

\usepackage{tikz-cd}

\usepackage[hidelinks]{hyperref}
\usepackage{cleveref}

\begin{document}

\tableofcontents

\begin{verbatim}
Hey, see this is'nt copy/pastable due to the simple 'quotes' (but "double quotes" seem to be fine).
\end{verbatim}

\begin{codeexample}[code only]
Hey, see this is'nt copy/pastable due to the simple 'quotes' (but "double quotes" seem to be fine).
\end{codeexample}

\end{document}

información relacionada