Paul Sutton

latex

Detexify is a great resource if you want to find a common or perhaps an unusual symbol to insert in to your $\LaTeX$ document.

When you go to the Detexify website [1] you are presented with a box to draw your symbol in. For this context I have the symbols tab selected.

detexify

So in the example below I have attempted to draw pi $\pi$. You can see that the website has attempted to find symbols resemble the one I have drawn.

detexify

It works for all sorts of things as per the two examples below. You don't need to be that good at drawing the symbol as some can be pretty complex.

detexify

detexify

This also works the other way. You can enter the name and the website will try and find the corresponding symbol as per below. In this case I am using the classify tab.

detexify

detexify

In both cases the website will tell you which package you can find this symbol in, and which $LaTeX$ command to use. You can find the package on CTAN [5] for more information on how to use that package. Or you can find the documentation on TeXLive [6].

Hopefully this article is helpful and will help. It is also designed to complement the tutorials at Learn LaTeX [3] which is a new resource.

This article can also complement the upcoming 2020 release of TeX Live [6).

#LaTeX, #Detexify,#symbols,#drawing,#help,#resource,#ctan.

Resources

1 Detexify 2 LaTeX Project 3 Learn LaTeX 4 Overleaf 5 CTAN 6 TeXLive

cc-by logo

Licenced under Attribution 4.0 International (CC BY 4.0)

Overleaf Webinar

Teaching with Overleaf webinar – Thurs 2 April 3:00 PM – 3:30 PM BST-

covering:

  • How to create a project template;
  • sharing that project with your students;
  • best practices for organizing projects
  • providing feedback on student projects.

Hope you can join us -

https://bit.ly/33OR2w5

I attended the first webinar on Tuesday 31st March This gave a brief introduction to Overleaf. Very well presented and easy to follow.

Follow Overleaf on Twitter at @overleaf

#AcademicChatter, #overleaf,#latex, #webinar, #teaching

Determine graphics file resolution.

Just making a quick post to cover something I found earlier. Chatting to a user in #latex on Freenode about inserting pictures in to $\LaTeX$ documents. It seems scaling the image isn't an issue as long as you know the actual picture resolution.

gives the following example on how to insert a picture in to a $\LaTeX$ document

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[width=\textwidth]{YOUR-FILE-NAME-HERE}
\end{document}

We can reduce this slightly by removing the \textwidth element

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[width=0.5]{YOUR-FILE-NAME-HERE}
\end{document}

Which will scale the image and insert at ½ the width.

In overleaf and on a GUI it is easy to obtain the image properties.

If you're at the cli, and therefore not able to do this, what do you do then.

There are several solutions

  1. Graphics Magic

gm identify file.png will return some information including the file resolution:

gm identify hexchatSASL.png 
hexchatSASL.png PNG 432x549+0+0 DirectClass 8-bit 45.2Ki 0.000u 0m:0.000003s

So on a similar note the file command does something similar

file hexchatSASL.png 
hexchatSASL.png: PNG image data, 432 x 549, 8-bit/color RGB, non-interlaced

You can also use the view command, which is part of midnightcommander, so opens up a graphical application to display image data.

Once you have determined the file resolution you can calculate how much you need to scale the image.

If you had an image at say 640x480 (w x h) then and you want to display this at ½ the width. Then you can insert

\includegraphics[width=0.5]{YOUR-FILE-NAME-HERE}

To calculate the displayed size you can use

$0.5 \times 640 = 320$

So in this example your image will display, with a width of 320 pixels in your document.

If you use 0.75 then the width is going to be 480

$0.75 \times 640 = 480$

Hopefully this will help someone out there. I did something useful while helping with this.

JabRef Update

Not quite following on from my previous post The JabRef bibliography software has been updated.

JabRef is a bibliography manager, to help make .bib files easier to create and manage. It should be possible to upload the output .bib file to Overleaf too.

  • Screenshots from Jabref 3.8.2

jabref1

jabref2

References

There is a #latex channel on the Freenode IRC network.

#LaTeX, #bibliography, #manager, #software, #windows, #linux, #apple, #overleaf, #ctan,#tex-live,#overleaf, #jabref,#references,


cc-by logo

Licenced under Attribution 4.0 International (CC BY 4.0)

Script for $\LaTeX$ Tables

