<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>tables &amp;mdash; Paul Sutton</title>
    <link>https://personaljournal.ca/paulsutton/tag:tables</link>
    <description>Personal Blog</description>
    <pubDate>Tue, 05 May 2026 13:07:05 +0000</pubDate>
    <item>
      <title>Adding tables to Overleaf LaTeX document.</title>
      <link>https://personaljournal.ca/paulsutton/adding-tables-to-overleaf-latex-document</link>
      <description>&lt;![CDATA[Adding tables to Overleaf LaTeX document.&#xA;&#xA;I am sharing this, in the hope that it helps to demonstrate my IT skills.  &#xA;&#xA;This shows:&#xA;&#xA;Creation of a table using tables generator&#xA;Copying into a LaTeX document in Overleaf&#xA;Making a few modifications&#xA;Adding \listoftables to so that it is listed near the end of the document&#xA;&#xA;iframe width=&#34;560&#34; height=&#34;315&#34; sandbox=&#34;allow-same-origin allow-scripts allow-popups&#34; src=&#34;https://diode.zone/videos/embed/a83ac2f1-fda8-4a01-a019-7eb0ece02aac&#34; frameborder=&#34;0&#34; allowfullscreen/iframe&#xA;&#xA;#skills,#computing,#science,#LaTeX,#Overleaf,#tables&#xA;&#xA;License information&#xA;&#xA;a rel=&#34;license&#34; href=&#34;http://creativecommons.org/licenses/by-sa/4.0/&#34;img alt=&#34;Creative Commons Licence&#34; style=&#34;border-width:0&#34; src=&#34;https://i.creativecommons.org/l/by-sa/4.0/88x31.png&#34; //abr /This work is licensed under a a rel=&#34;license&#34; href=&#34;http://creativecommons.org/licenses/by-sa/4.0/&#34;Creative Commons Attribution-ShareAlike 4.0 International License/a.&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b 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. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Adding tables to Overleaf LaTeX document.</p>

<p>I am sharing this, in the hope that it helps to demonstrate my IT skills.</p>

<p>This shows:</p>
<ul><li>Creation of a table using tables generator</li>
<li>Copying into a LaTeX document in Overleaf</li>
<li>Making a few modifications</li>
<li>Adding \listoftables to so that it is listed near the end of the document</li></ul>

<iframe width="560" height="315" src="https://diode.zone/videos/embed/a83ac2f1-fda8-4a01-a019-7eb0ece02aac" frameborder="0" allowfullscreen=""></iframe>

<p><a href="/paulsutton/tag:skills" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">skills</span></a>,<a href="/paulsutton/tag:computing" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">computing</span></a>,<a href="/paulsutton/tag:science" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">science</span></a>,<a href="/paulsutton/tag:LaTeX" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">LaTeX</span></a>,<a href="/paulsutton/tag:Overleaf" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Overleaf</span></a>,<a href="/paulsutton/tag:tables" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">tables</span></a></p>

<p><strong>License information</strong></p>

<p><a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="nofollow"><img alt="Creative Commons Licence" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png"/></a><br/>This work is licensed under a <a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="nofollow">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> 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. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/adding-tables-to-overleaf-latex-document</guid>
      <pubDate>Wed, 18 Nov 2020 22:03:16 +0000</pubDate>
    </item>
    <item>
      <title>Script for $\LaTeX$ Tables</title>
      <link>https://personaljournal.ca/paulsutton/macro-for-latex-tables</link>
      <description>&lt;![CDATA[Script for $\LaTeX$ Tables&#xA;&#xA;I was asked in irc ( ##chemistry on frenode) about a project to create a table for periodic table data in $\LaTeX$.&#xA;&#xA;This post, is meant to be a rough guide. You are expected to do your own research in to any specific features you need. &#xA;&#xA;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.&#xA;&#xA;Firstly Looking at loops in Bash&#xA;&#xA;bash-for-loop&#xA;how-to-write-multiple-line-string-using-bash-with-variables&#xA;Tables Generator&#xA;&#xA;now how to generate a basic table in $\LaTeX$&#xA;&#xA;\begin{table}[]&#xA;\begin{tabular}{llllll}&#xA; &amp;  &amp;  &amp;  &amp;  &amp; &#xA;\end{tabular}&#xA;\caption{}&#xA;\label{tab:my-table}&#xA;\end{table}&#xA;&#xA;This is for a 1 row table, to add multiple rows, you need to add \\ at the end of the row as in:-&#xA;&#xA;\begin{table}[]&#xA;\begin{tabular}{llllll}&#xA; &#xA; &amp;  &amp;  &amp;  &amp;  &amp;  \\&#xA; &amp;  &amp;  &amp;  &amp;  &amp;  \\&#xA; &amp;  &amp;  &amp;  &amp;  &amp; &#xA;\end{tabular}&#xA;\caption{}&#xA;\label{tab:my-table}&#xA;\end{table}&#xA;&#xA;The following shell script should help us with this. &#xA;&#xA;Please note that the \\,  should be removed from the very last row. &#xA;&#xA;I have added a script for 10 rows. This can be changed via the shell script. &#xA;&#xA; 1 #!/bin/bash&#xA;  2 &#xA;  3 echo &#34; &#34;   data.txt&#xA;  4 echo &#34;\begin{table}[]&#34;   data.txt&#xA;  5 echo &#34;\begin{tabular}{llllll}&#34;     data.txt&#xA;  6 #wc -l data.txt&#xA;  7 &#xA;  8 for i in {1..10..1}&#xA;  9   do &#xA; 10 &#xA; 11      #echo &#34;hello&#34;&#xA; 12      echo  &#34;&amp;  &amp;  &amp;  &amp;  &amp; \\&#34;     data.txt&#xA; 13  done&#xA; 14 #wc -l data.txt&#xA; 15  echo  &#34;\end{tabular}&#34;     data.txt&#xA; 16  echo  &#34;\caption{}&#34;     data.txt&#xA; 17  echo  &#34;\label{tab:my-table}&#34;     data.txt&#xA; 18  echo  &#34;\end{table}&#34;     data.txt&#xA;&#xA;Required table headings were :&#xA; atom ; r atomic ; density ; Tf ; Tg ;... ?&#xA;&#xA;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&#xA;&#xA;&amp; atom &amp; r atomic &amp; density &amp; Tf &amp; Tg \\&#xA;&#xA;Should give the required headings&#xA;&#xA;I have added some word count (wc) to help with diagnostics.&#xA;&#xA;You will need to change the output file extension to .tex for a $\LaTeX$ file.  I&#39;ll leave it as data.txt as you need to add the other components of a $\LaTeX$ document anyway. &#xA;&#xA;If the table spans more than 1 page then the table should use&#xA;&#xA;\begin{longtable}{llllll}&#xA;\end{longtable}&#xA;&#xA;#chemistry, #typesetting, #bash, #LaTeX, #tables, &#xA;scripting&#xA;&#xA;You can find me on Friendica at zleap@social.isurf.ca&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b 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. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Script for $\LaTeX$ Tables</p>

<p>I was asked in irc ( #<a href="/paulsutton/tag:chemistry" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">chemistry</span></a> on frenode) about a project to create a table for periodic table data in $\LaTeX$.</p>

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

<p>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.</p>

<p>Firstly Looking at loops in Bash</p>
<ul><li><a href="https://www.cyberciti.biz/faq/bash-for-loop/" rel="nofollow">bash-for-loop</a></li>
<li><a href="https://stackoverflow.com/questions/7875540/how-to-write-multiple-line-string-using-bash-with-variables" rel="nofollow">how-to-write-multiple-line-string-using-bash-with-variables</a></li>
<li><a href="https://tablesgenerator.com/" rel="nofollow">Tables Generator</a></li></ul>

<p>now how to generate a basic table in $\LaTeX$</p>

<pre><code>\begin{table}[]
\begin{tabular}{llllll}
 &amp;  &amp;  &amp;  &amp;  &amp; 
\end{tabular}
\caption{}
\label{tab:my-table}
\end{table}
</code></pre>

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

<pre><code>\begin{table}[]
\begin{tabular}{llllll}
 
 &amp;  &amp;  &amp;  &amp;  &amp;  \\
 &amp;  &amp;  &amp;  &amp;  &amp;  \\
 &amp;  &amp;  &amp;  &amp;  &amp; 
\end{tabular}
\caption{}
\label{tab:my-table}
\end{table}
</code></pre>

<p>The following shell script should help us with this.</p>

<p><strong>Please note that the \,  should be removed from the very last row.</strong></p>

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

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

<p>Required table headings were :
 atom ; r atomic ; density ; T<em>f ; T</em>g ;... ?</p>

<p>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</p>

<p>&amp; atom &amp; r atomic &amp; density &amp; T<em>f &amp; T</em>g \</p>

<p>Should give the required headings</p>

<p>I have added some word count (wc) to help with diagnostics.</p>

<p>You will need to change the output file extension to .tex for a $\LaTeX$ file.  I&#39;ll leave it as data.txt as you need to add the other components of a $\LaTeX$ document anyway.</p>

<p>If the table spans more than 1 page then the table should use</p>

<pre><code>\begin{longtable}{llllll}
\end{longtable}
</code></pre>

<p><a href="/paulsutton/tag:chemistry" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">chemistry</span></a>, <a href="/paulsutton/tag:typesetting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">typesetting</span></a>, <a href="/paulsutton/tag:bash" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">bash</span></a>, <a href="/paulsutton/tag:LaTeX" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">LaTeX</span></a>, <a href="/paulsutton/tag:tables" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">tables</span></a>,
<a href="/paulsutton/tag:scripting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">scripting</span></a></p>

<p><a href="https://social.isurf.ca/profile/zleap" rel="nofollow">You can find me on Friendica at zleap@social.isurf.ca</a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> 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. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/macro-for-latex-tables</guid>
      <pubDate>Mon, 02 Mar 2020 18:07:36 +0000</pubDate>
    </item>
  </channel>
</rss>