Use sed to fix weird symbols on tex file generated by publish function from miscellaneous Octave package

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I have an Octave code that among other things outputs:



 (x - 5)⋅(x - 4)⋅(x - 3)⋅(x - 2)
───────────────────────────────
24


When using publish function from Octave miscellaneous package, the corresponding latex code look like this:



 (x - 5)â‹…(x - 4)â‹…(x - 3)â‹…(x - 2) 
───────────────────────────────
24


I tried using sed to replace the weird characters:



 sed -i -e 's/â‹…/$cdot$/g' file.tex
sed -i -e 's/─/-/g' file.tex


But nothing happens... Any help is appreciated.







share|improve this question




















  • Testing your data stored in a variable, works fine in my gnu sed 4.4 (without using -i switch though)
    – George Vasiliou
    Dec 6 '17 at 23:51










  • I can't reproduce it. I just noted that if i run cat file.tex, in cli appears just like the output of octave (not with the weird symbols)...
    – kurokirasama
    Dec 7 '17 at 21:23














up vote
1
down vote

favorite












I have an Octave code that among other things outputs:



 (x - 5)⋅(x - 4)⋅(x - 3)⋅(x - 2)
───────────────────────────────
24


When using publish function from Octave miscellaneous package, the corresponding latex code look like this:



 (x - 5)â‹…(x - 4)â‹…(x - 3)â‹…(x - 2) 
───────────────────────────────
24


I tried using sed to replace the weird characters:



 sed -i -e 's/â‹…/$cdot$/g' file.tex
sed -i -e 's/─/-/g' file.tex


But nothing happens... Any help is appreciated.







share|improve this question




















  • Testing your data stored in a variable, works fine in my gnu sed 4.4 (without using -i switch though)
    – George Vasiliou
    Dec 6 '17 at 23:51










  • I can't reproduce it. I just noted that if i run cat file.tex, in cli appears just like the output of octave (not with the weird symbols)...
    – kurokirasama
    Dec 7 '17 at 21:23












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have an Octave code that among other things outputs:



 (x - 5)⋅(x - 4)⋅(x - 3)⋅(x - 2)
───────────────────────────────
24


When using publish function from Octave miscellaneous package, the corresponding latex code look like this:



 (x - 5)â‹…(x - 4)â‹…(x - 3)â‹…(x - 2) 
───────────────────────────────
24


I tried using sed to replace the weird characters:



 sed -i -e 's/â‹…/$cdot$/g' file.tex
sed -i -e 's/─/-/g' file.tex


But nothing happens... Any help is appreciated.







share|improve this question












I have an Octave code that among other things outputs:



 (x - 5)⋅(x - 4)⋅(x - 3)⋅(x - 2)
───────────────────────────────
24


When using publish function from Octave miscellaneous package, the corresponding latex code look like this:



 (x - 5)â‹…(x - 4)â‹…(x - 3)â‹…(x - 2) 
───────────────────────────────
24


I tried using sed to replace the weird characters:



 sed -i -e 's/â‹…/$cdot$/g' file.tex
sed -i -e 's/─/-/g' file.tex


But nothing happens... Any help is appreciated.









share|improve this question











share|improve this question




share|improve this question










asked Dec 6 '17 at 23:38









kurokirasama

768




768











  • Testing your data stored in a variable, works fine in my gnu sed 4.4 (without using -i switch though)
    – George Vasiliou
    Dec 6 '17 at 23:51










  • I can't reproduce it. I just noted that if i run cat file.tex, in cli appears just like the output of octave (not with the weird symbols)...
    – kurokirasama
    Dec 7 '17 at 21:23
















  • Testing your data stored in a variable, works fine in my gnu sed 4.4 (without using -i switch though)
    – George Vasiliou
    Dec 6 '17 at 23:51










  • I can't reproduce it. I just noted that if i run cat file.tex, in cli appears just like the output of octave (not with the weird symbols)...
    – kurokirasama
    Dec 7 '17 at 21:23















Testing your data stored in a variable, works fine in my gnu sed 4.4 (without using -i switch though)
– George Vasiliou
Dec 6 '17 at 23:51




Testing your data stored in a variable, works fine in my gnu sed 4.4 (without using -i switch though)
– George Vasiliou
Dec 6 '17 at 23:51












I can't reproduce it. I just noted that if i run cat file.tex, in cli appears just like the output of octave (not with the weird symbols)...
– kurokirasama
Dec 7 '17 at 21:23




I can't reproduce it. I just noted that if i run cat file.tex, in cli appears just like the output of octave (not with the weird symbols)...
– kurokirasama
Dec 7 '17 at 21:23















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409338%2fuse-sed-to-fix-weird-symbols-on-tex-file-generated-by-publish-function-from-misc%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409338%2fuse-sed-to-fix-weird-symbols-on-tex-file-generated-by-publish-function-from-misc%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay