Q&A 마당은 텍 관련 질문/답변을 위해 만들었습니다.

  • 로그인 없이 자유롭게 글을 읽고 쓸 수 있는 철학은 처음과 같이 계속됩니다.
  • 질문 전에 아래를 읽어 보세요. 좋은 질문이 좋은 답을 받을 수 있는 좋은 방법입니다.
    • 질문에 맞는 제목을 붙이세요. 질문의 내용과 관련없는 "고수님", "긴급질문", "도와주세요"와 같은 제목은 답이 잘 올라오지 않습니다. 이 게시판에 올라오는 모든 글은 질문입니다. 굳이 [질문], [Q]를 적으실 필요도 없습니다.
    • 내용을 충실히 적어 주시고, 같은 상황을 재현할 수 있는 최소한의 예제가 같이 있어야 합니다.
    • 최소 예제는 "Minimal working example"을 읽어 보세요.
  • 파일을 첨부하실 때에는 가능한 압축하여 파일 크기를 줄여서 올려주시길 바랍니다.
  • 개인적으로 사용하신 글꼴이 들어 있는 경우, preparefont.sty에 관한 답변을 참조하세요.
  • 스팸 글을 막기 위하여 짧은 시간 내에 다시 글이 등록되는 IP를 막거나, 광고 글을 막기 위하여 금지어로 .com, .net 등을 설정하고 있습니다. 다소간의 불편함이 있으시더라도 양해 바랍니다.
    • 금지어에서 stackexchange, stackoverflow, ctan, overleaf, , github, google.com, gmail.com, .org, .io, sil.org, wiki.com, tistory.com등은 해제하였습니다.
  • MathJax를 이용한 수식조판을 사용하실 수 있습니다. 여기를 참조하세요.
  • 사용하는 편집기는 CKeditor입니다.
    • 편집기에서 [enter]를 누르면 <p> 태그가 들어가고, 문단으로 생각하고 한 줄을 비웁니다.
    • 글줄만 바꾸려면 [shift-enter]를 누르면 <BR> 태그가 들어가므로 용도에 맞게 나누어 쓸 수 있습니다.
    • 수식를 문서내에 삽입하시려면 에디터를 툴바에서 [소스]를 눌러 HTML로 입력할 수 있게 바꾸신 후 <pre> </pre> tag를 사용하셔서 <pre> 여러 줄의 수식 </pre>처럼 입력하시면 좋습니다.

이기문

지금까지 파악한 원인들입니다.
제제 질문의 제목을 바꿔야 할 듯 합니다.

" \paracol 이나 \setstretch 명령이 적용된 첫 줄이, 쪽 처음에서와 쪽 중간에서 다르게 적용되는 문제."


1. 쪽의 중간에 \paracol 환경을 시작했을 때
    각 컬럼의 첫줄의 폰트의 크기(높이)가 같지 않으면 첫줄이 정렬이 되지 않습니다.
    그래서 각 컬럼의 첫줄에 크기(높이)가 같도록, 이를테면, fake 글자를 넣었습니다. 
    \rule{0pt}{17.28pt}

    하지만 쪽의 처음에서 paracol 환경을 시작할 때 이 문제가 생기지 않습니다.

2. 쪽 중간에 \setstretch 명령을 주면 그 첫줄에 명령이 적용되어서
    첫줄 앞에(위에) 빈 공간을 만듭니다.
    그래서 빈 공간을 없애도록 강제로 끌어 올리는 명령을 주었습니다.
    \vskip-5\baselineskip

    하지만, 쪽의 처음에서 \setstretch 명령이 빈 공간을 만들지 않습니다.


그러니까 쪽의 첫줄에 뭔가 특별한 것이 있는가 봅니다.(당연히 그래야 하지만요.)


수정한 코드 입니다. 아래에 이 문제를 파악하기 위해 실험한 코드를 또한 첨부하였습니다.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%!TEX TS-program = xelatex
%!TEX encoding = utf-8 unicode
%!TEX spellcheck = en-US

