How can I remove the numeration of some titles in LaTeX? - latex

I'm writing my degree project report using the article class and I want a structure like this:
Abstract
Introduction
1. What
2. Where
3. Etc.
I was searching and I found that using \setcounter{secnumdepth}{-1} the complete numeration is eliminated. And if I use * these sections don't appear in the table of content. So what can I do? Can this be done without installing packages (like memoir)?
Note:
It was asked before, but I did not find it when I searched. Sorry :(

use:
\section*{Foo and Bar}
\addcontentsline{toc}{section}{Foo and Bar}

Using the * version of the section commands might help. Try \section*{Abstract} and see if it is close enough.

Related

How do I add a wireshark column that will display the value of an HTTP Request Query Parameter?

For example :
If I had http://somepage.com/somefolder/someresouce?p1=value&p2=value&p3=value
I would like to see a column that would display the value of p2 if it existed in the request.
I googled, asked people around but can't find a good answer.
If think creating a dissector might help, but I don't want to write a new dissector for http.. that's an overkill.
And there is no http.request.queryParams["p2"] syntax for use of Custom Column type.
Thanks in advance!
Edit : I solved my own Question, adding the best implementation so far in my own answer below.
Well, the solution was indeed in dissectors.
Wireshark help is not very good, the examples are ok though.
The main problem was that wireshark help defines that you can write your lua script, and place it in the plugins directory, which is searched recursively for lua files.
I did place my lua there and nothing worked, After almost 2 hours of fiddling, I found out instead of putting it in the plugins directory, it had to be in plugins//myScript.lua in order to work...
Now just to share my work :
To answer my own question :
http://pastebin.com/eANEut92

Emacs: Using a major-mode's font-locking only for mmm-mode

I've got MMM-mode set up to edit .html.erb files, but indentation does not work in the ruby sections, and all the different electric behaviours of ruby-mode do the wrong thing. I've changed this sub-mode from ruby-moode to fundamental-mode, and it works much better.
I want to still use ruby-mode's font-locking though, is this possible/easy? Any hints on where to start.
Elisp is comfortable to me, but I don't have too much time right now to dig too deeply myself. Hopefully someone will have a snippet?
I see you haven't yet found an answer. Dunno whether it will be better for this, but you might consider using MuMaMo instead of MMM.
To answer the question, you would define a major mode deriving from fundamental-mode, and in its body just copy the font-lock-related lines from the ruby-mode definition body, the ones setting font-lock- variables and also syntax-propertize-function. Naturally , you need to (require 'ruby-mode) somewhere.
But for .html.erb files I can now recommend using mmm-erb, which was not available when this question was asked.

add a new Color scheme to the Rad Studio

It's possible modify or change a color scheme (Color SpeedSetting) in the Rad-Studio?
There is an entry in the Windows Registry? or must edit some file?
Thanks in advance.
It doesn't look easy at first glance.
I found the following under then HKCU path:
\HKCU\Software\CodeGear\ETM\12.0\Color
with the following sub-keys
List item
Classic
Default
Ocean
Twilight
Each key has what appear to be color constants but there doesn't appear to be enough constants to make it the right section.
The list of values under each key:
Auto_TranslatedItemColor
EditBackgroundColor
EditForegroundColor IsOEM
Non_editBackgroundColor
Non_editForegroundColor
SelectionBackgroundColor
SelectionForegroundColor
TranslatedItemColor
UntranslatedItemColor UnusedItemColor
That's all I've got, with out spending a lot more time from the looks of it.
It's probably stored in a BPL as a Opentools API object.
Take a look at OP's https://github.com/rruz/delphi-ide-theme-editor, it supplies thousands of themes. Yes, the OP makes one himself.
Thanks for the OP's awesome project.
Thanks for #Nicholas point out this for me.

Problems with Netbeans re: Rails erb/rhtml intellisense?

I've been using Netbeans for Rails and like it a lot, considering how little I paid for it. But something that bothers me is that when I'm editing an RHTML or ERB file, it doesn't do the code autocomplete - or at least not reliably. Sometimes it shows the appropriate variables and methods that are available on an object after you type the dot operator. Sometimes it ignores the instance variables. Is there a solution for this? (Please don't say RadRails).
Oh and one more thing in case anyone has solved this: considering how often I have to type <% when I'm in a Rails template, I wish there was some hotkey for autotyping the tag . . . ? I always have to stop and look down at my keyboard to find the < and % keys before I can type the tag so it's not as trivial as it might sound.
I believe you're looking for something like this:
http://ruby.netbeans.org/codetemplates-rhtml.html
Type in one of the triggers, then hit the tab key to expand it to the code as given.
Also, you might want to explore using HAML. It's much easier on the hands.

Adding MS-Word-like comments in LaTeX

I need a way to add text comments in "Word style" to a Latex document. I don't mean to comment the source code of the document. What I want is a way to add corrections, suggestions, etc. to the document, so that they don't interrupt the text flow, but that would still make it easy for everyone to know, which part of the sentence they are related to. They should also "disappear" when compiling the document for printing.
At first, I thought about writing a new command, that would just forward the input to \marginpar{}, and when compiling for printing would just make the definition empty. The problem is you have no guarantee where the comments will appear and you will not be able to distinguish them from the other marginpars.
Any idea?
todonotes is another package that makes nice looking callouts. You can see a number of examples in the documentation.
Since LaTeX is a text format, if you want to show someone the differences in a way that they can use them (and cherry pick from them) use the standard diff tool (e.g., diff -u orig.tex new.tex > docdiffs). This is the best way to annotate something like LaTeX documents, and can be easily used by anyone involved in the production of a document from LaTeX sources. You can then use standard LaTeX comments in your patch to explain the changes, and they can be very easily integrated. If the document lives in a version control system of some sort, just use the VCS to generate a patch file that can be reviewed.
I have used changes.sty, which gives basic change colouring:
\added{new text}
\deleted{old text}
\replaced{new text}{old text}
All of these take an optional parameter with the initials of the author who did this change. This results in different colours used, and these initials are displayed superscripted after the changed text.
\replaced[MI]{new text}{old text}
You can hide the change marks by giving the option final to the changes package.
This is very basic, and comments are not supported, but it might help.
My little home-rolled "fixme" tool uses \marginpar where possible and goes inline in places (like captions) where that is hard to arrange. This works out because I don't often use margin paragraphs for other things. This does mean you can't finalize the layout until everything is fixed, but I don't feel much pain from that...
Other than that I heartily agree with Michael about using standard tools and version control.
See also:
Tips for collaboratively editing a LaTeX document (which addresses you main question...)
https://stackoverflow.com/questions/193298/best-practices-in-latex
and a self-plug:
How do I get Emacs to fill sentences, but not paragraphs?
You could also try the trackchanges package.
You can use the changebar package to highlight areas of text that have been affected.
If you don't want to do the markup manually (which can be tedious and interrupt the flow of editing) the neat latexdiff utility will take a diff of your document and produce a version of it with markup added to visually display the changes between the two versions in the typeset output.
This would be my preferred solution, although I haven't tested it out on large, multi-file documents.
The best package I know is Easy Review that provides the commenting functionality into LaTeX environment. For example, you can use the following simple commands such as \add{NEW TEXT}, \remove{OLD TEXT}, \replace{OLD TEXT}{NEW TEXT}, \comment{TEXT}{COMMENT}, \highlight{TEXT}, and \alert{TEXT}.
Some examples can be found here.
The todonotes package looks great, but if that proves too cumbersome to use, a simple solution is just to use footnotes (e.g. in red to separate them from regular footnotes).
Package trackchanges.sty works exactly the way changes.sty. See #Svante's reply.
It has easy to remember commands and you can change how edits will appear after compiling the document. You can also hide the edits for printing.

Resources