Skip to content

Instantly share code, notes, and snippets.

@fscm
Last active April 29, 2025 16:56
Show Gist options
  • Save fscm/f15e9ee122dc3d33d1775eae4311f2f1 to your computer and use it in GitHub Desktop.
Save fscm/f15e9ee122dc3d33d1775eae4311f2f1 to your computer and use it in GitHub Desktop.

Revisions

  1. fscm renamed this gist Feb 1, 2022. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. fscm revised this gist Feb 1, 2022. 1 changed file with 34 additions and 1 deletion.
    35 changes: 34 additions & 1 deletion basictex.md
    Original file line number Diff line number Diff line change
    @@ -47,4 +47,37 @@ installation package using the following command:

    ```sh
    rm -rf ~/Downloads/BasicTeX
    ```
    ```

    ## Test

    To test the installed tools create a file called `hello-world.tex` with the
    following text:

    ```tex
    % The LaTeX is in here!
    \documentclass{article}
    \begin{document}
    Hello World
    \end{document}
    ```

    Then run the following command to create the pdf version:

    ```sh
    pdflatex hellow-world.tex
    ```

    To see the created pdf use the following command:

    ```sh
    open hellow-world.pdf
    ```

    ## Install packages

    TeX packages can be installed using the following command:

    ```sh
    tlmgr install <package-name>
    ```
  3. fscm created this gist Feb 1, 2022.
    50 changes: 50 additions & 0 deletions basictex.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    # [macOS] Install BasicTeX

    Instructions on how to install the BasicTeX TeX distribution on macOS.

    ## Uninstall

    First step should be to unsinstall any previous BasicTeX installation. This
    step can be skipped if no BasicTeX version was previously installed.

    To uninstall any previous BasicTeX installations use the following command(s):

    ```sh
    sudo rm -rf /usr/local/texlive /Library/TeX
    ```

    ## Install

    The BasicTeX TeX distribution can be obtained
    [here](https://www.tug.org/mactex/morepackages.html). Copy the link for the
    package version that you want to install from there.

    Get the BasicTeX installer package using the following commands:

    ```sh
    mkdir ~/Downloads/BasicTeX
    curl --silent --location --retry 3 "https://mirror.ctan.org/systems/mac/mactex/BasicTeX.pkg" --output ~/Downloads/BasicTeX/BasicTeX.pkg
    ```

    Run the installer package using the following command:

    ```sh
    sudo installer -pkg ~/Downloads/BasicTeX/BasicTeX.pkg -target /
    ```

    ## Verify

    Open a new terminal window and check if the CMake tool is installed:

    ```sh
    tex --version
    ```

    ## Clean up

    After installing the BasicTeX TeX distribution you can remove the downloaded
    installation package using the following command:

    ```sh
    rm -rf ~/Downloads/BasicTeX
    ```