Hi,
I'm writing a document which is getting too big. So I decided to split it into different files using the command \include. To my surprise I'm not able to do a search in all files, as far as I understand it's possibile to do a search only in the file which you are working on.
Is there a way to do a multifile search?
Thank you for any help.
Nino
Texmaker and TeXstudio ⇒ Searching in files to be included
Searching in files to be included
Window + MiKTeX 2.7
Ubuntu + TexLive + Kile
Xandros (eeePC) + TeTex + TexMaker
Ubuntu + TexLive + Kile
Xandros (eeePC) + TeTex + TexMaker
Searching in files to be included
Couldn't you just use grep from the command line?
E.g.:
will search all the files in the folder for a given search word and return the filenames, line numbers and matching lines.
E.g.:
Code: Select all
grep -n "Search word" *
Searching in files to be included
I used to use a combination: Texmaker(X) for initial document preparation (entering text, commands and stuff) and TeXWorks for the second stage (reviewing and correcting mistakes; TeXWorks can search for a string in all open files). Also, Kile's projects allow you to search through all files that belong to a project.
EDIT: Actually, now I see that TexmakerX too has a search scope: "open documents". It seems that only TM is falling behind in that regard.
EDIT: Actually, now I see that TexmakerX too has a search scope: "open documents". It seems that only TM is falling behind in that regard.
Searching in files to be included
Are you serious? If so, I really fail to understand how it is possible to work this way! How long does it take to edit a big document split in several files?frabjous wrote:Couldn't you just use grep from the command line?
Thanks,
Nino
Window + MiKTeX 2.7
Ubuntu + TexLive + Kile
Xandros (eeePC) + TeTex + TexMaker
Ubuntu + TexLive + Kile
Xandros (eeePC) + TeTex + TexMaker
Re: Searching in files to be included
Thank you all for your attention. It seems that I have to get rid of Texmaker
Nino

Nino
Window + MiKTeX 2.7
Ubuntu + TexLive + Kile
Xandros (eeePC) + TeTex + TexMaker
Ubuntu + TexLive + Kile
Xandros (eeePC) + TeTex + TexMaker
Searching in files to be included
I'm not suggesting you do all your editing from the command line. Just multi-file finds and finds/replaces. (And if you want to do the replaces, you can use sed.)NinV wrote:Are you serious? If so, I really fail to understand how it is possible to work this way! How long does it take to edit a big document split in several files?frabjous wrote:Couldn't you just use grep from the command line?
If you stick with linux, you'll find more and more uses for the commandline. It does not slow things down. It speeds things up. You can batch-do anything. It helps that I always have at least one (typically four) teminals running, which I can access with a single key. (I use guake drop-down terminal; on Kubuntu you might prefer Yakuake.)
But by all means, if you want this feature in your editor, switch editors! I was just suggesting it in case you didn't want to switch. TexMakerX is of course the natural thing to move to from Texmaker. Your sig. suggests you know Kile already so I don't know why you're not using that. Are the KDE libs too much for your netbook?
I use vim personally, which of course has this feature, though I tend just to do things like this from the commandline, because, honestly, it's faster! Also, I don't constantly have to have every file in my project open at once eating up RAM when I'm only editing one of them.
-
- Posts: 30
- Joined: Tue Nov 13, 2012 4:18 pm
Searching in files to be included
I found the solution with GREP pretty useful.
I wanted just to add that you can search recursively in all the folders of the directory in which you are by using the following command:
I hope someone will find it useful.
I wanted just to add that you can search recursively in all the folders of the directory in which you are by using the following command:
Code: Select all
grep -rn "WordToSearch" *
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Searching in files to be included
Thanks, that's a very good addition! Not everybody knows the
Stefan
-r
switch. Older versions of grep
did not support recursive search, I think. In earlier times I used find
such as by find "." -name "*.tex" | xargs grep search <string>
.Stefan
LaTeX.org admin