11 events
when toggle format what by license comment
Apr 22 '21 at 23:01 comment added Michaël The third option seems to be broken, sadly. This seems like a very desirable feature, a shame that it's not available out of the box!
Apr 13 '17 at 12:35 history edited CommunityBot
replaced http://tex.stackexchange.com/ with https://tex.stackexchange.com/
Jun 29 '12 at 8:09 comment added mort This is so awesome, I almost cried! ;)
May 28 '12 at 12:58 history edited Paulo Cereda CC BY-SA 3.0
Added third method with function name.
May 11 '12 at 14:41 comment added Paulo Cereda @Konrad: Sorry, I was unaware of firstline and lastline! I updated my answer to reflect their use. :)
May 11 '12 at 14:40 history edited Paulo Cereda CC BY-SA 3.0
Updated with out-of-the-box solution.
May 11 '12 at 11:27 comment added Paulo Cereda @Konrad: I'm sorry, by your comment I imagined you thought I was using the function name. :) It indeed not feasible to use awk to get the function escope, that's why I tried the easier path with line ranges. :) I also believe in a TeX-only solution, but my TeX-fu is far from acceptable. :)
May 11 '12 at 11:19 comment added Konrad Rudolph I know what awk does. I misread your answer (and didn’t look at the source) as parsing out the relevant function by name and that’s not trivial, and not generally feasible with awk. But since you only use lines, that’s not a problem, true. Truth to be told, there should be a TeX-only solution for this problem as well … I’m going to think about this.
May 11 '12 at 10:51 comment added Paulo Cereda @Konrad: Thanks for the kind words. :) awk is very powerful with getting the line ranges for any file, but I can't think of a Windows counterpart command. We can use it with other languages too, not only C: awk just reads the text file and outputs the lines in the selected range, nothing more. :) I could only come up with this solution thanks to the minted manual, it's extremely well commented. Thanks a lot for this great package! :)
May 11 '12 at 7:05 comment added Konrad Rudolph Mercy? This is awesome! Now, if only I had time to integrate it in the package … but maybe soon! EDIT Actually, this is probably not portable enough, meaning it only works on C and only on simple functions … :(
May 11 '12 at 1:12 history answered Paulo Cereda CC BY-SA 3.0