Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Community > Tech > [LATEX] Help: inserire porzioni di codice
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
JaM
######

User info:
Registered: Jun 2002
Posts: 3604 (0.42 al dì)
Location: everywhere, anywhere, elsewhere...
Corso: ComDig
Anno: dott.??
Time Online: 62 Days, 16:55:46 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Exclamation [LATEX] Help: inserire porzioni di codice

Per inserire porzioni di codice nella mia tesi ho usato il pacchetto fancyvrb per definire uno stile personalizzato:

code:
\linespread{1.7} \usepackage{fancyvrb} \DefineVerbatimEnvironment{codice}{Verbatim} {frame=single,framesep=3mm, framerule=0.2pt, numbers=none, fontsize=\relsize{-2}, fontfamily=courier, xleftmargin=7mm, xrightmargin=7mm}


solo che mantenendo la stessa interlinea usata nel testo normale viene bruttissimo e troppo spaziato.

come posso fare a modificare l'interlinea all'interno dell'ambiente "codice" che ho definito? (non sono riuscito a trovarlo da nessuan parte finora.... :( )

tnx

20-06-2005 16:18
Click Here to See the Profile for JaM Click Here to See the Blog of JaM Click here to Send JaM a Private Message Visit JaM's homepage! Find more posts by JaM Add JaM to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
cato
Wild boys always shine

User info:
Registered: Nov 2001
Posts: 5608 (0.63 al dì)
Location: lecco
Corso: F28
Anno: dottore
Time Online: 38 Days, 5:42:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

bho prova questo:


Come si inserisce il listato di un programma?
Ci sono due modi:
² utilizzare l’ambiente verbatim;
² utilizzare la libreria listings.
L’utilizzo dell’ambiente verbatim `e il pi semplice; si procede in questo mo-do:
si scrive \begin{verbatim} (se si sta utilizzando il WinEdt come editor
bisogna disattivare il comando Wrap - `e localizzato in basso verso sinistra,
quando `e attivo `e blu e funziona come “Ins” per le righe), si copia il listato
del programma dal compilatore, si incolla e si scrive \end{verbatim}; poi si
pu riattivare il comando Wrap.
Se si utilizza listings bisogna innanzitutto scaricare listings.ins e listings.dtx
e compilare questi file con il comando L A T E X: in questo modo si creeranno le
librerie necessarie ed il manuale. Consultare il manuale specifico della libre-ria
che si `e creato.

__________________

code:
  , ,  | | Me@Flickr  [ov0] | | my photo Blog  {| |} |@| Pallavolo La Nuova Rossa Milano --"-"--| | -------| | "If You Can't Open It, You Don't Own It"

20-06-2005 16:24
Click Here to See the Profile for cato Click Here to See the Blog of cato Click here to Send cato a Private Message Visit cato's homepage! Find more posts by cato Add cato to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
cato
Wild boys always shine

User info:
Registered: Nov 2001
Posts: 5608 (0.63 al dì)
Location: lecco
Corso: F28
Anno: dottore
Time Online: 38 Days, 5:42:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

http://www.atscire.de/index.php?nav=products/listings

__________________

code:
  , ,  | | Me@Flickr  [ov0] | | my photo Blog  {| |} |@| Pallavolo La Nuova Rossa Milano --"-"--| | -------| | "If You Can't Open It, You Don't Own It"

20-06-2005 16:26
Click Here to See the Profile for cato Click Here to See the Blog of cato Click here to Send cato a Private Message Visit cato's homepage! Find more posts by cato Add cato to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
JaM
######

User info:
Registered: Jun 2002
Posts: 3604 (0.42 al dì)
Location: everywhere, anywhere, elsewhere...
Corso: ComDig
Anno: dott.??
Time Online: 62 Days, 16:55:46 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

quello che uso io e' il fancy verbatim (fancyvrb) che sarebbe un'espansione del verbatim normale: ha un po' di possibilita' di personalizzazione in piu' e puoi definire un ambiente particolare con tutte le sue impostazioni

io ad esempio ho definito l'ambiente "codice" con tutte le impostazioni che ho messo sopra e per inserire parti di codice nel testo metto:

code:
\begin{codice} blabla asdasd \end{codice}

20-06-2005 16:29
Click Here to See the Profile for JaM Click Here to See the Blog of JaM Click here to Send JaM a Private Message Visit JaM's homepage! Find more posts by JaM Add JaM to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
JaM
######

User info:
Registered: Jun 2002
Posts: 3604 (0.42 al dì)
Location: everywhere, anywhere, elsewhere...
Corso: ComDig
Anno: dott.??
Time Online: 62 Days, 16:55:46 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

come al solito trovo quello che mi serviva 2 minuti dopo averlo chiesto in qualche forum... :sbonk: :sbonk:

mi bastava aggiungere il parametro baselinestretch=xcon il nuovo valore

:asd:

20-06-2005 16:33
Click Here to See the Profile for JaM Click Here to See the Blog of JaM Click here to Send JaM a Private Message Visit JaM's homepage! Find more posts by JaM Add JaM to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
cato
Wild boys always shine

User info:
Registered: Nov 2001
Posts: 5608 (0.63 al dì)
Location: lecco
Corso: F28
Anno: dottore
Time Online: 38 Days, 5:42:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

sto usando questo

code:
\usepackage{listings} %listati \lstset{ language=Ada, %Ada95 basicstyle=\small, %dim. carattere showstringspaces=false, %spazi bianchi framesep=5pt, %altro margine frame=TtbB, %doppie line sopra e sotto aboveskip=10pt, %margine sx del listato belowskip=10pt, %margine sx del listato xleftmargin=5pt, %margine sx del listato xrightmargin=5pt, %masgine dx listato lineskip=1.3pt} %interlinea 1 e 1/2


bellissimo

__________________

code:
  , ,  | | Me@Flickr  [ov0] | | my photo Blog  {| |} |@| Pallavolo La Nuova Rossa Milano --"-"--| | -------| | "If You Can't Open It, You Don't Own It"

25-06-2005 21:56
Click Here to See the Profile for cato Click Here to See the Blog of cato Click here to Send cato a Private Message Visit cato's homepage! Find more posts by cato Add cato to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 03:23.    Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.051 seconds (69.87% PHP - 30.13% MySQL) con 23 query.