[OS X TeX] problem with package listings

Dominique Thillaud dominique.thillaud at wanadoo.fr
Mon May 16 22:28:07 CEST 2005


I ask again (sorry if it's too much) :

Début du message réexpédié :

> De: Dominique Thillaud <dominique.thillaud at wanadoo.fr>
> Date: Dim 15 mai 2005  11:16:29 Europe/Paris
> À: TeX on Mac OS X <MacOSX-TeX at email.esm.psu.edu>
> Cc: Dominique Thillaud <dominique.thillaud at wanadoo.fr>
> Objet: [ab]use of listings' package ?
>
> Hi all,
> Not being a specialist, I've tried to use the command literate of the  
> package listings to simplify the production of texts in Sanskrit. I  
> use a standard romanization of this language (to easily cut and paste  
> from numerized texts) but I need uppercase letters for the names of  
> Gods or Heroes in my French text.
> Alas, I've a lot of unexpected spaces in the .pdf and, worst,  
> apparently randomly :
> For example, a group "paap" (two consonants and a long 'a') will  
> produce sometimes 'pap', sometimes 'p ap' and sometimes 'pa p' (with  
> macron a, of course). Too strange, I'm puzzled.
> Where is my bug ?
> Thanks in advance,
> Dominique
>
> Here, an extract of my package (I know my style in LaTeX is  
> tremendous, as my English) :
>
> \ProvidesPackage{menegos}[2005/01/16 v1.0 textes de recherche]
> \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
> \ProcessOptions\relax			% toutes transmises à la classe book
> \RequirePackage[latin1]{inputenc}
> \RequirePackage[cyr]{aeguill} % gabo
> \RequirePackage{xspace} % gabo
> \RequirePackage{a4wide}
> \RequirePackage{listings}
> \RequirePackage{tipa}
> \RequirePackage[english,polutonikogreek,francais]{babel}
> \RequirePackage{graphicx}
> \RequirePackage{url}
> \RequirePackage{pstricks}
> \RequirePackage{pst-tree}
> \RequirePackage{array}
> \RequirePackage{multirow}
>
> %..........
>
> %% Pour le sanskrit
>
> %% Définition du langage
> \lstdefinelanguage{sanskrit}{%
> escapechar=£,%
> mathescape=true,%
> basicstyle=\itshape,%
> stringstyle=\upshape,%
> commentstyle=\normalfont,%
> showspaces=false,%
> literate=%
> % voyelles longues
> {aa}{\={a}}{1} {ii}{\={\i}}{1} {uu}{\={u}}{1}%
> {AA}{\={A}}{1} {II}{\={I}}{1} {UU}{\={U}}{1}%
> % caractères spéciaux montrés par des majuscules
> {D}{\textsubdot{d}}{1} {G}{\.{n}}{1} {H}{\textsubdot{h}}{1}%
> {J}{\~{n}}{1} {M}{\.{m}}{1} {N}{\textsubdot{n}}{1}%
> {R}{\textsubring{r}}{1} {S}{\textsubdot{s}}{1} {T}{\textsubdot{t}}{1}%
> % sifflante gutturale
> {z}{\'{s}}{1} {Z}{\'{S}}{1}%
> % remplacement des majuscules usées par les caractères spéciaux
> {DD}{D}{1} {GG}{G}{1} {HH}{H}{1}%
> {JJ}{J}{1} {MM}{M}{1} {NN}{N}{1}%
> {RR}{R}{1} {SS}{S}{1} {TT}{T}{1}%
> % majuscules des caractères spéciaux à l'initiale
> {DDD}{\textsubdot{D}}{1} {RRR}{\textsubring{R}}{1}%
> {SSS}{\textsubdot{S}}{1} {TTT}{\textsubdot{T}}{1}%
> % caractères spéciaux doublés (à l'intérieur)
> {DDDD}{\textsubdot{d}\textsubdot{d}}{2}%
> {NNNN}{\textsubdot{n}\textsubdot{n}}{2}%
> {TTTT}{\textsubdot{t}\textsubdot{t}}{2}%
> % pour le védique (accents simples)
> {'a}{\'{a}}{1} {'i}{\'{\i}}{1} {'u}{\'{u}}{1}%
> {'e}{\'{e}}{1} {'o}{\'{o}}{1}%
> {'aa}{\textacutemacron{a}}{1}%
> {'ii}{\textacutemacron{\i}}{1}%
> {'uu}{\textacutemacron{u}}{1},%
> string=[d]||%
> }[comments,strings]%
>
> %% Commandes d'écriture
> \newcommand{\skr}[1]{% italiques (sanskrit seul)
> \lstset{language=sanskrit}%
> \lstinline!#1!}
> \newcommand{\upskr}[1]{% romains (noms propres dans un texte français)
> \lstset{language=sanskrit,basicstyle=\upshape}%
> \lstinline!#1!}
> \newcommand{\slskr}[1]{% penchés (noms propres dans une traduction}
> \lstset{language=sanskrit,basicstyle=\slshape}%
> \lstinline!#1!}
> \newcommand{\bskr}[1]{{\large\textbf{\skr{#1}}}}% titres
> \newcounter{parag}
> \newcommand{\tskr}[1]{% paragraphes
> \stepcounter{parag}%
> \vspace{\baselineskip}
> \noindent{\large\textbf{\theparag~-~\skr{#1}}}\\}
>
> ----------------------------------------------------------------------- 
> ----------------
> Wanadoo vous informe que cet  e-mail a ete controle par l'anti-virus  
> mail.
> Aucun virus connu a ce jour par nos services n'a ete detecte.
>
>
>


--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list