Cross-linguistically, grammatical words like に and で are often unpredictable or idiosyncratic, and you can't always explain them logically.
For example, in English, we say arrive at but not *arrive to. And we say Welcome to X but not *Welcome at X. Why? No reason. It's arbitrary. It seems like the alternatives should be just as logical, but for some ...
For 座る, the place where (or object on which) one sits is marked with に. I would say that
～の近くで座る is unnatural
～の近くに座る is natural.
Verbs which are inherently linked to a location — such as 行く, 住む, いる, etc. — have this location marked by に.
Verbs for which the location is only circumstantial (i.e. additional information) — such as 食べる, 遊ぶ, 勉強する,...
I think you seem to be a little confused about the respective functions of に and で.
While it's true that their use in the sentences you provided could be seen as altering the emphasis in some of the ways you suggested, this is not because they have the function of providing the same meaning with different emphasis. Neither of them inherently add any notable ...
You use locative に ("[to be/exist / there's ~~] in [place]") with verbs ある, いる, 住む, 泊まる, etc., eg:
Hence your second example:
に is used because of the verb ある. ～～の中に here means "[to be/exist / there's~~] among [group of people/things]" and can be used with いる, ある, etc. A few examples:
The sentence sounds perfectly natural with で.
旅行者たちの間 is not the place 人気 exists. Actually, 人気 is present in そのホテル. Compare:
lit. As for the singer, there's popularity. / The singer has popularity. → The singer is popular.
lit. As for the player, there's prospect. / The player has ...
Because this で is interpreted as "with" which marks a "method", as in 鉛筆で書く (to write with a pencil). So 紙で書きます is unnatural.
However, 家で書きます makes sense. This で is interpreted as "at" which marks "place". It means "to write at home".
I'll answer the question based on the explanation here.
Both (1) and (2) are correct.
However, the nuance is slightly different.
(1) means "the place where you are sitting" is "near the window", while (2) means that the place where the act of "sitting" is done is "near the ...
In sentence 1, に is not functioning as a time expression. It's like for or as. "I have green tea for breakfast."
で when used as a time particle can indicate:
the age at which something was done: ２５歳で日本に行きました。At the age of 25 I went to Japan.
the end point of a period of time: １時間で宿題を終えた。I finished my homework in/after an hour.
Neither of these apply in ...
朝飯に茶を飲む drink tea as breakfast
朝飯で茶を飲む drink tea at breakfast
In case my English is weird, the former sounds as if the tea was the main part of the breakfast.
Only drinking tea, eating nothing else, and calling it 朝飯 is not usual, I think.
朝飯にトーストを食べる sounds good, though.
"朝飯のみで茶を飲む" means the speaker drinks tea while having breakfast but not during the ...
As for 待つ, it's always used with で. I don't know when to use に.
As for 寄る, に is used in the same way as ～に行く ("go to ～"), ～に来る ("come to ～"), ～に向かう ("head to ～"), ～に送る ("send (something) to ～"), etc. It's the primary particle that marks a destination.
That said, you cannot always expect a logical answer for this kind of question. You may find this ...
As a place marker, you have to use で instead of these two に. に is used with motion verbs (such as 行く, 来る, 動く) and verbs that describes existence (such as いる, ある, 住む). See: Particles: に vs. で
This is a typical case where contrastive-wa has to be used.
I think there are a bit too many commas, although this is a minor problem.
I don't think this is で used as temporal particle. I would read it as でも meaning "either or", "both..." as in ＡでもＢでも.
This applies to all nouns, for example:
English or Japanese, both are OK.
So your sentence could be translated as:
Day or night, you can catch a taxi in Japan.
This is a supplementary answer to compliment Chocolate's answer, written to meet the OP's request for technical reference.
に vs で is covered in "A Students' Guide to Japanese Grammar" by Naomi McGloin on p62.
As Chocolate indicates and this book explains: で marks the location of action, に marks the location of existence.
1) Some verbs characteristically ...
I agree with Chocolate's answer: で shows where you are when you perform the action of making the friend, に shows where the result of the action ends up.
I believe this is described in Roy Miller's "Reference Grammar of Japanese", but I have misplaced my copy. If you can find a copy of this I recommend it.
Other examples of に although not quite the same:
When a word takes で even without 以外, it still takes で with 以外:
Notice that we can say 現金で支払う, 東京で働く, 炊飯器でお米を炊く. This explains 病気などの理由以外で, too (理由 safely takes で).
Next, what about 逃げる以外で? 逃げるで of course makes no sense because 逃げる is not even a noun. This type of で is a kind of condition marker, and 逃げる以外で sounds like ...
A simple explanation about the difference between ところに/へ and ところで is that the former takes not only time but space aspect of an event into consideration.
X ところで Y: Y at the same moment X happens
X ところへ/に Y: Y at the same moment, same place X happens
Both will work in this example, because according to my common sense, it instructs ...
私は車の中に座っている is more natural. When you use the verb 座る, the particle に is used to mark the thing on/in which the sitting is happening. I can understand your confusion because 座る is a tricky example.
Sometimes it helps to analyse sentences in terms of its main message. This is very general advice but, is the sentence mainly trying to describe a 'what' (the ...
Edited: Only 紙に書きます is correct, when you mean "write on paper". 紙で書きます is by no means a normal saying. This is because when they are used to indicate a location, で means "static" place while に means "directional" place. This is not an exceptional distinction among languages while English generally lacks it, but I am not sure whether you already know about it ...
I am wondering as to why で was used after 間 instead if に as I would expect because it is talking about popularity being present. What is the general definition for this usage of で？
I think we native speakers are also confused about things like this because we are using them without knowing the grammar, but I feel the same way ...
You use に for a locative case that modifies some kinds of verbs including ある, as you say, so the example sentence goes "…の中に あって" and "どこにでも…ある.
However, you basically use で for locative case in general. Now, suppose you are trying to modify the whole closes of 建物の中にあって and どこにでも…ある instead of mere あって and ある with some locative case, you'd use ...
As Szymon says, you have not given an appropriate example: In your sentence でも is being used to give two options but で can be used to indicate when something finishes or a duration:
-> finishing time:
My work finishes at 5pm.
You could also use に but whereas に is a more general particle that gives the time at which an event occurs (ie ...
I've always thought that if you use ある, you have to use に. I learned recently that this is sometimes wrong. There's a case where using X に or X で depends on what X is.
で is correct here because コンサート is an event.
５階建ビルにオフィスが５つある。(オフィス: Since an office is tangible, に is more natural)