Math & Science'\rightarrow' with "lessthan" and "greaterthan" Symbols

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
clar
Posts: 7
Joined: Fri Oct 21, 2011 6:22 pm

'\rightarrow' with "lessthan" and "greaterthan" Symbols

Post by clar »

Hi I am very new to latex, I need to print some information in pdf file.I written latex document like this

Code: Select all

\documentclass[10pt]{report}
%\usepackage{mathtools}
\begin{document
\begin{enumerate}
\item  
student Number: Af110478, student from computers department.\\
address information:\\
house number ="1A/132";\\
streetname="PDTR";
PDTR \rightarrow Proddutoor :\\
 kadapa;\\
 aditional information: no.
\item
 student Number: Af110546, student from computers department.\\
address information:\\
house number ="19A/12";\\
streetname="BDVL";
BDVL \rightarrow badvel :\\
 kadapa;\\
aditional information: no.
\end{enumerate}					  						
\end{document}
how to assign right arrow, I tried to use mathtools package but i am not getting right way.
and one more favour my input is in xml data so I am writing that data into pdf for more user understanding purpose. So i am writing like this using latex but can any one suggest how can i write this information more readble to user.my data is like this

Code: Select all

<student>
    <number>Af110478</number>
    <education>bachelors</education>
    <specialization>computers</specialization>
    <address>
        <house_number="1A/132"/>
        <street_nam="pdtr">
        <PDTR=proddutoor/>
    </address>
</student>
<student>
    <number>Af110546</number>
    <education>ph.d.</education>
    <specialization>physics</specialization>
    <address>
        <house_number="19A/12"/>
        <street_nam="pdtr">
        <BDVL= badvel/>
    </address>
</student>
i have 150 student information like this how can write all students information into pdf.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

'\rightarrow' with "lessthan" and "greaterthan" Symbols

Post by kaiserkarl13 »

Your example is missing a "}" on the begin document line. \rightarrow is a math symbol; as such, it needs to be in math mode (either $\rightarrow$ or \(\rightarrow\) ). As for the rest of the stuff, might I recommend this:

Code: Select all

\documentclass[10pt]{report}
\newcommand{\student}[7]{\item Number: #1, student from #2 department.\\
Address information:\\
House Number: #3\\
Street Name: #4\\
#4${}\rightarrow{}$#5 :\\
#6\\
Additional information: #7.
}
\begin{document}
\begin{enumerate}
  \student{Af110478}{computers}{1A/132}{PDTR}{Proddutoor}{kadapa}{no}
  \student{Af110546}{computers}{19A/12}{BDVL}{badvel}{kadapa}{no}
\end{enumerate}
\end{document}
clar
Posts: 7
Joined: Fri Oct 21, 2011 6:22 pm

Re: '\rightarrow' with "lessthan" and "greaterthan" Symbols

Post by clar »

Thanks alot. its working.
Post Reply