Hot
- what is the most reliable way to prevent orphan section title showing on its own at end of a page?by Nasser on August 23, 2026 at 6:09 am
I have this set up. Number of \section{} followed immediately by longtable. All in a chapter. Depending on how large the table is, PDF can end up with section showing on its own at bottom of page. I tried to put \Needspace{10\baselineskip} before \section but this is a hit and miss. sometimes it works and sometimes it does not. I can try to increase the value to 15\baselineskip but how to know this will work all the time? The problem is that the longtable the follows can span more than one page also. Adding an explicit \pagebreak or \newpage before each \section can end up with large empty spaces in pages. I also added \raggedbottom but it did not help in this example below. What is the best way in latex to make sure a section title (or a subsection title also) do not end on its own at end of a page, that works for all cases and for all geometry settings without having to use trial and error each time, as content of tables can change and also amount of text can change. It seems this happens only when a longtable starts right after section title. But I can not be sure. But for now, I need to solve this specific case when longtable follows immediately a section title. It could have something to do with the fact that it is a longtable that follows? Here is MWE \documentclass[12pt]{book} \usepackage{longtable} \usepackage{hyperref} \usepackage{needspace} \usepackage{array} \usepackage{xcolor} \usepackage{pifont} %http : // ctan.org/pkg/pifont \newcommand{\cmark}{\textcolor{blue}{\Large \ding{51}}} \newcommand{\xmark}{\textcolor{red}{\Large \ding{55}}} \newcommand{\notsure}{\ding{103}} % \usepackage{lipsum} \begin{document} \title{my title to solve $\sin x = x$} \tableofcontents \chapter{A} \lipsum[1] some line here some line here some line here some line here some line here some line here some line here some line here some line here some line here some line here some line here some line here some line here \Needspace{10\baselineskip} \section{First order differential equations. Section 1.4 (separable equations). Problems at page 43, Problems at page 88} \begingroup \setlength{\LTleft}{-20cm plus -1fill} \setlength{\LTright}{\LTleft} \begin{longtable}{ |>{\centering\arraybackslash}m{0.6in} |>{\centering\arraybackslash}m{0.6in} |m{3.6in} |>{\centering\arraybackslash}m{0.35in} |>{\centering\arraybackslash}m{0.28in} |>{\centering\arraybackslash}m{0.28in} |>{\centering\arraybackslash}m{0.28in}| } \caption{Lookup table for all problems in current section}\\\hline ID & problem& \multicolumn{1}{c|}{ODE} &{\scriptsize Solved?}&{\scriptsize Maple}&{\scriptsize Mma}&{\scriptsize Sympy} \\\hline \endfirsthead \multicolumn{7}{@{}c@{}}{\parbox{\dimexpr5in+6\tabcolsep-2\arrayrulewidth\relax}{\small\tablename~\thetable\, Lookup table \\ {\footnotesize \emph{Continued from previous page}}\vspace*{1ex}}}\\\hline ID & problem& \multicolumn{1}{c|}{ODE} &{\scriptsize Solved?}&{\scriptsize Maple}&{\scriptsize Mma}&{\scriptsize Sympy} \\\hline \endhead \hline \multicolumn{7}{|r|}{\footnotesize \emph{Continued on next page}}\\\hline \endfoot \hline \endlastfoot \hyperref[41]{41} &1& \[ \begin{array}{>{\displaystyle}r @{\;} >{\displaystyle}l} y^{\prime}+2 y x&=0 \end{array} \] &\cmark&\cmark&\cmark&\cmark\\ \hline \hyperref[42]{42} &2& \[ \begin{array}{>{\displaystyle}r @{\;} >{\displaystyle}l} y^{\prime}+2 x y^{2}&=0 \end{array} \] &\cmark&\cmark&\cmark&\cmark\\ \hline \hyperref[43]{43} &3& \[ \begin{array}{>{\displaystyle}r @{\;} >{\displaystyle}l} y^{\prime}&=y \sin \left(x \right) \end{array} \] &\cmark&\cmark&\cmark&\cmark\\ \hline \hyperref[44]{44} &4& \[ \begin{array}{>{\displaystyle}r @{\;} >{\displaystyle}l} \left(x +1\right) y^{\prime}&=4 y \end{array} \] &\cmark&\cmark&\cmark&\cmark\\ \hline \hyperref[45]{45} &5& \[ \begin{array}{>{\displaystyle}r @{\;} >{\displaystyle}l} 2 \sqrt{x}\, y^{\prime}&=\sqrt{1-y^{2}} \end{array} \] &\cmark&\cmark&\cmark&\cmark\\ \hline \end{longtable} \endgroup \end{document} Compiled with lualatex in TL 2026 gives
- How to Create a Simple Demo Slideshow Showing Unicode Dynamic Ascending Code Values Using LaTeXby mathrm alpha on August 23, 2026 at 2:46 am
I'd like to use LaTeX to create something similar to the “Animation showing the increasing Unicode encoding values” in this video. Do you know of a way to do this? https://youtu.be/o8XvMlCoOac
- Voice reader capable MathJax script for vertically aligned column-wise decimal subtraction algorithm [closed]by Bitlab on August 22, 2026 at 8:45 pm
I would like to find the correct MathJax facility or approach to make MathJax scripts for position-wise addition and subtraction which will produce meaningful result when read by generic browser voice reader. Here "meaningful" is understandable by average (elementary) school student. I understand that the wording of the question title is not specific, but this problem is in the core of MathJax usage, it has to be addressed. Voice reading is a basic requirements in modern schools and colleges. Other offers for the title will be gladly accepted. The two problematic examples are provided below: First, the simple example. Basic position wise addition of decimals, the problem with voice reader (tested in Chrome, by tabbing to MathJax sections) 1) reader adds phantom columns for each of "@{}", which we need to remove the space between columns, 2) the reader goes row-wise, but we need column wise steps to make sense for the algorithm 3) reader ignores horizontal line which marks final result of summation So the first example: $$ \begin{array}{@{}c@{}c@{}c@{}c@{}} & 3 & 4 & . & 5 \\[-0.3em] \text{+} & & 7 \\[-0.3em] \hline & 4 & 1 & . & 5 \end{array} $$ After tabbing to above MathJax fragment in web page, this is what voice reader produces aloud: "Start layout: first row, first column blank, second column blank, third column blank, fouth column three, fith column blank, sixth column four, seventh column blank, eigth column blank, nineth column five, ... " etc. idear is clear. The second question below is for position wise subtractions "American algorithm". (See wikipedia org/wiki/Subtraction .) The voice content is even more difficult for reader and listener. $$ \begin{array}{@{}c @{}c @{}c @{}c @{}} & \tiny{\,\color{red}{1}\,} & \tiny{\,\color{green}{9}\,} & & \tiny{\,\color{blue}{9}\,} & \tiny{\,\color{orange}{10}\,} \\[-0.3em] & \cancel{2} & \cancel{0} & . & \cancel{0} & 0 \\[-0.3em] \text{-} & & 9 & . & 9 & 9 \\[-1em] \hline & 1 & 0 & . & 0 & 1 \end{array} $$ Thank you.
- How to accessibly strike through text?by Teepeemm on August 22, 2026 at 8:25 pm
I would like to accessibly strike through some text. Let's start with this: \DocumentMetadata{lang=en,tagging=on,pdfstandard=ua-2} \documentclass{article} \title{Title} \usepackage{ulem} \begin{document} before \sout{struck out} after \end{document} The PDF looks like "before struck out after". Unfortunately, it appears that screen readers cannot tell this has happened: ngPDF.com says that the content is "before struck out after" show-pdf-tags says that the content is "before struckout after" PDFix and Adobe say that the content is "before PathstruckPathPathout after" (Adobe says that the "Path"s are the lines over "struck", " ", and "out") Based on the tagpdf documentation, I created a struckout.css file with .struckout { text-decoration: line-through; } and adjusted the the code to \DocumentMetadata{lang=en,tagging=on,pdfstandard=ua-2, % uncompress, tagging-setup={ role/new-attribute={struckout}{}, css-list-add={struckout.css} } } \documentclass{article} \title{Title} \usepackage{ulem} \NewCommandCopy\oldsout\sout \renewcommand\sout[1]{% \tagstructbegin{tag=Span,attribute-class={struckout}}% \tagmcbegin{tag=Span}% \oldsout{#1}% \tagmcend% \tagstructend% } \begin{document} before \sout{struck out} after \end{document} I can see that the css file has been included, and ngPDF, PDFix and Adobe see that the class has been included. Unfortunately, they all agree that "after" has become an artifact, and show-pdf-tags crashes ("show-pdf-tags:176: assertion failed!"). How can I adjust this to tag the struck through text? (And is a span sufficient, or should I add some actualtext saying this has been struck through?)
- How to plot the graph with better curvature?by user1942348 on August 22, 2026 at 5:44 pm
I want to plot the above Fig. Using the code below, the curvature are not coming same as the Fig. Please help me get the exact Fig. \documentclass[12pt]{article} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture}[ scale=1.5, thick, vertex/.style={circle, draw=black, fill=white, inner sep=1.5pt, minimum size=6pt} ] % Coordinates \coordinate (v2) at (0, 0); \coordinate (v1) at (-1.5, 0.6); \coordinate (v3) at (1.5, 0.6); \coordinate (v7) at (-1.5, -0.6); \coordinate (v6) at (1.5, -0.6); \coordinate (v8) at (-2.5, 0); \coordinate (v5) at (2.5, 0); \coordinate (v0) at (-3.5, 1.8); \coordinate (v4) at (3.5, 1.8); \coordinate (v10) at (-3.5, -1.8); \coordinate (v9) at (3.5, -1.8); % Continuous Curves % Curve 1: Inner (v0 -> v1 -> v2 -> v3 -> v4) \draw (v0) to[out=-30, in=150] (v1) to[out=-30, in=180] (v2) to[out=0, in=210] (v3) to[out=30, in=210] (v4); % Curve 2: Inner (v10 -> v7 -> v2 -> v6 -> v9) \draw (v10) to[out=30, in=210] (v7) to[out=30, in=180] (v2) to[out=0, in=150] (v6) to[out=-30, in=150] (v9); % Curve 3: Top (v8 -> v1 -> v3 -> v5) \draw (v8) to[out=45, in=210] (v1) to[out=30, in=150] (v3) to[out=-30, in=135] (v5); % Curve 4: Bottom (v8 -> v7 -> v6 -> v5) \draw (v8) to[out=-45, in=150] (v7) to[out=-30, in=210] (v6) to[out=30, in=225] (v5); % Curve 5: Left Bow (v0 -> v8 -> v10) \draw (v0) to[out=-60, in=90] (v8) to[out=-90, in=60] (v10); % Curve 6: Right Bow (v4 -> v5 -> v9) \draw (v4) to[out=-120, in=90] (v5) to[out=-90, in=120] (v9); % 3. Hollow Nodes \node[vertex, label=left:$v_0$] at (v0) {}; \node[vertex, label=above:$v_1$] at (v1) {}; \node[vertex, label=above:$v_2$] at (v2) {}; \node[vertex, label=above:$v_3$] at (v3) {}; \node[vertex, label=right:$v_4$] at (v4) {}; \node[vertex, label=right:$v_5$] at (v5) {}; \node[vertex, label=below:$v_6$] at (v6) {}; \node[vertex, label=below:$v_7$] at (v7) {}; \node[vertex, label=left:$v_8$] at (v8) {}; \node[vertex, label=right:$v_9$] at (v9) {}; \node[vertex, label=left:$v_{10}$] at (v10) {}; \end{tikzpicture} \end{center} \end{document}
- How to color \middle| to generate red vertical bar between two array?by Nasser on August 21, 2026 at 9:56 pm
I have to use \middle| to create vertical bar as follows \documentclass[12pt]{book} \usepackage{amsmath} \usepackage{array} \usepackage{xcolor} \begin{document} \[ \left[ \begin{array}{cc} 3i&-3\\ 3&3i \end{array} \middle| \begin{array}{c} 0\\ 0 \end{array} \right] \] \end{document} Compiles to I just need to make the vertical bar red. Tried things such as \middle\color{red}| and \middle\textcolor{red}{|} but these produce Missing delimiter errors. the reason I need \middle| rather than the simpler cc|c is HTML conversion issue. In ordinary LaTeX, cc|c is preferable, but \middle| is currently only workaround that compiled and generates correct vertical bar in HTML. I just like to make the color red if possible, using the same above code, to make the bar more clear. There will only be one vertical bar. But number of rows and columns can change. No tikz solutions please. TL 2026
- Hiding sections, but keep references with KOMA classby Archange on August 21, 2026 at 7:39 pm
I’m trying to do exactly the same as in Hiding sections, but keep references, especially running the MWE from https://tex.stackexchange.com/a/683261/56823 but with the scrartcl KOMA class instead of the standard article one: \documentclass[a4paper]{scrartcl} \usepackage{environ} \NewEnviron{myhideenv}{% \setbox0\vbox{% \let\xxwrite\write \protected\def\write{\immediate\xxwrite}% {\tiny XX\BODY XX}} } \begin{document} The start of the report. \begin{myhideenv} \section{Testsection not printed} \label{testsection} Test not printed \end{myhideenv} Section reference is still correct: \ref{testsection} \section{This is section two} It is still correct when myhideenv is hidden. The end of the report. \end{document} It used to work up until TeX Live 2024, but not anymore (currently running up-to-date TeX Live 2026). Compiling with lualatex (which I use) gives: ! Incomplete \iffalse; all text was ignored after line 19. <inserted text> \fi l.19 \end{myhideenv} And with pdflatex: ! Emergency stop. <inserted text> }\endwrite l.19 \end{myhideenv}
- How to pass keys values as expl3 token listby Denis Bitouzé on August 21, 2026 at 5:17 pm
I would like to create a document command, say \marginaliagraphic, that: inserts a graphic (using \includegraphics) into the marginal note (using \marginalia from the marginalia package), allows the user to continue specifying the parameters of \marginalia and \includegraphics using key values, for example, like this: \marginaliagraphic[ , marginaliaset = { pos=left, valign=b } , graphicset = { width=.5\linewidth, angle=90 } ]{example-image} The following attempt fails, likely due to an expansion issue: \documentclass{article} \usepackage{marginalia} \usepackage{graphicx} \ExplSyntaxOn \keys_define:nn { mymodule } { , marginaliaset .tl_gset:N = \g__mymodule_marginalia_set_tl , graphicset .tl_gset:N = \g__mymodule_graphic_set_tl } \cs_new_protected:Npn \__mymodule_marginalia_graphic:nn #1 #2 { \keys_set:nn { mymodule } { #1 } \marginalia[\g__mymodule_marginalia_set_tl] { \includegraphics[\g__mymodule_graphic_set_tl]{#2} } } \NewDocumentCommand \marginaliagraphic { O{} m } { \__mymodule_marginalia_graphic:nn {#1} {#2} } \ExplSyntaxOff \begin{document} \marginaliagraphic[ , marginaliaset = { pos=left, valign=b } , graphicset = { width=.5\linewidth, angle=90 } ]{example-image} \end{document} How could I make something like this work?
- How to manually put multiple tags within `array`?by Explorer on August 21, 2026 at 4:56 pm
The post is the follow-up of this link, what I want is to add similar tags as below: \documentclass{article} \usepackage{bigdelim} \usepackage{amsmath} \begin{document} \[ \arraycolsep=2pt \begin{array}{r@{}rrrrr} \ldelim\{{2}{*} & x & + & 3y & = & 11 \tag{1}\\ & 2x & - & y & = & -9 \tag{2}\\[2pt] \ldelim\{{2.7}{*}[result ] & x & & & = & x_1 \tag{1'}\\ & & &\dfrac23 y & = & y_1 \tag{2'} \end{array} \] \end{document} For specific alignment requirement, I found the "syntax preference" with array and bigdelim package. However, we could not use \tags: ! Package amsmath Error: Multiple \tag. See the amsmath package documentation for explanation. Type H <return> for immediate help. ... l.10 ... & 2x & - & y & = & -9 \tag{2} \\[2pt] ? The solution for example this with empheq are hard to achieve multiple alignment points. How could I do that? Edit I have also tried the cases version with Werner's answer, if I switch cases to numcases environment provide by cases package, it can't be nested with matht environment: % Source - https://tex.stackexchange.com/a/765671 % Posted by Werner % Retrieved 2026-08-22, License - CC BY-SA 4.0 \documentclass{article} \usepackage{mathtools} \usepackage{cases} \begin{document} \begin{numcases}{\text{result~}} \phantom{2}x + 3y = \phantom{-9}\mathllap{11} \tag{1'} \\ 2x - \phantom{3}y = -9 \tag{2'} \end{numcases} Here is some text before: \begin{align} & \begin{numcases}{\phantom{\text{result~}}} \phantom{2}x + 3y = \phantom{-9}\mathllap{11} \\ 2x - \phantom{3}y = -9 \end{numcases} \\ \intertext{with some text inbetween the two, just because} & \begin{numcases}{\text{result~}} \phantom{2}x \phantom{{} + 3y} = \phantom{-9}\mathllap{x_1} \\ \phantom{2x + 3}\mathllap{\dfrac{2}{3}}y = \phantom{-9}\mathllap{y_1} \end{numcases} \end{align} and then some closing text at the end. \end{document} gives: ! Missing \endgroup inserted. <inserted text> \endgroup l.29 \end{align} ? Then I found the similar answer, but I still find it hard to apply it to this case...
- Curve sketching in LaTeX documentby M.R. Yegan on August 21, 2026 at 4:13 pm
I wish to sketch a math graph in Latex Doc. my windows is 8.1 64 bit operating system. we need two packages tikz and pgf. I did not find these packages compatible with windows 8.1. Any help will be appreciated.
- Adding document tagging messes up list indentationby hwlz on August 21, 2026 at 3:47 pm
In adding tagging to documents (using pdfLaTeX, with TeX Live 2026), I've encountered a weird problem: equations mess up the indentation for lists. Here is a MWE: %%% Toggle this command to fix/mess up indentation \DocumentMetadata{ lang = en, pdfstandard = ua-2, pdfstandard = a-4f, %or a-4 tagging=on, tagging-setup={math/setup=mathml-SE} } %%% \documentclass{article} \usepackage[english]{babel} \begin{document} \begin{enumerate} \item First on the list, we have an equation $$ f(x) = x^2$$ followed by some text, \begin{enumerate} \item And \item A \item Sublist. \end{enumerate} \item Next on the list we have \begin{enumerate} \item A subitem with an equation $$f(x^2) = f(x)^2$$ \item Then \item Other subitems \end{enumerate} \end{enumerate} \end{document} With no tagging (i.e., no \DocumentMetadata command), I get: ... exactly as expected. But with tagging (including a \DocumentMetadate command), I get: What is going wrong here? Is there a workaround, to get the lists nicely indented?
- Cannot \renewcommand{\Re} in LuaLaTeX with fontsetupby Alexander Voigt on August 21, 2026 at 2:27 pm
I'm using LuaLaTeX and fontsetup to write a mathematical text about complex numbers. In my text I want to use "Re" and "Im" to denote the real and imaginary parts of a complex number, respectively, instead of the curly single letters R and I of plain-TeX. I use the following to re-define the \Re and \Im macros: \documentclass{standalone} \usepackage{fontsetup} \renewcommand{\Re}{\operatorname{Re}} \renewcommand{\Im}{\operatorname{Im}} \begin{document} $x=\Re(z)$, $y=\Im(z)$ \end{document} However, the curly single letters still appear in the output: . Note 1: When I comment out \usepackage{fontsetup} and use \usepackage{amsmath} and replace \renewcommand by \newcommand, the two-letter forms "Re" and "Im" are used. Note 2: The same issue appears when using the physics package: It re-defines \Re and \Im to \operatorname{Re} and \operatorname{Im} respectively. However, the single letter form still appears when using LuaLaTeX and fontspec. (I noticed this issue, because I'm using the physics package.) My question is: How can I overwrite the \Re and \Im macros to show the two-letter form "Re" and "Im" when using LuaLaTeX and fontspec? (I'd like to avoid creating new macros, because the files I'm writing are part of a larger project, which uses \Re and \Im all over the place and I want to be consistent.)
- I want to create a character mapping in the Lualatex systemby الطريق طالب العلم on August 21, 2026 at 2:17 pm
I want to create a custom character map. I've already created one that works with Xelatex, but I can't work with it in Lualatex. Is it possible to create a map that supports Lualatex? This mapping LHSName "A-m-n" RHSName "UNICODE" Define a U+0061 ;a Define b U+0062 ;b Define c U+0063 ;c Define d U+0064 ;d Define e U+0065 ;e Define f U+0066 ;f Define g U+0067 ;g Define h U+0068 ;h Define i U+0069 ;i Define j U+006A ;j Define k U+006B ;k Define l U+006C ;l Define m U+006D ;m Define n U+006E ;n Define o U+006F ;o Define p U+0070 ;p Define q U+0071 ;q Define r U+0072 ;r Define s U+0073 ;s Define t U+0074 ;t Define u U+0075 ;u Define v U+0076 ;v Define w U+0077 ;w Define x U+0078 ;x Define y U+0079 ;y Define z U+007A ;z Define A U+0041 ;A Define B U+0042 ;B Define E U+0045 ;E Define G U+0047 ;G Define I U+0049 ;I Define N U+004E ;N Define O U+004F ;O Define S U+0053 ;S Define T U+0054 ;T Define U U+0055 ;U Define W U+0057 ;W Define Y U+0059 ;Y Define C U+005E ;^ << CARET Define UL U+005F ;_ << UNDERLINE Define P U+002E ;. << DOT Define V U+002C ;, << COMMA (_V_irgule) Define CO U+003A ;: << COLON Define SC U+003B ;; << SEMICOLON Define Ain U+0060 ;` Define F U+0046 ; F Define H U+0048 ;H << HAMZA Define Q U+0022 ;" << QUOTE Define Z U+002D ;Z << HYPHEN Define BAR U+007C ;| Define AN U+0061 U+004E ; aN Define LLAH U+006C U+006C U+005F U+0061 U+0068 ; ll_ah ;Define NUL U+00A6; ;;Define Ha U+0623 ;;Define Hi U+0625 ;;Define Hy U+0626 ;;Define Hw U+0624 ;;Define Hh U+06C0 ;; = U+0647 U+0654 ;;Define HA U+0622 ;;Define HB U+0640 U+0654 ;;Define HBAR U+0621 ; '| pass(Unicode) U+E000 > ; eliminate special code for capitalization in transliterations pass(Unicode) Class [VWL] = (U+0061 U+0065 U+0069 U+006F U+0075 ) ;(a e i o u) Class [AVWL] = (U+064B..U+0650); Class [LTR] = (U+0061..U+007A U+0041 U+0045 U+0047 U+0049 U+004F U+0055 U+0042 U+004E U+0054 U+0059 U+005E U+005F U+0022 U+0027 U+0060) ;a..z A E I O U B N T Y ^ _ " "" ` Class [BRACKETS] = (U+003C U+003E U+00AB U+00BB U+0028 U+0029 U+005B U+005D U+2018 U+2019 U+201C U+201D); < > () « » [ ] ‘ ’ “ ” Class [PUNCT] = (V SC P CO) Class [Iy] = (U+0049 U+0079) ;(I y) Class [Uw] = (U+0055 U+0077) ;(U w) Class [Uwu] = (U+0055 U+0077 U+0075) ;(U w u) ;Class [ae] = (U+0061 U+0065) ;(a e) ;Class [ou] = (U+0075 U+006F) ;(u o) Class [Iyi] = (U+0069 U+0079 U+0049) Class [UI] = (U+0049 U+0055) ; U I Class [Digits] = (U+0030..U+0039) Define BEG (#|Z|[BRACKETS]) Define END (#|[BRACKETS]|[PUNCT] U+0020|[PUNCT] #) Define ENDZ (#|[BRACKETS]|[PUNCT] U+0020|[PUNCT] #|Z) pass(Unicode) Class [Digits] = (U+0030..U+0039) Class [ArDigits] = (U+0660..U+0669) Class [ArEasternDigits] = (U+06F0..U+06F9) Class [VWL] = (U+0061 U+0065 U+0069 U+006F U+0075 ) ;(a e i o u) Class [LTR] = (U+0061..U+007A U+0041 U+0045 U+0049 U+004F U+0055 U+0042 U+004E U+0054 U+0059 U+005E U+002E U+005F U+0022 U+0027 U+0060) ;(a..z A E I O U B N T Y ^ . _ " "" `) e > U+0621 a > U+0627 b > U+0628 c > U+FE9F t > U+062A C t > U+062B UL (t|s) > U+062B j > U+062C H > U+062D C H > U+062E d > U+062F C d > U+0630 r > U+0631 C r > U+0632 s > U+0633 C s > U+0634 S > U+0635 C S > U+0636 T > U+0637 C T > U+0638 A > U+0639 C A > U+063A f > U+0641 q > U+0642 k > U+0643 l > U+0644 m > U+0645 n > U+0646 h > U+0647 w > U+0648 y > U+064A F > U+064E I need to write the letters as follows: (ا) --> a (ب) --> b (ت) --> t (ث) --> ^t ... A problem arises when I know that the letter ث --> {^t}
- How to typeset these two `cases` with multiple alignment requirement?by Explorer on August 21, 2026 at 2:13 pm
Here below is what I want: the image above was generated by tabularray: \documentclass{article} \usepackage{showframe} \usepackage{tabularray} \UseTblrLibrary{tikz} \usetikzlibrary{decorations.pathreplacing} \usetikzlibrary{calligraphy} \usepackage{amsmath} \begin{document} \[ \begin{tblrtikzabove} \draw[decorate,decoration={calligraphic brace,mirror, amplitude=1.5mm},thick] ([yshift=-2pt]h1-|v2) -- ([yshift=+2pt]h3-|v2); \draw[decorate,decoration={calligraphic brace,mirror, amplitude=1.5mm},thick] ([yshift=-2pt]h3-|v2) -- ([yshift=+2pt]h5-|v2); \end{tblrtikzabove} \begin{tblr}{ % hlines, vlines, colspec = {r*{5}{r}}, columns = {rightsep=2pt, leftsep=2pt}, cell{1,3}{1} = {r = 2, c = 1}{m}, } & x & + & 3y & = & 11 \\ & 2x & - & y & = & -9 \\ \text{result\;\;} & x & & & = & x_1 \\ & & & \dfrac{2}{3}y & = & y_1 \end{tblr} \] \end{document} However, I was not sure whether the spacing was "correct" as amsmath's convention. In other word, I wonder whether there exist more "math"-like solution. Here below is my code with IEEEeqnarray, but, I found it hard to handle \{: % https://tex.stackexchange.com/a/147822 % https://tex.stackexchange.com/a/149396 \documentclass{article} \usepackage{showframe} \usepackage{amsmath} \usepackage{ieeetrantools} \begin{document} \begin{IEEEeqnarray*}{urCrCr} & x &+& 3y & = & 11 \\ & 2x &-& y & = & -9 \\ result & x & & & = & x_1 \\ result & & & \dfrac{2}{3}y & = & y_1 \end{IEEEeqnarray*} \end{document} Any suggestions about this?
- How to nested `tabular` as column content within `IEEEeqnarray` of `ieeetrantools`?by Explorer on August 21, 2026 at 11:42 am
This post is the follow-up of my previous answer: \documentclass{article} \usepackage{IEEEtrantools} \usepackage{newtx} \usepackage{lipsum} \usepackage{fixdif} \usepackage{array} \begin{document} \lipsum[1] \begin{IEEEeqnarray*}{rCl+s}% \left.\frac{\d f}{\d x}\right|_{x=3} &=& \frac{1}{\sqrt{\cdots}}& \hspace*{-1em}$\displaystyle\mathcolor{cyan}{\begin{aligned}\frac{\d}{\d x}(-(-25-x^2))^{1/2} \\ = \dots \end{aligned}} $\\[.5cm] y^2&=&x^2+\sin xy& \\ \frac{\d }{\d x}\left(y^2\right) &=& \frac{\d }{\d x}\left(x^2\right) + \frac{\d }{\d x}\left(\sin xy\right) & \begin{tabular}{>{\color{cyan}}l}Differentiate both sides\\% w.r.t.\ $x$\end{tabular}\\% 2y\frac{\d y}{\d x} &=& 2x+\cos(xy)\frac{\d}{\d x}(xy) & \begin{tabular}{>{\color{cyan}}l}Treating $y$ as a function \\ of $x$ and using the Chain Rule\end{tabular} \end{IEEEeqnarray*} \lipsum[2] \end{document} However, there are three \begin{tabular}{>{\color{cyan}}l}s, I fount it not so elegant here, so I try to put it into a custom column: \documentclass{article} \usepackage{IEEEtrantools} \usepackage{newtx} \usepackage{lipsum} \usepackage{fixdif} \usepackage{array} \IEEEeqnarraydefcol{P}{\begin{tabular}{>{\color{cyan}}l}}{\end{tabular}} \begin{document} \lipsum[2][1-3] \begin{IEEEeqnarray*}{rCl+P}% \left.\frac{\d f}{\d x}\right|_{x=3} &=& \frac{1}{\sqrt{\cdots}} &{some text some\\ other text}\\[.5cm] y^2&=&x^2+\sin xy& \\ \frac{\d }{\d x}\left(y^2\right) &=& \frac{\d }{\d x}\left(x^2\right) + \frac{\d }{\d x}\left(\sin xy\right) & {\textDifferentiate both sides\\ w.r.t.\ $x$} \\ 2y\frac{\d y}{\d x} &=& 2x+\cos(xy)\frac{\d}{\d x}(xy) & {Treating $y$ as a function \\of $x$ and using the Chain Rule} \end{IEEEeqnarray*} \lipsum[3][1-3] \end{document} However, it complains that the \\ he dislike: ! Missing } inserted. <inserted text> } l.14 &{some text some\\ o ther text}\\[.5cm] ? I wonder any suggestions to declare tabular inside IEEEeqnarray?
- Using poetrytex, how to adjust vertical space between poems and their titles?by Yves on August 21, 2026 at 8:28 am
My question is related to preparing a book of the poems that a friend wrote. I have selected, for various reasons, the package poetrytex. The beginning of a poem is called by \begin{poem}{Title}{Author, or year, or something}. This looks fine when the two arguments are used. However in my case, the second, typically the author, will be empty, since all the poems will be from a single author. The vertical space between the title and the poem is then increased, and does not look nice. Moreover, chances are that a long poem will spill a few lines on the following page, definitely not suitable. How to reduce consistently the space between the title and the first poem line? \documentclass[11pt, a5paper,draft]{book} \usepackage[english]{babel} \usepackage[numberpoems]{poetrytex} \usepackage{showframe} \begin{document} \begin{poem}{A Limerick}{Anonymous} There was an old party of Lyme\\ Who married three wives at one time. \\ When asked: ‘Why the third?’ \\ He replied: ‘One’s absurd, \\ And bigamy, sir, is a crime.’ \end{poem} \begin{poem}{A Limerick}{} There was an old party of Lyme\\ Who married three wives at one time. \\ When asked: ‘Why the third?’ \\ He replied: ‘One’s absurd, \\ And bigamy, sir, is a crime.’ \end{poem} \end{document}
- Making document with big letter size [duplicate]by Maths Rahul on August 21, 2026 at 5:45 am
In daily typing of mathematical work in latex, I am following the initial matter below: \documentclass[a4paper,12pt]{article} \usepackage[a4paper, total={6in, 8in}]{geometry} \usepackage{amssymb, amsfonts, amssymb, amsthm, amsmath} \begin{document} Hello Hello ..... Hello Hello ..... \end{document} I observed with above selection of document-type and size (6 by 8 inch): The word Hello can be typed 14 times. The line, containing 14 Hello words, can be typed a maximum of 40 times on one page. Question: How can I increase the size of fonts, for words as well as mathematical text throughout the document by simpler commands? Question: How can I put fewer than 14 instances of word Hello in a row? How can I reduce the number of lines to 30 or even less? Why am I doing it? This is because my class is narrow, and has 25 rows, and I can't show text in size of 12pt. I need to double it, to visualize to all audience. (Note: I am avoiding Beamer, since I can't show simpler proofs in one slide.) And, I am distributing the material after the class, which is easily readable with respect to font size.
- How to create a macro to be concatenated?by D G on August 21, 2026 at 5:13 am
The macro \PointLabel is made to simplify creating label on a graph. \fill \PointLabel[above]{-2} \PointLabel[below]{-1} ; Here below is the full code: \documentclass[tikz,border=1cm,12pt]{standalone} \usepackage{amsmath} \usepackage{xintexpr} \newcommand\fx[1]{(#1)^2} \newcommand{\Rational}[1]{% \xintifboolexpr{\xinttheexpr (#1)<0\relax} {-\xintTeXFrac{\xinttheexpr reduce(-( #1 ))\relax}} {\xintTeXFrac{\xinttheexpr reduce(#1)\relax}} } \newcommand{\CoordLabel}[1]{$\left(\Rational{#1},\Rational{\fx{#1}}\right)$} \newcommand{\PointLabel}[2][]{(#2,{\fx{#2}}) circle (2pt) node[#1]{\CoordLabel{#2}}} \begin{document} \begin{tikzpicture}[scale=1.2] \draw[->] (-3.5,0)--(3.5,0) node[right] {$x$}; \draw[->] (0,-1)--(0,10) node[above] {$y$}; \draw[blue,thick,samples=20,domain=-3:3] plot(\x,{\fx{\x}}); \fill (0,{\fx{0}}) circle(2pt) node[below right,red]{\CoordLabel{0}} (1,{\fx{1}}) circle(2pt) node[right]{\CoordLabel{1}} (2,{\fx{2}}) circle(2pt) node[right]{\CoordLabel{2}} (2.5,{\fx{2.5}}) circle(2pt) node[right]{$y=f(x)$} ; % the following causes errors. \fill \PointLabel[above]{-2} \PointLabel[below]{-1} ; \end{tikzpicture} \end{document} However it produces errors: ! Package tikz Error: Giving up on this path. Did you forget a semicolon?. See the tikz package documentation for explanation. Type H <return> for immediate help. ... l.40 \PointLabel [above]{-2} ?
- glossaries: can the acronym-list be name:Description?by Engelbert Buxbaum on August 20, 2026 at 5:07 pm
The following example: \documentclass{article} \usepackage[colorlinks]{hyperref} \usepackage[acronym,nomain,% only acronym-list nopostdot,% entries not finished with full-stop as not complete sentences nonumberlist,% entries not numbered shortcuts% use same commands as acronym package ]{glossaries} \begin{filecontents}[overwrite]{TestAcro.inc} \newacronym[description={pattern recognition technique}]{svm}{SVM}{support vector machine} \newacronym[description={cases in cluster analysis}]{otu}{OTU}{operational taxonomic unit} \newacronym[description={clustering criterion, average linkage}]{UPGMA}{UPGMA}{unweighted pair group method with arithmetic mean} \end{filecontents} \setacronymstyle{long-short-desc} \setglossarystyle{altlist} \makenoidxglossaries \loadglsentries[acronym]{TestAcro.inc} \begin{document} Put all \acfp{otu} into a \acl{svm}, or use cluster analysis with the \acs{UPGMA}-criterion. \Acsp{otu} will be grouped by similarity. \printnoidxglossary[sort=word,type=acronym] \end{document} leads to output like operational taxonomic unit (OTU) cases in cluster analysis In a list of acronyms, IMHO, the acronym should come first and then the long form, like OTU operational taxonomic unit: cases in cluster analysis The list should also be sorted by acronym. How can I achieve that? Thanks in advance Engelbert
- prg_set_conditional with "p" style gives error when "T" and "F" do notby karlh on August 20, 2026 at 4:10 pm
I have a working subroutine that uses \prg_set_conditional:Nnn to define a true/false branch. However, I encountered a situation in which I needed to test two things at once, so I tried using the p style conditional with \bool_lazy_and:nnTF, and I got an error. I now realize that even a trivial function returns the same error; here is a minimal working example: \ExplSyntaxOn \prg_set_conditional:Npnn \my_function:n #1 { p, T, F, TF } { \bool_set_false:N \l_tmpb_bool \prg_return_false: } \my_function:nTF { h } { \bool_set_true:N \l_tmpa_bool } { \bool_set_false:N \l_tmpa_bool } \typeout{TEST:~ \bool_to_str:N \l_tmpa_bool} \bool_set:Nn \l_tmpa_bool { \my_function_p:n {h} } %\bool_set:Nn \l_tmpa_bool { \int_compare_p:nNn { 2 } > { 1 } } \typeout{TEST:~ \bool_to_str:N \l_tmpa_bool} \stop If I uncomment the one line and comment out the one above it, it works fine, so I know it's something in my definition (not usage) that is wrong. Why can't I, say, set boolean variables inside a "_p" conditional? Are there other things that are allowed inside "T" and "F" conditionals but not "p" conditionals?
- Promote the "fake column" and "fake row" feature with `tabularray`?by Explorer on August 20, 2026 at 3:29 pm
This post is the follow-up of my previous answer, preceeding to F.Pantigny's nicematrix new feature "false row" and "false column", here below is the simplified version: % Source - https://tex.stackexchange.com/a/763357 \documentclass{article} \usepackage{xcolor} \usepackage{tabularray} \setlength\lTblrDefaultHruleWidthDim{2pt}% \setlength\lTblrDefaultVruleWidthDim{2pt}% \begin{document} \begin{tblr}{ colspec={*{8}{c}}, stretch = 0, colsep = 0pt, rowsep = 0pt, rows = {ht=1cm,font=\Large}, columns = {wd=1cm}, row{2} = {ht=.15cm}, column{2} = {wd=.15cm}, hlines = {3-Z}{solid}, hline{3-Z} = {1}{solid}, vline{3-Z} = {1}{solid}, vlines = {3-Z}{solid}, cells = { mode=math, halign=c }, cell{3}{3} = {magenta} } & & e & r & r^2 & f & fr^2 & fr \\ & & & & & & & \\ e & & e & r & r^2 & f & fr^2 & fr \\ r & & r & r^2 & e & fr^2 & fr & f \\ r^2 & & r^2 & e & r & fr & f & fr^2 \\ f & & f & fr & fr^2 & e & r^2 & r \\ fr^2& & fr^2 & f & fr & r & e & r^2 \\ fr & & fr & fr^2 & f & r^2 & r & e \end{tblr} \end{document} It looks good, but the code was not so elegant since I have commented here: Consider the "e" which was colored magenta, semantically, it would be cell{2}{2}, but in my code, that was cell{3}{3}, which is not so friendly for further modification The "fake row/column" distance was not easy to control. In my code, that is row{2} = {ht=.15cm} and column{2} = {wd=.15cm}, together with colspec={*{8}{c}},stretch = 0,colsep = 0pt,rowsep = 0pt In a word, I found my code was existing rooms to refine, maybe introduce similar "fake row/column" feature. Any suggestion on this?
- Revtex adds "en" infront of date and section headersby Harry Mullineaux Sanders on August 20, 2026 at 12:40 pm
I'm using revtex to write a paper manuscript, using TexStudio as my latex environment. When I compile my file, "en" keeps appearing infront of the date and the section headers. No solutions I've found have been able to fix this. It's also worth noting that if I compile my paper using overleaf I don't get the same problem. Here's an example using the preamble I use and the pdf it creates. \documentclass[physrev, aps,twocolumn, amsmath, amssymb, floats, floatfix,longbibliography,english]{revtex4-2} \usepackage{graphicx} \usepackage{dcolumn} \usepackage{bm} \usepackage{hyperref} \hypersetup{ colorlinks, citecolor=black, filecolor=black, linkcolor=black, urlcolor=black} \usepackage{braket} \usepackage{soul} \usepackage{lipsum} \begin{document} \title{Paper Title} \author{Author 1} %\email{123@uni.ac.uk} \affiliation{University} \author{Author 2} \affiliation{University} \date{\today} \begin{abstract} We did some stuff. % \end{abstract} \maketitle \section{Introduction} \lipsum[1-3] \section{Section 1} \lipsum[1-3] \end{document}
- How to make emojis transparently available LaTeX? [duplicate]by H-J Salchow on August 20, 2026 at 8:46 am
I like to use emojis transparently in my source. In other words, I like to type something like Hallo 🌍 directly in my LaTeX file and, after compilation, see the same emoji in the resulting PDF. My current solution uses LuaLaTeX together with the '''emotion''' package. The problem is, that every new emoji requires adding two lines to the preamble: an \emotiondef definition, and a corresponding buffer:gsub(...) replacement in a Lua callback. As the number of emojis grows, the preamble becomes longer and longer, which feels rather inelegant. Is there a more elegant way to achieve this? Here is a mwe: \documentclass{article} \usepackage{emotion} \emotiondef{world}{🌍} \directlua{ luatexbase.add_to_callback( "process_input_buffer", function(buffer) buffer = buffer:gsub("🌍", "\\emotion{world}") return buffer end, "apple_emojis" ) } \begin{document} Hello 🌍 \end{document}
- adjmulticol in one column bidi RTLby الطريق طالب العلم on August 20, 2026 at 8:16 am
I have a problem with the adjmulticol package; when the text is within two columns, \begin{adjmulticols}{2}{-.5cm}{-5.5cm} displays correctly, but when it's within a single column,\begin{adjmulticols}{1}{-.5cm}{-5.5cm} the text doesn't display correctly. This code \documentclass[twoside]{article} \usepackage{geometry} \geometry{ paperwidth=8.49in, paperheight=297mm, % right=.8in, inner=7.5cm,outer=2.5cm, top=72pt, headsep=16pt, textwidth=320pt, marginparsep=20pt, marginparwidth=180pt, textheight=680pt, reversemarginpar } \usepackage{fontspec} \usepackage{polyglossia} % Or the standard 'bidi' package \usepackage{adjmulticol} \usepackage{lipsum} % Set up your primary RTL language (e.g., Arabic, Persian, Hebrew) \setmainlanguage{arabic} \newfontfamily\arabicfont[Script=Arabic]{Amiri} % Replace with your preferred font \begin{document} % Standard text layout here... % 1-Column Layout with adjusted left (inner) and right (outer) margins % Syntax: \begin{adjmulticols}{Number of Columns}{Left Margin Change}{Right Margin Change} \begin{adjmulticols}{2}{-.5cm}{-5.5cm} \section{Two-Column} \textbf{Now I want to use the outer margin because I need width.} \lipsum[1-10] \end{adjmulticols} %----Problem One-Column {1} \begin{adjmulticols}{1}{-.5cm}{-5.5cm} \section{One-Column} \textbf{Now I want to use the outer margin because I need width.} \lipsum[1-10] \end{adjmulticols} \end{document}
- Multiple old documents get reloaded when launching SumatraPDF as an external viewer from TeXStudioby einpoklum on August 20, 2026 at 8:10 am
I'm using TeXStudio 4.9.6 with SumatraPDF 3.6.1 - a match not made in heaven apparently - on Windows 11 25H2. Whenever I launch Sumatra as an external viewer for some PDF I'm working on - many windows get opened, trying to load other LaTeX documents' output I had previously opened with it. I edited the Sumatra settings file, and set RestoreSession = false but the behavior persists. However - if I just launch Sumatra from the start menu (with or without a document to load) - this doesn't happen. I am guessing TeXStudio is the culprit, somehow deciding it needs to tell Sumatra to load many documents. How can I get it to stop doing that?
- Why doesn't longtable like \pagebreak in \NewDocumentCommand?by Psychonaut on August 20, 2026 at 12:16 am
I need to conditionally insert page breaks in a manuscript; sometimes these breaks must occur within a longtable environment. It seems that longtable is fine with this if the command containing the \pagebreak was defined with \newcommand, but not with \NewDocumentCommand: \documentclass{article} \usepackage{longtable} \newcommand{\myPageBreakA}{\pagebreak} \NewDocumentCommand{\myPageBreakB}{}{\pagebreak} \begin{document} \begin{longtable}{l} foo \\ \pagebreak % this works bar \\ \myPageBreakA % this works too baz \\ \myPageBreakB % this doesn't work quux \\ \end{longtable} \end{document} Running the above example produces the following error: ! Misplaced \noalign. \pagebreak ->\noalign {\ifnum `}=0\fi \@testopt {\LT@no@pgbk -}4 l.14 \myPageBreakB % this doesn't work Why does this problem occur, and is there some easy way of working around it? Unlike this minimal example, my actual \myPageBreakB command uses some fairly complex argument processing logic, so I would prefer to define it with \NewDocumentCommand instead of \newcommand.
- mémoire.tex: erreur: 294: Undefined control sequence. ^^I\begin{tabular}, please help [closed]by خالد بن حورية on August 19, 2026 at 5:59 pm
\documentclass[12pt,a4paper]{article} % ===== 1. الحزم الأساسية للغة والخطوط ===== \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage{arabic} \setotherlanguage{french} \newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Amiri} \newfontfamily\titlefont[Script=Arabic,Scale=1.5]{Amiri} \newfontfamily\frenchfont{Times New Roman} % ===== 2. تخطيط الصفحة ===== \usepackage{geometry} \geometry{margin=1cm} % ===== 3. الحزم الرسومية والزخارف ===== \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{positioning,shadows.blur,decorations.pathmorphing,shapes.geometric,calc,shapes.multipart} \usepackage{pifont} \usepackage{fontawesome5} % ===== 4. حزم الجداول ===== \usepackage{array} \usepackage{multirow} \usepackage{booktabs} \usepackage{longtable} \usepackage{tabularx} \usepackage{tabularray} % <<<< الحزمة السحرية % ===== 5. الألوان ===== \usepackage[table]{xcolor} % ===== 6. الصناديق المزخرفة ===== \usepackage[most]{tcolorbox} \tcbuselibrary{skins} \usepackage[tikz]{bclogo} % ===== 7. الرؤوس والتذييلات ===== \usepackage{fancyhdr} \usepackage{lastpage} % ===== 8. حزم إضافية ===== \usepackage{amsfonts} \usepackage{titlesec} \usepackage[normalem]{ulem} % ===== 9. أوامر مخصصة ===== \makeatletter \providecommand{\beginR}{\beginL} \providecommand{\endR}{\endL} \makeatother \pagestyle{empty} \definecolor{gold}{RGB}{212,175,55} \definecolor{navy}{RGB}{10,30,80} % كحلي أنيق % تعريف بيئة للتعريف \newtcolorbox{ddef}{ enhanced, colback=blue!5, colframe=blue!70!black, fonttitle=\bfseries\large, coltitle=white, title=\faLightbulb \hspace{2pt} تعريف, boxrule=0pt, sharp corners, borderline={1pt}{0pt}{gold}, % خط ذهبي يزين المربع attach boxed title to top right={yshift=-2mm,xshift=-2mm}, boxed title style={colback=blue!70!black, colframe=gold} % شريط علوي أزرق مع إطار ذهبي } % تعريف بيئة للنشاط \newtcolorbox{aact}{ enhanced, colback=red!5, colframe=red!70!black, fonttitle=\bfseries\large, coltitle=white, title=\faTasks \hspace{2pt} نشاط, boxrule=0pt, sharp corners, borderline={1pt}{0pt}{gold}, attach boxed title to top right={yshift=-2mm,xshift=-2mm}, boxed title style={colback=red!70!black, colframe=gold} } % تعريف بيئة للمثال \newtcolorbox{eex}{ enhanced, colback=green!5, colframe=green!60!black, fonttitle=\bfseries\large, coltitle=white, title=\faPen \hspace{2pt} مثال, boxrule=0pt, sharp corners, borderline={1pt}{0pt}{gold}, attach boxed title to top right={yshift=-2mm,xshift=-2mm}, boxed title style={colback=green!60!black, colframe=gold} } % تعريف بيئة للتطبيق \newtcolorbox{aapp}{ enhanced, colback=orange!5, colframe=orange!80!black, fonttitle=\bfseries\large, coltitle=white, title=\faCheck \hspace{2pt} تطبيق, boxrule=0pt, sharp corners, borderline={1pt}{0pt}{gold}, attach boxed title to top right={yshift=-2mm,xshift=-2mm}, boxed title style={colback=orange!80!black, colframe=gold} } % تعريف بيئة للعمل المنزلي \newtcolorbox{hhw}{ enhanced, colback=navy!5, % خلفية كحلي فاتح colframe=navy, % إطار كحلي غامق fonttitle=\bfseries\large, coltitle=gold, % العنوان بالذهبي title=\faHome \hspace{2pt} عمل منزلي, boxrule=0pt, sharp corners, borderline={1pt}{0pt}{gold}, % خط ذهبي يزين المربع attach boxed title to top right={yshift=-2mm,xshift=-2mm}, boxed title style={colback=navy, colframe=gold, coltext=gold} } % تحسين التباعد \setlength{\parindent}{0pt} \setlength{\parskip}{0.1cm} % ===== تصميم مدمج لرأس المذكرة ===== \newtcolorbox{memohead}{ enhanced, colback=white!95!gray, % خلفية متدرجة فاتحة colframe=blue!70!black, % إطار داخلي أزرق غامق boxrule=1.5pt, sharp corners=all, rounded corners=all, width=\textwidth, before=\vspace{0.2cm}, after=\vspace{0.2cm}, drop shadow=black!30, halign=center, overlay={ % خط علوي متدرج أخضر \draw[left color=green!60!black,right color=green!20!white, line width=2.5pt] (frame.north west)--(frame.north east); % خط سفلي متدرج أحمر \draw[left color=red!60!black,right color=red!20!white, line width=2.5pt] (frame.south west)--(frame.south east); % إطار خارجي ذهبي رفيع \draw[gold, line width=1pt, rounded corners=3pt] (frame.north west)--(frame.south west)--(frame.south east)--(frame.north east)--cycle; } } % ===== تصميم العنوان الرئيسي ===== \titleformat{\section} {\normalfont\Large\bfseries\color{red}} % حجم متوسط + أحمر {}{0pt}{} % بدون ترقيم \titlespacing*{\section}{0pt}{2ex plus 1ex}{1ex} % ===== تصميم العنوان الثانوي ===== \titleformat{\subsection} {\normalfont\large\bfseries\color{blue}} % حجم متوسط + أزرق {}{0pt}{} % بدون ترقيم \titlespacing*{\subsection}{0pt}{1.5ex plus 1ex}{1ex} \begin{document} \AddToHook{shipout/background}{% \begin{tikzpicture}[remember picture,overlay] % إطار أزرق حول الصفحة \draw [blue,line width=2mm] (current page.south west) rectangle (current page.north east); % كتابة رقم الصفحة في الأسفل \node[above right=1cm and 1cm,font=\bfseries] at (current page.south west) {\textarabic{صفحة \thepage\ من \pageref{LastPage}}}; \end{tikzpicture} } % ===== عنوان رئيسي مدمج ===== \begin{center} {\titlefont \fontsize{20}{22}\selectfont \textbf{\textcolor{blue!70!black}{مذكرة رقم: 03}}} \vspace{0.05cm} % زخرفة بسيطة \begin{tikzpicture} \draw[blue!50!black, thick] (0,0) -- (5,0); \draw[green!60!black, thick] (0,0) .. controls (0.2,0.2) and (0.4,0) .. (0.6,0); \draw[green!60!black, thick] (5,0) .. controls (4.8,0.2) and (4.6,0) .. (4.4,0); \end{tikzpicture} \end{center} \vspace{0.05cm} % ===== رأس المذكرة المبسط ===== \begin{memohead} % الصف الأول: ثانوية + السنة في سطر واحد \noindent \begin{minipage}{0.48\textwidth} {\textcolor{blue!70!black}{\textbf{ثانوية:}} حميدي عيسى – أولاد دراج} \end{minipage} \hfill \begin{minipage}{0.48\textwidth} {\textcolor{blue!70!black}{\textbf{السنة الدراسية:}} 2026--2027} \end{minipage} \vspace*{0.1cm} % الصف الثاني: اليوم + المستوى \noindent \begin{minipage}{0.48\textwidth} {\textcolor{green!70!black}{\textbf{اليوم:}} .......... \quad \textcolor{green!70!black}{\textbf{المدة:}} ساعة} \end{minipage} \hfill \begin{minipage}{0.48\textwidth} {\textcolor{green!70!black}{\textbf{المستوى:}} السنة الثانية علوم تجريبية} \end{minipage} \vspace*{0.1cm} % الصف الثالث: الميدان + المحور \noindent \begin{minipage}{0.48\textwidth} {\textcolor{orange!80!black}{\textbf{الميدان:}} التحليل} \end{minipage} \hfill \begin{minipage}{0.48\textwidth} {\textcolor{orange!80!black}{\textbf{المحور:}} الدوال العددية} \end{minipage} \vspace*{0.15cm} % الموضوع - حجم وسط \begin{center} {\textcolor{red!70!black}{\textbf{الموضوع:}} العمليات على دوال عددية} \end{center} \end{memohead} \vspace{0.1cm} % ===== المكتسبات القبلية ===== % ===== القسم ===== \begin{center} \begin{itemize} \item[{\textcolor{green!70!black}{\textbf{\ding{72}}}}] \textcolor{green!70!black}{\textbf{المكتسبات القبلية:}} مفاهيم أولية حول الدوال العددية. \item[{\textcolor{red!70!black}{\textbf{\ding{72}}}}] \textcolor{red!70!black}{\textbf{الكفاءات المستهدفة:}} مراجعة وتذكير بالمفاهيم العامة للدوال العددية. \item[{\textcolor{blue!70!black}{\textbf{\ding{72}}}}] \textcolor{blue!70!black}{\textbf{الأدوات المستعملة:}} المنهاج، الكتاب المدرسي، مراجع، الأنترنت. \end{itemize} \end{center} \begin{center} \begin{tabular}{|c|c|c|} \hline \rowcolor{gold!40} \textbf{المرحلة} & \textbf{عناصر الدرس} & \textbf{المدة} \\ \hline مرحلة الانطلاق & مراجعة المكتسبات القبلية وربطها بالدرس الجديد & 10 دقائق \\ مرحلة الاكتشاف & تقديم التعريفات الأساسية مع أمثلة توضيحية & 20 دقيقة \\ مرحلة بناء التعلمات & نشاط حول العمليات على الدوال + شرح الحل & 25 دقيقة \\ مرحلة التطبيق & تمرين فردي أو جماعي مع مناقشة النتائج & 15 دقيقة \\ مرحلة التقويم & تمرين ختامي أو أسئلة قصيرة للتأكد من الفهم & 10 دقائق \\ \end{tabular} \end{center} \end{document}
- Including image omits page styleby smthint on August 19, 2026 at 4:28 am
I want to include image on my chapter title page but don't want the page number to appear there. This is my code: \documentclass[12pt]{book} \usepackage{parskip} \usepackage{microtype} \usepackage{geometry} \usepackage{graphicx} \usepackage{hyperref} \usepackage{fancyhdr} \usepackage{etoolbox} \usepackage{titlesec} \usepackage{lipsum} \geometry{ paperwidth=6in, paperheight=9in, margin=0.75in } \fancyhead[L,C,R]{} \renewcommand{\headrulewidth}{0pt} \cfoot{} \fancyfoot[LE, RO]{\thepage} \begin{document} \pagestyle{fancy} \chapter{my chapter} \thispagestyle{empty} \includegraphics[width=\textwidth]{./image.png} \lipsum[1-10] \end{document} But when image is included, the page number is still appearing. When the image is not included, the code works as intented: the page number is not showing on the chapter title page and starts to appear on the next pages. \begin{document} \pagestyle{fancy} \chapter{my chapter} \thispagestyle{empty} \lipsum[1-10] \end{document} How to stop page number appearing on the chapter title page when image is included?
- How to create a dynamic fan in TikZ in LaTeX?by mathrm alpha on August 18, 2026 at 5:49 am
Although I've created a basic fan shape in TikZ, how do I make the center blade of the TikZ fan dynamic rotate? the value you enter determines exactly how fast the TikZ fan I created will spin. \documentclass{article} \usepackage{tikz} \usepackage[paperwidth=9cm, paperheight=9cm, margin=1.5cm]{geometry} \begin{document} \pagestyle{empty} \begin{figure}[htbp] \begin{tikzpicture} \filldraw[color=yellow!60, fill=orange!40, very thick](0,0) circle (3); \filldraw[color=yellow!60, fill=red!0, very thick](0,0) circle (2.5); \begin{scope}[rotate=0] \draw [line width=0.3cm] (0,0) -- (2,2); \draw [line width=0.3cm] (0,0) -- (0,3); \draw [line width=0.3cm] (0,0) -- (-2,2); \draw [line width=0.3cm] (0,0) -- (2,-2); \draw [line width=0.3cm] (0,0) -- (3,0); \draw [line width=0.3cm] (0,0) -- (-3,0); \draw [line width=0.3cm] (0,0) -- (0,-3); \draw [line width=0.3cm] (0,0) -- (-2,-2); \filldraw[orange] (0,0) circle (30pt) node[anchor=west]{}; \end{scope} \end{tikzpicture} \end{figure} \end{document}
- Look at the error code i put full code, Undefined control sequence. ^^I^^I\begin{tabular} [closed]by خالد بن حورية on August 17, 2026 at 7:51 am
\begin{center} \begin{tabular}{|c|c|c|} \hline \rowcolor{gold!40} \textbf{المرحلة} & \textbf{عناصر الدرس} & \textbf{المدة} \\ \hline مرحلة الانطلاق & مراجعة المكتسبات القبلية وربطها بالدرس الجديد & 10 دقائق \\ \hline مرحلة الاكتشاف & تقديم التعريفات الأساسية مع أمثلة توضيحية & 20 دقيقة \\ \hline مرحلة بناء التعلمات & نشاط حول العمليات على الدوال + شرح الحل & 25 دقيقة \\ \hline مرحلة التطبيق & تمرين فردي أو جماعي مع مناقشة النتائج & 15 دقيقة \\ \hline مرحلة التقويم & تمرين ختامي أو أسئلة قصيرة للتأكد من الفهم & 10 دقائق \\ \hline \end{tabular} \end{center}