> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/ko/more-topics/26-how-to-write-a-latex-class-file-and-design-your-own-cv-part-2.md).

# LaTeX 클래스 파일을 작성하고 나만의 CV를 디자인하는 방법(2부)

[1부](/latex/ko/more-topics/25-how-to-write-a-latex-class-file-and-design-your-own-cv-part-1.md) | 2부

**저자: Cody Herring (2013년 6월)**

이것은 다음의 연속입니다 [LaTeX 클래스 파일을 작성하고 나만의 CV를 디자인하는 방법(1부)](/latex/ko/more-topics/25-how-to-write-a-latex-class-file-and-design-your-own-cv-part-1.md), CV를 만드는 더 많은 옵션과 이를 위해 클래스 파일을 사용하는 방법을 살펴봅니다.

지난 글에서는 2개의 파일을 만들었습니다: `cv.tex` 및 `my_cv.cls`. 콘텐츠 파일인, `cv.tex`에는 다음 내용이 포함되어 있었습니다:

```latex
\documentclass{my_cv}
\begin{document}
\section{Education}
\datedsubsection{University of Nowhere}{2004-2008}
\section{Work}
\datedsubsection{ABC Limited}{2008-Now}
\end{document}
```

`my_cv.cls` 일부 서식 기본값과 사용할 몇 가지 명령이 포함되어 있었습니다:

```latex
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{my_cv}[6/6/2013 custom CV class]
\LoadClass{article}
\RequirePackage{titlesec}
\titleformat{\section}       % \section 명령 사용자 지정
{\Large\scshape\raggedright} % \section 헤더를 크게(\Large),
                             % 작은 대문자(\scshape)로 하고 왼쪽 정렬(\raggedright)
  {}{0em}            % 'Section ...'처럼 모든 섹션에 접두사를 붙이는 데 사용할 수 있음
  {}                 % 제목 앞에 코드를 삽입하는 데 사용할 수 있음
  [\titlerule]       % 제목 뒤에 가로선을 삽입합니다
  \titleformat{\subsection}
  {\large\scshape\raggedright}
  {}{0em}
  {}
\newcommand{\datedsection}[2]{%
  \section[#1]{#1 \hfill #2}%
}
\newcommand{\datedsubsection}[2]{%
  \subsection[#1]{#1 \hfill #2}%
}
```

그러면 다음 문서가 생성됩니다:

![그림 1.png](/files/afe681601899449dff9e41dc6399c15e36a6c0ed)

다음 `#1` 및 `#2` 명령에 전달되는 첫 번째와 두 번째 인수 또는 매개변수를 가리킵니다. a의 첫 줄에서 `\newcommand` , 대괄호 안의 섹션, 예를 들어 `[2]` 는 함수에 전달되는 매개변수의 수를 나타냅니다. 그런 다음 함수는 다음을 사용하여 이러한 매개변수를 호출할 수 있습니다 `#1`, `#2` , 그리고 함수에 필요한 매개변수 수에 따라 계속됩니다. 더 많은 매개변수를 가진 함수는 이 글의 후반부에서 보여드리겠습니다.

이름과 연락처 섹션을 추가하고, 경력 및 기타 섹션도 계속 이어가겠습니다.

### 이름 및 연락처 정보

CV에서는 일반적으로 이름이 맨 위에 있고, 연락처 정보는 채용 연락을 위해 함께 표시됩니다. 이는 클래스 파일에 새 함수를 추가하여 구현할 수 있습니다. 이름은 간단한 함수를 사용해 추가할 수 있습니다:

```latex
\newcommand{\name}[1]{%
  \centerline{\Huge{#1}}
}
```

이렇게 하면 사용된 위치에 가운데 정렬된 큰 글꼴의 이름이 표시됩니다. 다음과 같이 호출할 수 있습니다:

```latex
\name{John Smith}
```

이제 연락처 정보입니다. 클래스 파일에 다음을 추가하세요:

```latex
\newcommand\contact[5]{%
    \centerline{%
        \makebox[0pt][c]{%
            #1 {\large\textperiodcentered} #2 {\large\textperiodcentered} #3
            \ #4 \ \ #5%
        }%
    }%
}
```

그런 다음 문서에서 함수를 호출합니다:

```latex
\contact{123 Broadway}{London}{UK 12345}{john@smith.com}{(000)-111-1111}
```

이렇게 하면 이름과 연락처 정보가 보기 좋게 표시됩니다:

![그림 2.png](/files/5c0e68171a9f52648bd6b6d155f992965a779812)

가운데에 글머리표 구분이 들어가 연락처 정보가 보기 좋게 서식화되어 표시됩니다. 필요하다면 두 번째 함수를 추가해 더 긴 주소에 맞게 조정할 수 있습니다:

```latex
\newcommand{\longcontact}[5]{%
    \noindent
    #1\hfill {\large\textperiodcentered}\hfill #2\hfill
    {\large\textperiodcentered}\hfill #3\\
    #4\hfill #5%
}
```

