I'm new to LaTeX and I'm trying to learn it. It is very interesting. I have to type a lot of documents that contain Devnagari text, more precisely Nepali Language. How can I type it using LaTeX, so that I could make beautiful document in my own language?
[Tex/LaTex] How to type in Devnagari font using LaTeX
fontsindiclanguages
Related Solutions
Plain TeX is really an example format rather than something for making documents in so you almost always have to load something to get a document usable setup (manmac, or eplain or amstex or your own macros) but anyway keeping to plain as far as possible.
\documentclass{article} % It's not really important I can work without a class.
Just do nothing, plain just starts off in typesetting mode. It doesn't have the analogue of LaTeX's preamble for setting things up at the start.
\usepackage[utf8]{inputenc} % is it possible to work with utf8 with TeX ?
It would be easier to just use LuaTeX or xetex, but in principle you just need to make characters 128-255 active and parse the next few characters to look up the Unicode number. ctan may have code to do this compatible with plain TeX already or latex's inputenc could be converted (or perhaps simpler) the utf8 reader in xmltex has essentially no dependencies on anything (xmltex can be loaded into initex)
%\usepackage[T1]{fontenc}
As you implied by commenting this out, plain doesn't have any notion of managing font encodings, if you use fonts with different encodings then it is up to you to switch any encoding dependent definitions at the same time, the format doesn't help.
\usepackage[upright]{fourier} % or another font with T1 !
As noted above, plain doesn't care about the encoding. If you stick
\expandafter\show\the\font
into your latex document it says
\T1/futs/m/n/10=select font futr8t.
so if you put
\font\tenrm=futr8t
\rm
into your plain TeX file you will get that font in 8t (aka T1) encoding.
\usepackage[frenchb]{babel} % I need french hyphenation only !
To switch languages you need \language2
or whatever value \language
had when you input the french hyphenation table. But you can't input hyphenation tables into a standard tex, you need it to be run as initex and dump a new format. At this point you may want to switch to eplain at least as that has more language hyphenation tables dumped at format build time. But plan does explicitly allow you to customise the languages and hyphenation tables at format building time, almost the whole format is defined by the single file plain.tex except for hyphenation for which it does \input hyphen
so if you have an English/French (or just French) hyphenation table setup in hyphen.tex at the time you make the plain tex format you can have French.
\end{document}
The plain tex for that is \bye
If you don't use utf8 and just want latin-1 input with T1 output then you can avoid worying about making multi-byte encodings work and it should all just work. When I cut and pasted your latex document it ended up in latin1 rather than utf8 anyway (not sure where the translation happened) so the following plain TeX document does give accented letters, both é and ç being typeset correctly.
\font\tenrm=futr8t
\rm
Bonjour
J'ai toujours voulu savoir comment écrire un document en français avec TeX.
\bye
and if you mean to create you own font set then you are going to need Font Design programs. some are even for free like TeX is:
- MetaFont (the original sister of TeX designed by Knuth)
- MetaPost
- METATYPE1
but be aware: if you think TeX is difficult you will be surprised how difficult it is to design own font.
Best Answer
You could use Charles Wikner's Sanskrit package, available from CTAN. With this package, you would enter transliterated text and it would be converted into Devanagari (it does ligatures properly if I remember correctly).
The documentation is in the file sktdoc.ps.
edit: in Debian and Ubuntu, the same package used to be available with the name "
latex-sanskrit
", but was removed from the archives (I don't know the reason)