How can my master.tex file find font files stored in a subfolder to my working directory?











up vote
2
down vote

favorite












I need to use the font Gotham Rounded, and have so far placed the eights font files (.otf) in my working folder, i.e. the folder containing my master.tex file. This works fine. When compiling my masterfile XeLatex produces a Pdf of my manuscript with the Gotham font.



However, if I move the eight font files to a subfolder ("myFonts") of my working folder, then XeLaTeX is not able to find them.



How do I tell XeLaTeX where I have placed my font files? Can I set the path to the font files somewhere, and how will the path look?



In my preable I have placed the following code for my font choise:



usepackage{fontspec}

% Gotham Rounded
setmainfont[
BoldFont=GothamRnd-Bold.otf,
ItalicFont=GothamRnd-LightIta.otf,
BoldItalicFont=GothamRnd-BoldIta.otf,
]{GothamRnd-Light.otf}


Thanks for any help!










share|improve this question


















  • 1




    Generally, adding Path=./myFonts/, to the options should work
    – egreg
    4 hours ago










  • Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
    – myotis
    3 hours ago










  • In the options to setmainfont
    – egreg
    3 hours ago















up vote
2
down vote

favorite












I need to use the font Gotham Rounded, and have so far placed the eights font files (.otf) in my working folder, i.e. the folder containing my master.tex file. This works fine. When compiling my masterfile XeLatex produces a Pdf of my manuscript with the Gotham font.



However, if I move the eight font files to a subfolder ("myFonts") of my working folder, then XeLaTeX is not able to find them.



How do I tell XeLaTeX where I have placed my font files? Can I set the path to the font files somewhere, and how will the path look?



In my preable I have placed the following code for my font choise:



usepackage{fontspec}

% Gotham Rounded
setmainfont[
BoldFont=GothamRnd-Bold.otf,
ItalicFont=GothamRnd-LightIta.otf,
BoldItalicFont=GothamRnd-BoldIta.otf,
]{GothamRnd-Light.otf}


Thanks for any help!










share|improve this question


















  • 1




    Generally, adding Path=./myFonts/, to the options should work
    – egreg
    4 hours ago










  • Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
    – myotis
    3 hours ago










  • In the options to setmainfont
    – egreg
    3 hours ago













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I need to use the font Gotham Rounded, and have so far placed the eights font files (.otf) in my working folder, i.e. the folder containing my master.tex file. This works fine. When compiling my masterfile XeLatex produces a Pdf of my manuscript with the Gotham font.



However, if I move the eight font files to a subfolder ("myFonts") of my working folder, then XeLaTeX is not able to find them.



How do I tell XeLaTeX where I have placed my font files? Can I set the path to the font files somewhere, and how will the path look?



In my preable I have placed the following code for my font choise:



usepackage{fontspec}

% Gotham Rounded
setmainfont[
BoldFont=GothamRnd-Bold.otf,
ItalicFont=GothamRnd-LightIta.otf,
BoldItalicFont=GothamRnd-BoldIta.otf,
]{GothamRnd-Light.otf}


Thanks for any help!










share|improve this question













I need to use the font Gotham Rounded, and have so far placed the eights font files (.otf) in my working folder, i.e. the folder containing my master.tex file. This works fine. When compiling my masterfile XeLatex produces a Pdf of my manuscript with the Gotham font.



However, if I move the eight font files to a subfolder ("myFonts") of my working folder, then XeLaTeX is not able to find them.



How do I tell XeLaTeX where I have placed my font files? Can I set the path to the font files somewhere, and how will the path look?



In my preable I have placed the following code for my font choise:



usepackage{fontspec}

% Gotham Rounded
setmainfont[
BoldFont=GothamRnd-Bold.otf,
ItalicFont=GothamRnd-LightIta.otf,
BoldItalicFont=GothamRnd-BoldIta.otf,
]{GothamRnd-Light.otf}


Thanks for any help!







fonts fontspec






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









myotis

4541314




