Paul Sutton

Personal Blog

LaTeX and Chemistry

LaTeX is very useful for typesetting Chemistry.

A few examples are below

Normally we would the chemical formula for Methane as

$CH_4$

How do we achieve this in LaTeX? We to use maths mode.

$CH_4$

So the underscore gives us the required Subscript 4. The $ tells latex to use maths mode.

If we want to include both the Atomic number and Mass of an element. For example Hydrogen.

$H^1_1$

$H^6_12$

Or Carbon (illustrating how to type 2 numbers)

$C^6_{12}$

$C^6_{12}$

Puts one number above the other. So in the case the ^ gives us our superscript.

If we wanted to write Sodium as an ion we would put

$Na^{1+}$ Note that the 1+ has been put inside curly braces {1+}

$Na^{1+}$

So far this is pretty straightforward

You can also type chemical equations, which is a little more involved:

$H_2O(l) \hspace{0.5cm} \xrightarrow[\text{}]{\text{heat}}\hspace{0.5cm} = \hspace{0.5cm} H_2O (g)$

The first \text{} would put any text under the arrow, while clearly the second puts the text on top.

As per instructions you need to tell LaTeX to use the package mathtools

\usepackage{mathtools}

I have also added some horizontal spacing so the equation is not squashed together.

however writefreely does not seem to render this fully. You can view this equation in Overleaf here

#LaTeX, #Learn, #typesetting, #chemistry, #basics

cc-by logo

Licenced under Attribution 4.0 International (CC BY 4.0)


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

Code Club Python Activity 2

Have now completed, the Rock Paper Scissors activity.

#covid19,#lockdown,#virtual,#codeclub,#challenges


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

I am using the Deluge bit torrent client to download and stream various free software ISOs. By default the program is displayed full screen. This isn't really needed as the client is happy to sit in the background and get on with what it is doing.

I have found a quick solution to this.

Under Edit –> Preferences –> interfaces, check the box that says: Enable system tray icon.

As per below:

deluge sys tray

If you need to change any settings click in the Deluge icon in the system tray.

#bittorrent,#deluge,#minimize,#system,#tray,

cc-by logo

Licenced under Attribution 4.0 International (CC BY 4.0)


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

Tex Live 2020

TeXLive2020 available today 10/4/2020

TeX Live is an easy (we hope) way to get up and running with the TeX document production system. It provides a comprehensive TeX system with binaries for most flavours of Unix, including GNU/Linux, macOS, and also Windows. It includes all the major TeX-related programs, macro packages, and fonts that are free software, including support for many languages around the world. Many operating systems provide it via their own distributions. 

As I am now using LaTeX for more documents. I have decided to download the TeX Live iso as this is a useful resource to have.

TeXLive is about 3.3gb in total.

I will have a copy of TeXLive 2020. However due to covid-19 physical meetups are off for a few months. I will however endeavour to have a copy for the Tech Jam when it starts up again, hopefully later in 2020.

I can also be contacted in #latex IRC channel on Freenode

#LaTeX, #CTAN, #Linux, #Mac, #Windows, #Typesetting, #download

You can find me on Friendica at zleap@social.isurf.ca


cc-by logo

Licenced under Attribution 4.0 International (CC BY 4.0)


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

Code Club Python Activity 1

As I am more used to Python. I decided to skip a head for the Code Club Challenge and have a go at the About Me Activity.

Here is my attempt at that, it is all one big program which is probably fine.

As this is links to Repl.it then I find Chrome browser will display this. Firefox doesn't seem to work.

#covid19,#lockdown,#virtual,#codeclub,#challenges


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

Learn LaTeX is a new website that aims to give users enough information to get started.

It looks very good so far and hopefully will help build up skills in this area. It won't cover everything but doesn't need to. Hopefully some of my posts will also complement this website.

It is great to see so many fresh resources out there. With the upcoming release of TeX Live 2020 the timing for this could not have been better.

Resources

#LaTeX, #Learn, #typesetting, #lessons, #basics

cc-by logo

Licenced under Attribution 4.0 International (CC BY 4.0)


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

GNOME Community Engagement Challenge

Just found this on Twitter today, so sharing here.

comeng

With an idea to help get beginner coders interested in FOSS, and to help improve coding skills, the GNOME Foundation has teamed up with Endless for a Community Engagement Challenge.

Not gaming news but anything that helps Linux and the FOSS community is important, everything we do is on Linux and expanding the FOSS community is vitally important. Games are built with code obviously, so it's a good fit to mention!

Read more by following the link below

GNOME launches a 'Community Engagement Challenge' with cash prizes


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

Free print and play retro cards! |

I found this on Twitter so decided to share here, a set of printable playing cards (like top trumps). I think this is a limited set to print but you can purchase a much larger set in a Cassette case, money goes towards the Centre for Computing History


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

LXDE Window size issues

Trying to use some of the LXDE applications on a 10/11” netbooks screen, appears to throw up a problem with the window size. The result of this is that the window for lxhotkey doesn't fit on the screen properly. As per illustration below.

LXDE Window size

I can resize this window, left to right, so horizontally. I can't resize vertically. Which is perhaps needed here.

This appears to be a common issue with many Linux applications on small screens.

I asked on #lxde on IRC and a workaround is to hold down 'alt' and click / drag the window around.

The issue can also be reported on github

#lxde,#application,#window,#size,#smallscreen,#netbooks,#lxhotkey


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

Toot is a Linux command line interface for the Mastodon social media network.

This can be installed at the command line with

apt install toot

Once installed you can run with toot

Running this without any command line arguments gives a long list of options.

You will firstly need to login, either with the browser option toot login or with the command line toot login_cli

In order to make a post type:-

toot post

  • Type your message.
  • Press enter then
  • On the new line press ctrl-d to post the message.

There is also documentation via the man page.

man toot

A useful tool, especially if you don't have access to graphical web browser.

Resources

#mastodon, #toot, #commandline, #interface, #linux

cc-by logo

Licenced under Attribution 4.0 International (CC BY 4.0)


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay