서론(Introduction)
기본적인 세팅을 합니다. 한 번 하고 난 다음에 다시 이 페이지로 돌아오지 않아도 됩니다. 단축키는 Section 2.1.4에 정리해두겠습니다. 결과만 알고 싶으시다면 전부 생략하시고 맨 아래의 Tip만 보시면 됩니다.
Set up the basic settings. You don't have to return to this page after doing it once. I'll summarize the shortcuts in Section 2.1.4. If you only want to know the result, you can skip everything and just refer to the tip at the bottom.
Step 1. Word Wrap
Ctrl + Shift + P를 입력하세요
Press Ctrl + Shift + P
Command Palette > Preference: Open User Settings
word wrap을 검색하여 'on'으로 설정합니다. 'on'으로 설정해두면 코드가 화면을 벗어나지 않습니다.
Search word wrap and set it to 'on'. Lines will wrap at viewport width
Step 2. LaTex 설정창 열기(Open Setting)
Extension에서 LaTex Workshop을 선택하고, 톱니바퀴 모양의 버튼을 클릭합니다.
In Extension, select LaTex Workshop, and click the gear button.
Command Palette로도 실행할 수 있습니다.
It can also be run using Command Palette.
Step 3. LaTex Workshop > Extension Settings
Step 2에서 Extension settings을 클릭하면 다음과 같은 화면을 확인할 수 있습니다. 다음의 키워드를 검색하고 설정하는 것을 추천합니다.
In Step 2, when you click on Extension settings, you can see the following screen. It is recommended to search for and set up the following keywords.
Synctex > After build: Enabled; Check
컴파일 후에 위치를 pdf 화면에 나타나게 해줍니다.
It allows the location to appear on the pdf screen after compilation.
View > Pdf > Internal > Synctex: Keybinding; double-click
pdf에서 더블 클릭을 하면 LaTex Code로 커서가 이동합니다.
Double-click on pdf moves the cursor to LaTex Code.
Step 4. LaTex Workshop > Extension Keyboard Shortcuts
Step 2에서 Extension Keyboard Shortcuts을 클릭하면 다음과 같은 화면을 확인할 수 있습니다. 다음의 키워드를 검색하고 설정하는 것을 추천합니다.
In Step 2, when you click on Extension Keyboard Shortcuts, you can see the following screen. It is recommended to search for and set up the following keywords.
'enviroment'를 검색하여 'LaTeX Workshop: Select the current environment'을 더블 클릭하고, keybinding을 'Alt+z'를 입력후 엔터를 입력합니다.
Search for 'environment', double-click on 'LaTeX Workshop: Select the current environment', input 'Alt+z' for the keybinding, and then press Enter.
마찬가지 방법으로 'cursor'를 검색하여 'LaTex Workshop: SyncTex from cursor'에서 'Ctrl + Alt + J'로 설정된 단축키를 'Alt+a'로 변경하세요.
이제 'Alt+a'를 입력하면 커서의 위치를 pdf 화면에 나타나게 해줍니다.
In the same way, search for 'cursor', and in 'LaTex Workshop: SyncTex from cursor', change the shortcut set to 'Ctrl + Alt + J' to 'Alt+a'.
Now, when you enter 'Alt+a', it will show the cursor's position on the pdf screen.
Step 5. Code Ace Jumper 설정(setting)
수식도 잘 인식하게 하기 위해서 다음과 같은 설정을 합니다.
To ensure proper recognition of mathematical expressions, the following settings are applied.
Command Palette > Preference: Open Settings (UI) > AceJump
'AceJump > Finder: Pattern'의 내용을 '\\$'을 새로 입력하여 '[ ,-.{_("'<\[ \\$]'으로 변경합니다.
Set the shortcut for 'AceJump: Jump' to 'Shift+Space'.
Command Palette > Preference: Open Keyboard Shortcuts
Code Ace Jumper를 검색해 'AceJump: Jump'의 단축키를 'Shift+Space'로 설정합니다.
Search Code Ace Jumper and set the shortcut for 'AceJump: Jump' to 'Shift+Space'.
Step 6. Todo Tree 설정(setting)
Command Palette > Preference: Open Settings (UI) > Todo tree
'Todo-tree > Highlights: Use Colour Scheme'를 체크합니다.
Check 'Todo-tree > Highlights: Use Colour Scheme'
tex 파일을 인식하게 하기 위해서 다음과 같은 설정을 합니다.
To enable the recognition of TeX files, the following settings are applied
'Todo-tree > Filtering: Include Globs'에 '**/*.tex'을 입력하고 'OK'를 클릭합니다.
Go to 'Todo-tree > Filtering: Include Globs' and enter '**/*.tex' and click 'OK'.
다른 확장자도 추가할 수 있습니다. (ex. '**/*.py', '**/*.ipynb')
You can add other file extensions as well (e.g., '/*.py', '/*.ipynb').
'Todo-tree > Regex: Regex'의 내용을 '((//|#|%|<!--|;|/\*|^)\s*($TAGS)|^\s*- \[ \])'으로 변경합니다.
Change the content of 'Todo-tree > Regex: Regex' to '((//|#|%|<!--|;|/\*|^)\s*($TAGS)|^\s*- \[ \])'
명령어를 바꿀 수도 있습니다. tags와 background는 순서대로 대응합니다.
You can also modify the commands. The tags and background correspond in the given order.
Tip. 제공된 json file 사용하기(Using the offered json file)
Section 1.5에서 제공된 기본 문서팩의 json file을 사용할 수 있습니다. 파일명은 'keybindings.json'과 'settings.json'입니다. 사용자의 OS에 따라 json file가 이동해야할 위치가 다릅니다. 경로는 다음과 같습니다. 해당 경로에 json을 옮기면 됩니다.
You can use the JSON file from the default document pack provided in Section 1.5. The file name are 'keybindings.json' and 'settings.json'. The location where the JSON file needs to be moved may vary depending on the user's operating system. The path is as follows. Simply move the JSON file to the respective path.
Windows %APPDATA%\Code\User
macOS $HOME/Library/Application\ Support/Code/User
Linux $HOME/.config/Code/User