How to avoid problems with diacritics once and for all











up vote
1
down vote

favorite












I work with Rnw, and I type in Catalan, so there are diacritics I wouldn't encounter in English. I just want two things:




  1. That when I compile my PDF, all diacritic letters are as they should be.

  2. That when I save my document and open it again some other day all of their characters are in place.


The first one seems to be solvable using usepackage[catalan]{babel} and usepackage[utf8]{inputenc}, but the second problem is still there.



Is there any way I could obtain this?










share|improve this question







New contributor




zest16 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 4




    I don't know what would cause (2), but make sure to actually save your document as UTF-8. Other than that, switching to a unicode engine like XeLaTeX or LuaLaTeX will of course save some trouble (concerning diacritics, it may cause different problems).
    – TeXnician
    12 hours ago










  • What are you using to edit your .Rnw files? RStudio? Make sure that the default text encoding for files is UTF-8. (Set this in Preferences -> Code -> Saving).
    – Alan Munn
    12 hours ago










  • If you use emacs, you can put % -*- coding: utf-8 -*- at the top of the file, or add it to the file variables at the end (e.g., %%% Local Variables: %%% coding: utf-8-unix %%% mode: latex %%% TeX-engine: luatex %%% TeX-master: t %%% End:).
    – Thérèse
    11 hours ago






  • 4




    Whoever voted to close: please give the OP time to respond to the comments. This post is only 2 hours old. And it's helpful to add a comment if you vote to close explaining why.
    – Alan Munn
    10 hours ago















up vote
1
down vote

favorite












I work with Rnw, and I type in Catalan, so there are diacritics I wouldn't encounter in English. I just want two things:




  1. That when I compile my PDF, all diacritic letters are as they should be.

  2. That when I save my document and open it again some other day all of their characters are in place.


The first one seems to be solvable using usepackage[catalan]{babel} and usepackage[utf8]{inputenc}, but the second problem is still there.



Is there any way I could obtain this?










share|improve this question







New contributor




zest16 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 4




    I don't know what would cause (2), but make sure to actually save your document as UTF-8. Other than that, switching to a unicode engine like XeLaTeX or LuaLaTeX will of course save some trouble (concerning diacritics, it may cause different problems).
    – TeXnician
    12 hours ago










  • What are you using to edit your .Rnw files? RStudio? Make sure that the default text encoding for files is UTF-8. (Set this in Preferences -> Code -> Saving).
    – Alan Munn
    12 hours ago










  • If you use emacs, you can put % -*- coding: utf-8 -*- at the top of the file, or add it to the file variables at the end (e.g., %%% Local Variables: %%% coding: utf-8-unix %%% mode: latex %%% TeX-engine: luatex %%% TeX-master: t %%% End:).
    – Thérèse
    11 hours ago






  • 4




    Whoever voted to close: please give the OP time to respond to the comments. This post is only 2 hours old. And it's helpful to add a comment if you vote to close explaining why.
    – Alan Munn
    10 hours ago













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I work with Rnw, and I type in Catalan, so there are diacritics I wouldn't encounter in English. I just want two things:




  1. That when I compile my PDF, all diacritic letters are as they should be.

  2. That when I save my document and open it again some other day all of their characters are in place.


The first one seems to be solvable using usepackage[catalan]{babel} and usepackage[utf8]{inputenc}, but the second problem is still there.



Is there any way I could obtain this?










share|improve this question







New contributor




zest16 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I work with Rnw, and I type in Catalan, so there are diacritics I wouldn't encounter in English. I just want two things:




  1. That when I compile my PDF, all diacritic letters are as they should be.

  2. That when I save my document and open it again some other day all of their characters are in place.


The first one seems to be solvable using usepackage[catalan]{babel} and usepackage[utf8]{inputenc}, but the second problem is still there.



Is there any way I could obtain this?







unicode characters r listingsutf8 rnw






share|improve this question







New contributor




zest16 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




zest16 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




zest16 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 12 hours ago









zest16

82




82




New contributor




zest16 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





zest16 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






