我如何排版 Young 画作的分数,以便该分数间距合适且对角线正确?
\documentclass{article}
\usepackage{nicefrac}
\usepackage{xfrac}
\usepackage{youngtab} % for Young tableaux
\usepackage{young} % for Young tableaux
\begin{document}
This looks horrible
\[\frac{\young(345,23,1) }{ \young(531,31,1)}\]
So does this
\[\sfrac{\young(345,23,1) }{ \young(531,31,1)}\]
This isn't bad, but the separator is small, and the spacing is not so good.
\[\nicefrac{\young(345,23,1) }{ \young(531,31,1)}\]
\end{document}
答案1
我会使用旧的,\middle
因为会/
自动缩放并使用正确的字形。唯一的问题是画面不是垂直居中的;一个技巧array
解决了这个问题:
\documentclass{article}
\usepackage{nicefrac}
\usepackage{xfrac}
\usepackage{youngtab} % for Young tableaux
\usepackage{young} % for Young tableaux
\newcommand\mathcenter[1]{\begin{array}{@{}c@{}}#1\end{array}}
\newcommand\yngfrac[2]{\left.\mathcenter{#1}\,\middle/\,\mathcenter{#2}\right.}
\begin{document}
\[\yngfrac{ \young(345,23,1) }{ \young(531,31,1) }\]
\[\yngfrac{ \young(345,23) }{ \young(531,1) }\]
\[\yngfrac{ \young(345,23) }{ \young(531,31,1) }\]
\end{document}
答案2
一种方法可能是graphicx
\documentclass{article}
\usepackage{graphicx,youngtab}
\begin{document}
\young(345,23,1)\raisebox{.6em}{\resizebox{1.5em}{3em}{/ }}\young(531,31,1)
\end{document}
如果您担心调整大小的斜率或厚度/
,另一种方法可以在图片环境中绘制倾斜的线,您可以在其中控制线的位置:
\documentclass{article}
\setlength{\unitlength}{1em}
\begin{document}
\young(345,23,1)
\begin{picture}(1,3)(0.5,0)
\put(0,0){\line(1,3){1.11}}
\end{picture}
\young(531,31,1)
\end{document}
或者使用旋转规则来调整厚度:
\documentclass{article}
\usepackage{graphicx,youngtab}
\setlength{\unitlength}{1em}
\begin{document}
\young(345,23,1)
\begin{picture}(0.5,0)(.6,0)
\put(-0.5,0){\rotatebox{-25}{\rule{.04em}{3.7em}}}
\end{picture}
\young(531,31,1)
\end{document}
答案3
\documentclass{article}
\usepackage{tikz}
\usepackage{youngtab} % for Young tableaux
\usepackage{young} % for Young tableaux
\newcommand{\YoungFrac}[2]{%
\begin{tikzpicture}[%
outer sep=2pt,
baseline={(current bounding box.center)}
]
\node (A) {\young(#1)} ;
\node[anchor=west,xshift=10pt]
at (A.east) (B)
{\young(#2)} ;
\draw (A.south east) -- (B.north west) ;
\end{tikzpicture}
}
\begin{document}
\YoungFrac{345,23,1}{531,31,1}
\end{document}