在右侧列出要点

在右侧列出要点

在 html 中,我可以使用 dir 关键字将项目符号移动到项目的右侧:

<ul dir="rtl">
<li><a href="#home">Home</a></li>
<li><a href="#news">Jewel Thieves</a></li>
<li><a href="#contact">Community</a></li>
</ul>

http://jsfiddle.net/zbx0p65h/3/

是否有与 latex 等效的命令列表

答案1

您必须修补几个内部list相关的命令,但是是的,可以做到:

\documentclass[10pt]{article}

\usepackage{etoolbox}

\makeatletter
\def\makelistright{%
    \leftmargin\z@
    \patchcmd{\@listi}%
        {\leftmargin\leftmargini}%
        {\rightmargin\leftmargini}%
        {}{}%
    \patchcmd{\@listii}%
        {\leftmargin\leftmarginii}%
        {\rightmargin\leftmarginii}%
        {}{}%
    \patchcmd{\@listiii}%
        {\leftmargin\leftmarginiii}%
        {\rightmargin\leftmarginiii}%
        {}{}%
    \patchcmd{\@listiv}%
        {\leftmargin\leftmarginiv}%
        {\rightmargin\leftmarginiv}%
        {}{}%
    \patchcmd{\@listv}%
        {\leftmargin\leftmarginv}%
        {\rightmargin\leftmarginv}%
        {}{}%
    \patchcmd{\@listvi}%
        {\leftmargin\leftmarginvi}%
        {\rightmargin\leftmarginvi}%
        {}{}%
    \patchcmd{\@trivlist}%
        {%
            \leftskip\z@skip%
            \rightskip\@rightskip%
            \parfillskip\@flushglue%
        }%
        {%
            \leftskip\@flushglue%
            \rightskip\@rightskip%
            \parfillskip\z@skip%
        }%
        {}{}%
    \patchcmd{\@item}%
        {\box\@labels}%
        {%
            \hskip-\@flushglue%
            \hbox to 0pt {\hskip\linewidth\box\@labels\hskip-\linewidth}%
            \hskip\@flushglue%
        }%
        {}{}%
    \patchcmd{\@item}%
        {%
            \unhbox\@labels
            \hskip \itemindent
            \hskip -\labelwidth
            \hskip -\labelsep
            \ifdim \wd\@tempboxa >\labelwidth
            \box\@tempboxa
            \else
                \hbox to\labelwidth {\unhbox\@tempboxa}%
            \fi
            \hskip \labelsep
        }%
        {%
            \hskip \labelsep%
            \hbox to\labelwidth {\unhbox\@tempboxa}%
            \unhbox\@labels
            \hskip -\labelwidth
            \hskip -\labelsep
        }%
        {}{}%
    \def\@mklab##1{##1\hss}%
    \patchcmd{\itemize}%
        {\hss\llap}%
        {}%
        {}{}%
}
\makeatother

\begin{document}

\begin{makelistright}

\begin{itemize}
\item Home
\item Jewel Thieves
\item Community
\end{itemize}

\end{makelistright}

\end{document}

截屏

答案2

tabular例如可以使用A :

\documentclass{article}
\usepackage{array}
\begin{document}
\begin{tabular}{@{}r@{\quad}>{\textbullet}c@{}}
  Home &\\
  Jewel Thieves &\\
  Community &\\
\end{tabular}
\end{document}

结果

相关内容