Hide minted output completely without taking up spaceUsing minted with mixed Python code and outputGlobally...
Why has Russell's definition of numbers using equivalence classes been finally abandoned? ( If it has actually been abandoned).
Why Is Death Allowed In the Matrix?
Email Account under attack (really) - anything I can do?
A Journey Through Space and Time
Could a US political party gain complete control over the government by removing checks & balances?
Can you lasso down a wizard who is using the Levitate spell?
Can I make popcorn with any corn?
Can Medicine checks be used, with decent rolls, to completely mitigate the risk of death from ongoing damage?
Why CLRS example on residual networks does not follows its formula?
Can a German sentence have two subjects?
Is there a familial term for apples and pears?
Is Social Media Science Fiction?
Finding files for which a command fails
How to determine if window is maximised or minimised from bash script
Why does apt-get install python3 with a trailing hyphen remove a lot of packages?
Is it possible to do 50 km distance without any previous training?
What does "enim et" mean?
A function which translates a sentence to title-case
What would happen to a modern skyscraper if it rains micro blackholes?
Shell script can be run only with sh command
What are these boxed doors outside store fronts in New York?
How to make payment on the internet without leaving a money trail?
declaring a variable twice in IIFE
What Brexit solution does the DUP want?
Hide minted output completely without taking up space
Using minted with mixed Python code and outputGlobally change the font size in EPS figures (when using pdfLaTeX with pstool)minted creating garbage output on PDF fileHuge algorithm taking up spacedblatex generated output does not play nice with mintedusing linebreaks in minted environment without newline characterUse minted without unrestricted shell escapeIs it possible to hide some line numbers in the minted environment?Package minted Error: Missing Pygments outputCustom Pygments styles in minted not taking effect
Due to issues with Minted's escapeinside
option, I would like to include, but completely hide (without taking up any space), a minted
environment within my document. I do not want any of the content to be visible.
I've gotten pretty close with this hacky solution, which uses a tiny font size:
begin{minted}[fontsize=fontsize{0.01pt}{0.01pt}]{java}
public String someCode(String argument) {
// code here...
}
end{minted}
Is there a more elegant solution than just using a very small font size? Can I put it inside some sort of box, and set it to have a zero height? Can I float it somehow, such that it never gets actually shown anywhere in the document?
It's important that the code is actually processed. I therefore can't just comment it out, or use a if
.
floats minted
add a comment |
Due to issues with Minted's escapeinside
option, I would like to include, but completely hide (without taking up any space), a minted
environment within my document. I do not want any of the content to be visible.
I've gotten pretty close with this hacky solution, which uses a tiny font size:
begin{minted}[fontsize=fontsize{0.01pt}{0.01pt}]{java}
public String someCode(String argument) {
// code here...
}
end{minted}
Is there a more elegant solution than just using a very small font size? Can I put it inside some sort of box, and set it to have a zero height? Can I float it somehow, such that it never gets actually shown anywhere in the document?
It's important that the code is actually processed. I therefore can't just comment it out, or use a if
.
floats minted
add a comment |
Due to issues with Minted's escapeinside
option, I would like to include, but completely hide (without taking up any space), a minted
environment within my document. I do not want any of the content to be visible.
I've gotten pretty close with this hacky solution, which uses a tiny font size:
begin{minted}[fontsize=fontsize{0.01pt}{0.01pt}]{java}
public String someCode(String argument) {
// code here...
}
end{minted}
Is there a more elegant solution than just using a very small font size? Can I put it inside some sort of box, and set it to have a zero height? Can I float it somehow, such that it never gets actually shown anywhere in the document?
It's important that the code is actually processed. I therefore can't just comment it out, or use a if
.
floats minted
Due to issues with Minted's escapeinside
option, I would like to include, but completely hide (without taking up any space), a minted
environment within my document. I do not want any of the content to be visible.
I've gotten pretty close with this hacky solution, which uses a tiny font size:
begin{minted}[fontsize=fontsize{0.01pt}{0.01pt}]{java}
public String someCode(String argument) {
// code here...
}
end{minted}
Is there a more elegant solution than just using a very small font size? Can I put it inside some sort of box, and set it to have a zero height? Can I float it somehow, such that it never gets actually shown anywhere in the document?
It's important that the code is actually processed. I therefore can't just comment it out, or use a if
.
floats minted
floats minted
asked 14 hours ago
Adam WilliamsAdam Williams
1896
1896
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
We define a savebox with newsavebox
.
It's possible to then create an lrbox
environment (specifying the savebox name), and throw the minted
code listing inside a minipage
.
newsaveboxhideminted
begin{lrbox}{hideminted}begin{minipage}{textwidth}
begin{minted}[fontsize=fontsize{0.01pt}{0.01pt}]{java}
public String lookupUserNameByToken(String token) throws SQLException {
Statement stmt = connection.createStatement();
String query = "select * from users where ";
query += "token = '" + token + "'";
ResultSet rs = stmt.executeQuery(sql);
if (rs.next()) {
return rs.getString("name");
}
return null;
}
end{minted}
end{minipage}end{lrbox}
We then ensure that we never usebox{hideminted}
, and it will never actually appear in the document.
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
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%2f483681%2fhide-minted-output-completely-without-taking-up-space%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
We define a savebox with newsavebox
.
It's possible to then create an lrbox
environment (specifying the savebox name), and throw the minted
code listing inside a minipage
.
newsaveboxhideminted
begin{lrbox}{hideminted}begin{minipage}{textwidth}
begin{minted}[fontsize=fontsize{0.01pt}{0.01pt}]{java}
public String lookupUserNameByToken(String token) throws SQLException {
Statement stmt = connection.createStatement();
String query = "select * from users where ";
query += "token = '" + token + "'";
ResultSet rs = stmt.executeQuery(sql);
if (rs.next()) {
return rs.getString("name");
}
return null;
}
end{minted}
end{minipage}end{lrbox}
We then ensure that we never usebox{hideminted}
, and it will never actually appear in the document.
add a comment |
We define a savebox with newsavebox
.
It's possible to then create an lrbox
environment (specifying the savebox name), and throw the minted
code listing inside a minipage
.
newsaveboxhideminted
begin{lrbox}{hideminted}begin{minipage}{textwidth}
begin{minted}[fontsize=fontsize{0.01pt}{0.01pt}]{java}
public String lookupUserNameByToken(String token) throws SQLException {
Statement stmt = connection.createStatement();
String query = "select * from users where ";
query += "token = '" + token + "'";
ResultSet rs = stmt.executeQuery(sql);
if (rs.next()) {
return rs.getString("name");
}
return null;
}
end{minted}
end{minipage}end{lrbox}
We then ensure that we never usebox{hideminted}
, and it will never actually appear in the document.
add a comment |
We define a savebox with newsavebox
.
It's possible to then create an lrbox
environment (specifying the savebox name), and throw the minted
code listing inside a minipage
.
newsaveboxhideminted
begin{lrbox}{hideminted}begin{minipage}{textwidth}
begin{minted}[fontsize=fontsize{0.01pt}{0.01pt}]{java}
public String lookupUserNameByToken(String token) throws SQLException {
Statement stmt = connection.createStatement();
String query = "select * from users where ";
query += "token = '" + token + "'";
ResultSet rs = stmt.executeQuery(sql);
if (rs.next()) {
return rs.getString("name");
}
return null;
}
end{minted}
end{minipage}end{lrbox}
We then ensure that we never usebox{hideminted}
, and it will never actually appear in the document.
We define a savebox with newsavebox
.
It's possible to then create an lrbox
environment (specifying the savebox name), and throw the minted
code listing inside a minipage
.
newsaveboxhideminted
begin{lrbox}{hideminted}begin{minipage}{textwidth}
begin{minted}[fontsize=fontsize{0.01pt}{0.01pt}]{java}
public String lookupUserNameByToken(String token) throws SQLException {
Statement stmt = connection.createStatement();
String query = "select * from users where ";
query += "token = '" + token + "'";
ResultSet rs = stmt.executeQuery(sql);
if (rs.next()) {
return rs.getString("name");
}
return null;
}
end{minted}
end{minipage}end{lrbox}
We then ensure that we never usebox{hideminted}
, and it will never actually appear in the document.
answered 14 hours ago
Adam WilliamsAdam Williams
1896
1896
add a comment |
add a comment |
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.
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%2f483681%2fhide-minted-output-completely-without-taking-up-space%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