KTUG 한국 텍 사용자 그룹

Menu

KTUG :: 마당자유글 › 목록 라벨 형식 바꾸기

yihoze | 2016.03.28 10:58:25 | 메뉴 건너뛰기 쓰기

http://www.ktug.org/xe/index.php?document_srl=217948&mid=KTUG_QnA_board


이 글타래에서 불량양파님이 제기한 문제가 description 목록과 다르지 않다는 생각이 들었습니다. 이것은 전에 제가 만들어둔 terms 환경으로 충분히 구현됩니다. 라벨 형식을 임의로 변경할 수 있게 해주는 패키지들이 있습니다. mdwlist, enumitem 등이지요.

그런데 description 목록에 대해서는 한국적(?) 정서를 충족시키지 못합니다. 많은 사람들이 description 목록에서도 총알(bullet)이나 표처럼 설명부가 정렬되기를 원하죠. 그래서 mdwlist 같은 목록 관련 패키지들이 훌륭한데도 2% 부족함을 느끼게 됩니다.


오늘 terms 환경에 multiline 옵션을 추가했습니다. 사실 저는 프리미티브 명령이나 변수들 잘 모릅니다. 프로그래밍으로 치자면, 비유가 적절한지 모르겠지만, 드라이버 수준에서 만드는 거 잘 모르고 재미도 못 느낍니다. 저는 남들이 만들어 놓은 것들을 모방해서 애플리케이션 수준으로 만드는 것만 합니다. 


각설하고, terms 환경으로 이렇게 만들 수 있습니다.


hzguide_terms_multiline.PNG


\documentclass{hzguide}
\LayoutSetup{paper=A4}
\def\foo{
You can also click the left mouse button to move point to the position clicked. Emacs also
provides a variety of additional keyboard commands that move point in more sophisticated
ways.
\begin{terms}
\item[C-f]  Move forward one character (\texttt{forward-char}).
\item[LEFT RIGHT] This command (\texttt{right-char}) behaves like \texttt{C-f}, 
with one exception: when editing
right-to-left scripts such as Arabic, it instead moves \textit{backward} if the current
paragraph is a right-to-left paragraph. See Section 19.19 [Bidirectional Editing],
page 197. If \texttt{visual-order-cursor-movement} is non-\texttt{nil}, this command
moves to the character that is to the right of the current screen position, moving
to the next or previous screen line as appropriate. Note that this might potentially
move point many  buffer positions away, depending on the surrounding
bidirectional context.
\item[C-b] Move backward one character (\texttt{backward-char}).
\item[LEFT] This command (\texttt{left-char}) behaves like \texttt{C-b}, 
except it moves \textit{forward} if the
current paragraph is right-to-left. See Section 19.19 [Bidirectional Editing],
page 197. If \texttt{visual-order-cursor-movement} is non-\texttt{nil}, this command moves
to the character that is to the left of the current screen position, moving to the
previous or next screen line as appropriate.
\end{terms}
}
\begin{document}
\TermsSetup{font=\ttfamily, base={LEFT RIGHT}}
\foo
\TermsSetup{font=\sffamily, multiline=true, labelwidth=1.5cm}
\foo
\TermsSetup{font=\bfseries, multiline=false, newline=true, topsep=.5\baselineskip, itemsep=1ex}
\foo
\end{document}

오늘 구현한 것이 multiline 옵션입니다. 라벨을 두 줄 이상 표현할 필요가 있는 경우를 위하여 이 옵션을 추가했습니다. 이 예에서 "LEFT RIHGT"입니다.


혹시나 이를 테스트해 보고 싶으시다면 깃허브에서 hzguide.cls를 내려받으세요.


https://github . com/YiHoze/HzGuide/

첨부 [1]

댓글 [2]

댓글 쓰기

목록

KTUG 한국 텍 사용자 그룹