Showing posts with label Kile. Show all posts
Showing posts with label Kile. Show all posts

Thursday, April 27, 2017

File `etoolbox.sty' not found. ^^M

C: 5th February 2017M, Sun. / 9 Jamadilawal 1438H, Mon. [Ubuntu 16.04]
P: 27th April 2017M, Thu. / 1 Syaaban 1438H, Fri. [Ubuntu 16.04]
U:

Assalamualaikum. After 'the move', with the new system in place and everything a clean install, this is the second noticeable problem i came across. What happened was, i tried to compile a LaTeX document in Kile and was issued this error, and see Pic 1:
./pantun.tex:53:File `etoolbox.sty' not found. ^^M

Pic 1 - The etoolbox error.


Read about 'the move', here:
The move to Ubuntu 16.04
http://ubuntudigest.blogspot.my/2016/12/the-move-to-ubuntu-1604.html

Read the definition of clean install, here:
http://lookup.computerlanguage.com/host_app/search?cid=C999999&term=clean+install

It seems someone else faced the same LaTeX build/compile error, which also happened after upgrading their Ubuntu system:
TeX problem
https://ubuntuforums.org/showthread.php?t=2349984
In that thread, someone mentioned texlive-latex-extra package.

A search in Ubuntu Software turned-up no etoolbox (see Pic 2) nor texlive package (see Pic 3). Weird, because Ubuntu Software is where you go to to find and fulfill all your Ubuntu needs. And it's where i, previously (before 'the move'), find my LaTeX-related packages.

Pic 2 - Ubuntu Software. No etoolbox package.


Pic 3 - Ubuntu Software. No texlive package.


If
Androidians find their apps in the Play Store, and
Appleians find their supply in iTunes, then
Ubuntunians find theirs in Ubuntu Software.

If the package is not in Ubuntu Software, then where is it?
-- The second place to go to is Synaptic Package Manager.

This post is divided into four parts:
Part A: Install Synaptic Package Manager
Part B: Install etoolbox
Part C: Test the installation
Part D: Note



Part A: Install Synaptic Package Manager

In previous versions of Ubuntu, Synaptic Package Manager came installed along with the Ubuntu system. But starting from whatnumber, Synaptic had to be installed on your own.

Note for 11.10 release and above

Synaptic is no longer installed by default in Ubuntu 11.10, however it is still useful in some situations.

Source: SynapticHowto
https://help.ubuntu.com/community/SynapticHowto

If you already have Synaptic Package Manager present in your system, skip this part and proceed to the next part.

If you don't have Synaptic Package Manager present in your system, proceed with this part.


1. Load Ubuntu Software.


1. Click the Dash icon in the Launcher.


2. In the search field, type in: ubuntu software


3. Click the Ubuntu Software icon.

See Pic 4.

The loaded Ubuntu Software window looks something like Pic 5.

Pic 4 - Launching Ubuntu Software.


Pic 5 - Ubuntu Software, loaded.
(Two separate screenshots were stitched to make this picture.)


Pic 6 - The Ubuntu Software version.


Read about launch, load, here:
never say
http://lookup.computerlanguage.com/host_app/search?cid=C999999&def=6e6576657220736179.htm

Read about dialog box, here:
http://lookup.computerlanguage.com/host_app/search?cid=C999999&term=dialog+box

Read about window, here:
http://lookup.computerlanguage.com/host_app/search?cid=C999999&term=window


2. Search for the Synaptic Package Manager package.

In Ubuntu Software, in the search field, type in: synaptic

See Pic 7.

Pic 7 - Ubuntu Software. Searching for the Synaptic Package Manager package.


3. Install the Synaptic Package Manager package.


1. To read the package description, simply click the package in the filtered list. See Pic 8.


2. To install the package, click the Install button. See Pic 7 and Pic 8.


3. The Authenticate dialog box will appear. Fill-in your password in the Password field, then click the Authenticate button. See Pic 9.

Pic 8 - Ubuntu Software. More info about the Synaptic Package Manager package.


Pic 9 - The Authenticate dialog box. Authenticate before installing the package.


4. Close Ubuntu Software.

Once the installation is completed, you can close Ubuntu Software.



Part B: Install etoolbox

5. Load Synaptic Package Manager.


1. Click the Dash icon in the Launcher.


2. In the search field, type in: synaptic


3. Click the Synaptic Package Manager icon.

See Pic 10.


4. The Authenticate dialog box will appear. Fill-in your password in the Password field, then click the Authenticate button. See Pic 11.

The loaded Synaptic Package Manager window looks something like Pic 12.

Pic 10 - Launching Synaptic Package Manager.


Pic 11 - The Authenticate dialog box for Synaptic Package Manager.


Pic 12 - Synaptic Package Manager, loaded.


Pic 13 - The Synaptic Package Manager version.


