[Tex/LaTex] How to install a package on MikTeX portable

miktexxcharter

I hope you take time reading my post…hehehhee

I am making a resume using Latex. I downloaded a Latex resume template zip file from a site and tried to make a PDF file using Texmaker just to make sure that the tex files in the downloaded Latex resume template zip files looks OK when I will modify it in the future.

The site looks like this as shown below:

(Picture3)

When I got the Latex resume template zip file on a latex resume template I liked, I unzipped it and put it in the laptop. Now I have the tex files which will be used to create my own Latex resume.

(Picture4)

When I tried to create a PDF file using the tex files I downloaded from the Internet, I got an error message as shown in the red circle on the picture below.

(Picture1)

OK. Texmaker said I don't have the file called "XCharter.sty", so I raided the Internet. I Googled the term "XCharter.sty latex download" and found something I need. I looked and found this cite (https://ctan.org/tex-archive/fonts/xcharter?lang=en) and it looks like as shown below:

![(Picture6)

I downloaded the contents of the XCharter package from that CTAN website as shown in the red circle above and unzipped it in my laptop. Now…the next thing I want to do is to make the "XCharter" package be recognized
by the MikTex distribution I used as shown in the red circle. I want the "XChapter" package installed in the computer and be recognized by the MikTex. The MikTex distribution I currently use is shown below in red circle:

(Picture5)

The question is:

How to install "XCharter.sty" file on my laptop?

I tried to install the "XCharter.sty" on my laptop based from the ways of others and faithfully following the instructions.

MY ATTEMPT:

I looked at the answer for the question and I followed the answer step by step after I read this thread How can I manually install a package on MiKTeX (Windows)

Looking at steps below:

(Picture7)

Now following the Step 1 in installing a sty file:

(Picture8)

It said that I had to create the so-called "local texmf tree" in MikTex, so I followed it. I read it in this thread (Create a local texmf tree in MiKTeX). The steps on how to create the "local texmf tree" in MikTex were shown below…

(Picture9)

Step 1 TO CREATE "local texmf tree" in MikTex:

(Picture13)

Enlarged version of encircled Step 1:

(Picture14)

The answerer said that I should not put a folder in the MikTex folder. This new folder must not be a subfolder of the MikTex distribution, so I put this new folder (I named it "localtexmf") next to the MikTex folder as shown
below, encircled in red. This folder must be on the same drive as the MikTex folder as shown below.

(Picture15)

I wasn't able to follow the part where the folder must be "TDS compliant" because when I read the link "A Directory Structure for TeX Files" (from the website http://tug.org/tds/tds.html), I didn't understand it. I just thought that putting the localtexmf folder next to the MikTex folder without knowing whether the localtexmf folder is TDS compliant would complete the Step 1
to create the "local texmf tree" in MikTex. I don't know if I did it right on Step 1.

Step 2 TO CREATE "local texmf tree" in MikTex:

(Picture13.1)

Enlarged version of encircled Step 2:

(Picture16)

I read the Step 1 in using the MikTex GUI but I'm not sure if the GUI it refers to is the MikTex GUI I had, so I couldn't follow. The MikTex GUI I had looks like this as shown below:

(Picture17)

When I read the Step 2 in using the MikTex GUI, it went smoothly. I was able to add a root directory. It looks like this as shown below:

(Picture18)

When I read the Step 3 in using the MikTex GUI, it went smoothly. I was able follow directions. It looks like this as shown below:

(Picture19)

And now that concludes the Step 1 in installing the sty files: Creating a new directory with the package name in a local texmf directory structure.

Now following the Step 2 in installing a sty file:

(Picture20)

Hmmm…all I had is this file, which is I downloaded from the CTAN website. The downloaded file looks like this, shown in red circle below:

(Picture21)

After I unzipped the file, xcharter becomes a folder as shown in the red circle:

(Picture22)

Now looking at the xcharter folder's files inside, we see the file folders inside the xcharter folder as shown below:

(Picture23)

After searching the elusive "xcharter.sty" file in the folders created by unzipping the "xcharter" ZIP file, I don't see any "xcharter.sty" file within the "xcharter" ZIP file.

I'm stuck at Step 2, which is to copy the sty files in the newly-created directory, because I don't see any "xcharter.sty" file from the
the unzipped "xcharter" ZIP file.

I'm pretty frustrated now because installing the "xcharter.sty" isn't straightforward and easy and the ways that were used to install
MikTex package seems inapplicable to me.

How to download and install the "xcharter.sty" on a particular machine? especially on my laptop?

I'm frustrated…):

Best Answer

I just installed MikTeX portable on a USB key and I managed to install the xcharter package in the normal way.

In order to show you how to do, I made a screenshot of each step, I hope you enjoy! hehehe !!

Downloading the executable

I downloaded the software on the MikTeX page here from the All Download tab and placed it on the USB key: https://miktex.org/download

telecharger-miktex

installing MikTeX portable

Then I ran miktex-portable-2.9.6753.exe.

When this was finished, it appeared the miktex-portable.cmd online command as well as the texmfs folder

cle-usb

Launching the console

I launched miktex-portable.cmd and the MikTeX icon appeared in the Windows taskbar.

miktex-icone

I left clicked on this icon and waited several minutes at the end of which the MikTeX portable console window appeared. We can check that it is indeed the portable console according to the path indicated below (I highlighted it in yellow).

miktex-console

xcharter search

I left clicked on Packages and searched xcharter. I only got one answer:

xcharter-recherche

Installing the package

I then selected this package by clicking on it and I clicked on the + button to install it. xcharter-selection

A window appeared that downloaded the package. xcharter-installation

When it appears at the bottom right, close, the installation is complete.

xcharter-close

I hope that now you will be able to do the same.

Translated with www.DeepL.com/Translator