![스크린샷3.png](/files/c2b5f7c5e23f0fa72cfc10ea27a6135da8f1c0f1)

짧은 정보로는 조금 이상해 보이지만, 주소가 특히 길다면 더 유연하게 사용할 수 있습니다. 이 방법의 가장 좋은 점은 TeX 문서에 최소한의 변경만 필요하다는 것입니다:

```latex
\longcontact{123 Broadway}{London}{UK 12345}{john@smith.com}{(000)-111-1111}
```

이것이 클래스 파일을 사용하는 핵심입니다. 문서 내용의 변경을 최소화하면서, 표시 방식(콘텐츠가 어떻게 보이는지)을 외부에서 제어할 수 있게 해줍니다.

### 경력 섹션 확장하기

CV는 단순한 직무 목록만으로는 충분하지 않습니다. 각 항목 아래에 해당 직무에서 무엇을 했는지에 대한 설명을 추가해야 합니다. 직무당 3개의 글머리표는 상세함과 설명의 균형이 좋습니다. 노드를 추가하거나 제거하여 쉽게 조정할 수 있습니다. 클래스 파일에 다음을 추가하세요:

```latex
\newcommand{\workitems}[3]{%
    \begin{itemize}
    \item #1
    \item #2
    \item #3
    \end{itemize}%
}
```

다음을 `.tex` 파일에 추가하세요:

```latex
\workitems
{신제품 개발}
{생산성을 20\% 향상}
{비용을 \$10,000 절감}
```

이제 경력 섹션이 조금 더 풍성해 보입니다:

![그림 4.png](/files/e5df4a0a3a44796ca52f0ee9fbca14f6cb9828e5)

기술 섹션을 추가하면 이력서가 완성됩니다. 이는 클래스 함수를 사용하지 않았는데, LaTeX 코드가 크게 줄어들지 않았기 때문입니다:

```latex
\section{기술}

\begin{tabular}{l l l l}
C\# & T-SQL & Javascript & HTML \\
XML & JSON & SOAP & REST
\end{tabular}
```

그러면 다음과 같습니다:

![그림 5.png](/files/1c96d1f7ac876f5d9e896da57c4bfd43dc9f0a08)

### 결론

이 2부작 글을 통해 아주 기본적인 CV 템플릿을 얻으셨기를 바랍니다. 확장하고 새 섹션을 추가할 준비가 된 템플릿입니다.

전체 클래스 파일은 다음과 같습니다:

```latex
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{my_cv}[6/6/2013 custom CV class]
\LoadClass{article}
\RequirePackage{titlesec}

\titleformat{\section}
  {\Large\scshape\raggedright}
  {}{0em}
  {}
  [\titlerule]

  \titleformat{\subsection}
  {\large\scshape\raggedright}
  {}{0em}
  {}

\newcommand{\datedsection}[2]{%
  \section[#1]{#1 \hfill #2}%
}
\newcommand{\datedsubsection}[2]{%
  \subsection[#1]{#1 \hfill #2}%
}

\newcommand{\name}[1]{%
  \centerline{\Huge{#1}}%
}

\newcommand\contact[5]{%
    \centerline{%
        \makebox[0pt][c]{%
            #1 {\large\textperiodcentered} #2 {\large\textperiodcentered} #3
            \ #4 \ \ #5%
        }%
    }%
}

\newcommand{\longcontact}[5]{%
    \noindent
    #1\hfill {\large\textperiodcentered}\hfill #2\hfill
    {\large\textperiodcentered}\hfill #3\\
    #4\hfill #5%
}

\newcommand{\workitems}[3]{%
    \begin{itemize}
    \item #1
    \item #2
    \item #3
    \end{itemize}%
}
```

다음 `.tex` 파일은 다음과 같습니다:

```latex
\documentclass{my_cv}
\begin{document}
\name{John Smith}
\contact{123 Broadway}{London}{UK 12345}{john@smith.com}{(000)-111-1111}
\section{Education}
\datedsubsection{University of Nowhere}{2004-2008}
\section{Work}
\datedsubsection{ABC Limited}{2008-Now}
\workitems
{신제품 개발}
{생산성을 20\% 향상}
{비용을 \$10,000 절감}

\section{기술}
\begin{tabular}{l l l l}
C\# & T-SQL & Javascript & HTML \\
XML & JSON & SOAP & REST
\end{tabular}

\end{document}
```

그러면 다음 문서가 생성됩니다:

![그림 6.png](/files/5d961c35ddad63d1f900cf30bcaac3d3cb2c3d98)

이 튜토리얼은 CV를 시작하기 위한 훌륭한 출발점이 되어, 나중에 확장할 여지도 제공합니다.

[1부](/latex/ko/more-topics/25-how-to-write-a-latex-class-file-and-design-your-own-cv-part-1.md) | 2부


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/ko/more-topics/26-how-to-write-a-latex-class-file-and-design-your-own-cv-part-2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
