Text Formattinglatin formatting lost when using \input{chapterName}

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

latin formatting lost when using \input{chapterName}

Post by edouard »

hi,

I am using latex with a french formatting,

Code: Select all

Code, edit and compile here:
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
it work smoothly as long as i keep the whole text on a single page but when i insert aditionnal parts using

Code: Select all

\input{fileName}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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,

Recommended reading 2024:

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

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

daleif
Posts: 199
Joined: Wed Nov 19, 2008 12:46 am

latin formatting lost when using \input{chapterName}

Post by daleif »

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
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Re: latin formatting lost when using \input{chapterName}

Post by Stefan Kottwitz »

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

latin formatting lost when using \input{chapterName}

Post by edouard »

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

Re: latin formatting lost when using \input{chapterName}

Post by daleif »

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

latin formatting lost when using \input{chapterName}

Post by edouard »

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

Re: latin formatting lost when using \input{chapterName}

Post by daleif »

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

Re: latin formatting lost when using \input{chapterName}

Post by daleif »

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

latin formatting lost when using \input{chapterName}

Post by edouard »

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

Re: latin formatting lost when using \input{chapterName}

Post by daleif »

and?

did you solve your problem?
Post Reply