6. Search for the etoolbox package.


1. In the Synaptic Package Manager window, click the Search button.

The Find dialog box will appear.


2. In the Find dialog box,

i. in the Search field, type in: etoolbox

ii. In the Look in list, choose: Description and Name

iii. Then click the Search button.

See Pic 14.

The list will be updated with the search results.

Pic 14 - Synaptic Package Manager. Searching for the etoolbox package.


7. Install the etoolbox package.


1. In the Synaptic Package Manager window, in the All section, click etoolbox.


2. In the Package column, click the etoolbox package.

The package description will be displayed in the right-bottommost section of the window.


3. In the S column, click the box for the etoolbox package.

A menu will appear.


4. In the menu, click the Mark for Installation option. See Pic 15.

The synaptic dialog box will appear. See Pic 16.

Pic 15 - Synaptic Package Manager. Marking the etoolbox package for installation.


5. In the synaptic dialog box, click the Mark button. See Pic 16.

The list of marked packages in the Synaptic Package Manager window will be updated. See Pic 17.

Pic 16 - The synaptic dialog box. Marking additional packages.


6. In the Synaptic Package Manager window, click the Apply button. See Pic 17.

The Summary dialog box will appear. See Pic 18.

Pic 17 - Synaptic Package Manager. The updated list of marked packages for installation.


7. In the Summary dialog box, click the Apply button. See Pic 18.

The Downloading Package Files dialog box will appear. See Pic 19.

Allow some time for the package to be downloaded depending on your Internet speed, and installed.

Installed packages have a green box in the S column. See Pic 20.

Pic 18 - The Summary dialog box.


Pic 19 - The Downloading Package Files dialog box.


Pic 20 - Synaptic Package Manager. The marked packages are now installed.


8. Close Synaptic Package Manager.

Once the installation is completed, you can close Synaptic Package Manager.



Part C: Test the installation

9. Load your LaTeX editor.

I use Kile.

In case you want to use Kile but can't find it in your system, then you will need to install Kile first. Kile doesn't come installed with Ubuntu. You will have to install it yourself.


1. Click the Dash icon in the Launcher.


2. In the search field, type in: kile


3. Click the Kile icon.

See Pic 21.

The loaded Kile window looks something like Pic 22.

Pic 21 - Launching Kile.


Pic 22 - Kile, loaded.


Pic 23 - The Kile version.


10. Compile your document.


1. Load your document.


2. Compile your document. See Pic 24.

I use XeLaTeX.

The etoolbox error should be gone and your document compiled successfully. See Pic 25.

Pic 24 - Kile. Compiling the document.


Pic 25 - The etoolbox error is gone.



Part D: Note

Notice the [XeLaTeX] failed to start 'error' in Pic 1 and Pic 25?

This is a separate problem altogether. At this point of this post, while trying to document the problem (and at the same time troubleshoot it), i somehow stumbled upon the solution. Although the 'error' is solved and now gone, I'm not going to re-do the pictures, so i will leave things as it is.


Alhamdulillah.

Thursday, February 12, 2015

[Kile] Error arising from \usepackage[latin]{babel}

C: 4th February 2015M, We / 14 Rabiulakhir 1436H, Ra. [Ubuntu 14.04]
P: 12th February 2015M, Th / 22 Rabiulakhir 1436H, Kh. [Ubuntu 14.04]
U:


Assalamualaikum warahmatullah.

The error is shown in Step 6.

There are three parts to this post:
- Part A: Backtracking:
- Part B: How to solve:
- Part C: For the curious minds:

This post was written while i was using Kile version 2.1.3 (see Pic 3) on Ubuntu 14.04.



Part A: Backtracking:

Replicating roughly what i did before running into the problem.

1. Assuming you already have Kile installed, run Kile. See Pic 1.

That is how Kile looks once loaded, see Pic 2.

Pic 1 - Starting Kile.


Pic 2 - Kile, loaded and empty.


Pic 3 - The About Kile dialogue box. Kile version.


2. Create a new *.tex file.

From the menu bar, click File > New. See Pic 4.

In the New File - Kile dialogue box, select:
i - Document Type: LaTeX Document
ii - Template: Empty File
iii - Click the OK button.
See Pic 5.

That is how a new *.tex file looks once created, see Pic 6.

Pic 4 - Creating a new *.tex file. Menu bar.


Pic 5 - Creating a new *.tex file. The New File - Kile dialogue box.


Pic 6 - A newly created *.tex file.


3. Copy the "complete example code" from here:
http://tex.stackexchange.com/a/226367

... and paste it into the newly created *.tex file.


4. Save the *.tex file.

From the menu bar, click File > Save As... . See Pic 7.

In the Save File - Kile dialogue box:
i - Give the *.tex file a location (Places), and
ii - a Name.
iii - Then click the Save button.
See Pic 8.

