• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

muzimuzhi/latex-examples: small (la)tex files showing features, solutions, and a ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

muzimuzhi/latex-examples

开源软件地址(OpenSource Url):

https://github.com/muzimuzhi/latex-examples

开源编程语言(OpenSource Language):

TeX 100.0%

开源软件介绍(OpenSource Introduction):

LaTeX examples

utilities/code-with-output.tex

User Interface

  • \begin{example}[tcb options]{title}, code followed by output, numbered
  • \begin{example*}[tcb options]{title}, unnumbered variant

Typical configured usage

  • side by side, \begin{example}[sidebyside]{title}
  • change code language, \begin{example}[minted options app={language=python}]{title}

Internals

  • direct dependencies:
    • tcolorbox, with libraries hooks, minted, skins and xparse loaded
    • accsupp
  • environments are based on tcolorbox's minted library, -shell-escape required
  • added
    • \emptyaccsupp
    • tcolorbox options example options and example title
  • modified
    • \theFancyVerbLine

utilities/print-definition.tex

User Interface

  • \printDef{csname}, print definition of \cs{csname}
  • \printAndRunCode{code}

Internals

  • direct dependencies:
    • fvextra
    • xcolor with no package options
  • added
    • \toString

utilities/pgfkeys-handler-patch.tex

User Interface

  • \pgfkeys{<key>/.patch={<search>}{<replace>}}
  • \pgfkeyspatchvalue{<key path>}{<search>}{<replace>}

Internals

  • direct dependency: xpatch

utilities/pgfkeys-handler-store-in.tex

User Interface

  • after <key>/.store in=<macro> (or .estore in), handlers .get, .add, .prefix, and .append will act on <macro>, not the key itself

Internals

  • <macro> is stored in new subkey .@store, which will be cleared by .initial
  • for the above four handlers, .@store has higher precedence than the key itself (set by .initial)

utilities/hyperref-autonameref.tex

User Interface

  • \autonameref{<label key>} and \autonameref*{<label key>}
  • 1-arg \HyRef@autonameref@style which controls the extra output style (see test file)

Internals

  • direct dependency: hyperref
  • \HyRef@autonameref and \HyRef@autonamesetref

utilities/tikz-auto-mark-nodes.tex

User Interface

  • scope options auto mark and no auto mark
  • styles every auto mark and every auto <shape> mark that accept pin options
  • zero-arg macro \tikzAutoMarkText that controls the mark text
    • In the definition of the above styles and macro, \tikzNodeName and \tikzNodeShape can be used as placeholders of node name and shape, respectively.

Initial values

```tex
\tikzset{
  every auto mark/.style={
    font=\ttfamily, rotate=45,
    red, anchor=west, pin position=45,
  },
  every auto coordinate mark/.style={
    blue, anchor=east, pin position=180+45,
  },
}
\newcommand\tikzAutoMarkText{\tikzNodeName}
```

Internals

  • Every auto mark is a node pin drawn by
    \node also[pin={[every auto mark/.try, every auto <shape> mark/.try]{\tikzAutoMarkText}}] (\tikzNodeName);
    at the end of every tikzpicture.
    • maybe draw in execute at end path?
  • direct dependency: tikz and etoolbox (for \patchcmd)
  • tikz options used: execute at begin scope and execute at end picture
  • patched: \tikz@node@finish to append node info to \tikzNodeList
  • added:
    • \tikzNodeList, A comma-separated list of elements {<node_name>, <node_shape>}
    • \newif\iftikz@lib@automark@on



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap