executable code containing symbol `^` inserted with verbatim on pdf. Error while copying back into a text...
up vote
1
down vote
favorite
I'm trying to insert Octave code in a pdf containing the character ^
. However when I copy the code from the generated pdf, the code doesn't run: The I already posted similar question and could solve the problem. However the problem reappeared. I suspect one of the loaded package is responsible.
Here is an example of code with the loaded packages
documentclass[a4paper, 12pt]{book}
usepackage{amssymb}
usepackage{amsmath}
usepackage{mathtools}
usepackage[utf8]{inputenc}
usepackage{geometry}
usepackage{url}
usepackage{framed}
usepackage{setspace}
usepackage{lmodern}
usepackage{multirow}
usepackage{listings}
usepackage{xcolor}
usepackage{upquote}
usepackage{hyperref}
hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
}
usepackage{caption}
%usepackage{calrsfs}
%DeclareMathAlphabet{pazocal}{OMS}{zplm}{m}{n}
begin{document}
setlength{parindent}{0cm}
renewcommand{baselinestretch}{0.5}
title{Notes}
author{John Smith}
date{today}
maketitle
tableofcontents{}
definecolor{shadecolor}{RGB}{240,248,255}
begin{shaded}
begin{verbatim}
x^2
end{verbatim}
end{shaded}
end{document}
fonts symbols code octave
add a comment |
up vote
1
down vote
favorite
I'm trying to insert Octave code in a pdf containing the character ^
. However when I copy the code from the generated pdf, the code doesn't run: The I already posted similar question and could solve the problem. However the problem reappeared. I suspect one of the loaded package is responsible.
Here is an example of code with the loaded packages
documentclass[a4paper, 12pt]{book}
usepackage{amssymb}
usepackage{amsmath}
usepackage{mathtools}
usepackage[utf8]{inputenc}
usepackage{geometry}
usepackage{url}
usepackage{framed}
usepackage{setspace}
usepackage{lmodern}
usepackage{multirow}
usepackage{listings}
usepackage{xcolor}
usepackage{upquote}
usepackage{hyperref}
hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
}
usepackage{caption}
%usepackage{calrsfs}
%DeclareMathAlphabet{pazocal}{OMS}{zplm}{m}{n}
begin{document}
setlength{parindent}{0cm}
renewcommand{baselinestretch}{0.5}
title{Notes}
author{John Smith}
date{today}
maketitle
tableofcontents{}
definecolor{shadecolor}{RGB}{240,248,255}
begin{shaded}
begin{verbatim}
x^2
end{verbatim}
end{shaded}
end{document}
fonts symbols code octave
Code produced by a listing is not necessarily meant to run and one shouldn't expect it to after just copy&pasting it.
– Skillmon
Dec 2 at 21:55
indeed when copying pasting from PDF I get the MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 (letterˆ
) and not the usual ascii caret. Culprit islmodern
package. But addusepackage[T1]{fontenc}
and it should fix the issue.
– jfbu
Dec 3 at 21:58
MWE: simply load lmodern and considertexttt{xstring^2}
.
– jfbu
Dec 3 at 22:03
@UlrikeFischer you may be interested into this why doesOT1/lmtt/m/n/10 ^
give aˆ
in PDF (or at least when copying back from PDF, tested with Skim on mac os x)
– jfbu
Dec 3 at 22:04
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to insert Octave code in a pdf containing the character ^
. However when I copy the code from the generated pdf, the code doesn't run: The I already posted similar question and could solve the problem. However the problem reappeared. I suspect one of the loaded package is responsible.
Here is an example of code with the loaded packages
documentclass[a4paper, 12pt]{book}
usepackage{amssymb}
usepackage{amsmath}
usepackage{mathtools}
usepackage[utf8]{inputenc}
usepackage{geometry}
usepackage{url}
usepackage{framed}
usepackage{setspace}
usepackage{lmodern}
usepackage{multirow}
usepackage{listings}
usepackage{xcolor}
usepackage{upquote}
usepackage{hyperref}
hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
}
usepackage{caption}
%usepackage{calrsfs}
%DeclareMathAlphabet{pazocal}{OMS}{zplm}{m}{n}
begin{document}
setlength{parindent}{0cm}
renewcommand{baselinestretch}{0.5}
title{Notes}
author{John Smith}
date{today}
maketitle
tableofcontents{}
definecolor{shadecolor}{RGB}{240,248,255}
begin{shaded}
begin{verbatim}
x^2
end{verbatim}
end{shaded}
end{document}
fonts symbols code octave
I'm trying to insert Octave code in a pdf containing the character ^
. However when I copy the code from the generated pdf, the code doesn't run: The I already posted similar question and could solve the problem. However the problem reappeared. I suspect one of the loaded package is responsible.
Here is an example of code with the loaded packages
documentclass[a4paper, 12pt]{book}
usepackage{amssymb}
usepackage{amsmath}
usepackage{mathtools}
usepackage[utf8]{inputenc}
usepackage{geometry}
usepackage{url}
usepackage{framed}
usepackage{setspace}
usepackage{lmodern}
usepackage{multirow}
usepackage{listings}
usepackage{xcolor}
usepackage{upquote}
usepackage{hyperref}
hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
}
usepackage{caption}
%usepackage{calrsfs}
%DeclareMathAlphabet{pazocal}{OMS}{zplm}{m}{n}
begin{document}
setlength{parindent}{0cm}
renewcommand{baselinestretch}{0.5}
title{Notes}
author{John Smith}
date{today}
maketitle
tableofcontents{}
definecolor{shadecolor}{RGB}{240,248,255}
begin{shaded}
begin{verbatim}
x^2
end{verbatim}
end{shaded}
end{document}
fonts symbols code octave
fonts symbols code octave
edited Dec 3 at 22:02
jfbu
45.6k65146
45.6k65146
asked Dec 2 at 21:48
ecjb
764
764
Code produced by a listing is not necessarily meant to run and one shouldn't expect it to after just copy&pasting it.
– Skillmon
Dec 2 at 21:55
indeed when copying pasting from PDF I get the MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 (letterˆ
) and not the usual ascii caret. Culprit islmodern
package. But addusepackage[T1]{fontenc}
and it should fix the issue.
– jfbu
Dec 3 at 21:58
MWE: simply load lmodern and considertexttt{xstring^2}
.
– jfbu
Dec 3 at 22:03
@UlrikeFischer you may be interested into this why doesOT1/lmtt/m/n/10 ^
give aˆ
in PDF (or at least when copying back from PDF, tested with Skim on mac os x)
– jfbu
Dec 3 at 22:04
add a comment |
Code produced by a listing is not necessarily meant to run and one shouldn't expect it to after just copy&pasting it.
– Skillmon
Dec 2 at 21:55
indeed when copying pasting from PDF I get the MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 (letterˆ
) and not the usual ascii caret. Culprit islmodern
package. But addusepackage[T1]{fontenc}
and it should fix the issue.
– jfbu
Dec 3 at 21:58
MWE: simply load lmodern and considertexttt{xstring^2}
.
– jfbu
Dec 3 at 22:03
@UlrikeFischer you may be interested into this why doesOT1/lmtt/m/n/10 ^
give aˆ
in PDF (or at least when copying back from PDF, tested with Skim on mac os x)
– jfbu
Dec 3 at 22:04
Code produced by a listing is not necessarily meant to run and one shouldn't expect it to after just copy&pasting it.
– Skillmon
Dec 2 at 21:55
Code produced by a listing is not necessarily meant to run and one shouldn't expect it to after just copy&pasting it.
– Skillmon
Dec 2 at 21:55
indeed when copying pasting from PDF I get the MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 (letter
ˆ
) and not the usual ascii caret. Culprit is lmodern
package. But add usepackage[T1]{fontenc}
and it should fix the issue.– jfbu
Dec 3 at 21:58
indeed when copying pasting from PDF I get the MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 (letter
ˆ
) and not the usual ascii caret. Culprit is lmodern
package. But add usepackage[T1]{fontenc}
and it should fix the issue.– jfbu
Dec 3 at 21:58
MWE: simply load lmodern and consider
texttt{xstring^2}
.– jfbu
Dec 3 at 22:03
MWE: simply load lmodern and consider
texttt{xstring^2}
.– jfbu
Dec 3 at 22:03
@UlrikeFischer you may be interested into this why does
OT1/lmtt/m/n/10 ^
give a ˆ
in PDF (or at least when copying back from PDF, tested with Skim on mac os x)– jfbu
Dec 3 at 22:04
@UlrikeFischer you may be interested into this why does
OT1/lmtt/m/n/10 ^
give a ˆ
in PDF (or at least when copying back from PDF, tested with Skim on mac os x)– jfbu
Dec 3 at 22:04
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
I am providing this as a provisory answer to give a workaround awaiting the fonts expert (... or experts).
MWE:
documentclass{article}
%usepackage[T1]{fontenc}
usepackage{lmodern}
begin{document}
thispagestyle{empty}
texttt{xstring^2}
showoutput
end{document}
Uncomment the fontenc
line to fix the issue. Then copy-pasting from PDF gives a normal ascii caret, not a MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 (letter ˆ
)
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
I am providing this as a provisory answer to give a workaround awaiting the fonts expert (... or experts).
MWE:
documentclass{article}
%usepackage[T1]{fontenc}
usepackage{lmodern}
begin{document}
thispagestyle{empty}
texttt{xstring^2}
showoutput
end{document}
Uncomment the fontenc
line to fix the issue. Then copy-pasting from PDF gives a normal ascii caret, not a MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 (letter ˆ
)
add a comment |
up vote
2
down vote
accepted
I am providing this as a provisory answer to give a workaround awaiting the fonts expert (... or experts).
MWE:
documentclass{article}
%usepackage[T1]{fontenc}
usepackage{lmodern}
begin{document}
thispagestyle{empty}
texttt{xstring^2}
showoutput
end{document}
Uncomment the fontenc
line to fix the issue. Then copy-pasting from PDF gives a normal ascii caret, not a MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 (letter ˆ
)
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
I am providing this as a provisory answer to give a workaround awaiting the fonts expert (... or experts).
MWE:
documentclass{article}
%usepackage[T1]{fontenc}
usepackage{lmodern}
begin{document}
thispagestyle{empty}
texttt{xstring^2}
showoutput
end{document}
Uncomment the fontenc
line to fix the issue. Then copy-pasting from PDF gives a normal ascii caret, not a MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 (letter ˆ
)
I am providing this as a provisory answer to give a workaround awaiting the fonts expert (... or experts).
MWE:
documentclass{article}
%usepackage[T1]{fontenc}
usepackage{lmodern}
begin{document}
thispagestyle{empty}
texttt{xstring^2}
showoutput
end{document}
Uncomment the fontenc
line to fix the issue. Then copy-pasting from PDF gives a normal ascii caret, not a MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 (letter ˆ
)
answered Dec 3 at 22:06
jfbu
45.6k65146
45.6k65146
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462858%2fexecutable-code-containing-symbol-inserted-with-verbatim-on-pdf-error-while%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Code produced by a listing is not necessarily meant to run and one shouldn't expect it to after just copy&pasting it.
– Skillmon
Dec 2 at 21:55
indeed when copying pasting from PDF I get the MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 (letter
ˆ
) and not the usual ascii caret. Culprit islmodern
package. But addusepackage[T1]{fontenc}
and it should fix the issue.– jfbu
Dec 3 at 21:58
MWE: simply load lmodern and consider
texttt{xstring^2}
.– jfbu
Dec 3 at 22:03
@UlrikeFischer you may be interested into this why does
OT1/lmtt/m/n/10 ^
give aˆ
in PDF (or at least when copying back from PDF, tested with Skim on mac os x)– jfbu
Dec 3 at 22:04