The main ideas will always be linked to the purpose of writing the text in the first place. This is because the author's purpose is what he wants the reader to learn/ retain, and therefore this can be translated into the main ideas of his text. Whatever talks about his purpose could be identified as the main idea.