I was trying to insert a tex file containing the code for a tikz graph into a main tex file. However, I got a problem. The graph always stands alone in an independent page. So any words before or after the inserting command will be a page ahead or a page afterward. The tex file was automatically generated by R package "tikzDevice"

My Latex code is very simple.

  \setmainfont{Microsoft Sans Serif}

This is what happened

My tikz tex code for the graph is as below:

  • 1
    Please don't use \resizebox for elements that contain text, like the graph you show us in your image. See tex.stackexchange.com/questions/425453/… for other possibilities instead of \resizebox – samcarter Dec 16 '18 at 12:59
  • Thank you samcarter! I would check it out! – Hanqing Wu Dec 16 '18 at 13:17

I just found the solution. I should use \input instead of \include!

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.