How do I remove all occurrences of certain latex commands from a tex fileConvert string to file name and use...
Why are electrically insulating heatsinks so rare? Is it just cost?
Why is consensus so controversial in Britain?
Could an aircraft fly or hover using only jets of compressed air?
Alternative to sending password over mail?
What is a clear way to write a bar that has an extra beat?
What typically incentivizes a professor to change jobs to a lower ranking university?
High voltage LED indicator 40-1000 VDC without additional power supply
Do infinite dimensional systems make sense?
Java Casting: Java 11 throws LambdaConversionException while 1.8 does not
Important Resources for Dark Age Civilizations?
How do I deal with an unproductive colleague in a small company?
Did Shadowfax go to Valinor?
Does object always see its latest internal state irrespective of thread?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
Was any UN Security Council vote triple-vetoed?
Cross compiling for RPi - error while loading shared libraries
dbcc cleantable batch size explanation
Which country benefited the most from UN Security Council vetoes?
Perform and show arithmetic with LuaLaTeX
How to determine what difficulty is right for the game?
Two films in a tank, only one comes out with a development error – why?
How old can references or sources in a thesis be?
Can a vampire attack twice with their claws using Multiattack?
What is the word for reserving something for yourself before others do?
How do I remove all occurrences of certain latex commands from a tex file
Convert string to file name and use in hrefHow to redefine commands and environments, and make them acceptable for `write`Command which replaces all occurrences of a certain character with another character?Include LaTeX commands from external file in asymptote filelist of all used commands in compiled *.tex-documentsAutomatically colourize all occurrences of certain strings (different colouring for different sets of words)Macros that define other macros, which also define other macroslabel: escape or remove LaTeX commandsHow to disable grouping for includestandaloneinput inside newcommand and macro parameters
In my tex file I have a bunch of commands of the form bla{ ... }
, where the ...
may span several lines. These commands bla{ ... }
contain some notes for myself, and should be removed from the tex file before sending it to my publisher. Note that I am supposed to send the tex file, not the pdf, so I cannot simply redefine the bla
macro to an empty macro. Any thoughts on how to do this as quickly as possible with a linux terminal command? (Or any other trick)
macros
add a comment |
In my tex file I have a bunch of commands of the form bla{ ... }
, where the ...
may span several lines. These commands bla{ ... }
contain some notes for myself, and should be removed from the tex file before sending it to my publisher. Note that I am supposed to send the tex file, not the pdf, so I cannot simply redefine the bla
macro to an empty macro. Any thoughts on how to do this as quickly as possible with a linux terminal command? (Or any other trick)
macros
So, what you want is to delete everything frombla{
to}
? The problem is that you have to take care of nested braces, for example,bla{foo textit{faa}}
. You can not delete until first}
.
– Sigur
7 hours ago
yes, even if there are new lines, and yes the nested braces are the one of the issues (also new lines).
– mnr
7 hours ago
1
So, maybe it is better to ask on another SE site, maybe StackOverflow, and ask how to manipulate text files and strings.
– Sigur
7 hours ago
3
Half joke, half serious: Does it take more time trying to find out a way to do this automatically or just doing it by hand?;-)
– campa
7 hours ago
add a comment |
In my tex file I have a bunch of commands of the form bla{ ... }
, where the ...
may span several lines. These commands bla{ ... }
contain some notes for myself, and should be removed from the tex file before sending it to my publisher. Note that I am supposed to send the tex file, not the pdf, so I cannot simply redefine the bla
macro to an empty macro. Any thoughts on how to do this as quickly as possible with a linux terminal command? (Or any other trick)
macros
In my tex file I have a bunch of commands of the form bla{ ... }
, where the ...
may span several lines. These commands bla{ ... }
contain some notes for myself, and should be removed from the tex file before sending it to my publisher. Note that I am supposed to send the tex file, not the pdf, so I cannot simply redefine the bla
macro to an empty macro. Any thoughts on how to do this as quickly as possible with a linux terminal command? (Or any other trick)
macros
macros
edited 7 hours ago
Mico
285k31388778
285k31388778
asked 7 hours ago
mnrmnr
1354
1354
So, what you want is to delete everything frombla{
to}
? The problem is that you have to take care of nested braces, for example,bla{foo textit{faa}}
. You can not delete until first}
.
– Sigur
7 hours ago
yes, even if there are new lines, and yes the nested braces are the one of the issues (also new lines).
– mnr
7 hours ago
1
So, maybe it is better to ask on another SE site, maybe StackOverflow, and ask how to manipulate text files and strings.
– Sigur
7 hours ago
3
Half joke, half serious: Does it take more time trying to find out a way to do this automatically or just doing it by hand?;-)
– campa
7 hours ago
add a comment |
So, what you want is to delete everything frombla{
to}
? The problem is that you have to take care of nested braces, for example,bla{foo textit{faa}}
. You can not delete until first}
.
– Sigur
7 hours ago
yes, even if there are new lines, and yes the nested braces are the one of the issues (also new lines).
– mnr
7 hours ago
1
So, maybe it is better to ask on another SE site, maybe StackOverflow, and ask how to manipulate text files and strings.
– Sigur
7 hours ago
3
Half joke, half serious: Does it take more time trying to find out a way to do this automatically or just doing it by hand?;-)
– campa
7 hours ago
So, what you want is to delete everything from
bla{
to }
? The problem is that you have to take care of nested braces, for example, bla{foo textit{faa}}
. You can not delete until first }
.– Sigur
7 hours ago
So, what you want is to delete everything from
bla{
to }
? The problem is that you have to take care of nested braces, for example, bla{foo textit{faa}}
. You can not delete until first }
.– Sigur
7 hours ago
yes, even if there are new lines, and yes the nested braces are the one of the issues (also new lines).
– mnr
7 hours ago
yes, even if there are new lines, and yes the nested braces are the one of the issues (also new lines).
– mnr
7 hours ago
1
1
So, maybe it is better to ask on another SE site, maybe StackOverflow, and ask how to manipulate text files and strings.
– Sigur
7 hours ago
So, maybe it is better to ask on another SE site, maybe StackOverflow, and ask how to manipulate text files and strings.
– Sigur
7 hours ago
3
3
Half joke, half serious: Does it take more time trying to find out a way to do this automatically or just doing it by hand?
;-)
– campa
7 hours ago
Half joke, half serious: Does it take more time trying to find out a way to do this automatically or just doing it by hand?
;-)
– campa
7 hours ago
add a comment |
0
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',
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%2f483382%2fhow-do-i-remove-all-occurrences-of-certain-latex-commands-from-a-tex-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
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.
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%2f483382%2fhow-do-i-remove-all-occurrences-of-certain-latex-commands-from-a-tex-file%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
So, what you want is to delete everything from
bla{
to}
? The problem is that you have to take care of nested braces, for example,bla{foo textit{faa}}
. You can not delete until first}
.– Sigur
7 hours ago
yes, even if there are new lines, and yes the nested braces are the one of the issues (also new lines).
– mnr
7 hours ago
1
So, maybe it is better to ask on another SE site, maybe StackOverflow, and ask how to manipulate text files and strings.
– Sigur
7 hours ago
3
Half joke, half serious: Does it take more time trying to find out a way to do this automatically or just doing it by hand?
;-)
– campa
7 hours ago