<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=LaTeX%2FC3%2FWriting-Style-Files-in-LaTeX%2FEnglish-timed</id>
		<title>LaTeX/C3/Writing-Style-Files-in-LaTeX/English-timed - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=LaTeX%2FC3%2FWriting-Style-Files-in-LaTeX%2FEnglish-timed"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=LaTeX/C3/Writing-Style-Files-in-LaTeX/English-timed&amp;action=history"/>
		<updated>2026-04-08T18:28:37Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=LaTeX/C3/Writing-Style-Files-in-LaTeX/English-timed&amp;diff=56031&amp;oldid=prev</id>
		<title>PoojaMoolya: Created page with &quot;{| border = &quot;1&quot; |- || '''Time''' || '''Narration'''  |- ||00:01 ||Hello and welcome to the spoken tutorial on “'''Writing''' '''Style files”''' in '''LaTeX.'''  |- || 00:0...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=LaTeX/C3/Writing-Style-Files-in-LaTeX/English-timed&amp;diff=56031&amp;oldid=prev"/>
				<updated>2022-09-06T09:29:42Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| border = &amp;quot;1&amp;quot; |- || &amp;#039;&amp;#039;&amp;#039;Time&amp;#039;&amp;#039;&amp;#039; || &amp;#039;&amp;#039;&amp;#039;Narration&amp;#039;&amp;#039;&amp;#039;  |- ||00:01 ||Hello and welcome to the spoken tutorial on “&amp;#039;&amp;#039;&amp;#039;Writing&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;Style files”&amp;#039;&amp;#039;&amp;#039; in &amp;#039;&amp;#039;&amp;#039;LaTeX.&amp;#039;&amp;#039;&amp;#039;  |- || 00:0...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border = &amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|| '''Time'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00:01&lt;br /&gt;
||Hello and welcome to the spoken tutorial on “'''Writing''' '''Style files”''' in '''LaTeX.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:08&lt;br /&gt;
|| In this tutorial we will learn how to:&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:11&lt;br /&gt;
||Write a custom '''style file''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:14&lt;br /&gt;
||Import a custom '''style file''' in a '''LaTeX''' document and&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:19&lt;br /&gt;
||Define a '''standard style file'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00:23&lt;br /&gt;
|| This tutorial is recorded on&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu Linux''' 18.04 OS and '''TeXworks''' Editor v0.6. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:36&lt;br /&gt;
||The steps demonstrated will work in all operating systems.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00:41&lt;br /&gt;
|| To practise this tutorial, you should be familiar with '''LaTeX commands'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:47&lt;br /&gt;
||You should also know how to define '''newcommand''' and '''newenvironment''' in '''LaTeX.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:54&lt;br /&gt;
||If not, then go through the prerequisite '''LaTeX''' spoken tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:01&lt;br /&gt;
|| The files used in this tutorial are available in the '''Code Files''' link on this tutorial page.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:08&lt;br /&gt;
||Please download and use them while practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:12&lt;br /&gt;
||Make sure that all the supporting files are kept in the same folder while practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:19&lt;br /&gt;
|| '''Style files '''are also known as '''Packages.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:23&lt;br /&gt;
||These are supplementary files that increase the functionality of '''LaTeX'''.&lt;br /&gt;
|-&lt;br /&gt;
|| 01:29&lt;br /&gt;
|| You might have used various '''packages''' in your '''LaTeX''' document earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:34&lt;br /&gt;
||For example, we import '''geometry package''' for defining margin.&lt;br /&gt;
|-&lt;br /&gt;
||01:40&lt;br /&gt;
|| To reuse the same code many times in the same document, we use''' newcommand '''and '''newenvironment.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:48&lt;br /&gt;
||To reuse the same code many times in many documents, we use '''style files'''.&lt;br /&gt;
|-&lt;br /&gt;
|| 01:55&lt;br /&gt;
|| We usually define our own '''style file''' in '''LaTeX''' to save time and get cleaner code.&lt;br /&gt;
|-&lt;br /&gt;
|| 02:03&lt;br /&gt;
|| The '''tex''' file containing the content will remain clean, if the '''styles''' are in separate '''sty files'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:12&lt;br /&gt;
||Hence, it is advised to write and use '''style files'''.&lt;br /&gt;
|-&lt;br /&gt;
|| 02:17&lt;br /&gt;
|| Go to the folder where all the files are downloaded.&lt;br /&gt;
|-&lt;br /&gt;
|| 02:21&lt;br /&gt;
|| Open the file '''myPackage.sty''' in '''TeXworks '''editor'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:27&lt;br /&gt;
||We will see some '''LaTeX '''code written in the file.&lt;br /&gt;
|-&lt;br /&gt;
|| 02:31&lt;br /&gt;
||Let us try to understand the code. &lt;br /&gt;
|-&lt;br /&gt;
||02:34&lt;br /&gt;
|| This '''newcommand '''definition means that ''' slash iitb '''is the '''newcommand'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:40&lt;br /&gt;
||Whenever slash '''iitb''' is used in a '''LaTeX''' document, it will '''typeset''' the full name of '''IITB''' in bold font.&lt;br /&gt;
|-&lt;br /&gt;
|| 02:50&lt;br /&gt;
|| '''RequirePackage command '''is used to load the required '''packages''' in the '''style files'''.&lt;br /&gt;
|-&lt;br /&gt;
|| 02:57&lt;br /&gt;
|| We are using '''RequirePackage background '''for setting the background image.&lt;br /&gt;
|-&lt;br /&gt;
|| 03:03&lt;br /&gt;
||I have defined '''newcommand slash iitbbg '''to load '''IITB’s logo''' as the background image.&lt;br /&gt;
|-&lt;br /&gt;
|| 03:12&lt;br /&gt;
||So every time instead of loading the image manually, we can use ''' slash iitbbg command.'''&lt;br /&gt;
|-&lt;br /&gt;
|| 03:21&lt;br /&gt;
||We have now successfully created our custom '''style file'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:25&lt;br /&gt;
||Next let us see how to use this '''style file.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:30&lt;br /&gt;
||Please note that we do not '''compile .sty files.'''&lt;br /&gt;
|-&lt;br /&gt;
|| 03:34&lt;br /&gt;
|| Let’s close this file.&lt;br /&gt;
|-&lt;br /&gt;
|| 03:38&lt;br /&gt;
|| Now open the file''' custom.tex '''in''' TeXworks '''editor'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|| 03:44&lt;br /&gt;
|| The new '''style file '''is loaded in the preamble using''' usepackage command'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:51&lt;br /&gt;
||In our example, we have loaded our '''style filemyPackage.'''&lt;br /&gt;
|-&lt;br /&gt;
|| 03:57&lt;br /&gt;
||After loading the '''style file''', we use\'''iitb''' and''' \iitbbg commands''' inside the '''document''' section.&lt;br /&gt;
|-&lt;br /&gt;
|| 04:08&lt;br /&gt;
|| At the top left, in the drop-down, select '''pdfLaTeX''' if not already selected.&lt;br /&gt;
|-&lt;br /&gt;
||04:15&lt;br /&gt;
|| Then click on the green arrow button to '''compile''' the file.&lt;br /&gt;
|-&lt;br /&gt;
|| 04:20&lt;br /&gt;
||On compilation, we get the '''pdf '''output on the right.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:25&lt;br /&gt;
|| Come back to '''custom.tex '''file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:29&lt;br /&gt;
||Here, we had included the '''command slash iitbbg '''to display the background image. &lt;br /&gt;
|-&lt;br /&gt;
|| 04:37&lt;br /&gt;
|| But we’re not seeing that in the output.&lt;br /&gt;
|-&lt;br /&gt;
|| 04:41&lt;br /&gt;
|| To display the background image, we may need to '''compile''' the code once again.&lt;br /&gt;
&lt;br /&gt;
Let us '''compile''' it once again.&lt;br /&gt;
|-&lt;br /&gt;
|| 04:50&lt;br /&gt;
|| And here is the background image!&lt;br /&gt;
|-&lt;br /&gt;
|| 04:53&lt;br /&gt;
|| Sometimes, we have to '''compile''' the '''LaTeX''' code twice, if we don’t see the expected output.&lt;br /&gt;
|-&lt;br /&gt;
|| 05:00&lt;br /&gt;
||Now let’s modify our''' style file''' into a '''standard style file'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:06&lt;br /&gt;
||The reason is, in the real-world you would want to share your '''style file''' with others.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:13&lt;br /&gt;
||Ideally, it must adhere to the '''style file''' guidelines given by the '''LaTeX''' community.&lt;br /&gt;
|-&lt;br /&gt;
|| 05:20&lt;br /&gt;
|| The structure of the '''style file''' can be summarized into 3 parts:&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:26&lt;br /&gt;
||'''Identification''', includes '''package''' name and version&lt;br /&gt;
|-&lt;br /&gt;
|| 05:32&lt;br /&gt;
||'''Preliminary declarations''', includes details of the required '''package''' and '''User code'''.&lt;br /&gt;
|-&lt;br /&gt;
|| 05:42&lt;br /&gt;
|| More information on this guideline is available at this link&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:48&lt;br /&gt;
|| Go to the folder where the '''code files''' are saved.&lt;br /&gt;
|-&lt;br /&gt;
|| 05:53&lt;br /&gt;
|| Let’s open the file''' myStdPackage.sty '''in''' TeXworks.'''&lt;br /&gt;
|-&lt;br /&gt;
|| 06:01&lt;br /&gt;
||We have written some '''definition''' inside our '''style file'''. &lt;br /&gt;
&lt;br /&gt;
Let’s try to understand the code.&lt;br /&gt;
|-&lt;br /&gt;
|| 06:09&lt;br /&gt;
||'''NeedsTeXFormat{} '''is used to specify the version of '''LaTeX''' in which this''' style file''' will work.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:17&lt;br /&gt;
||In our example, it is '''LaTeX2e.'''&lt;br /&gt;
|-&lt;br /&gt;
|| 06:22&lt;br /&gt;
||'''ProvidesPackage''' is used for identification of the '''package'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:27&lt;br /&gt;
||The '''package''' name should be identical to the '''''filename'''.''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:32&lt;br /&gt;
||Here I am using '''myStdPackage '''as a '''parameter''' and file name.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:39&lt;br /&gt;
||We willalso provide other details like release date and description of the '''package'''.&lt;br /&gt;
|-&lt;br /&gt;
|| 06:46&lt;br /&gt;
||From here onwards, we define our '''commands''' and '''definitions'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:51&lt;br /&gt;
||Recall, we have used this code in '''myPackage.sty file.'''&lt;br /&gt;
|-&lt;br /&gt;
|| 06:58&lt;br /&gt;
||'''endinput''' must be the last '''command''' in this file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:02&lt;br /&gt;
||It indicates that the '''style file''' ends here.&lt;br /&gt;
|-&lt;br /&gt;
|| 07:07&lt;br /&gt;
|| Now we have modified our''' style file''' into a '''standard style file'''.&lt;br /&gt;
|- &lt;br /&gt;
|| 07:13&lt;br /&gt;
|| Next let’s switch back to the '''LaTeX '''file '''custom.tex'''.&lt;br /&gt;
|-&lt;br /&gt;
|| 07:19&lt;br /&gt;
|| In the''' usepackage command '''change the '''package''' name to '''myStdPackage.'''&lt;br /&gt;
|-&lt;br /&gt;
|| 07:27&lt;br /&gt;
|| Then save and '''compile''' the file.&lt;br /&gt;
|-&lt;br /&gt;
||07:31&lt;br /&gt;
||We get the same '''pdf '''output without any error. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:36&lt;br /&gt;
||This means our new '''standard stylepackage''' is working correctly.&lt;br /&gt;
|-&lt;br /&gt;
|| 07:42&lt;br /&gt;
|| Once we have created our own '''style file''', we can share this with the '''LaTeX community''' too.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:49&lt;br /&gt;
||Upload the created '''style file''' on the '''Comprehensive TeX Archive Network'''&lt;br /&gt;
|-&lt;br /&gt;
|| 07:56&lt;br /&gt;
||Provide proper '''documentation''' and read the guidelines before uploading.&lt;br /&gt;
|-&lt;br /&gt;
|| 08:02&lt;br /&gt;
|| This brings us to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarise. &lt;br /&gt;
|-&lt;br /&gt;
||08:08&lt;br /&gt;
|| In this tutorial we learnt &lt;br /&gt;
&lt;br /&gt;
Write a custom '''style file'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:13&lt;br /&gt;
||Import the custom '''style file '''in a '''LaTeX '''document&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:18&lt;br /&gt;
||Define a '''standard style file''' &lt;br /&gt;
|-&lt;br /&gt;
||08:22&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
&lt;br /&gt;
Identify and make a list of different scenarios where creating a''' style file''' would be helpful.&lt;br /&gt;
|-&lt;br /&gt;
|| 08:31&lt;br /&gt;
|| The video at the following link summarises the Spoken Tutorial project. &lt;br /&gt;
&lt;br /&gt;
Please watch it. &lt;br /&gt;
|-&lt;br /&gt;
|| 08:39&lt;br /&gt;
|| The Spoken Tutorial Project Team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us. &lt;br /&gt;
|-&lt;br /&gt;
|| 08:49&lt;br /&gt;
|| Please post your timed queries in this forum&lt;br /&gt;
|-&lt;br /&gt;
|| 08:53&lt;br /&gt;
|| Spoken Tutorial Project is funded by MHRD, Government of India. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:59&lt;br /&gt;
|| The script is contributed by Arun, FOSSEE Summer Fellow 2019&lt;br /&gt;
&lt;br /&gt;
And this is Praveen from IIT Bombay signing off.  Thanks for joining. &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>PoojaMoolya</name></author>	</entry>

	</feed>