Question: I want to know what is the form for "when" in a phrase like "I was reading a book, when someone knocked on my door." I'm aware of the usage of "toki" in phrases like "When I was a teacher..." and "When I talk to someone, they run away...," but I'm not sure if I can use "toki" for "when" in the phrase I want to write ( I was reading a book, when someone knocked on my door and I had to stop reading the book ) . For example, I'm not sure if this phrase with "toki" does that. 

"私は本を読んでいたとき、彼が何か話した"

Because it looks like it means "When I was reading a book, he said something" which isn't quite what I want to reach. 

"I was reading a book, when he said something" < - Is what I want to know how to write 

"When I was reading a book, he said something" ! < - There is a difference

Answer: 
This type of "when" in English is called [non-restrictive relative clauses](https://en.wikipedia.org/wiki/Non-restrictive_clause) (非制限用法). The basic idea is that the *when*-clause gives an additional piece of information like an independent sentence, rather than adverbially modifying and "narrowing" the preceding noun.

Non-restrictive clauses appear tricky at first to the eyes of Japanese speakers who learn English. To translate English non-restrictive clauses without ambiguity, you often have to rephrase the sentence in various ways. Sometimes it may be even better to split the sentence into two or more sentences if the original sentence is long.

See examples here:

* [関係副詞「非制限用法の when」](https://reibunpo.com/kankei-fukushi/kankeifuku-when-hi.shtml)
* [関係副詞「非制限用法の where」](https://reibunpo.com/kankei-fukushi/kankeifuku-where-hi.shtml)
* [関係代名詞「主格・非制限用法の which」](https://reibunpo.com/kankei-daimeishi/kankeidai-which-hi-shu.shtml)

As you can see, you can often translate it as if it were two separate sentences, and connect them with appropriate conjunctions like と/たら/が/ので.

In your case,

> 
> I was reading a book, **when** someone knocked on my door.  
> 
> 私が本を読んでいた**ら**、誰かがドアをノックした。  
> 
> 私が本を読んでいる**と**、誰かがドアをノックした。  
> 
> 私は本を読んでいた。そのとき、誰かがドアをノックした。
> 
> 
> 

Similar examples (although these are not relative clauses):

> 
> * He ran and ran, **until** he was completely tired out.  
> 
> 彼は走り続け、(**そして/ついに/とうとう**)疲れ果ててしまった。
> * I knocked at the old door, **before**... *(To be continued)*  
> 
> 私はその古いドアをノックした。**すると**…… （次回に続く）
> 
> 
> 

(I definitely remember the last example using *before* because it was so impressive, but I don't know if it's actually common in English novels.)
I am not 100% sure to understand the difference you are trying to express in your question. In case I did not catch it, consider this answer just an extension about possible structures to express "while". 

Anyway, I think that one thing you could use is 〜ている間{あいだ}に, which is another expression to indicate "while (doing something)" and does not suppose that the actions are performed by the same person such as in the case (if I remember correctly) of ながら that someone suggested.

So in your case I think that something that expresses what you want to say could be: 

> 
> （私が）本{ほん}を読{よ}んでいる間に、彼{かれ}は何{なに}か言{い}った。
> 
> 
> 

You can have a look at this structure [here](http://japanesetest4you.com/flashcard/learn-jlpt-n3-grammar-%E3%81%AE%E3%81%82%E3%81%84%E3%81%A0%E3%81%AB-no-aida-ni/).

Maybe another way would be just switch the order of the sentence when translating in Japanese?

> 
> 彼が何か言った時、（私は）本を読んでいた。 
> 
> 
> 

This would be literally "When he said something, I was reading a book".