• Looking for a symbol like big \ast
    by Dimitrios ANAGNOSTOU on February 5, 2026 at 9:16 am

    The question is rather simple. How to obtain the following big asterisk symbol? I apologize if it is duplicate. Thank you very much.

  • My LaTeX code is super slow
    by YCH817 on February 5, 2026 at 7:00 am

    I want to do something like this : display binary operation evaluation in different ways (decomposing the binary evaluation in two unary evaluation, etc) with a much simple syntax, i.e. : Here I use postfix and infix notation for function applications, for example : in row 7 of this table, (c1 → c2) can be decomposed into c2 (c1 → _) , in which (c1 → _) is the first unary application (marked with blue framed box), c2 (c1 → _) is the second one (marked with blue framed box); and Homo stands for the Hom functor, Expo stands for Exponent operation in Cartesian Closed Category. However the compilation tooks so much time, I think I use too much \csname...\endcsname, \@ifnextchar and so on. Seeking for better solution like expl3 or LuaLaTeX. The main code for this syntax is written inside layouts_custom/set_math_evl02.tex in the overleaf MWE project. Here is part of the code \def\RegistOprEvalTypeB#1Form#2{% \let\RegistOprEvalTypeB@opr=\relax% \xpndaft\def\csname ev#2\endcsname{% \@ifnextchar [% {\csname ev#2@Yopt@\endcsname} {\csname ev#2@Nopt@\endcsname}% }% \xpndaft\def\csname ev#2@Yopt@\endcsname[##1]{% \def\RegistOprEvalTypeB@opr{\csname #2\endcsname[{##1}]}% \csname ev#2@\endcsname % <--- 移到这里! }% \xpndaft\def\csname ev#2@Nopt@\endcsname{% \def\RegistOprEvalTypeB@opr{\csname #2\endcsname}% \csname ev#2@\endcsname % <--- 移到这里! }% \xpndaft\def\csname ev#2@\endcsname{% \@ifnextchar <% {\csname ev#2@YargL@\endcsname} {\@ifnextchar >% {\csname ev#2@YargR@\endcsname} {\@ifnextchar .% {\csname ev#2@YargL@Qp@\endcsname} {\RegistOprEvalTypeB@opr}}}% }% \xpndaft\def\csname ev#2@YargL@Qp@\endcsname.##1{% \@ifnextchar .% {\csname ev#2@YargL@Qp@YargR@\endcsname{##1}}% {\relax}% }% \xpndaft\def\csname ev#2@YargL@Qp@YargR@\endcsname##1.##2{% \@ifnextchar p% {\csname ev#2@YargL@Qp@YargR@Yp\endcsname{##1}{##2}}% {\csname evB#1\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}}% }% \xpndaft\def\csname ev#2@YargL@Qp@YargR@Yp\endcsname##1##2p{% \csname evB#1p\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}% }% \xpndaft\def\csname ev#2@YargL@\endcsname<##1{% \@ifnextchar p% {\csname ev#2@YargL@Yp@\endcsname{##1}}% {\csname ev#2@YargL@Np@\endcsname{##1}}% }% \xpndaft\def\csname ev#2@YargL@Np@\endcsname##1{% \@ifnextchar .% {\csname ev#2@YargL@Np@YargR@\endcsname{##1}}% {\csname evB#1Lp\endcsname{\RegistOprEvalTypeB@opr}{##1}}% }% \xpndaft\def\csname ev#2@YargL@Np@YargR@\endcsname##1.##2{% \@ifnextchar p% {\csname ev#2@YargL@Np@YargR@Yp\endcsname{##1}{##2}}% {\csname evB#1LR\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}}% }% \xpndaft\def\csname ev#2@YargL@Np@YargR@Yp\endcsname##1##2p{% \csname evB#1LRp\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}% }% \xpndaft\def\csname ev#2@YargL@Yp@\endcsname##1p{% \@ifnextchar .% {\csname ev#2@YargL@Yp@YargR@\endcsname{##1}}% {\csname evB#1Lp\endcsname{\RegistOprEvalTypeB@opr}{##1}}% }% \xpndaft\def\csname ev#2@YargL@Yp@YargR@\endcsname##1.##2{% \@ifnextchar p% {\csname ev#2@YargL@Yp@YargR@Yp\endcsname{##1}{##2}}% {\csname evB#1LpR\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}}% }% \xpndaft\def\csname ev#2@YargL@Yp@YargR@Yp\endcsname##1##2p{% \csname evB#1LpRp\endcsname{\RegistOprEvalTypeB@opr}{##1}{##2}% }% \xpndaft\def\csname ev#2@YargR@\endcsname>##1{% \@ifnextchar p% {\csname ev#2@YargR@Yp@\endcsname{##1}}% {\csname ev#2@YargR@Np@\endcsname{##1}}% }% \xpndaft\def\csname ev#2@YargR@Np@\endcsname##1{% \@ifnextchar .% {\csname ev#2@YargR@Np@YargL@\endcsname{##1}}% {\csname evB#1Rp\endcsname{\RegistOprEvalTypeB@opr}{##1}}% }% \xpndaft\def\csname ev#2@YargR@Np@YargL@\endcsname##1.##2{% \@ifnextchar p% {\csname ev#2@YargR@Np@YargL@Yp\endcsname{##1}{##2}}% {\csname evB#1RL\endcsname{\RegistOprEvalTypeB@opr}{##2}{##1}}% }% \xpndaft\def\csname ev#2@YargR@Np@YargL@Yp\endcsname##1##2p{% \csname evB#1RLp\endcsname{\RegistOprEvalTypeB@opr}{##2}{##1}% }% \xpndaft\def\csname ev#2@YargR@Yp@\endcsname##1p{% \@ifnextchar .% {\csname ev#2@YargR@Yp@YargL@\endcsname{##1}}% {\csname evB#1Rp\endcsname{\RegistOprEvalTypeB@opr}{##1}}% }% \xpndaft\def\csname ev#2@YargR@Yp@YargL@\endcsname##1.##2{% \@ifnextchar p% {\csname ev#2@YargR@Yp@YargL@Yp\endcsname{##1}{##2}}% {\csname evB#1RpL\endcsname{\RegistOprEvalTypeB@opr}{##2}{##1}}% }% \xpndaft\def\csname ev#2@YargR@Yp@YargL@Yp\endcsname##1##2p{% \csname evB#1RpLp\endcsname{\RegistOprEvalTypeB@opr}{##2}{##1}% }% } \makeatother where Yopt stands for "Yes, option exists" Nopt stands for "No , option does not exist" YargL stands for "Yes, argument on the left exists" NargL stands for "No , argument on the left does not exist" Yp stands for "Yes, add parentheses" Np stands for "No , don't add parentheses" YargR stands for "Yes, argument on the right exists" NargR stands for "No , argument on the right does not exist" besides : inside \RegistOprEvalTypeB#1, #1 will be used to determine which type of evaluation should be use, i.e., if #1 is in , then it will call the family of evaluation commands which name include Bin , BinLR, BinLpRp, etc ... These commands are located inside the file layouts_custom/set_math_evl02.tex . Here is the content : % ----- evaluation for unary operation \def\evU#1#2{\plr{\cfbox{% {#2}\mop{#1}% }}} \def\evUp#1#2{\plr{\cfbox{% \prs{{#2}\mop{#1}} }}} \def\evUn#1#2{\cfbox{% \plr{{#2}^{#1}} }} \def\evUnp#1#2{\cfbox{% \prs{\plr{{#2}^{#1}}} }} % ------- evaluation for binary operation (postfix) \def\evBpo#1#2#3{\cfbox[Purple]{\plr{% {#3}\mop{{#2}\mop{#1}}% }}} \def\evBpop#1#2#3{\cfbox[Purple]{\plr{% \prs{{#3}\mop{{#2}\mop{#1}}}% }}} \def\evBpoA#1#2{\plr{\cfbox{% \mop{{#2}\mop{#1}}% }}} \def\evBpoAp#1#2{\plr{\cfbox{% \prs{\mop{{#2}\mop{#1}}}% }}} \def\evBpoBp#1#2{\plr{\cfbox{% \prs{{#2}\mop{\occ\mop{#1}}}% }}} \def\evBpoApB#1#2#3{%\plr{% \evU{\evBpoAp{#1}{#2}}{#3}% }%} \def\evBpoBpA#1#2#3{%\plr{% \evU{\evBpoBp{#1}{#2}}{#3}% }%} \def\evBpoApBp#1#2#3{%\plr{% \evUp{\evBpoAp{#1}{#2}}{#3}% }%} \def\evBpoBpAp#1#2#3{%\plr{% \evUp{\evBpoBp{#1}{#3}}{#2}% }%} \def\evBpoAB#1#2#3{%\plr{% \evU{\evBpoA{#1}{#2}}{#3} }%} \def\evBpoABp#1#2#3{%\plr{% \evUp{\evBpoA{#1}{#2}}{#3} }%} % ------- evaluation for binary operation (infix) \def\evBin#1#2#3{\cfbox[Purple]{\plr{% {#2}\mbin{#1}{#3}% }}} \def\evBinp#1#2#3{\cfbox[Purple]{% \prs{\plr{{#2}\mbin{#1}{#3}}}% }} \def\evBinLp#1#2{\plr{\cfbox{% \prs{{#2}\mbin{#1}\occ} }}} \def\evBinRp#1#2{\plr{\cfbox{% \prs{\occ\mbin{#1}{#2}} }}} \def\evBinLpR#1#2#3{%\plr{% \evU{\evBinLp{#1}{#2}}{#3} }%} \def\evBinRpL#1#2#3{%\plr{% \evU{\evBinRp{#1}{#3}}{#2} }%} \def\evBinLpRp#1#2#3{%\plr{% \evUp{\evBinLp{#1}{#2}}{#3}% }%} \def\evBinRpLp#1#2#3{%\plr{% \evUp{\evBinRp{#1}{#3}}{#2}% }%} \def\evBinLR#1#2#3{\plr{\cfbox{% \cfbox{\plr{{#2}\mbin{#1}{}}}{#3}% }}} \def\evBinLRp#1#2#3{\plr{\cfbox{% \prs{\cfbox{\plr{{#2}\mbin{#1}{}}}{#3}}% }}} \def\evBinRL#1#2#3{\plr{\cfbox{% {#2}\cfbox{\plr{{}\mbin{#1}{#3}}}% }}} \def\evBinRLp#1#2#3{\plr{\cfbox{% \prs{{#2}\cfbox{\plr{{}\mbin{#1}{#3}}}}% }}} % ------- evaluation for binary operation (infix, non-symmetrical) \def\evBinx#1#2#3{\cfbox[Purple]{\plr{% {}_{\plr{{#2}\mbin{#1}{}}}{#3}% }}} \def\evBinxp#1#2#3{\cfbox[Purple]{% \prs{\plr{{}_{\plr{{#2}\mbin{#1}{}}}{#3}}} }} \def\evBinxLp#1#2{\plr{\cfbox{% \prs{\plr{{}_{\plr{{#2}\mbin{#1}{}}}^{}\occ}} }}} \def\evBinxRp#1#2{\plr{\cfbox{% \prs{\plr{{}_{\plr{\occ\mbin{#1}{}}}^{}{#2}}} }}} \def\evBinxLpR#1#2#3{%\plr{% \evU{\evBinxLp{#1}{#2}}{#3} }%} \def\evBinxRpL#1#2#3{%\plr{% \evU{\evBinxRp{#1}{#3}}{#2} }%} \def\evBinxLpRp#1#2#3{%\plr{% \evUp{\evBinxLp{#1}{#2}}{#3}% }%} \def\evBinxRpLp#1#2#3{%\plr{% \evUp{\evBinxRp{#1}{#3}}{#2}% }%} \def\evBinxLR#1#2#3{\plr{\cfbox{% \plr{\cfbox{{}_{\plr{{#2}\mbin{#1}{}}}^{}}{#3}} }}} \def\evBinxLRp#1#2#3{\plr{\cfbox{% \prs{\plr{\cfbox{{}_{\plr{{#2}\mbin{#1}{}}}^{}}{#3}}}% }}} \def\evBinxRL#1#2#3{\plr{\cfbox{% \plr{{}_{\plr{{#2}}}\cfbox{{}_{\plr{\mbin{#1}{}}}^{}{#3}}} }}} \def\evBinxRLp#1#2#3{\plr{\cfbox{% \prs{\plr{{}_{\plr{{#2}}}\cfbox{{}_{\plr{\mbin{#1}{}}}^{}{#3}}}}% }}} Here is the content of layouts_custom/set_math_var.tex, in here you can find command definitions like \prs, \plr, \mbin, etc... % ---- enable stack for math equations \stackMath % ----- adding boxes with colored frames \newcommand{\cfbox}[2][blue]{% \setlength{\fboxsep}{0pt}% \setlength{\fboxrule}{0.4pt}% \colorlet{currentcolor}{.}% {\color{#1}% \fbox{\color{currentcolor}\ensuremath{#2}}}% } % ---- abbrevations \let\xpndaft=\expandafter \let\ncm=\newcommand \let\rcm=\renewcommand \let\ph=\phantom \let\hph=\hphantom \let\vph=\vphantom \let\mrel=\mathrel \let\mbin=\mathbin \let\mop=\mathop \let\mllap=\mathllap % \let\mrlap=\mathrlap % \let\mclap=\mathclap % % ---- delimiters : \def\vts#1{\lvert#1\rvert} % verts \def\prs#1{\left(#1\right)} % parentheses \def\bcs#1{\left\{#1\right\}} % braces \def\bks#1{\left[#1\right]} % brackets \def\plr#1{\vph{(fg)}\smash{#1}} % to restrict box height and depth \def\etc{\plr{\rm etc}} % et cetera \def\occ{\plr{\texttt{\_}}} % similar to _ in lean or haskell % ----- Following code used for register variable types \makeatletter \def\RegistVarType#1BG#2Font#3{ \colorlet{color#1}{#2} \xpndaft\newif\csname ifColorVarType#1\endcsname % determine whether the variable is highlighted \xpndaft\def\csname var#1\endcsname##1{% \setlength{\fboxsep}{0pt}% \setlength{\fboxrule}{0pt}% \let\RegistVarTypeCache=\relax \csname ifColorVarType#1\endcsname{% \gdef\RegistVarTypeCache{\colorbox{color#1}}% }\else{% \gdef\RegistVarTypeCache{\fbox}% }\fi% \RegistVarTypeCache{\ensuremath{\plr{#3 ##1}}}% } \csname ColorVarType#1true\endcsname % enable highlighting is default } % ----- Following code used for register a specific family of variables \def\RegistVarFreqType#1Name#2{ \@ifnextchar D% {\RegistVarFreqType@{#1}{#2}} {\RegistVarFreqType@{#1}{#2}Disp{#2}} } \def\RegistVarFreqType@#1#2Disp#3{% \xpndaft\def\csname #1#2\endcsname{% \csname var#1\endcsname{{#3}^{}}% } \xpndaft\def\csname #1#2n\endcsname##1{% \csname var#1\endcsname{{#3}_{##1}^{}}% } \@ifnextchar p {\RegistVarFreqType@Loop{#1}{#2}{p}{'}{#3}} {\relax} } \def\RegistVarFreqType@Loop#1#2#3#4#5p{% \xpndaft\def\csname #1#2#3\endcsname{% \csname var#1\endcsname{{#5}#4}% } \xpndaft\def\csname #1#2#3n\endcsname##1{% \csname var#1\endcsname{{#5}#4_{##1}}% } \@ifnextchar p {\RegistVarFreqType@Loop{#1}{#2}{#3p}{#4'}{#5}} {\relax} } \makeatother and here is the file layouts_custom/set_math_opr.tex, which is used for registering operators and how they look like : \makeatletter % ----- Used for registering operation form (Type A) \def\RegistOprFormTypeAName#1Disp#2Dflt#3{% \xpndaft\newcommand\xpndaft{\csname #1\endcsname}[1][#3]{\plr{\ensuremath{ \stackunder[0pt]{\stackon[0pt]{\plr{#2}} {}} {\text{\scriptsize\(\plr{##1}\)}} }}} } % ----- Used for registering operation form (Type B) \def\RegistOprFormTypeBName#1Dflt#2{% \xpndaft\newcommand\xpndaft{\csname #1\endcsname}[1][#2]{\plr{\ensuremath{% \xrightarrow[\text{\scriptsize\(\plr{##1}\)}]{}% }}} } % ----- Used for registering operation form (Type C) \def\RegistOprFormTypeCName#1Disp#2DfltCat#3DfltIdx#4{% \xpndaft\def\csname #1\endcsname{% \@ifnextchar [% {\csname #1@YCat@\endcsname} {\csname #1@NCat@\endcsname{#3}} } \xpndaft\def\csname #1@NCat@\endcsname##1{% \@ifnextchar <% {\csname #1@NCat@YIdx\endcsname{##1}} {\csname #1@NCat@NIdx\endcsname{##1}{#4}} } \xpndaft\def\csname #1@YCat@\endcsname[##1]{% \@ifnextchar <% {\csname #1@YCat@YIdx\endcsname{##1}} {\csname #1@YCat@NIdx\endcsname{##1}{#4}} } \xpndaft\def\csname #1@NCat@NIdx\endcsname##1##2{% \csname #1@Final\endcsname{##1}{##2} } \xpndaft\def\csname #1@NCat@YIdx\endcsname##1<##2>{% \csname #1@Final\endcsname{##1}{##2} } \xpndaft\def\csname #1@YCat@NIdx\endcsname##1##2{% \csname #1@Final\endcsname{##1}{##2} } \xpndaft\def\csname #1@YCat@YIdx\endcsname##1<##2>{% \csname #1@Final\endcsname{##1}{##2} } \xpndaft\def\csname #1@Final\endcsname##1##2{\plr{\ensuremath{% % \underset{\scriptscriptstyle\plr{{##1}\mbin{.}{##2}}}{% % \overset{}% % {\plr{#2}}} \stackunder[0pt]{\stackon[0pt]{\plr{#2}} {}} {\text{\scriptsize\(\plr{{##1}~{##2}}\)}} }}}% } % ----- Used for registering operation form (Type D) \def\RegistOprFormTypeDName#1Disp#2Dflt#3{% \xpndaft\newcommand\xpndaft{\csname #1\endcsname}[1][#3]{\plr{\ensuremath{% {}_{\scriptscriptstyle\plr{##1}}^{}{#2} }}} } \makeatother Finally the main.tex : \documentclass[10pt,a4paper]{article} % for Chinese \usepackage[ 10pt, % fontset=fandol, ]{ctex} % % for font \usepackage{pifont} % for \ding \usepackage{fontspec} % for font % for programming \usepackage{etoolbox} % patch \usepackage{calc} % calculation \usepackage{keyval} % key-value settings % for layout \usepackage[ % landscape, a4paper, % margin=1in ]{geometry} % \usepackage{multicol} % for multiple columns % for mathematics \usepackage{amsmath} % \usepackage{amssymb} % \usepackage{amsfonts} % for \mathbf \mathsf \mathit \usepackage{mathtools} % for \overbracket , \underbracket \usepackage{stackengine} % for \stackon , \stackunder % for color \usepackage[ dvipsnames, svgnames, table ]{xcolor} % % for boxes \usepackage[ all ]{tcolorbox} % \usepackage[ export ]{adjustbox} % for box scaling \usepackage{relsize} % for relevative font size % for tables \usepackage{tabularray} % \input{layouts_custom/set_math_var.tex} % variable \input{layouts_custom/set_math_opr.tex} % operator display form \input{layouts_custom/set_math_evl01.tex} % operator evaluation \input{layouts_custom/set_math_evl02.tex} % this could make compiling super slow \setlength\parindent{0pt} % cancel indent \setlength{\columnseprule}{.4pt} % set the width of rule used in multicolumn environment \begin{document} % ----- Regist variable types \RegistVarType{obj}BG{pink}Font{\sf} \RegistVarType{cat}BG{Rhodamine}Font{\sf} \RegistVarType{arr}BG{SpringGreen}Font{} \RegistVarType{fct}BG{YellowGreen}Font{} \RegistVarType{ntf}BG{LightBlue}Font{} % ----- Regist frequently used variables \RegistVarFreqType{obj}Name{c}ppppp \RegistVarFreqType{obj}Name{init}Disp{0}ppppp \RegistVarFreqType{obj}Name{term}Disp{1}ppppp \RegistVarFreqType{arr}Name{f}ppppp \RegistVarFreqType{cat}Name{C}ppppp \RegistVarFreqType{cat}Name{D}ppppp \RegistVarFreqType{cat}Name{I}ppppp \RegistVarFreqType{fct}Name{F}ppppp \RegistVarFreqType{fct}Name{G}ppppp \RegistVarFreqType{ntf}Name{eta}Disp{\eta}ppppp % ----- Regist constants \RegistVarFreqType{cat}Name{Cat}Disp{Cat} \RegistVarFreqType{cat}Name{Set}Disp{Set} \RegistVarFreqType{cat}Name{Uni}Disp{\text{\ding{192}}} \RegistVarFreqType{cat}Name{Bin}Disp{\text{\ding{193}}} \RegistVarFreqType{cat}Name{Tri}Disp{\text{\ding{194}}} % ----- Regist operators, Disp stands for Display \RegistOprFormTypeAName{objget}Disp{{\rm Obj}}Dflt{\catCat} % obtain all objects of category \RegistOprFormTypeAName{arrget}Disp{{\rm Arr}}Dflt{\catCat} % obtain all arrows of category \RegistOprFormTypeBName{Homo}Dflt{\catC} % functor : hom \RegistOprFormTypeBName{Expo}Dflt{\catC} % functor : exponent \RegistOprFormTypeAName{Mult}Disp{\times}Dflt{\catC} % functor : prod \RegistOprFormTypeAName{Addt}Disp{+}Dflt{\catC} % functor : sum \RegistOprFormTypeAName{Diag}Disp{{\rm Di}}Dflt{\catC,\catI} % functor : diagonal \RegistOprFormTypeAName{srcget}Disp{{\rm src}}Dflt{\catC} % obtain source of arrow \RegistOprFormTypeAName{target}Disp{{\rm tar}}Dflt{\catC} % obtain target of arrow \RegistOprFormTypeDName{iden}Disp{{\rm id}}Dflt{\objc} % identity \RegistOprFormTypeDName{bang}Disp{\text{!}}Dflt{\objc} % bang \RegistOprFormTypeDName{absd}Disp{\text{\textexclamdown}}Dflt{\objc} % absurd \RegistOprFormTypeAName{Yone}Disp{\text{よ}}Dflt{\catC} % Yoneda embedding \RegistOprFormTypeAName{Yoda}Disp{\text{\small 尤}}Dflt{\catC} % Yoda embedding Testing evaluations.\\ In here we only allow infix and postfix style. Evaluation type \verb|U| For unary operationss: \\ \verb|\evU\arrf\objc| will produce $\evU\arrf\objc$; \\ \verb|\evl\arrf\objc| will produce $\evUp\arrf\objc$; \vspace{10pt} Evaluation type \verb|Un| (\verb|n| stands for natural transformations) for unary operations: \\ \verb|\evUn\ntfeta\objc| will produce $\evUn\ntfeta\objc$; \\ \verb|\evUnp\ntfeta\objc| will produce $\evUnp\ntfeta\objc$; \vspace{10pt} Evaluation type \verb|Bpo| (\verb|po| stands for postfix) for binary operations: \\ \verb|\evBpo\arrf{\objcn1}{\objcn2}| will produce $\evBpo\arrf{\objcn1}{\objcn2}$; \\ \verb|\evBpop\arrf{\objcn1}{\objcn2}| will produce $\evBpop\arrf{\objcn1}{\objcn2}$; \\ Evaluation below will decompose the binary evaluation (violet boxes)\\ into unary evaluations (blue boxes): \\ \verb|\evBpoA\arrf{\objcn1}| will produce $\evBpoA\arrf{\objcn1}$; \\ \verb|\evBpoAp\arrf{\objcn1}| will produce $\evBpoAp\arrf{\objcn1}$; \\ \verb|\evBpoBp\arrf{\objcn2}| will produce $\evBpoBp\arrf{\objcn2}$; \\ \verb|\evBpoAB\arrf{\objcn1}{\objcn2}| will produce $\evBpoAB\arrf{\objcn1}{\objcn2}$; \\ \verb|\evBpoABp\arrf{\objcn1}{\objcn2}| will produce $\evBpoABp\arrf{\objcn1}{\objcn2}$; \\ \verb|\evBpoApB\arrf{\objcn1}{\objcn2}| will produce $\evBpoApB\arrf{\objcn1}{\objcn2}$; \\ \verb|\evBpoApBp\arrf{\objcn1}{\objcn2}| will produce $\evBpoApBp\arrf{\objcn1}{\objcn2}$; \\ \verb|\evBpoBpA\arrf{\objcn2}{\objcn1}| will produce $\evBpoBpA\arrf{\objcn2}{\objcn1}$; \\ \verb|\evBpoBpAp\arrf{\objcn1}{\objcn2}| will produce $\evBpoBpAp\arrf{\objcn1}{\objcn2}$ \newpage Evaluation type \verb|Bin| (\verb|in| stands for infix) for binary operations: \\ \verb|\evBin\Homo{\objcn1}{\objcn2}| will produce $\evBin\Homo{\objcn1}{\objcn2}$; \\ \verb|\evBinp\Homo{\objcn1}{\objcn2}| will produce $\evBinp\Homo{\objcn1}{\objcn2}$; \\ Evaluation below will decompose the binary evaluation (violet boxes)\\ into unary evaluations (blue boxes): \\ \verb|\evBinLp\Homo{\objcn1}| will produce $\evBinLp\Homo{\objcn1}$; \\ \verb|\evBinLpR\Homo{\objcn1}{\objcn2}| will produce $\evBinLpR\Homo{\objcn1}{\objcn2}$; \\ \verb|\evBinLpRp\Homo{\objcn1}{\objcn2}| will produce $\evBinLpRp\Homo{\objcn1}{\objcn2}$; \\ \verb|\evBinLR\Homo{\objcn1}{\objcn2}| will produce $\evBinLR\Homo{\objcn1}{\objcn2}$; \\ \verb|\evBinLRp\Homo{\objcn1}{\objcn2}| will produce $\evBinLRp\Homo{\objcn1}{\objcn2}$; \\ \verb|\evBinRp\Homo{\objcn2}| will produce $\evBinRp\Homo{\objcn2}$; \\ \verb|\evBinRpL\Homo{\objcn1}{\objcn2}| will produce $\evBinRpL\Homo{\objcn1}{\objcn2}$; \\ \verb|\evBinRpLp\Homo{\objcn1}{\objcn2}| will produce $\evBinRpLp\Homo{\objcn1}{\objcn2}$; \\ \verb|\evBinRL\Homo{\objcn1}{\objcn2}| will produce $\evBinRL\Homo{\objcn1}{\objcn2}$; \\ \verb|\evBinRLp\Homo{\objcn1}{\objcn2}| will produce $\evBinRLp\Homo{\objcn1}{\objcn2}$; \\ Evaluation type \verb|Binx| (\verb|in| stands for infix, \verb|x| stands for exponent) for binary operations: \\ \verb|\evBinx\Expo{\objcn1}{\objcn2}| will produce $\evBinx\Expo{\objcn1}{\objcn2}$; \\ \verb|\evBinxp\Expo{\objcn1}{\objcn2}| will produce $\evBinxp\Expo{\objcn1}{\objcn2}$; \\ Evaluation below will decompose the binary evaluation (violet boxes)\\ into unary evaluations (blue boxes): \\ \verb|\evBinxLp\Expo{\objcn1}| will produce $\evBinxLp\Expo{\objcn1}$; \\ \verb|\evBinxLpR\Expo{\objcn1}{\objcn2}| will produce $\evBinxLpR\Expo{\objcn1}{\objcn2}$; \\ \verb|\evBinxLpRp\Expo{\objcn1}{\objcn2}| will produce $\evBinxLpRp\Expo{\objcn1}{\objcn2}$; \\ \verb|\evBinxLR\Expo{\objcn1}{\objcn2}| will produce $\evBinxLR\Expo{\objcn1}{\objcn2}$; \\ \verb|\evBinxLRp\Expo{\objcn1}{\objcn2}| will produce $\evBinxLRp\Expo{\objcn1}{\objcn2}$; \\ \verb|\evBinxRp\Expo{\objcn2}| will produce $\evBinxRp\Expo{\objcn2}$; \\ \verb|\evBinxRpL\Expo{\objcn1}{\objcn2}| will produce $\evBinxRpL\Expo{\objcn1}{\objcn2}$; \\ \verb|\evBinxRpLp\Expo{\objcn1}{\objcn2}| will produce $\evBinxRpLp\Expo{\objcn1}{\objcn2}$; \\ \verb|\evBinxRL\Expo{\objcn1}{\objcn2}| will produce $\evBinxRL\Expo{\objcn1}{\objcn2}$; \\ \verb|\evBinxRLp\Expo{\objcn1}{\objcn2}| will produce $\evBinxRLp\Expo{\objcn1}{\objcn2}$; \newpage \RegistOprEvalTypeB{in}Form{Homo} \RegistOprEvalTypeB{inx}Form{Expo} Entering these ``\verb|ev|'' commands is frustrating, therefore I came up with an idea, \\ which is written inside \verb|layouts_custom/set_math_evl02.tex|. \vspace{10pt} \verb|\RegistOprEvalTypeB{inx}Form{Homo}| will make the following code work properly. \\ \verb|B{in}| means it wll use family of control sequences with \verb|evBin...| inside their names.\\ \verb|$\evHomo[\catC]$| will produce $\evHomo[\catC]$; \\ \verb|$\evHomo[\catC].{\objcn1}.{\objcn2}$| will produce $\evHomo[\catC].{\objcn1}.{\objcn2}$; \\ \verb|$\evHomo[\catC].{\objcn1}.{\objcn2}p$| will produce $\evHomo[\catC].{\objcn1}.{\objcn2}p$; \\ \verb|$\evHomo[\catC]<{\objcn1}.{\objcn2}$| will produce $\evHomo[\catC]<{\objcn1}.{\objcn2}$; \\ \verb|$\evHomo[\catC]<{\objcn1}.{\objcn2}p$| will produce $\evHomo[\catC]<{\objcn1}.{\objcn2}p$; \\ \verb|$\evHomo[\catC]<{\objcn1}p$| will produce $\evHomo[\catC]<{\objcn1}p$; \\ \verb|$\evHomo[\catC]<{\objcn1}p.{\objcn2}$| will produce $\evHomo[\catC]<{\objcn1}p.{\objcn2}$; \\ \verb|$\evHomo[\catC]<{\objcn1}p.{\objcn2}p$| will produce $\evHomo[\catC]<{\objcn1}p.{\objcn2}p$; \\ \verb|$\evHomo[\catC]>{\objcn2}.{\objcn1}$| will produce $\evHomo[\catC]>{\objcn2}.{\objcn1}$; \\ \verb|$\evHomo[\catC]>{\objcn2}.{\objcn1}p$| will produce $\evHomo[\catC]>{\objcn2}.{\objcn1}p$; \\ \verb|$\evHomo[\catC]>{\objcn2}p$| will produce $\evHomo[\catC]>{\objcn2}p$; \\ \verb|$\evHomo[\catC]>{\objcn2}p.{\objcn1}$| will produce $\evHomo[\catC]>{\objcn2}p.{\objcn1}$; \\ \verb|$\evHomo[\catC]>{\objcn2}p.{\objcn1}p$| will produce $\evHomo[\catC]>{\objcn2}p.{\objcn1}p$; \vspace{10pt} \verb|\RegistOprEvalTypeB{inx}Form{Expo}| will make the following code work properly: \\ \verb|B{inx}| means it wll use family of control sequences with \verb|\evBinx...| inside their names.\\ \verb|$\evExpo[\catC]$| will produce $\evExpo[\catC]$; \\ \verb|$\evExpo[\catC].{\objcn1}.{\objcn2}$| will produce $\evExpo[\catC].{\objcn1}.{\objcn2}$; \\ \verb|$\evExpo[\catC].{\objcn1}.{\objcn2}p$| will produce $\evExpo[\catC].{\objcn1}.{\objcn2}p$; \\ \verb|$\evExpo[\catC]<{\objcn1}.{\objcn2}$| will produce $\evExpo[\catC]<{\objcn1}.{\objcn2}$; \\ \verb|$\evExpo[\catC]<{\objcn1}.{\objcn2}p$| will produce $\evExpo[\catC]<{\objcn1}.{\objcn2}p$; \\ \verb|$\evExpo[\catC]<{\objcn1}p$| will produce $\evExpo[\catC]<{\objcn1}p$; \\ \verb|$\evExpo[\catC]<{\objcn1}p.{\objcn2}$| will produce $\evExpo[\catC]<{\objcn1}p.{\objcn2}$; \\ \verb|$\evExpo[\catC]<{\objcn1}p.{\objcn2}p$| will produce $\evExpo[\catC]<{\objcn1}p.{\objcn2}p$; \\ \verb|$\evExpo[\catC]>{\objcn2}.{\objcn1}$| will produce $\evExpo[\catC]>{\objcn2}.{\objcn1}$; \\ \verb|$\evExpo[\catC]>{\objcn2}.{\objcn1}p$| will produce $\evExpo[\catC]>{\objcn2}.{\objcn1}p$; \\ \verb|$\evExpo[\catC]>{\objcn2}p$| will produce $\evExpo[\catC]>{\objcn2}p$; \\ \verb|$\evExpo[\catC]>{\objcn2}p.{\objcn1}$| will produce $\evExpo[\catC]>{\objcn2}p.{\objcn1}$; \\ \verb|$\evExpo[\catC]>{\objcn2}p.{\objcn1}p$| will produce $\evExpo[\catC]>{\objcn2}p.{\objcn1}p$; \\ but this will make the compilation super slow. \end{document} Here is the overleaf MWE project. There will be no .pdf since the compilation time pass the limit. Here is the link for the .pdf file with detailed explanation. Screenshots are here :

  • Can there be multiple floats in a single paragraph that do not "break" the text flow around them?
    by Gary on February 5, 2026 at 4:30 am

    I don't know what this is called to ask the question better. I'm trying to match an old book's structure as close as possible and it has multiple small labels within the same paragraph that are floated left and that also serve as sections in the right-hand page headers only but not in the TOC. An example is provided below; however, in the book, the text is not split/broken before a block item, it just runs continuous around each. I tried using \placefigure but either that is the wrong approach or I did it wrong. I'd like the second line,immediately before Block 1, to be justified and the line before Block 2 to not break at "around" but continue with the next line's "multiple". Is it possible and, if so, what's it called so I can look it up? Thank you. \setuplayout[width=5in] \starttext An example of a fairly old handset document that includes justified text wrapped around mulitple blocks of text that are set to the left. \placefigure[none,left,paragraph][]{}{\framed{Block 1}}And each one of these blocks that are sort of floats is also a section in the sense that which ever block is on the right-hand page appears in that page's header. To repeat that, this is an example of a fairly old handset document that includes justified text wrapped around \placefigure[none,left,paragraph][]{}{\framed{Block 2}}mulitple blocks of text that are set to the left. And each on of these blocks that are sort or floats is also a section in the sense that which ever block is on the right-hand page appears in that page's header. \stoptext

  • Left-aligning lines of text to left edge of right-aligned line?
    by Dan Li on February 5, 2026 at 1:36 am

    What I’m trying to accomplish is best illustrated as follows: The first line (“Monday, December 22, 2025, 16:00 EST”) is right-aligned to the text width (possibly by \hfill, but not a hard requirement). The second line (“New York City, New York”) needs to be left-aligned to the left edge of that first line. In other words, the start of the M in “Monday” and N in “New York” are vertically aligned. How can this be done?

  • Problem with the position of a graph (pgfplots)
    by Octavius on February 5, 2026 at 12:36 am

    in the following code and in the attached image, the graph becomes misaligned. Could you please give me an idea on how to fix it? \documentclass{article} \usepackage{graphicx} % Required for inserting images \newcommand{\ocultar}[1]{} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{pdfpages} \usepackage{hyperref} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usetikzlibrary{angles, quotes} \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{array} \begin{document} \begin{center} \begin{tabular}{>{\centering}m{5cm} >{\centering}m{5cm} >{\centering}m{5cm}} % CRECIENTE \begin{tikzpicture} \begin{axis}[ axis lines=middle, xmin=-3,xmax=6, ymin=-3,ymax=6, grid=both, width=5cm, height=5cm, ticks=none ] \addplot[red, thick] {x+1}; \end{axis} \end{tikzpicture} & % DECRECIENTE \begin{tikzpicture} \begin{axis}[ axis lines=middle, xmin=-3,xmax=6, ymin=-3,ymax=6, grid=both, width=5cm, height=5cm, ticks=none ] \addplot[blue, thick] {-x+3}; \end{axis} \end{tikzpicture} & % CONSTANTE \begin{tikzpicture} \begin{axis}[ axis lines=middle, xmin=-3,xmax=6, ymin=-3,ymax=6, grid=both, width=5cm, height=5cm, ticks=none ] \addplot[black, thick] {3}; \end{axis} \end{tikzpicture} \\[2mm] \fbox{\begin{minipage}{4.5cm} \centering \textbf{Creciente.}\\ En este caso su pendiente\\ es \textcolor{red}{\textbf{POSITIVA}.} \end{minipage}} & \fbox{\begin{minipage}{4.5cm} \centering \textbf{Decreciente.}\\ En este caso su pendiente\\ es \textcolor{blue}{\textbf{NEGATIVA}.} \end{minipage}} & \fbox{\begin{minipage}{4.5cm} \centering \textbf{Constante.}\\ En este caso su pendiente\\ es \textbf{CERO}. \end{minipage}} \end{tabular} \end{center} \end{document}

  • Inconsistent vertical spacing: longtable cells vs. normal paragraphs for algebra solution steps
    by Oregon Math Tutor on February 4, 2026 at 10:11 pm

    I'm creating a math worksheet for my Algebra 2 students with a two-column problem layout using longtable. I'm experiencing two related spacing issues with my step by step solutions layout: Inconsistent spacing before solution steps: Problems 1-4 (outside longtable) have tight spacing between the problem statement and solution steps, while problems 5-8 (inside longtable) have much larger spacing before the solution steps. Answer boxes crowding next row: In the two-column section, answer boxes at the bottom of cells are too close to the problem statements in the next table row. What I've tried: Adjusting \par\vspace values (made page 1 worse) Using \vskip instead of \par\vspace (broke page 1 alignment) Modifying \arraystretch and \extrarowheight (affected all rows uniformly, not the issue) Question: How can I achieve consistent vertical spacing before the solutionsteps environment both inside and outside longtable, while preventing answer boxes from crowding the next table row? MWE: \documentclass[14pt]{extarticle} % Packages \usepackage[margin=1in]{geometry} \usepackage{mathtools,amssymb,xcolor,array,longtable} % Colors \definecolor{solutionblue}{RGB}{0, 70, 160} \definecolor{highlightyellow}{RGB}{255, 255, 180} % Commands \newcommand{\sol}[1]{{\color{solutionblue}#1}} \newcommand{\answerbox}[1]{% \par\nobreak\vspace{4pt}% \noindent\hspace{0.25in}% \setlength{\fboxsep}{4pt}\setlength{\fboxrule}{1pt}% \fcolorbox{solutionblue}{highlightyellow}{% \bfseries\boldmath$\displaystyle\sol{#1}$% }\par% } % Solution steps environment - THIS IS WHERE THE SPACING ISSUE ORIGINATES \newenvironment{solutionsteps}{% \par\vspace{10pt}% % This adds different amounts of space in/out of longtable \noindent\hspace{0.25in}% \begingroup% \renewcommand{\arraystretch}{1.5}% $\begin{array}[t]{@{}>{\displaystyle}l @{\quad} l@{}}% }{% \end{array}$% \endgroup% } \begin{document} \section*{SECTION 1: Outside longtable (tight spacing)} \noindent 1) $(m^4 - 6m^3 - 8) + (4m^4 + 6 + 7m^3) - (5m^4 + 4)$ \begin{solutionsteps} (m^4 + 4m^4 - 5m^4) + (-6m^3 + 7m^3) & \text{\small (Group)} \\ m^3 - 6 & \text{\small (Combine)} \end{solutionsteps} \answerbox{m^3 - 6} \noindent 2) $(6n^3 - 2n^2) + (1 - 6n^4 + 7n^3)$ \begin{solutionsteps} -6n^4 + 13n^3 - 2n^2 & \text{\small (Combine)} \end{solutionsteps} \answerbox{-6n^4 + 13n^3 - 2n^2} \vspace{2em} \section*{SECTION 2: Inside longtable (larger spacing + crowding)} \begin{longtable}{@{}p{0.48\textwidth}@{\hspace{0.04\textwidth}}p{0.48\textwidth}@{}} 3) $(4x - 3)(x + 6)$ & 4) $(3p - 2)(2p - 6)$ \\ \begin{solutionsteps} 4x^2 + 24x - 3x - 18 & \\ 4x^2 + 21x - 18 & \end{solutionsteps} \answerbox{4x^2 + 21x - 18} & \begin{solutionsteps} 6p^2 - 18p - 4p + 12 & \\ 6p^2 - 22p + 12 & \end{solutionsteps} \answerbox{6p^2 - 22p + 12} \\*[2.5em] % Row separator 5) $(3a - 6b)(7a + 6b)$ & 6) $(a + 7b)(7a - 4b)$ \\ % ISSUE: These problem statements are too close to boxes above \begin{solutionsteps} 21a^2 - 24ab - 36b^2 & \end{solutionsteps} \answerbox{21a^2 - 24ab - 36b^2} & \begin{solutionsteps} 7a^2 + 45ab - 28b^2 & \end{solutionsteps} \answerbox{7a^2 + 45ab - 28b^2} \end{longtable} \end{document} Expected: Uniform spacing before solutionsteps in both sections, with adequate space between answer boxes and the next row's problem statements. Actual: See compiled output - Section 1 has tight spacing, Section 2 has loose spacing before steps but crowded spacing after answer boxes.

  • Unexpected “ccc” labels appearing in a pgfplots graph
    by Octavius on February 4, 2026 at 8:51 pm

    I have the following LaTeX code, and in the middle plot (the decreasing function) I cannot remove the letters “ccc” that appear on the graph. Does anyone have a suggestion on how to fix this? \documentclass{article} \usepackage{graphicx} % Required for inserting images \newcommand{\ocultar}[1]{} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{pdfpages} \usepackage{hyperref} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usetikzlibrary{angles, quotes} \begin{document} \begin{center} \begin{tabular}{>{\centering}m{5cm} >{\centering}m{5cm} >{\centering}m{5cm}} % CRECIENTE \begin{tikzpicture} \begin{axis}[ axis lines=middle, xmin=-3,xmax=6, ymin=-3,ymax=6, grid=both, width=5cm, height=5cm, ticks=none ] \addplot[red, thick] {x+1}; \end{axis} \end{tikzpicture} & % DECRECIENTE \begin{tikzpicture} \begin{axis}[ axis lines=middle, xmin=-3,xmax=6, ymin=-3,ymax=6, grid=both, width=5cm, height=5cm, ticks=none ] \addplot[blue, thick] {-x+3}; \end{axis} \end{tikzpicture} & % CONSTANTE \begin{tikzpicture} \begin{axis}[ axis lines=middle, xmin=-3,xmax=6, ymin=-3,ymax=6, grid=both, width=5cm, height=5cm, ticks=none ] \addplot[black, thick] {3}; \end{axis} \end{tikzpicture} \end{document}

  • How do I write an Ampersand in index entries?
    by Michael E. Klews on February 4, 2026 at 7:54 pm

    Obviously I tried "& and \& : \index{key@A "& B} and the like, but it does not work.

  • Fractions with the systeme package
    by mf67 on February 4, 2026 at 6:31 pm

    How do I get alignment in systeme when using fractions? \documentclass{book} \usepackage{amsmath} \usepackage{systeme} \begin{document} \[ \systeme{y+z=72,x+\tfrac{2}{3}y+\tfrac{1}{2}z=72} \] \end{document} I could not find an example with fractions in the French documentation of systeme. I tried brackets, but it did not help. \systeme{y+z=72,x+{\tfrac{2}{3}}y+{\tfrac{1}{2}}z=72}

  • Highlighting in WinEdt 10.3
    by user2925716 on February 4, 2026 at 6:10 pm

    How do I configure red highlighting in WinEdt 10.3 to see which tab is active to recognize it immediately from the mess like the one from the snippet ? I.e. "all4.tex" should be red.

  • Exceeded TeX capacity when running hilatex with scrartcl and pgfplots
    by Alexander Voigt on February 4, 2026 at 4:56 pm

    I want to generate a test.hnt file from the following test.tex file: \documentclass{scrartcl} % article works \usepackage{pgfplots} % removing this works \begin{document} Hello World! \end{document} When I run hilatex test.tex I get the following error message about exceeded TeX capacity: ! TeX capacity exceeded, sorry [hash size=45000]. \pgfkeyslet ...ter \let \csname pgfk@#1\endcsname #2 l.4831 } The test.log file contains the following information about the issue: ! TeX capacity exceeded, sorry [hash size=45000]. \pgfkeyslet ...ter \let \csname pgfk@#1\endcsname #2 l.4831 } If you really absolutely need more capacity, you can ask a wizard to enlarge me. Here is how much of TeX's memory you used: 22130 strings out of 475903 562725 string characters out of 5796992 1256262 words of memory out of 5000001 45000 multiletter control sequences out of 45000 559137 words of font info for 37 fonts, out of 8000000 for 255 475 hyphenation exceptions out of 8191 108i,7n,107p,10900b,609s stack positions out of 5000i,500n,10000p,2000000b,100000s This issue does not occur when I use article instead of scrartcl. It does also not occur when I remove pgfplots. (However, both are required in my project.) How can I avoid this issue?

  • Determine "optimal" paper size
    by M0M0 on February 4, 2026 at 4:21 pm

    Some LaTeX packages provide nice functionality to compute the optimal margins for a given page size, font and font size. I.e. KOMA-Script does offer the package option DIV=calc and \KOMAoptions{DIV=last}. This, however, leads to rather large margins, if A4 paper is used. I was hence wondering if we can even go one step further and let LaTex also compute the "optimal" paper size (if such a thing exists, but I'm certain that typographers have opinions on this) based on font/font size and the number of columns we use. Of course, this means that if we print the output, we need to cut/trim the paper accordingly.

  • Making the ends of double line invisible in Tikz [duplicate]
    by return true on February 4, 2026 at 3:36 pm

    When drawing a double line, an ugly thin connection between the ends is drawn, as you can see in the image. Is there a way to remove it without manually drawing white over it? Shortening the arrow does not do the job. I am new to Tikz. \documentclass[border=10pt]{standalone} \usepackage{tikz} \begin{document} % Source - https://tex.stackexchange.com/q/759221 % Posted by return true % Retrieved 2026-02-04, License - CC BY-SA 4.0 \begin{tikzpicture} \draw[line width = 2mm, double distance = 4mm, line cap=butt] (0,0) -- (10cm,10cm); \end{tikzpicture} \end{document}

  • Is it possible to sign and check for digital tampering of pdf made with lualatex?
    by Miloop on February 4, 2026 at 2:58 pm

    I am writing a document that can be read and shared freely, but not modified one bit. I want it to "break" once it's sha256 key differs or at least, indicate that it has been changed over time. I have come across this question: It is possible to lock up pdf? where it says it is a duplicate of: Digital signature, where the solution is this link: https://answers.onstartups.com/questions/41625/protecting-works-for-being-able-to-prove-later-ive-done-this-on-this-date that seems broken. I am also aware of digsig which seems more like adding the image of a signature rather than actually generating crytographic keys, etc. I see other stuff like using qpdf and secondary software solution. I wondered if it were possible to do this natively using lualatex? I am using Linux Mint and LuaHBTeX, Version 1.22.0 (TeX Live 2025) I am sorry I have no working example to offer because I'm not even sure where to start. I apologise in advance for my rule-breaking.

  • Review and improvement suggestions for a formal letter layout in LaTeX
    by Jasper on February 4, 2026 at 2:32 pm

    I’m dissatisfied with the formal letter templates on Overleaf and, frankly, with most of the tutorials I’ve found online. I genuinely enjoy written correspondence, and I want my formal letter format to look truly professional. I’ve created my own template for a confidential formal letter based on what I remember from past training, but it’s been a long time. I’d appreciate feedback to help ensure the format looks polished and professional. I did not know what tag to use, so I used layout. Feel free to correct that if you are more familiar this concept than I. \documentclass{article} \usepackage[margin = 1in]{geometry} \usepackage{fontspec,microtype,lipsum}\setmainfont{Carlito} \setlength{\parskip}{0pt} \setlength{\parindent}{0pt} \begin{document} My Name\\ My address\\ My city and postal code\par \vspace{\baselineskip} \today\par \vspace{2\baselineskip} \textbf{CONFIDENTIAL}\par \vspace{2\baselineskip} Name of recipient\\ Their title\\ Their company\\ Their address\\ Their city and postal code\par \vspace{\baselineskip} Dear Name of recipient,\par \vspace{\baselineskip} \lipsum[1]\par \vspace{\baselineskip} \lipsum[2]\par \vspace{\baselineskip} Sincerely,\\ My name \end{document}

  • Improving \widehat, \widetilde, \check etc. with lua code
    by Jinwen on February 4, 2026 at 11:30 am

    For certain (math) font configurations, the result generally look nice but occasionally may produce slightly unpleasant visual result. For example, for \widehat, \widetilde and \check: It would seem that they are not properly centered for certain letters (B, C, E, F, G, H, K, M, N, etc.), and the width is also not quite uniform, compared with visual expectation. Things like this would usually be better fixed directly on the font level. However, before the font got fixed, I know that there exists Lua code that can (manually and temporarily) edit the kerning of math characters, for example, space between letters, space between letter and subscripts/superscripts, etc. Could the same kind of code also modify/redefine the center, the baseline, the character width, etc.? More precisely, I would like to make use of Lua code to adjust the positioning of those symbols (\check, \widehat etc.) on top of the letters (center, and possibly height), and then if possible, also to adjust the (virtual) width of these symbols, so as to make the width of these symbols more pleasant. Hopefully this could be achieved by similar code as below, I just don't know where to find the correct keywords/switches. Here is the lua code I adopted some time ago from this answer that can modify the kerning between letter and scripts. For modifying kerning between symbols, one could see, e.g., this answer. (Unfortunately I do not quite understand how these code work, for example if I change topright to top in wish to change the relative position for hats and tildes, it actually does nothing effective, so this is clearly not the right keyword/switch to use...) Also, I wonder if these lua code can be combined, for example, if I simply put the code for adjusting kerning between symbols/letters inside the code below (within local mathkerns = ...), then nothing effective happens... \directlua { local mathkerns = { ["Asana-Math"] = { [0x1D439] = {% F topright = { {height=0,kern=30}, }, }, [0x1D443] = {% P topright = { {height=0,kern=90}, }, }, [0x1D447] = {% T bottomright = { {height=0,kern=-120}, }, }, [0x1D449] = {% V bottomright = { {height=0,kern=-120}, }, }, [0x1D44A] = {% W bottomright = { {height=0,kern=-30}, }, }, [0x1D453] = {% f bottomright = { {height=0,kern=-135}, }, }, [0x1D44F] = {% b topright = { {height=0,kern=75}, }, }, }, } local function initmathkern(tfmdata) local values = mathkerns[tfmdata.properties.psname] if not values then return end for cp, value in next, values do local tcp = type(cp) if tcp == 'string' then cp = tfmdata.resources.unicodes[cp] end local char = tfmdata.characters[cp] if char then local mathkern = char.mathkerns if not mathkern then mathkern = {} char.mathkerns = mathkern end for corner, v in next, value do mathkern[corner] = v end end end end fonts.constructors.newfeatures'otf'.register{ name = 'mathkern', description = 'Overwrite mathkern values', initializers = { base = initmathkern, }, } } Here is a MWE. \documentclass{article} \usepackage{kpfonts-otf} \usepackage{unicode-math} \setmathfont{KpMath-Sans.otf}[range={\check}] \setmathfont[RawFeature=mathkern]{Asana-Math.otf}[range={it/{Latin,latin},bfit/{Latin,latin},up/num,bfup/num}] \begin{document} \[ \check{A} \check{B} \check{C} \check{D} \check{E} \check{F} \check{G} \check{H} \check{I} \check{J} \check{K} \check{L} \check{M} \check{N} \check{O} \check{P} \check{Q} \check{R} \check{S} \check{T} \check{U} \check{V} \check{W} \check{X} \check{Y} \check{Z} \] \[ \widehat{A} \widehat{B} \widehat{C} \widehat{D} \widehat{E} \widehat{F} \widehat{G} \widehat{H} \widehat{I} \widehat{J} \widehat{K} \widehat{L} \widehat{M} \widehat{N} \widehat{O} \widehat{P} \widehat{Q} \widehat{R} \widehat{S} \widehat{T} \widehat{U} \widehat{V} \widehat{W} \widehat{X} \widehat{Y} \widehat{Z} \] \[ \widetilde{A} \widetilde{B} \widetilde{C} \widetilde{D} \widetilde{E} \widetilde{F} \widetilde{G} \widetilde{H} \widetilde{I} \widetilde{J} \widetilde{K} \widetilde{L} \widetilde{M} \widetilde{N} \widetilde{O} \widetilde{P} \widetilde{Q} \widetilde{R} \widetilde{S} \widetilde{T} \widetilde{U} \widetilde{V} \widetilde{W} \widetilde{X} \widetilde{Y} \widetilde{Z} \] \end{document}

  • polytonicgreek in LaTeX document
    by Marek Stepanek on February 4, 2026 at 11:12 am

    I have problems, inserting citations in my LaTeX document. I studied texdoc babel, many forums - including this one. I am using XeLaTeX. Here a MWE with many commented out lines - to show my attempts: \documentclass{article} % \usepackage{polyglossia} % \setdefaultlanguage[variant=ancient]{greek} % \usepackage[ngerman, greek.ancient]{babel} % \usepackage[ngerman, greek.polutoniko]{babel} % \usepackage[ngerman, polytonicgreek]{babel} \usepackage[polytonicgreek,ngerman]{babel} % \babelprovide[import, main]{polytonicgreek} % \usepackage[ngerman, ancientgreek]{babel} % Found in texdoc babel: % \babelfont[*greek]{rm}{NewComputerModern10} % \babelfont[ancientgreek]{rm}{NewComputerModern10} % \setotherlanguage{ngerman} % \setmainfont{GFS Didot} % \setmainfont{gfsdidot} % \setmainfont{kerkis} \begin{document} % ὅπερ ἔδει δεῖξαι % \selectlanguage{ngerman}{Und hier ein Text auf Deutsch} Das griechische Wort \glqq{}panta rhei\grqq{} (\foreignlanguage{greek}{πάντα ῥεῖ}) ist zutreffend \glqq{}alles fließt\grqq{}. \end{document} Thx for your help marek

  • pgfplotstable: systematic add of new columns
    by cis on February 4, 2026 at 10:33 am

    I have to n and k with n=2 (k=0,1,2) and n=4 (k=0,1,2,3,4). Now I want to add two coulumns p1 and p2 (and some others), such that: So I thought I could use a list \def\pList{1,2} (with variable values!) and express the columns with create on use; but this does not work. What do I have to do? MWE: \documentclass[margin=5pt, varwidth]{standalone} \usepackage{pgfplotstable} \begin{document} \def\pList{1,2} \newcounter{pNum}% I DO NOT KNOW HOW TO DO WITHOUT COUNTER \pgfplotsforeachungrouped \n in {2,4}{%% Is 'pgfplotsforeachungrouped' \pgfmathtruncatemacro\nPost{\n+1} \pgfplotsforeachungrouped \p in {\pList}{% correct??? \stepcounter{pNum}% \pgfplotstableset{% NOT SURE WHETHER THIS IS GOOD INSIDE THE LOOPS create on use/p\thepNum/.style={% create col/expr=\thisrow{n}+\thisrow{k}%+\p/10 % DOES NOT WORK },% } \pgfplotstablenew[ create on use/n/.style={create col/expr=\n}, create on use/k/.style={create col/expr=\pgfplotstablerow}, columns={n,k,p1}, % columns={n,k,\pList},% DOES NOT WORK!! every last row/.style={after row=\hline},% no effect %%%%%%%% ]{\nPost}\temp }% \pgfplotstablevertcat{\table}{\temp}% }%% \pgfplotstabletypeset[]{\table} \end{document}

  • How to produce "Ȟ" by mimicking the caron accent, in math mode?
    by Jinwen on February 4, 2026 at 9:21 am

    I would like to produce a Ȟ ("H" with caron accent) in math mode, specifically, for \mathsf. (This is an uncommon notation used for Čech cohomology in a book.) Perhaps this would be easy for pdfLaTeX. However, when using LuaLaTeX, and when this character is not already provided in the font, I can only get very strange output: Is there some way to mimic this caron accent in this situation? More generally, how can one apply this accent to general math symbols? (In the same book, this accent seems to be used to represent the dual objects, e.g., V with caron accent instead of V^{\vee}, possibly to save some space...) (I tried \check, but it looks different and cannot be properly aligned...) \documentclass{article} \usepackage{kpfonts-otf} \usepackage{unicode-math} \begin{document} Ȟ % \v{H} \( \mathsf{Ȟ} \) \( \mathsf{\v{H}} \) \( \check{\mathsf{H}} \) \end{document}

  • Strange effect when nesting tblr tabe environments
    by user2609605 on February 4, 2026 at 8:44 am

    MWE: \documentclass[a4paper]{article} \overfullrule=10mm \usepackage{tabularray} %\usepackage{xltabular} \usepackage{geometry} \begin{document} %\maketitle This document is for experimenting around \texttt{tabularray}. \begin{tblr}{width=\linewidth, rowspec={h{5cm}}, colspec={ll}}%p{5cm}, \begin{tblr}{width=\linewidth, colspec={|p{2cm}|}}% long text to be \newline long text to be \newline long text to be \newline long text to be \newline long text to be \newline % \the\hsize % \the\linewidth % \the\textwidth long text to be \end{tblr} & %\begin{tblr}{width={\linewidth}, colspec={|X|}}% 22nd %\end{tblr}% \\ \end{tblr} \end{document} works fine. head alinged, no warnings. If I activeate 2nd inner tblr environment: the alignment becomes sth unexpected to me, like centered and in addition a huge overfull box occurs. What happened and how to resolve?

  • TiKZ: possibility of "average" blend mode?
    by putianyi888 on February 4, 2026 at 8:40 am

    I get that the screen mode basically adds the RGB values. Is it possible to take the average of the values instead, so that colors don't get lighter? Opacity trick doesn't seem to work because I want full opacity where the images don't overlap.

  • improve of solid effect of stack of unit cube legos: solid draw with hole, protruding elements
    by Epa on February 4, 2026 at 8:06 am

    How to make the solid effect view better, as shown in the photo attached? \documentclass[]{standalone} \usepackage{amsmath, amssymb, latexsym, amscd, amsthm} \usepackage{tikz} \newcommand{\drawboxa}[4]{ \pgfmathsetmacro \angle {30} \pgfmathsetmacro \xd {{2/3*cos(\angle)}} \pgfmathsetmacro \yd {{2/3*sin(\angle)}} \pgfmathsetmacro \x {{#1-1+(#2-1)*(\xd)}} \pgfmathsetmacro \y {{#3-1+(#2-1)*(\yd)}} \draw[fill=#4] (\x,\y) -- (\x+1,\y) -- (\x+1,\y+1) -- (\x,\y+1) -- cycle; \draw[fill=#4] (\x,\y+1) -- (\x+\xd,\y+1+\yd)coordinate[pos=.5](M) -- (\x+1+\xd,\y+1+\yd) -- (\x+1,\y+1) -- cycle; \draw[fill=#4] (\x+1,\y+1) -- (\x+1+\xd,\y+1+\yd) -- (\x+1+\xd,\y+\yd)coordinate[pos=.5](M2) -- (\x+1,\y)-- (\x+1,\y+1)coordinate[pos=.5](M3); \path(M2)--(M3)coordinate[pos=.5](M4); \draw[fill=#4] (M)++(.5,0)coordinate(T1)++(.15,0)arc(0:-180:.15cm and .06cm)--++(0,.1)arc(-180:0:.15cm and .06cm)coordinate(T2)--++(0,-.1) (T2)arc(0:180:.15cm and .06cm); \draw[fill=black,opacity=.1](M4)circle(.12cm and .15cm) (\x,\y)++(.5,.5)circle(.15); \draw(M4)circle(.12cm and .15cm) (\x,\y)++(.5,.5)circle(.15); } \newcommand{\drawboxb}[3]{ \pgfmathsetmacro \angle {30} \pgfmathsetmacro \xd {{2/3*cos(\angle)}} \pgfmathsetmacro \yd {{2/3*sin(\angle)}} \pgfmathsetmacro \x {{#1-1+(#2-1)*(\xd)}} \pgfmathsetmacro \y {{#3-1+(#2-1)*(\yd)}} \draw[fill=white] (\x,\y) -- (\x+1,\y) -- (\x+1,\y+1) -- (\x,\y+1) -- cycle; \draw[fill=white] (\x,\y+1) -- (\x+\xd,\y+1+\yd)coordinate[pos=.5](M) -- (\x+1+\xd,\y+1+\yd) -- (\x+1,\y+1) -- cycle; \draw[fill=white] (\x+1,\y+1) -- (\x+1+\xd,\y+1+\yd) -- (\x+1+\xd,\y+\yd)coordinate[pos=.5](M2) -- (\x+1,\y)-- (\x+1,\y+1)coordinate[pos=.5](M3); \path(M2)--(M3)coordinate[pos=.5](M4); \draw[fill=white] (M)++(.55,0)coordinate(T1)++(.15,0)arc(0:-180:.2cm and .07cm)--++(0,.1)arc(-180:0:.2cm and .07cm)coordinate(T2)--++(0,-.1) (T2)arc(0:180:.2cm and .07cm) (T2)++(-.2,0)circle(.16cm and .04cm); \draw(M4)circle(.15cm and .2cm)circle(.11cm and .16cm) (\x,\y)++(.5,.5)circle(.2)circle(.15); } \usepackage{tikzbricks} %\printanswers \newcommand{\drawboxc}[4]{ \pgfmathsetmacro \angle {30} \pgfmathsetmacro \xd {{2/3*cos(\angle)}} \pgfmathsetmacro \yd {{2/3*sin(\angle)}} \pgfmathsetmacro \x {{#1-1+(#2-1)*(\xd)}} \pgfmathsetmacro \y {{#3-1+(#2-1)*(\yd)}} \draw[fill=#4] (\x,\y) -- (\x+1,\y) -- (\x+1,\y+1) -- (\x,\y+1) -- cycle; \draw[fill=#4] (\x,\y+1) -- (\x+\xd,\y+1+\yd)coordinate[pos=.5](M) -- (\x+1+\xd,\y+1+\yd) -- (\x+1,\y+1) -- cycle; \draw[fill=#4] (\x+1,\y+1) -- (\x+1+\xd,\y+1+\yd) -- (\x+1+\xd,\y+\yd)coordinate[pos=.5](M2) -- (\x+1,\y)-- (\x+1,\y+1)coordinate[pos=.5](M3); \path(M2)--(M3)coordinate[pos=.5](M4)coordinate[pos=.4](M5); \draw[fill=#4](M4)circle(.12cm and .15cm)++(0,.15)coordinate(Y1)++(0,-.15)coordinate(Y2); \draw[fill=#4](M5)++(0,-.025)circle(.12cm and .15cm)++(0,.15)coordinate(Y3)++(0,-.3)coordinate(Y4) (Y3)--(Y1)arc(90:270:.12cm and .15cm)--(Y4)arc(270:90:.12cm and .15cm); \draw[fill=black,opacity=.1](\x,\y)++(.5,.5)circle(.15) (M)++(.5,0)coordinate(T1)circle(.15cm and .06cm); \draw(\x,\y)++(.5,.5)circle(.15) (T1)circle(.15cm and .06cm); } \begin{document} \begin{tikzpicture} \def\x{3} %so luong block \foreach\h in{1,...,\x}{ \drawboxa{1}{1}{\h}{blue!25} } \def\d{.3} \draw(1,-\d) node[scale=1.3]{3}; \draw(.8,\x+1.2*\d) node[scale=1.2, above]{three}; \begin{scope}[xshift=100] \def\x{2} %so luong block \foreach\h in{1,...,\x}{ \drawboxa{1}{1}{\h}{blue!25} } \draw(1,-\d) node[scale=1.3]{2}; \draw(.8,\x+1.2*\d) node[scale=1.2, above]{two}; \end{scope} \begin{scope}[xshift=200] \def\x{5} %so luong block \foreach\h in{1,...,\x}{ \drawboxa{1}{1}{\h}{blue!25} } \draw(1,-\d) node[scale=1.3]{5}; \draw(.8,\x+1.2*\d) node[scale=1.2, above]{five}; \end{scope} \end{tikzpicture} \vspace{1cm} \begin{tikzpicture} \def\x{5} %so luong block %drawbox{x}{z}{y} %x la toa do x %z la toa do lop tinh theo goc xien %y la toa do y \drawboxb{1}{0}{0} \end{tikzpicture} \begin{tikzpicture} \def\x{5} % so luong block xanh \def\v{2} % so luong block vang \def\b{1} % so luong block xanh duong \pgfmathtruncatemacro{\xx}{\x+1} \pgfmathtruncatemacro{\vv}{\x+\v} \pgfmathtruncatemacro{\vvv}{\vv+1} \pgfmathtruncatemacro{\bb}{\vv+\b} \ifnum\x>0 \foreach \h in {1,...,\x}{ \drawboxc{\h}{1}{1}{brown!35} } \fi \ifnum\v>0 \foreach \h in {\xx,...,\vv}{ \drawboxc{\h}{1}{1}{yellow!55} } \fi \ifnum\b>0 \foreach \h in {\vvv,...,\bb}{ \drawboxc{\h}{1}{1}{blue!25} } \fi \end{tikzpicture} \end{document} The code was from user 11232 How to draw stacked cubes of different sizes and colors?

  • Custom Font and Bolding Not Compatible In Font Setup Commands [KOMA-Script]
    by nebulisx on February 4, 2026 at 3:40 am

    I am trying to use \setkomafont to set the font of titles and headings, but when I try to use a custom font with \fontspec or \fontfamily, it overrides \bfseries instead of applying them both. So, when I use the command below, it only applies Roboto and the font size: \setkomafont{title}{\fontspec{Roboto}\fontsize{20}{24}\bfseries\selectfont} Other similar commands that I have tried but didn't work: \setkomafont{title}{\fontfamily{Roboto}\fontsize{20}{24}\bfseries\selectfont} % \setkomafont{title}{\fontfamily{Helvetica}\fontsize{20}{24}\bfseries\selectfont} % \setkomafont{title}{\fontfamily{Montserrat}\fontsize{20}{24}\bfseries\selectfont} % etc, etc When I use each of these commands alone, it also works fine \setkomafont{title}{\fontsize{20}{24}\bfseries\selectfont} % and \setkomafont{title}{\fontspec{Roboto}\fontsize{20}{24}\selectfont} As expected, the first command applies the bold font and the second command applies the Roboto font. A non-exhaustive list of l tried trying to fix this problem (we're just going to use \fontspec{Roboto} in all of them for simplicities sake I've gone insane enough. Just know that I tried many fonts in both koma-script and fontspec): \setkomafont{title}{{\fontspec{Roboto}}\fontsize{20}{24}\bfseries\selectfont} \setkomafont{title}{{\fontspec{Roboto}}\fontsize{20}{24}\bfseries\selectfont} % \setkomafont{title}{\fontspec{Roboto}{\fontsize{20}{24}\bfseries\selectfont}} % \setkomafont{title}{\fontsize{20}{24}\bfseries\selectfont} \addtokomafont{title}{\fontspec{Roboto}} % \setkomafont{title}{\fontspec{Roboto}\fontsize{20}{24}\bfseries\selectfont} \addtokomafont{title}{\bfseries} % This one got rid of the font and made it bold instead XDDDDDDDDDDD I also went in Windows Shell to look at the luaotfload-tool package and force it to update after looking through the fontspec manual. I did not find anything being discussed in the KOMA-script manual or the The Not So Short Introduction to LaTeX, but I didn't do a thorough search.

  • Sockets and the use of token lists in names
    by enkorvaks on February 4, 2026 at 1:22 am

    I have been looking at Sockets recently, and have some questions on their behaviour. I have had a look at Practical guidelines for using sockets and Example of using plugs and sockets, as well as ltsockets-doc, and I have played with sockets in a document (mostly for testing). I would like to know if the behaviour I am seeing is expected (and will continue to work), or if it is a factor of how it is (currently) implemented, and I shouldn't rely on it. \documentclass{article} \NewSocket{enkorvaks/format-i}{1} \NewSocket{enkorvaks/format-ii}{1} \NewSocketPlug{enkorvaks/format-i}{formatibold}{Format 1: \textbf{#1}} \NewSocketPlug{enkorvaks/format-ii}{formatiitt}{Format 2: \texttt{#1}} \AssignSocketPlug{enkorvaks/format-i}{formatibold} \AssignSocketPlug{enkorvaks/format-ii}{formatiitt} \ExplSyntaxOn \tl_new:N \l_enkorvaks_formatchoice_tl \tl_set:Nn \l_enkorvaks_formatchoice_tl {format-i} \NewDocumentCommand{\sockettesting}{m}{ \UseSocket{enkorvaks/\l_enkorvaks_formatchoice_tl}{#1} } \NewDocumentCommand{\formatbold}{}{ \tl_set:Nn \l_enkorvaks_formatchoice_tl {format-i} } \NewDocumentCommand{\formattt}{}{ \tl_set:Nn \l_enkorvaks_formatchoice_tl {format-ii} } \ExplSyntaxOff \begin{document} Socket Test: \sockettesting{This should be bold (format 1)} \formattt{} Socket Test: \sockettesting{This should be tt (format 2)} \formatbold{} Socket Test: \sockettesting{This should be bold (format 1) again} \end{document} (yes, this is a trivial use, and doesn't need sockets, but this is an example only) In short, the question is: Can I use token lists (or \newcommands, I guess) as part of the \UseSocket and expect it to work into the future?

  • Different thickness of the sidebar ends In ConTeXt
    by filokalos on February 3, 2026 at 8:21 pm

    According to the https://wiki.contextgarden.net/Command/setupsidebar, sidebar works just excellent. Is there a possibility to make the different thickness of the ends of the one sidebar? For example the one is 3pt, and the other is 1pt.

  • How to add fermata symbol to metre package?
    by rensemil on February 3, 2026 at 11:10 am

    I am using the package metre. It has the environment \metra{} used for typesetting latin (and greek) metre notation. This environment has almost all the special characters I need, except one: I need a character that looks somewhat like a fermata 𝄐 but preferrably in the same style as the other metrical symbols. This could, I believe, be achieved by simply taking the character breve that is produced by \documentclass{article} \usepackage[en]{metre} \begin{document} \metra{\a\m\b\bm} \end{document} and have it flipped upside down and a dot put underneath. In a book, this is what it looks like: It's the last symbol of each of the lines in the box. Does anyone know how this could be achieved? I even tried contacting the package's creator but his email address does not seem to exist anymore. My MWE produces the symbols in this picture (the ones inside the brackets): Thanks in advance!

  • How to make nested tabularx work
    by user2609605 on February 3, 2026 at 10:00 am

    Example: \documentclass[a4paper]{article} \overfullrule=10mm \usepackage{tabularx} \begin{document} This document is for experimenting around \texttt{tabularx}. \begin{tabularx}{\linewidth}{|XX}%p{5cm} \begin{minipage}{\linewidth} \begin{tabularx}{\linewidth}{|X}% long text to be \newline long text to be \newline long text to be \newline long text to be \newline long text to be \newline % \the\hsize % \the\linewidth % \the\textwidth long text to be \end{tabularx} \end{minipage} & %\begin{tabularx}{0.25\linewidth}{|X}% 2nd %\end{tabularx} \end{tabularx} \end{document} results in: ! Extra }, or forgotten \endgroup. \TX@trial ...er \tabular \the \toks@ \endtabular } \TX@ckpt \TX@typeout@ {\@s... l.80 \end{tabularx} ! Extra }, or forgotten \endgroup. \TX@endtabularx ...\csname endtabular*\endcsname } \global \TX@ftn \expandaft... l.80 \end{tabularx} ! Extra }, or forgotten \endgroup. \TX@endtabularx ... }\the \TX@ftn \ifnum 0=`{\fi } \expandafter \expandafter ... l.80 \end{tabularx} ! Extra }, or forgotten \endgroup. \@endpbox ...trutbox \par \color@endgroup \egroup \hfil l.80 \end{tabularx} ! Missing \endgroup inserted. <inserted text> \endgroup l.80 \end{tabularx} ... If I replace the inner tabularx by tabular (dropping \linewidth and changing X) it works. I would even like to use without minipage, but that it does not work with minipage, it means that minipage encapsulation is not very strict. I will have a look I think I remember an example where nested tabularx worked.

  • Add a half-sphere and part of a sphere in a tikzpicture
    by Nicolas on February 3, 2026 at 9:33 am

    I would like to be able to add a half-sphere on the face of the top of the traced network and 1/8 of a sphere on one of the corners of the cube (as shown in the attached images) on my figure (currently, I have only drawn spheres to show where I want to place the half-sphere and the 1/8th sphere). \documentclass[border=2mm]{standalone} \usepackage{tikz,tikz-3dplot} \usepackage{xcolor} \begin{document} \tdplotsetmaincoords{75}{10} \begin{tikzpicture}[x={(0:1cm)},y={(30:0.5cm)},z={(90:1cm)},scale = 5] % ---- Tracé des traits du réseau ---- \draw (0,0,0) -- (1,0,0) -- (1,1,0) -- (0,1,0) -- (0,0,0); \draw (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1) -- (0,0,1); \draw[thin] (0,0,0) -- (0,0,1); \draw[thin] (1,0,0) -- (1,0,1); \draw[thin] (1,1,0) -- (1,1,1); \draw[thin] (0,1,0) -- (0,1,1); \draw[very thin, dashed] (0.5,0,0) -- (0.5,1,0) -- (0.5,1,1) -- (0.5,0,1) -- cycle; \draw[very thin, dashed] (0,0.5,0) -- (1,0.5,0) -- (1,0.5,1) -- (0,0.5,1) -- cycle; \draw[very thin, dashed] (0,0,0.5) -- (1,0,0.5) -- (1,1,0.5) -- (0,1,0.5) -- cycle; \tdplottransformmainscreen{0.66}{0.55}{0.55} \shadedraw[tdplot_screen_coords, ball color = blue] (\tdplotresx,\tdplotresy) circle (0.15); \end{tikzpicture} \hspace{1cm}; \begin{tikzpicture}[x={(0:1cm)},y={(30:0.5cm)},z={(90:1cm)},scale = 5] % ---- Tracé des traits du réseau ---- \draw (0,0,0) -- (1,0,0) -- (1,1,0) -- (0,1,0) -- (0,0,0); \draw (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1) -- (0,0,1); \draw[thin] (0,0,0) -- (0,0,1); \draw[thin] (1,0,0) -- (1,0,1); \draw[thin] (1,1,0) -- (1,1,1); \draw[thin] (0,1,0) -- (0,1,1); \draw[very thin, dashed] (0.5,0,0) -- (0.5,1,0) -- (0.5,1,1) -- (0.5,0,1) -- cycle; \draw[very thin, dashed] (0,0.5,0) -- (1,0.5,0) -- (1,0.5,1) -- (0,0.5,1) -- cycle; \draw[very thin, dashed] (0,0,0.5) -- (1,0,0.5) -- (1,1,0.5) -- (0,1,0.5) -- cycle; \tdplottransformmainscreen{0.6}{0.6}{1} \shadedraw[tdplot_screen_coords, ball color = blue] (\tdplotresx,\tdplotresy) circle (0.15); \end{tikzpicture} \hspace{1cm}; \begin{tikzpicture}[x={(0:1cm)},y={(30:0.5cm)},z={(90:1cm)},scale = 5] % ---- Tracé des traits du réseau ---- \draw (0,0,0) -- (1,0,0) -- (1,1,0) -- (0,1,0) -- (0,0,0); \draw (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1) -- (0,0,1); \draw[thin] (0,0,0) -- (0,0,1); \draw[thin] (1,0,0) -- (1,0,1); \draw[thin] (1,1,0) -- (1,1,1); \draw[thin] (0,1,0) -- (0,1,1); \draw[very thin, dashed] (0.5,0,0) -- (0.5,1,0) -- (0.5,1,1) -- (0.5,0,1) -- cycle; \draw[very thin, dashed] (0,0.5,0) -- (1,0.5,0) -- (1,0.5,1) -- (0,0.5,1) -- cycle; \draw[very thin, dashed] (0,0,0.5) -- (1,0,0.5) -- (1,1,0.5) -- (0,1,0.5) -- cycle; \tdplottransformmainscreen{0.}{0.}{1} \shadedraw[tdplot_screen_coords, ball color = blue] (\tdplotresx,\tdplotresy) circle (0.15); \end{tikzpicture} \end{document}

  • pgfplotstable: hide 'leading zeros' and values '1.0000'
    by cis on February 3, 2026 at 7:11 am

    In a pgfplotstable I want (starting with the first column, here 'b') to hide all so-called leading zeros (That was the simplest method I could find. If there's an easier way, that would be great too.) to hide all values '1.0000' completely What's the best way to do that? I tried string replace (for the '1.0000') without success. \documentclass[margin=5pt, varwidth]{standalone} \usepackage{pgfplotstable} \pgfplotsset{compat=1.18} %% Hide Leading zeros ==================== % ---> https://tex.stackexchange.com/a/172672/46023 \ExplSyntaxOn \NewDocumentCommand\trimleadingzero{m}{%% \fp_compare:nTF { 0 < \fp_abs:n { #1 } < 1 } { \__trimleadingzero:n {#1} } { #1 } } \cs_new_protected:Npn \__trimleadingzero:n #1 { \seq_set_split:Nnn \l_ae_integer_decimal_parts_seq {.} {#1} \fp_compare:nF {#1>0} { - } .\seq_item:Nn \l_ae_integer_decimal_parts_seq {2} } \ExplSyntaxOff % ============================== \begin{document} \pgfplotstabletypeset[ string type, % do not know whether this is needed ............. col sep=comma, % works not¹: %%% problem here %%%%%%%% columns/1/.style={string type, string replace={1.0000}{555} }, display columns/1/.style={ postproc cell content/.style={@cell content=\trimleadingzero{##1}}, % works not²: ==== %string replace*={1.0000}{}, string type, }, ]{ a, b, c 1, 0.1100, 0.1200 2, 0.2100, 0.2200 3, 0.3100, 0.3200 4, 0.4100, 1.0000 5, 1.0000, 1.0000 } \end{document}

  • Drawing a pulley system
    by Fatai Bakare on February 1, 2026 at 8:32 am

    I need to draw a pulley system as in the figure. How can I do that? Specific information about the figure: A block of mass Mo is on a horizontal surface and attached by a string to a hanging block, also of mass Mo , as shown in the figure. Friction between the block and the horizontal surface is negligible. The masses of the string and pulley are negligible, and the pulley can rotate with negligible friction around its axle.