Hot
- Book design with TikZby Francesco Sieni on November 7, 2025 at 10:25 am
there's a way to desgin a book cover like this one? MWE The only thing i managed to do were the frames \documentclass{book} \usepackage[paperwidth=115mm, paperheight=195mm]{geometry} \usepackage{tikz} \usepackage{tikzpagenodes} \usetikzlibrary{calc} \begin{document} \thispagestyle{empty} %external frame \tikz[overlay,remember picture]\draw($(current page.north east)+(-1.0cm,-1.0cm)$)--($(current page.north west)+(1.0cm,-1.0cm)$)--($(current page.south west)+(1.0cm,1.0cm)$)--($(current page.south east)+(-1.0cm,1.0cm)$)--cycle; %inside \tikz[overlay,remember picture]\draw($(current page.north east)+(-1.1cm,-1.1cm)$)--($(current page.north west)+(1.1cm,-1.1cm)$)--($(current page.south west)+(1.1cm,1.1cm)$)--($(current page.south east)+(-1.1cm,1.1cm)$)--cycle; \end{document} It doesn't matter if the color of the page (in this case black) because then I would like to invert it (i.e. white page and black frames,) Can you help me? Thank you very much!
- How to make Textfield font match page font?by Sarius on November 7, 2025 at 10:15 am
so for work I wanted to create a pdf logbook template with fillable fields, so i can quickly create a new logbook entry. For that I wanted to use the hyperref package with textfields etc. During testing I noticed that the font in the textfields doesnt match the actual text. Through some research I found that this is apparently not an easy solve, and so far I wasnt able to find a solution. I am not using a custom font, I just want the fields to use the Computer Modern Font that the text uses. I have found the option to use the format parameter, but no matter what I put as the text font, I cant get it to be Computer Modern ('Courier' works, but 'Verdana', 'Helvetica', 'Computer Modern', 'cmr12' or 'cmunrn' dont, and i couldnt find out why or how). This only needs to work on one computer, and as far as I understand other questions concerning this the font needs to be either embedded in the document or locally available, so if theres any way to locally install the font, that would be fine, but from what I understand it should be possible to just embed the Computer Modern Font and then it should work. An MWE: \documentclass[12pt]{scrartcl} \usepackage{hyperref} \begin{document} \begin{huge} \begin{center} \textbf{Logbook entry} \raisebox{-0.25\baselineskip}{\begin{Form} \TextField[name=fieldentrynumber, value=XXX, format={var f = this.getField('fieldentrynumber'); f.textFont='CMR12'}, charsize=21pt, height=25pt, width=47pt]{}%This is supposed to have the number of the entry \end{Form}} \end{center} \end{huge} \fontname\font %this gives cmr12 as the current font, which is why i use it in line 9 \end{document}
- Is excludeonly still working? (TeXlive 2025)by Markus Nißl on November 7, 2025 at 8:38 am
I came across excludeonly with this question: Is there an \exclude option? Is excludeonly still working? I'm using 2003/03/14 v1.0 with TeXlive 2025. This next minimal example has file b.tex in the generated output. I only want files a.tex and c.tex in the output. \documentclass{article} \usepackage{excludeonly} \excludeonly{b} \begin{document} \include{a} \include{b} \include{c} \end{document} What am I doing wrong? Or what am I misunderstanding?
- Regular expression to identify `mathmode` in a `tokenlist`, ignore escaped $ signsby Reinhard Neuwirth on November 7, 2025 at 7:35 am
In some context I wanted to be able to establish if a tokenlist contains a dollar sign and found that \regex_if_match:nVTF {\$} <tl_variable> {<true code>}{<false code>} does the trick. For reasons that have now become obsolete I wanted to distinguish between texts that contained mathmode sections as in "believe it or not, but $E = mc^2$ etc." from those that simply contained an escaped dollar sign, as in "I bet you a \$ that ...", and found that using the regular expression \$ returned TRUE for "... $E = mc^2$ ..." and enters an infinite loop for "... \$ ...". Out of curiosity I would still like to know the regular expression that returns TRUE for "... $E = mc^2$ ..." but FALSE for "... \$ ..." as well as for purely alphanumeric strings. \documentclass{article} % RN. 7 Nov 2025 % BRIEF DESCRIPTION: % .regular expression to identify mathmode in a tokenlist, ignore escaped $ signs. %======================= \ExplSyntaxOn \tl_new:N \l_rn_argOne_tl \NewDocumentCommand\myTestForDollarSigns{O{my~alphanumeric~TEXT:~132467890}} { \group_begin: \tl_set:Nx \l_rn_argOne_tl {#1} \regex_match:nVTF {\$} \l_rn_argOne_tl {dollar~sign~found~in:~~~"#1"\\} {NO~dollar~signs~found~in:~~~"#1"\\} \group_end: } % \myTestForDollarSigns \ExplSyntaxOff \begin{document} \myTestForDollarSigns \myTestForDollarSigns[My text $\alpha$ contains dollar signs.] %\myTestForDollarSigns[My text contains \$ signs.] returns ERROR: "TeX capacity exceeded, sorry [input stack size=10000]" \end{document}
- How to change new computer modern font bold series to non-extended?by rfhamz on November 7, 2025 at 6:39 am
I noticed there is one new computer modern font avaliable and added book weight, I set the font by \usepackage[default]{fontsetup} package and found my chapter/section/subsection title setted to bold by \titleformat command(using titlesec package), I try to set the font weight by \renewcommand{\bfdefault}{b} bx->b in preamble part but failed. do you know how can I to set the new computer modern font to non-extended? It is wider the normal, thank you guys.
- How do I reproduce these arrows that point to an equation and give a subtext?by Gurvir Birk on November 7, 2025 at 5:59 am
So I did find an answer here: Arrow pointing to subscript in equation. I used it to painstakingly produce the following: \begin{proof} Set \(b>0\). For all x>0, let \(L(xb)\) and \(L(x)\) have the same derivative: \[\frac{d}{dx}[L(xb)]=\frac{1}{xb}b \tikzmark{a}=\frac{1}{x}=\frac{d}{dx}[L(x)].\] \begin{tikzpicture}[remember picture,overlay] \draw[<-] ([shift={(2pt,-2pt)}]pic cs:a) |- ([shift={(-10pt,-15pt)}]pic cs:a) node[anchor=east] {$\text{chain rule}$} \end{tikzpicture} Therefore the two functions differ by some constant \textit{C}: \[L(xb)=L(x)+C. \tag{\footnotesize{Theorem 4.2.4}}\] We can evaluate \textit{C} by setting \(x=1\): \[L(b)=L(1 \cdot b)=L(1)+C\tikzmark{b}=C.\] \begin{tikzpicture}[remember picture,overlay] \draw[<-] ([shift={(2pt,-2pt)}]pic cs:b) |- ([shift={(-10pt,-15pt)}]pic cs:b) node[anchor=east] {L(1)=0} \end{tikzpicture} \noqed \end{proof} But I wanted a faster method. Is there a snippet of some sort that I can make out of this so it's just faster? Also, here's the result: I'm not sure where that \qed on the left is coming from, I did use \noqed. Also, I'd appreciate some help on arrow alignment. The desired sketch is as below:
- Can a clip be applied to a local group in MetaFun?by Jasper on November 7, 2025 at 5:17 am
Can a clip be applied to a local group in MetaFun? This code only shows a red square, when it should show an empty square, and a single filled square. I would like to apply a clip to a local set of drawing commands. \starttext \startMPpage path p ; p := unitsquare scaled 1cm shifted (-1cm,-1cm) ; draw p withpen pencircle scaled 0.08cm ; path q ; q := unitsquare scaled 1cm shifted (2cm,1cm) ; draw q withpen pencircle scaled 0.08cm ; begingroup fill p withcolor blue ; fill q withcolor red ; clip currentpicture to q ; % can a clip be applied to a local group? endgroup \stopMPpage \stoptext
- How to integrate bclogo package with tcolorbox and calc package without conflicts?by Student on November 7, 2025 at 5:13 am
I'm creating a LaTeX template for my course notes and want to use the bclogo package specifically for my remark environment, while using tcolorbox for other theorem-like environments (definitions, theorems, propositions, etc.). However, I'm encountering a conflict between bclogo and the calc package (which is loaded by pdfpages). \documentclass[12pt,a4paper]{report} \usepackage{amsmath,amssymb,amsthm} \usepackage{xcolor} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} % This loads calc package \usepackage{pdfpages} % bclogo requires tikz \usepackage[tikz]{bclogo} \definecolor{remarkorange}{RGB}{200,100,0} \definecolor{remarkback}{RGB}{255,245,230} \newcounter{remark}[chapter] \renewcommand{\theremark}{\thechapter.\arabic{remark}} \newenvironment{remark}{% \refstepcounter{remark}% \colorlet{bctitle}{remarkorange}% \begin{bclogo}[ couleur=remarkback, arrondi=0.1, logo=\bcattention, couleurBarre=remarkorange, barre=zigzag, noborder=false, couleurBord=remarkorange, epBord=0.8pt ]{\textbf{Remark~\theremark.}}% }{% \end{bclogo}% } \begin{document} \chapter{Test} \begin{remark} This is a test remark. \end{remark} \end{document} Error Message: ! Package calc Error: `p' invalid at this point. See the calc package documentation for explanation. What I've tried: Using \bclogo...\endbclogo instead of \begin{bclogo}...\end{bclogo} - still get the same error Changing package loading order - no improvement Removing pdfpages makes it work, but I need this package for including PDF documents My desired output: I want a remark box with: Light orange background Orange border Zigzag decorative bar at the top An attention/warning icon Automatic numbering (Chapter.Number format) Questions: Is there a way to make bclogo work alongside calc/pdfpages? If not, what's the best alternative to recreate the bclogo style using tcolorbox or another compatible package? Can I conditionally load bclogo only when needed to avoid the conflict? I'm using pdfLaTeX with MiKTeX 21.12.10. Any help would be greatly appreciated!
- Why does \begin{figure}[H] disrupt line spacing?by Yilin Cheng on November 7, 2025 at 1:59 am
Referring to the method described in https://tex.stackexchange.com/a/8633/307309, I have encountered an issue when forcing the position of a figure. Specifically, using \begin{figure}[H] results in increased spacing between text lines, whereas \begin{figure}[!h] does not produce this spacing issue but fails to fix the figure at the desired location. Since I am not proficient in TikZ, I relied on https://www.mathcha.io/editor for the TikZ implementation. Below are the MWE and the TikZ code: \documentclass{ctexart} \usepackage{ctex} \usepackage{setspace}%调整行距 \setstretch{1.5}%全局1.5行距 \usepackage{float} \usepackage{tikz} \usepackage{standalone}%管理tikz图形 \begin{document} \begin{figure}[!h] \centering \includestandalone{技术路线图} \end{figure} \begin{figure}[H] \centering \includestandalone{技术路线图} \end{figure} \end{document} and the \includestandalone{} file is the following tikz code. \tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt \begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1] %uncomment if require: \path (0,1133); %set diagram left start at 0, and has height of 1133 %Straight Lines [id:da7066248187985518] \draw (400.5,41.6) -- (362,41.2) ; \draw [shift={(360,41.18)}, rotate = 0.59] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da7999944640788862] \draw (327.17,53.67) -- (327.51,70.33) ; \draw [shift={(327.56,72.33)}, rotate = 268.81] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Shape: Rectangle [id:dp2355350184012216] \draw (139,72) -- (516.58,72) -- (516.58,224.81) -- (139,224.81) -- cycle ; %Straight Lines [id:da6397588535795506] \draw (215.93,162.76) -- (215.99,186.78) ; \draw [shift={(216,188.78)}, rotate = 269.84] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da9619605636429047] \draw (337.26,163.4) -- (337.48,186.44) ; \draw [shift={(337.5,188.44)}, rotate = 269.46] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da5891831318612836] \draw (302.84,150.42) -- (250.84,150.42) ; \draw [shift={(248.84,150.42)}, rotate = 360] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da6956933175726133] \draw (288.6,202.27) -- (240.84,202.42) -- (241.15,164.67) ; \draw [shift={(241.17,162.67)}, rotate = 90.48] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da4219698029226937] \draw (371.17,150.67) -- (398.17,150.67) ; \draw [shift={(400.17,150.67)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da13207728965460608] \draw (386.77,203.42) -- (420.4,203.37) -- (420.49,165) ; \draw [shift={(420.5,163)}, rotate = 90.15] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da9443933981869584] \draw (327.26,224.67) -- (327.18,237.67) ; \draw [shift={(327.17,239.67)}, rotate = 270.37] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Shape: Rectangle [id:dp18061123387757572] \draw (138,240) -- (515.58,240) -- (515.58,473) -- (138,473) -- cycle ; %Straight Lines [id:da6348375768991603] \draw (214.26,120.67) -- (214.47,136) ; \draw [shift={(214.5,138)}, rotate = 269.22] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da045260314207599905] \draw (251.45,41.62) -- (289.83,41.98) ; \draw [shift={(291.83,42)}, rotate = 180.54] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Shape: Rectangle [id:dp5900306523376166] \draw (138,484) -- (515.58,484) -- (515.58,593) -- (138,593) -- cycle ; %Straight Lines [id:da807193980070819] \draw (327.17,450) -- (327.49,501) ; \draw [shift={(327.5,503)}, rotate = 269.64] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Shape: Rectangle [id:dp8316071639631958] \draw (138,605) -- (515.58,605) -- (515.58,776) -- (138,776) -- cycle ; %Straight Lines [id:da9336143916506561] \draw (327.5,528) -- (327.99,614.7) ; \draw [shift={(328,616.7)}, rotate = 269.68] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da6998028369719029] \draw (328,324.53) -- (328,338.53) ; %Straight Lines [id:da7930621706142792] \draw (186.1,308.19) -- (185.83,282.92) ; %Straight Lines [id:da9326314705317692] \draw (327.5,425.33) -- (327.64,406.39) ; %Straight Lines [id:da6911182017551407] \draw (279.83,306.33) -- (267.83,306.33) ; %Straight Lines [id:da07240701755746037] \draw (279.83,373.33) -- (267.83,373.33) ; %Straight Lines [id:da5556704578032524] \draw (280.5,437.33) -- (257.5,437.33) -- (256.83,383.33) ; %Straight Lines [id:da7232372855447764] \draw (377.49,437.29) -- (402.49,437.29) -- (402.49,421.29) ; %Straight Lines [id:da9612580795473911] \draw (389.83,306.33) -- (377.83,306.33) ; %Straight Lines [id:da13613159305230194] \draw (390,373.06) -- (377.64,373.39) ; %Straight Lines [id:da20924348686148364] \draw (160.15,368.68) -- (160.15,353.68) ; %Straight Lines [id:da6416909250228329] \draw (213.15,368.68) -- (213.15,353.68) ; %Straight Lines [id:da6153122376275038] \draw (452.17,325) -- (452.53,339.09) ; %Straight Lines [id:da2002673600522451] \draw (452.5,363.67) -- (452.5,377.67) ; %Straight Lines [id:da39975779113154764] \draw (452.17,445) -- (451.52,501) ; \draw [shift={(451.5,503)}, rotate = 270.66] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da10420705096662153] \draw (160.21,414.89) -- (160.17,501.33) ; \draw [shift={(160.17,503.33)}, rotate = 270.03] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da7104135616277887] \draw (213.21,414.89) -- (213.17,501.33) ; \draw [shift={(213.17,503.33)}, rotate = 270.03] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da7536260978060636] \draw (189.83,569.67) -- (190.79,614.67) ; \draw [shift={(190.83,616.67)}, rotate = 268.78] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da4095784551020657] \draw (452.21,527.89) -- (452.98,614.7) ; \draw [shift={(453,616.7)}, rotate = 269.49] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da740599887152311] \draw (328.5,776) -- (328.94,789.48) ; \draw [shift={(329,791.48)}, rotate = 268.15] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; % Text Node \draw (295,77) node [anchor=north west][inner sep=0.75pt] [align=left] {\textbf{文献研究}}; % Text Node \draw (292,29) -- (360,29) -- (360,54) -- (292,54) -- cycle ; \draw (295,33) node [anchor=north west][inner sep=0.75pt] [align=left] {\textbf{研究主题}}; % Text Node \draw (401,29) -- (469,29) -- (469,54) -- (401,54) -- cycle ; \draw (404,33) node [anchor=north west][inner sep=0.75pt] [align=left] {\textbf{理论基础}}; % Text Node \draw (181,138) -- (249,138) -- (249,163) -- (181,163) -- cycle ; \draw (184,142) node [anchor=north west][inner sep=0.75pt] [align=left] {期权定价}; % Text Node \draw (170,189) -- (238,189) -- (238,214) -- (170,214) -- cycle ; \draw (173,193) node [anchor=north west][inner sep=0.75pt] [align=left] {DFP定价}; % Text Node \draw (303,138) -- (371,138) -- (371,163) -- (303,163) -- cycle ; \draw (306,142) node [anchor=north west][inner sep=0.75pt] [align=left] {布朗运动}; % Text Node \draw (289,189) -- (387,189) -- (387,214) -- (289,214) -- cycle ; \draw (292,193) node [anchor=north west][inner sep=0.75pt] [align=left] {分数布朗运动}; % Text Node \draw (400,138) -- (483,138) -- (483,163) -- (400,163) -- cycle ; \draw (403,142) node [anchor=north west][inner sep=0.75pt] [align=left] {碳交易减排}; % Text Node \draw (173,96) -- (256,96) -- (256,121) -- (173,121) -- cycle ; \draw (176,100) node [anchor=north west][inner sep=0.75pt] [align=left] {随机波动率}; % Text Node \draw (492,300) node [anchor=north west][inner sep=0.75pt] [align=left] {\textbf{问}\\\textbf{题}\\\textbf{分}\\\textbf{析}}; % Text Node \draw (183,29) -- (251,29) -- (251,54) -- (183,54) -- cycle ; \draw (186,33) node [anchor=north west][inner sep=0.75pt] [align=left] {\textbf{已有研究}}; % Text Node \draw (152,258) -- (220,258) -- (220,283) -- (152,283) -- cycle ; \draw (155,262) node [anchor=north west][inner sep=0.75pt] [align=left] {布朗运动}; % Text Node \draw (153,308) -- (221,308) -- (221,354) -- (153,354) -- cycle ; \draw (156,312) node [anchor=north west][inner sep=0.75pt] [align=left] {分数布朗\\运动}; % Text Node \draw (492,503) node [anchor=north west][inner sep=0.75pt] [align=left] {\textbf{研}\\\textbf{究}\\\textbf{方}\\\textbf{法}}; % Text Node \draw (149,503) -- (232,503) -- (232,570) -- (149,570) -- cycle ; \draw (152,507) node [anchor=north west][inner sep=0.75pt] [align=left] {\begin{minipage}[lt]{53.72pt}\setlength\topsep{0pt} \begin{center} 对冲策略\\HJB方程\\鞅定价方法 \end{center} \end{minipage}}; % Text Node \draw (492,639) node [anchor=north west][inner sep=0.75pt] [align=left] {\begin{minipage}[lt]{12.92pt}\setlength\topsep{0pt} \begin{center} \textbf{研}\\\textbf{究}\\\textbf{内}\\\textbf{容} \end{center} \end{minipage}}; % Text Node \draw (141,617) -- (254,617) -- (254,705) -- (141,705) -- cycle ; \draw (144,621) node [anchor=north west][inner sep=0.75pt] [align=left] {\begin{minipage}[lt]{74.12pt}\setlength\topsep{0pt} \begin{center} (\textbf{第二章})\\已有研究成果、\\理论的梳理,\\研究空间挖掘 \end{center} \end{minipage}}; % Text Node \draw (280,258) -- (378,258) -- (378,325) -- (280,325) -- cycle ; \draw (283,262) node [anchor=north west][inner sep=0.75pt] [align=left] {\begin{minipage}[lt]{63.92pt}\setlength\topsep{0pt} \begin{center} 考虑交易费用\\的欧式期权\\定价问题 \end{center} \end{minipage}}; % Text Node \draw (280,339) -- (378,339) -- (378,406) -- (280,406) -- cycle ; \draw (283,343) node [anchor=north west][inner sep=0.75pt] [align=left] {\begin{minipage}[lt]{63.92pt}\setlength\topsep{0pt} \begin{center} 考虑交易费用\\的回望期权\\定价问题 \end{center} \end{minipage}}; % Text Node \draw (280,425) -- (378,425) -- (378,450) -- (280,450) -- cycle ; \draw (283,429) node [anchor=north west][inner sep=0.75pt] [align=left] {DFP定价问题}; % Text Node \draw (245,295) -- (268,295) -- (268,383) -- (245,383) -- cycle ; \draw (248,299) node [anchor=north west][inner sep=0.75pt] [align=left] {参\\数\\校\\准}; % Text Node \draw (390,270) -- (413,270) -- (413,421) -- (390,421) -- cycle ; \draw (393,274) node [anchor=north west][inner sep=0.75pt] [align=left] {参\\数\\敏\\感\\性\\分\\析}; % Text Node \draw (141,369) -- (179,369) -- (179,415) -- (141,415) -- cycle ; \draw (144,373) node [anchor=north west][inner sep=0.75pt] [align=left] {期权\\定价}; % Text Node \draw (187,369) -- (240,369) -- (240,415) -- (187,415) -- cycle ; \draw (190,373) node [anchor=north west][inner sep=0.75pt] [align=left] {\begin{minipage}[lt]{33.32pt}\setlength\topsep{0pt} \begin{center} 碳交易\\减排 \end{center} \end{minipage}}; % Text Node \draw (425,258) -- (478,258) -- (478,325) -- (425,325) -- cycle ; \draw (428,262) node [anchor=north west][inner sep=0.75pt] [align=left] {\begin{minipage}[lt]{33.32pt}\setlength\topsep{0pt} \begin{center} 碳交易\\减排\\策略 \end{center} \end{minipage}}; % Text Node \draw (418,339) -- (486,339) -- (486,364) -- (418,364) -- cycle ; \draw (421,343) node [anchor=north west][inner sep=0.75pt] [align=left] {参数校准}; % Text Node \draw (426,378) -- (479,378) -- (479,445) -- (426,445) -- cycle ; \draw (429,382) node [anchor=north west][inner sep=0.75pt] [align=left] {\begin{minipage}[lt]{33.32pt}\setlength\topsep{0pt} \begin{center} 参数\\敏感性\\分析 \end{center} \end{minipage}}; % Text Node \draw (294,503) -- (362,503) -- (362,528) -- (294,528) -- cycle ; \draw (297,507) node [anchor=north west][inner sep=0.75pt] [align=left] {对冲策略}; % Text Node \draw (412,503) -- (478,503) -- (478,528) -- (412,528) -- cycle ; \draw (415,507) node [anchor=north west][inner sep=0.75pt] [align=left] {HJB方程}; % Text Node \draw (257,617) -- (400,617) -- (400,768) -- (257,768) -- cycle ; \draw (260,621) node [anchor=north west][inner sep=0.75pt] [align=left] {\begin{minipage}[lt]{94.52pt}\setlength\topsep{0pt} \begin{center} (\textbf{第三、四、五章})\\考虑交易费用的\\期权以及\\DFP定价、\\参数校准、\\参数敏感性\\分析 \end{center} \end{minipage}}; % Text Node \draw (403,617) -- (486,617) -- (486,747) -- (403,747) -- cycle ; \draw (406,621) node [anchor=north west][inner sep=0.75pt] [align=left] {\begin{minipage}[lt]{53.72pt}\setlength\topsep{0pt} \begin{center} (\textbf{第六章})\\碳交易减排\\策略、参数\\校准、参数\\敏感性分析 \end{center} \end{minipage}}; % Text Node \draw (221.33,791.33) -- (439.33,791.33) -- (439.33,816.33) -- (221.33,816.33) -- cycle ; \draw (224.33,795.33) node [anchor=north west][inner sep=0.75pt] [align=left] {\begin{minipage}[lt]{145.52pt}\setlength\topsep{0pt} \begin{center} \textbf{第七章:结论、管理启示、展望} \end{center} \end{minipage}}; \end{tikzpicture} good figure: bad figure: I found that disabling \setstretch{1.5} resolves the issue; however, this would alter the spacing of other body text, which is not the desired outcome. Question 1: Why does the figure display differently? What causes \begin{figure}[H] to produce this spacing issue? Question 2: What is a better approach to force the figure to be placed at the current position? PS: https://tex.stackexchange.com/a/8631/307309 \noindent% \begin{minipage}{\linewidth}% to keep image and caption on one page \makebox[\linewidth]{% to center the image \includegraphics{技术路线图}} \end{minipage} is work good for me, but will alter the font:
- Math Font seek: Italic 'p' with Sharp Ascending Flick Tail, Looped 'k' Descender, and Overall Razor-Sharp Serifs [duplicate]by CNDY on November 7, 2025 at 12:41 am
I came across a picture and am eager to identify the font used in it. Based on the visual features I've observed: Italic 'p': The left connection between the stem and bowl must feature a short, sharp ascending flick tail serif (a brief upward-slanting stroke, like a subtle "upturned pigtail" serif, not a curved arch or rounded transition). Italic 'k': The descender leg must include a closed loop (old-style looped design, not a straight or open leg). Overall Serifs: Extremely sharp bracketed style (like knife-edge transitions, high contrast with thin horizontals and bold verticals), excluding any rounded or soft styles (e.g., no Cambria-like curves). Long tail on 'L' Explicitly Excluded Fonts/Families: Computer Modern family (cm, lm) Times family (txfonts, newtx, stix, xits) Fourier Palatino family (mathpazo, kpfonts, pagella) concmath Garamond-Math XCharter-Math TeX Gyre Schola Math Erewhon Math Libertinus Math It is really like Founder-S10X, and other S10 style font used in 方正书版, but not equal to it(from 'w') "You need at least 10 reputation to post more than 8 links." therefore some examples are not posted sorry
- A \BufA[]{} command which reveals all entries up to = when I increment the . [ConTeXt]by Jasper on November 7, 2025 at 12:32 am
I am making a video in ConTeXt which reveals text slowly, so readers can follow along more easily. Currently, I need to make a new buffer for every change. I would like to just write one, and follow the following process; I would prefer a \BufA[]{} command which reveals all entries up to = when I increment the . Then I wouldn't need a million buffer blocks. Current approach \defineframed[myframed][ width=800pt, align=normal, offset=1cm, frame=off, indenting={yes,medium} ] \startMPdefinitions def mythm = picture theorem; theorem := textext("\getbuffer[BufA]"); label(theorem, (0,0)) ; enddef; \stopMPdefinitions \starttext % first frame \startbuffer[BufA] \startframed[myframed] Blah blah blah, \color[white]{blah blah; blah.} \stopframed \stopbuffer \startMPpage mythm ; \stopMPpage % second frame \startbuffer[BufA] \startframed[myframed] Blah blah blah, blah blah; \color[white]{blah.} \stopframed \stopbuffer \startMPpage mythm ; \stopMPpage % third frame \startbuffer[BufA] \startframed[myframed] Blah blah blah, blah blah; blah. \stopframed \stopbuffer \startMPpage mythm ; \stopMPpage % I would prefer a \BufA[<i>]{<text>} command which reveals % all entries up to <i>=\num when I increment the \def\num. % Then I wouldn't need a million buffer blocks. \stoptext Desired approach \defineframed[myframed][ width=800pt, align=normal, offset=1cm, frame=off, indenting={yes,medium} ] \startMPdefinitions def mythm = picture theorem; theorem := textext("\getbuffer[BufA]"); label(theorem, (0,0)) ; enddef; \stopMPdefinitions \define[2]\testnum{\doifelse{\numexpr#1<=\aaa\relax}{#2}{\color[white]{#2}}} \define[1]\getbuf{ \def\aaa{#1} \startbuffer[BufA] \startframed[myframed] \testnum{1}{Blah blah blah,} \testnum{2}{blah blah.} \stopframed \stopbuffer } \starttext % first frame \getbuf{1} \startMPpage mythm ; \stopMPpage % second frame \getbuf{2} \startMPpage mythm ; \stopMPpage \stoptext
- How do I center my proof qed's with my final line of text?by Gurvir Birk on November 6, 2025 at 9:44 pm
I'm not very good at LaTeX. I've been asking people online and using Grok a lot to try and make my first professional typeset PDF. I'm basically copying a textbook chapter. I want my QED to be centered with the last line of text, and not offshoot a little down. Also, some space between the QED and the final text would be appreciated. I'm using \qedhere to get the QED here. I have the following for custom commands in my preamble: % CUSTOM BLUE QED SYMBOL (hollow square + filled blue square behind, same size, offset SE) \newcommand{\customqed}{% \tikz[baseline=(hollow.base), inner sep=0pt, outer sep=0pt]{ % Filled blue square (behind, same size as hollow) \node[minimum size=6pt, fill=exampleblue, inner sep=0pt] (filled) {}; % Hollow square (on top, offset SE) \node[minimum size=6pt, draw=exampleblue, line width=0.8pt, fill=white, anchor=south east, at=(filled.south east), xshift=-1.2pt, yshift=1.2pt, inner sep=0pt] (hollow) {}; }% } \renewcommand{\qed}{\hfill\customqed} % Allow manual override of QED \newcommand{\noqed}{\renewcommand{\qed}{}} % Removes QED for this env only % Define the proof environment \makeatletter \renewenvironment{proof}[1][\proofname]{\par \pushQED{\customqed}% \normalfont \topsep6\p@\@plus6\p@\relax \trivlist \item[\hskip\labelsep \color{theoremblue}\bfseries #1]% \ignorespaces }{% \popQED\endtrivlist\@endpefalse } \makeatother So if there's something wrong there or if there's something more I can add to get what I want I would appreciate knowing what that is.
- Is there a package to split tables with large number of columns over many pages?by bliako on November 6, 2025 at 9:04 pm
I have square matrix numerical data whose size can vary from 4x4 to 100x100 and possibly more. If using longtable or tabularray and in landscape view, I can present 20, 30 rows at most. Ideally I would like to use a package which takes a block similar to longtable's and produces a few tables with square subsets of the data. For example if my data is 40x40, it can produce 4 tables of size 20x20 and float them one after the other in the document, possibly over many pages. I would like to be able to customise the 1st row and 1st column. I already produce these latex tables using Perl and templates and I guess I could do that through Perl. But it would be more modular if all formatting is done in LaTeX. I am using xelatex. I can even use LuaLaTeX but I would prefer not as not to complicate too much my project's dependencies. Is there such a package? EDIT, after reading about pgfplotstable from @JohnKormylo's comment, I managed to filter out both columns and rows and so I am presenting the same data in 4 different tables with different rows/cols filtered out. Alas, the above are done manually or via my behind-the-scenes template system which produces the latex code. Ideally there must be a way to create a command which takes parameters: which columns to keep, which rows to discard and the formatting and "outputs" the table. And then loop over all the rows in groups of 20 and call the command. I don't think I can manage that. Anyone? p.s. pgfplotstable is very powerful and separation of data and view is such a great concept. makes things much easier. \begin{document} \pgfplotstableread[ col sep=&, row sep=\\, header=true ]{ % this data was inserted here by the template system Αρ&1&2&3&4&5&6&7&8\\ 1&--&0.60&0.12&0.19&0.06&0.67&0.91&0.02\\ 2&0.76&--&0.98&0.43&0.26&0.60&0.24&0.96\\ 3&0.87&0.93&--&0.08&0.63&0.33&0.63&0.24\\ 4&0.72&1.00&0.17&--&0.22&0.72&0.46&0.24\\ 5&0.32&0.45&0.49&0.92&--&0.57&0.77&0.42\\ 6&0.72&0.64&0.15&0.67&0.61&--&0.95&0.59\\ 7&0.34&0.91&0.03&0.83&0.35&0.32&--&0.17\\ 8&0.39&0.46&0.46&0.87&0.48&0.22&0.59&--\\ }\mydata % boilerplate \pgfplotstableset{ begin table=\begin{longtable}, end table=\end{longtable}, } \pgfplotstableset{ every head row/.style={output empty row}, every head row/.style={ before row=\toprule, output content/.style={\bfseries \textbf{#1}}, after row=\bottomrule\endfirsthead, }, every head row/.style={ before row=\toprule, output content/.style={\bfseries \textbf{xxx#1}}, after row=\bottomrule\endhead, }, % How can I \textbf and add vertical line for 1st column only???? % every first column/.style={ % column type/.append style={@{\textbf{\pgfplotstablecellcontent}}} % } %every first col/.style={{\bfseries \textbf{#1}}, column type/.add={|}{} }, %column type={|>{\bfseries}l|l}, % every first col/.style={column type={|>{\bfseries}l|l}} } % Automate creating these N tables, % either via the template % system (easy) or via a LaTeX command: \pgfplotstabletypeset[ columns={[index]0,[index]1,[index]2,[index]3,[index]4}, %columns/0/.style={string type,column type=l}, string type, string replace*={--}{--}, skip rows between index={4}{9} ]{\mydata} \pgfplotstabletypeset[ columns={[index]0,[index]5,[index]6,[index]7,[index]8}, %columns/0/.style={string type,column type=l}, string type, string replace*={--}{--}, skip rows between index={4}{9} ]{\mydata} \pgfplotstabletypeset[ columns={[index]0,[index]1,[index]2,[index]3,[index]4}, %columns/0/.style={string type,column type=l}, string type, string replace*={--}{--}, skip rows between index={0}{4} ]{\mydata} \pgfplotstabletypeset[ columns={[index]0,[index]5,[index]6,[index]7,[index]8}, %columns/0/.style={string type,column type=l}, string type, string replace*={--}{--}, skip rows between index={0}{4} ]{\mydata} \end{document}
- How to reproduce this 4-column accounting grid with section headers and full bordersby Fractal on November 6, 2025 at 8:34 pm
I need to reproduce this table exactly in LaTeX What I tried : \documentclass[11pt,a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} % pdfLaTeX \usepackage[french]{babel} \usepackage{geometry} \geometry{margin=1.6cm} \usepackage{xcolor} \usepackage{tabularray} \UseTblrLibrary{booktabs} % tabularray 2023+ (TeX Live 2024) \definecolor{headgray}{RGB}{214,214,214} \begin{document} \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt} \small \begin{center} \begin{adjustbox}{width=\textwidth} \begin{tblr}{ colspec = {Q[wd=1.42cm,c,m] Q[wd=7.85cm,l,m] Q[wd=1.42cm,c,m] Q[wd=7.85cm,l,m]}, rowsep = 1pt, colsep = 2pt, hlines = {1pt}, vlines = {1pt} } \SetCell[c=4]{c,bg=headgray,bf} EXTRAIT DE LA LISTE DES COMPTES DU PLAN COMPTABLE GÉNÉRAL MAROCAIN \\ \SetCell[c=2]{c,bg=headgray,bf}Classe 1 : Comptes de financement permanent & \SetCell[c=2]{c,bg=headgray,bf}Classe 2 (suite) \\ 111 & Capital social ou personnel & 292 & P.P.D des immobilisations incorporelles \\ 1111& Capital social & 2920 & PPD des immobilisations incorporelles \\ 148 & Autres dettes de financement & 293 & P.P.D des immobilisations corporelles \\ 1481& Emprunts auprès des établissements de crédit & 2930 & PPD des immobilisations corporelles \\ 151 & Provisions pour risques & 294/295 & P.P.D des immobilisations financières \\ 1511& Provisions pour litiges & 2951 & PPD des titres de participation \\ 1512& Provisions pour garanties données aux clients & & \\ 1515& Provisions pour amendes, doubles droits, pénalités & & \\ 155 & Provisions pour charges & \SetCell[c=2]{c,bg=headgray,bf}Classe 3 : Comptes d’actif circulant (hors trésorerie) \\ 1555& Provisions pour charges à répartir sur plusieurs exercices & & \\ \SetCell[c=2]{c,bg=headgray,bf}Classe 2 : Comptes d’actif immobilisé & & & \\ 211 & Frais préliminaires & 311 & Marchandises \\ 2111& Frais de constitution & 3111 & Marchandises \\ 2116& Frais de prospection & 312 & Matières et fournitures consommables \\ 2117& Frais de publicité & 3121 & Matières premières \\ 222 & Brevets, marques, droits et val. Simil. & 315 & Produits finis \\ 2220& Brevets, marques, droits et valeurs similaires & 3151 & Produits finis \\ 223 & Fonds commercial & 341 & Fournisseurs débiteurs, avances et acompte \\ 2230& Fonds commercial & 3417 & R, R et R à obtenir, avoirs non encore reçus \\ 231 & Terrains & 342 & Clients et comptes rattachés \\ 232 & Constructions & 3421 & Clients \\ 2321& Bâtiments & 3424 & Clients douteux ou litigieux \\ 233 & Installations techniques, mat. et out. & 3427 & Clients- factures à établir et créances sur travaux non encore facturables \\ 2332& Matériel et outillage & 34271& Clients- factures à établir \\ 234 & Matériel de transport & 345 & État– débiteur \\ 2340& Matériel de transport & 3455 & État– TVA récupérable \\ 235 & Mob., mat. de bureau et aménag divers & 34552& État– TVA récupérable sur charges \\ 2351& Mobilier de bureau & 3458 & État– Autres comptes débiteurs \\ 2352& Matériel de bureau & 348 & Autres débiteurs \\ 2355& Matériel informatique & 3481 & Créances sur cessions d’immobilisations \\ 241 & Prêts immobilisés & 349 & Comptes de régularisation – actif \\ 2411& Prêts au personnel & 3491 & Charges constatées d’avance \\ 248 & Autres créances financières & 3493 & Intérêts courus et non échus à percevoir \\ 2481& Titres immobilisés & 350 & Titres et valeurs de placement \\ 251 & Titres de participation & 3500 & Titres et valeurs de placement \\ 2510& Titres de participation & 390 & P.P.D des comptes de l’actif circulant \\ 281 & Amortissements des non-valeurs & 3911 & PPD des marchandises \\ 2811& Amortissements des frais préliminaires & 3912 & PPD des matières et fournitures \\ 28111& Amortissements des frais de constitution & 3915 & PPD des produits finis \\ 28116& Amortissements des frais de prospection & 3942 & PPD des clients et comptes rattachés \\ 28117& Amortissements des frais de publicité & 3950 & PPD des titres et valeurs de placement \\ 282 & Amortissements des immobilisations incorporelles & \SetCell[c=2]{c,bg=headgray,bf}Classe 4 : Comptes de passif circulant (hors trésorerie) \\ 2822& Amortissements des brevets, marques, droits et valeurs similaires & & \\ 283 & Amortissements des immob. Corp. & 441 & Fournisseurs et comptes rattachés \\ 2832& Amortissements des constructions & 4411 & Fournisseurs \\ 28321& Amortissements des bâtiments & 4417 & Fournisseurs- factures non parvenues \\ 28332& Amortissements du matériel et outillage & 442 & Clients créditeurs, avances et acomptes \\ 2834& Amortissements du matériel de transport & 4427 & RRR à accorder-avoirs à établir \\ 28351& Amortissements du mobilier de bureau & 445 & État– créditeur \\ 28352& Amortissements du matériel de bureau & 4455 & État–TVA facturée \\ & & 4458 & État–Autres comptes créditeurs \\ & & 449 & Comptes de régularisation– passif \\ & & 4491 & Produits constatés d’avance \\ & & 4493 & Intérêts courus et non échus à payer \\ & & 450 & Autres provisions pour risques et charges \\ & & 4501 & Provisions pour litiges \\ & & 4502 & Provisions pour garanties données aux clients \\ & & \SetCell[c=2]{c,bg=headgray,bf}Classe 5 : Comptes de trésorerie \\ & & 5141 & Banques (soldes débiteurs) \\ & & 5161 & Caisses \\ \end{tblr} \end{adjustbox} \end{center} \end{document}
- "Hanging" corners on Tikz diagramby pwesterbaan on November 6, 2025 at 7:23 pm
I'm creating a diagram of an open box using Tikz: \documentclass[margin=5pt, convert={density=1000, size=10000}]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \pagecolor[RGB]{255,255,255} \begin{document} % H-------G % /| /| % / | / | % / E----/--F % / / / / % D-------C / % | / | / % |/ |/ % A-------B \begin{tikzpicture}[ declare function={ wdth=4.35; hgt=2; x_offset=2.75; y_offset=2.75;} ] \coordinate (A) at (0,0); \coordinate (B) at (wdth,0); \coordinate (C) at (wdth,hgt); \coordinate (D) at (0,hgt); \coordinate (E) at ($(A)+(x_offset, y_offset)$); \coordinate (F) at ($(B)+(x_offset, y_offset)$); \coordinate (G) at ($(C)+(x_offset, y_offset)$); \coordinate (H) at ($(D)+(x_offset, y_offset)$); \draw[fill=black!15, line width=1pt] (A) -- (B) -- (F) -- (E) -- cycle; \draw[line width=1pt] (E) -- (F) -- (G) -- (H) -- cycle; \draw[fill=white, line width=1pt] (A) -- (E) -- (H) -- (D) -- cycle; \draw[fill=white, line width=1pt] (B) -- (F) -- (G) -- (C) -- cycle; \draw[fill=white, line width=1pt] (A) -- (B) -- (C) -- (D) -- cycle; \draw[dotted] (A) -- (E) -- (F); \end{tikzpicture} \end{document} The problem I'm having is that the lines protrude where the corners meet (likely because my line width=1pt). How do I draw this diagram without the "hanging" bits at the corners?
- bussproofs: Centring on the tree excluding labelsby Jack Newton on November 6, 2025 at 6:02 pm
The following document compiles to produce the below picture Where the alingment of the 2 prooftrees are different. The proof tree with the label is aligned further to the left as the label is considered part of the tree when aligning it. I would like to have the proof trees aligned (centred) the same regardless of any labels. Is there a way to do this? \documentclass{article} \usepackage{bussproofs} \begin{document} \begin{prooftree} \AxiomC{$\lnot A, \Gamma \vdash \Delta$} \RightLabel{\scriptsize Possibly several weakenings} \doubleLine \UnaryInfC{$\lnot A, \Gamma, \Theta \vdash \Delta, \Pi$} \end{prooftree} \begin{prooftree} \AxiomC{$\lnot A, \Gamma \vdash \Delta$} \doubleLine \UnaryInfC{$\lnot A, \Gamma, \Theta \vdash \Delta, \Pi$} \end{prooftree} \end{document}
- Creating synthetic data for testing various long tablesby bliako on November 6, 2025 at 5:16 pm
I need to tabulate some matrix data of dimensions NxN where N can be 4 to 100. For N>20 (N>35 in landscape) the table must span in several pages. Edit: I forgot to say that the data consists of only real numbers. I would like to have control in producing these numbers wrt their number of digits etc. I am unsure as to what table package to use, so I am trying to test with some synthetic data. But I have problem creating it, in tabular form. For example: \documentclass[a4paper,12pt]{article} \usepackage{lscape} \usepackage{longtable} \usepackage{pgffor} \usepackage{array} \begin{document} \newcommand{\N}{40} % data size % test to see a row is created correctly: % A -> & % N -> \\ \foreach \i in {1,...,\N} { \i=\ifnum\i<\N A \else N \fi } \begin{landscape} \begin{longtable}{*{40}{c|}} \hline % Generate header row \foreach \i in {1,...,\N} { \i \ifnum\i<\N && \else \\ \fi } % <<< line 23 \hline \endfirsthead % % Repeat header on subsequent pages \foreach \i in {1,...,\N} { \i \ifnum\i<\N && \else \\ \fi } \hline \endhead \foreach \i in {1,...,\N} { \foreach \i in {1,...,\N} { 1.2 \ifnum\i<\N && \else \\ \fi } } \end{longtable} \end{landscape} \end{document} But, it complains about: ! Missing \endgroup inserted. <inserted text> \endgroup l.23 } (line 23 is marked in my code above). I created a row at the beggining to check the correct number of '&' and '\'. Isn't the row correct?
- Reproducing amsart page layout with article classby Matteo Raffaelli on November 6, 2025 at 5:11 pm
I'd like to reproduce the exact page layout of the amsart document class using the article class. Does anybody have a simple solution for achieving this? I could not find any previous answer directly addressing this question. Below is a minimal working examples. \documentclass{amsart} \usepackage{lipsum} \begin{document} \lipsum[1-5] \end{document} If one replaces amsart with article, then the page layout changes slightly. In particular, the left and right margins become larger.
- Which environment should I use when defining MetaFun functions in multiple places in a ConTeXt documentby Jasper on November 6, 2025 at 5:03 pm
I have tried to read 2.16 of the MetaFun manual, but am still having trouble understanding which environment to use when defining functions in multiple places in a document. I've heard that my approach is wrong, and want to correct it. \starttext \startMPinclusions def myfunc = draw fullcircle scaled 1cm withcolor black ; enddef ; \stopMPinclusions% \dorecurse{2}{\startMPpage myfunc ; \stopMPpage}% \startMPinclusions def myfunctwo = draw fullcircle scaled 1cm shifted (1cm,0) withcolor black ; enddef ; \stopMPinclusions% \dorecurse{2}{\startMPpage myfunc ; myfunctwo ; \stopMPpage} \stoptext
- extra vertical spacing using \DocumentMetadata{}by leobb on November 6, 2025 at 4:30 pm
Recently I did a full update in my texlive 2025 installation. And the line \DocumentMetadata{} is now introducing a extra vertical space in the \begin{center} ... \end{center} environment. The following mwe \DocumentMetadata{} \documentclass[a4paper]{article} \begin{document} some text \begin{center} line 1 line 2 line 3 \end{center} some text \end{document} See the extra vertical spacing between "line 1", "line 2" and "line 3" Now, if I comment or remove the \DocumentMetadata{} there is no extra space: Before the update, this did not happened. Is this a bug or a feature? How can I remove the extra space while using \DocumentMetadata{}?
- Footnote formatting with Koma-Script and Biblatexby slalomeuse on November 6, 2025 at 3:38 pm
I’m using scrreprt (KOMA-Script) with babel set to French and biblatex. I’m trying to format footnotes so that the first line is indented by 18 pt, and all subsequent lines are flush with the left margin (no additional indentation). Here’s a simplified version of my setup: \documentclass[12pt]{scrreprt} \usepackage[french]{babel} \usepackage[backend=biber,style=verbose]{biblatex} \addbibresource{biblio.bib} \begin{document} Here is some text with a footnote\footnote{This is the footnote text. The first line should be indented by 18pt, and subsequent lines should be flush left.}. Here is a citation footnote\footcite{keytest} to test BibTeX/Biber integration. \end{document} @book{keytest, title = {title}, editor = {Name1, Name2}, year = Date, publisher = {Publisher}, address = {City} } I’ve tried patching @makefntext and using \deffootnote, but I couldn’t get the expected layout. Could anyone show me how to achieve the following in KOMA-Script: I want the footnote formatting to be as follows: an indentation of 18 pt at the start of the footnote line, followed by the footnote number, then a small space of 1 em, and finally the footnote text. The footnote number should be normal number (French standard). The subsequent lines of the footnote should be flush with the left margin. Regarding the bibliography: I’m not sure if biblatex/bibtex footnotes are formatted differently from standard footnotes in KOMA-Script, which is why I included both in my minimal example. My goal is to have a consistent footnote style for both standard footnotes and citation footnotes. Thank you very much for your help!
- Tabularx table thicker lines on some rowsby Gal1le0 on November 6, 2025 at 3:37 pm
I want to make the lines on the first three rows thicker, both vertical and horizontal lines, but just first three rows. Is it possible to do this with tabularx environment? \documentclass{article} \usepackage{tabularx,ragged2e,booktabs,multirow} \newcolumntype{L}{>{\RaggedRight\arraybackslash}X} \renewcommand{\arraystretch}{1.25} \begin{document} \begin{table}[h!] \begin{tabularx}{\textwidth}{|X|X|X|X|X|X|X|X|X|X|X|X|} \hline \multicolumn{4}{|>{\hsize=\dimexpr4\hsize+4\tabcolsep+\arrayrulewidth\relax}X|}{ \begin{tabular}{@{}l@{}} \textbf{A} \\ \textit{A} \end{tabular}} & \multicolumn{8}{|>{\hsize=\dimexpr8\hsize+8\tabcolsep+\arrayrulewidth\relax}X|}{ \begin{tabular}{@{}l@{}} \textbf{B} \\ \textit{B} \end{tabular}} \\ \hline \multicolumn{6}{|>{\hsize=\dimexpr6\hsize+6\tabcolsep+\arrayrulewidth\relax}X|}{ \begin{tabular}{@{}l@{}} \textbf{C} \\ \textit{C} \end{tabular}} & \multicolumn{6}{|>{\hsize=\dimexpr6\hsize+6\tabcolsep+\arrayrulewidth\relax}X|}{ \begin{tabular}{@{}l@{}} \textbf{D} \\ \textit{D} \end{tabular}} \\ \hline \multicolumn{4}{|>{\hsize=\dimexpr4\hsize+4\tabcolsep+\arrayrulewidth\relax}X|}{ \begin{tabular}{@{}l@{}} \textbf{E} \\ \textit{E} \quad \end{tabular}} & \multicolumn{4}{|>{\hsize=\dimexpr4\hsize+4\tabcolsep+\arrayrulewidth\relax}X|}{ \begin{tabular}{@{}l@{}} \textbf{F} \\ \textit{F} \quad \end{tabular}} & \multicolumn{4}{|>{\hsize=\dimexpr4\hsize+4\tabcolsep+\arrayrulewidth\relax}X|}{ \begin{tabular}{@{}l@{}} \textbf{G} \\ \textit{G} \end{tabular}} \\ \hline \multicolumn{12}{|>{\hsize=\dimexpr12\hsize+12\tabcolsep+\arrayrulewidth\relax}X|}{ \begin{tabular}{@{}l@{}} \textbf{H} \\ \textit{H} \quad \end{tabular}} \\ \hline \multicolumn{8}{|>{\hsize=\dimexpr8\hsize+8\tabcolsep+\arrayrulewidth\relax}X|}{ \begin{tabular}{@{}l@{}} \textbf{I} \\ \textit{I} \end{tabular}} & \multicolumn{4}{|>{\hsize=\dimexpr4\hsize+4\tabcolsep+\arrayrulewidth\relax}X|}{ \begin{tabular}{@{}l@{}} \textbf{J} \\ \textit{J} \end{tabular}} \\ \hline \end{tabularx} \end{table} \end{document}
- Any fix for tablenotes with tagpdf?by Miloop on November 6, 2025 at 12:52 pm
I know from this github issue opened on 16 July 2024 that the tablenotes from threeparttable is incompatible with tagpdf. I am able to reproduce this error as well with this minimal example below: \DocumentMetadata{lang=en-UK, tagging=on, pdfstandard=UA-2} \documentclass[12pt]{article} % --- Packages --- \usepackage{hyperref} \usepackage{graphicx} \usepackage{threeparttable} % -- Package setup -- % \tagpdfsetup{ tabsorder = structure, } \hypersetup{ pdftitle={How to make PDF-UA2}, pdfauthor={Miloop Karja}, pdfkeywords={accessibility, tagging, PDF-UA2, LuaLaTeX}, } \begin{document} \begin{table} \begin{threeparttable} \caption{Recruitment in A-team.} \begin{tabular}{l l} Name\tnote{1} & Reason\tnote{2} \\ Miara& They can write backwards \\ Teiman & They can jump very high \\ Ruital & Can think on their feet\\ \end{tabular} \begin{tablenotes} \item[1] Only first name. \item[2] Deemed by the coach \end{tablenotes} \end{threeparttable} \end{table} \begin{figure}[h!] \includegraphics[width=\textwidth]{example-image} \end{figure} %%FYI, verPDF still deems this document PDF-UA2 compliant even though I haven't added alt={} to the figure... ?? \end{document} I get the error: ! Package tagpdf Error: The number of automatic begin (5) and end (4) (tagpdf) text-unit para hooks differ! For immediate help type H <return>. Is a fix available, or a tag-friendly alternative approach?
- How to hide (without background or borders) certain cells in a row when hlines, vlines are active?by Fractal on November 6, 2025 at 8:46 am
I'm trying to reproduce this table : As soon as I try to remove the borders/backgrounds of these cells, they become flat black areas (or inherit unwanted lines/backgrounds) whereas I want them to be totally “transparent”. What I did : \documentclass{article} \usepackage[T1]{fontenc} \usepackage{tabularray} \UseTblrLibrary{booktabs} % si besoin \begin{document} \begin{center} \begin{tblr}{ colspec = { Q[wd=3.3cm,l] Q[wd=2.4cm,c]Q[wd=2.4cm,c] Q[wd=2.4cm,c]Q[wd=2.4cm,c] Q[wd=2.4cm,c]Q[wd=2.4cm,c] Q[wd=2.4cm,c]Q[wd=2.4cm,c] }, hlines, vlines, row{1,2} = {font=\bfseries, c}, row{3} = {c}, % Masquage total (pas de bordure ni fond) de la ligne TOTAL sauf 5,6,7 cell{6}{1,2,3,4,8,9} = { bg=none, toprule=0pt, bottomrule=0pt, leftrule=0pt, rightrule=0pt, abovesep=0pt, belowsep=0pt, leftsep=0pt, rightsep=0pt, font=\normalsize, }, } \SetCell[c=9]{c}{Annexe des créances clients à compléter} \\ \SetCell[r=2]{c}{Clients} & \SetCell[c=2]{c}{Solde au 31/12/2024} & & \SetCell[c=2]{c}{Provisions} & & \SetCell[c=2]{c}{Réajustement} & & \SetCell[c=2]{c}{Pertes irrécouvrables} & \\ & TTC & HT & 2024 & 2023 & (+)DOT & (-)REP & HT & TVA \\ GHAZAL & & & & - & & & & \\ KAMAL & & & & - & & & & \\ % Ligne TOTAL : seules les colonnes 5, 6 et 7 sont visibles & & & & \textbf{TOTAL} & & & & \\ \end{tblr} \end{center} \end{document} The result :
- Want to use LaTeX for Studentsby GowriSaro on November 6, 2025 at 6:03 am
The students don’t have knowledge of TeX but they want to use it. I heard that BakomaTeX has a facility to use LaTeX even the user doesn’t have knowledge of TeX, but I wasn’t able to use it. (The actual problem is that I’m not able to get much information regarding BakomaTeX.) Please refer me to any free LaTeX tool which is more user friendly, so that it’s more likely that the students are going to use it. I can train the students to the basic level of TeX, but what I’m looking for is something based on the WYSIWYG principle, like BakomaTeX.
- Possible bug in TeX?by Igor Liferenko on November 6, 2025 at 3:48 am
If paragraph is started implicitly and begins with a group, \everypar is executed inside group. Is it a feature? \hsize=12em \parindent=0pt \everypar={\hangindent=20pt } \indent{T}he quick brown fox jumps over the lazy dog. \par \noindent{T}he quick brown fox jumps over the lazy dog. \par {T}he quick brown fox jumps over the lazy dog. \bye
- Accounting Scheme with TikZby Fractal on November 5, 2025 at 6:08 pm
I'm trying to reproduce this scheme : What I did : \documentclass[tikz,border=6pt]{standalone} \usepackage{tikz} \definecolor{docBlue}{RGB}{20,60,170} \begin{document} \begin{tikzpicture}[x=1cm,y=1cm] %================ Réglages ================= \definecolor{docBlue}{RGB}{20,60,170} \def\Wleft{8.80} % longueur des 2 traits bleus à gauche \def\Gap{1.05} % écart gauche -> cartouche \def\Wbox{6.90} % largeur cartouche (ouvert vers la gauche) \def\Hrow{1.12} % hauteur d'une ligne \def\Stub{0.70} % débordement (cassure) des traits du cartouche vers la gauche \def\VEgap{0.35} % cartouche -> 1er trait vertical \def\VEsep{1.90} % 1er -> 2e trait vertical (plus éloigné) % Abscisses communes \def\xCode{-1.45} % x des codes \def\xL{0} % début des traits bleus à gauche \pgfmathsetmacro{\xB}{\xL+\Wleft+\Gap} % début cartouche \pgfmathsetmacro{\xVone}{\xB+\Wbox+\VEgap} % 1er trait \pgfmathsetmacro{\xVtwo}{\xVone+\VEsep} % 2e trait % Styles \tikzset{ code/.style = {anchor=west,font=\bfseries\footnotesize}, labA/.style = {anchor=west,font=\itshape\footnotesize}, labB/.style = {anchor=west,font=\bfseries\itshape\footnotesize}, ve/.style = {anchor=west,font=\bfseries\footnotesize}, } %========== Bloc gauche (traits + textes) ========== \newcommand{\Gauche}[5]{% yTop, codeH, codeB, lab1, lab2 \pgfmathsetmacro{\yT}{#1} \pgfmathsetmacro{\yB}{\yT-\Hrow} \draw[very thick] (-0.20,\yT) -- (-0.20,\yB); \node[code] at (\xCode,\yT-0.27) {#2}; \node[code] at (\xCode,\yB+0.27) {#3}; \draw[docBlue, line width=1.1pt] (\xL,\yT) -- ++(\Wleft,0); \draw[docBlue, line width=1.1pt] (\xL,\yB) -- ++(\Wleft,0); \node[labA] at (\xL+0.15,\yT-0.40) {#4}; \node[labB] at (\xL+0.15,\yB+0.15) {#5}; } %========== Cartouche simple (1 ligne) ========== \newcommand{\CartoucheUn}[2]{% yTop, texte \pgfmathsetmacro{\yT}{#1} \pgfmathsetmacro{\yB}{\yT-\Hrow} \pgfmathsetmacro{\yM}{(\yT+\yB)/2} % ouvert vers la gauche avec cassure \draw[docBlue, line width=1.1pt] (\xB-\Stub,\yT) -- ++(\Wbox+\Stub,0); \draw[docBlue, line width=1.1pt] (\xB-\Stub,\yB) -- ++(\Wbox+\Stub,0); \draw[docBlue, line width=1.1pt] (\xB+\Wbox,\yB) -- ++(0,\Hrow); \node[anchor=west] at (\xB+0.30,\yM) {#2}; % VE + traits verticaux \node[ve] at (\xB+\Wbox+0.12,\yM) {VE}; \draw[docBlue, line width=1.1pt] (\xVone,\yB+0.08) -- ++(0,\Hrow-0.16); \node[ve] at (\xVtwo-0.40,\yM) {VE}; \draw[docBlue, line width=1.1pt] (\xVtwo,\yB+0.08) -- ++(0,\Hrow-0.16); } %========== Cartouche double (2 lignes superposées) ========== \newcommand{\CartoucheDeux}[4]{% yTop, txt1, txt2, avec trait médian \pgfmathsetmacro{\yT}{#1} \pgfmathsetmacro{\yM}{\yT-\Hrow} % niveau médian \pgfmathsetmacro{\yB}{\yT-2*\Hrow} % cadre ouvert vers la gauche (une seule verticale à droite) \draw[docBlue, line width=1.1pt] (\xB-\Stub,\yT) -- ++(\Wbox+\Stub,0); \draw[docBlue, line width=1.1pt] (\xB-\Stub,\yB) -- ++(\Wbox+\Stub,0); \draw[docBlue, line width=1.1pt] (\xB+\Wbox,\yB) -- ++(0,2*\Hrow); % trait horizontal médian \draw[docBlue, line width=1.1pt] (\xB,\yM) -- ++(\Wbox,0); % textes \node[anchor=west] at (\xB+0.30,(\yT+\yM)/2) {#2}; \node[anchor=west] at (\xB+0.30,(\yM+\yB)/2) {#3}; % VE + traits verticaux (continus sur 2 lignes) \node[ve] at (\xB+\Wbox+0.12,(\yT+\yM)/2) {VE}; \node[ve] at (\xB+\Wbox+0.12,(\yM+\yB)/2) {VE}; \draw[docBlue, line width=1.1pt] (\xVone,\yB+0.08) -- ++(0,2*\Hrow-0.16); \node[ve] at (\xVtwo-0.40,(\yT+\yB)/2) {VE}; \draw[docBlue, line width=1.1pt] (\xVtwo,\yB+0.08) -- ++(0,2*\Hrow-0.16); } %================ 1) Bloc haut ================= \Gauche{1.70}{6512}{2230} {VNA des immob. Incorporelles cédées} {Sortie du fonds commercial cédé} \CartoucheUn{1.70}{Fonds commercial} %================ 2) Deux blocs bas (gauche) ================= \Gauche{-0.35}{6513}{2310} {VNA des immob. Corporelles cédées} {Sortie des terrains nus cédés} \Gauche{-1.60}{6514}{2510} {VNA des immob. Financières} {Sortie des TP cédés} %================ Cartouche droit commun aux 2 lignes ================= \CartoucheDeux{-0.35}{Terrains nus}{Titres de participation}{} \end{tikzpicture} \end{document} The result :
- Iterated plot with TikZ, PGFPlots and foreach loopby Dominique on November 5, 2025 at 4:31 pm
I'm trying to plot an illustration of the fixed point method in which a function is evaluated repeatedly in a loop. The result should be a staircase or spiral plot on top of the plot of the function itself. I've read here about the use of \edef inside a foreach loop. The following MWE should show what I'm trying to do, but it seems to only perform a single iteration. Notes: the loop variable isn't used inside the loop. perhaps it's an illusion that only single iteration is performed and the real issue is that \xprev and \xnext aren not updated at each pass through the loop. I tried placing the updates inside the \edef, but that gives an undefined control sequence error. I also tried \pgfplotsinvokeforeach instead of \foreach, but only obtained other errors. \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \pgfmathdeclarefunction{g}{1}{\pgfmathparse{#1^2 - 2}} \begin{tikzpicture} \begin{axis} [ xmin = -2.5, xmax = 2.5, ymin = -3, ymax = 3, axis x line = center, axis y line = center, domain=-2.5:2.5, samples=300, ] \addplot[ultra thick] {g(x)}; % graph of g \addplot[thin] {x}; % diagonal \def\xstart{-0.75} \pgfmathsetmacro{\xprev}{\xstart}; \pgfmathsetmacro{\xnext}{g(\xprev)}; \draw[thick, blue] (\xstart, 0) -- (\xstart, \xnext) -- (\xnext, \xnext); \foreach \i in {1, 2, 3}{ \pgfmathsetmacro{\xprev}{\xnext} \pgfmathsetmacro{\xnext}{g(\xprev)} % x <- g(x) \edef\plotoneiter{% \noexpand% \draw[thick, blue] ({\xprev}, {\xprev}) -- ({\xprev}, {\xnext}) -- ({\xnext}, {\xnext}); }\plotoneiter% } \end{axis} \end{tikzpicture} \end{document} Thanks in advance for any hints! EDIT: Here is a quick sketch of what I'm trying to achieve:
- Insteresting case that $...$ inside `cases` environment would exit the math-mode?by Explorer on November 4, 2025 at 5:10 pm
I have the following code: \documentclass{article} \usepackage{amsmath} \begin{document} $ \begin{cases} a & b \\ c & $$math$text$math$$ \end{cases} $ \end{document} It gives: The outer $...$ exit the math-mode, and the two seperate $...$ change maths into math mode again. I happened to find this phenomenon, but I don't know why. Getting into the sources code of amsmath.sty, I could simplified it: \documentclass{article} \begin{document} $ \begin{array}{@{}l@{\quad}l@{}} a & b \\ c & $$math$text$mathaa$$ \end{array} $ \end{document} It gives the same: For references: % line 1116~1126 amsmath.sty \renewenvironment{cases}{% \matrix@check\cases\env@cases }{% \endarray\right.% } \def\env@cases{% \let\@ifnextchar\new@ifnextchar \left\lbrace \def\arraystretch{1.2}% \array{@{}l@{\quad}l@{}}% } It's no so easy for me to trace back what happened inside \array: latexdef \array \array: macro:->\let \@acol \@arrayacol \let \@classz \@arrayclassz \let \@classiv \@arrayclassiv \let \\\@arraycr \let \@halignto \@empty \@tabarray I wanna to know what cause this "feature", and should somebody make use if this feature to input text in cases? Compare with: $ \begin{cases} a & b \\ c & $text$ %<- here `$text$` make "text" exit the math mode \end{cases} $ and $ \begin{cases} a & b \\ c & \text{text} \end{cases} $ The former one save five characters' input.
- How can I detect when an \item in an itemize environment breaks into multiple lines in LaTeX?by nowox on November 4, 2025 at 2:53 pm
I'm experimenting with LaTeX internals to detect when a list item in an itemize environment wraps onto more than one line. My goal is to eventually adjust the layout (for example, switch to a multicols layout) so that each item fits on a single line automatically. As a first step, I’m trying to detect when an item’s text breaks across lines. Here’s the minimal example I'm testing: \documentclass{article} \usepackage{fontspec} \makeatletter \newif\ifWI@pending \newcommand\WI@maybeWarn{% \ifWI@pending \ifnum\prevgraf>1 \PackageWarning{warnitemize} {A list item broke across \the\prevgraf\space lines}% \fi \WI@pendingfalse \fi } \newenvironment{warnitemize} {% \begin{itemize}% % 1) each \item arms the flag \let\WI@origitem\item \def\item{\WI@pendingtrue\WI@origitem}% % 2) hook: end of an item's paragraph \let\WI@orig@endparenv\@endparenv \def\@endparenv{% \WI@orig@endparenv % let LaTeX finish the paragraph \WI@maybeWarn % then test \prevgraf }% } {% \WI@maybeWarn \end{itemize}% } \makeatother \begin{document} \begin{warnitemize} \item Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur vel lectus at elit imperdiet laoreet. Aliquam eget mi sit amet lacus varius facilisis. Pellentesque pharetra mauris non dolor vehicula molestie eu non dolor. Duis ligula est, convallis eget nibh a, tincidunt semper velit. Sed commodo euismod orci ac vulputate. Nam tempor arcu ex. \item Second item court. \item Third item \\ with forced line break. \end{warnitemize} \end{document} However, this doesn’t trigger any warning, even though the first item clearly wraps to multiple lines in the output. Question How can I reliably detect (during compilation) that a paragraph inside an \item has wrapped onto more than one line? Is there a way to measure the item’s box width or height before it is shipped out? I’m compiling with LuaLaTeX on Ubuntu (TeX Live 2024).