두 개의 왼쪽 비정형 선의 오른쪽 정렬

두 개의 왼쪽 비정형 선의 오른쪽 정렬

너비가 다른 두 개의 작은 텍스트 줄이 있습니다. 왼쪽 맞춤과 이전 텍스트의 줄 높이를 유지하면서 오른쪽으로 플러시하고 싶습니다.

\documentclass{article}
\usepackage{fontspec} 

\usepackage{lipsum}

\begin{document}

I was yet young in life, which I had begun early; but my intimacy with him was of a recent date: we had been educated at the same schools and university; but his progress through these had preceded mine, and he had been deeply initiated into what is called the world while I was in noviciate noviciate noviciate.

\hfill\vbox{\hbox{Foo}
\hbox{Foobar}}

\end{document}

여기에 이미지 설명을 입력하세요

답변1

tabularop 정렬 과 함께 사용할 수 있습니다 [t].

\documentclass{article}
\usepackage{fontspec}

\usepackage{lipsum}

\begin{document}

I was yet young in life, which I had begun early; but my intimacy with him was of a recent date: we had been educated at the same schools and university; but his progress through these had preceded mine, and he had been deeply initiated into what is called the world while I was in noviciate noviciate noviciate.

\hspace*{\fill}
\begin{tabular}[t]{l@{}}
Foo\\
Foobar
\end{tabular}

\end{document}

여기에 이미지 설명을 입력하세요

답변2

가장 간단한 해결책은 \strut이전 텍스트의 끝 부분과 내부에 모두를 넣는 것입니다 \hbox.

\documentclass{article}
\usepackage[T1]{fontenc} 

\usepackage{lipsum}

\begin{document}

I was yet young in life, which I had begun early; but my intimacy with him
was of a recent date: we had been educated at the same schools and
university; but his progress through these had preceded mine, and he had
been deeply initiated into what is called the world while I was in
noviciate noviciate noviciate.\strut

\hfill\vbox{\hbox{\strut Foo}
\hbox{Foobar}}

\end{document}

그러나 LaTeX에서는 기본 boxing 명령을 사용하지 않는 것이 좋습니다.

관련 정보