How to decrease the line spaces in listing codes?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I want to decrease the line spaces of the java codes in the following latex. I already used setstretch0.4 but it seems that this code does not work for listing contents. how should I do this??
beginfilecontents*FristProgram.java
import java.io.*;
class ShowFile
endfilecontents*
documentclass[svgnames]report
usepackagetikz
usepackageverbatim
usepackagekpfonts
usepackage[explicit]titlesec
usetikzlibrarycalc
usetikzlibraryshadows
usetikzlibraryshadows.blur
usetikzlibrarymatrix
usetikzlibraryshapes,snakes
usetikzlibraryshapes.geometric, arrows
usepackagelistings
usepackageshowframe
definecolorcodegreenrgb0,0,0
definecolorcodegrayrgb0,0,0
definecolorcodepurplergb0,0,0
%definecolorbackcolourrgb0.95,0.95,0.92
definecolorbackcolourrgb1,1,1
lstdefinestylemystyle
backgroundcolor=colorbackcolour,
commentstyle=colorcodegreen,
numberstyle=tinycolorcodegray,
stringstyle=colorcodepurple,
basicstyle=normalsizettfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=none,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
lineskip=.1cm
lstsetstyle=mystyle
begindocument
tikzstyleContainer = [draw=none, fill=gray, thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
tikzstyleProgramBox = [draw=black, fill=white,thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt,drop shadow=color=black
]
tikzstyleExampleBox = [draw=black, fill=white, thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt,drop shadow=color=black]
centering
begintikzpicture
labelnum
node [Container](container)
begintikzpicture
node [ProgramBox] (pbox)%
beginminipagedimexprtextwidth-40ptrelax
hrule width hsize height 1pt
lstinputlisting[language=Java]FristProgram.java
hrule width hsize kern 1mm hrule width hsize height 1pt
endminipage
;
endtikzpicture
;
node [ExampleBox, anchor=north west] at (container.south west)
beginminipage0.3textwidth
this\
is \
the \
first \
example
endminipage
;
node [ExampleBox, anchor=north east] at (container.south east)
beginminipage0.3textwidth
this\
is \
the \
second \
example \
which \
is \
larger\
than \
first\
example
endminipage
;
endtikzpicture%
par
enddocument
listings minipage
New contributor
Sadegh Eskandari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
2
down vote
favorite
I want to decrease the line spaces of the java codes in the following latex. I already used setstretch0.4 but it seems that this code does not work for listing contents. how should I do this??
beginfilecontents*FristProgram.java
import java.io.*;
class ShowFile
endfilecontents*
documentclass[svgnames]report
usepackagetikz
usepackageverbatim
usepackagekpfonts
usepackage[explicit]titlesec
usetikzlibrarycalc
usetikzlibraryshadows
usetikzlibraryshadows.blur
usetikzlibrarymatrix
usetikzlibraryshapes,snakes
usetikzlibraryshapes.geometric, arrows
usepackagelistings
usepackageshowframe
definecolorcodegreenrgb0,0,0
definecolorcodegrayrgb0,0,0
definecolorcodepurplergb0,0,0
%definecolorbackcolourrgb0.95,0.95,0.92
definecolorbackcolourrgb1,1,1
lstdefinestylemystyle
backgroundcolor=colorbackcolour,
commentstyle=colorcodegreen,
numberstyle=tinycolorcodegray,
stringstyle=colorcodepurple,
basicstyle=normalsizettfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=none,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
lineskip=.1cm
lstsetstyle=mystyle
begindocument
tikzstyleContainer = [draw=none, fill=gray, thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
tikzstyleProgramBox = [draw=black, fill=white,thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt,drop shadow=color=black
]
tikzstyleExampleBox = [draw=black, fill=white, thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt,drop shadow=color=black]
centering
begintikzpicture
labelnum
node [Container](container)
begintikzpicture
node [ProgramBox] (pbox)%
beginminipagedimexprtextwidth-40ptrelax
hrule width hsize height 1pt
lstinputlisting[language=Java]FristProgram.java
hrule width hsize kern 1mm hrule width hsize height 1pt
endminipage
;
endtikzpicture
;
node [ExampleBox, anchor=north west] at (container.south west)
beginminipage0.3textwidth
this\
is \
the \
first \
example
endminipage
;
node [ExampleBox, anchor=north east] at (container.south east)
beginminipage0.3textwidth
this\
is \
the \
second \
example \
which \
is \
larger\
than \
first\
example
endminipage
;
endtikzpicture%
par
enddocument
listings minipage
New contributor
Sadegh Eskandari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I'm not sure what you mean by that. If you try and set the “second example†withttfamily
and the same text as the “first exampleâ€Â, you'll see that the heights are essentially the same. You can trybasicstyle=linespread0.9normalfontttfamily
, if you so prefer.
– egreg
1 hour ago
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I want to decrease the line spaces of the java codes in the following latex. I already used setstretch0.4 but it seems that this code does not work for listing contents. how should I do this??
beginfilecontents*FristProgram.java
import java.io.*;
class ShowFile
endfilecontents*
documentclass[svgnames]report
usepackagetikz
usepackageverbatim
usepackagekpfonts
usepackage[explicit]titlesec
usetikzlibrarycalc
usetikzlibraryshadows
usetikzlibraryshadows.blur
usetikzlibrarymatrix
usetikzlibraryshapes,snakes
usetikzlibraryshapes.geometric, arrows
usepackagelistings
usepackageshowframe
definecolorcodegreenrgb0,0,0
definecolorcodegrayrgb0,0,0
definecolorcodepurplergb0,0,0
%definecolorbackcolourrgb0.95,0.95,0.92
definecolorbackcolourrgb1,1,1
lstdefinestylemystyle
backgroundcolor=colorbackcolour,
commentstyle=colorcodegreen,
numberstyle=tinycolorcodegray,
stringstyle=colorcodepurple,
basicstyle=normalsizettfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=none,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
lineskip=.1cm
lstsetstyle=mystyle
begindocument
tikzstyleContainer = [draw=none, fill=gray, thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
tikzstyleProgramBox = [draw=black, fill=white,thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt,drop shadow=color=black
]
tikzstyleExampleBox = [draw=black, fill=white, thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt,drop shadow=color=black]
centering
begintikzpicture
labelnum
node [Container](container)
begintikzpicture
node [ProgramBox] (pbox)%
beginminipagedimexprtextwidth-40ptrelax
hrule width hsize height 1pt
lstinputlisting[language=Java]FristProgram.java
hrule width hsize kern 1mm hrule width hsize height 1pt
endminipage
;
endtikzpicture
;
node [ExampleBox, anchor=north west] at (container.south west)
beginminipage0.3textwidth
this\
is \
the \
first \
example
endminipage
;
node [ExampleBox, anchor=north east] at (container.south east)
beginminipage0.3textwidth
this\
is \
the \
second \
example \
which \
is \
larger\
than \
first\
example
endminipage
;
endtikzpicture%
par
enddocument
listings minipage
New contributor
Sadegh Eskandari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I want to decrease the line spaces of the java codes in the following latex. I already used setstretch0.4 but it seems that this code does not work for listing contents. how should I do this??
beginfilecontents*FristProgram.java
import java.io.*;
class ShowFile
endfilecontents*
documentclass[svgnames]report
usepackagetikz
usepackageverbatim
usepackagekpfonts
usepackage[explicit]titlesec
usetikzlibrarycalc
usetikzlibraryshadows
usetikzlibraryshadows.blur
usetikzlibrarymatrix
usetikzlibraryshapes,snakes
usetikzlibraryshapes.geometric, arrows
usepackagelistings
usepackageshowframe
definecolorcodegreenrgb0,0,0
definecolorcodegrayrgb0,0,0
definecolorcodepurplergb0,0,0
%definecolorbackcolourrgb0.95,0.95,0.92
definecolorbackcolourrgb1,1,1
lstdefinestylemystyle
backgroundcolor=colorbackcolour,
commentstyle=colorcodegreen,
numberstyle=tinycolorcodegray,
stringstyle=colorcodepurple,
basicstyle=normalsizettfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=none,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
lineskip=.1cm
lstsetstyle=mystyle
begindocument
tikzstyleContainer = [draw=none, fill=gray, thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
tikzstyleProgramBox = [draw=black, fill=white,thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt,drop shadow=color=black
]
tikzstyleExampleBox = [draw=black, fill=white, thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt,drop shadow=color=black]
centering
begintikzpicture
labelnum
node [Container](container)
begintikzpicture
node [ProgramBox] (pbox)%
beginminipagedimexprtextwidth-40ptrelax
hrule width hsize height 1pt
lstinputlisting[language=Java]FristProgram.java
hrule width hsize kern 1mm hrule width hsize height 1pt
endminipage
;
endtikzpicture
;
node [ExampleBox, anchor=north west] at (container.south west)
beginminipage0.3textwidth
this\
is \
the \
first \
example
endminipage
;
node [ExampleBox, anchor=north east] at (container.south east)
beginminipage0.3textwidth
this\
is \
the \
second \
example \
which \
is \
larger\
than \
first\
example
endminipage
;
endtikzpicture%
par
enddocument
listings minipage
listings minipage
New contributor
Sadegh Eskandari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Sadegh Eskandari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Sadegh Eskandari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 hours ago


Sadegh Eskandari
282
282
New contributor
Sadegh Eskandari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Sadegh Eskandari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Sadegh Eskandari is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I'm not sure what you mean by that. If you try and set the “second example†withttfamily
and the same text as the “first exampleâ€Â, you'll see that the heights are essentially the same. You can trybasicstyle=linespread0.9normalfontttfamily
, if you so prefer.
– egreg
1 hour ago
add a comment |Â
I'm not sure what you mean by that. If you try and set the “second example†withttfamily
and the same text as the “first exampleâ€Â, you'll see that the heights are essentially the same. You can trybasicstyle=linespread0.9normalfontttfamily
, if you so prefer.
– egreg
1 hour ago
I'm not sure what you mean by that. If you try and set the “second example†with
ttfamily
and the same text as the “first exampleâ€Â, you'll see that the heights are essentially the same. You can try basicstyle=linespread0.9normalfontttfamily
, if you so prefer.– egreg
1 hour ago
I'm not sure what you mean by that. If you try and set the “second example†with
ttfamily
and the same text as the “first exampleâ€Â, you'll see that the heights are essentially the same. You can try basicstyle=linespread0.9normalfontttfamily
, if you so prefer.– egreg
1 hour ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
The lineskip=
parameter in your lstdefinestyle
controls this. Try changing it to lineskip=-.1cm
, for example:
With the original setting, lineskip=.1cm
, it gives this:
add a comment |Â
up vote
1
down vote
just show, that Steven B. Segletes's solution also work with my answer on your previous question:
beginfilecontents*FristProgram.java
import java.io.*;
class ShowFile
endfilecontents*
documentclass[svgnames]report
usepackagetikz
usetikzlibraryarrows,
backgrounds,
fit,
positioning,
shadows
usepackagelistings
usepackagegraphicx
definecolorcodegreenrgb0,0,0
definecolorcodegrayrgb0,0,0
definecolorcodepurplergb0,0,0
%definecolorbackcolourrgb0.95,0.95,0.92
definecolorbackcolourrgb1,1,1
lstdefinestylemystyle
backgroundcolor=colorbackcolour,
commentstyle=colorcodegreen,
numberstyle=tinycolorcodegray,
stringstyle=colorcodepurple,
basicstyle=normalsizettfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=none,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
lineskip=-2ex % <---
lstsetstyle=mystyle
begindocument
begincenter
begintikzpicture[
node distance = 8pt and 24pt,
box/.style = rectangle, rounded corners, draw, thick, fill=white,
text width=#1, inner xsep=10pt, inner ysep=20pt,
drop shadow=color=black
,
container/.style = rectangle, rounded corners, fill=gray,
text width=linewidth, inner xsep=10pt, inner ysep=20pt
]
%labelnum
node [box=0.95linewidth,align=center] (list)
hrule width hsize height 1pt
lstinputlisting[language=Java]FristProgram.java
hrule width hsize kern 1mm
hrule width hsize height 1pt
;
scoped[on background layer]
node [container, fit=(list)] ;
%labelnum
node [box=0.3linewidth, below right=of list.south west]
this\
is \
the \
first \
example;
node [box=0.3linewidth,below left=of list.south east]
this\
is \
the \
second \
example \
which \
is \
larger\
than \
first\
example;
endtikzpicture%
endcenter
enddocument
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
The lineskip=
parameter in your lstdefinestyle
controls this. Try changing it to lineskip=-.1cm
, for example:
With the original setting, lineskip=.1cm
, it gives this:
add a comment |Â
up vote
2
down vote
The lineskip=
parameter in your lstdefinestyle
controls this. Try changing it to lineskip=-.1cm
, for example:
With the original setting, lineskip=.1cm
, it gives this:
add a comment |Â
up vote
2
down vote
up vote
2
down vote
The lineskip=
parameter in your lstdefinestyle
controls this. Try changing it to lineskip=-.1cm
, for example:
With the original setting, lineskip=.1cm
, it gives this:
The lineskip=
parameter in your lstdefinestyle
controls this. Try changing it to lineskip=-.1cm
, for example:
With the original setting, lineskip=.1cm
, it gives this:
answered 2 hours ago


Steven B. Segletes
147k9186388
147k9186388
add a comment |Â
add a comment |Â
up vote
1
down vote
just show, that Steven B. Segletes's solution also work with my answer on your previous question:
beginfilecontents*FristProgram.java
import java.io.*;
class ShowFile
endfilecontents*
documentclass[svgnames]report
usepackagetikz
usetikzlibraryarrows,
backgrounds,
fit,
positioning,
shadows
usepackagelistings
usepackagegraphicx
definecolorcodegreenrgb0,0,0
definecolorcodegrayrgb0,0,0
definecolorcodepurplergb0,0,0
%definecolorbackcolourrgb0.95,0.95,0.92
definecolorbackcolourrgb1,1,1
lstdefinestylemystyle
backgroundcolor=colorbackcolour,
commentstyle=colorcodegreen,
numberstyle=tinycolorcodegray,
stringstyle=colorcodepurple,
basicstyle=normalsizettfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=none,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
lineskip=-2ex % <---
lstsetstyle=mystyle
begindocument
begincenter
begintikzpicture[
node distance = 8pt and 24pt,
box/.style = rectangle, rounded corners, draw, thick, fill=white,
text width=#1, inner xsep=10pt, inner ysep=20pt,
drop shadow=color=black
,
container/.style = rectangle, rounded corners, fill=gray,
text width=linewidth, inner xsep=10pt, inner ysep=20pt
]
%labelnum
node [box=0.95linewidth,align=center] (list)
hrule width hsize height 1pt
lstinputlisting[language=Java]FristProgram.java
hrule width hsize kern 1mm
hrule width hsize height 1pt
;
scoped[on background layer]
node [container, fit=(list)] ;
%labelnum
node [box=0.3linewidth, below right=of list.south west]
this\
is \
the \
first \
example;
node [box=0.3linewidth,below left=of list.south east]
this\
is \
the \
second \
example \
which \
is \
larger\
than \
first\
example;
endtikzpicture%
endcenter
enddocument
add a comment |Â
up vote
1
down vote
just show, that Steven B. Segletes's solution also work with my answer on your previous question:
beginfilecontents*FristProgram.java
import java.io.*;
class ShowFile
endfilecontents*
documentclass[svgnames]report
usepackagetikz
usetikzlibraryarrows,
backgrounds,
fit,
positioning,
shadows
usepackagelistings
usepackagegraphicx
definecolorcodegreenrgb0,0,0
definecolorcodegrayrgb0,0,0
definecolorcodepurplergb0,0,0
%definecolorbackcolourrgb0.95,0.95,0.92
definecolorbackcolourrgb1,1,1
lstdefinestylemystyle
backgroundcolor=colorbackcolour,
commentstyle=colorcodegreen,
numberstyle=tinycolorcodegray,
stringstyle=colorcodepurple,
basicstyle=normalsizettfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=none,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
lineskip=-2ex % <---
lstsetstyle=mystyle
begindocument
begincenter
begintikzpicture[
node distance = 8pt and 24pt,
box/.style = rectangle, rounded corners, draw, thick, fill=white,
text width=#1, inner xsep=10pt, inner ysep=20pt,
drop shadow=color=black
,
container/.style = rectangle, rounded corners, fill=gray,
text width=linewidth, inner xsep=10pt, inner ysep=20pt
]
%labelnum
node [box=0.95linewidth,align=center] (list)
hrule width hsize height 1pt
lstinputlisting[language=Java]FristProgram.java
hrule width hsize kern 1mm
hrule width hsize height 1pt
;
scoped[on background layer]
node [container, fit=(list)] ;
%labelnum
node [box=0.3linewidth, below right=of list.south west]
this\
is \
the \
first \
example;
node [box=0.3linewidth,below left=of list.south east]
this\
is \
the \
second \
example \
which \
is \
larger\
than \
first\
example;
endtikzpicture%
endcenter
enddocument
add a comment |Â
up vote
1
down vote
up vote
1
down vote
just show, that Steven B. Segletes's solution also work with my answer on your previous question:
beginfilecontents*FristProgram.java
import java.io.*;
class ShowFile
endfilecontents*
documentclass[svgnames]report
usepackagetikz
usetikzlibraryarrows,
backgrounds,
fit,
positioning,
shadows
usepackagelistings
usepackagegraphicx
definecolorcodegreenrgb0,0,0
definecolorcodegrayrgb0,0,0
definecolorcodepurplergb0,0,0
%definecolorbackcolourrgb0.95,0.95,0.92
definecolorbackcolourrgb1,1,1
lstdefinestylemystyle
backgroundcolor=colorbackcolour,
commentstyle=colorcodegreen,
numberstyle=tinycolorcodegray,
stringstyle=colorcodepurple,
basicstyle=normalsizettfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=none,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
lineskip=-2ex % <---
lstsetstyle=mystyle
begindocument
begincenter
begintikzpicture[
node distance = 8pt and 24pt,
box/.style = rectangle, rounded corners, draw, thick, fill=white,
text width=#1, inner xsep=10pt, inner ysep=20pt,
drop shadow=color=black
,
container/.style = rectangle, rounded corners, fill=gray,
text width=linewidth, inner xsep=10pt, inner ysep=20pt
]
%labelnum
node [box=0.95linewidth,align=center] (list)
hrule width hsize height 1pt
lstinputlisting[language=Java]FristProgram.java
hrule width hsize kern 1mm
hrule width hsize height 1pt
;
scoped[on background layer]
node [container, fit=(list)] ;
%labelnum
node [box=0.3linewidth, below right=of list.south west]
this\
is \
the \
first \
example;
node [box=0.3linewidth,below left=of list.south east]
this\
is \
the \
second \
example \
which \
is \
larger\
than \
first\
example;
endtikzpicture%
endcenter
enddocument
just show, that Steven B. Segletes's solution also work with my answer on your previous question:
beginfilecontents*FristProgram.java
import java.io.*;
class ShowFile
endfilecontents*
documentclass[svgnames]report
usepackagetikz
usetikzlibraryarrows,
backgrounds,
fit,
positioning,
shadows
usepackagelistings
usepackagegraphicx
definecolorcodegreenrgb0,0,0
definecolorcodegrayrgb0,0,0
definecolorcodepurplergb0,0,0
%definecolorbackcolourrgb0.95,0.95,0.92
definecolorbackcolourrgb1,1,1
lstdefinestylemystyle
backgroundcolor=colorbackcolour,
commentstyle=colorcodegreen,
numberstyle=tinycolorcodegray,
stringstyle=colorcodepurple,
basicstyle=normalsizettfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=none,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
lineskip=-2ex % <---
lstsetstyle=mystyle
begindocument
begincenter
begintikzpicture[
node distance = 8pt and 24pt,
box/.style = rectangle, rounded corners, draw, thick, fill=white,
text width=#1, inner xsep=10pt, inner ysep=20pt,
drop shadow=color=black
,
container/.style = rectangle, rounded corners, fill=gray,
text width=linewidth, inner xsep=10pt, inner ysep=20pt
]
%labelnum
node [box=0.95linewidth,align=center] (list)
hrule width hsize height 1pt
lstinputlisting[language=Java]FristProgram.java
hrule width hsize kern 1mm
hrule width hsize height 1pt
;
scoped[on background layer]
node [container, fit=(list)] ;
%labelnum
node [box=0.3linewidth, below right=of list.south west]
this\
is \
the \
first \
example;
node [box=0.3linewidth,below left=of list.south east]
this\
is \
the \
second \
example \
which \
is \
larger\
than \
first\
example;
endtikzpicture%
endcenter
enddocument
answered 22 mins ago
Zarko
113k861150
113k861150
add a comment |Â
add a comment |Â
Sadegh Eskandari is a new contributor. Be nice, and check out our Code of Conduct.
Sadegh Eskandari is a new contributor. Be nice, and check out our Code of Conduct.
Sadegh Eskandari is a new contributor. Be nice, and check out our Code of Conduct.
Sadegh Eskandari is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f451510%2fhow-to-decrease-the-line-spaces-in-listing-codes%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I'm not sure what you mean by that. If you try and set the “second example†with
ttfamily
and the same text as the “first exampleâ€Â, you'll see that the heights are essentially the same. You can trybasicstyle=linespread0.9normalfontttfamily
, if you so prefer.– egreg
1 hour ago