\documentclass[letterpaper,12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{paracol}
\usepackage{marginnote}
\usepackage{setspace}

\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont[Mapping=tex-text,Scale=1]{Libertinus Serif}

\usepackage{polyglossia}
\setmainlanguage{english}
\setdefaultlanguage[variant=us]{english}
\setotherlanguage[variant=ancient]{greek}
\newfontfamily\greekfont[Mapping=tex-text,Script=Greek,Scale=.9]%
    {Palatino Linotype}


\def\factorofgreektextstretch{5}
\def\factoroftranslation{1}

\newcommand{\greektextbaselinestretch}{\setstretch{\factorofgreektextstretch}}
\newcommand{\translationbaselinestretch}{\setstretch{\factoroftranslation}}

\newcommand{\charactername}[1]{%
    \footnotesize{\bfseries{\textgreek{#1}}}%
}%
\newcommand{\bekkerStephanusNumbers}[1]{%
    \normalsize{\bfseries{\textenglish{#1}}}%
}%
\newcommand{\maingreektext}[1]{%
    \Large{\textgreek{#1}}%
}%
\newcommand{\maintranslation}[1]{%
    \normalsize{\textenglish{#1}}%
}%

\newcommand{\firstlineheightanchor}{\rule{0pt}{17.28pt}}

\newcommand{\paralleltext}[4]{%
    \columnratio{0.75}%
    \begin{paracol}{2}%
        \setlength{\parindent}{0pt}%
            \firstlineheightanchor% 첫 줄의 높이를 통일함
            \marginnote{\charactername{#1}}%
            {\Large\vskip-\factorofgreektextstretch\baselineskip% 강제로 끌어올림
            \greektextbaselinestretch%
            \maingreektext{#2}\par}%
        \switchcolumn\sloppy%
            \firstlineheightanchor% 첫 줄의 높이를 통일함
            \marginnote{\bekkerStephanusNumbers{#4}}%
            \maintranslation{#3}
    \end{paracol}%
}%


\begin{document}
\paralleltext{Ἐχεκράτης}{τί οὖν δή; τίνες φῂς ἦσαν οἱ λόγοι; τί οὖν δή; τίνες φῂς ἦσαν οἱ λόγοι; τί οὖν δή; τίνες φῂς ἦσαν οἱ λόγοι; τί οὖν δή; τίνες φῂς ἦσαν οἱ λόγοι; τί οὖν δή; τίνες φῂς ἦσαν οἱ λόγοι; }{Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation?}{59d}
%some text
\paralleltext{Ἐχεκράτης}{τί οὖν δή; τίνες φῂς ἦσαν οἱ λόγοι; τί οὖν δή; τίνες φῂς ἦσαν οἱ λόγοι; τί οὖν δή; τίνες φῂς ἦσαν οἱ λόγοι; τί οὖν δή; τίνες φῂς ἦσαν οἱ λόγοι; τί οὖν δή; τίνες φῂς ἦσαν οἱ λόγοι; }{Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation? Well then, what was the conversation?}{59d}

\end{document}




%%%%%%%%%%%%%%%%%%% 실험 코드
 

\documentclass[letterpaper,12pt]{article}
\usepackage{paracol}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{showframe}

\begin{document}
    \setstretch{1}
    \lipsum[1]
    
    \setstretch{2}
    \lipsum[2]
    
    \setstretch{3}
    \lipsum[3]
    \clearpage
    \setstretch{2}
    \lipsum[4]

    ~\\~\\

    \setstretch{1}
    \begin{paracol}{2}
        \small\lipsum[1]
        \switchcolumn
        \Large\lipsum[2]
    \end{paracol}

\clearpage

    \begin{paracol}{2}
        \small\lipsum[1]
        \switchcolumn
        \Large\lipsum[2]
    \end{paracol}

\end{document}

 




XE Login