24.04.2014 Views

Pratique de Sas Windows ...9.3 Volume 2 - Ined

Pratique de Sas Windows ...9.3 Volume 2 - Ined

Pratique de Sas Windows ...9.3 Volume 2 - Ined

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.3 Divers autres aspects <strong>de</strong> l’ODS -non vus dans le volume 1-<br />

1.3.1 Ods Latex<br />

Il y <strong>de</strong>s « familles » dans la Recherche qui utilisent Tex et ses dérivés. Signalons donc que <strong>Sas</strong> dispose <strong>de</strong> la<br />

<strong>de</strong>stination Latex qui se conjugue avec 4 types <strong>de</strong> templates : Latex, ColorLatex, SimpleLatex et<br />

TablesOnlyLatex<br />

Les <strong>de</strong>ux <strong>de</strong>rniers sont sensés se limiter à une production <strong>de</strong> co<strong>de</strong> élémentaire à copier/coller dans votre éditeur.<br />

Sans être un spécialiste <strong>de</strong> Latex et <strong>de</strong>s logiciels existant dans ce secteur, je présente ici un usage abouti grâce à<br />

Miktek9.2 et WinEdt. Mais ce mon<strong>de</strong> évolue et semble actuellement être déjà en Lyx au lieu <strong>de</strong> Latex !<br />

Une <strong>de</strong>s difficultés se cristallise <strong>de</strong>puis longtemps sur l’insertion <strong>de</strong>s graphiques. Voici ce que j’ai trouvé<br />

comme solution et contournements.<br />

libname tex "d:\notes\latex\";<br />

data stack;<br />

input x1 x2 x3 y exp $ @@;<br />

datalines;<br />

80 27 89 42 e1 80 27 88 37 e2<br />

75 25 90 37 e3 62 24 87 28 e4<br />

62 22 87 18 e5 62 23 87 18 e6<br />

62 24 93 19 e7 62 24 93 20 e8<br />

58 23 87 15 e9 58 18 80 14 e10<br />

58 18 89 14 e11 58 17 88 13 e12<br />

58 18 82 11 e13 58 19 93 12 e14<br />

50 18 89 8 e15 50 18 86 7 e16<br />

50 19 72 8 e17 50 19 79 8 e18<br />

50 20 80 9 e19 56 20 82 15 e20<br />

70 20 91 15 e21<br />

;<br />

run;<br />

options nodate nonumber;<br />

title ;<br />

ods latex path="d:\notes\latex\"<br />

gpath="d:\notes\latex\ps" (url='ps/')<br />

style=journal2;<br />

ods trace on;<br />

proc robustreg data=stack plots=(rdplot ddplot<br />

histogram qqplot);<br />

mo<strong>de</strong>l y = x1 x2 x3;<br />

run;<br />

ods trace off;<br />

ods latex close;<br />

Création d’un fichier <strong>Sas</strong>ltx.ltx<br />

Le problème est que j’ai bien 4 graphiques qui se sont écrits<br />

dans le sous-répertoire ps MAIS <strong>de</strong> type .ps ou postscript et<br />

donc non accepté dans Latex et disparaissant avec erreur à<br />

l’exécution du PDFTexify <strong>de</strong> Winedt. Théoriquement Latex<br />

accepte <strong>de</strong>s fichiers EPS c'est-à-dire du PostScript<br />

encapsulé<br />

Voir premier résultat du fichier pdf <br />

ods html close;<br />

ods tagsets.colorlatex<br />

path="d:\notes\latex\" file="colorltx.ltx"<br />

gpath="d:\notes\latex\ps"(url='ps/')<br />

style=journal;<br />

ods graphics /imagefmt=EPSI;<br />

proc robustreg data=stack plots=(rdplot ddplot<br />

histogram qqplot);<br />

mo<strong>de</strong>l y = x1 x2 x3;<br />

run;<br />

ods tagsets.colorlatex close;<br />

ods html path= "%sysfunc(pathname (WORK)) " ;<br />

ods graphics /reset=all;<br />

ods latex<br />

file="d:\notes\latex\fragment02.tex"(nobot notop)<br />

style=journal2;<br />

proc print data=stack;run;<br />

ods latex close;<br />

J’obtiens bien 4 fichiers <strong>de</strong> suffixe .epsi.<br />

Après enquête, vu l’évolution <strong>de</strong>s habitu<strong>de</strong>s et <strong>de</strong>s<br />

produits, il semble qu’il faille ne retenir que <strong>de</strong>s<br />

fichiers propres pdf pour une insertion dans Latex.<br />

Grâce à l’installation <strong>de</strong> Ghostscript et GsView, il est<br />

possible <strong>de</strong> convertir le fichier en pdf.<br />

Nous l’avons fait pour le ddplot.<br />

Pour continuer par défaut en html dans la work<br />

Par ailleurs, il est possible aussi <strong>de</strong> générer <strong>de</strong>s bouts<br />

<strong>de</strong> pur co<strong>de</strong> Latex sans « début », ni « fin » et donc<br />

aisément copiable.<br />

45 INED Service Informatique Wielki

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!