1

I'm new here and I don't know how it really works. I was searching a lot about how to solve my problem but I couldn't find any solution.

I'm currently doing my Master's thesis in LaTeX and I don't really expert at this. I have to do all my thesis in Arial's font 12pt except bibliography section, that it has to be Arial Narrow 10pt.

My code is this:

For all the document (Arial):

\documentclass[12pt]{article}
\usepackage{helvet} 
\renewcommand{\familydefault}{\sfdefault}

For the bibliography:

\bibliographystyle{vancouver}
{\footnotesize 
\bibliography{bibliografiaTFM}}

I pretend to change the font size like this, but I don't know really know if it's 10 pt.

However, I'm not capable of change the font style (to Arial Narrow).

I'm using Jabref program to do the references and I don't have xelatex or lualatex (because I don't really know how to install it). I compile the document with PdfLaTeX and Bib(la)tex.

Can anyone help me with this?

Thank you very much.

9
  • Welcome to TeX.SE. Is Arial Narrow a font that's installed on your system? Please also tell us more about your TeX installation (including its vintage) and which editor/front end you employ to edit and compile your tex file(s). – Mico Jul 8 '20 at 16:59
  • I don't think so. How can I see the TeX installation information and the editor? I'm a bit lost (as I said I'm new in this and I don't really know how it works. I started learning LaTeX with Youtube Tutorials...). – Eva Jul 8 '20 at 17:06
  • 1
    helvet is helvetica, not arial. Beside this you should be able to use the condensed font series, but how exactly depends on your latex version. Is it a new tex system? – Ulrike Fischer Jul 8 '20 at 17:16
  • What kind of computer do you use? Is there a TeX installation on your computer, or are you using an online service such as Overleaf? Suppose your main tex file is called main.tex. Can you search the directory that contains main.tex for a file called main.log? (Replace main with whatever the real filename is.) Assuming you can find the log file, please open it in a text editor and tell us what the first few lines say. – Mico Jul 8 '20 at 17:19
  • @UlrikeFischer I know that helvet is helvetica and not exactly Arial, but I read in one post that it was more less the same. Therefore, I used that font. As I said I don't have xelatex or lualatex, that I saw that it's neccesary if I want to use Arial font. – Eva Jul 8 '20 at 17:30
2

AFAICT, there are two separate issues that need to get resolved: (a) How to inform the front-end/editor that you wish to compile your document with LuaLaTeX (or XeLaTeX) rather than with pdfLaTeX; and (b) how to modify the tex file so that you can use the system fonts called Arial and Arial Narrow.

I can't help you with the first issue as I don't use TeXmaker. However, I trust you'll manage to figure it out.

On the second issue: First, you should no longer load the inputenc and fontenc packages; in their place, load the fontspec package (by issuing the command \usepackage{fontspec} instruction in the preamble. Next, issue the instructions

\setmainfont{Arial}
\setsansfont{Arial}

in the preamble. Obviously (I hope...), you should no longer run \usepackage{helvet} or \renewcommand{\familydefault}{\sfdefault}.

Lastly, right before issuing the instruction \bibliography{...} in the body of the preamble, issue the following two instructions:

\setmainfont{Arial Narrow}
\setsansfont{Arial Narrow}

(I wrote a new comment to show you the images. Someone told me that I have to delete it. So I did it. And I was wrong writing it here. So sorry).

9
  • I could compile with LuaLatex! I thought that it would be more difficult but it wasn't. However, when I changed bibliography font, it changed me the title and the number page style too. Can I change that? \newpage \setmainfont{Arial Narrow} \setsansfont{Arial Narrow} \bibliographystyle{vancouver} {\footnotesize \bibliography{bibliografiaTFM}} In addition, I need to ask you one more thing. \footnotesize command is right to get the words with 10pt size? Or it produces me bigger font size than that? Thanks very much for everything. – Eva Jul 9 '20 at 16:32
  • @Eva - Indeed, If the document's main font size (aka \normalsize) is 12pt, then \footnotesize works out to be 10pt. Running \setmainfont and \setsansfont should definitely not change title and page number styles. How different are the the "new" styles from the old ones? – Mico Jul 9 '20 at 17:01
  • I have \setmainfont and \setsansfont but it changes it. They are too different.. I would like to show you a picture compare the two styles but I don't know if I can. I can't find any option to upload one. – Eva Jul 9 '20 at 18:34
  • I added the pictures comparing the two styles in a new comment. Can you check them? Thanks. As I said, I wrote the commands that you gave me, but it changes me all section. – Eva Jul 9 '20 at 18:45
  • 1
    If I replace with that new command, it changes "References" title to bold, but it continues being Arial Narrow and I want it Arial and bold. (I only wanted Arial Narrow style in cites). However, I tried some things and I could resolved the problem! \bibliographystyle{vancouver} \setmainfont{Arial Narrow}[BoldFont={Arial Bold}] {\footnotesize \bibliography{bibliografiaTFM}} \setmainfont{Arial} %this is for the rest (number page and appendix that I want them to be Arial and not Arial Narrow) \setsansfont{Arial} Finally I solved the entire problem of this post. Thanks very much!!! – Eva Jul 10 '20 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.