Sunday, June 17, 2012

How to convert files from PDF to Microsoft Word, online

27 Rejab 1433H, Ah.

Assalamualaikum. For the second proofread, the thesis had to be in a Microsoft Word format which made me do wish it is possible to compile the LaTeX file directly into a Microsoft Word format instead of having to convert file formats. There is a conversion method that uses the Terminal but for reasons i've no idea of, it didn't work for my thesis.

So the file conversion was done online instead. Of the many websites i've tried, this is the one, see Pic 1, i suggest:
Convert PDF to Word
(http://convertpdftoword.net/)

Pic 1 - Screenshot of the website for converting files online, from PDF to Microsoft Word. Convert PDF to Word -- Convert PDF to Doc -- Convert online PDF to Word. (http://convertpdftoword.net/)


Counting from the title page to the last page, the thesis is 115 pages thick at the moment. The main contents (abstract and chapters) are about 60+ pages while the rest are the supporting contents (appendixes, bibliography, etc). In the form of a PDF file, the thesis takes up 20.8 Mb of disk space.

The website managed to convert my bulky document very well. When i opened the converted document in LibreOffice Writer, it looked almost exactly like the original document. The tables were garbled though. I don't know how it will look when opened in Microsoft Word. And the converted file was only 6.9 Mb.

Here's how to convert the file format...


1. Go to the Convert PDF to Word (http://convertpdftoword.net/) website.


2. In my FireFox browser the Choose File button is truncated (see Pic 1) but not in Chromium.

Click the Choose File button. In my case i clicked the field beside the button.

A File Upload window as seen in Pic 2 pops-up.

Pic 2 - Refer Step 2 and Step 3. The File Upload window.


3. In the File Upload window, locate your PDF file. Then click the Open button. See Pic 2.


4. Click the Convert and Download button. See Pic 3.

Leave the website to process (upload and convert) your file. This process might take some time. See Pic 4.

Pic 3 - Refer Step 4. Clicking the Convert and Download button to initiate the upload and file format convertion process.


Pic 4 - Refer Step 4. Processing the document.


5. Once the whole process is finished, click the Download button. See Pic 5.

The Opening UploadedFile_###.doc window will appear. See Pic 6.

Pic 5 - Refer Step 5. Downloading the converted file.


6. In the Opening UploadedFile_###.doc window, select the Save File option, then click the OK button. See Pic 6.

Pic 6 - Refer Step 6. Saving the converted file.


7. Once the download is completed, open the converted file in LibreOffice Writer to check and see the results.


Wassalam.

Sunday, May 6, 2012

How to use XeLaTeX in Kile + change the font to Arial

14 Jamadilakhir 1433H, Ah.

Update: 8th May 2012, Se.

Assalamualaikum. By preparing a research proposal, my husband is learning how to use LaTeX in Kile. He is starting from scratch and wants to use the Arial font instead of the default font, Computer Modern.

i myself don't know how and never thought of such a thing. After a late evening of much ask and answer, try and error, tease and jabber, google and sigh, eat and idle, and much more... Here's how to implement the Arial font in a LaTeX output document (referring to the PDF file).

You'll notice the difference with the Panel in a few screenshots because i was working on my husband's laptop ;). The fine editing was done on my laptop later on.



Part A: Obtaining the Arial font

1. Run Ubuntu Software Center.


2. In the search field, type-in the search term "arial". The results will auto-filter. See Pic 1.


3. Select the result: Installer for Microsoft TrueType core fonts (ttf-mscorefonts-installer). See Pic 1.

If you want to install straightaway-no-delays, click the Install button.
* In Pic 1, seeing that i have already installed these fonts, the Install button has turned into the Remove button.

If you want to see the available Add-ons, click the More Info button. See the Add-ons, shown in Pic 2. When you are ready to install, click the Install button.

Pic 1 - Refer Step 2 and Step 3. Searching for the Arial font installer in Ubuntu Software Center.


Pic 2 - Refer Step 3. The Add-ons for the Installer for Microsoft TrueType core fonts (ttf-mscorefonts-installer).


4. An Authenticate window will appear prompting for your password. Key-in your password in the Password: field, then click the Authenticate button. See Pic 3.

Pic 3 - Refer Step 4. Password prompt to authenticate the action.


5. After downloading but before installing the fonts, a EULA(?) window will appear. To accept the terms and conditions, put a tick in the box. Then click the Forward(?)/Next(?)/OK(?)* button.

* Hoping to make a screenshot of the EULA(?) window, i removed the fonts (using the Remove button in Pic 2) then re-installed (using the Install button) but the EULA window did not appear on the second install :-\. Sorry.


6. Once the fonts are installed, the Install button will turn into the Remove button. See Pic 1 and Pic 2.



Part B: Installing the xltxtra package

Without the xltxtra package, you will get one of the errors mentioned in Step 16.

If you already have this package, then skip to Step 12.

If you do not have this package yet, then proceed to Step 7.


7. Run Ubuntu Software Center.


8. In the search field, type-in the search term "xltxtra". The results will auto-filter. See Pic 4.


9. Select the result: TeX Live: XeTeX packages (texlive-xetex). See Pic 4.

If you want to install straightaway-no-delays, click the Install button.

If you want to see the list of XeTeX packages and available Add-ons, click the More Info button. When you are ready to install, click the Install button.

Pic 4 - Refer Step 9. Searching for the xltxtra package installer in Ubuntu Software Center.


10. An Authenticate window will appear prompting for your password. Key-in your password in the Password: field, then click the Authenticate button. See Pic 3.


11. Once this package is installed, the Install button will turn into the Remove button. See Pic 5.

Pic 5 - Refer Step 11. The Install button is now the Remove button.



Part C: Producing document with Arial font

12. Run Kile.
i'm not sure if it works the same in other editors, though giving it a try shouldn't hurt :).


13. Create a new document. Click File > New. See Pic 6.

Pic 6 - Refer Step 13. Creating a new document in Kile.


14. A window* will appear. See Pic 7.

* The pop-up windows on my husband's laptop doesn't seem to have a title bar. Checking on my laptop, the window is New File -- Kile.

Under the Document Type section, select LaTeX Document.

Under the Template section, scroll to the end then select Xelatex.

Then click the OK button.

An Untitled document with contents is automatically created. See Pic 8.

Pic 7 - Refer Step 14. The New File -- Kile pop-up window. Creating a new LaTeX document using the XeLaTeX template.


Pic 8 - Refer Step 14. Screenshot of the newly created XeLaTeX template titled Untitled in Kile.


15. Save your document. If you don't save now, you will still need to do so and will be prompted with:
[QuickBuild] Please save the untitled document first.
when building/compiling later on. See Pic 9.

Pic 9 - Refer Step 15. Save first, only then can build.


Click File > Save As... .

In the pop-up window*, see Pic 10:

* Again, no title bar. Checking elsewhere, it's the Save File -- Kile window.

Under the Places section, locate where on your hard-disk do you want to save this document.

In the Name: field, give it a name.

Then click the Save button.

i named mine xeletex test  (i know, i misspelled it out of excitement :P) and placed it on the Desktop.

Pic 10 - Refer Step 15. Give the document a name and place.


16. If you were to click Build > QuickBuild now, among the many possible errors you might encounter are:

./test:5:File `xltxtra.sty' not found. ^^M
[PDFLaTeX] 1 error, 0 warnings, 0 badboxes
See Pic 11. This error is because the package is not installed in the system.

In order to eliminate this error, proceed to Part B. After Part B is completed, proceed to Step 17.

Pic 11 - Refer Step 16. Error because the xltxtra package is not installed.


*** this package currently works only with XeTeX ***
See Pic 12. i'm guessing you will get this error because of the QuickBuild. In order to eliminate this error, proceed to the next step.

Pic 12 - Refer Step 16. Error probably because of the QuickBuild.


17. In the document, change the font from Linux Libertine O to Arial.

Then click Build > Compile > XeLaTeX, see Pic 13. Alternatively, the XeLaTeX shortcut button is shown in Pic 14.

This time there supposedly should be no more errors, see Pic 15:
[XeLaTeX] 0 errors, 0 warnings, 0 badboxes
[XeLaTeX] Done!

Pic 13 - Refer Step 17. Compiling using XeLaTeX.


Pic 14 - Refer Step 17. The XeLaTeX shortcut.


Pic 15 - Refer Step 17. Done! To copy+paste the content you see here, go to Part D.


18. To see the output:

Either view the PDF file straightaway. Locate the file at the same place where you saved the XeLaTeX document when in Step 15.

Or

Click Build > View > ViewPDF, see Pic 16. Alternatively, the ViewPDF shortcut button is shown in Pic 17.

Pic 16 - Refer Step 18. Viewing the output file using ViewPDF.


Pic 17 - Refer Step 18. The ViewPDF shortcut.



Part D: It's Arial, alright!

Some might argue that the font in use is not Arial but a clone or a close mimic of it. This article shows the differences between the Helvetica, Arial, and Grotesque fonts: How to Spot Arial.

Now that you know how the "a" of the Arial font is supposed to look like, Pic 18 is my proof that the font used in Part C is really Arial.

Pic 18 - The document in Okular at 250% zoom.


Here's the content of the file seen in Pic 15:

\documentclass[a4paper,10pt]{article}
%\documentclass[a4paper,10pt]{scrartcl}

\usepackage{xltxtra}

\setromanfont[Mapping=tex-text]{Arial}
% \setsansfont[Mapping=tex-text]{DejaVu Sans}
% \setmonofont[Mapping=tex-text]{DejaVu Sans Mono}

\title{Arial font}
\author{}
\date{}

\begin{document}

\maketitle

\Huge{Aa Bb Cc Dd Ee Ff \\
Gg Hh Ii Jj Kk Ll \\
Mm Nn Oo Pp Qq Rr \\
Ss Tt Uu Vv Ww Xx \\
Yy Zz 0 1 2 3 \\
4 5 6 7 8 9}

\end{document}

Still not convinced?

Open the generated PDF file.

Click File > Properties, see Pic 19.

In the Properties pop-up window, under the Fonts tab is the list of embedded fonts, see Pic 20. The Arial font is embedded under its "postscript name" as ArialMT. Read here about Arial and Arial MT: Arial being changed to ArialMT in PDF.

Convinced? :)

Pic 19 - Summoning the properties.


Pic 20 - Arial font embedded in PDF document.



Here, i would like to thank the person who taught me the basics of LaTeX, Dr. Bakri Adam from Faculty of Science, Universiti Putra Malaysia (UPM).

Tuesday, May 1, 2012

List of programs to install/uninstall after a clean wipe

8 Jamadilakhir 1433H, Isnin.

Update: 13th Nov 2012M, Se. 20th June 2012M, Ra. 9th May 2012, Ra. 5th May 2012, Sab.

Assalamualaikum. Often i find myself writing on paper the list of programs i need to reinstall after a clean wipe (see post here, My experience upgrading to 12.04 then downgrading to 11.10), some other time just memorizing or writing on a whiteboard. After that install the list is usually lost or obsolete.

The easy way is to make an accessible and rewritable list. This is my list of programs to be installed/uninstalled in case of another upgrade/downgrade/format. Some programs are necessary, some are optional.


To install...
  • Audio Tag Tool

  • GIMP Image Editor

  • Chromium Web Browser

  • Inkscape Vector Graphics Editor

  • Kile, and Okular
TeX Live: LaTeX supplementary packages (texlive-latex-extra) via Ubuntu Software Center

  • KRuler


  • Screen Ruler

  • Synaptic Package Manager
cups-pdf

  • VLC media player

  • XSane Image scanning program


To uninstall...
  • Gwibber Social Client

  • AisleRiot Solitaire

Monday, April 30, 2012

My experience upgrading to 12.04 then downgrading to 11.10

7 Jamadilakhir 1433H, Ahad.

Update: 5th May 2012, Sa.

Assalamualaikum. Last Friday (27th April 2012M), i tried to upgrade my laptop from Ubuntu 11.10 Oneiric Ocelot to Ubuntu 12.04 Precise Pangolin. Somewhere in the upgrade process, the system froze. Ctrl+Alt+Del didn't work. Alt+F2 didn't work. The only thing that worked was a force shutdown. Affects of that action showed after the login screen (at the next and succeeding startups); a black screen and cursor. No menus, no Panel. Just a black screen and a cursor.

My husband on the other hand had just formatted his laptop, switching from Windows to Ubuntu. He was much luckier in the upgrade than me. He managed to upgrade his laptop to Ubuntu 12.04 albeit with much difficulty which was probably caused by Nvidia graphics driver. Graphics on his laptop is a gamer's repellent; the resolution is low.

Update: 5th May 2012, Sa. He has solved his graphics driver problem by installing a beta driver obtained from Nvidia's website.

Seeing that Ubuntu 12.04 has problems with Nvidia, he suggested me to downgrade from 12.04 to 11.10. Both our machines run Nvidia graphic cards by the way.


Downgrading
Before the downgrade, to be safe, i made copies of my work; my husband rebooted using the Ubuntu 11.10 Live CD to access the system. The problem is i can't find my files in the Documents folder, Downloads folder, Music folder, Pictures folder, and Videos folder, also files on the Desktop. i've been searching in folders but couldn't find the contents of those folders. My husband says the files are there somewhere but doesn't know the location.

So, what's the directory to those folders? Or are the files in those folders gone? ... which means about 6 months worth of screenshots and downloaded files are gone for good.

With time running out, menus not loading, graphics problem and all, formatting was the best way out of the problem. i surrendered this task to my husband ;)


Backup
Luckily way before the upgrade i had run monthly backups, from browser bookmarks to browser settings to files on the Desktop to fonts in the system. The only thing to do is a restore. My latest backup was on 26th April. Thus anything between the last backup and recent upgrade/downgrade are gone. Of all the things, the only folder i didn't backup was the Downloads folder :'-( and of course the Trash folder.


After Downgrading
Now am back to Ubuntu 11.10. As seen in Pic 1, there are 398 updates. Programs such as Kile, GIMP, etc need to be re-installed. The upgrade/downgrade coupled with slow Internet connection, it's almost 4 days of downtime... and increasing.


Pic 1 - i kid you not... 398 updates!

Sunday, April 1, 2012

Jailbreaking iPhone 3G with RedSn0w to makeway for PwnPlayer -- a Ubuntunian attempts

8 Jamadilawal 1433H, Ju.

Assalamualaikum.

Seeing that this post is sort of wordy, i've divided it into chapters to lighten up the read =)


Prologue

This post is about my experience with handphones, iOS, jailbreaking, Windows, and Ubuntu, that went on discontinuously from about Jumaat petang (Friday afternoon) until Subuh prayers the next day.

i'm not a hacker nor cracker. i'm just an ordinary user who uses others' workarounds or solutions and try to improvise where/whenever i can... at least by explaining in detail the steps that work for me =).

The jailbreak attempts deducted in total about RM30 of prepaid credit when my sim card was inside the iPhone for activating after restoring. When jailbreaking next time, either use a post-paid sim card with data plan or find another way to activate without a sim card.

And my courier thinks i've just upgraded to a new smartphone :-\. See Pic 1.

The final results?
See Pic 11 and Pic 12 =)

Pic 1 - Screenshot of the SMS from my courier.


Chapter 1: The settings

i "inherited" my husband's old iPhone 3G after he bought a Samsung Galaxy Nexus and at the same time gave away his old Nokia 5800 XpressMusic to someone who needed it more than me.

If you're a little confused which handphone came after which: the old Motorola Razr 3 was replaced by the Nokia 5800 XpressMusic, which was replaced by the iPhone 3G, and later by the Samsung Galaxy Nexus.

The Nokia was used as an MP3 player because of its external storage space, a massive 8 Gig compared to my phone's 1 Gig. Without the Nokia, the iPhone is forced to serve as the replacement.

However, the problem with iPhone for Ubuntunians is transferring songs from the computer to the phone. Without using iTunes, the iPod app (not to be confused with the iPod devices) won't detect songs transferred to the phone using the simple Copy+Paste method; the same transfer method i used with the Nokia.

i had to search for a way to transfer songs from my laptop to the phone while at the same time bypassing iTunes... because i'm running Ubuntu! Otherwise i'd have to purchase a brand new MP3 player and turn the iPhone into a pricey paperweight. The search pointed to PwnPlayer, an app almost as good as the iPod app.

As mentioned in this previous post: How to solve Flash problems on Ubuntu 11.10 Oneiric Ocelot, the new laptop has dual boot; Ubuntu and Windows 7. Funny that i had forgotten totally about the dual boot. But i just don't feel like running back to using Windows just because i can't find an alternative in Ubuntu.


Chapter 2: The problems

The iPhone was previously jailbroken with a version of whited00r, which made the App Store unaccessible through the App Store button but accessible through Safari. -- Tedious for me. Something needed to be done about this. And the simplest i can think of is: update then jailbreak with something else.

But i've never jailbreaked + i don't know how to!

And my husband has forgotten how.

During the jailbreak learning-time i managed, successfully, and many times too, to brick the iPhone without realizing... until i read much more about bricking =p

The funny thing is: PwnPlayer was long dead! The website domain exists but without content. The app isn't listed in App Store nor is it in Cydia. -- Something i found out after many hours learning how and trying to jailbreak the iPhone just to install PwnPlayer.

=======
Update: 8th Apr 2012. The player is listed in Cydia (apparently i didn't wait long enough for the search results to load) but not in App Store. Sorry for the mistake.
=======

=======
Update: 3 Zulkaedah 1433H / 19 Sep 2012M, Ra.
I got it right the first time; PwnPlayer is not listed in the App Store nor Cydia. Thus to install the player, you'd have to get the app from elsewhere. See Chapter 4.

So, how did i make repeated mistakes there?
-- PwnPlayer will appear listed in Cydia after the player's installation.

In other words:
(i) Before install: PwnPlayer is not listed in the App Store nor Cydia.
(ii) Installed PwnPlayer.
(iii) After install: PwnPlayer is not listed in the App Store but is listed in Cydia.

Sorry, again.
=======


Where did i learn about PwnPlayer in the first place?
From a 2009 article, here: 6 Ways To Sync Music To Your iPhone Without iTunes.


Chapter 3: The Jailbreaking solution

In order for jailbreaking, the laptop had to be rebooted to switch from Ubuntu to Windows. While waiting for iTunes to download, i read then followed some random jailbreak article at first.

Then followed how to jailbreak, here:
... at the moment the bookmarked page is in Windows, not Ubuntu...

i should have followed how to jailbreak, here:
HOW TO: Jailbreak iOS 4.2.1 iPhone 4, 3gs, 3g, iPad, iPodTouch with Redsn0w 0.9.6b4

The iPhone now runs firmware 4.2.1 which is a bit slow but not as bad as my previous failed jailbreak. The screen flickered whenever i swiped or opened apps. Two reasons for the flickering i can think of but unsure which is the cause are:
- used IPSW 4.1 instead of 4.2.1 when the phone was already updated to 4.2.1, or
- selected Enable multitasking

Thanks to the Dev Team for redsn0w.


Chapter 4: The PwnPlayer solution

i followed how to install PwnPlayer, here:
PwnPlayer Lite Download for iOS 4.0+
using the iFile method. Wasn't successful with the OpenSSH method.

There are lacking features, probably because it's a lite version:
  • the player has no loop feature. Once you've reached the end of the last song, you'll have to manually restart the playlist.
  • unable to continue playing in the background like on the Nokia.

Thank you to Eric Castro for PwnPlayer. The player is great!


Chapter 5: An additional solution

One thing with PwnPlayer that made hopes sunk was: Why some songs played for a few seconds then the app closes suddenly but other songs played on? What are the differences between those two "types" of songs?

A hunch brought to this solution which works for me but might or might not work for others. By now i've already rebooted again to switch from Windows to Ubuntu.

1. Any tag editor supposedly can do the job. i used Audio Tag Tool.

Referring to Pic 2, to install Audio Tag Tool:
i. Run Ubuntu Software Center.
ii. In the search field, type-in "audio tag tool".
iii. To read more about Audio Tag Tool, click the More Info button. To straightaway install, click the Install button.

Notice that once Audio Tag Tool is installed, the Install button will turn into the Remove button.

Pic 2 - Refer Step 1. Searching for Audio Tag Tool in Ubuntu Software Center.


2. After installation is complete, run Audio Tag Tool.


3. In the Working Directory section, locate the folder containing the songs that need fixing. Mine is in the Downloads folder as seen in Pic 3.

Pic 3 - Refer Step 3. Locating the song folder.


4. In the Files section, select the "problematic" song. Refer to Pic 3

The song i'm using is a nasyid by Mishary Rashid Alafasy titled طلع البدر علينا مشاري راشد العفاسي (Talaa al-badru alaina) which loosely translates as "The full moon has dawned upon us".

To listen to another version of Talaa al-badru alaina along with Malay translation, go here: Selawat Badar oleh Zulkarnain Mat Nor.


5. In the Tag section, select the Encoded by field.

Decide either to:

(a) remove the field, or
i. To remove the field, click the Remove button (B in Pic 3). The Encoded by field will be removed.

(b) edit the field's text.
i. To edit the field, click the Edit button (A in Pic 3).
ii. Referring to Pic 4, in the Edit ID3 Field window; in the Text field, delete the texts. Then click the OK button. The Encoded by field will remain but with no text.

Pic 4 - Refer Step 5(b). Editing the text for the Encoded by field.


6. Click the Save Changes button. See Pic 5.

This step is indifferent to whichever action you chose in Step 5.

Pic 5 - Refer Step 6. Saving the changes.


7.  Transfer the song from your computer to your song folder in the iPhone via simple Copy+Paste. Then run PwnPlayer. By now the song should play without causing the app to close.

i use the default directory set by PwnPlayer. See Pic 6 (directory in PwnPlayer), Pic 7 (folder in iPhone), and Pic 8 (playing the song mentioned in Step 4).

Pic 6 - Refer Step 7. Screenshot of the song folder directory in PwnPlayer.


Pic 7 - Refer Step 7. Screenshot showing the Music folder in iPhone. Contents of the folder are shown in Pic 9.


Pic 8 - Refer Step 7. Playing the nasyid.


Chapter 6: Note

Simply put, songs transferred to the iPhone without using iTunes will not be detected by the iPod app; the songs are there but not recognized.

However, songs transferred as taught in Step 7 (Copy+Paste) will be detected and played by PwnPlayer as long as you point it to the corresponding folder.

As can be seen in Pic 9, there are 9 song files in the Music folder in the iPhone. But none of the songs are recognized by the system as can be seen by the number of Songs in Pic 10.

Pic 9 - Content of the Music folder in iPhone. The folder itself is shown in Pic 7.


Pic 10 - No songs are picked-up by the system although the song files exist in the folder. This happened because the files were not transferred using iTunes.


Epilogue
The iPhone 3G is now running jailbroken firmware 4.2.1 and is installed with PwnPlayer Lite v0.1b1 (see Pic 12). Screenshot in Pic 11 shows the PwnPlayer icon =).

Pic 11 - Screenshot of the iPhone's current state. The Player icon launches PwnPlayer.


Pic 12 - Screenshot of PwnPlayer version: PwnPlayer Lite v0.1b1.

Thursday, January 26, 2012

How to solve problem with invisible hatching area fill pattern when exporting from LibreOffice Draw/Writer to PDF

Update: 23 Rejab 1433H / 13th June 2012M, Ra.

Thank you to Dmitriy.Trt for the notice about LibreOffice 3.5.

Previously i did not note the LibreOffice version when i encountered the invisible-hatching problem. Just to note before i go running for LibreOffice 3.5:
the invisible-hatching problem persists in Libre Office 3.4.4.

Note to those running LibreOffice 3.4.4 *like me*:
LibreOffice <= 3.4.4 can not be updated to 3.5.x directly; first, it must be updated to 3.4.5 or uninstalled (fdo#45068)

So it's either:
(a) update LibreOffice 3.4.4. to LibreOffice 3.4.5 or
(b) uninstall LibreOffice 3.4.4 then install LibreOffice 3.5.

=======

2 Rabiulawal 1433H.

Assalamualaikum. Here i am trying to export a drawing created in LibreOffice Draw as a PDF. The PDF file will be used later in my LaTeX document to display pictures nicely.

However, the PDF file of the exported document is missing hatchings at the moment. At first, only one of the many polygons has hatching while the rest appear as polygons filled with nothing but the color white. The hatchings are present in Draw (see Pic 1) but absent in the PDF file (see Pic 2).

Pic 1 - Screenshot of my LibreOffice Draw document with the 'problematic' polygons.


Pic 2 - Screenshot of PDF document at 100% zoom. Notice that the hatching is missing for the "Planar surface" polygon.


I've also tried copying the drawing in Draw, paste it in Writer, then export the document as PDF. Still the hatchings are present in Writer but absent again in the PDF file.

Alhamdulillah, and then a solution. This post is the result of random tries by changing the hatching line color along with the background color, and inspiration from this bug report:
[Libreoffice-bugs] [Bug 34272] New: Hatching area fill pattern does not export to pdf.

Actually, i don't know if this post is a solution for the vanishing-hatching bug, or just a guide on how things work in LibreOffice. Either way, it works in Draw and Writer.


1. Open the LibreOffice Draw document. Screenshot of my Draw document is shown in Pic 1.


2. Right-click on the 'problematic' polygon.

In the right-click menu, click Area.... See Pic 3.

The Area window as shown in Pic 4 will appear.

Pic 3 - Refer Step 2. Highlighting Area... in the right-click menu of the 'problematic' polygon.


Pic 4 - Refer Step 2. The Area window of the 'problematic' polygon.


3. In the Area window, under the Area tab; put a tick in the box beside the Background color.

Then in the drop-down menu below the box, change the color from the default Blue 9 to White.

Then click the OK button. Refer Pic 5.

Pic 5 - Refer Step 3. Activating and changing the Background color.


4. Export again the Draw document as PDF.


5. Open the PDF file to check and see whether the hatchings appear. Insya-Allah, the hatchings will appear this time.



My final drawing looks as shown in Pic 6. If you haven't notice the difference between Pic 1 and Pic 6, the outline for the "Planar surface" polygon is gone in Pic 6.

A screenshot of the PDF document in Pic 6 is shown in Pic 7.

Pic 6 - Screenshot of my LibreOffice Draw document the way i want it to be.


Pic 7 - Screenshot of PDF document at 100% zoom. The PDF of the Draw document in Pic 6. The PDF file will be used later in LaTeX.

Wednesday, November 23, 2011

[LaTeX] How to solve subfig package overriding custom captions in Figures and Tables

26 Zulhijah 1432H.

Here i am writing my thesis using Kile.

Along the way, i need to add three separate figures with its own subcaptions, grouped under one main caption (also known as global caption). Don't understand what i'm saying? See Pic 1.


Pic 1 - See Figure 2.5 in the picture. Three separate figures with its own subcaptions, grouped under one global caption.


To do like Figure 2.5 in Pic 1, i used the subfig package after reading about it here:
WikiBooks > LaTeX/Floats, Figures and Captions > Captions > Subfloats

So i added:
\usepackage{subfig}
to my preamble, which is in the UPMthesisEnglish.tex file.

Wait. What's a preamble and what is UPMthesisEnglish.tex?


A LaTeX preamble is:
"The preamble file defines the style of the document and tells Latex which packages to use, such as packages for including figures."

Source: Chris Paciorek. Latex preamble. Accessed: 23 Nov 2011.

UPMthesisEnglish.tex is the main file of my thesis template and is also where my preamble is. Microsoft Word and LibreOffice Writer users will identify this as the Master document. To know a bit more about the template i'm using, see here, How to set different page margins within the same chapter in LaTeX under Tools.

However, nobody told me the subfig package will override my already existing custom captions for Tables and Figures, or that the package is supposed to be used with the caption package. As a result, all the previously bolded captions in Figures and Tables turn out unbolded, and the vertical spacing between figure and caption was reduced.

After a some searching, here's how to get the custom captions bolded again and at the same time use the subfig package without having to use the caption package. Put this in the preamble:
\usepackage[caption=false]{subfig}

Source: sommerfee's post here, Re: subfig package destroys figure captions. Accessed: 23 Nov 2011.

Then re-Build. Should work by now. As for me, everything is OK except for the altered vertical spacing between figure and caption. Manual tweaking is required suppose :-\