XeLaTex to PDF rendering ampersands incorrectly (Windows 10 / MikTex / TexMaker)












3















I'm new to Latex and related topics but I'm learning quickly and really loving it.



I'm taking a crack at adapting my CV to Dario Taraborelli's cvtex template for XeTex, and while I've gotten it to render (and quite beautifully, I should add - cheers to DT), it's behaving a unusually with regard to things like ampersands.
Typing & renders the character Ș, which I'd prefer not to have.



I'm using TexMaker and MikTex in Windows 10 to do all this, and within TexMaker I have this setup for compiling/rendering:



enter image description here



Because I'm such a novice, I'll also tell you that what I'm doing is first clicking the arrow on the left, waiting for it to finish without errors, and then clicking the arrow on the right to see my pdf.



Here's some hopefully reproducible code for you, much of which is untouched material from the original cvtex template:



documentclass[10pt]{article}
usepackage{fontspec}

usepackage{geometry}
geometry{letterpaper, textwidth=5.5in, textheight=8.5in, marginparsep=7pt, marginparwidth=.6in}
setlengthparindent{0in}

usepackage[usenames,dvipsnames]{color}
usepackage{xunicode}
usepackage{xltxtra}
defaultfontfeatures{Mapping=tex-text}
setromanfont{Adobe Garamond Pro}
setmonofont[Scale=0.8]{Adobe Garamond Pro}

