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:
enter image description here



How do I close the frame number near the footer so that the resulting image size is appropriate?










share|improve this question






















  • 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















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:
enter image description here



How do I close the frame number near the footer so that the resulting image size is appropriate?










share|improve this question






















  • 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













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:
enter image description here



How do I close the frame number near the footer so that the resulting image size is appropriate?










share|improve this question













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:
enter image description here



How do I close the frame number near the footer so that the resulting image size is appropriate?







xetex






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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


















  • 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















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents