Posts

Showing posts from October, 2014

bclogo package to produce boxed and highlighted text in LaTeX

Image
When we write article, sometime we need to highlight some portion (may be some comment, idea, home task or some hint) to differentiate it from the rest of the article. LaTeX gives us a very good and elegant way to do the job using bclogo package. Here I will describe how to use bclogo package. First you have to load the package using \usepackage[tikz]{bclogo} . And the syntax is as followis: \begin{bclogo}[options]{title} content text \end{bclogo} For example \documentclass{article} \usepackage{lipsum} \usepackage[tikz]{bclogo} \author{Apurba Paul} \title{check boxed minipage} \begin{document} \begin{bclogo}{title} some text \end{bclogo} \end{document} The above code will produce something like this You can also change the background color, shape of the rectangle and the the logo. For example the following code will produce something like the next image: \documentclass{article} \usepackage{lipsum} \usepackage[tikz]{bclogo} \author{Apurba Paul} \title{check boxed m

Using boxedminipage environment in LaTeX

Boxedminipage is an environment that is used in LaTeX to crate a pseudo page environment with border around it in your actual page. Here I am saying how to use it. First import the package using \usepackage{} command in the preamble. \usepackage{boxedminipage} Syntax to use this package is \begin{boxedminipage}{<width_of_the_minipage>} minipage content \end{boxedminipage} This environment can be used if you want to put some thing together but it is spliting up over more than one pages because this create a float, and so the box will not allow to creat page break inside it like figure environment. Also you can use this environment to place some text at the lift or right not extending more than one line. Like we put address, salutation, or header in Letter. If you don't want box around it yo can use minipage environment. Here I am giving a simple example \documentclass{report} \usepackage{boxedminipage} \author{APaul} \title{Example of boxedminipage en

Page no positioning in latex using fancyhdr package.

 We can manually position the page no. in LaTeX using fancyhdr package. To position page no. (or any other thing) in header or footer there are total six position options, left, right and centre in header and footer. The corresponding commands are given in the table bellow position fancy head command left header \lhead right header \rhead centre header \chead left footer \lfoot right footer \rfoot centre footer \cfoot And the page no inserted by the command \thepage . Now suppose I want to insert page no in the left side of each page I can use following code: \documentclass[a4paper, 11pt]{report} \usepackage{amsmath}%just some package not necessary to \usepackage{graphicx}%test this page no. \usepackage{fancyhdr} \pagestyle{fancy} %declaring page style \lhead{\thepage} %page no inserted in left side of header \chead{} \rhead{} \lfoot{} \cfoot{} \rfoot{} \author{Apurba~Paul} \title{Inserting page no in custom position in \LaTeX

Playing online radio in Ubuntu

Image
You can easily play online radios in Ubuntu using Rhythmbox music player. First you have to add the radios to Rhythmbox. You can find you huge no of online radios from the website shoutcast. Here is the step by step instructions. First go to  http://www.shoutcast.com/ . Then search for the radio you want to listen. Now click in the save button and save the link as .pls (play list) file.  Now go to the saved file and open it with Rhythmbox. This will add the radio channel in the radio option in the Rhythmbox. You can right click on the radio channel and change properties like gener, channel name etc as you want (except the channel location).  No just dubble click on the channel and it will start playing the radio channel.  Cheers APaul Source: http://askubuntu.com/questions/142360/finding-stations-for-rhythmbox

-E option to export environment variable to sudoer

Have you ever faced a problem adding ppa (Personal Package Archive) in your computer. If you are getting error like Please check your internet connection then probably the reason is sudo is not able to find proxy setting. This may happen if proxy is only set to .profile or .bashrc file. So to overcome this problem I have already wrote one post before. Here I am showing another option which is bit easier option. Here you have to add -E while running sudo (note: E is in capital letter). So -E option actually preserve the environment option . See the Sudo Manual for more detail. So to add ppa run the following command sudo -E add-apt-repository ppa:<paa_name> This should work now. Cheers APaul Source http://askubuntu.com/questions/212132/i-cant-add-ppa-repository-behind-the-proxy http://www.sudo.ws/sudo/man/sudo.html http://apurbapaul.blogspot.in/2012/09/adding-repository-behind-proxy-using.html