latex 配置

Bertha 。 2022-04-14 03:58 326阅读 0赞

在win和mac上latex的使用配置

windows10

  • 安装vscode
  • 安装ctex
  • 添加你安装的ctex的路径到windows的环境变量中
  • user settings如下

    “latex-workshop.latex.tools”: [

    1. {
    2. "name": "latexmk",
    3. "command": "latexmk",
    4. "args": [
    5. "-synctex=1",
    6. "-interaction=nonstopmode",
    7. "-file-line-error",
    8. "-pdf",
    9. "%DOC%"
    10. ]
    11. },
    12. {
    13. "name": "xelatex",
    14. "command": "xelatex",
    15. "args": [
    16. "-synctex=1",
    17. "-interaction=nonstopmode",
    18. "-file-line-error",
    19. "%DOC%"
    20. ]
    21. },
    22. {
    23. "name": "pdflatex",
    24. "command": "pdflatex",
    25. "args": [
    26. "-synctex=1",
    27. "-interaction=nonstopmode",
    28. "-file-line-error",
    29. "%DOC%"
    30. ]
    31. },
    32. {
    33. "name": "bibtex",
    34. "command": "bibtex",
    35. "args": [
    36. "%DOCFILE%"
    37. ]
    38. }
    39. ],
    40. "latex-workshop.latex.recipes": [
    41. {
    42. "name": "xelatex",
    43. "tools": [
    44. "xelatex"
    45. ]
    46. },
    47. {
    48. "name": "pdflatex",
    49. "tools": [
    50. "pdflatex"
    51. ]
    52. },
    53. {
    54. "name": "latexmk",
    55. "tools": [
    56. "latexmk"
    57. ]
    58. },
    59. {
    60. "name": "pdflatex -> bibtex -> pdflatex*2",
    61. "tools": [
    62. "pdflatex",
    63. "bibtex",
    64. "pdflatex",
    65. "pdflatex"
    66. ]
    67. }
    68. ],
    69. "files.associations": {
    70. "*.tex": "latex"
    71. },
    72. "latex-workshop.latex.clean.onFailBuild.enabled": true,
  • 支持中文

    %— coding: UTF-8 —

    \documentclass[12pt]{article}
    \usepackage[UTF8]{ctex}

    \title{模板}
    \author{Kevin}
    \date{2008/10/12}
    \begin{document}
    \maketitle
    \tableofcontents
    hello world
    \end{document}

Mac os

  • 安装vscode
  • 安装mactex
  • user settings

    “latex-workshop.latex.tools”: [

    1. {
    2. "name": "latexmk",
    3. "command": "latexmk",
    4. "args": [
    5. "-synctex=1",
    6. "-interaction=nonstopmode",
    7. "-file-line-error",
    8. "-pdf",
    9. "%DOC%"
    10. ]
    11. },
    12. {
    13. "name": "xelatex",
    14. "command": "xelatex",
    15. "args": [
    16. "-synctex=1",
    17. "-interaction=nonstopmode",
    18. "-file-line-error",
    19. "%DOC%"
    20. ]
    21. },
    22. {
    23. "name": "pdflatex",
    24. "command": "pdflatex",
    25. "args": [
    26. "-synctex=1",
    27. "-interaction=nonstopmode",
    28. "-file-line-error",
    29. "%DOC%"
    30. ]
    31. },
    32. {
    33. "name": "bibtex",
    34. "command": "bibtex",
    35. "args": [
    36. "%DOCFILE%"
    37. ]
    38. }
    39. ],
    40. "latex-workshop.latex.recipes": [
    41. {
    42. "name": "xelatex",
    43. "tools": [
    44. "xelatex"
    45. ]
    46. },
    47. {
    48. "name": "pdflatex",
    49. "tools": [
    50. "pdflatex"
    51. ]
    52. },
    53. {
    54. "name": "latexmk",
    55. "tools": [
    56. "latexmk"
    57. ]
    58. },
    59. {
    60. "name": "pdflatex -> bibtex -> pdflatex*2",
    61. "tools": [
    62. "pdflatex",
    63. "bibtex",
    64. "pdflatex",
    65. "pdflatex"
    66. ]
    67. }
    68. ],
    69. "files.associations": {
    70. "*.tex": "latex"
    71. },
    72. "latex-workshop.latex.clean.onFailBuild.enabled": true,
  • 支持中文

    %!TEX program = pdflatex
    \documentclass{article}

    \usepackage{CJKutf8}
    \usepackage{color}

    \begin{document}
    \begin{CJK}{UTF8}{bsmi}

    hello world

    \end{CJK}
    \end{document}

发表评论

表情:
评论列表 (有 0 条评论,326人围观)

还没有评论,来说两句吧...

相关阅读

    相关 latex

    基本用法 display(Latex('$$ a\div b = c $$')) display(Latex('$$ log_2 8 = 3 $$'))

    相关 latex

    LaTex数学公式汇总 1.希腊字母 希腊字母小写本质上就是希腊字母的英文\\(首字母小写)\\前面+转义符号`\`; 希腊字母大写本质上就是希腊字母的

    相关 latex 配置

    在win和mac上latex的使用配置 windows10 安装vscode 安装ctex 添加你安装的ctex的路径到windows的环境变量中