4541314








  • 1




    Generally, adding Path=./myFonts/, to the options should work
    – egreg
    4 hours ago










  • Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
    – myotis
    3 hours ago










  • In the options to setmainfont
    – egreg
    3 hours ago














  • 1




    Generally, adding Path=./myFonts/, to the options should work
    – egreg
    4 hours ago










  • Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
    – myotis
    3 hours ago










  • In the options to setmainfont
    – egreg
    3 hours ago








1




1




Generally, adding Path=./myFonts/, to the options should work
– egreg
4 hours ago




Generally, adding Path=./myFonts/, to the options should work
– egreg
4 hours ago












Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
– myotis
3 hours ago




Thanks. Where exactly do I add the string "Path =./myFonts/ " ?
– myotis
3 hours ago












In the options to setmainfont
– egreg
3 hours ago




In the options to setmainfont
– egreg
3 hours ago










1 Answer
1






active

oldest

votes

















up vote
2
down vote













Just add the path. I also recommend a clearer syntax.



usepackage{fontspec}

% Gotham Rounded
setmainfont{GothamRnd}[
Path=./MyFonts/,
Extension=.otf,
UprightFont=*-Light,
BoldFont=*-Bold,
ItalicFont=*-LightIta,
BoldItalicFont=*-BoldIta,
]


The * stands for the main argument to setmainfont.






share|improve this answer





















  • Thanks a lot! I will test out your solution soon.
    – myotis
    2 hours ago











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463220%2fhow-can-my-master-tex-file-find-font-files-stored-in-a-subfolder-to-my-working-d%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








up vote
2
down vote













Just add the path. I also recommend a clearer syntax.



usepackage{fontspec}

% Gotham Rounded
setmainfont{GothamRnd}[
Path=./MyFonts/,
Extension=.otf,
UprightFont=*-Light,
BoldFont=*-Bold,
ItalicFont=*-LightIta,
BoldItalicFont=*-BoldIta,
]


The * stands for the main argument to setmainfont.






share|improve this answer





















  • Thanks a lot! I will test out your solution soon.
    – myotis
    2 hours ago















up vote
2
down vote













Just add the path. I also recommend a clearer syntax.



usepackage{fontspec}

% Gotham Rounded
setmainfont{GothamRnd}[
Path=./MyFonts/,
Extension=.otf,
UprightFont=*-Light,
BoldFont=*-Bold,
ItalicFont=*-LightIta,
BoldItalicFont=*-BoldIta,
]


The * stands for the main argument to setmainfont.






share|improve this answer





















  • Thanks a lot! I will test out your solution soon.
    – myotis
    2 hours ago













up vote
2
down vote










up vote
2
down vote









Just add the path. I also recommend a clearer syntax.



usepackage{fontspec}

% Gotham Rounded
setmainfont{GothamRnd}[
Path=./MyFonts/,
Extension=.otf,
UprightFont=*-Light,
BoldFont=*-Bold,
ItalicFont=*-LightIta,
BoldItalicFont=*-BoldIta,
]


The * stands for the main argument to setmainfont.






share|improve this answer












Just add the path. I also recommend a clearer syntax.



usepackage{fontspec}

% Gotham Rounded
setmainfont{GothamRnd}[
Path=./MyFonts/,
Extension=.otf,
UprightFont=*-Light,
BoldFont=*-Bold,
ItalicFont=*-LightIta,
BoldItalicFont=*-BoldIta,
]


The * stands for the main argument to setmainfont.







share|improve this answer












share|improve this answer



share|improve this answer










answered 3 hours ago









egreg

702k8618723146




702k8618723146












  • Thanks a lot! I will test out your solution soon.
    – myotis
    2 hours ago


















  • Thanks a lot! I will test out your solution soon.
    – myotis
    2 hours ago
















Thanks a lot! I will test out your solution soon.
– myotis
2 hours ago




Thanks a lot! I will test out your solution soon.
– myotis
2 hours ago


















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.





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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463220%2fhow-can-my-master-tex-file-find-font-files-stored-in-a-subfolder-to-my-working-d%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

Lallio

Unable to find Lightning Node

Futebolista