How to close the frame number near the footer in the listings environment
up vote
1
down vote
favorite
I'm using listings to format blocks of code in my xeLaTeX.I found that when I insert a piece of code, the output image will generate a number in the bottom footer. When I insert this picture into Anki's card, it will open a long, large blank.
Following is my MWE:
documentclass{article}
usepackage{tcolorbox,listings}
usepackage{listings}
usepackage{color}
usepackage{tikz}
usepackage{framed}
definecolor{background}{HTML}{EEEEEE}
definecolor{comments}{HTML}{868686}
definecolor{darkred}{RGB}{139,0,0}
definecolor{darkblue}{RGB}{0,0,139}
definecolor{chartreuse}{RGB}{127,255,0}
definecolor{drakgreen}{RGB}{0,128,0}
definecolor{lightgray}{RGB}{238,239,240}
lstset{
language=[LaTeX]Tex,
keywordstyle=color{darkblue},
texcsstyle=*color{blue},
basicstyle=normalfontttfamily,
commentstyle=color{comments}ttfamily,
stringstyle=rmfamily,
numbers=none,
numberstyle=scriptsize,
numbersep=8pt,
showstringspaces=false,
breaklines=true,
frameround=ftff,
captionpos=t,
belowcaptionskip=0em,
belowskip=0em,
literate=
*{{}{{textcolor{darkred}{{}}}{1}
{}}{{textcolor{darkred}{}}}}{1}
{[}{{textcolor{darkred}{[}}}{1}
{]}{{textcolor{darkred}{]}}}{1},
}
lstdefinestyle{mystyle}{
language=[LaTeX]Tex,
extendedchars=true,
breaklines=true,
breakatwhitespace=true,
basicstyle=ttfamily,
numbers=none,
keywordstyle=color{darkblue},
keywordstyle=[2]color{blue},
keywordstyle=[3]color{darkblue},
keywordstyle=[4]color{drakgreen},
alsoletter = {!},
keywords=[2]{definecolor,node,addplot},
keywords=[3]{usepackage},
keywords=[4]{begin,end,document,figure,figure*,axis}
}
tcbuselibrary{listings,skins,breakable}
newtcblisting{mycode}{
arc=0mm,
top=0mm,
bottom=0mm,
left=3mm,
right=0mm,
width=textwidth,
boxrule=1pt,
colback=lightgray,
listing only,
listing options={style=mystyle},
breakable
}
begin{document}
begin{mycode}
documentclass{article} % say
usepackage{tikz}
begin{document}
We are working on
begin{tikzpicture}
draw (-1.5,0) -- (1.5,0);
draw (0,-1.5) -- (0,1.5);
end{tikzpicture}.
end{document}
end{mycode}
We are working on
end{document}
It generates such an image:
How do I close the frame number near the footer so that the resulting image size is appropriate?
xetex
add a comment |
up vote
1
down vote
favorite
I'm using listings to format blocks of code in my xeLaTeX.I found that when I insert a piece of code, the output image will generate a number in the bottom footer. When I insert this picture into Anki's card, it will open a long, large blank.
Following is my MWE:
documentclass{article}
usepackage{tcolorbox,listings}
usepackage{listings}
usepackage{color}
usepackage{tikz}
usepackage{framed}
definecolor{background}{HTML}{EEEEEE}
definecolor{comments}{HTML}{868686}
definecolor{darkred}{RGB}{139,0,0}
definecolor{darkblue}{RGB}{0,0,139}
definecolor{chartreuse}{RGB}{127,255,0}
definecolor{drakgreen}{RGB}{0,128,0}
definecolor{lightgray}{RGB}{238,239,240}
lstset{
language=[LaTeX]Tex,
keywordstyle=color{darkblue},
texcsstyle=*color{blue},
basicstyle=normalfontttfamily,
commentstyle=color{comments}ttfamily,
stringstyle=rmfamily,
numbers=none,
numberstyle=scriptsize,
numbersep=8pt,
showstringspaces=false,
breaklines=true,
frameround=ftff,
captionpos=t,
belowcaptionskip=0em,
belowskip=0em,
literate=
*{{}{{textcolor{darkred}{{}}}{1}
{}}{{textcolor{darkred}{}}}}{1}
{[}{{textcolor{darkred}{[}}}{1}
{]}{{textcolor{darkred}{]}}}{1},
}
lstdefinestyle{mystyle}{
language=[LaTeX]Tex,
extendedchars=true,
breaklines=true,
breakatwhitespace=true,
basicstyle=ttfamily,
numbers=none,
keywordstyle=color{darkblue},
keywordstyle=[2]color{blue},
keywordstyle=[3]color{darkblue},
keywordstyle=[4]color{drakgreen},
alsoletter = {!},
keywords=[2]{definecolor,node,addplot},
keywords=[3]{usepackage},
keywords=[4]{begin,end,document,figure,figure*,axis}
}
tcbuselibrary{listings,skins,breakable}
newtcblisting{mycode}{
arc=0mm,
top=0mm,
bottom=0mm,
left=3mm,
right=0mm,
width=textwidth,
boxrule=1pt,
colback=lightgray,
listing only,
listing options={style=mystyle},
breakable
}
begin{document}
begin{mycode}
documentclass{article} % say
usepackage{tikz}
begin{document}
We are working on
begin{tikzpicture}
draw (-1.5,0) -- (1.5,0);
draw (0,-1.5) -- (0,1.5);
end{tikzpicture}.
end{document}
end{mycode}
We are working on
end{document}
It generates such an image:
How do I close the frame number near the footer so that the resulting image size is appropriate?
xetex
Sorry, which frame number are you referring to? The page number?
– marmot
Nov 28 at 5:12
The bottommost one
– mcmxciv
Nov 28 at 5:30
This is the page number, I think. If you want to shrink your page, use the geometry package, or use the standalone class.
– marmot
Nov 28 at 5:34
If used geometry package, the longer code segment will be split into multiple blocks.
– mcmxciv
Nov 28 at 5:51
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm using listings to format blocks of code in my xeLaTeX.I found that when I insert a piece of code, the output image will generate a number in the bottom footer. When I insert this picture into Anki's card, it will open a long, large blank.
Following is my MWE:
documentclass{article}
usepackage{tcolorbox,listings}
usepackage{listings}
usepackage{color}
usepackage{tikz}
usepackage{framed}
definecolor{background}{HTML}{EEEEEE}
definecolor{comments}{HTML}{868686}
definecolor{darkred}{RGB}{139,0,0}
definecolor{darkblue}{RGB}{0,0,139}
definecolor{chartreuse}{RGB}{127,255,0}
definecolor{drakgreen}{RGB}{0,128,0}
definecolor{lightgray}{RGB}{238,239,240}
lstset{
language=[LaTeX]Tex,
keywordstyle=color{darkblue},
texcsstyle=*color{blue},
basicstyle=normalfontttfamily,
commentstyle=color{comments}ttfamily,
stringstyle=rmfamily,
numbers=none,
numberstyle=scriptsize,
numbersep=8pt,
showstringspaces=false,
breaklines=true,
frameround=ftff,
captionpos=t,
belowcaptionskip=0em,
belowskip=0em,
literate=
*{{}{{textcolor{darkred}{{}}}{1}
{}}{{textcolor{darkred}{}}}}{1}
{[}{{textcolor{darkred}{[}}}{1}
{]}{{textcolor{darkred}{]}}}{1},
}
lstdefinestyle{mystyle}{
language=[LaTeX]Tex,
extendedchars=true,
breaklines=true,
breakatwhitespace=true,
basicstyle=ttfamily,
numbers=none,
keywordstyle=color{darkblue},
keywordstyle=[2]color{blue},
keywordstyle=[3]color{darkblue},
keywordstyle=[4]color{drakgreen},
alsoletter = {!},
keywords=[2]{definecolor,node,addplot},
keywords=[3]{usepackage},
keywords=[4]{begin,end,document,figure,figure*,axis}
}
tcbuselibrary{listings,skins,breakable}
newtcblisting{mycode}{
arc=0mm,
top=0mm,
bottom=0mm,
left=3mm,
right=0mm,
width=textwidth,
boxrule=1pt,
colback=lightgray,
listing only,
listing options={style=mystyle},
breakable
}
begin{document}
begin{mycode}
documentclass{article} % say
usepackage{tikz}
begin{document}
We are working on
begin{tikzpicture}
draw (-1.5,0) -- (1.5,0);
draw (0,-1.5) -- (0,1.5);
end{tikzpicture}.
end{document}
end{mycode}
We are working on
end{document}
It generates such an image:
How do I close the frame number near the footer so that the resulting image size is appropriate?
xetex
I'm using listings to format blocks of code in my xeLaTeX.I found that when I insert a piece of code, the output image will generate a number in the bottom footer. When I insert this picture into Anki's card, it will open a long, large blank.
Following is my MWE:
documentclass{article}
usepackage{tcolorbox,listings}
usepackage{listings}
usepackage{color}
usepackage{tikz}
usepackage{framed}
definecolor{background}{HTML}{EEEEEE}
definecolor{comments}{HTML}{868686}
definecolor{darkred}{RGB}{139,0,0}
definecolor{darkblue}{RGB}{0,0,139}
definecolor{chartreuse}{RGB}{127,255,0}
definecolor{drakgreen}{RGB}{0,128,0}
definecolor{lightgray}{RGB}{238,239,240}
lstset{
language=[LaTeX]Tex,
keywordstyle=color{darkblue},
texcsstyle=*color{blue},
basicstyle=normalfontttfamily,
commentstyle=color{comments}ttfamily,
stringstyle=rmfamily,
numbers=none,
numberstyle=scriptsize,
numbersep=8pt,
showstringspaces=false,
breaklines=true,
frameround=ftff,
captionpos=t,
belowcaptionskip=0em,
belowskip=0em,
literate=
*{{}{{textcolor{darkred}{{}}}{1}
{}}{{textcolor{darkred}{}}}}{1}
{[}{{textcolor{darkred}{[}}}{1}
{]}{{textcolor{darkred}{]}}}{1},
}
lstdefinestyle{mystyle}{
language=[LaTeX]Tex,
extendedchars=true,
breaklines=true,
breakatwhitespace=true,
basicstyle=ttfamily,
numbers=none,
keywordstyle=color{darkblue},
keywordstyle=[2]color{blue},
keywordstyle=[3]color{darkblue},
keywordstyle=[4]color{drakgreen},
alsoletter = {!},
keywords=[2]{definecolor,node,addplot},
keywords=[3]{usepackage},
keywords=[4]{begin,end,document,figure,figure*,axis}
}
tcbuselibrary{listings,skins,breakable}
newtcblisting{mycode}{
arc=0mm,
top=0mm,
bottom=0mm,
left=3mm,
right=0mm,
width=textwidth,
boxrule=1pt,
colback=lightgray,
listing only,
listing options={style=mystyle},
breakable
}
begin{document}
begin{mycode}
documentclass{article} % say
usepackage{tikz}
begin{document}
We are working on
begin{tikzpicture}
draw (-1.5,0) -- (1.5,0);
draw (0,-1.5) -- (0,1.5);
end{tikzpicture}.
end{document}
end{mycode}
We are working on
end{document}
It generates such an image:
How do I close the frame number near the footer so that the resulting image size is appropriate?
xetex
xetex
asked Nov 28 at 5:08
mcmxciv
647
647
Sorry, which frame number are you referring to? The page number?
– marmot
Nov 28 at 5:12
The bottommost one
– mcmxciv
Nov 28 at 5:30
This is the page number, I think. If you want to shrink your page, use the geometry package, or use the standalone class.
– marmot
Nov 28 at 5:34
If used geometry package, the longer code segment will be split into multiple blocks.
– mcmxciv
Nov 28 at 5:51
add a comment |
Sorry, which frame number are you referring to? The page number?
– marmot
Nov 28 at 5:12
The bottommost one
– mcmxciv
Nov 28 at 5:30
This is the page number, I think. If you want to shrink your page, use the geometry package, or use the standalone class.
– marmot
Nov 28 at 5:34
If used geometry package, the longer code segment will be split into multiple blocks.
– mcmxciv
Nov 28 at 5:51
Sorry, which frame number are you referring to? The page number?
– marmot
Nov 28 at 5:12
Sorry, which frame number are you referring to? The page number?
– marmot
Nov 28 at 5:12
The bottommost one
– mcmxciv
Nov 28 at 5:30
The bottommost one
– mcmxciv
Nov 28 at 5:30
This is the page number, I think. If you want to shrink your page, use the geometry package, or use the standalone class.
– marmot
Nov 28 at 5:34
This is the page number, I think. If you want to shrink your page, use the geometry package, or use the standalone class.
– marmot
Nov 28 at 5:34
If used geometry package, the longer code segment will be split into multiple blocks.
– mcmxciv
Nov 28 at 5:51
If used geometry package, the longer code segment will be split into multiple blocks.
– mcmxciv
Nov 28 at 5:51
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462104%2fhow-to-close-the-frame-number-near-the-footer-in-the-listings-environment%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Sorry, which frame number are you referring to? The page number?
– marmot
Nov 28 at 5:12
The bottommost one
– mcmxciv
Nov 28 at 5:30
This is the page number, I think. If you want to shrink your page, use the geometry package, or use the standalone class.
– marmot
Nov 28 at 5:34
If used geometry package, the longer code segment will be split into multiple blocks.
– mcmxciv
Nov 28 at 5:51