If you try to build the code without saving it first, Kile will prompt you to save the *.tex file:
[PDFLaTeX] Please save the untitled document first.
... and a Save File - Kile dialogue box will appear. See Pic 9.

Pic 7 - Saving the *.tex file for the first time. Menu bar.



Pic 8 - Saving the *.tex file for the first time. The Save File - Kile dialogue box.


Pic 9 - Prompt arising from building before the first save.


5. Build using your preferred engine. I used PDFLaTeX.

From the menu bar, click Build > Compile > PDFLaTeX. See Pic 10.

Pic 10 - Building the code using PDFLaTeX.


6. The following will take place:
i - this error will appear in the Log and Messages window, see Pic 11:
/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty:329:Package babel Error: You haven't specified a language option ...ry to proceed from here, type x to quit.}

ii - the babel.sty file will appear. See Pic 12.

iii - these will appear in the Output window: (you'll need to do some scrolling to find them)

(a) See Pic 13.
! Package babel Error: Unknown option `latin'. Either you misspelled it
(babel)                or the language definition file latin.ldf was not found.

(b) See Pic 14.
! Package babel Error: You haven't specified a language option.

The Log and Messages window and Output window are at the bottom of the Kile window. See Pic 6.

Pic 11 - Kile. Log and Messages.


Pic 12 - Kile. babel.sty.


Pic 13 - Kile. Output. (a)


Pic 14 - Kile. Output. (b)


7. The errors in Step 6 stems from this line of code in the *.tex file:
\usepackage[latin]{babel}

There is nothing wrong with this code. It's just that a required LaTeX package is missing.


8. I'm not sure if Kile:
- has an auto-update-after-installing-packages-while-Kile-is-running feature, or
- has an update-after-installing-packages-while-Kile-is-running button, or
- needs to be closed before installing any packages.

From the old days of using Windows *ahem*, i chose to terminate Kile before proceeding to Part B.



Part B: How to solve:

9. Run Ubuntu Software Center. See Pic 15.

That is how Ubuntu Software Center looks once loaded, see Pic 16.

Pic 15 - Starting Ubuntu Software Center.


Pic 16 - The Ubuntu Software Center.


Pic 17 - The About Ubuntu Software Center dialogue box. Ubuntu Software Center version.


10. Finding the package.

In the search field, type-in:
latex babel latin

The filtered packages will be auto-listed. See Pic 18.

Pic 18 - Ubuntu Software Center. Searching for the package.


11. Installing the package.

i - Select the package named, see Pic 18:
TeX Live: Other European languages
texlive-lang-european

ii - Either:

(a) - Click the More Info button to read the package description, then click the Install button. See Pic 19. Or,

(b) - Click the Install button to install straight-away. See Pic 18.


iii - The Authenticate dialogue box will appear. Key-in your Password, then click the Authenticate button. See Pic 20.

That is how your package looks once installed. See Pic 21.

Now Ubuntu Software Center can be closed.

Pic 19 - Ubuntu Software Center. The package description. Before installing.


Pic 20 - The Authenticate dialogue box.


Pic 21 - Ubuntu Software Center. The package description. After installing.


12. Run Kile. See Step 1.

I don't know how yours is setup. Mine loads the last document(s) that were open before Kile was closed.

If it doesn't load the code you saved in Step 4, from the menu bar, click File > Open Recent > then find your file in the list of recent files.

If your file is not in the list of recent files, from the menu bar, click File > Open... . In the Open Files - Kile dialogue box, locate your file then click the Open button.


13. Like in Step 5, build the code.

The error should be gone by now. See Pic 22.

Pic 22 - No more errors.



Part C: For the curious minds:

(a) The screenshot of the produced PDF, with the Step 7 code present (code was uncommented), is shown in Pic 23.

The screenshot of the produced PDF, with the Step 7 code absent (code was commented), is shown in Pic 24.


(b) The same document can be built using the XeLaTeX engine and the polyglossia package:

i - comment the Step 7 code. See Pic 25.

ii - add these lines in the preamble, see Pic 25:
(credit: http://tex.stackexchange.com/a/67962)
\usepackage{polyglossia}
\setmainlanguage{latin}

iii - then build the code using XeLaTeX. See Pic 26.

The screenshot of the produced PDF is shown in Pic 27.


Screenshots in Pic 23, Pic 24, and Pic 27:
- were taken at 60% zoom,
- shows the first page of the PDF, which is the table of contents (ToC).

Pic 23 - Screenshot of the produced PDF, with the Step 7 code present (code uncommented).


Pic 24 - Screenshot of the produced PDF, with the Step 7 code absent (code commented).


Pic 25 - Setting-up the code.


Pic 26 - Building the code using XeLaTeX.


Pic 27 - Screenshot of the produced PDF, with the code in Pic 25 present.



Alhamdulillah.