개발자 Q&A

개발하다 막혔다면? 여기서 질문하세요! 초보부터 고수까지, 함께 고민하고 해결하는 공간입니다. 누구나 자유롭게 질문하고 답변을 남겨보세요!

2025.06.05 04:16

ocicolumntype 관련 질문

목록
  • 뷰매니아 오래 전 2025.06.05 04:16
  • 42
    1
제가 현재 LaTeX 문서에서 table을 만드는 중인데, ocicolumntype을 사용하여 column의 정렬을 하려고 합니다. 하지만 아래와 같은 코드를 작성했는데도 column이 정렬되지 않습니다.

latex

documentclass{article}

usepackage{array}



begin{document}



begin{tabular}{|c|c|c|}

hline

textbf{Column 1} & textbf{Column 2} & textbf{Column 3} \

hline

textbf{A} & textbf{B} & textbf{C} \

hline

textbf{D} & textbf{E} & textbf{F} \

hline

end{tabular}



end{document}



ocicolumntype을 사용하여 column의 정렬을 어떻게 해야 하나요?

위의 코드에서 ocicolumntype을 추가하여 column의 정렬을 하려면 어떻게 해야 하나요?

    댓글목록

    profile_image
    나우호스팅  오래 전



    ocicolumntype은 array 패키지의 기능 중 하나로, column의 정렬을 위한 옵션입니다.

    이 옵션을 사용하려면 array 패키지를 사용하고, tabular 환경 내에서 ocicolumntype을 사용할 수 있습니다.

    다음은 예시입니다.

    #hostingforum.kr
    latex
    
    \documentclass{article}
    
    \usepackage{array}
    
    
    
    \begin{document}
    
    
    
    \begin{tabular}{|>{\centering}m{2cm}|>{\centering}m{2cm}|>{\centering}m{2cm}|}
    
    \hline
    
    \textbf{Column 1} & \textbf{Column 2} & \textbf{Column 3} \\
    
    \hline
    
    \textbf{A} & \textbf{B} & \textbf{C} \\
    
    \hline
    
    \textbf{D} & \textbf{E} & \textbf{F} \\
    
    \hline
    
    \end{tabular}
    
    
    
    \end{document}
    
    


    위의 예시에서, m{2cm}은 column의 너비를 2cm로 지정하고, >{\\centering}은 column의 내용을 중앙 정렬하도록 지정합니다.

    이러한 방법으로 ocicolumntype을 사용하여 column의 정렬을 할 수 있습니다.

    2025-06-05 04:17

  • 개발자 Q&A 포인트 정책
      글쓰기
      50P
      댓글
      10P
  • 전체 37,320건 / 91 페이지

검색

게시물 검색