对角线下支撑

对角线下支撑

出于教学目的,我想构建一个如下图所示的对角线下支撑。我该怎么做?

对角线下支撑。

答案1

其他蒂克兹变量,将可变数量的东西堆叠到指数中:

代码

\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,calc}
\usepackage{graphicx}

%\documentclass[tikz,border=2mm]{standalone}

\begin{document}

\newcommand{\veryhigh}[3]% base, exponent, text
{   \begin{tikzpicture}
        \node (tempnode-0) at (0,0) {$#1$};
        \foreach \mytext [count=\c] in {#2}
        { \pgfmathtruncatemacro{\b}{\c-1}
            \node[above right,font=\tiny,inner sep=3pt] (tempnode-\c) at (tempnode-\b) {$\mytext$};
            \xdef\maxexp{\c}
        }
        \draw [decoration={brace,amplitude=4pt,mirror,raise=2pt},decorate] ($(tempnode-1.south east)+(-0.13,0.13)$) -- node[below right=1mm,font=\tiny] {#3} ($(tempnode-\maxexp.south east)+(-0.13,0.13)$);
    \end{tikzpicture}
}

\veryhigh{x}{x,{\rotatebox{45}{$\cdots$}},x}{$(n-1)$ times}

\veryhigh{\pi}{a,b,c,d,e,f,g,h}{too much!}

\end{document}

输出

在此处输入图片描述

答案2

这是一个粗略的答案,主要通过目测而不是通过思考一般测量得出。但是,对于一次性案例或一系列类似案例,它应该可以满足您的目的。(如果有更有经验的人提供意见,他们无疑会仔细阅读我的代码,我们将不胜感激。)

\documentclass[12pt]{report}
\usepackage{mathptmx, mathdots, rotating}

\begin{document}

\newlength{\Width}
\settowidth{\Width}{% the width of the exponent x...x
    ${}^{\,\,x%
    \hbox{\raisebox{.8ex}{%
     $\iddots$\raisebox{1.3ex}{${\,}^x$}}}}$}

$x^{\,\,x% 
    %$x^x$ looks a bit too tight to me, needs some extra space
    %
\makebox[0pt][l]{% 
    %pretend the brace has no width
    %
\raisebox{0ex}[0pt][0pt]{%
    %pretend the brace has no height or depth
    %
\hspace{.2em}% 
    %give it a bit of space
    %
\rotatebox{40}{% 
    %oddly, 45 degree rotation doesn't look right
    %
$\underbrace{\hspace{.9\Width}}$}}}% 
    %make the brace a bit small than the exponent
    %
\hbox{\raisebox{.8ex}% 
    %raise the dots and the following x 
    %
{$\iddots$% 
    %here are the dots
    %
\raisebox{1.3ex}% 
    %raise the x even more
    %
{${\,}^x$}}}}$% 
    %here's the x, with a bit of extra space
    %
\kern-.2em%
    %reduce space between x^{x...x} and n-1
    %
\raisebox{.35ex}% 
    %raise n-1 a bit
    %
{\scriptsize $n-1$ times}% 

\end{document}

在此处输入图片描述

答案3

这是我使用 Tikz 的尝试。由于命令中包含一些代码,因此我做了一个\newcommand。您可以在此处看到结果。

我修改了代码,让字符保持“水平”,借用了morbusg 的回答

斜撑

\documentclass{article}
\usepackage{tikz}
\usepackage{rotating}

\usetikzlibrary{decorations.pathreplacing} 

\tikzset{liltext/.style={font=\tiny}}


\newcommand{\diagbrace}[2]{
\textsuperscript{
\hspace*{-6mm}\raisebox{-1mm}{
\begin{tikzpicture}
\node[rotate=45] at (0,0) (text1) {\rotatebox{-40}{#1}};
\draw [decorate,decoration={brace,amplitude=4pt,mirror,raise=2pt}]
(text1.west) -- (text1.east) node [right,midway,xshift=1mm, yshift=-2mm,liltext] {#2};
\end{tikzpicture}}}}

\def\rddots#1{\cdot^{\cdot^{\cdot^{#1}}}}

\begin{document}

    $X$\diagbrace{${x^{\rddots x}} $}{$n-1$ times}

\end{document}

答案4

它不太容易使用,但可以调节。

\documentclass{article}
\usepackage{mathtools}
\usepackage{mathdots}
\usepackage{tikz}

\newcommand{\dbrace}[1]{
\begin{tikzpicture}
\draw (0,0) node[rotate=45]{$\underbrace{\rule{#1}{0pt}}$};
\end{tikzpicture}}

\begin{document}

\[
x^{x^{\iddots^x}}
 \raisebox{-5pt}[0pt][0pt]{\hspace*{-20pt}\dbrace{10pt}}
 \raisebox{2pt}[0pt][0pt]{\hspace*{-10pt}\scriptstyle{n-1}}
\]

\end{document}

^^^x

相关内容