I was asked in irc ( ##chemistry on frenode) about a project to create a table for periodic table data in $\LaTeX$.

This post, is meant to be a rough guide. You are expected to do your own research in to any specific features you need.

As there are now about 120 elements, doing this manually could be rather long winded. So I am trying to develop a small shell script to help with this process.

Firstly Looking at loops in Bash

now how to generate a basic table in $\LaTeX$

\begin{table}[]
\begin{tabular}{llllll}
 &  &  &  &  & 
\end{tabular}
\caption{}
\label{tab:my-table}
\end{table}

This is for a 1 row table, to add multiple rows, you need to add \ at the end of the row as in:-

\begin{table}[]
\begin{tabular}{llllll}
 
 &  &  &  &  &  \\
 &  &  &  &  &  \\
 &  &  &  &  & 
\end{tabular}
\caption{}
\label{tab:my-table}
\end{table}

The following shell script should help us with this.

Please note that the \, should be removed from the very last row.

I have added a script for 10 rows. This can be changed via the shell script.

 1 #!/bin/bash
  2 
  3 echo " " > data.txt
  4 echo "\begin{table}[]" > data.txt
  5 echo "\begin{tabular}{llllll}" >> data.txt
  6 #wc -l data.txt
  7 
  8 for i in {1..10..1}
  9   do 
 10 
 11      #echo "hello"
 12      echo  "&  &  &  &  & \\" >> data.txt
 13  done
 14 #wc -l data.txt
 15  echo  "\end{tabular}" >> data.txt
 16  echo  "\caption{}" >> data.txt
 17  echo  "\label{tab:my-table}" >> data.txt
 18  echo  "\end{table}" >> data.txt

Required table headings were : atom ; r atomic ; density ; Tf ; Tg ;... ?

Table headings are obviously at the top, therefore, once you have run the script and generated the right number of rows amending the first row to

& atom & r atomic & density & Tf & Tg \

Should give the required headings

I have added some word count (wc) to help with diagnostics.

You will need to change the output file extension to .tex for a $\LaTeX$ file. I'll leave it as data.txt as you need to add the other components of a $\LaTeX$ document anyway.

If the table spans more than 1 page then the table should use

\begin{longtable}{llllll}
\end{longtable}

#chemistry, #typesetting, #bash, #LaTeX, #tables, #scripting

You can find me on Friendica at [email protected]

Tex Live 2019

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. But is handy to have, for the resources, and different installers for Linux, Mac, Windows etc.

TeXLive2020 should be available later this year.

I will have a copy of TeXLive 2019 for the next South Devon Tech Jam in case anyone is interested.

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

You can find me on Friendica at [email protected]


cc-by logo

Licenced under Attribution 4.0 International (CC BY 4.0)

I am working on a series of $\LaTeX$ flashcards to help people learn the basics.

I am not creating a fully comprehensive set of these. LaTeX has far too many features for this.

What I want to do, is create a set, that just covers the basics:

  • Setting up a preamble
  • Document types
  • Sections
  • Table Of Contents (TOC)
  • Cross referencing
  • Bibliographies
  • Citations
  • Plus a few examples of Maths and Science typesetting.

Hopefully enough for people to get started or for myself to support the teaching of the system.

I feel confident enough to actually try and tech LaTeX, so another reason for these cards would be to help me with this, should I get the opportunity to do so. It is a good idea to prepare for this sort of eventuality.

As LaTeX is aimed at academia, once you have the basics, you can keep going and learn more depending on your usage case. There is a lot of help available too.

Despite it being aimed at academic applications, it can produce very professional looking letters, CVs / Resumes and a whole range of other documents too.

#typesetting, #LaTeX, #Document, #preparation, #help, #teaching, #support, #maths, #science, #formulae, #equations.

You can find me on Friendica at [email protected]


cc-by logo

Licenced under Attribution 4.0 International (CC BY 4.0)

$\LaTeX$ Letters

In Overleaf, I have used a template letter file with an empty letter body area (or at least minimal). Copying this to a new file, keeps the original body empty for new files.

I have also created letters and letters-sent folders. This helps keep track of which letters are work in progress and which letters have been sent.

Once saved as pdf you can also attach to a e-mail if you wish to send a letter that way.

Use % at the start of a line (for example for the enclosures) to make the line a comment, if you are enclosing anything this can be put back in by removing the % from the start.

Using % makes that line a comment

$\LaTeX$ templates is a really useful website has templates that can help get you started.

I actually feel fairly confident that I could teach or run small workshops to introduce $\LaTeX$ to students but would expect to be paid.

#LaTeX, #typesetting, #documents, #text, #wysiwym, #sharelatex, #overleaf, #ctan, #texstudio, #templates, #letters

You can find me on Friendica at [email protected]


cc-by logo Licenced under Attribution 4.0 International (CC BY 4.0)

$\LaTeX$ introduction

$\LaTeX$ is a typesetting system, that can be used to create professional looking documents. For example cover letters for employment, student applications, etc.

Its main use, however, is within academia. $\LaTeX$ excels at producing excellent looking reports, scientific papers, articles and has strong maths and science notation functionality.

for example:-

$CH_4$ for chemistry and $\frac{df}{dx}$ for maths as well as greek characters for example:- $$\pi , \Sigma , \Omega , \alpha$$

Which is ideal for Physics and Astronomy.

#latex, #introduction


cc-by logo Licenced under Attribution 4.0 International (CC BY 4.0)