Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
edouard
Posts: 5 Joined: Tue Dec 30, 2008 5:40 pm
Post
by edouard » Tue Dec 30, 2008 5:52 pm
hi,
I am using latex with a french formatting,
Code: Select all
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
it work smoothly as long as i keep the whole text on a single page but when i insert aditionnal parts using
the "inputed" text has the typical latin caracter formatted in an unfriendly fashion (\@e ...)
i tried to put the quoted instruction at the top of the inputed files but latex cannot compile anymore.
what's wrong with my inputs,
thanks for comments,
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide : 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook : 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ : the first book about TikZ for perfect drawings in your LaTeX thesis
daleif
Posts: 199 Joined: Wed Nov 19, 2008 12:46 am
Post
by daleif » Tue Dec 30, 2008 6:45 pm
would you please provide a minimal example?
What exactly do you mean by
the "inputed" text has the typical latin caracter formatted in an unfriendly fashion (\@e ...)
without an example it is a bit hard to help
Stefan Kottwitz
Site Admin
Posts: 10397 Joined: Mon Mar 10, 2008 9:44 pm
Post
by Stefan Kottwitz » Tue Dec 30, 2008 7:47 pm
Hi Edouard,
welcome to the board!
\usepackage can only be used inside the preamble. Those commands will also be valid for the by \input included parts. Perhaps those external files are having a different encoding. You could post such a file as attachment here for us to examine.
Stefan
LaTeX.org admin
edouard
Posts: 5 Joined: Tue Dec 30, 2008 5:40 pm
Post
by edouard » Wed Dec 31, 2008 2:26 pm
hi,
thanks for replies,
here's my formatting
\documentclass[11pt,openany]{scrbook}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
%\usepackage[cyr]{aeguill}
\usepackage[french]{babel}
\usepackage{times}
\usepackage[papersize={4.25in,6.875in},hmargin=.375in,vmargin={.375in,.625in}]{geometry}
\setlength{\paperwidth}{4.25in}
\setlength{\paperwidth}{6.875in}
\special{papersize=4.25in,6.875in}
\usepackage{indentfirst}
\setlength{\parindent}{12pt}
\parskip 0pt
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[L,C,R]{}
\renewcommand{\headrulewidth}{0pt}
\addtolength{\footskip}{-8mm}
\fancyfoot{}
\fancyfoot[LE,RO]{\thepage}
\setcounter{secnumdepth}{-1}
\begin{document}
\maketitle
il était temps de rentrer à la maison.
\input{projetNametexfile}
\end{document}
and here's the *.dvi output i get
il était temps de rentrer à la maison.
when i use the
\input{projetNametexfile}
instead of keeping the text in the formatting file.
note that i just write this single line i the input projetNametexfile wihtout ANY latex instructions
Last edited by
edouard on Wed Dec 31, 2008 2:33 pm, edited 1 time in total.
daleif
Posts: 199 Joined: Wed Nov 19, 2008 12:46 am
Post
by daleif » Wed Dec 31, 2008 2:33 pm
Are you sure the included file is in latin1 encoding?
Does LaTeX mention anything in the log?
Most editors tend to ignore errors
edouard
Posts: 5 Joined: Tue Dec 30, 2008 5:40 pm
Post
by edouard » Wed Dec 31, 2008 3:02 pm
here's the log, i don't see any errors
now i use emacs, what do you mean when you ask if my input is in latin 1 encoding considering i cannot insert a \usepackage[latin1]{inputenc} in the input file
Running `LaTeX' on `novelBody' with ``latex -interaction=nonstopmode "\input" novelBody.tex''
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
%&-line parsing enabled.
entering extended mode
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, basque, french, loaded.
(./novelBody.tex (/usr/share/texmf-texlive/tex/latex/koma-script/scrbook.cls
Document Class: scrbook 2006/07/30 v2.95b KOMA-Script document class (book)
(/usr/share/texmf-texlive/tex/latex/koma-script/scrkbase.sty
(/usr/share/texmf-texlive/tex/latex/koma-script/scrlfile.sty
Package scrlfile, 2006/03/28 v2.95 KOMA-Script package (loading files)
Copyright (C) Markus Kohm
) (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty))
(/usr/share/texmf-texlive/tex/latex/base/bk11.clo)
(/usr/share/texmf-texlive/tex/latex/koma-script/typearea.sty
Package typearea, 2006/07/30 v2.95b KOMA-Script package (type area)
Copyright (C) Frank Neukam, 1992-1994
Copyright (C) Markus Kohm, 1994-2002
)) (/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
(/usr/share/texmf-texlive/tex/latex/base/latin1.def))
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
(/usr/share/texmf-texlive/tex/latex/base/t1enc.def))
(/usr/share/texmf-texlive/tex/generic/babel/babel.sty
(/usr/share/texmf-texlive/tex/generic/babel/frenchb.ldf
(/usr/share/texmf-texlive/tex/generic/babel/babel.def)
*************************************
* Local config file frenchb.cfg used
*
(/usr/share/texmf-texlive/tex/generic/babel/frenchb.cfg)))
(/usr/share/texmf-texlive/tex/latex/psnfss/times.sty)
(/usr/share/texmf-texlive/tex/latex/geometry/geometry.sty)
(/usr/share/texmf-texlive/tex/latex/tools/indentfirst.sty)
(/usr/share/texmf-texlive/tex/latex/fancyhdr/fancyhdr.sty) (./novelBody.aux)
(/usr/share/texmf-texlive/tex/latex/psnfss/t1ptm.fd)
Package frenchb.ldf Warning: The definition of \@makecaption has been changed,
(frenchb.ldf) frenchb will NOT customize it;
(frenchb.ldf) reported on input line 35.
(/usr/share/texmf-texlive/tex/latex/psnfss/t1phv.fd)
(/usr/share/texmf-texlive/tex/latex/psnfss/omsptm.fd) [1] [2]
(./projetNametexfile.tex) [3] (./novelBody.aux) )
Output written on novelBody.dvi (3 pages, 932 bytes).
Transcript written on novelBody.log.
LaTeX finished at Wed Dec 31 13:56:04
Last edited by
edouard on Wed Dec 31, 2008 3:05 pm, edited 1 time in total.
daleif
Posts: 199 Joined: Wed Nov 19, 2008 12:46 am
Post
by daleif » Wed Dec 31, 2008 3:05 pm
files can be saved in different ancodings, such as utf8, latin1 etc.
the inputenc package is just used to tell LaTeX which encoding to expect.
daleif
Posts: 199 Joined: Wed Nov 19, 2008 12:46 am
Post
by daleif » Wed Dec 31, 2008 3:06 pm
would it be possible for you to create a zip-file of the file you posted here and the file you include, and then post it online somewhere?
(use a zip or similar as not to damage the encoding during transfer)
edouard
Posts: 5 Joined: Tue Dec 30, 2008 5:40 pm
Post
by edouard » Wed Dec 31, 2008 3:10 pm
daleif wrote: files can be saved in different ancodings, such as utf8, latin1 etc.
the inputenc package is just used to tell LaTeX which encoding to expect.
Thanks you were right.
daleif
Posts: 199 Joined: Wed Nov 19, 2008 12:46 am
Post
by daleif » Wed Dec 31, 2008 3:15 pm
and?
did you solve your problem?