How to use the LaTex in VS code on a Chromobook

Recently, I found that the LaTex and VS code are very powerful tools for my dissertation writing. It is easy to install VS code and LaTex on my window PC, however I had several problems with setting PATH when I try to use the LaTex on my Chromebook. After some research from some wrbsites, I solved these problems finally.

In this article, I will descritbe the steps of installing VS code and Latex.

Some useful links:

https://github.com/James-Yu/LaTeX-Workshop/wiki/Install

https://www.tug.org/texlive/

https://github.com/James-Yu/LaTeX-Workshop/issues/1143

Set up your Linux(Beta) on your chromobook

Based on the instuction: https://support.google.com/chromebook/answer/9145439?hl=en , you should 1) Select Settings and 2)Under "Linux (Beta)," select Turn On if you have not done that.

Install Latex on your Chromobook

intall texlive by typing the command below in the terminial

sudo apt install texlive

intall texlive by typing the command below in the terminial. This part is supper important!!!

sudo apt install latexmk

Install VS code on your Chromobook

Download the VS code .deb file from its website: https://code.visualstudio.com/download

According to the instruction from VS code: https://code.visualstudio.com/blogs/2020/12/03/chromebook-get-started

"If your Chromebook is running on an ARM64 chip, pick the .deb package in the variant ARM64 instead. If you're unsure what kind of CPU your Chromebook is using, run the command dpkg --print-architecture in the Linux terminal to find out. You'll see either amd64 (for both Intel and AMD chips: pick the 64 bit variant for VS Code) or arm64 (pick ARM64)."

image.png

After you download the .dev file, double-click to install it.

We also need the LaTex extensions in your VS code, so we install LaTex workhop here. In the futurem you may need other Latex extensions.

image.png

Crteat your first LaTex file

After you finsihed the steps above, you can create your first LaTex file in the system. You can create your own tex file.

\documentclass[12pt]{article}
\begin{document}
Hello world!
$Hello world!$
\end{document}

image.png

You can build your file and see the pdf file now :)

image.png