Fix for small math symbols in images created using Xfig (LaTeX)

I use Xfig for making diagrams in my LaTeX documents. It is very useful, particularly if you want to use math symbols in the diagrams. It has the feature of supporting LaTeX commands. Inkscape also has a similar capability, but somehow I find that diagrams with Xfig look neater. Moreover, in Inkscape, the math symbols are added as images and not text, unlike Xfig. Xfig also has a user manual that can be found here.

While tinkering with a few diagrams, I found that the fontsize of the math symbols in some pictures was drastically reduced in the finished document (See the images below). It took me a while to figure out that pdflatex did not support certain fonts and was being replaced by some default fontsize. I noticed that I was getting warnings (pointing to the pdf_t file) similar to the one below when I compiled the tex file

Font shape OT1/cmr/m/n' in size <36> not available(Font) size <24.88> substituted on input line xx`

The solution to the above problem is very simple actually. Just include the command \usepackage{lmodern} in the preamble or \Requirepackage{fix-cm} before \documentclass to fix it!

Diagram before the fix

Diagram after using \Requirepackage{fix-cm}

Plagiarism

Literal and Intelligent Plagiarism: Students Beware!

M. Jagadesh Kumar, NXP (Philips) Chair Professor, Dept of Electrical Engineering, Indian Institute of Technology, New Delhi, INDIA. Email: mamidala@ee.iitd.ac.in

(How to cite this article: M. J. Kumar, “Literal and Intelligent Plagiarism: Students Beware!”,  IETE Technical Review, Vol.29 (3), pp.181-183, May-June 2012.)

Academic plagiarism has become like a viral fever that can affect even a healthy person if sufficient preventive measures are not taken. Untrained research students, who need to write good quality research papers under tight time constraints, are usually the victims. It is not uncommon for research supervisors to experience a psychological burden while approving the student’s paper for submission to a journal or a conference. Who knows if a sentence copied by the student while writing a research paper may be detected years later, subjecting the research supervisor to a great embarrassment. When the supervisor asks them to be careful about plagiarism, the students may…

View original post 1,322 more words

User defined commands in LaTeX

A very convenient tool in LaTeX is the ability to create macros or user defined commands. This turns out to be very productive and can save a lot of time, especially when you are using certain expressions frequently. This can also save a lot of headache if halfway through your document, you decide that you want to change notation. Also, when you have very long expressions that you are repeatedly using, it makes no sense to type it over and over again.

The main commands used for this purpose are ${\backslash \texttt{newcommand}}$ and ${\backslash \texttt{def}}$.

The user defined commands must be defined in the preamble, i.e., the place after the ${\backslash \texttt{documentclass}}$ but before ${ \backslash \texttt{begin} \{ \texttt{document}\} }$.

As an example, say that you are using an expression like ${\mu_{0}^{(k)}}$ to denote a quantity. You can define a command like

${\backslash \texttt{newcommand}\{ \backslash \texttt{mk} \} \{ \backslash \texttt{mu}\_ \{ 0 \} \hat{} \{\texttt{(k)}\} \}}$

Whenever you want to use the expression, simply type out ${\backslash \texttt{mk}}$. Note that you can use this only in the math mode and LaTeX will give you an error if you use it in the normal mode. However, this can be solved using the ${\backslash\texttt{ensuremath}}$ command. Use

${\backslash \texttt{newcommand}\{ \backslash \texttt{mk} \} \{ \; \backslash \texttt{ensuremath} \{\backslash \texttt{mu} \_ \{ 0 \} \hat{} \{\texttt{(k)}\} \} \; \}}$

and you can use \mk in both cases.

Note that this command can be used for text also. For example, say you want to replace “Direct sum decomposition” by a compact representation. Use

${\backslash \texttt{newcommand} \{ \backslash \texttt{dsd} \} \{ \texttt{Direct sum decomposition} \} }$

and you’re done. This command turns out to be really useful when you want to specify arguments. As an example, say that you want to define a function ${f_{0}(x^{d})}$. You can define a user defined command of the form

${\backslash \texttt{newcommand} \{ \backslash \texttt{fx} \}\{ \texttt{f} \_ \{\texttt{0} \} \texttt{(x} \hat{}\: \{\texttt{d}\}) \}}$

