文本對齊與平齊居中我的文本,這是一個錯誤嗎?

文本對齊與平齊居中我的文本,這是一個錯誤嗎?

使用TeXstudio。我一直在嘗試將我寫的一首詩與右邊頁面的。本質上,我想實作一個兩列結構,其對齊方式為左/右對齊。左對齊適用於右列側,但左對齊無法正確地向右對齊,儘管我到目前為止進行了所有嘗試。如果我不使用多列,也會發生這種行為,所以這不是這裡的問題。

有關粗略範例,請參見圖片:

在此輸入影像描述

到目前為止我找到的所有資訊都是使用\begin{flushright} some text here \end{flushright}.我也嘗試過,\hfill{}但這根本沒有任何作用。我理解它,因此這應該將我的文字恰好放在頁面/列/等的右側邊緣。

相反,發生的情況是:我的文字居中。這是一張圖片。在此輸入影像描述

這是我犯的錯嗎?我一天前開始使用這個軟體。當我刪除此刷新命令時,它使用預設對齊方式,我也不希望這樣。我試圖看看中心是否出於某種原因做了任何事情,但也沒有改變,只是正常的中心對齊。我的編輯可能被竊聽了嗎?我應該聯絡 TeXstudio 開發人員嗎?

我的完整程式碼源自於書籍預設,我用它來編寫小章節並在其中使用我認為合適的對齊方式。我在那裡沒有做任何不尋常的事情,所以我不認為這是原因。

\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{changepage}
\usepackage{multicol}
\usepackage{extsizes}

\begin{document}

\author{TeXstudio Team}
\title{blank}
\date{January 2013}

\frontmatter
\maketitle
\include{./TeX_files/Foreword}
\tableofcontents
\mainmatter
\include{./TeX_files/mainchapter01}
\include{./TeX_files/chapter01}
\include{./TeX_files/chapter02}
\include{./TeX_files/chapter03}
\include{./TeX_files/chapter04}
\include{./TeX_files/chapter05}
\include{./TeX_files/chapter06}
\include{./TeX_files/mainchapter02}
\include{./TeX_files/chapter07}
\include{./TeX_files/chapter08}
\include{./TeX_files/chapter09}


\backmatter
% bibliography, glossary and index would go here.

\end{document}

我的章節主要由這些程式碼行組成

\chapter*{name}
\addcontentsline{toc}{chapter}{displayname}

Published: -
%\fontsize{12}{15.2}\selectfont
\vspace{0.5cm}
\newline
text
\vspace{7cm}
\newline
 \newline
\begin{multicols}{2}
\begin{flushright}
%\begin{adjustwidth}{-15}{-15}
\noindent text\newline 
text
\newline
\end{flushright}
\begin{flushleft} Dreht sich nur in eine Richtung.\newline
Dreh dich nicht um.
\vspace{0.15cm}
\newline
text
\vspace{0.5cm}
\newline
\end{flushleft} 
%\end{adjustwidth}
\end{multicols}
text
\vspace{0.5cm}
\newline
text\newline
text
\vspace{0.5cm}
\newline

也可能有一種更聰明的方式來格式化詩歌,但我還沒找到。

我希望有人可以幫助我或建議我下一步該怎麼做。提前致謝。

答案1

感謝大衛·卡萊爾的建議。我舉了一個例子並找出了造成這種情況的原因。

使用\newline不適用於這種對齊方式,這是正確的。\\作為換行符的作品。這裡有一個簡單的測試,旁邊有程式碼可以比較兩個變體。現在使用\begin{flushright} text here \end{flushright}對我有用。

將全部替換\newline\\現在:)

在此輸入影像描述

相關內容