Python

When we cooperation with other within python, like in Cloud studio of tencent. We may find our indent is different with our friend when we input the code. You may make a file name “.editorconfig” in the root directory.

root = true

[*]
charset = utf-8
indent_style = tab
tab_width = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

However, when the python code are already mixed with tabs and spaces. Don’t worry.
Select Pycharm -> Edit -> Convert Indents. You will transform the whole file quickly without manually do it.

Matlab

When you copy the code to texstudio(seems not happend in Overleaf), the indent will vanish. It is the problem of default setting of Texstudio.
Select Options -> Configure Texstudio -> Editor -> Indentation mode. And choose Keep Indentation.
That will solve the problem.

   
   
   

Reference Version in Chinese from Google translation:

Python

当我们在python中与其他人合作时,例如腾讯的[Cloud studio](https://studio.dev.tencent.com/)。 输入代码时,我们可能会发现缩进与我们的朋友有所不同。 您可以在根目录创建一个文件名“ .editorconfig”。

根=真

[*]
字符集= utf-8
indent_style =制表符
tab_width = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

但是,当python代码已经与制表符和空格混合在一起时。 不用担心
选择Pycharm->编辑->转换缩进。 您无需手动进行操作即可快速转换整个文件。

Matlab

当您将代码复制到texstudio时(似乎在Overleaf中没有发生),缩进将消失。 这是Texstudio默认设置的问题。
选择选项->配置Texstudio->编辑器->缩进模式。 然后选择“保持缩进”。
这样可以解决问题。