But in some other place, you need ${f_{0}(y^{l})}$. You don’t have to define a new command. Instead, you can specify arguments in the following manner:

${\backslash \texttt{newcommand} \{ \backslash \texttt{fx} \}[2]\{ \texttt{f} \_ \{\texttt{0}\}(\# \texttt{1} \hat{}\: \{\# \texttt{2}\}) \} }$

Here, ${\# 1}$, ${\# 2}$ represent the two arguments. When you want to use the same in an equation, simply use ${\ \backslash \texttt{fx}\{\texttt{x} \}\{ \texttt{d}\} \}$ to get ${f_{0}(x^{d})}$. You can specify upto 9 arguments numbered ${\# 1}$ to ${\#9}$.

The ${\backslash \texttt{def}}$ command behaves similarly. But a word of caution. If you use a command name that corresponds to a default LaTeX command, ${\backslash\texttt{newcommand}}$ will give an error whereas ${\backslash \texttt{def}}$ will simply overwrite the default definition. The syntax (for the first example) is

${\backslash \texttt{def} \backslash \texttt{mk} \{ \backslash \texttt{mu}\_ \{ 0 \} \hat{} \{\texttt{(k)}\} \}}$

Note that there are no braces right after ${\backslash \texttt{def}}$, unlike ${\backslash\texttt{newcommand}}$. To specify arguments,

${\backslash \texttt{def} \backslash \texttt{fx} \langle\# 1, \# 2\rangle\{ \texttt{f} \_ \{\texttt{0}\}(\# \texttt{1} \hat{}\: \{\# \texttt{2}\}) \} }$

When you want to invoke this in your document, use ${ \ \backslash \texttt{fx} \langle \texttt{x,d} \rangle \ }$.

References:

G. Gratzer, Math into LaTeX, 4th ed, Springer

Hi all,

.

Interviews are a big bugbear for many, and foremost among them was me! Who’d not get terrified when a gang of senior professors from the most reputed institute in India sit around facing him/her and fire questions on the area to ehose study they’ve dedicated their life to? There’s a lot of confusion and apprehension regarding this, and I thought an article on this would be helpful.

.

Typically, MTech programs may or may not have interviews, but MS and PhD programs certainly will, with PhD interviews being tougher than the MS ones, naturally. In addition, some IITs might have a written test (objective or subjective) as a preliminary filter to the interviews. I’ll list the process (as it was in 2008) for some of the programs:

IISc ME CSA – Direct Admission

IISc MSc (Engg) CSA, SERC, EC – Interview (heard there’s a written test this…

View original post 850 more words

An excellent view of higher engineering education in India….

IISc MSc interviews and GATE preparation

IIT MTech interviews

Hi all,

.

Its circus time again! Admissions season. Loads of decisions to make. Loads of data available, but very little information. Having gone through the entire thing last year, I thought I’d write a set of articles in aid of the poor souls trying to get in this time 😀

.

I’ll be talking about IIT admissions only, as my knowledge is limited to that. I’ll assume that people have decided to study here. Here or abroad is a question that must’ve been answered by now 🙂

.

One of the first things to decide once you’ve decided to do your PG in India is whether to go for an MS or for an MTech. I wrote a detailed reply to this question in gatementor.com, on which the following is based.

MS or MTech?

FACTS:
.
– MTech and MS need ~60 credits (or a scaled value, depending on…

View original post 681 more words

Nash and cryptography…

The National Security Agency (NSA) has recently declassified an amazing letter that John Nash sent to it in 1955.  It seems that around the year 1950 Nash tried to interest some US security organs (the NSA itself was only formally formed only in 1952) in an encryption machine of his design, but they did not seem to be interested.  It is not clear whether some of his material was lost, whether they ignored him as a theoretical professor, or — who knows — used some of his stuff but did not tell him.  In this hand-written letter sent by John Nash to the NSA in 1955, he tries to give a higher-level point of view supporting his design:

In this letter I make some remarks on a general principle relevant to enciphering in general and to my machine in particular.

He tries to make sure that he will…

View original post 614 more words