how to write a LaTeX macro for conditional compiling? [closed] - macros

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I want to write some notes in the draft of a LaTeX document, and at a later point I want to compile the document without them. I saw someone doing something like the following (but I forgot what he did). Write notes as {\scriptsize some_text}, and in the end replace all {\scriptsize ...} with {} with a \newcommand. But I can't figure out how to write a \newcommand to replace all {\scriptsize some_text} occurrences by empty strings. I can then just comment or uncomment the \newcommand line.

Declare in the beginning of your file
\somevariabletrue
%\somevariablefalse
so you can quickly uncomment one and comment second, and in the later part of your code:
\ifsomevariable
...
\else
...
\fi

Related

Powershell solution required [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 days ago.
Improve this question
I have many text files in directory and sub directories. I want to add a Tab character before Device_Id but line must not contain Sender_Ip.
Device_Id is present in both lines either it's having Sender_Ip or not. I could replace Tab character but had replaced in both types of lines whereas I just want it to be replaced where Sende_Ip is not present.

What code should I put into a .PS1 file if I want to pipe into its filename? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 10 days ago.
The community is reviewing whether to reopen this question as of 10 days ago.
Improve this question
I want to do something like $foo | .\bar.ps1, and handle $foo inside bar.ps1. What's the minimal example of bar.ps1 in which I can access the value of $foo?
Edit:
The question has been closed, but I have found the answer: write in the file as if it's a function, but just strip function {} keyword, just put what you would put inside the {}. If you don't have a process{} block, use $input to access the piped value. If you have a process{} block, use $PSItem.
It's worth noting that $input can only be accessed once, so save it to a variable first.

How to keep function variable in workspace to avoid load .mat file repeatedly in matlab? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
function A(B,C)
load d.mat
my code
end
Is there a way that I can use d.mat file without load/import it. Or is there a way that do not need to load/import d.mat file every time I run function A.
You can pass the variable/content of d.mat as an extra parameter to the function A.

make emacs rgrep default to last search term rather than word at point [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
In emacs, is there a way to make rgrep default to searching the last term that was passed to it rather than the word at point? I almost always want to do the former rather than the latter. I looked at the help for rgrep, but it was silent on this point.
If you pick through the source code, you find that you can get what you want by setting the variable find-tag-default-function. You could also redefine the function grep-tag-default, or associate a property with the major mode via put. Here's a solution that sets the variable:
(setq find-tag-default-function 'last-grep-tag)
(defun last-grep-tag ()
(if grep-regexp-history
(car grep-regexp-history)
""))

Is there a free pgp key dumping program? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
is there any pgp key dumping program like http://www.pgpdump.net/ that also shows the MPI values as well as the other information? the linked website's program will print out ... for the long MPI, which is perfectly logical, but I want to see the values since my program is for some reason getting all but one part right (reading an elgamal public key), and its messing with everything that comes afterwards. i want to see where im off by a few bits
gpg --list-packets --debug-all should show MPI values.
pgpdump.net links to the source code of pgpdump. Perhaps you could find the part where ... is written and change it in a local copy of the program.