zest16 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 4




    I don't know what would cause (2), but make sure to actually save your document as UTF-8. Other than that, switching to a unicode engine like XeLaTeX or LuaLaTeX will of course save some trouble (concerning diacritics, it may cause different problems).
    – TeXnician
    12 hours ago










  • What are you using to edit your .Rnw files? RStudio? Make sure that the default text encoding for files is UTF-8. (Set this in Preferences -> Code -> Saving).
    – Alan Munn
    12 hours ago










  • If you use emacs, you can put % -*- coding: utf-8 -*- at the top of the file, or add it to the file variables at the end (e.g., %%% Local Variables: %%% coding: utf-8-unix %%% mode: latex %%% TeX-engine: luatex %%% TeX-master: t %%% End:).
    – Thérèse
    11 hours ago






  • 4




    Whoever voted to close: please give the OP time to respond to the comments. This post is only 2 hours old. And it's helpful to add a comment if you vote to close explaining why.
    – Alan Munn
    10 hours ago














  • 4




    I don't know what would cause (2), but make sure to actually save your document as UTF-8. Other than that, switching to a unicode engine like XeLaTeX or LuaLaTeX will of course save some trouble (concerning diacritics, it may cause different problems).
    – TeXnician
    12 hours ago










  • What are you using to edit your .Rnw files? RStudio? Make sure that the default text encoding for files is UTF-8. (Set this in Preferences -> Code -> Saving).
    – Alan Munn
    12 hours ago










  • If you use emacs, you can put % -*- coding: utf-8 -*- at the top of the file, or add it to the file variables at the end (e.g., %%% Local Variables: %%% coding: utf-8-unix %%% mode: latex %%% TeX-engine: luatex %%% TeX-master: t %%% End:).
    – Thérèse
    11 hours ago






  • 4




    Whoever voted to close: please give the OP time to respond to the comments. This post is only 2 hours old. And it's helpful to add a comment if you vote to close explaining why.
    – Alan Munn
    10 hours ago








4




4




I don't know what would cause (2), but make sure to actually save your document as UTF-8. Other than that, switching to a unicode engine like XeLaTeX or LuaLaTeX will of course save some trouble (concerning diacritics, it may cause different problems).
– TeXnician
12 hours ago




I don't know what would cause (2), but make sure to actually save your document as UTF-8. Other than that, switching to a unicode engine like XeLaTeX or LuaLaTeX will of course save some trouble (concerning diacritics, it may cause different problems).
– TeXnician
12 hours ago












What are you using to edit your .Rnw files? RStudio? Make sure that the default text encoding for files is UTF-8. (Set this in Preferences -> Code -> Saving).
– Alan Munn
12 hours ago




What are you using to edit your .Rnw files? RStudio? Make sure that the default text encoding for files is UTF-8. (Set this in Preferences -> Code -> Saving).
– Alan Munn
12 hours ago












If you use emacs, you can put % -*- coding: utf-8 -*- at the top of the file, or add it to the file variables at the end (e.g., %%% Local Variables: %%% coding: utf-8-unix %%% mode: latex %%% TeX-engine: luatex %%% TeX-master: t %%% End:).
– Thérèse
11 hours ago




If you use emacs, you can put % -*- coding: utf-8 -*- at the top of the file, or add it to the file variables at the end (e.g., %%% Local Variables: %%% coding: utf-8-unix %%% mode: latex %%% TeX-engine: luatex %%% TeX-master: t %%% End:).
– Thérèse
11 hours ago




4




4




Whoever voted to close: please give the OP time to respond to the comments. This post is only 2 hours old. And it's helpful to add a comment if you vote to close explaining why.
– Alan Munn
10 hours ago




Whoever voted to close: please give the OP time to respond to the comments. This post is only 2 hours old. And it's helpful to add a comment if you vote to close explaining why.
– Alan Munn
10 hours ago















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
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: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






zest16 is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459649%2fhow-to-avoid-problems-with-diacritics-once-and-for-all%23new-answer', 'question_page');
}
);

Post as a guest





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








zest16 is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















zest16 is a new contributor. Be nice, and check out our Code of Conduct.













zest16 is a new contributor. Be nice, and check out our Code of Conduct.












zest16 is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459649%2fhow-to-avoid-problems-with-diacritics-once-and-for-all%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents