## Posts

Showing posts from August, 2010

### newcommand in LaTeX


But there a lot of caveats :-

LaTeX ignores the…

### Changing the font size of section headings in LaTex

You have several ways to do so:
1.- A direct redefinition of \section:
\makeatletter \renewcommand\section{\@startsection{section}{1}{\z@}%                                   {-3.5ex \@plus -1ex \@minus -.2ex}%                                   {2.3ex \@plus.2ex}%                                   {\normalfont\large\bfseries}} \makeatother
2.- By means of the titlesec package:
\usepackage{titlesec} \titleformat{\section}{\large\bfseries}{\thesection}{1em}{}
3.- By means of the sectsty package:

\usepackage{sectsty} \sectionfont{\large}source : http://www.latex-community.org/forum/viewtopic.php?f=4&t=3245

Now, I would explain the titlesec package a bit more (because it seems easier to me and with more options) :

To change the section fonts with this package put the following lines in the preamble -

\usepackage{titlesec}
\titleformat{\section}{\large\bfseries}{\thesection}{1em}{}

Options available are-

a> Font size -

\normalsize \large \Large \huge \Huge
Increasing size ->

### Script for dictionary lookup

#!/bin/bash
# dictionary v1.5.5 - to dump dictionary outputs from the web. Uses the google dictionary but can be used for any other online dictionary.
# Needs lynx to work.
# by JOnes ( August 16, 2010 )

# ANSI Color -- use these variables to easily have different color
#    and format output. Make sure to output the reset sequence after
#    colors (f = foreground, b = background), and use the 'off'
#    feature for anything you turn on.

initializeANSI()
{
esc=" "

blackf="${esc}[30m"; redf="${esc}[31m";    greenf="${esc}[32m" yellowf="${esc}[33m"   bluef="${esc}[34m"; purplef="${esc}[35m"
cyanf="${esc}[36m"; whitef="${esc}[37m"

blackb="${esc}[40m"; redb="${esc}[41m";    greenb="${esc}[42m" yellowb="${esc}[43m"   blueb="${esc}[44m"; purpleb="${esc}[45m"
cyanb="${esc}[46m"; whiteb="${es…

### Mathematica code

f[n_, x_] := Abs[((1/Pi)^(1/4) Sin[ x])]^2;

Plot[Evaluate@
Table[f[n, x] + n + 1/2, {n, 0, 7}], {x, -4, 4},
Filling -> Table[n -> n - 1/4, {n, 1, 8}]]