KTUG마당은 KTUG를 방문하는 모든 이용자가 대화를 나누고 소식을 전하는 곳입니다.

  • 로그인 없이 자유롭게 글을 읽고 쓸 수 있는 철학은 처음과 같이 계속됩니다.
  • Team Blog의 글을 이곳 게시판의 "정보글"로 모았습니다. Team blog는 기고자가 올린 글에 질문을 받는 부담을 줄이기 위하여 댓글을 허용하지 않았습니다. 그러나 이곳 게시판으로 모으면서 댓글을 달 수 있습니다. 게시물을 작성하실 때 댓글을 원하지 않으시면 댓글을 허용하시지 않으시기를 바랍니다. 또한 불필요한 소모성 댓글을 달지 않도록 주의하여 주시기를 바랍니다.
  • TeX과 관련된 질문이나 답변은 QnA 마당을 이용하십시오. TeX과 관련된 질문은 지웁니다
  • MathJax를 이용한 수식조판을 사용하실 수 있습니다. 여기를 참조하세요.
  • 스팸 글을 막기 위하여 짧은 시간 내에 다시 글이 등록되는 IP를 막거나, 광고 글을 막기 위하여 금지어로 .com, .net 등을 설정하고 있습니다. 다소간의 불편함이 있으시더라도 양해 바랍니다.
    • 금지어에서 stackexchange, stackoverflow, ctan, overleaf, , github, google.com, gmail.com, .org, .io, sil.org, wiki.com, tistory.com등은 해제하였습니다.
  • 사용하는 편집기는 CKeditor입니다. 편집기에서 [enter]를 누르면 <p> 태그가 들어가고, 문단으로 생각하고 한줄을 비웁니다. 글줄만 바꾸려면 shift-enter 를 누르시면 <BR>가 들어가므로 용도에 맞게 나누어 쓸 수 있습니다.

자유글 yihoze님의 지워진 글에 대한 코멘트

2023.12.05 20:04

noname 조회 수:215

게시글이 올라온 것을 보고 한참 답변글을 작성하다가 submit 버튼을 눌렀더니 그런 글이 없다네요.

분한 마음에(^^) hoze님의 블로그를 찾아가서 같은 주제의 새 포스팅을 보고 간략히 답변을 답니다.

%!TEX program = lualatex
\documentclass{article}
\usepackage{luacode}
\usepackage[svgnames]{xcolor}

\newcommand*\myHighlight[1]{\textcolor{blue}{\itshape #1}}
\newcommand*\dream[1]{\textcolor{SeaGreen}{\bfseries #1}}
\begin{luacode}
function Replace_some_words ( s )
	s = s:gsub ( "([^\\])freedom", "%1\\myHighlight{freedom}" )
	s = s:gsub ( "([^\\])dream", "%1\\myHighlight{dream}" )
	s = s:gsub ( "([^in\\])justice", "%1\\myHighlight{justice}" )
	return s
end
\end{luacode}

\luaexec{
	luatexbase.add_to_callback ("process_input_buffer", Replace_some_words, "justice_justice")
}

\begin{document}

I have a dream.

It is obvious today that \dream{America} has defaulted on this promissory note, insofar as 
her citizens of color are concerned.
Instead of honoring this sacred obligation, America has given the Negro people a bad check, 
a check which has come back marked insufficient funds.
But we refuse to believe that the bank of justice is bankrupt.

We refuse to believe that there are insufficient funds in the great vaults of opportunity 
of this nation.
And so, we've come to cash this check, a check that will give us upon demand the riches of 
freedom and the security of justice.
We have also come to this hallowed spot to remind America of the fierce urgency of now.
This is no time to engage in the luxury of cooling off or to take the tranquilizing drug 
of gradualism.

Now is the time to make real the promises of democracy.
Now is the time to rise from the \dream{dark and desolate valley of segregation} to the 
sunlit path of racial justice.
Now is the time to lift our nation from the quicksands of racial injustice to the solid 
rock of brotherhood.
Now is the time to make justice a reality for all of God's children.

\end{document}

코멘트를 작성하려 한 이유는 만약에 \dream이라는 매크로가 있을 경우에 어떻게 할 것인가라는 생각 때문이었습니다.

scrshota.png

 

번호 제목 글쓴이 날짜 조회 수
1128 [알림] 홈페이지 리뉴얼과 게시판 변경에 관하여 [4] 관리자 2010.12.23 322182
1127 제주 전용서체 [5] file Progress 2010.06.15 218020
1126 원숫자 file yihoze 2014.01.02 216072
1125 [공지] ko.TeX Live 2010 발표 [11] 관리자 2010.11.07 189409
1124 ko.TeX Live 2013 배포 [6] file 관리자 2013.10.12 175079
1123 한글텍사용자그룹/한국텍학회 웹 사이트 및 서비스 복구에 관한 말씀 관리자 2013.05.06 160066
1122 TeX Live 2016 pretest 설치 안내 [11] 관리자 2016.06.05 150844
1121 [공지] ko.TeX Live 2009 발표 [9] MadToad 2009.12.23 150475
1120 TeX의 수명이 긴 이유 그리고 널리 쓰이지 않는 이유 [45] 메타 2010.06.02 147971
1119 [공지] ko.TeX Live 2011 발표 [9] 관리자 2011.07.29 144682
1118 MathJax를 이용하여 웹에서 수식을 써 봅시다 [27] file 샘처럼 2010.12.29 142845
1117 [공지] お知らせ: TeXユーザの集い 2010 開催予定 (10/23土@東大生研) [1] ChoF 2010.02.01 137863
1116 An Earthshaking Announcement [6] 작은나무 2010.07.12 131472
1115 기존 회원이 아닌데 회비를 납부하신 분 [1] yihoze 2019.12.13 129092
1114 prologue vs preamble vs preface vs foreword 는 무슨 차이인가요? [4] 에드 2011.02.23 128554
1113 TeX Live 2010을 대비한 ko.TeX 프리테스트 [14] DohyunKim 2010.07.14 127990
1112 TeX Live 2013과 ko.TeX 설치 관련 안내 [11] 관리자 2013.09.01 126175
1111 [공지] 한국텍학회 회비를 입금한 분들 중 회원 미등록자 분들께 [7] 관리자 2011.10.20 123306
1110 (ko.) TeX Live 2014 설치를 권장합니다. [37] nanim 2014.07.14 121997
1109 한글 url 문제 [3] file noname 2020.03.08 121994



XE Login