chardef&="E050
newcommand{html}[1]{href{#1}{scriptsizetextsc{[html]}}}
newcommand{pdf}[1]{href{#1}{scriptsizetextsc{[pdf]}}}
newcommand{doi}[1]{href{#1}{scriptsizetextsc{[doi]}}}

usepackage{marginnote}
newcommand{amper{}}{chardefamper="E0BD }
newcommand{years}[1]{marginnote{scriptsize #1}}
renewcommand*{raggedleftmarginnote}{}
setlength{marginparsep}{7pt}
reversemarginpar

usepackage{sectsty}
usepackage[normalem]{ulem}
sectionfont{mdseriesupshapeLarge}
subsectionfont{mdseriesscshapenormalsize}
subsubsectionfont{mdseriesupshapelarge}

usepackage[driverfallback=dvipdfm, bookmarks, colorlinks, breaklinks,
pdftitle={Albert Einstein - vita},
pdfauthor={My name},
pdfproducer={http://nitens.org/taraborelli/cvtex}
]{hyperref}
hypersetup{linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=MidnightBlue} `
`begin{document}
Food & Drug Administration \
end{document}


Any idea what could be happening here? (I've done a pretty thorough check of previous se/tex posts for anything similar, but I couldn't find anything. If I've missed something obvious, I apologize.)










share|improve this question




















  • 2





    Welcome to TeX.SX! Try removing chardef&="E050 from the preamble.

    – Ruixi Zhang
    Jan 31 at 21:04











  • YOU LEGEND! YOU MYTH! That worked! I can't thank you enough, Ruixi Zhang! You want to move that over to an answer, or shall I do so myself?

    – logjammin
    Jan 31 at 21:07








  • 2





    And remove also xunicode and xltxtra.

    – Ulrike Fischer
    Jan 31 at 21:10











  • @UlrikeFischer oh interesting! Why, exactly? What are those things doing? (No need to respond if too time-consuming, happy to poke around myself!)

    – logjammin
    Jan 31 at 21:13











  • they were needed in the past, but nowadays the stuff is in the latex kernel and in fontspec.

    – Ulrike Fischer
    Jan 31 at 21:15
















3















I'm new to Latex and related topics but I'm learning quickly and really loving it.



I'm taking a crack at adapting my CV to Dario Taraborelli's cvtex template for XeTex, and while I've gotten it to render (and quite beautifully, I should add - cheers to DT), it's behaving a unusually with regard to things like ampersands.
Typing & renders the character Ș, which I'd prefer not to have.



I'm using TexMaker and MikTex in Windows 10 to do all this, and within TexMaker I have this setup for compiling/rendering:



enter image description here



Because I'm such a novice, I'll also tell you that what I'm doing is first clicking the arrow on the left, waiting for it to finish without errors, and then clicking the arrow on the right to see my pdf.



Here's some hopefully reproducible code for you, much of which is untouched material from the original cvtex template:



documentclass[10pt]{article}
usepackage{fontspec}

usepackage{geometry}
geometry{letterpaper, textwidth=5.5in, textheight=8.5in, marginparsep=7pt, marginparwidth=.6in}
setlengthparindent{0in}

usepackage[usenames,dvipsnames]{color}
usepackage{xunicode}
usepackage{xltxtra}
defaultfontfeatures{Mapping=tex-text}
setromanfont{Adobe Garamond Pro}
setmonofont[Scale=0.8]{Adobe Garamond Pro}

chardef&="E050
newcommand{html}[1]{href{#1}{scriptsizetextsc{[html]}}}
newcommand{pdf}[1]{href{#1}{scriptsizetextsc{[pdf]}}}
newcommand{doi}[1]{href{#1}{scriptsizetextsc{[doi]}}}

usepackage{marginnote}
newcommand{amper{}}{chardefamper="E0BD }
newcommand{years}[1]{marginnote{scriptsize #1}}
renewcommand*{raggedleftmarginnote}{}
setlength{marginparsep}{7pt}
reversemarginpar

usepackage{sectsty}
usepackage[normalem]{ulem}
sectionfont{mdseriesupshapeLarge}
subsectionfont{mdseriesscshapenormalsize}
subsubsectionfont{mdseriesupshapelarge}

usepackage[driverfallback=dvipdfm, bookmarks, colorlinks, breaklinks,
pdftitle={Albert Einstein - vita},
pdfauthor={My name},
pdfproducer={http://nitens.org/taraborelli/cvtex}
]{hyperref}
hypersetup{linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=MidnightBlue} `
`begin{document}
Food & Drug Administration \
end{document}


Any idea what could be happening here? (I've done a pretty thorough check of previous se/tex posts for anything similar, but I couldn't find anything. If I've missed something obvious, I apologize.)










share|improve this question




















  • 2





    Welcome to TeX.SX! Try removing chardef&="E050 from the preamble.

    – Ruixi Zhang
    Jan 31 at 21:04











  • YOU LEGEND! YOU MYTH! That worked! I can't thank you enough, Ruixi Zhang! You want to move that over to an answer, or shall I do so myself?

    – logjammin
    Jan 31 at 21:07








  • 2





    And remove also xunicode and xltxtra.

    – Ulrike Fischer
    Jan 31 at 21:10











  • @UlrikeFischer oh interesting! Why, exactly? What are those things doing? (No need to respond if too time-consuming, happy to poke around myself!)

    – logjammin
    Jan 31 at 21:13











  • they were needed in the past, but nowadays the stuff is in the latex kernel and in fontspec.

    – Ulrike Fischer
    Jan 31 at 21:15














3












3








3








I'm new to Latex and related topics but I'm learning quickly and really loving it.



I'm taking a crack at adapting my CV to Dario Taraborelli's cvtex template for XeTex, and while I've gotten it to render (and quite beautifully, I should add - cheers to DT), it's behaving a unusually with regard to things like ampersands.
Typing & renders the character Ș, which I'd prefer not to have.



I'm using TexMaker and MikTex in Windows 10 to do all this, and within TexMaker I have this setup for compiling/rendering:



enter image description here



Because I'm such a novice, I'll also tell you that what I'm doing is first clicking the arrow on the left, waiting for it to finish without errors, and then clicking the arrow on the right to see my pdf.



Here's some hopefully reproducible code for you, much of which is untouched material from the original cvtex template:



documentclass[10pt]{article}
usepackage{fontspec}

usepackage{geometry}
geometry{letterpaper, textwidth=5.5in, textheight=8.5in, marginparsep=7pt, marginparwidth=.6in}
setlengthparindent{0in}

usepackage[usenames,dvipsnames]{color}
usepackage{xunicode}
usepackage{xltxtra}
defaultfontfeatures{Mapping=tex-text}
setromanfont{Adobe Garamond Pro}
setmonofont[Scale=0.8]{Adobe Garamond Pro}

chardef&="E050
newcommand{html}[1]{href{#1}{scriptsizetextsc{[html]}}}
newcommand{pdf}[1]{href{#1}{scriptsizetextsc{[pdf]}}}
newcommand{doi}[1]{href{#1}{scriptsizetextsc{[doi]}}}

usepackage{marginnote}
newcommand{amper{}}{chardefamper="E0BD }
newcommand{years}[1]{marginnote{scriptsize #1}}
renewcommand*{raggedleftmarginnote}{}
setlength{marginparsep}{7pt}
reversemarginpar

usepackage{sectsty}
usepackage[normalem]{ulem}
sectionfont{mdseriesupshapeLarge}
subsectionfont{mdseriesscshapenormalsize}
subsubsectionfont{mdseriesupshapelarge}

usepackage[driverfallback=dvipdfm, bookmarks, colorlinks, breaklinks,
pdftitle={Albert Einstein - vita},
pdfauthor={My name},
pdfproducer={http://nitens.org/taraborelli/cvtex}
]{hyperref}
hypersetup{linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=MidnightBlue} `
`begin{document}
Food & Drug Administration \
end{document}


Any idea what could be happening here? (I've done a pretty thorough check of previous se/tex posts for anything similar, but I couldn't find anything. If I've missed something obvious, I apologize.)










share|improve this question
















I'm new to Latex and related topics but I'm learning quickly and really loving it.



I'm taking a crack at adapting my CV to Dario Taraborelli's cvtex template for XeTex, and while I've gotten it to render (and quite beautifully, I should add - cheers to DT), it's behaving a unusually with regard to things like ampersands.
Typing & renders the character Ș, which I'd prefer not to have.



I'm using TexMaker and MikTex in Windows 10 to do all this, and within TexMaker I have this setup for compiling/rendering:



enter image description here



Because I'm such a novice, I'll also tell you that what I'm doing is first clicking the arrow on the left, waiting for it to finish without errors, and then clicking the arrow on the right to see my pdf.



Here's some hopefully reproducible code for you, much of which is untouched material from the original cvtex template:



documentclass[10pt]{article}
usepackage{fontspec}

usepackage{geometry}
geometry{letterpaper, textwidth=5.5in, textheight=8.5in, marginparsep=7pt, marginparwidth=.6in}
setlengthparindent{0in}

usepackage[usenames,dvipsnames]{color}
usepackage{xunicode}
usepackage{xltxtra}
defaultfontfeatures{Mapping=tex-text}
setromanfont{Adobe Garamond Pro}
setmonofont[Scale=0.8]{Adobe Garamond Pro}

chardef&="E050
newcommand{html}[1]{href{#1}{scriptsizetextsc{[html]}}}
newcommand{pdf}[1]{href{#1}{scriptsizetextsc{[pdf]}}}
newcommand{doi}[1]{href{#1}{scriptsizetextsc{[doi]}}}

usepackage{marginnote}
newcommand{amper{}}{chardefamper="E0BD }
newcommand{years}[1]{marginnote{scriptsize #1}}
renewcommand*{raggedleftmarginnote}{}
setlength{marginparsep}{7pt}
reversemarginpar

usepackage{sectsty}
usepackage[normalem]{ulem}
sectionfont{mdseriesupshapeLarge}
subsectionfont{mdseriesscshapenormalsize}
subsubsectionfont{mdseriesupshapelarge}

usepackage[driverfallback=dvipdfm, bookmarks, colorlinks, breaklinks,
pdftitle={Albert Einstein - vita},
pdfauthor={My name},
pdfproducer={http://nitens.org/taraborelli/cvtex}
]{hyperref}
hypersetup{linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=MidnightBlue} `
`begin{document}
Food & Drug Administration \
end{document}


Any idea what could be happening here? (I've done a pretty thorough check of previous se/tex posts for anything similar, but I couldn't find anything. If I've missed something obvious, I apologize.)







xetex formatting miktex texmaker windows






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 31 at 21:10









Kurt

37.3k847162




37.3k847162










asked Jan 31 at 21:00









logjamminlogjammin

182




182








  • 2





    Welcome to TeX.SX! Try removing chardef&="E050 from the preamble.

    – Ruixi Zhang
    Jan 31 at 21:04











  • YOU LEGEND! YOU MYTH! That worked! I can't thank you enough, Ruixi Zhang! You want to move that over to an answer, or shall I do so myself?

    – logjammin
    Jan 31 at 21:07








  • 2





    And remove also xunicode and xltxtra.

    – Ulrike Fischer
    Jan 31 at 21:10











  • @UlrikeFischer oh interesting! Why, exactly? What are those things doing? (No need to respond if too time-consuming, happy to poke around myself!)

    – logjammin
    Jan 31 at 21:13











  • they were needed in the past, but nowadays the stuff is in the latex kernel and in fontspec.

    – Ulrike Fischer
    Jan 31 at 21:15














  • 2





    Welcome to TeX.SX! Try removing chardef&="E050 from the preamble.

    – Ruixi Zhang
    Jan 31 at 21:04











  • YOU LEGEND! YOU MYTH! That worked! I can't thank you enough, Ruixi Zhang! You want to move that over to an answer, or shall I do so myself?

    – logjammin
    Jan 31 at 21:07








  • 2





    And remove also xunicode and xltxtra.

    – Ulrike Fischer
    Jan 31 at 21:10











  • @UlrikeFischer oh interesting! Why, exactly? What are those things doing? (No need to respond if too time-consuming, happy to poke around myself!)

    – logjammin
    Jan 31 at 21:13











  • they were needed in the past, but nowadays the stuff is in the latex kernel and in fontspec.

    – Ulrike Fischer
    Jan 31 at 21:15








2




2





Welcome to TeX.SX! Try removing chardef&="E050 from the preamble.

– Ruixi Zhang
Jan 31 at 21:04





Welcome to TeX.SX! Try removing chardef&="E050 from the preamble.

– Ruixi Zhang
Jan 31 at 21:04













YOU LEGEND! YOU MYTH! That worked! I can't thank you enough, Ruixi Zhang! You want to move that over to an answer, or shall I do so myself?

– logjammin
Jan 31 at 21:07







YOU LEGEND! YOU MYTH! That worked! I can't thank you enough, Ruixi Zhang! You want to move that over to an answer, or shall I do so myself?

– logjammin
Jan 31 at 21:07






2




2





And remove also xunicode and xltxtra.

– Ulrike Fischer
Jan 31 at 21:10





And remove also xunicode and xltxtra.

– Ulrike Fischer
Jan 31 at 21:10













@UlrikeFischer oh interesting! Why, exactly? What are those things doing? (No need to respond if too time-consuming, happy to poke around myself!)

– logjammin
Jan 31 at 21:13





@UlrikeFischer oh interesting! Why, exactly? What are those things doing? (No need to respond if too time-consuming, happy to poke around myself!)

– logjammin
Jan 31 at 21:13













they were needed in the past, but nowadays the stuff is in the latex kernel and in fontspec.

– Ulrike Fischer
Jan 31 at 21:15





they were needed in the past, but nowadays the stuff is in the latex kernel and in fontspec.

– Ulrike Fischer
Jan 31 at 21:15










1 Answer
1






active

oldest

votes


















3














According to http://nitens.org/taraborelli/cvtex and https://github.com/dartar/cvtex, the cvtex “template” has not been updated for more than 8 years (and judging by this issue I’d argue that it has not been maintained for over 6 years). During this period, fontspec no longer depended on xunicode and the alike. So you may safely remove those from the preamble as @UlrikeFischer commented.



Now, to address your specific question. The problematic line is this:



chardef&="E050


under the CUSTOM COMMANDS section of the preamble. I can only assume that the original author didn’t like how the default ampersand looked like in Adobe Garamond Pro, so he decided to use one of its alternative glyph ("E050 is in the private use area). There is another line:



newcommand{amper{}}{chardefamper="E0BD }


You should erase these two lines from existence ;-) Nowadays, you should select alternative glyph using advanced features of fontspec. See, for instance, the subsection titled “Character Variants” of the fontspec manual.



BTW, setromanfont{Adobe Garamond Pro} is depreciated. Use setmainfont{Adobe Garamond Pro} instead.






share|improve this answer

























    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',
    autoActivateHeartbeat: false,
    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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472796%2fxelatex-to-pdf-rendering-ampersands-incorrectly-windows-10-miktex-texmaker%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    According to http://nitens.org/taraborelli/cvtex and https://github.com/dartar/cvtex, the cvtex “template” has not been updated for more than 8 years (and judging by this issue I’d argue that it has not been maintained for over 6 years). During this period, fontspec no longer depended on xunicode and the alike. So you may safely remove those from the preamble as @UlrikeFischer commented.



    Now, to address your specific question. The problematic line is this:



    chardef&="E050


    under the CUSTOM COMMANDS section of the preamble. I can only assume that the original author didn’t like how the default ampersand looked like in Adobe Garamond Pro, so he decided to use one of its alternative glyph ("E050 is in the private use area). There is another line:



    newcommand{amper{}}{chardefamper="E0BD }


    You should erase these two lines from existence ;-) Nowadays, you should select alternative glyph using advanced features of fontspec. See, for instance, the subsection titled “Character Variants” of the fontspec manual.



    BTW, setromanfont{Adobe Garamond Pro} is depreciated. Use setmainfont{Adobe Garamond Pro} instead.






    share|improve this answer






























      3














      According to http://nitens.org/taraborelli/cvtex and https://github.com/dartar/cvtex, the cvtex “template” has not been updated for more than 8 years (and judging by this issue I’d argue that it has not been maintained for over 6 years). During this period, fontspec no longer depended on xunicode and the alike. So you may safely remove those from the preamble as @UlrikeFischer commented.



      Now, to address your specific question. The problematic line is this:



      chardef&="E050


      under the CUSTOM COMMANDS section of the preamble. I can only assume that the original author didn’t like how the default ampersand looked like in Adobe Garamond Pro, so he decided to use one of its alternative glyph ("E050 is in the private use area). There is another line:



      newcommand{amper{}}{chardefamper="E0BD }


      You should erase these two lines from existence ;-) Nowadays, you should select alternative glyph using advanced features of fontspec. See, for instance, the subsection titled “Character Variants” of the fontspec manual.



      BTW, setromanfont{Adobe Garamond Pro} is depreciated. Use setmainfont{Adobe Garamond Pro} instead.






      share|improve this answer




























        3












        3








        3







        According to http://nitens.org/taraborelli/cvtex and https://github.com/dartar/cvtex, the cvtex “template” has not been updated for more than 8 years (and judging by this issue I’d argue that it has not been maintained for over 6 years). During this period, fontspec no longer depended on xunicode and the alike. So you may safely remove those from the preamble as @UlrikeFischer commented.



        Now, to address your specific question. The problematic line is this:



        chardef&="E050


        under the CUSTOM COMMANDS section of the preamble. I can only assume that the original author didn’t like how the default ampersand looked like in Adobe Garamond Pro, so he decided to use one of its alternative glyph ("E050 is in the private use area). There is another line:



        newcommand{amper{}}{chardefamper="E0BD }


        You should erase these two lines from existence ;-) Nowadays, you should select alternative glyph using advanced features of fontspec. See, for instance, the subsection titled “Character Variants” of the fontspec manual.



        BTW, setromanfont{Adobe Garamond Pro} is depreciated. Use setmainfont{Adobe Garamond Pro} instead.






        share|improve this answer















        According to http://nitens.org/taraborelli/cvtex and https://github.com/dartar/cvtex, the cvtex “template” has not been updated for more than 8 years (and judging by this issue I’d argue that it has not been maintained for over 6 years). During this period, fontspec no longer depended on xunicode and the alike. So you may safely remove those from the preamble as @UlrikeFischer commented.



        Now, to address your specific question. The problematic line is this:



        chardef&="E050


        under the CUSTOM COMMANDS section of the preamble. I can only assume that the original author didn’t like how the default ampersand looked like in Adobe Garamond Pro, so he decided to use one of its alternative glyph ("E050 is in the private use area). There is another line:



        newcommand{amper{}}{chardefamper="E0BD }


        You should erase these two lines from existence ;-) Nowadays, you should select alternative glyph using advanced features of fontspec. See, for instance, the subsection titled “Character Variants” of the fontspec manual.



        BTW, setromanfont{Adobe Garamond Pro} is depreciated. Use setmainfont{Adobe Garamond Pro} instead.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 31 at 21:39

























        answered Jan 31 at 21:34









        Ruixi ZhangRuixi Zhang

        5,383322




        5,383322






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472796%2fxelatex-to-pdf-rendering-ampersands-incorrectly-windows-10-miktex-texmaker%23new-answer', 'question_page');
            }
            );

            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







            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

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