parent_url
stringlengths
41
46
parent_score
stringlengths
1
4
parent_body
stringlengths
25
35.5k
parent_user
stringlengths
37
42
parent_title
stringlengths
12
150
accepted
bool
2 classes
body
stringlengths
4
36.7k
score
stringlengths
1
4
user
stringlengths
37
42
answer_id
stringlengths
1
6
__index_level_0__
int64
0
322k
https://tex.stackexchange.com/questions/515491
4
I'm trying to run some `metapost` code inside a plain `LuaTeX` file, but I don't know how to properly use it. In my example the text compiles fine, however the `metapost` code returns an error. How do I properly compile a `metapost` drawing with plain `LuaTeX`? ``` Testing metapost \directlua{mp = mplib.new({ beginfig(1); u=1cm;draw (2u,2u)--(0,0)--(0,3u)--(3u,0)--(0,0); pickup pencircle scaled 4pt; for i=0 upto 2: for j=0 upto 2: drawdot (i*u,j*u); endfor endfor endfig; })} \bye ``` Footnote: I don't want to build it with `ConTeXt`.
https://tex.stackexchange.com/users/48279
How to properly use metapost in plain LuaTeX
false
``` \fontfam[Termes] \load[minim-mp] % MetaPost We are working on MetaPost \directmetapost{ beginfig(1); path p ; p := fullcircle scaled 1cm ; draw p scaled 2 withpen pencircle withcolor .8 green; endfig; } \bye ```
2
https://tex.stackexchange.com/users/285959
687417
318,903
https://tex.stackexchange.com/questions/687420
0
I am using a latex template to complete my thesis. **I would like to insert appendix in my thesis, like "Appendix A, Appendix B". I would very appreciate if someone tell me how to insert appendices.** I tried several methods to insert appendix but they don't work as disired. When using the following command ``` \appendix \chapter{test} ``` in the "appendices.tex" file, it can not be compiled and output the wrong message below. > > Underfull \vbox (badness 1803) has occurred while \output is active [131]) > [132] (tex/appendices.tex > ....1... > Runaway argument? > { > ! Paragraph ended before @chapter was complete. > > \par > > > I tried the command `\section{test}`, but it also can not be compiled. I also tried to use the package `\usepackage[title, titletoc]{appendix}`. In this case, the appendix can be generated. However, it can not satisfy the format requirement of the thesis, so I guess it would be better to use the command given by the template itself. I check the related command in the `.sty` file of the template (the related code are given below). I would very appreciate if someone tell me how to insert appendices by using this template ``` \def\appendix{ \if@firstappendix \setcounter{chapter}{0}% \setcounter{section}{0}% \renewcommand\@chapapp{Appendix} \typeout{....\AppendicesTotal...} \ifnum\AppendicesTotal=1 \renewcommand\chaptername{\appendixnamenonumber} \else \renewcommand\chaptername{\appendixname} \fi \@firstappendixfalse \fi \chapter}% \def\AppendicesTotal{0} \def\AppendicesNumber#1{\gdef\AppendicesTotal{#1}} \AtEndDocument{ \if@firstappendix \else \immediate\write\@auxout{\string\AppendicesNumber{\thechapter}} \fi} ```
https://tex.stackexchange.com/users/298208
How to insert appendices in a book class document under a given latex template?--Xelatex compiler
true
Please don't show only some code snippets. We cannot try out such snippets without guessing. Always show a [minimal working example](https://tex.meta.stackexchange.com/questions/228/ive-just-been-asked-to-write-a-minimal-example-what-is-that) beginning with `\documentclass` and ending with `\end{document}`. And if you use a template, please either reduce it also to the code really needed or at least—but only as a compromise—add a link to it. Because you've not done and therefore I cannot really test, the following *is guessing*: In your case, the definition of `\appendix` ends with `\chapter`. So `\appendix` is not a switch like the `\appendix` of the standard classes but a command like `\chapter` itself. It expects at least one argument. So you should *not use*: ``` \appendix \chapter{test} ``` but: ``` \appendix{test} ``` and same for all further appendices, like shown here: ``` \documentclass{report} \makeatletter \newif\if@firstappendix\@firstappendixtrue \def\appendix{ \if@firstappendix \setcounter{chapter}{0}% \setcounter{section}{0}% \renewcommand\@chapapp{Appendix} \typeout{....\AppendicesTotal...} \ifnum\AppendicesTotal=1 \renewcommand\chaptername{\appendixnamenonumber} \else \renewcommand\chaptername{\appendixname} \fi \@firstappendixfalse \fi \chapter}% \def\AppendicesTotal{0} \def\AppendicesNumber#1{\gdef\AppendicesTotal{#1}} \AtEndDocument{ \if@firstappendix \else \immediate\write\@auxout{\string\AppendicesNumber{\thechapter}} \fi} \makeatother \begin{document} \chapter{Main} \appendix{Appendix} \appendix{One more Appendix} \end{document} ```
1
https://tex.stackexchange.com/users/277964
687423
318,904
https://tex.stackexchange.com/questions/8791
247
Usually I don't mind about LaTeX's compilation speed, because a paper of less than 20 pages is compiled rather fast. However, I am working on a large document - A report with more than 80 pages. Compilation times are starting to slow me down. I saw the couple of answers here on this topic, but most of my graphics are external and I don't use Tikz. As a matter of fact, I'm not sure what's slowing the compilation down, other than the amount of text and required layout. 1. What's your best speeding-tex-up trick, other than externalizing graphics and pre-compiling the preamble? 2. How can I know what's slowing TeX down?
https://tex.stackexchange.com/users/1527
Speeding up LaTeX compilation
false
It is slow and will get even slower (which is an empirically well-established issue for all software development and not only for LaTeX). As usual, the ultimately best way may be to improve the architecture and the source code of (La)TeX and its packages and clean up the messy code in the process. That is, rewrite everything from scratch (which seems to be a project attainable only for folks having both finances and decades to spend on typesetting for the rest of their lifetime), starting with the goals and the documentation (i.e, how things should be). Outdated interfaces might be left out in the process, which, ultimately, would lead to a different and incompatible typesetting system. The way out is to become a serious typesetting developer or to learn to live with what you get, in particular, slow compilation. Not being a serious LaTeX developer, I have two versions of any of my large books: a draft version and a clean version. A book has two main files (say, draft.tex and clean.tex, where draft.tex defines my own macro `\draft` and inputs clean.tex). The program `latex` compiles the draft version quickly into DVI (sometimes followed by dvips), and `lualatex`/`xelatex` compiles the clean version slowly into PDF. Moreover, the document source is split into many files so that I can edit them while both `latex` and `lualatex`/`xelatex` run in the background. The only disadvantage is that your document source will likely have to contain several occurrences of `\ifdefined\draft…\else…\fi` (most often in the preamble and seldom in the main text), e.g., when loading different fonts and hyperlink-related packages.
1
https://tex.stackexchange.com/users/292998
687426
318,905
https://tex.stackexchange.com/questions/79493
65
I try to improve the time pdflatex needs to compile my book. Really working example ====================== ### book.tex ``` %&preamble \begin{document} Hi \end{document} ``` and ### preamble.tex ``` \documentclass{article} ``` I run the following commands on bash console: ``` $ pdflatex -ini -jobname="preamble" "&pdflatex preamble.tex\dump" $ latexmk -pdf -pvc -e '$latex=q/latex %O -shell-escape %S/' book.tex ``` A window opens with a (nearly) live preview that will be updated after each change in the `book.tex` file. The PDF Viewer `evince` reloads automatic when the `.pdf` changed. Open Questions ============== **I had no success to compile with the preamble of my book** in the `preamble.tex` file. * How can I find out what I can [precompile](http://magic.aladdin.cs.cmu.edu/2007/11/02/precompiled-preamble-for-latex/)? * Can I precompile `\newcommand`'s, `\usepackage`'s? * Can I precompile a pure chapter without header? Other approaches for speed up ============================= (I do not understand how to combine these ideas for best result) * `pdflatex` knows a `-draftmode` I measured 20% faster compilation with `time pdflatex -draftmode 50pagetest.tex`
https://tex.stackexchange.com/users/16227
Ultrafast PDFLaTeX with precompiling
false
In this answer I will explain how does "precompiled preamble" works, how to use it in PDFLaTeX/XeLaTeX/LuaLaTeX, as well as some pitfalls. Normally just follow the instruction suffices. However if something goes wrong, knowing what is going on under the hood helps you to diagnose the issue. How to use `mylatexformat`? [basic instruction] ----------------------------------------------- Say, you have a normal LaTeX document `a.tex`: ``` \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} 1+2 &= 3 \end{align*} \end{document} ``` Assume `a.tex` does not contain space, or special character such as `%#{}~`. First you execute `pdftex -ini -jobname=b "&pdflatex" mylatexformat.ltx a.tex`. This will generate `b.fmt`. (the file name is specified by `-jobname`, if not specified default to `mylatexformat.fmt`) Then you execute `pdftex "&b" a.tex`. This will generate `a.pdf` as usual. ### Remark on reading `mylatexformat` package documentation * `-ini` and `-initialize` is the same thing. * Its instruction on writing `"""abc.tex"""` on the command-line is for Windows only, on Linux/Bash you need `"\"abc.tex\""`. (basically pass the file name wrapped in *one layer of double quote* to TeX) * If the first line of `a.tex` is `%&b`, then the 2nd command you don't need to explicitly specify `"&b"` on the command-line, anything such as `pdftex a.tex` or `pdflatex a.tex` will suffice. Nevertheless [**this method does not work with LuaTeX**](https://tex.stackexchange.com/questions/622002/lualatex-not-parsing-first-line-format-in-texlive). How to use `mylatexformat`? [advanced instruction] -------------------------------------------------- ### Use XeLaTeX/LuaLaTeX instead of PDFLaTeX Replace `pdftex` with `xetex` or `luahbtex` respectively. Furthermore you need to replace the preloaded format name `&pdflatex` with `&xelatex` or `&lualatex`. You can tell that `xelatex` and `lualatex` executable are just `xetex` and `luahbtex` with `xelatex.fmt` and `lualatex.fmt` formats preloaded by seeing what it prints out at the beginning. Furthermore note that first-line `%&b` (as written in package documentation) will not work in LuaTeX. For example: ``` % a.tex \documentclass{article} \usepackage{amsmath} \csname endofdump\endcsname \usepackage{unicode-math} % incompatible with precompiled preamble, see below \begin{document} \begin{align*} 1+2 &= 3 \end{align*} \end{document} ``` Then in the shell: ``` luahbtex -ini -jobname=b "&lualatex" mylatexformat.ltx a.tex luahbtex "&b" a.tex ``` This only speed up by a small amount, in my experience for an almost-empty document it is 0.6s → 0.4s. ### Do not precompile the whole preamble If some part of the preamble either: * changes frequently (so you don't want to include into the format), or * relies on `\jobname` (for example `\usepackage{currfile}`, or [`pythontex`](https://tex.stackexchange.com/q/279845/250119)), or * is incompatible with TeX format, such as `\usepackage{unicode-math}` or `\usepackage{fontspec}`, (see "two other classes of things that can not be dumped." in [David Carlisle's answer](https://tex.stackexchange.com/a/83486/250119)) + For some reason for LuaLaTeX even `tikz` is incompatible. + I don't see any easy way to easily tell what package is compatible and what is not, you will just have to try including/excluding it. then you must exclude it from the preamble. To do that use `\csname endofdump\endcsname` (the spelling must be exactly like that) -- see `mylatexformat` documentation for more details. Using this instead of `\endofdump` makes sure the file is compilable (the line is simply ignored) if `mylatexformat`/precompiled preamble is not used (i.e. the file is compiled the normal way). What is precompiled preamble/format? ------------------------------------ Basically, it is just using TeX's INITeX feature to speed up processing of a fixed preamble part. TeX supports generating *formats* that can be loaded later. Refer to TeX by Topic chapter 33 "TeX and the Outside World" for some details. (Reading TeXbook might be a bit confusing, just keep in mind that typing anything on the command-line is equivalent to typing it on the `**` first line in the TeX prompt.) In short: > > A format file (usually with extension .fmt) is a compact dump of TEX’s internal structures. Loading a format file takes a considerably shorter time than would be needed for loading the font information and the macros that constitute the format. > > > So you can "define some commands, dump the internal state to a file", then when you "load" that file it's "as if" the commands have been defined similar to at the time how the format was dumped. For an example: ``` % preamble.tex \documentclass{article} \usepackage{amsmath} \dump % a.tex \begin{document} \begin{align*} 1+2 &= 3 \end{align*} \end{document} ``` In the shell execute `pdftex -ini "&pdflatex" preamble.tex`, this will * start with the existing `pdflatex.fmt` format (might be at `/var/lib/texmf/web2c/pdftex/pdflatex.fmt` depends on operating system etc.) * execute from file `preamble.tex` * when `\dump` is executed generates file `preamble.fmt`. The `-ini` is needed to enable the `\dump` command. After that if `pdftex "&preamble" a.tex` is executed (this means "execute `a.tex` with preloaded format `preamble.fmt`") it will generate `a.pdf` with the correct content. (For an analogue, `pdftex "&pdflatex" a.tex` is equivalent to `pdflatex a.tex`) What does `mylatexformat` package do? ------------------------------------- As you can see above, it's rather inconvenient to have to split the file into separate `preamble.tex`. So `mylatexformat` allow you to put them in the same file and it will automatically detect the split between the preamble and the main file. How does `mylatexformat` work (regarding the command-line)? ----------------------------------------------------------- There's 2 steps -- generating the format, and using the format. In the first step, apart from `-jobname`, the command-line is: `pdftex -ini "&pdflatex" mylatexformat.ltx a.tex` Because of historical reasons, it's made such that (almost) anything put on the command-line is equivalent to typing it to the first line of `**` prompt. So you can also run `pdftex -ini` then on `**` prompt type in `&pdflatex mylatexformat.ltx a.tex`, both are equivalent. Most of this is familiar. Recall that `pdftex -ini "&pdflatex" mylatexformat.ltx` will start with preloaded format `pdflatex.fmt` and execute content of file `mylatexformat.ltx`. However, the additional `a.tex` will be **put on the input stream**. At the very end of `mylatexformat.ltx`, after redefining `\begin` etc. there's ``` %% Trick lookahead to allow mylatex.ltx and the document filename to be %% given on the same command line. (initex &latex mylatex.ltx {abc.tex}) \expandafter\input\endinput% \endinput ``` so effectively (some TeX programming knowledge is needed) `\input a.tex` is executed. See also [wipet's answer](https://tex.stackexchange.com/a/672107/250119). That's why it's useful to pass another pair of quotes in the command-line. For other details of the implementation (how it separates the preamble from the document) read the documentation.
2
https://tex.stackexchange.com/users/250119
687427
318,906
https://tex.stackexchange.com/questions/687421
0
There are these ``` \odot, \ominus, \oplus, \oslash, \otimes ``` as well as the large versions ``` \bigodot, \bigoplus \& \bigotimes. ``` How may one get ``` \bigominus \& \bigoslash? ``` Edit: Following a suggestion and use the mathabx or Mnsymbol package, which both have the symbols, is not a viable option, it seems. For mathabx conflicts with amssymb, and the latter is needed. Besides, my understanding is that MnSymbol has been much criticized, and I recall that I had problems myself. Perhaps importing the two symbols can be done, or perhaps they can be built from scratch?
https://tex.stackexchange.com/users/24406
\(\bigominus\) and \(\bigoslash\)?
true
Using the `scalerel` package: ``` \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{scalerel} \let\bigopsize\bigoplus \def\bigoplus{{\scalerel*{\boldsymbol\oplus}{\bigopsize}}} \def\bigominus{{\scalerel*{\boldsymbol\ominus}{\bigopsize}}} \def\bigodot{{\scalerel*{\boldsymbol\odot}{\bigopsize}}} \def\bigotimes{{\scalerel*{\boldsymbol\otimes}{\bigopsize}}} \def\bigoslash{{\scalerel*{\boldsymbol\oslash}{\bigopsize}}} \begin{document} $\bigoplus \bigominus \bigodot \bigotimes \bigoslash$ $a^\bigoplus$ \end{document} ```
3
https://tex.stackexchange.com/users/94293
687428
318,907
https://tex.stackexchange.com/questions/687397
1
ps. I can not paste the whole MWE here as I get error `Body is limited to 30000 characters; you entered 501493` This is using the smallest size of the table I can make it while producing the error. --- I have table generated by a program which is a little large. But no problem compiling it with lualatex. When using tex4ht using same commands I always use, now it gives this error which I never saw before ``` make4ht -ulm default -a debug -c ./nma_mathjax.cfg main.tex "mathjax,htm,fn-in" .... (/usr/local/texlive/2022/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./main.aux) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/ts1cmr.fd))19 nil [1] [2] (/usr/local/texlive/2022/texmf-dist/tex/latex/lm/t1lmtt.fd)Unsupported font pzdr Overfull \vbox (32240.63214pt too high) detected at line 1125 Overfull \vbox (32240.63214pt too high) has occurred while \output is active ! LaTeX mark Error: Infinite shrinkage found in 'page'. For immediate help type H <return>. ... l.1125 \end{table} ? H This is a coding error. The mark region 'page' contains some infinite negative glue allowing it to shrink to an arbitrary size. This makes it impossible to split the region apart to get at its marks. They are lost. ? ``` Since the .tex file is large and my `nma_mathjax.cfg` is large and needed, I put these two files in the folder at the link at the bottom. I also put the .pdf compiled by lualatex with no problem. The files are self contained and have minimal packages needed to reproduce the problem. Simply download the .tex and .cfg files to one folder and issue the above command to see the problem. I am using TL 2022 on Linux ``` >which make4ht /usr/local/texlive/2022/bin/x86_64-linux/make4ht ``` This is the .tex file preview ``` \documentclass[12pt]{book} \usepackage{amsmath} \usepackage{breqn} \usepackage{graphicx} \usepackage{caption} %added 2/18/16 for making caption in figure same size as image \usepackage{multirow} %added 2/21/16. To allow table with columns that span rows \usepackage{longtable} %2/24/16 does not work in two columns \usepackage{xcolor} \usepackage{hyperref} %added OCT 28, 2018 \ifdefined\HCode \newcommand{\cprotect}{} \else \usepackage{cprotect} %only needed to latex \fi \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}} % %this adds support to fixed width tables. \newenvironment{fixedtabular}[2]{\gdef\tablewidth{#2}\begin{tabular}{#1}}{\end{tabular}} % \newcommand{\eslowast}{} \begin{document} Number of problems in this table is 1066 Column notations: A is ODE degree. B is Program Number of solutions generated. C is CAS Number of solutions generated. \ifdefined\HCode \begin{table} \caption{isobaric} \begin{fixedtabular}{|p{1in}|p{5in}|p{0.6in}|p{0.6in}|p{.6in}|p{2in}|p{2in}|p{.75in}|p{.75in}|p{0.75in}|}{1100px}\hline ...... very long table here \ifdefined\HCode\HCode{<a href="chapters/differential_equations_by_shepley_L_ross_third_edition/indexsubsection66.htm">10619</a>}\else\hyperref[10619]{10619}\fi&\begin{minipage}{\linewidth}\begin{dmath*}{}2 x^{2}+2 x y+y^{2}+\left(x^{2}+2 x y\right) y^{\prime} = 0 \end{dmath*}\end{minipage}&1&\textcolor{red}{1}&2&{isobaric}&[[\_homogeneous, class A], \_exact, \_rational, [\_Abel, 2nd type, class B]]&\textcolor{blue}{\Large \cmark}&\textcolor{blue}{\Large \cmark}&91.892\\ \hline \ifdefined\HCode \end{fixedtabular} \end{table} \else \end{longtable} \fi \normalsize \end{document} ``` Any idea what is the cause of this problem and how to workaround it will be appreciated as it stopping my build now. I did not do any changes to tex4ht or to my setup for the last few months and this is first time I see this error. May be because the table size got larger? But this should not cause a problem. The files are in [this folder](https://12000.org/tmp/tex4ht_june_2_2023/). (safe link, my own page) Link to [tex4ht tracking bug report](https://puszcza.gnu.org.ua/bugs/index.php?602)
https://tex.stackexchange.com/users/14594
LaTeX mark Error: Infinite shrinkage found in 'page'. when using tex4ht only
true
The problem is that you create too large table (the linked full TeX sample produced about 150 pages), but you use `tabular` with TeX4ht. It seems that it caused this issue. You can change the code to use `longtable` in both cases: ``` \documentclass[12pt]{book} \usepackage{amsmath} \usepackage{breqn} \usepackage{graphicx} \usepackage{caption} %added 2/18/16 for making caption in figure same size as image \usepackage{multirow} %added 2/21/16. To allow table with columns that span rows \usepackage{longtable} %2/24/16 does not work in two columns \usepackage{xcolor} \usepackage{hyperref} %added OCT 28, 2018 \ifdefined\HCode \newcommand{\cprotect}{} \else \usepackage{cprotect} %only needed to latex \fi \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}} % %this adds support to fixed width tables. \newenvironment{fixedtabular}[2]{\gdef\tablewidth{#2}\begin{longtable}{#1}}{\end{longtable}} % \newcommand{\eslowast}{} \begin{document} Number of problems in this table is 1066 Column notations: A is ODE degree. B is Program Number of solutions generated. C is CAS Number of solutions generated. \begin{table} \caption{isobaric} \begin{fixedtabular}{|p{1in}|p{5in}|p{0.6in}|p{0.6in}|p{.6in}|p{2in}|p{2in}|p{.75in}|p{.75in}|p{0.75in}|}{1100px}\hline \ifdefined\HCode\HCode{<a href="chapters/differential_equations_by_shepley_L_ross_third_edition/indexsubsection66.htm">10619</a>}\else\hyperref[10619]{10619}\fi&\begin{minipage}{\linewidth}\begin{dmath*}{}2 x^{2}+2 x y+y^{2}+\left(x^{2}+2 x y\right) y^{\prime} = 0 \end{dmath*}\end{minipage}&1&\textcolor{red}{1}&2&{isobaric}&[[\_homogeneous, class A], \_exact, \_rational, [\_Abel, 2nd type, class B]]&\textcolor{blue}{\Large \cmark}&\textcolor{blue}{\Large \cmark}&91.892\\ \hline \end{fixedtabular} \end{table} \normalsize \end{document} ``` The change is this: ``` \newenvironment{fixedtabular}[2]{\gdef\tablewidth{#2}\begin{longtable}{#1}}{\end{longtable}} ``` You can then also remove the unnecessary conditionals around your table. This is the result:
1
https://tex.stackexchange.com/users/2891
687430
318,909
https://tex.stackexchange.com/questions/687406
1
I'm trying to convert a chess pdf to html file before converting to mobi and keeping it with the diagrams. I'm doing this through tex4ht on TeXStudio. I have the code: ``` \documentclass{article} \usepackage{xskak} \begin{document} \newchessgame \chessboard[setfen=r5k1/1b1p1ppp/p7/1p1Q4/2p1r3/PP4Pq/BBP2b1P/R4R1K w - - 0 20] \end{document} ``` and getting the error: ``` ! Undefined control sequence. \@tempc ...>\def \@tempb {\@tempc }\sv:begingroup \toks@ {#2}\edef \@tempa {... l.5 \chessboard [setfen=r5k1/1b1p1ppp/p7/1p1Q4/2p1r3/PP4Pq/BBP2b1P/R4R1K w - ... ``` Is there a way to avoid this type of error ?
https://tex.stackexchange.com/users/298201
How can I convert a chess PDF to a HTML file to include diagrams using tex4ht?
false
You probably have an older TeX distribution, because it seems that the TeX4ht configuration file for Xskak is missing on your system. You can try to put it to the directory with your file, named as `xskak.4ht`: ``` % xskak.4ht (2022-11-04-13:31), generated from tex4ht-4ht.tex % Copyright 2022 TeX Users Group % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1.3c of this license or (at your option) any % later version. The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3c or later is part of all distributions % of LaTeX version 2005/12/01 or later. % % This work has the LPPL maintenance status "maintained". % % The Current Maintainer of this work % is the TeX4ht Project <http://tug.org/tex4ht>. % % If you modify this program, changing the % version identification would be appreciated. \immediate\write-1{version 2022-11-04-13:31} \ExplSyntaxOn \def\:xskakdepth{vertical-align:-\fp_eval:n{ \dim_to_fp:n{\dp0}/(\dim_to_fp:n{\ht0}+\dim_to_fp:n{\dp0}) * 100 }\@percentchar;} \ExplSyntaxOff \NewConfigure{mainline}{2} \def\:tempa#1{% \setbox0=\hbox{\o:mainline:{#1}}% \edef\:xskakalt{\detokenize{#1}}% %\a:mainline\Picture*[\detokenize{#1}]{ style="\:xskakdepth"}\box0\EndPicture\b:mainline% \a:mainline\box0\b:mainline% } \HLet\mainline\:tempa \NewConfigure{xskakget}{2} \def\:tempa#1{% \edef\:xskakalt{\detokenize{#1}}% \setbox0=\hbox{\o:xskakget:{#1}}% \a:xskakget\box0\b:xskakget% } \HLet\xskakget\:tempa \NewConfigure{chessboard}{2} \def\:tempa{% % reset to the original version of \chessboard \let\:currchesboard\chessboard \let\chessboard\o:chessboard:% \o:newchessgame:% % set the TeX4ht version of \chessboard back \let\chessboard\:currchesboard } \HLet\newchessgame\:tempa \Hinput{xskak} \endinput ``` It is possible that you will still get errors caused by other files. It is best to try to update your TeX distribution to TeX Live 2023. With TeX Live 2023, I get another error, which can be fixed using this configuration file, `config.cfg`: ``` \Preamble{xhtml} \catcode`\:=11 \makeatletter \def\chessboard:alt{\ifdefined\o:xskakget:\ifcsname Xskak.\xskak@val@gameid.\xskak@val@movenr.\xskak@val@player.nextfen\endcsname\o:xskakget:{nextfen}\fi\fi} \makeatother \catcode`\:=12 \begin{document} \EndPreamble ``` You can compile your file from the command line, using: ``` $ make4ht -c config.cfg filename.tex ``` With this change, the file should compile without errors:
1
https://tex.stackexchange.com/users/2891
687434
318,913
https://tex.stackexchange.com/questions/126716
14
Is it possible to indent whole paragraphs of source code in TeXMaker (or alternatively, in any LaTeX editor), so that intentation applies to all rows in paragraphs when the text is wrapped over several lines is the editor? By default, TeXMaker intents the source code like the first code snippet below, whereas I would like indentation as in the second snippet, i.e. applied to the whole paragraph. ``` \begin{abstract} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. \end{abstract} ``` vs. ``` \begin{abstract} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. \end{abstract} ```
https://tex.stackexchange.com/users/18773
Block indentation in TeXMaker
false
In Texmaker highlight multiple line and then press: Ctrl and SHIFT and '>' to indent to right. Ctrl and SHIFT and '<' to indent to left. You can also perform the same task from menu: 'Edit' menu and select 'Indent', Or Edit menu and select 'Unindent'
0
https://tex.stackexchange.com/users/106360
687448
318,918
https://tex.stackexchange.com/questions/687443
0
When creatin table with `tabularray`, for some reason it won't be made from continuous lines, but there will be a 2-3 pixel gaps between each column. Can this issue be fixed? It's not really noticeable, but when using classic `table` there are no gaps at all. ``` \documentclass{article} \usepackage{graphicx} \usepackage{xcolor,colortbl} \usepackage{multirow} \usepackage{hhline} \definecolor{rowcol}{rgb}{0.7, 0.7, 0.7} \usepackage{tabularray} \title{TEST2} \author{Anon} \date{May 2023} \begin{document} \maketitle \section{Introduction} \begin{table} \centering \begin{tblr}{ colspec={Q[c,m] Q[c,m] Q[c,m] Q[c,m] Q[c,m]}, cells={font=\large}, cell{1}{1} = {r=2}{c}, cell{1}{1} = {c=1}{c}, cell{1}{2} = {c=4}{c}, hline{1-Z}={1}{-}{leftpos=0, rightpos=0}, hline{3}={2}{-}{leftpos=0, rightpos=0}, vlines, vline{2}={2}{-}{}, row{odd[3]}={bg=rowcol} } & Description \\ & 1 & 2 & 3 & 4 \\ A & 10 & 20 & 30 & 40 \\ B & 15 & 25 & 35 & 25 \\ C & 12 & 22 & 32 & 80 \\ \end{tblr} \caption{Table caption} \label{tabularraytablelabel} \end{table} \end{document} ```
https://tex.stackexchange.com/users/289855
Create tabularray table with continuous lines
true
Although I am not sure if this is what you are looking for, I post this solution, hoping that will help you: ``` \documentclass{article} \usepackage{graphicx} \usepackage{xcolor,colortbl} \usepackage{multirow} \usepackage{hhline} \definecolor{rowcol}{rgb}{0.7, 0.7, 0.7} \usepackage{tabularray} \title{TEST2} \author{Anon} \date{May 2023} \begin{document} \maketitle \section{Introduction} \begin{table} \centering \begin{tblr}{ colspec={Q[c,m]Q[c,m]Q[c,m]Q[c,m]Q[c,m]}, cells={font=\large}, cell{1}{1} = {r=2}{c}, cell{1}{1} = {c=1}{c}, cell{1}{2} = {c=4}{c}, hlines, %<-- added hline{1-Z}={1}{1}{leftpos=1, rightpos=0.15},%<-- added hline{1-Z}={1}{2}{leftpos=0.15, rightpos=1}, %<-- changed hline{3}={2}{-}{solid}, %<-- added hline{3}={2}{1}{leftpos=1, rightpos=0.15},%<-- changed hline{3}={2}{2}{leftpos=0.15, rightpos=1}, %<-- added vlines, vline{2}={2}{-}{}, row{odd[3]}={bg=rowcol} } & Description \\ & 1 & 2 & 3 & 4 \\ A & 10 & 20 & 30 & 40 \\ B & 15 & 25 & 35 & 25 \\ C & 12 & 22 & 32 & 80 \\ \end{tblr} \caption{Table caption} \label{tabularraytablelabel} \end{table} \end{document} ```
1
https://tex.stackexchange.com/users/269938
687452
318,921
https://tex.stackexchange.com/questions/687456
0
Is it possible to create a global style for all tables? For example: ``` \documentclass{article} \usepackage{graphicx} \usepackage{xcolor,colortbl} \usepackage{multirow} \usepackage{hhline} \definecolor{rowcol}{rgb}{0.7, 0.7, 0.7} \usepackage{tabularray} \title{Example} \author{Anon} \date{May 2023} \begin{document} \maketitle \section{Introduction} \begin{table}[h] \centering \begin{tblr}{ colspec={X[c,m]Q[c,m]Q[c,m]Q[c,m]Q[c,m]}, cells={font=\large}, cell{1}{1} = {r=2}{c}, cell{1}{1} = {c=1}{c}, cell{1}{2} = {c=4}{c}, hlines, hline{1-Z}={1}{1}{leftpos=1, rightpos=0.15}, hline{1-Z}={1}{2}{leftpos=0.15, rightpos=1}, hline{3}={2}{-}{solid}, hline{3}={2}{1}{leftpos=1, rightpos=0.15}, hline{3}={2}{2}{leftpos=0.15, rightpos=1}, vlines, vline{2}={2}{-}{}, row{odd[3]}={bg=rowcol} } & Description \\ & 1 & 2 & 3 & 4 \\ A & 10 & 20 & 30 & 40 \\ B & 15 & 25 & 35 & 25 \\ C & 12 & 22 & 32 & 80 \\ \end{tblr} \caption{Table 1} \label{lbl1} \end{table} \begin{table}[h] \centering \begin{tblr}{ colspec={X[c,m]Q[c,m]Q[c,m]Q[c,m]Q[c,m]}, cells={font=\large}, cell{1}{1} = {r=2}{c}, cell{1}{1} = {c=1}{c}, cell{1}{2} = {c=4}{c}, hlines, hline{1-Z}={1}{1}{leftpos=1, rightpos=0.15}, hline{1-Z}={1}{2}{leftpos=0.15, rightpos=1}, hline{3}={2}{-}{solid}, hline{3}={2}{1}{leftpos=1, rightpos=0.15}, hline{3}={2}{2}{leftpos=0.15, rightpos=1}, vlines, vline{2}={2}{-}{}, row{odd[3]}={bg=rowcol} } & Description \\ & 1 & 2 & 3 & 4 \\ A & 10 & 20 & 30 & 40 \\ B & 15 & 25 & 35 & 25 \\ C & 12 & 22 & 32 & 80 \\ \end{tblr} \caption{Table 2} \label{lbl2} \end{table} \end{document} ``` Here there are only two tables, but when there are many more tables having to copy these exact settings every time doesn't look pretty, and it requires many changes when you want to adjust something. Having one global style would be much better. But I couldn't find definitive answer how to do it.
https://tex.stackexchange.com/users/289855
Global table styles
true
You can create a custom `tblr` environment as described in section 3.4 "New Tabularray Environments" of the [`tabularray` manual](http://mirrors.ctan.org/macros/latex/contrib/tabularray/tabularray.pdf) like so (the red lines in the second table are just to show that it is always possible to override the specifications): ``` \documentclass{article} \usepackage{xcolor, tabularray} \definecolor{rowcol}{rgb}{0.7, 0.7, 0.7} \begin{document} \NewTblrEnviron{mytblr} \SetTblrInner[mytblr]{ colspec={X[c,m]Q[c,m]Q[c,m]Q[c,m]Q[c,m]}, cells={font=\large}, cell{1}{1}={r=2}{c}, cell{1}{1}={c=1}{c}, cell{1}{2}={c=4}{c}, hlines, hline{1-Z}={1}{1}{leftpos=1, rightpos=0.15}, hline{1-Z}={1}{2}{leftpos=0.15, rightpos=1}, hline{3}={2}{-}{solid}, hline{3}={2}{1}{leftpos=1, rightpos=0.15}, hline{3}={2}{2}{leftpos=0.15, rightpos=1}, vlines, vline{2}={2}{-}{}, row{odd[3]}={bg=rowcol} } \section{Introduction} \begin{table}[h] \centering \begin{mytblr}{} & Description \\ & 1 & 2 & 3 & 4 \\ A & 10 & 20 & 30 & 40 \\ B & 15 & 25 & 35 & 25 \\ C & 12 & 22 & 32 & 80 \\ \end{mytblr} \caption{Table 1} \label{lbl1} \end{table} \begin{table}[h] \centering \begin{mytblr}{ hlines={red} } & Description \\ & 1 & 2 & 3 & 4 \\ A & 10 & 20 & 30 & 40 \\ B & 15 & 25 & 35 & 25 \\ C & 12 & 22 & 32 & 80 \\ \end{mytblr} \caption{Table 2} \label{lbl2} \end{table} \end{document} ```
2
https://tex.stackexchange.com/users/47927
687458
318,922
https://tex.stackexchange.com/questions/687453
-2
Say I have an equation and want to show some algebraic steps before getting to the solution. Is there a way to replace the newly processed equation at each frame, instead of uncovering many subsequent steps? ``` \begin{frame} \begin{flalign*} \uncover<1->{ -3\pi\eta r\dv{\langle x^2\rangle}{t}+\langle\xi(t)x\rangle&=\frac{1}{2}m\dv[2]{\langle x^2\rangle}{t}-\langle mv^2\rangle&&\\} \uncover<2-> {-3\pi\eta r\dv{\langle x^2\rangle}{t}+\langle\xi(t)x\rangle&=\frac{1}{2}m\dv[2]{\langle x^2\rangle}{t}-\cancelto{k_BT}{\langle mv^2\rangle&&\\} \end{flalign*} \end{frame} ```
https://tex.stackexchange.com/users/232851
How to progressively manipulate equations using beamer
true
You could make the `\cancelto` macro overlay aware, this way you could simply use it like this: ``` \documentclass{beamer} \usepackage{cancel} \usepackage{physics} \renewcommand<>{\cancelto}[2]{\rule{0pt}{1.5\baselineskip}\alt#3{\beameroriginal{\cancelto}{#1}{#2}}{#2}} \begin{document} \begin{frame} \begin{flalign*} -3\pi\eta r\dv{\langle x^2\rangle}{t}+\langle\xi(t)x\rangle&=\frac{1}{2}m\dv[2]{\langle x^2\rangle}{t}-\cancelto<2>{k_BT}{\langle mv^2\rangle}&& \end{flalign*} \end{frame} \end{document} ```
1
https://tex.stackexchange.com/users/36296
687460
318,923
https://tex.stackexchange.com/questions/278334
2
How can I indent the pseudocode block after this line `function Karatsuba(p,q)`? ``` \documentclass{article} \usepackage{german,t1enc} \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt} %pseudocode. \usepackage[linesnumbered,ruled,vlined]{algorithm2e} %Color \usepackage[dvipsnames]{xcolor} \renewcommand{\baselinestretch}{1.5} %blacksquare \usepackage{amssymb } \begin{document} \begin{algorithm}[H] \SetAlgoLined function Karatsuba(p,q) \\ $n \leftarrow degree(p) +1 $ \\ \eIf{$n = 1$}{ return $p.q$ }{ $p(x) = p_1 * x^{\frac{n}{2}} + p_0$ \\ $ q(x) = q_1 * x^{\frac{n}{2}} + q_0$ \\ $p.q = p_1q_1.(x)^n + ( (p_0+p_1)(q_0+q_1) - p_0q_0 - p_1q_1). (x)^\frac{^n}{2} + p_0q_0$ } \caption{} \label{alg: initializer} \end{algorithm} \end{document} ```
https://tex.stackexchange.com/users/84927
Indent the block with the algorithm2e usepackage
false
One way is to use the [`algorithm2e`](https://mirror.ox.ac.uk/sites/ctan.org/macros/latex/contrib/algorithm2e/doc/algorithm2e.pdf) command `\SetKwBlock{}{}{}` (section 11.2 of the CTAN manual) like this: ``` \documentclass{article} \usepackage[linesnumbered,ruled,vlined]{algorithm2e} \renewcommand{\baselinestretch}{1.5} \begin{document} \begin{algorithm}[H] \SetKwBlock{Func}{function Karatsuba(p,q)}{} \SetAlgoLined \Func{ $n \leftarrow degree(p) +1 $ \\ \eIf{$n = 1$}{ return $p.q$ }{ $p(x) = p_1 * x^{\frac{n}{2}} + p_0$ \\ $ q(x) = q_1 * x^{\frac{n}{2}} + q_0$ \\ $p.q = p_1q_1.(x)^n + ( (p_0+p_1)(q_0+q_1) - p_0q_0 - p_1q_1). (x)^\frac{^n}{2} + p_0q_0$ } } \caption{} \label{alg: initializer} \end{algorithm} \end{document} ``` which produces this:
1
https://tex.stackexchange.com/users/273733
687464
318,926
https://tex.stackexchange.com/questions/687384
3
I am looking for defining a semibold Erewhon font for text mode. If there is none I'd be willing to fake it in the same manner as <https://tex.stackexchange.com/a/290036/194729> but I don't how I can adapt that snippet.
https://tex.stackexchange.com/users/194729
Looking for semibold version of erewhon
false
No real chance to get it with `pdflatex`, but you can use `FakeBold` with XeLaTeX or LuaLaTeX. You also want to define an interface for semibold. ``` \documentclass{article} \usepackage{fontspec} \setmainfont{Erewhon}[ Extension=.otf, UprightFont=*-Regular, ItalicFont=*-Italic, BoldFont=*-Bold, BoldItalicFont=*-BoldItalic, FontFace={sb}{n}{Font=*-Regular,FakeBold=3}, FontFace={sb}{it}{Font=*-Italic,FakeBold=3}, ] \DeclareRobustCommand{\sbseries}{\fontseries{sb}\selectfont} \DeclareTextFontCommand{\textsb}{\sbseries} \begin{document} Medium, \textsb{Semibold}, \textbf{Bold} {\itshape Medium, \textsb{Semibold}, \textbf{Bold}} \end{document} ``` If you want to replace boldface with the (faked) semibold: ``` \documentclass{article} \usepackage{fontspec} \setmainfont{Erewhon}[ Extension=.otf, UprightFont=*-Regular, ItalicFont=*-Italic, BoldFont=*-Regular, BoldItalicFont=*-Italic, BoldFeatures={FakeBold=3}, BoldItalicFeatures={FakeBold=3}, ] \begin{document} Medium \textbf{Bold} {\itshape Medium, \textbf{Bold}} \end{document} ```
2
https://tex.stackexchange.com/users/4427
687468
318,929
https://tex.stackexchange.com/questions/687382
6
In microbiology, the first time a species name is used, it should be written the genus and species in full (Escherichia coli). For all other occurences, the genus should be abbreviated (E. coli). I managed to do this by using the glossaries package. Nevertheless, when another species is cited, for example Escherichia fergusonii, it should be directly abbreviated E. fergusonii if E. coli has already been cited to avoid repetitions. What I used so far to automatically abbreviate the genus names: ``` \documentclass[french]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[a4paper]{geometry} \usepackage{babel} \usepackage[xindy]{glossaries} \makeglossaries \newglossaryentry{coli}{% name = {\emph{Escherichia coli}}, description = {}, text = {\emph{E.~coli}}, first = {\glsname{coli}} } \newglossaryentry{fergusonni}{% name = {\emph{Escherichia fergusonii}}, description = {}, text = {\emph{E.~fergusonii}}, first = {\glsname{fergusonni}} } \begin{document} A list of bacteria: \gls{coli}, \gls{fergusonni} \end{document} ``` * Current output: A list of bacteria: Escherichia coli, Escherichia fergusonii * Desired output: A list of bacteria: Escherichia coli, E. fergusonii I would like Latex to detect automatically if the genus was already cited, and not forcing the abbreviated form manually in the glossary command.
https://tex.stackexchange.com/users/298185
Automatic abbreviation in bacterial taxonomy - multiple species of one genus
true
If you don't need to print a glossary, you can do without that big package. ``` \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\newspecies}{mmm} { \sabine_new_species:nnn { #1 } { #2 } { #3 } } \NewDocumentCommand{\species}{sm} { \textit { \IfBooleanTF { #1 } { \sabine_print_species_full:n { #2 } } { \sabine_print_species:n { #2 } } } } \cs_generate_variant:Nn \tl_head:n { e } \prop_new:N \g_sabine_genus_prop \prop_new:N \g_sabine_species_prop \seq_new:N \g_sabine_genus_used_seq \cs_new_protected:Nn \sabine_new_species:nnn { \prop_gput:Nnn \g_sabine_genus_prop { #1 } { #2 } \prop_gput:Nnn \g_sabine_species_prop { #1 } { #3 } } \cs_new_protected:Nn \sabine_print_species:n { \seq_if_in:NxTF \g_sabine_genus_used_seq { \prop_item:Nn \g_sabine_genus_prop { #1 } } {% the genus has already been used \tl_head:e { \prop_item:Nn \g_sabine_genus_prop { #1 } } . \nobreakspace } {% print the full genus \prop_item:Nn \g_sabine_genus_prop { #1 } % mark it as used \seq_gput_right:Nx \g_sabine_genus_used_seq { \prop_item:Nn \g_sabine_genus_prop { #1 } } \space } % print the species name \prop_item:Nn \g_sabine_species_prop { #1 } } \cs_new_protected:Nn \sabine_print_species_full:n {% bypass the check \prop_item:Nn \g_sabine_genus_prop { #1 } % mark it as used \seq_if_in:NxF \g_sabine_genus_used_seq { \prop_item:Nn \g_sabine_genus_prop { #1 } } { \seq_gput_right:Nx \g_sabine_genus_used_seq { \prop_item:Nn \g_sabine_genus_prop { #1 } } } \space % print the species name \prop_item:Nn \g_sabine_species_prop { #1 } } \ExplSyntaxOff \newspecies{coli}{Escherichia}{Coli} \newspecies{fergus}{Escherichia}{Fergusonii} \begin{document} A list of bacteria: \species{coli}, \species{fergus}. Here a full name: \species*{fergus}. \end{document} ``` I set up property lists for genera and species. When `\species` is found, the short name (`coli` and `fergus` in the example) is examined. If the genus has already been used, just the first letter is used (followed by a period and `\nobreakspace`), otherwise the full genus name is used. Then the species name, everything in italics. I also provide `\species*` that prints the full genus name (and marks it as used anyway).
4
https://tex.stackexchange.com/users/4427
687472
318,931
https://tex.stackexchange.com/questions/687461
2
I am using LuaLaTeX and unicode-math in my documents. I input most of the simple symbols (sum, products, greek letters, quantification, etc.) directly in unicode (using agda-mode for emacs). When I input the unicode character "SCRIPT CAPITAL L" (U+2112), I get in the pdf the equivalent of a `\mathscr L`. How can I tell the package unicode-math that I would like to have a `\mathcal L` instead whenever it encounters a unicode character U+2112? Ideally, I would like to just pass an option to the package so that all "SCRIPT ..." uses `\mathcal ...` instead of `\mathscr ...` **EDIT.** To clarify, here is a MWE: ``` \documentclass{minimal} \usepackage{fontspec}% \usepackage{unicode-math} \setmathfont{Libertinus Math Regular} \setmathfont{Latin Modern Math}[range={\mathscr}] \setmathfont{TeX Gyre Pagella Math}[range={\mathcal}] \begin{document} Unicode input: $ℒ$ Mathcal input: $\mathcal L$ Mathscr input: $\mathscr L$ \end{document} ``` The pdf output 3 different Ls, which leads me to believe that the unicode input actually uses `\mathscr` of `Libertinus Math Regular` in that example. How to I tell the package that I want it to use `\mathcal` from `TeX Gyre Pagella Math` when it encounters a U+2212 in the source?
https://tex.stackexchange.com/users/29611
Tell unicode-math how to translate unicode symbols (script vs calligraphic)
true
`range` is a bit temperamental, and script and calligraphic being the same Unicode range makes it more interesting, but ``` \documentclass{minimal} \usepackage{fontspec}% \usepackage{unicode-math} \setmathfont{Libertinus Math Regular} \setmathfont{TeX Gyre Pagella Math}[range=cal] \setmathfont{Latin Modern Math}[range=scr] \AtBeginDocument{ \Umathcode"2112= "0 4 "2112 } \begin{document} Unicode input: $ℒ$ Mathcal input: $\mathcal L$ Mathscr input: $\mathscr L$ $ℒ$ $\mathcal L $ $\mathscr L$ \end{document} ```
1
https://tex.stackexchange.com/users/1090
687474
318,933
https://tex.stackexchange.com/questions/205057
2
I tried to replace the temporary labels TMP1, TMP2 and TMP3 in an .eps file made with ChemDraw v18 on Mac OSX Mojave using the `chemnum` package, so to get an automatic numbering of the compounds, but this did not work for me. I tried different fonts for the label in the .eps file, or other options for `auto-pst-pdf` with no result. The problem originally occurred on TexLive 2014 for Mac remains with Mac OSX 10.14 and TexLive 2019, compilation with `pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex`(I use TexStudio). For the following MWE with the following [eps file](https://www.dropbox.com/s/k8ljxws03byz94h/test_cmpd_numbering.eps?dl=0). ``` \documentclass[a4paper,12pt]{article} \usepackage{graphicx} \usepackage[crop=off,runs=2]{auto-pst-pdf} \usepackage{chemnum} \usepackage{chemstyle} \begin{document} \begin{scheme} \replacecmpd[tag=TMP1]{cmpd:nucleophile1} \replacecmpd[tag=TMP2]{cmpd:nucleophile2} \replacecmpd[tag=TMP3]{cmpd:nucleophile3} \includegraphics[scale=0.8]{test_cmpd_numbering.eps} \caption[test]{A test to make the numbering work} \end{scheme} \end{document} ``` The picture is inserted properly and the file `test_cmpd_numbering-pics.pdf` generated (that's a progress from previously), but the TMP1, TMP2 etc. labels are not replaced. Here is the [log file](https://www.dropbox.com/s/6pyko7br2g6gp1a/test-wto-epstopdf.log?dl=0). It has got the error 'non-PDF special ignored!' which is often related to PdfLaTex difficulties on MacOSX. Does anyone know why this code could make problems on Mac?
https://tex.stackexchange.com/users/63878
No replacement of temporary labels by chemnum in a ChemDraw eps on Mac
false
The Problem is (independently of the Chemdraw Version: I used v16.0.0 and v22.0.0) because Chemdraw on MacOS has a bug when creating an .eps File so the string doesn't appear on a text Editor (a.k.a.: Ghostscript). The solution I found was: 1. Save the cropped File as a PDF (uncheck the Box: 'Break into pages'[v.22.0.0]. I didn't Found that Option on v.16.0 ). 2. Then convert the File.pdf to File.eps with a converter. 3. (optional) Open the .eps File with a text Editor and you will find the Script with the temporary marker (example.: TMP1). I use personally Texmaker as a compiler so if you go to preferences, under the section 'Commands' paste this: pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex Also compile the File with: PDF Latex to View PDF and then compile it again with Quick Build to View PDF . Here is my LaTeX code: ``` \documentclass[11pt]{scrartcl} \usepackage[T1]{fontenc} \usepackage{epstopdf} \usepackage[scaled=0.92]{helvet} \renewcommand\familydefault{\sfdefault} \usepackage{titleps} \usepackage{graphicx,auto-pst-pdf} \renewcommand*\sectionformat{\thesection\autodot\hspace{1cm}} \usepackage{amsmath} \usepackage[ngerman]{babel} \usepackage[a4paper,total={7in,10in}]{geometry} \usepackage{siunitx} \usepackage{hyphenat} \usepackage{amssymb} \usepackage{physics} \usepackage{braket} \usepackage{graphicx} \usepackage[hidelinks]{hyperref} \usepackage{tcolorbox} \usepackage{titleps} \usepackage{multicol} \usepackage{multirow} \usepackage{ghsystem} \usepackage{pifont} \usepackage{tabularx} \usepackage{array} \usepackage{chemstyle} \usepackage{chemscheme} \usepackage{chemschemex} \usepackage{chemnum} \setcounter{secnumdepth}{4} \setcounter{tocdepth}{4} \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} \newtcolorbox{mybox}[3][] { colframe = #2!50, colback = #2!0, coltitle = #2!20!black, title = {#3}, #1, } \newpagestyle{ruled} {\sethead{}{}{ \sectiontitle}\headrule \setfoot{}{\thepage}{}\footrule} \pagestyle{ruled} \begin{document} \section{TEST} \begin{scheme}[H] \replacecmpd{CompoundX} \replacecmpd{CompoundY} \centering \includegraphics[scale=1]{Filename.eps} \caption{Random Stuff you want to write here} \label{Your Label} \end{scheme} Hier \cmpd{CompoundX} und \cmpd{CompundY}. \end{document} ``` Additional Info: I use macOS Catalina v.10.15.7. My texmaker version is: 5.1.3.
1
https://tex.stackexchange.com/users/298255
687480
318,934
https://tex.stackexchange.com/questions/686792
6
The [documentation of `xparse`](//texdoc.net/pkg/xparse) states (emphasis mine): > > *`r`* Given as `r⟨token1⟩⟨token2⟩`, this denotes a “required” delimited argument, where the delimiters are `⟨token1⟩` and `⟨token2⟩`. **If the opening delimiter `⟨token1⟩` is > missing, the default marker `-NoValue-` will be inserted after a suitable error.** > > *`R`* Given as `R⟨token1⟩⟨token2⟩{⟨default⟩}`, this is a “required” delimited argument as for `r`, **but it has a user-definable recovery `⟨default⟩` instead of `-NoValue-`**. > > > However in both cases, an error is produced if the parameter is not specified. And I can't see any difference in the error message between `r` and `R`. * How exactly does this *default marker *`-NoValue-`** intervene? * And what is the purpose of this additional `{⟨default⟩}`? Any use case? Is it to avoid additional errors where the corresponding parameter `#N` is used? Or (for `R`) somehow document the parameter with that default value? Any notable difference between `r` and `R` in the end? Note: I already know about the related optional types `d`/`D`.
https://tex.stackexchange.com/users/132778
\NewDocumentCommand: Mandatory types r / R and their “default values”
false
Thanks to **egreg** for the very detailed answer! I'd like to add another interesting usecase I just found for a required argument default marker/value. Let's assume I want to split one argument and be able to pass 1, 2 or 3 values : ``` \test{1, 2, 3} \test{1, 2} \test{1} ``` Using: ``` \NewDocumentCommand{\test}{ >{ \SplitArgument{2}{,} } m }{\impl #1} ``` `\impl` will respectivelly receive ``` \impl{1}{2}{3} \impl{1}{2}{-NoValue-} \impl{1}{-NoValue-}{-NoValue-} ``` optional arguments will fail here as the arguments are passed no matter what, with `{}`. ``` \NewDocumentCommand\impl{m m m}{% \#1 = #1, \#2 = \IfValueTF{#2}{#2}{default}, \#3 = \IfValueTF{#3}{#3}{default} } ``` outputs: ``` #1 = 1, #2 = 2, #3 = 3 #1 = 1, #2 = 2, #3 = default #1 = 1, #2 = default, #3 = default ```
0
https://tex.stackexchange.com/users/132778
687482
318,935
https://tex.stackexchange.com/questions/534331
1
I'm new to latex but would really like to use it to write my dissertation (chemistry, obviously). Labwork is nearly done, but that seems to be the lower hurdle right now :D Right now, I'm trying to use the chemnum package to get nice labels for all compounds. Theoretically, it should replace "TMP"-markers (which are given in an external eps file created by the chemdraw software) with automated numberings. However, I fail to even get the example file running using TeXstudio: <https://de.overleaf.com/latex/templates/automatically-numbering-compounds-in-chemical-schemes/kybckmsxnshs> In my case, the markers are not replaced, but instead under all six exemplary compounds the text "TMP1" or "TMP2" is written. Also the font inside the pictures is screwed up in respect to the model pdf from above. What am I doing wrong? And while we're at it: how do I make my own TMP-labels? is it fine to just write "TMP" as a textblock in chemdraw? Thanks in advance!
https://tex.stackexchange.com/users/209954
Chemnum wont replace TMP markers in eps files
false
Look for this post if you are using Chemdraw on MacOS: <https://tex.stackexchange.com/a/687480/298255> This solution could be also helpful for Windows users.
0
https://tex.stackexchange.com/users/298255
687483
318,936
https://tex.stackexchange.com/questions/687469
0
Confer the answer to the following question for ``` \bigoplus, \bigotimes, \bigodot, \bigoslash \& \bigotimes: ``` [\(\bigominus\) and \(\bigoslash\)?](https://tex.stackexchange.com/questions/687421/bigominus-and-bigoslash) ``` \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{scalerel} \let\bigopsize\bigoplus \def\bigoplus{{\scalerel*{\boldsymbol\oplus}{\bigopsize}}} \def\bigominus{{\scalerel*{\boldsymbol\ominus}{\bigopsize}}} \def\bigodot{{\scalerel*{\boldsymbol\odot}{\bigopsize}}} \def\bigotimes{{\scalerel*{\boldsymbol\otimes}{\bigopsize}}} \def\bigoslash{{\scalerel*{\boldsymbol\oslash}{\bigopsize}}} \begin{document} $\bigoplus \bigominus \bigodot \bigotimes \bigoslash$ $a^\bigoplus$ \end{document} ``` How may one define ``` \bigoT \bigoL, ``` which are like `\bigoplus`, `\bigotimes`, `\bigodot`, `\bigoslash` and `\bigotimes`, but with the central symbol replaced by a centered T, and L?
https://tex.stackexchange.com/users/24406
\(\bigoT\) and \(\bigoL\)?
false
I solved my problems by using the circledsteps-package. It gives access to adequate circlings of numbers, letters and short strings. (\Circled{T}, \Circled{L}) give a circle around a T, and a circle around an L.
-2
https://tex.stackexchange.com/users/24406
687488
318,938
https://tex.stackexchange.com/questions/687492
2
The template of the journal contains a command that divided each page into two, which means each page contains two pages. I need to change that to normal, I did not find any solution on the internet, please find attached the code: ``` \documentclass[10pt]{NSP1} \usepackage{url,floatflt} \usepackage{helvet,times} \usepackage{psfig,graphics} \usepackage{mathptmx,amsmath,amssymb,bm} \usepackage{float} \usepackage[bf,hypcap]{caption} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \tolerance=1 \emergencystretch=\maxdimen \hyphenpenalty=10000 \hbadness=10000 \topmargin=0.00cm \def\sm{\smallskip} \def\no{\noindent} \def\firstpage{1} \setcounter{page}{\firstpage} \def\thevol{7} \def\thenumber{?} \def\theyear{2022} \begin{document} \titlefigurecaption{{\large \bf \rm Information Sciences Letters }\\ {\it\small An International Journal}} \title{Reflection and transmission of an incident progressive wave by obstacles in homogeneous shallow water} \author{***\hyperlink{author1}{$^1$}, Mohamed A. Helal \hyperlink{author2}{$^2$} and Moustafa S. Abou-Dina \hyperlink{author3}{$^3$}} \institute{$^1$ Department of Mathematics, .\\ $^2$Department of Mathematics, Faculty of Science, Cairo University, Egypt.} \titlerunning{progressive wave by obstacles in homogeneous shallow water} \authorrunning{ K. Al Arfaj, M. A. Helal and M. S. Abou-Dina} %corresponding author email \mail{ka} \received{...} \revised{...} \accepted{...} \published{...} \abstracttext{The influence of a suspended fixed obstacle on an incident progressive wave inside an ideal homogeneous shallow water is studied in two dimensions. The fluid occupies an infinite channel of a constant depth, and a fixed obstacle of a small horizontal extent is partially submerged without contact with the bottom of the channel. An asymptotic double series expansion for the solution is used. The procedure enables us to calculate .} \keywords{Progressive wave, shallow water, reflection, fixed obstacle} \maketitle \section{Introduction} Simulations for the geophysical phenomena of a fluid flow over weirs, under gates and submerged elands were studied in several theoretical and experimental works. These works deal with model problems of free-surface fluid flow over a topography or under floating submerged bodies. the theoretical problem is a nonlinear boundary value problem which may be in certain cases, constrained by initial conditions (see \cite{ABWZ,1}). The two-dimensional fluid flow over an obstacle or under a floating body, within the frame of the linearized theory of motion, has been investigated by several authors, for instance \cite{2,3,4,5}. The mathematical theory used in these investigations is inadequate to describe the important nonlinear aspects of the phenomenon. Using a certain procedure the solution for the velocity potential of the nonlinear problem is expressed as a power series in a certain small parameter \cite{1}. The above-mentioned linearized theory assumes the first term of such a series as a first approximation of the solution. the radius of convergence of this series is shown by Gouyon \cite{6} to be of the same order as that of the ratio of the free surface amplitude to the wave length. Hence, this theory is inadequate to deal with the propagation of long waves. Different numerical techniques were developed to solve the nonlinear system of equations to which the original problem is reduced. Yeung \cite{7} present an exhaustive review of the numerical techniques which are widely applied to this system. Analytical techniques, within the frame of the shallow-water theory, were used by several authors to investigate free-surface flows over certain non-horizontal bottoms, see \cite{8,9,10}. Guli \cite{8} and Abou-dina and Helal \cite{10} studied the problem of the reflection and transmission of an incident progressive wave over a topography in shallow water using both of the Lagrangean an Eulerian description of the problem, respectively. In the present work, we investigate the effect of a fixed vertical submerged barrier on the propagation of an incident wave inside a homogeneous fluid. Euler’s description is used and the problem is studied within the frame of the two-dimensional shallow water theory. The fluid is supposed to occupy an infinite channel of constant depth and the horizontal extent of the submerged barrier is assumed to be small, see fig. \eqref{fig1}. The analysis enables to separate progressive waves from local perturbations and shows the absence of reflected waves in the first order of approximation. These results are similar to those obtained for the case of nonhorizontal topograpgy by Ogilvie \cite{3}, Guli \cite{8} and Abou-Dina and Helal \cite{10}. The second order approximation of the solution is found to be the superposition of progressive wave and local perturbations. Analytical expressions are calculated for the local perturbations of the second order. For approximations of order higher than two, the expressions for the progressive waves contain a secular term which increases monotonically with time and distance. This unacceptable result is due to certain aspects of the mathematical used procedure. For this reason, the procedure is modified by utilizing a suitable transformation of variables. The modification reduces the determination of the transmitted wave to be the solution of the equation of Korteweg and de Vries ($\textbf{KdV}$). As an illustration, the special case of the incident uniform flow is considered and the stream lines of the resulting flow are drawn. \begin{figure}[H] \centering \includegraphics[scale=20]{fig1.png} \caption{Explanatory diagram of an upstream wave inside a fluid with a fixed immersed obstacle penetrating the free surface} \label{fig1} \end{figure} The origin of the Cartesian system of coordinates is fixed in the submerged obstacle. the axis \textbf{Ox} points along the direction of the incident-wave velocity, the axis \textbf{OY} is vertical upwards and the plane \textbf{Oxz} coincides with the free surface at rest. The bottom of the channel is impermeable and horizontal \section{Main problem} Consider an incident upstream wave inside a fluid layer with free surface and finite depth in an infinitely long channel. The bottom of the channel is horizontal \begin{thebibliography}{9} \bibitem{14} \newblock Temperville A., \newblock Contribution a la theorie des ondes de gravite en eau peu profonde, \newblock \emph{Thesis, University of Grenoble, France}, (1985). \bibitem{2} \newblock Ursell, F., \newblock The effect of a fixed vertical barrier on surface waves in deep water, \newblock \emph{Math. Proc. Camb. Philos. Soc.}, (1947),\textbf{43} 374-382. \bibitem{1} \newblock Wehausen, J. V. and Laitone E. V., \newblock Surface Waves, \newblock \emph{Fluid Dynamics/ Strömung- smechanik}, (1960), 446-778. \bibitem{4} \newblock Wiegel, R. L., \newblock Transmission of waves past a rigid vertical thin barrier, \newblock \emph{J. Waterw. Harb.}, (1960),\textbf{86} 1-12.. \bibitem{7} \newblock Yeung, R.W., \newblock Numerical methods in free surface flows, \newblock \emph{Ann. Rev. Fluid Mech.}, (1982),\textbf{14} 395–442. \bibitem{15} \newblock Zabusky, N. J. and Kruskal, M. D., \newblock Interaction of Solitons in a Collisionless Plasma and the Recurrence of Initial States, \newblock \emph{Phys. Rev. Lett.}, (1965),\textbf{15} 240–243. \end{thebibliography} \emergencystretch=\hsize \begin{center} \rule{6 cm}{0.02 cm} \end{center} \end{document} ```
https://tex.stackexchange.com/users/216843
How can I change the latex source to obtain undivided pages?
false
You could use `\onecolumn` to switch back to a one column layout: ``` \documentclass[10pt]{NSP1} \usepackage{url,floatflt} \usepackage{helvet,times} \usepackage{psfig,graphics} \usepackage{mathptmx,amsmath,amssymb,bm} \usepackage{float} \usepackage[bf,hypcap]{caption} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \tolerance=1 \emergencystretch=\maxdimen \hyphenpenalty=10000 \hbadness=10000 \topmargin=0.00cm \def\sm{\smallskip} \def\no{\noindent} \def\firstpage{1} \setcounter{page}{\firstpage} \def\thevol{7} \def\thenumber{?} \def\theyear{2022} \begin{document} \titlefigurecaption{{\large \bf \rm Information Sciences Letters }\\ {\it\small An International Journal}} \title{Reflection and transmission of an incident progressive wave by obstacles in homogeneous shallow water} \author{Kawther Al Arfaj \hyperlink{author1}{$^1$}, Mohamed A. Helal \hyperlink{author2}{$^2$} and Moustafa S. Abou-Dina \hyperlink{author3}{$^3$}} \institute{$^1$ Department of Mathematics, College of Science, King Faisal University, P.O. Box 400, Al-Ahsa 31982, Saudi Arabia.\\ $^2$Department of Mathematics, Faculty of Science, Cairo University, Egypt.\\ $^3$Department of Mathematics, Faculty of Science, Cairo University, Egypt.} \titlerunning{progressive wave by obstacles in homogeneous shallow water} \authorrunning{ K. Al Arfaj, M. A. Helal and M. S. Abou-Dina} %corresponding author email \mail{kkarfaj@kfu.edu.sa} \received{...} \revised{...} \accepted{...} \published{...} \abstracttext{The influence of a suspended fixed obstacle on an incident progressive wave inside an ideal homogeneous shallow water is studied in two dimensions. The fluid occupies an infinite channel of a constant depth, and a fixed obstacle of a small horizontal extent is partially submerged without contact with the bottom of the channel. An asymptotic double series expansion for the solution is used. The procedure enables us to calculate .} \keywords{Progressive wave, shallow water, reflection, fixed obstacle} \onecolumn \maketitle \section{Introduction} Simulations for the geophysical phenomena of a fluid flow over weirs, under gates and submerged elands were studied in several theoretical and experimental works. These works deal with model problems of free-surface fluid flow over a topography or under floating submerged bodies. the theoretical problem is a nonlinear boundary value problem which may be in certain cases, constrained by initial conditions (see \cite{ABWZ,1}). The two-dimensional fluid flow over an obstacle or under a floating body, within the frame of the linearized theory of motion, has been investigated by several authors, for instance \cite{2,3,4,5}. The mathematical theory used in these investigations is inadequate to describe the important nonlinear aspects of the phenomenon. Using a certain procedure the solution for the velocity potential of the nonlinear problem is expressed as a power series in a certain small parameter \cite{1}. The above-mentioned linearized theory assumes the first term of such a series as a first approximation of the solution. the radius of convergence of this series is shown by Gouyon \cite{6} to be of the same order as that of the ratio of the free surface amplitude to the wave length. Hence, this theory is inadequate to deal with the propagation of long waves. Different numerical techniques were developed to solve the nonlinear system of equations to which the original problem is reduced. Yeung \cite{7} present an exhaustive review of the numerical techniques which are widely applied to this system. Analytical techniques, within the frame of the shallow-water theory, were used by several authors to investigate free-surface flows over certain non-horizontal bottoms, see \cite{8,9,10}. Guli \cite{8} and Abou-dina and Helal \cite{10} studied the problem of the reflection and transmission of an incident progressive wave over a topography in shallow water using both of the Lagrangean an Eulerian description of the problem, respectively. In the present work, we investigate the effect of a fixed vertical submerged barrier on the propagation of an incident wave inside a homogeneous fluid. Euler’s description is used and the problem is studied within the frame of the two-dimensional shallow water theory. The fluid is supposed to occupy an infinite channel of constant depth and the horizontal extent of the submerged barrier is assumed to be small, see fig. \eqref{fig1}. The analysis enables to separate progressive waves from local perturbations and shows the absence of reflected waves in the first order of approximation. These results are similar to those obtained for the case of nonhorizontal topograpgy by Ogilvie \cite{3}, Guli \cite{8} and Abou-Dina and Helal \cite{10}. The second order approximation of the solution is found to be the superposition of progressive wave and local perturbations. Analytical expressions are calculated for the local perturbations of the second order. For approximations of order higher than two, the expressions for the progressive waves contain a secular term which increases monotonically with time and distance. This unacceptable result is due to certain aspects of the mathematical used procedure. For this reason, the procedure is modified by utilizing a suitable transformation of variables. The modification reduces the determination of the transmitted wave to be the solution of the equation of Korteweg and de Vries ($\textbf{KdV}$). As an illustration, the special case of the incident uniform flow is considered and the stream lines of the resulting flow are drawn. \begin{figure}[H] \centering \includegraphics[scale=20]{fig1.png} \caption{Explanatory diagram of an upstream wave inside a fluid with a fixed immersed obstacle penetrating the free surface} \label{fig1} \end{figure} The origin of the Cartesian system of coordinates is fixed in the submerged obstacle. the axis \textbf{Ox} points along the direction of the incident-wave velocity, the axis \textbf{OY} is vertical upwards and the plane \textbf{Oxz} coincides with the free surface at rest. The bottom of the channel is impermeable and horizontal \section{Main problem} Consider an incident upstream wave inside a fluid layer with free surface and finite depth in an infinitely long channel. The bottom of the channel is horizontal \begin{thebibliography}{9} \bibitem{14} \newblock Temperville A., \newblock Contribution a la theorie des ondes de gravite en eau peu profonde, \newblock \emph{Thesis, University of Grenoble, France}, (1985). \bibitem{2} \newblock Ursell, F., \newblock The effect of a fixed vertical barrier on surface waves in deep water, \newblock \emph{Math. Proc. Camb. Philos. Soc.}, (1947),\textbf{43} 374-382. \bibitem{1} \newblock Wehausen, J. V. and Laitone E. V., \newblock Surface Waves, \newblock \emph{Fluid Dynamics/ Strömung- smechanik}, (1960), 446-778. \bibitem{4} \newblock Wiegel, R. L., \newblock Transmission of waves past a rigid vertical thin barrier, \newblock \emph{J. Waterw. Harb.}, (1960),\textbf{86} 1-12.. \bibitem{7} \newblock Yeung, R.W., \newblock Numerical methods in free surface flows, \newblock \emph{Ann. Rev. Fluid Mech.}, (1982),\textbf{14} 395–442. \bibitem{15} \newblock Zabusky, N. J. and Kruskal, M. D., \newblock Interaction of Solitons in a Collisionless Plasma and the Recurrence of Initial States, \newblock \emph{Phys. Rev. Lett.}, (1965),\textbf{15} 240–243. \end{thebibliography} \emergencystretch=\hsize \begin{center} \rule{6 cm}{0.02 cm} \end{center} \end{document} ```
3
https://tex.stackexchange.com/users/36296
687496
318,941
https://tex.stackexchange.com/questions/687492
2
The template of the journal contains a command that divided each page into two, which means each page contains two pages. I need to change that to normal, I did not find any solution on the internet, please find attached the code: ``` \documentclass[10pt]{NSP1} \usepackage{url,floatflt} \usepackage{helvet,times} \usepackage{psfig,graphics} \usepackage{mathptmx,amsmath,amssymb,bm} \usepackage{float} \usepackage[bf,hypcap]{caption} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \tolerance=1 \emergencystretch=\maxdimen \hyphenpenalty=10000 \hbadness=10000 \topmargin=0.00cm \def\sm{\smallskip} \def\no{\noindent} \def\firstpage{1} \setcounter{page}{\firstpage} \def\thevol{7} \def\thenumber{?} \def\theyear{2022} \begin{document} \titlefigurecaption{{\large \bf \rm Information Sciences Letters }\\ {\it\small An International Journal}} \title{Reflection and transmission of an incident progressive wave by obstacles in homogeneous shallow water} \author{***\hyperlink{author1}{$^1$}, Mohamed A. Helal \hyperlink{author2}{$^2$} and Moustafa S. Abou-Dina \hyperlink{author3}{$^3$}} \institute{$^1$ Department of Mathematics, .\\ $^2$Department of Mathematics, Faculty of Science, Cairo University, Egypt.} \titlerunning{progressive wave by obstacles in homogeneous shallow water} \authorrunning{ K. Al Arfaj, M. A. Helal and M. S. Abou-Dina} %corresponding author email \mail{ka} \received{...} \revised{...} \accepted{...} \published{...} \abstracttext{The influence of a suspended fixed obstacle on an incident progressive wave inside an ideal homogeneous shallow water is studied in two dimensions. The fluid occupies an infinite channel of a constant depth, and a fixed obstacle of a small horizontal extent is partially submerged without contact with the bottom of the channel. An asymptotic double series expansion for the solution is used. The procedure enables us to calculate .} \keywords{Progressive wave, shallow water, reflection, fixed obstacle} \maketitle \section{Introduction} Simulations for the geophysical phenomena of a fluid flow over weirs, under gates and submerged elands were studied in several theoretical and experimental works. These works deal with model problems of free-surface fluid flow over a topography or under floating submerged bodies. the theoretical problem is a nonlinear boundary value problem which may be in certain cases, constrained by initial conditions (see \cite{ABWZ,1}). The two-dimensional fluid flow over an obstacle or under a floating body, within the frame of the linearized theory of motion, has been investigated by several authors, for instance \cite{2,3,4,5}. The mathematical theory used in these investigations is inadequate to describe the important nonlinear aspects of the phenomenon. Using a certain procedure the solution for the velocity potential of the nonlinear problem is expressed as a power series in a certain small parameter \cite{1}. The above-mentioned linearized theory assumes the first term of such a series as a first approximation of the solution. the radius of convergence of this series is shown by Gouyon \cite{6} to be of the same order as that of the ratio of the free surface amplitude to the wave length. Hence, this theory is inadequate to deal with the propagation of long waves. Different numerical techniques were developed to solve the nonlinear system of equations to which the original problem is reduced. Yeung \cite{7} present an exhaustive review of the numerical techniques which are widely applied to this system. Analytical techniques, within the frame of the shallow-water theory, were used by several authors to investigate free-surface flows over certain non-horizontal bottoms, see \cite{8,9,10}. Guli \cite{8} and Abou-dina and Helal \cite{10} studied the problem of the reflection and transmission of an incident progressive wave over a topography in shallow water using both of the Lagrangean an Eulerian description of the problem, respectively. In the present work, we investigate the effect of a fixed vertical submerged barrier on the propagation of an incident wave inside a homogeneous fluid. Euler’s description is used and the problem is studied within the frame of the two-dimensional shallow water theory. The fluid is supposed to occupy an infinite channel of constant depth and the horizontal extent of the submerged barrier is assumed to be small, see fig. \eqref{fig1}. The analysis enables to separate progressive waves from local perturbations and shows the absence of reflected waves in the first order of approximation. These results are similar to those obtained for the case of nonhorizontal topograpgy by Ogilvie \cite{3}, Guli \cite{8} and Abou-Dina and Helal \cite{10}. The second order approximation of the solution is found to be the superposition of progressive wave and local perturbations. Analytical expressions are calculated for the local perturbations of the second order. For approximations of order higher than two, the expressions for the progressive waves contain a secular term which increases monotonically with time and distance. This unacceptable result is due to certain aspects of the mathematical used procedure. For this reason, the procedure is modified by utilizing a suitable transformation of variables. The modification reduces the determination of the transmitted wave to be the solution of the equation of Korteweg and de Vries ($\textbf{KdV}$). As an illustration, the special case of the incident uniform flow is considered and the stream lines of the resulting flow are drawn. \begin{figure}[H] \centering \includegraphics[scale=20]{fig1.png} \caption{Explanatory diagram of an upstream wave inside a fluid with a fixed immersed obstacle penetrating the free surface} \label{fig1} \end{figure} The origin of the Cartesian system of coordinates is fixed in the submerged obstacle. the axis \textbf{Ox} points along the direction of the incident-wave velocity, the axis \textbf{OY} is vertical upwards and the plane \textbf{Oxz} coincides with the free surface at rest. The bottom of the channel is impermeable and horizontal \section{Main problem} Consider an incident upstream wave inside a fluid layer with free surface and finite depth in an infinitely long channel. The bottom of the channel is horizontal \begin{thebibliography}{9} \bibitem{14} \newblock Temperville A., \newblock Contribution a la theorie des ondes de gravite en eau peu profonde, \newblock \emph{Thesis, University of Grenoble, France}, (1985). \bibitem{2} \newblock Ursell, F., \newblock The effect of a fixed vertical barrier on surface waves in deep water, \newblock \emph{Math. Proc. Camb. Philos. Soc.}, (1947),\textbf{43} 374-382. \bibitem{1} \newblock Wehausen, J. V. and Laitone E. V., \newblock Surface Waves, \newblock \emph{Fluid Dynamics/ Strömung- smechanik}, (1960), 446-778. \bibitem{4} \newblock Wiegel, R. L., \newblock Transmission of waves past a rigid vertical thin barrier, \newblock \emph{J. Waterw. Harb.}, (1960),\textbf{86} 1-12.. \bibitem{7} \newblock Yeung, R.W., \newblock Numerical methods in free surface flows, \newblock \emph{Ann. Rev. Fluid Mech.}, (1982),\textbf{14} 395–442. \bibitem{15} \newblock Zabusky, N. J. and Kruskal, M. D., \newblock Interaction of Solitons in a Collisionless Plasma and the Recurrence of Initial States, \newblock \emph{Phys. Rev. Lett.}, (1965),\textbf{15} 240–243. \end{thebibliography} \emergencystretch=\hsize \begin{center} \rule{6 cm}{0.02 cm} \end{center} \end{document} ```
https://tex.stackexchange.com/users/216843
How can I change the latex source to obtain undivided pages?
true
I suggest you edit the class file and change ``` \ExecuteOptions{final,twocolumn,fleqn,a4paper,twoside,10pt,instindent} ``` to ``` \ExecuteOptions{final,fleqn,a4paper,twoside,10pt,instindent} ```
3
https://tex.stackexchange.com/users/5001
687497
318,942
https://tex.stackexchange.com/questions/121743
1
I have used the following command to change the color of references in the text to blue: ``` \hypersetup{ colorlinks, pdfborder=0 0 0, linkcolor=blue, citecolor=blue} ``` however; the parentheses, semicolons and commas sometimes appear in black. The only way I was able to fix this was by using the `\textcolor{blue}{\citeN{sampref1}}` so that all the text would appear in blue. But this is frustrating to do for more that 100 of references that I have. Is there a solution for this problem? I am using `chicago` as my `bibliographystyle`.
https://tex.stackexchange.com/users/30203
punctuation color in references
false
You can use the `\bibpunct` command to modify the citation style. ``` \usepackage{natbib} \usepackage{xcolor} \bibpunct{[}{]}{;}{a}{\textcolor{blue}{,}}{,} \begin{document} ... \end{document} ```
0
https://tex.stackexchange.com/users/244447
687501
318,943
https://tex.stackexchange.com/questions/687437
0
I am trying to write a script that using texcount will output only the number of characters including spaces. I made a batch script which works, no problems there. The problem is trying to run it in latex shell escape in overleaf using the \immediate\write18 environment. The problems seems mostly to be with how latex handles the special characters used in the batchscript. The script/latex code is as follows: ``` \newcommand{\quickcharcount}[1]{% \immediate\write18{ texcount -1 -sum -merge -char -q main.tex > chars.txt texcount -1 -sum -merge -q main.tex > spaces.txt for /f "skip=1" %%G IN (spaces.txt) DO if not defined line set "nSpace=%%G" for /f "skip=1" %%G IN (chars.txt) DO if not defined line set "nChar=%%G" for /f "tokens=1*delims=:" %%G in ('findstr /n "^" spaces.txt') do if %%G equ 2 set "nSpace=%%H" for /f "tokens=1*delims=:" %%G in ('findstr /n "^" chars.txt') do if %%G equ 2 set "nChar=%%H" set /a "sum=nChar+nSpace" echo %sum% > count.sum }% \input{count.sum} } ``` Does anyone have experience with this, and know how to solve the problem? EDIT: I was told it was not possible with a bat script, so I have now written it as a shell script. But I am still struggling with getting it to work inside latex. You said it was somewhat restrictive with overleaf, so could this also be the reason here? ``` #!/bin/bash char=$(texcount -1 -sum -merge -char -q main.tex) space=$(texcount -1 -sum -merge -q main.tex) nChar=${char%(*} nSpace=${space%(*} sum=$((nChar + nSpace)) echo $sum > count.sum ```
https://tex.stackexchange.com/users/120553
Using a batch script in latex \immediate\write18 env
true
You have defined `\quickcharcount` to have 1 argument you don't use so I defined it with no arguments. A newline in the source is a space so all your script is on one line. You could use `^^J` to write a newline but here I just use the bash command separator `;` You also need `\@percentchar` as `%` is a comment. ``` \documentclass{article} \makeatletter \newcommand{\quickcharcount}{%no argument \immediate\write18{ char=$(texcount -1 -sum -merge -char -q main.tex); space=$(texcount -1 -sum -merge -q main.tex); nChar=${char\@percentchar(*}; nSpace=${space\@percentchar(*}; sum=$((nChar + nSpace)); echo $sum > count.sum }% \input{count.sum}% } \makeatother \begin{document} abc xyz \quickcharcount \end{document} ```
1
https://tex.stackexchange.com/users/1090
687503
318,944
https://tex.stackexchange.com/questions/680458
1
[Kaobook](https://github.com/fmarotta/kaobook)'s `kao.sty` file contains the section `encoding and fonts`: ``` \newif\ifxetexorluatex \ifxetex \xetexorluatextrue \else \ifluatex \xetexorluatextrue \else \xetexorluatexfalse \fi \fi \ifxetexorluatex \RequirePackage{amssymb} % Must be loaded before unicode-math \RequirePackage[force]{filehook} % Fixes an error \RequirePackage{unicode-math} % Math fonts in xetexorluatex \setromanfont[ Scale=1.04 ]{Libertinus Serif} \setsansfont[ Scale=1 ]{Libertinus Sans} \setmonofont[ Scale=.89 ]{Liberation Mono} \setmathfont{Libertinus Math} \ifluatex \else %\RequirePackage{morewrites} % Fix some errors related to floats \fi \else \RequirePackage[utf8]{inputenc} % utf8 encoding in the input (.tex) file \RequirePackage[T1]{fontenc} % utf8 encoding in the output (.pdf) file \RequirePackage{amssymb} % Math symbols, including \blacktriangleright, used for bullets \RequirePackage[scaled=.97,helvratio=.93,p,theoremfont]{newpxtext} % Serif palatino font \RequirePackage[vvarbb,smallerops,bigdelims]{newpxmath} % Math palatino font \RequirePackage[scaled=.85]{beramono} % Monospace font \RequirePackage[scr=rsfso,cal=boondoxo]{mathalfa} % Mathcal from STIX, unslanted a bit %\RequirePackage{morewrites} % Fix some errors related to floats \fi % When using the Palatino (newpxtext) font, it is better to use a % slightly larger stretch. %\setstretch{1.10} \linespread{1.07} % Give Palatino more leading (space between lines) ``` Deleting the block after the third `\else` (outlined on the left) does change the font, but it also messes up any linking settings and prints the glossary on a page in front of the title page and not lined up nicely, but in one block of text. By messing up linking, I mean that there are now blocks around the TOC entries, for instance. Any thoughts?
https://tex.stackexchange.com/users/269662
How do I change the main kaobook font to the default LaTeX font?
false
While waiting for a better answer to this, you might delete (or comment) `\RequirePackage[scaled=.97,helvratio=.93,p,theoremfont]{newpxtext}` or change it to `\RequirePackage[]{lmodern}`
1
https://tex.stackexchange.com/users/298271
687521
318,948
https://tex.stackexchange.com/questions/687515
0
With `cmsdate=both` and `biblatex-chicago`, using `\textcite` or `\autocite` puts the `origdate` in square brackets. However, under References and when I use `\cite`, `origdate` appears in round brackets. Is there a way to make these consistent, specifically having `origdate` always appear in square brackets? My bib file contains: ``` @book{Hayek41, author = "Friedrich A. Hayek", date = 1962, origdate = 1941, title = "The Pure Theory of Capital", publisher = "Routledge", address = "London" } ``` And the tex file: ``` \usepackage[backend=biber, authordate, %author-date in-text form cmsdate=both] %show original date {biblatex-chicago} \addbibresource{sources.bib} text\autocite{Hayek41} \nocite{*} %Show all references \printbibliography[heading=bibintoc] ``` In text, I get: > > (Hayek [1941] 1962). > > > Under the References, I get > > Hayek, Friedrich A. (1941) 1962. The Pure Theory of Capital. London: Routledge & Kegan Paul. > > > And using `\cite` I get > > Hayek (1941) 1962. > > >
https://tex.stackexchange.com/users/298270
Origdate in Square Brackets in References
false
`biblatex-chicago` is a very complex style that implements very complex guidelines, so supposedly simple changes can take quite a bit of code. This is certainly the case here. The only thing we had to do was to replace `\bibopenparen` with `\bibopenbracket` and `\bibcloseparen` with `\bibclosebracket` in the right places. ``` \documentclass[american]{article} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{csquotes} \usepackage[backend=biber, authordate, %author-date in-text form cmsdate=both] %show original date {biblatex-chicago} \renewbibmacro*{cite:bothyear+oldstyle}{% \ifboolexpr{ ( test {\ifentrytype{music}}% or test {\ifentrytype{review}}% or test {\ifentrytype{standard}}% or test {\ifentrytype{suppperiodical}}% or test {\ifentrytype{video}}% ) and togl {cms@avdate}% }% {\usebibmacro{cite:av+labelyear+extrayear}}% {\iftoggle{cms@switchdates}% {\printtext[cmsyearhyper]{% \bibopenbracket \usebibmacro{cite:labelyear+extrayear}% \bibclosebracket \clearfield{extradate}\clearfield{extratitleyear}% \addspace% \printorigdateextra}}% \usebibmacro{origyear+endyear} {\iffieldundef{origyear}% ??? {\iftoggle{cms@ordate}% {}% {\clearfield{extradate}\clearfield{extratitleyear}}% \usebibmacro{cite:standard+labelyear+extrayear}}% {\iftoggle{cms@ordate}% Added test for year field ??? {\iffieldundef{year}% {\usebibmacro{cite:origfirst+labelyear+extrayear}}% {\printtext[cmsyearhyper]{% \bibopenbracket \usebibmacro{cite:origfirst+labelyear+extrayear}% \bibclosebracket \setunit{\addspace}%\addspace% ??? \clearfield{extradate}\clearfield{extratitleyear}% \printdateextra}}}%\usebibmacro{year+endyear} {\iffieldundef{year}% {\usebibmacro{cite:origfirst+labelyear+extrayear}}% {\printtext[cmsyearhyper]{% \bibopenbracket \clearfield{extradate}\clearfield{extratitleyear}% \printorigdateextra% % \usebibmacro{origyear+endyear}% \bibclosebracket \addspace% \usebibmacro{cite:standard+labelyear+extrayear}}}}}}}}% \renewbibmacro*{bothyear+oldstyle}{% \ifboolexpr{ ( test {\ifentrytype{music}}% or test {\ifentrytype{review}}% or test {\ifentrytype{standard}}% or test {\ifentrytype{suppperiodical}}% or test {\ifentrytype{video}}% ) and togl {cms@avdate}% }% {\usebibmacro{av+labelyear+extrayear}}% \clearfield local to \printtext {\iftoggle{cms@switchdates}% {\printtext{% \bibopenbracket \usebibmacro{labelyear+extrayear}% \bibclosebracket \setunit{\addspace}% \clearfield{extrayear}% \printorigdateextra}% \usebibmacro{origyear+endyear} \usebibmacro{clear+datefield}{}% \usebibmacro{clear+datefield}{orig}}% {\iffieldundef{origyear}% {\iftoggle{cms@ordate}% {}% {\clearfield{extradate}\clearfield{extratitleyear}}% \usebibmacro{standard+labelyear+extrayear}}% {\iftoggle{cms@ordate}% ??? {\iffieldundef{year}% {\usebibmacro{origfirst+labelyear+extrayear}}% {\printtext{% \bibopenbracket \usebibmacro{origfirst+labelyear+extrayear}% \bibclosebracket \setunit*{\addspace}% \clearfield{extradate}\clearfield{extratitleyear}% \printdateextra}}}% \usebibmacro{year+endyear} {\iffieldundef{year}% {\usebibmacro{origfirst+labelyear+extrayear}}% {\printtext{% \bibopenbracket \clearfield{extradate}\clearfield{extratitleyear}% \printorigdateextra% % \usebibmacro{origyear+endyear}% \bibclosebracket \setunit*{\addspace}% \usebibmacro{standard+labelyear+extrayear}}}}% \usebibmacro{clear+datefield}{orig}% \usebibmacro{clear+datefield}{}}}}}% \begin{filecontents}{\jobname.bib} @book{Hayek41, author = {Friedrich A. Hayek}, date = 1962, origdate = 1941, title = {The Pure Theory of Capital}, publisher = {Routledge}, address = {London}, } \end{filecontents} \addbibresource{\jobname.bib} \begin{document} Lorem \autocite{Hayek41} ipsum \textcite{Hayek41} dolor \cite{Hayek41} \printbibliography \end{document} ```
2
https://tex.stackexchange.com/users/35864
687525
318,950
https://tex.stackexchange.com/questions/687527
0
I want to see the page corresponding to edited Tex page when I compile the file on Overleaf, but it always return to the first page in PDF file. How can I fix this?
https://tex.stackexchange.com/users/67747
How to avoid returning to the first page of PDF after compiling in Overleaf?
false
I found the solution to my issue via [https://www.overleaf.com/learn/how-to/How\_to\_jump\_to\_the\_source\_code\_from\_the\_typeset\_PDF\_(SyncTeX)[][1]](https://www.overleaf.com/learn/how-to/How_to_jump_to_the_source_code_from_the_typeset_PDF_(SyncTeX)%5B%5D%5B1%5D)
0
https://tex.stackexchange.com/users/67747
687535
318,954
https://tex.stackexchange.com/questions/687502
1
I'm trying to change the font for writing some letters in different formatting in equations (math environment), but, couldn't do so correctly. I was thinking of creating a new command for each specific letter that I will use, or, to create a local environment with a different formatting. Specifically, I'm interest in using different formats for greek letters, like the "Antykwa Torunska text and math (\usepackage[math]{anttor})" that appears in Figure 8 (page 9) in this [file](https://tug.org/pracjourn/2006-1/hartke/hartke.pdf). The examples that I saw doesn't tackle this type of problem.
https://tex.stackexchange.com/users/215480
How to create a command in Latex that return a letter in a different formatting?
true
You can define a new symbol font for the Antikwa Toruńska math Greek letters and specific commands. However, the font should probably be scaled down to match the standard font. ``` \documentclass{article} % relevant lines from omsantt.fd \DeclareFontFamily{OML}{antt}{} \DeclareFontShape{OML}{antt}{m}{it}{<-> s*[0.9] mi-anttri}{} \DeclareFontShape{OML}{antt}{b}{it}{<-> s*[0.9] mi-anttbi}{} % declare a symbol font \DeclareSymbolFont{anttletters}{OML}{antt}{m}{it} \SetSymbolFont{anttletters}{bold}{OML}{antt}{b}{it} % copied (with obvious changes) from fontmath.ltx \DeclareMathSymbol{\atalpha}{\mathord}{anttletters}{"0B} \DeclareMathSymbol{\atbeta}{\mathord}{anttletters}{"0C} \DeclareMathSymbol{\atgamma}{\mathord}{anttletters}{"0D} \DeclareMathSymbol{\atdelta}{\mathord}{anttletters}{"0E} \DeclareMathSymbol{\atepsilon}{\mathord}{anttletters}{"0F} \DeclareMathSymbol{\atzeta}{\mathord}{anttletters}{"10} \DeclareMathSymbol{\ateta}{\mathord}{anttletters}{"11} \DeclareMathSymbol{\attheta}{\mathord}{anttletters}{"12} \DeclareMathSymbol{\atiota}{\mathord}{anttletters}{"13} \DeclareMathSymbol{\atkappa}{\mathord}{anttletters}{"14} \DeclareMathSymbol{\atlambda}{\mathord}{anttletters}{"15} \DeclareMathSymbol{\atmu}{\mathord}{anttletters}{"16} \DeclareMathSymbol{\atnu}{\mathord}{anttletters}{"17} \DeclareMathSymbol{\atxi}{\mathord}{anttletters}{"18} \DeclareMathSymbol{\atpi}{\mathord}{anttletters}{"19} \DeclareMathSymbol{\atrho}{\mathord}{anttletters}{"1A} \DeclareMathSymbol{\atsigma}{\mathord}{anttletters}{"1B} \DeclareMathSymbol{\attau}{\mathord}{anttletters}{"1C} \DeclareMathSymbol{\atupsilon}{\mathord}{anttletters}{"1D} \DeclareMathSymbol{\atphi}{\mathord}{anttletters}{"1E} \DeclareMathSymbol{\atchi}{\mathord}{anttletters}{"1F} \DeclareMathSymbol{\atpsi}{\mathord}{anttletters}{"20} \DeclareMathSymbol{\atomega}{\mathord}{anttletters}{"21} \DeclareMathSymbol{\atvarepsilon}{\mathord}{anttletters}{"22} \DeclareMathSymbol{\atvartheta}{\mathord}{anttletters}{"23} \DeclareMathSymbol{\atvarpi}{\mathord}{anttletters}{"24} \DeclareMathSymbol{\atvarrho}{\mathord}{anttletters}{"25} \DeclareMathSymbol{\atvarsigma}{\mathord}{anttletters}{"26} \DeclareMathSymbol{\atvarphi}{\mathord}{anttletters}{"27} \begin{document} $\atalpha+\atbeta+\atgamma+\atdelta+\atepsilon+\atzeta+\ateta+\attheta+\atkappa+\atlambda+\atmu$ $\atnu+\atxi+\atpi+\atrho+\atsigma+\attau+\atupsilon+\atphi+\atchi+\atpsi+\atomega$ $\atvarepsilon+\atvartheta+\atvarphi+\atvarrho+\atvarsigma+\atvarphi$ $\alpha+\atalpha$ \end{document} ```
1
https://tex.stackexchange.com/users/4427
687544
318,958
https://tex.stackexchange.com/questions/687543
0
I am using KOMA Script class and need to change the layout of the last page. Let's say. the last page should have an increased top section. I've tried different ways, but none was successful. ``` \documentclass[twoside]{scrartcl} \usepackage[showframe]{geometry} \usepackage{lipsum} %% This does not work \AtEndDocument{\newgeometry{top=85mm}} \begin{document} \lipsum[1-8] %% This should be executed automatically! \newgeometry{top=85mm} \lipsum[9-12] \end{document} ```
https://tex.stackexchange.com/users/120477
Change geometry of last page
true
Generally, it would be useful to know the reason for the changed page layout of the last page. For example, if there will be a special content at that page, the change of the top margin could be bound to that content. Or if the content of the last page should just be bottom aligned, this also could have another solution. But because your question was more general, about changing the setting of `top` with `geometry` package for the last page, here is a suggestion for exactly this: ``` \documentclass[twoside]{scrartcl} \usepackage[showframe]{geometry} \usepackage{lipsum} \makeatletter \AddToHook{shipout/after}{% \ifnum \c@totalpages=\numexpr\@abspage@last-1\relax \newgeometry{top=85mm}% \global\textheight=\textheight \global\topmargin=\topmargin \global\@colht=\textheight % maybe not needed \global\@colroom=\textheight % maybe not needed \global\vsize=\textheight % maybe not needed \fi } \makeatother \begin{document} \lipsum[1-8] %% This should be executed automatically! %\newgeometry{top=85mm} \lipsum[9-12] \end{document} ``` After at least two LaTeX runs it results in: For also changing the left or right margin or the height of the page header additional global changes of lengths could be needed, but this wasn't the question. Just one additional note: Loading `geometry` already changes the margins of `scrartcl`. If you don't want this, you can use either KOMA-Script option `usegeometry` or `geometry` option `pass`.
2
https://tex.stackexchange.com/users/277964
687545
318,959
https://tex.stackexchange.com/questions/687540
0
When I use XeLaTeX to compile TeX in Ubuntu 22.04, it shows this error: ``` (/usr/share/texlive/texmf-dist/tex/latex/moderncv/moderncvcolorblue.sty Package: moderncvcolorblue 2021-12-16 v2.3.0 modern curriculum vitae and letter color scheme: blue ) ! LaTeX Error: File `ctex.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: ! Emergency stop. <read *> l.7 \usepackage [scale=0.75]{geometry}^^M End of file on the terminal! ``` This is the tex file: ``` \documentclass[11pt,a4paper,sans]{moderncv} \moderncvstyle{classic} \moderncvcolor{blue} \usepackage{ctex} \usepackage[scale=0.75]{geometry} \setlength{\footskip}{149.60005pt} \setlength{\hintscolumnwidth}{3cm} \name{张}{强} \title{Java开发} \phone[mobile]{152344567} \email{zhang@gmail.com} \social[stackoverflow]{https://stackoverflow.com/users/26343868/john} \social[github]{https://github.com/zhang} \begin{document} \makecvtitle \section{教育经历} \cventry{2009.09--2009.09}{本科}{XX大学}{}{}{} \section{工作经历} \cventry{2023.06--2023.06}{Java开发}{上海XX信息科技有限公司}{上海}{}{} \end{document} ``` what should I do to fixed this issue?
https://tex.stackexchange.com/users/69600
LaTeX Error: File `ctex.sty' not found
false
Finally I run this command and fixed this issue: ``` sudo apt install latex-cjk-all ```
0
https://tex.stackexchange.com/users/69600
687551
318,961
https://tex.stackexchange.com/questions/687549
0
As external software generates figures without labels similar to the figures included in the example, I am unable to reference them. However, I need to reference them in my text using e.g. `\ref{fig:1}`. ChatGPT proposed me a solution included below that will automatically add a label with an increasing number from a separate counter in the label, counting across sections that my figures are otherwises numbered within. Therefore, the links work and show the correct figure number, but when clicking them, you will always end up on the figure with the correct number in the first section (e.g., clicking figure 2.2 will send you to 1.2, 2.1 to 1.1). I believe I am getting something wrong with the counters. Very happy for any advice. MWE below: ``` \documentclass{article} \usepackage[english]{babel} \usepackage[letterpaper, top=2cm, bottom=2cm, left=3cm, right=3cm, marginparwidth=1.75cm ]{geometry} \usepackage{amsmath} \numberwithin{figure}{section} \newcounter{figcounter} \let\oldfigure\figure \let\oldendfigure\endfigure \renewenvironment{figure}{ \oldfigure \stepcounter{figcounter} }{ \label{fig:\thefigcounter} \oldendfigure } \usepackage[colorlinks=true, allcolors=blue]{hyperref} \title{Your Paper} \author{You} \begin{document} \maketitle \section{Introduction} Link to Figure \ref{fig:1}\\ Link to Figure \ref{fig:2}\\ Link to Figure \ref{fig:3}\\ Link to Figure \ref{fig:4} \begin{figure} \centering first figure in section 1 \caption{Caption} \end{figure} \begin{figure} \centering second figure but still section 1 \caption{Caption} \end{figure} \clearpage \section{Another Section} \begin{figure} \centering second section's first figure \caption{Caption} \end{figure} \begin{figure} \centering second section's second figure \caption{Caption} \end{figure} \clearpage \listoffigures \end{document} ```
https://tex.stackexchange.com/users/298290
Custom figure counter: links jump to the wrong figure
true
You need to redefine \theHfigure to make the link target unique. I would also number the labels by section, that makes it easier to keep track of the correct numbers: ``` \documentclass{article} \usepackage[english]{babel} \usepackage[letterpaper, top=2cm, bottom=2cm, left=3cm, right=3cm, marginparwidth=1.75cm ]{geometry} \usepackage{amsmath} \numberwithin{figure}{section} \usepackage[colorlinks=true, allcolors=blue]{hyperref} \renewcommand\theHfigure{\arabic{section}.\arabic{figure}} \AddToHook{env/figure/end}{\label{fig:\theHfigure}} \title{Your Paper} \author{You} \begin{document} \maketitle \section{Introduction} Link to Figure \ref{fig:1.1}\\ Link to Figure \ref{fig:1.2}\\ Link to Figure \ref{fig:2.1}\\ Link to Figure \ref{fig:2.2} \begin{figure} \centering first figure in section 1 \caption{Caption} \end{figure} \begin{figure} \centering second figure but still section 1 \caption{Caption} \end{figure} \clearpage \section{Another Section} \begin{figure} \centering second section's first figure \caption{Caption} \end{figure} \begin{figure} \centering second section's second figure \caption{Caption} \end{figure} \clearpage \listoffigures \end{document} ```
3
https://tex.stackexchange.com/users/2388
687561
318,968
https://tex.stackexchange.com/questions/687566
1
I'm trying to draw a square matrix with `\Cdots`, `\Vdots` and `\Ddots`, all of which need to terminate in empty cells. Two problems arise: (i) the `ddots` is not close to 45 degrees (I think it's calculating the angle from the diagonal elements `a_{11}` and `a_{22}`) and (ii) the `cdots` and `vdots` overshoot the `ddots`. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \[\begin{pNiceMatrix}a_{11}&a_{12}&\Cdots\\ a_{21}&a_{22}&&\\\Vdots &&\Ddots\end{pNiceMatrix}\] \end{document} ``` I've tried adding corners and phantom dots to populate the empty cells but the matrix is larger than necessary, and has an empty last column. ``` \[\begin{pNiceMatrix}[corners]a_{11}&a_{12}&\Cdots&\phantom{.}\\ a_{21}&a_{22}&&&\\\Vdots &&\Ddots&\\\phantom{.}&&&\phantom{.}\end{pNiceMatrix}\] ```
https://tex.stackexchange.com/users/149197
Nicematrix with \Ddots leading to empty cell
true
With `nicematrix`, it's always a bit complicated with dotted lines with an open extremity... Here is a suggestion. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \[\begin{pNiceMatrix}[xdots/shorten-start=5pt] a_{11} & a_{12} & \Cdots \\ a_{21} & a_{22} & \\ \Vdots & & \NotEmpty \CodeAfter \line{2-2}{3-3} \end{pNiceMatrix}\] \end{document} ```
1
https://tex.stackexchange.com/users/163000
687568
318,971
https://tex.stackexchange.com/questions/687562
0
I'm new to LaTeX and don't know which command to use to create an exclusive margin for a single page and then return to the general margin. ``` \documentclass{article} \usepackage{graphicx} \usepackage[spanish]{babel} \usepackage [top= 1cm, left= 4cm, bottom= 2cm, rigth= 2cm]{geometry} \title{Test} \author{Eduardo } \date{Junio 2023} \begin{document} \maketitle \newpage \section{Introduction} \end{document} ```
https://tex.stackexchange.com/users/298297
Margins for different pages
true
Using `\maketitle` with class `article`, you should use option `titlepage` to have a title page instead of a in-page title. And if the title page should be, e.g., a cover with other margins, you can use, e.g., class `scrartcl` with option `titlepage=firstiscover` or package `scrextend` and options `extendedfeatures=title` and `titlepage=firstiscover` and define `\coverpagetopmargin`, `\coverpagebottommargin`, `\coverpageleftmargin`, `\coverpagerightmargin`: ``` \documentclass{article} \usepackage{graphicx} \usepackage[spanish]{babel} \usepackage [top= 1cm, left= 4cm, bottom= 2cm, right= 2cm]{geometry} \usepackage[extendedfeature=title,titlepage=firstiscover]{scrextend} \renewcommand*{\coverpageleftmargin}{5cm} \renewcommand*{\coverpageleftmargin}{5cm} \renewcommand*{\coverpagetopmargin}{5cm} \setkomafont{title}{\bfseries} \title{Se trata de un título de prueba en varias líneas para aclarar los márgenes} \author{Eduardo} \date{Junio 2023} \begin{document} \maketitle \section{Introducción} \end{document} ``` or similar with `scrartcl`: ``` \documentclass[titlepage=firstiscover]{scrartcl} \usepackage{graphicx} \usepackage[spanish]{babel} \usepackage [top= 1cm, left= 4cm, bottom= 2cm, right= 2cm]{geometry} \renewcommand*{\coverpageleftmargin}{5cm} \renewcommand*{\coverpageleftmargin}{5cm} \renewcommand*{\coverpagetopmargin}{5cm} \setkomafont{title}{\bfseries} \title{Se trata de un título de prueba en varias líneas para aclarar los márgenes} \author{Eduardo} \date{Junio 2023} \begin{document} \maketitle \section{Introducción} \end{document} ``` Note the difference in page size, because default with `article` is `letterpaper` but default with `scrartcl` is `a4paper`. However something like this can also be reached without `scrextend` using `\newgeometry` and `\restoregeometry`: ``` \documentclass[titlepage]{article} \usepackage[spanish]{babel} \usepackage [top= 1cm, left= 4cm, bottom= 2cm, right= 2cm]{geometry} \title{Se trata de un título de prueba en varias líneas para aclarar los márgenes} \author{Eduardo} \date{Junio 2023} \begin{document} \newgeometry{top=5cm,left=5cm,right=5cm} \maketitle \restoregeometry \section{Introducción} \end{document} ``` Or from within the document preamble, using [generic LaTeX hook](http://mirrors.ctan.org/macros/latex/base/lthooks-doc.pdf): ``` \documentclass[titlepage]{article} \usepackage[spanish]{babel} \usepackage [top= 1cm, left= 4cm, bottom= 2cm, right= 2cm]{geometry} \title{Se trata de un título de prueba en varias líneas para aclarar los márgenes} \author{Eduardo} \date{Junio 2023} \AddToHook{cmd/maketitle/before}{\newgeometry{top=5cm,left=5cm,right=5cm}} \AddToHook{cmd/maketitle/after}{\restoregeometry} \begin{document} \maketitle \section{Introducción} \end{document} ``` The result is the same as shown in the previous example.
0
https://tex.stackexchange.com/users/277964
687574
318,972
https://tex.stackexchange.com/questions/415625
10
I use something like the following to get a footnote without an anchor. ``` \documentclass{article} \usepackage{hyperref} \begin{document} {\let\thefootnote\relax\footnotetext{2010 Mathematics Subject Classification: 05A05, 05A16.}} \end{document} ``` The hyperref package doesn't like this and produces a warning. Is there something simple I can do to prevent the warning? (I prefer to have no warnings.) I do want hyperref to create links for normal footnotes. A more general question (which should answer the specific one): Is there a command that locally disables hyperref from creating a link?
https://tex.stackexchange.com/users/77655
avoiding hyperref warning: Ignoring empty anchor
false
You can eliminate all hyperref warnings, including the unwanted ``` Package hyperref Warning: Ignoring empty anchor ``` by adding this inside your group before the `\footnotetext`: ``` \makeatletter\def\Hy@Warning#1{}\makeatother ``` (I agree with the suggestion to make it into a macro, but leaving that aside here.) Let's hope there are no real hyperref warnings in the text, because they would be silenced as well. Obviously this is tinkering with the internal workings, not any kind of guaranteed interface, but FWIW ...
1
https://tex.stackexchange.com/users/63279
687579
318,974
https://tex.stackexchange.com/questions/656330
1
The edges of my graph are overlapping, is there a way to have some distance between them and also how to color a specific edge? ``` \definecolor{myblue}{RGB}{80,80,160} \definecolor{mygreen}{RGB}{80,160,80} \begin{tikzpicture}[thick, every node/.style={draw,circle}, ssnode/.style={fill=myblue}, fsnode/.style={fill=mygreen}, every fit/.style={ellipse,draw,inner sep=-1pt,text width=1.75cm}, ->,shorten >= 2pt,shorten <= 2pt ] % the vertices of Slots \begin{scope}[start chain=going below,node distance=1.5mm] \foreach \i in {1,2,...,8} \node[ssnode,on chain] (s\i) [label=left: \i] {}; \end{scope} % the vertices of Flights \begin{scope}[xshift=4cm,yshift=-0.5cm,start chain=going below,node distance=1.5mm] \foreach \i in {$f_{2}$,$f_{5}$,$f_{6}$,$f_{7}$,$f_{8}$} \node[fsnode,on chain] (f\i) [label=right: \i] {}; \end{scope} % the set Slots \node [myblue,fit=(s1) (s8),label=above:$Slots$] {}; % the set Flights \node [mygreen,fit=(f$f_{2}$) (f$f_{8}$),label=above:$Flights$] {}; % the edges \draw (s2) -- (f$f_{2}$); \draw (s5) -- (f$f_{5}$); \draw (s6) -- (f$f_{6}$); \draw (s7) -- (f$f_{7}$); \draw (s8) -- (f$f_{8}$); \draw (f$f_{2}$) -- (s1); \draw (f$f_{5}$) -- (s3); \draw (f$f_{6}$) -- (s5); \draw (f$f_{7}$) -- (s5); \draw (f$f_{8}$) -- (s7); \draw (s3) -- (f$f_{5}$); \draw (s1) -- (f$f_{2}$); \end{tikzpicture} ```
https://tex.stackexchange.com/users/279573
Bipartite Graph
false
You can space the flight nodes out a bit more and change the arrow tip shape. In the example below I used `Latex[width=3pt, length=4pt]`, which requires the library `arrows.meta`. Also, reducing the distance between the two sets improves the arrow angles. Other changes: * Use `\itshape` instead of `$...$` for correct spacing. * I changed the node names to avoid the strange names for the flight nodes. * Place the direction of the arrows when you draw them instead of using a global setting. ``` \documentclass{article} \usepackage{tikz} \usetikzlibrary {chains, fit, shapes.geometric, arrows.meta} \begin{document} \definecolor{myblue}{RGB}{80,80,160} \definecolor{mygreen}{RGB}{80,160,80} \begin{tikzpicture}[thick, every node/.style={draw, circle}, ssnode/.style={fill=myblue}, fsnode/.style={fill=mygreen}, every fit/.style={ellipse, draw, inner sep=-1pt, text width=1.75cm}, >={Latex[width=3pt, length=4pt]}, shorten >= 2pt, shorten <= 2pt ] % the vertices of Slots \begin{scope}[start chain=going below,node distance=1.5mm] \foreach \i in {1,2,...,8} \node[ssnode,on chain] (s\i) [label=left: \i] {}; \end{scope} % the vertices of Flights \begin{scope}[xshift=3cm, yshift=-0.15cm, start chain=going below, node distance=5mm] \foreach \i in {2,5,6,7,8} \node[fsnode, on chain] (f\i) [label=right: $f_{\i}$] {}; \end{scope} % the set Slots \node [myblue, fit=(s1) (s8), label=above:\itshape Slots] {}; % the set Flights \node [mygreen, fit=(f2) (f8), label=above:\itshape Flights] {}; % the edges \draw[->] (s2) -- (f2); \draw[->] (s5) -- (f5); \draw[->] (s6) -- (f6); \draw[->] (s7) -- (f7); \draw[->] (s8) -- (f8); \draw[<->] (f2) -- (s1); \draw[<->, red] (f5) -- (s3); \draw[->, orange] (f6) -- (s5); \draw[->] (f7) -- (s5); \draw[->] (f8) -- (s7); \end{tikzpicture} ```
0
https://tex.stackexchange.com/users/125871
687582
318,976
https://tex.stackexchange.com/questions/687569
1
some years ago I wrote the simple package PSBao.sty. I stopped using it two years ago and now it doesn't work any more. I'm not able to find the cause. Can someone help me? Unfortunately it was my first and last attempt to write a package so it is a little spaghetti-like and I can't add a MWE. Sorry! ADD: I forgot to say that I use TexStudio with MikTex and run it with PDFLaTex. Sorry again! ``` \DocumentMetadata{} \documentclass{scrbook} \usepackage{psbao} \begin{document} \centering \setbaounit{.4cm} \initbao[0,% 4,3,5,1,1,1,5,0,% 4,4,1,2,0,0,0,0,% 0,0,0,3,5,8,4,1,% 2,2,1,1,1,2,3,0,% 0] \begin{showbaoboard} \end{showbaoboard} \end{document} ``` Thanks to @user187802 for the MWE! **Adding** the package **auto-pst-pdf**, the **postscript** eviroment as suggested by @user187802 to the MWE and the command **pdflatex.exe -synctex=1 -interaction=nonstopmode -shell-escape %.tex** I get a correct **mwe-autopp.pdf** no **mwe.pdf** and the following warnings: ``` runsystem(echo " ")...executed. runsystem(echo "-------------------------------------------------")...executed. runsystem(echo "auto-pst-pdf: Auxiliary LaTeX compilation")...executed. runsystem(echo "-------------------------------------------------")...executed. runsystem(del "mwe-autopp.log")...executed. runsystem(del "mwe-autopp.dvi")...executed. runsystem(del "mwe-autopp.ps")...executed. runsystem(del "mwe-autopp.pdf")...executed. runsystem(latex -disable-write18 -jobname="mwe-autopp" -interaction=batchmode "\let \APPmakepictures \empty \input mwe.tex")...executed. runsystem(dvips -Ppdf -o "mwe-autopp.ps" "mwe-autopp.dvi")...executed. runsystem(ps2pdf "mwe-autopp.ps" "mwe-autopp.pdf")...executed. runsystem(pdfcrop "mwe-autopp.pdf" "mwe-pics.pdf")...executed. Package auto-pst-pdf Warning: Creation of mwe-pics.pdf failed. This warning occured on input line 128. Package auto-pst-pdf Warning: Could not create mwe-pics.pdf. Auxiliary files not deleted. This warning occured on input line 128. runsystem(echo "-------------------------------------------------")...executed. runsystem(echo "auto-pst-pdf: End auxiliary LaTeX compilation")...executed. runsystem(echo "-------------------------------------------------")...executed. Package pst-pdf Warning: File `mwe-pics.pdf' not found. ```
https://tex.stackexchange.com/users/183677
My first package stopped to work!
false
Run it with `lualatex` and your package will work: ``` \DocumentMetadata{} \documentclass{scrbook} \usepackage{psbao} \begin{document} \centering \setbaounit{.4cm} \initbao[0,% 4,3,5,1,1,1,5,0,% 4,4,1,2,0,0,0,0,% 0,0,0,3,5,8,4,1,% 2,2,1,1,1,2,3,0,% 0] \begin{showbaoboard} \end{showbaoboard} \end{document} ``` It also works with `latex->drips->pspdf` and also for `pdflatex` and package `auto-pst-pdf` and the `postscript` environment. The following works with `pdflatex --shell-escape ...` ``` \documentclass{scrbook} \usepackage[pspdf=-dALLOWPSTRANSPARENCY]{auto-pst-pdf} \usepackage{psbao} \begin{document} \centering \begin{postscript} \setbaounit{.4cm} \initbao[0,% 4,3,5,1,1,1,5,0,% 4,4,1,2,0,0,0,0,% 0,0,0,3,5,8,4,1,% 2,2,1,1,1,2,3,0,% 0] \begin{showbaoboard} \end{showbaoboard} \end{postscript} \end{document} ```
3
https://tex.stackexchange.com/users/187802
687587
318,978
https://tex.stackexchange.com/questions/687588
3
Given the following MWE: ``` \documentclass{article} \usepackage{circledsteps} \usepackage{cancel} \begin{document} \(\odot, \cancel\odot\) \(\Circled{1}, \cancel\Circled{1}\) \end{document} ``` How may one cancel `\(\Circled{1}\)` just as `\(\cancel\odot\)` cancels `\(\odot\)`?
https://tex.stackexchange.com/users/24406
Cancel circled text under circledsteps?
true
You need to enclose `\Circled{1}` in braces, otherwise you’re telling `\cancel` to pass just `\Circled` as an argument which gives an error: ``` \(\Circled{1}, \cancel{\Circled{1}}\) ```
5
https://tex.stackexchange.com/users/202780
687590
318,979
https://tex.stackexchange.com/questions/513538
1
``` \documentclass{article} \usepackage{tikz} \usetikzlibrary{quotes} \begin{document} \tikzset{ thing/.pic={ \node {\tikzpictext}; \node at (0,1) {\tikzpictextoptions}; } } \begin{tikzpicture} \pic["foo"'bar] {thing}; \end{tikzpicture} \end{document} ``` This renders “foo” as expected, but the node at `(0,1)` shows: ``` every pic quotes/.try,’,bar ``` I expected “'bar”. Is this a bug or am I missing something? Actually, I’m trying to pass 3 arguments to the pic style and according to the manual the quotes functionality should be good for 1 or 2 (to start with).
https://tex.stackexchange.com/users/15894
Is \tikzpictextoptions not supposed to contain the text after the quotes only?
false
The `'` is a special character that is taken care of by the `quotes` library so that a syntax like ``` "Foo"' Bar ``` is possible without having to do ``` "Foo" {', Bar} ``` which makes it easy to [`swap`](https://tikz.dev/tikz-shapes#tikz/swap) a node(/label/pin) with one key without having to use `,` and `{}`. The `'` will always be sneaked in with an extra `,`. On `every pic quotes` being part of the `\pictextoptions`, I'd argue this is an oversight of the manual (where even `'` isn't really transformed in the example). This behaviour is consistent with all other `quotes` cases * `every pin quotes`, * `every label quotes` and * `every edge quotes`. Where the latter is the only on defined by default with [`auto`](https://tikz.dev/tikz-shapes#tikz/auto). This would also be the only one where `'` = `swap` would make sense out of the box unless your pic's node is also along a path segment. Of course, you can always change the definition of `'` or `swap` inside `every label/pin/pic quotes` so that the shorthand `'` has a more useful meaning when used with labels, pins or a pic's text.
1
https://tex.stackexchange.com/users/16595
687597
318,981
https://tex.stackexchange.com/questions/687530
0
``` \documentclass[letter,10.5pt]{article} \usepackage[head=0pt,bottom=0.6in,top=0.8in, left=0.5in,right=0.5in, footskip=1cm]{geometry} %%%%%%%%%%% pdflatex %%%%%%%%% \usepackage[T1]{fontenc} \usepackage{newtxmath,newtxtext} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%% xelatex %%%%%%%%%%%%%% % \usepackage{fontspec} % \setmainfont{Times New Roman} % \setmainfont{TeX Gyre Termes} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %A Few Useful Packages \usepackage{parskip} \usepackage{titlesec} \usepackage{multirow} \usepackage{graphicx} \usepackage{xcolor} \usepackage{mdframed} \usepackage{xcolor} \usepackage{fontspec} \setmainfont{Arial} %\usepackage{arial} % load package which provides the font %\renewcommand{\sfdefault}{ua1} % set default serif font as Arial %\renewcommand{\familydefault}{\sfdefault} % set the default font as serif, i.e., Arial \definecolor{navyblue}{RGB}{31, 78, 120} % line spacing \linespread{1.0} \titleformat{\section} {\normalfont\Large}{}{0pt}{}[{\titlerule[0.8pt]}] \usepackage{eso-pic} \AddToShipoutPictureBG{\color{navyblue}% \AtPageUpperLeft{\rule[-20mm]{\paperwidth}{20mm}}% } \begin{document} \section{\color{navyblue} SUMMARY OF QUALIFICATIONS} Results-driven, customer-focused, and innovative professional with years of work experience in diverse software development roles. Highly skilled in JavaScript, React, Node.js and associated technologies. Hands-on experience in front-end and back-end development of web-based applications and advanced development methodologies, as well as design and development of automation systems. My proven capabilities in self-management, get-up-and-go attitude, and ability to understand complex coding with ease make me an ideal candidate to fit the position of software engineer, and I am confident that I will be a valuable asset to your organisation. \end{document} ```
https://tex.stackexchange.com/users/289569
How to set Arial Narrow font for my entire document with font size 10.5pt?
true
### Setting the Font First, check that you have Arial Narrow installed. **TeX on Windows cannot find fonts unless they are installed for all users.** To test how XeTeX looks it up, run `fc-match "Arial Narrow"` from the command line. To test how LuaTeX looks it up, run `luaotfload-tool --find "Arial Narrow"`. If you install a font the default way, without Administrator permission, Windows puts it in a hidden directory that TeX engines don’t know about. If you did that by accident, make a copy of the font file, uninstall it from the Control Panel, and reinstall for all users. You might also be able to load the font by its filename, which is the recommended way. If you have the file `C:\Windows\Fonts\ARIALN.TTF`, this should work for you: ``` \usepackage{fontspec} \defaultfontfeatures[ARIALN]{ UprightFont=*, BoldFont=*B, ItalicFont=*I, BoldItalicFont=*BI, Extension=.ttf } \setmainfont{ARIALN} \setsansfont{ARIALN} ``` If you happen not to have it, Arial Nova Condensed is available *gratis*. ### Setting the Font Size What TeX calls `10pt` is the slightly-smaller European point. What Word and most other software calls a “point,” TeX calls a `bp`, or “big point.” One way to get what Microsoft Word calls “10.5-point” is: ``` \usepackage[fontsize=10.5bp]{scrextend} ``` You could also load the `scrartcl` class instead of `article`, to get the extra features of Koma-Script However, if “10.5pt” is really a workaround for `10pt` being smaller in TeX than Word, and what you actually want is what Word calls 10 points, say `10bp`. (Similarly, if you want 2 cm, you should say `2cm`, not `0.8in`). ### Other Bugs in Your Document You seem to be copying someone else’s preamble. Worse, you seem to be copying from somebody who copied from somebody else. You ended up with several packages twice, or that are incompatible with each other. Some changes you need are: * Load `\usepackage[svgnames]{xcolor}`, once, before `fontspec`, to get `NavyBlue`. * Don’t load `fontenc` or `newtxtext` (which load 8-bit fonts from last century) with `fontspec`. * Don’t load `newtxmath` here. It loads math mode (which I doubt a document that starts this way would need) in a legacy format, and also loads a font that clashes horribly with Arial Narrow. If you need to use math mode along with `fontspec`, [you can pick from one of the samples here.](https://tex.stackexchange.com/questions/425098/which-opentype-math-fonts-are-available) * Set the color of your headers once, with `\addtokomafont` if you’re using the `scrartcl` document class, or a package such as `titlesec` otherwise. Don’t put a `\color` command in each individual section title. * The package option to get letter-size paper is `letterpaper`, not `letter`. * Remove any package you aren’t actually using. ### A Possible Template ``` \documentclass[lettepaper,fontsize=10.5bp]{scrartcl} \usepackage[head=0pt,bottom=0.6in,top=0.8in, left=0.5in,right=0.5in, footskip=1cm]{geometry} \usepackage{parskip} \usepackage{graphicx} \usepackage[svgnames]{xcolor} \usepackage{fontspec} \defaultfontfeatures[ARIALN]{ UprightFont=*, BoldFont=*B, ItalicFont=*I, BoldItalicFont=*BI, Extension=.ttf } \setmainfont{ARIALN} \setsansfont{ARIALN} \addtokomafont{disposition}{\color{NavyBlue}} \begin{document} \section{ SUMMARY OF QUALIFICATIONS} Results-driven, customer-focused, and innovative professional with years of work experience in diverse software development roles. Highly skilled in JavaScript, React, Node.js and associated technologies. Hands-on experience in front-end and back-end development of web-based applications and advanced development methodologies, as well as design and development of automation systems. My proven capabilities in self-management, get-up-and-go attitude, and ability to understand complex coding with ease make me an ideal candidate to fit the position of software engineer, and I am confident that I will be a valuable asset to your organisation. \end{document} ```
6
https://tex.stackexchange.com/users/61644
687598
318,982
https://tex.stackexchange.com/questions/687592
17
In the document ``` \catcode32=13\def {o} \bye ``` how does TeX know to tokenize the space after `\def` as an active character? **Details:** The correct result is `o`. First, we set spaces (ASCII 32) to be active characters (category 13); then, we define them to print `o`; then, we add a space, printing `o`, and finish. How does the parser recognize the end of the literal number `13`? A literal number can't contain an unexpandable control sequence, like `\def`. But it *can* contain an expandable control sequence like `\if`, and we can't know which this is until we finish reading it and look it up. So, until we reach the end of parsing the `\def` token, we don't know where the end of `13` is. It gets hairy here. Multi-character control sequences absorb the following space. So before the `\catcode` assignment ran, the `\def` would have absorbed the following space. But to run the `\catcode` assignment, we have to tokenize up to the end of the `\def` token. So, how does TeX know not to eat that space?
https://tex.stackexchange.com/users/259978
How does TeX know whether to eat this space if its catcode is about to change?
false
From experimenting with things such as ``` \catcode`Z=13Z ``` and ``` \def\defZ{W}\catcode`Z=13\defZ{XY} ``` I feel that in trying to terminate the catcode assignment TeX scans ahead with current pre-existing catcode regimen. So it will see `\def<space>` decide that `\def` terminates the assignment, then resume its scanning and catcode assignments (unlike in a `\futurelet` which would have frozen the catcode) so the space is now active. Not an authoritative answer because not based on actually going to the TeX sources... --- The following example ``` {\catcode`Z=13 \gdefZ{WWW}}\catcode`Z=13ZZ ``` which prints out ZWWW shows that at least here the catcode 11 Z (the first one after 13) is not reinterpreted as catcode13. This must be added to my earlier babblings (the additional babble being that some catcode may get frozen; in OP, it is farther away though, but let's wait for the correct answers).
1
https://tex.stackexchange.com/users/293669
687601
318,984
https://tex.stackexchange.com/questions/687592
17
In the document ``` \catcode32=13\def {o} \bye ``` how does TeX know to tokenize the space after `\def` as an active character? **Details:** The correct result is `o`. First, we set spaces (ASCII 32) to be active characters (category 13); then, we define them to print `o`; then, we add a space, printing `o`, and finish. How does the parser recognize the end of the literal number `13`? A literal number can't contain an unexpandable control sequence, like `\def`. But it *can* contain an expandable control sequence like `\if`, and we can't know which this is until we finish reading it and look it up. So, until we reach the end of parsing the `\def` token, we don't know where the end of `13` is. It gets hairy here. Multi-character control sequences absorb the following space. So before the `\catcode` assignment ran, the `\def` would have absorbed the following space. But to run the `\catcode` assignment, we have to tokenize up to the end of the `\def` token. So, how does TeX know not to eat that space?
https://tex.stackexchange.com/users/259978
How does TeX know whether to eat this space if its catcode is about to change?
false
`\catcode32=13\def {o} \bye` 1. While in the process of gathering tokens that form the second TeX-⟨*number*⟩-quantity of the `\catcode`-assignment, that TeX-⟨*number*⟩-quantity is found to be an ⟨*integer constant*⟩ consisting of a sequence of ⟨*digit*⟩-tokens with leading ⟨*digit*⟩-tokens `112` and `312`. 2. As the ⟨*digit*⟩-token `312` is considered a component of the ⟨*integer constant*⟩ and thus not suitable for terminating the process of gathering tokens belonging to the ⟨*integer constant*⟩, more tokens are to be tokenized and expanded if expandable, until finding a token suitable for terminating the process of gathering tokens belonging to the ⟨*integer constant*⟩ as not considered a component of the ⟨*integer constant*⟩. 3. Thus, in the course of forming more tokens probably belonging to the second TeX-⟨*number*⟩-quantity of the catcode-assignment, TeX gathers characters denoting the next token. 4. Hereby TeX encounters the character `\` which has category code 0 (escape) and realizes that characters denoting a control sequence token are to be gathered. After realizing this, TeX encounters the character `d` and due to the character `d` having category code 11 (letter) realizes that characters denoting a control word token are to be gathered. 5. So, TeX also gathers the character `e` and the character `f` which both have category code 11 (letter). 6. Then TeX encounters the space character, which at that time has category code 10 (space). Characters not of category code 11 (letter) at the time of tokenizing are not considered components of names of control word tokens. Thus the space character terminates the process of gathering characters denoting a control word token and TeX appends the control word token `\def` to the token stream and switches the reading-apparatus to state S (skipping blanks). The token `\def` is not considered a component of an ⟨*integer constant*⟩, thus the process of gathering tokens belonging to the ⟨*integer constant*⟩/the process of gathering tokens belonging to the second TeX-⟨*number*⟩-quantity of the catcode-assignment is terminated and the catcode-assignment is performed. Thus, when processing the space character, which terminated gathering characters for the `\def`-token, takes place, the category code of the space character is 13 (active). As state S (skipping blanks) only affects characters of category code 10 (space), the space character gets tokenized as an active character token. If you like to get familiar with how in TeX the stage of tokenization/processing single characters of a line of .tex-input is intertwined with other stages of processing (stage of expansion / stage of performing assignments), try to figure out why `\catcode`\.=0\def.macro{replacement}\macro\bye` works out while `\catcode`\.=0.def.macro{replacement}\macro\bye` yields error-messages about `.macro`/`\macro` being undefined.
10
https://tex.stackexchange.com/users/118714
687605
318,988
https://tex.stackexchange.com/questions/687592
17
In the document ``` \catcode32=13\def {o} \bye ``` how does TeX know to tokenize the space after `\def` as an active character? **Details:** The correct result is `o`. First, we set spaces (ASCII 32) to be active characters (category 13); then, we define them to print `o`; then, we add a space, printing `o`, and finish. How does the parser recognize the end of the literal number `13`? A literal number can't contain an unexpandable control sequence, like `\def`. But it *can* contain an expandable control sequence like `\if`, and we can't know which this is until we finish reading it and look it up. So, until we reach the end of parsing the `\def` token, we don't know where the end of `13` is. It gets hairy here. Multi-character control sequences absorb the following space. So before the `\catcode` assignment ran, the `\def` would have absorbed the following space. But to run the `\catcode` assignment, we have to tokenize up to the end of the `\def` token. So, how does TeX know not to eat that space?
https://tex.stackexchange.com/users/259978
How does TeX know whether to eat this space if its catcode is about to change?
false
It's simple, actually. 1. The `\catcode` token alone tells TeX that a category code assignment is to be performed; 2. in this case, TeX looks for an 8-bit ⟨number⟩ (it's 21-bit for XeTeX or LuaTeX); 3. upon having found it, TeX looks for an ⟨optional equals⟩ (gobbling a space after `=`, if both are present); 4. TeX looks for a 4-bit number. How the ⟨number⟩ can be specified is too long to describe. In your case, both the required ⟨number⟩s are explicit constants, and a category 10 space would be gobbled after the sequence of digits. It's also important to remember that an entire line of input is read, and the end-of-record is replaced by the `\endlinechar`, after throwing out trailing spaces, but the characters haven't yet been tokenized: TeX tokenizes the input only when it needs to. So the following code lines are completely equivalent: ``` \catcode32=13\def {o} \bye \catcode32 =13\def {o} \bye \catcode32= 13\def {o} \bye \catcode32=13 \def {o} \bye \catcode32 = 13\def {o} \bye \catcode32 =13 \def {o} \bye \catcode32 = 13 \def {o} \bye ``` Indeed, the input ``` {\catcode32=13\def {o} }\par {\catcode32 =13\def {o} }\par {\catcode32= 13\def {o} }\par {\catcode32=13 \def {o} }\par {\catcode32 = 13\def {o} }\par {\catcode32 =13 \def {o} }\par {\catcode32 = 13 \def {o} }\par \bye ``` produces seven o's. Your case is the first one, where `\def` cannot be interpreted as a digit: the token is put aside to be reread after the assignment has been performed. Let's examine ``` \catcode32=13 \def {o} \bye ``` that's what you probably want to know about (the other two with a space after 13 are similar). When TeX has scanned the `=`, it proceeds to look for a 4-bit ⟨number⟩. It finds `1`, so it knows that an explicit constant follows. Next comes `3` and further comes a space. No category code assignment has yet been done, so this space is given category code 10 and terminates the lookup for digits. Now TeX know what category code to assign, it performs the assignment and discards the category 10 character that follows. Maybe you can ask what would happen with ``` \catcode32=13 \def {o} \bye ``` Exactly the same, because after scanning a category code 10 character, TeX enters the state “skipping blanks”, so the following category 10 characters are ignored. This action of skipping blanks happens before the assignment of category code is performed, because TeX wants to “normalize” the input stream. Exercise: predict the output of ``` \catcode32=13\def {o} \ \bye ``` (there are two spaces after the backslash).
6
https://tex.stackexchange.com/users/4427
687609
318,990
https://tex.stackexchange.com/questions/687612
1
Not sure what is going on. It seems that a `\uline` with only `\hspace` does not render if at the beginning of a wrapped line. ``` \documentclass[12pt]{article} \usepackage{geometry} \usepackage{mathptmx} \usepackage{parskip} \usepackage{ulem} \geometry{a4paper, margin = 1in} \begin{document} This Non-Disclosure and Confidentially Agreement (the ``Agreement``) is entered into as of \uline{\hspace{1in}}, 20\uline{\hspace{0.5in}} (the ``Effective Date``) by and between: \end{document} ``` Yes, I know I could achieve something similar with `\makebox[1in]{\hrulefill}` (would have to figure out how to lower it), but still curious why the `\uline` approach doesn't work. Thank you!
https://tex.stackexchange.com/users/254571
\uline with \hspace does not render at beginning of wrapped line
true
`\hspace` does not produce any output at the beginning of a line (i.e., at a line break). This is usually what’s desired. To force output, you can write `\hspace*` rather than `\hspace` and get the output you wanted: ``` This Non-Disclosure and Confidentially Agreement (the ``Agreement``) is entered into as of \uline{\hspace*{1in}}, 20\uline{\hspace*{0.5in}} (the ``Effective Date``) by and between: ```
1
https://tex.stackexchange.com/users/202780
687613
318,991
https://tex.stackexchange.com/questions/687623
3
what does \[length] mean? like this: ``` \documentclass{article} \begin{document} mmmmm\\[-0.33em] mmmmm mmmmm \hspace{-0.33em}mmmmm \end{document} ``` why are these do not render the same?
https://tex.stackexchange.com/users/231103
what does [length] after a `\\` mark mean
false
To begin with, LaTeX commands can take both required and optional arguments. Required arguments are (generally) enclosed by curly braces, while optional arguments are enclosed by square brackets. Next, if the string ``` mmmmm\\[-0.33em] ``` occurs inside an `array` or a `tabular`-like environment, the sub-string `\\` is the instruction to insert a line break and `[-0.33em]` represents an *optional* argument to the `\\` instruction. If the argument, which is supposed to be a length, is a positive, additional vertical whitespace -- in the amount of that argument -- will be inserted; it it's negative, that amount will be subtracted from the default amount of vertical space that's inserted by `\\`. (Aside: If you use `\\` *outside* of `array` and `tabular`-like environments, it's quite likely that you're doing something wrong...) In contrast, `\hspace` is a text-mode command that serves to insert or subtract *horizontal* space. Incidentally, to LaTeX, `\hspace{0pt}` is *not* the same as "doing nothing" -- inserting "zero-length whitespace" can have significant and (if used correctly) very handy use cases. In short, there's no reason to believe that `\\[-0.33em]` and `\hspace{-0.33em}` would, let alone *should*, produce the same outcome.
2
https://tex.stackexchange.com/users/5001
687625
318,995
https://tex.stackexchange.com/questions/687592
17
In the document ``` \catcode32=13\def {o} \bye ``` how does TeX know to tokenize the space after `\def` as an active character? **Details:** The correct result is `o`. First, we set spaces (ASCII 32) to be active characters (category 13); then, we define them to print `o`; then, we add a space, printing `o`, and finish. How does the parser recognize the end of the literal number `13`? A literal number can't contain an unexpandable control sequence, like `\def`. But it *can* contain an expandable control sequence like `\if`, and we can't know which this is until we finish reading it and look it up. So, until we reach the end of parsing the `\def` token, we don't know where the end of `13` is. It gets hairy here. Multi-character control sequences absorb the following space. So before the `\catcode` assignment ran, the `\def` would have absorbed the following space. But to run the `\catcode` assignment, we have to tokenize up to the end of the `\def` token. So, how does TeX know not to eat that space?
https://tex.stackexchange.com/users/259978
How does TeX know whether to eat this space if its catcode is about to change?
true
It is true that if the token processor creates a token and it is sent to the expand processor, then the once assigned catcode cannot be changed (there are several exceptions like `\string`, `\detokenize` etc. but is out of our current focus). But your example ``` \catcode32=13\def {o} \bye ``` doesn't meet the second part of the sentence: the space after `\def` is waiting for processing at the token-processor level. It is not sent to the expand processor. The token processor recognizes the space after `\def` twice. Firstly, when `\def` control sequence is constructed (space has catcode 10 in this time). Then the token processor switches to the "skipping spaces" state, it sends the `\def` to the expand processor, and it keeps the space character for further processing. Expand processor cannot expand `\def`, so it tells the main processor that the number reading is finished, and the main processor finalizes the `\catcode` assignment and runs `\def`. It deactivates expand processor at this place and asks to the token processor to move the next token. The token processor gets waiting for space and creates a token from it using current catcode 13. Its "skipping spaces" state is finished because the created token isn't space with category 10. It sends the token space/13 to the main processor. The main lesson learned from it is: the token processor doesn't definitely create the pair character/catcode until it is sent to the next level of processing (expand processor, main processor).
8
https://tex.stackexchange.com/users/51799
687626
318,996
https://tex.stackexchange.com/questions/687619
0
I want to make a big table in Overleaf, but I keep getting error and not showing the compile output. Here's my code. I wonder where I put the mistake. Because I got errors also in every `\begin` command, even in `\begin{document}`, while when I checked it, all already in pair `\begin - \end` ``` \begin{table}[t] \caption{Chamber workload and cycle time gap comparison ABC and Half-ABC sequence} \label{result_com} \begin{center} \begin{tabular}{| M{1.5cm} | M{0.5cm}| M{2cm} | M{1cm} | M{1cm}| M{1cm} | M{1cm} | M{1cm}| M{1cm} |} \hline $ w=2, v=1 $ & \multirow{2}{*}{$k$} & \multirow{2}{*}{Parameters} & \multicolumn{2}{c}{Average Gap} & \multicolumn{2}{c}{Maximum gap} & \multicolumn{2}{c}{Minimum Gap} \\ \cline $ m $ & & & ABC & Half-ABC & ABC & Half-ABC & ABC & Half-ABC \\ \hline \multirow{4}{*}{1}& $ 2 $ & \multirow{24}{*}{$ p\in [50, 100] , c\in [50, 1000]$} & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 5 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 10 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 20 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \hline \multirow{4}{*}{2}& $ 2 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 5 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 10 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 20 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \hline \multirow{4}{*}{3}& $ 2 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 5 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 10 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 20 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \hline \multirow{4}{*}{4}& $ 2 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 5 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 10 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 20 $ & & $ 0\% $ & $ 0\% $ & $ 0 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \hline \multirow{4}{*}{5}& $ 2 $ & & $ 0.012\% $ & $ 0\% $ & $ 1.258 $ & $ 0 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 5 $ & & $ 0.129\% $ & $ 0.088\% $ & $ 5.247 $ & $ 6.173 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 10 $ & & $ 0.234\% $ & $ 0.205\% $ & $ 7.012 $ & $ 7.513 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 20 $ & & $ 0.331\% $ & $ 0.313\% $ & $ 8.007 $ & $ 8.268 $ & $ 0 $ & $ 0 $ \\ \hline \multirow{4}{*}{6}& $ 2 $ & & $ 0.411\% $ & $ 0.008\% $ & $ 8.805 $ & $ 3.145 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 5 $ & & $ 1.547\% $ & $ 0.943\% $ & $ 20.062 $ & $ 20.988 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 10 $ & & $ 2.479\% $ & $ 2.05\% $ & $ 25.042 $ & $ 25.543 $ & $ 0 $ & $ 0 $ \\ \cline{3-9} & $ 20 $ & & $ 3.338\% $ & $ 3.067\% $ & $ 27.85 $ & $ 28.111 $ & $ 0 $ & $ 0 $ \\ \hline \end{tabular} \end{center} \end{table} ```
https://tex.stackexchange.com/users/298326
Error making table in Latex (Overleaf)
false
* Error is caused by wrong use of the first `\cline` command in your table. You forgot to declare columns in which it should be drown, i.e. instead of `\cline` it probably should be `\cline{4-9}`. * This error is independent from Overleaf as well from LaTeX3 (so I delete those tags). * I suspect, that your table has other issues too, but I can't test it since you not provide MWE (Minimal Working Example and therefore is unknown, how is column type `M{...}` is defined and why you use it, etc. * From table code I guess that `clines` are not adequate determined. * Possible result of your table, after correcting of error and guessing how `M` columns are defined can be: Corrected MWE I would provide when you will extend showed code fragment to MWE.
4
https://tex.stackexchange.com/users/18189
687627
318,997
https://tex.stackexchange.com/questions/687608
0
I am looking to use the barless f as shown in the title, but the only option seems to be this (ſ) which still retains half of the bar. Are there any solutions to this or relevant packages that I can use? Many thanks
https://tex.stackexchange.com/users/298320
Insert barless f (ſ) into document?
false
Unicode has `U+0283` ʃ LATIN SMALL LETTER ESH `U+AB4D` ꭍ lATIN SMALL LETTER BASELINE ESH `U+017F` ſ LATIN SMALL LETTER LONG S If the font you are using has the characters they can be used without any special markup. For example the Windows Times New Roman, with lualatex ``` \documentclass{article} \usepackage{fontspec} \setmainfont{Times New Roman} \begin{document} U+0283 ʃ LATIN SMALL LETTER ESH U+AB4D ꭍ LATIN SMALL LETTER BASELINE ESH U+017F ſ LATIN SMALL LETTER LONG S \end{document} ```
0
https://tex.stackexchange.com/users/1090
687638
319,001
https://tex.stackexchange.com/questions/687631
3
I am getting this error and the table is failed to generate. ``` \documentclass{IEEEtran} \usepackage{booktabs, makecell, multirow, tabularx} \newcolumntype{L}{>{\raggedright\arraybackslash}X} \usepackage[figuresright]{rotating} \setlength{\rotFPtop}{0pt plus 1fil} \renewcommand{\theadfont}{\footnotesize\bfseries} \renewcommand\theadgape{} \usepackage{lipsum} % for dummy text filler \begin{document} \begin{table} \centering \caption{The consolidated accuracy of the system} \label{tab:Precision} \begin{tabular}{ >{\bfseries}c c c c l } \toprule \thead{Risk level} &\thead{Precision} & \thead{Recall} & \thead{f1-score} & \thead{Support}\\ \midrule & High & .95 & .93 & 1.00 & 60\\ \addlinespace & Medium & .99 & .92 & .93 & 60\\ \addlinespace & Low & .95 & .99 & .96 & 60\\ \addlinespace & None & .99 & .95 & 1.00 & 60\\ \bottomrule \end{tabular} \end{table} \lipsum \end{document} ``` Please help. I have tried with tabularx and L combination also, without any success.
https://tex.stackexchange.com/users/218773
Table generation error: ! Extra alignment tab has been changed to \cr
true
The error indicates, that more columns are used than specified. In your case ``` \begin{tabular}{ >{\bfseries}c c c c l } ``` specifies five columns: four `c` columns and one `l` column. In the first row: ``` \thead{Risk level} &\thead{Precision} & \thead{Recall} & \thead{f1-score} & \thead{Support}\\ ``` you are indeed using these five columns. But all other columns like: ``` & High & .95 & .93 & 1.00 & 60\\ ``` are using six columns: an empty one before the first `&` and five columns with contents. So you either have to specify one more column or remove the empty column in each row but the first. Looking to the contents, IMHO removing the empty column would be best. I would additionally recommend to use `S` columns of package `siunitx` for all columns but the first one: ``` \documentclass{IEEEtran} \usepackage{booktabs,makecell,siunitx} \renewcommand{\theadfont}{\footnotesize\bfseries} \usepackage{lipsum} % for dummy text filler \begin{document} \begin{table} \centering \caption{The consolidated accuracy of the system} \label{tab:Precision} \begin{tabular}{>{\bfseries}c*4S} \toprule \thead{Risk level} & {\thead{Precision}} & {\thead{Recall}} & {\thead{f1-score}} & {\thead{Support}}\\ \midrule High & .95 & .93 & 1.00 & 60\\ \addlinespace Medium & .99 & .92 & .93 & 60\\ \addlinespace Low & .95 & .99 & .96 & 60\\ \addlinespace None & .99 & .95 & 1.00 & 60\\ \bottomrule \end{tabular} \end{table} \lipsum \end{document} ``` For example for the last column it could be useful, to specify the decimals. See the `siunitx` manual for more information.
3
https://tex.stackexchange.com/users/277964
687639
319,002
https://tex.stackexchange.com/questions/238760
13
chemfig is a great package to draw molecules. But it's not very fast. I am searching for a software to create chemfig code of chemical graphs (molecules, reactions etc.). It would be great if it is free (better if it's open source :) ).
https://tex.stackexchange.com/users/70169
Simpler way to create chemical graphs using chemfig
false
I haven't found a GUI tool that can generate `chemfig` figures. I usually use Marvin (free), export it to .svg then to .pdf and include it in a LaTeX document. You can use for example BKChem if you want something open source.
0
https://tex.stackexchange.com/users/298271
687641
319,003
https://tex.stackexchange.com/questions/7588
12
I’d like to install a package (microtype 2.5 beta 4) under TeX Live that isn’t available in the official repository. Now, I know that it’s usually enough to put the package under `~/texmf/tex/latex/` but I was wondering if I couldn’t use `tlmgr` to do the grunt work for me. In particular, I noticed that `tlmgr` has a `--repository` option that can be used to pass it a local repository path. However, the following command unfortunately fails (understandably, since there is no TeX Live database file `texlive.tlpdb` there to read from): ``` wget http://xetex.tk/mediawiki/images/1/1c/Microtype.tds.zip unzip Microtype.tds.zip tlmgr --repository=./Microtype.tds/ update microtype ``` I was wondering if there was still a possibility to make this work.
https://tex.stackexchange.com/users/42
Install downloaded package via tlmgr
false
This is how I add manually a new package (ex: xyz) on Linux Fedora: `sudo dnf install 'tex(xyz.sty)'`. For the Debian-based distros it should be something like (I've not tried): `sudo apt-get install 'tex(xyz.sty)'`. This puts the package under the system-wide home for Tex packages and not user based one. For Fedora it is: `/etc/share/texlive/texmf-dist/tex/latex/`.
0
https://tex.stackexchange.com/users/282784
687643
319,004
https://tex.stackexchange.com/questions/687651
0
I have created a custom LaTeX class for my personal use and encountered an issue when defining a new environment based on a certain condition. Here's a snippet from my class file: ``` \newif\if@sd\@sdtrue \if@sd{ \newenvironment{test}{Begin}{End} } \fi ``` However, when I tried to use this environment in another TeX file, I encountered the following error: "Environment 'test' undefined". I'm not sure why this error is occurring and how to resolve it.
https://tex.stackexchange.com/users/229149
Make new environment conditionally
true
remove the `{...}` if you make the `\newenvironment` in a group it is lost at the end of the group
1
https://tex.stackexchange.com/users/1090
687653
319,008
https://tex.stackexchange.com/questions/687608
0
I am looking to use the barless f as shown in the title, but the only option seems to be this (ſ) which still retains half of the bar. Are there any solutions to this or relevant packages that I can use? Many thanks
https://tex.stackexchange.com/users/298320
Insert barless f (ſ) into document?
false
What's a “barless f”? You perhaps mean the “long s”, which is Unicode U+017F. Some fonts have no ornament, some fonts have a small dent. It's a choice of the font designer.
1
https://tex.stackexchange.com/users/4427
687659
319,010
https://tex.stackexchange.com/questions/687656
1
I have the following piece of code to draw an arc and then a velocity vector perpendicular to that curve. I would like to have a transparent cylinder around the green arrow, what would be easiest way of doing this? ie. so the arrow goes through the top of the cylinder. ``` \documentclass[tikz,border=5]{standalone} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[>=Triangle] \shade [top color=white, bottom color=gray!50, middle color=white] (120:8/3) arc (120:190:8/3) node [black, near end, left] {$\omega$} -- (190:25/9) -- (200:15/6) -- (190:20/9) -- (190:7/3) arc (190:120:7/3) -- cycle; \foreach \i in { 210}{ \draw [->, thick, blue!50!cyan] (\i-65:2) arc (\i-65:\i+60:2); \tikzset{shift={(\i:2)}, rotate=\i+180} \draw [->, very thick, orange] (0,0) -- (1,0) node [black, near end, anchor=\i+90] {$\vec a$}; \draw [->, very thick, green!50!black] (0,0) -- (0,-2) node [black, near end, anchor=\i+180] {$\vec v$}; \fill circle [radius=1/10]; } \end{tikzpicture} \end{document} ```
https://tex.stackexchange.com/users/158896
Drawing a Cylinder around an Arrow
true
Like this: Code: ``` \documentclass[border=0.2cm]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=2] \fill[draw=orange!50,fill=orange!50] (-3,-1) rectangle (0.5,1); \filldraw[fill=orange!20] (-3,0) ellipse (0.5 and 1); \fill[fill=orange!50] (.5,-1) arc(-90:90:.5 and 1); \draw[line width=5pt, red] (-4,0) -- (-2.5,0); \draw[-latex,line width=5pt, red] (1,0) -- (2,0); \end{tikzpicture} \end{document} ``` **ADD**: If You want someting like this: modify only the first line of picture envitonment: ``` \begin{tikzpicture}[scale=2,rotate=30] ```
2
https://tex.stackexchange.com/users/24644
687663
319,013
https://tex.stackexchange.com/questions/641076
5
For the string: `100K100-873` I am getting the following warning message in my emacs editor from `ChkTeX` check: `Wrong length of dash may have been used. [8]` How can I prevent this warning message? Could be related to [How to ignore "Wrong length of dash may have been used." inside \cite and \newcite](https://tex.stackexchange.com/q/350485/127048) but I am not drawing any line, it was just string in a text.
https://tex.stackexchange.com/users/127048
ChkTeX: Wrong length of dash may have been used
false
So, I found three ways of getting rid of the warning (all producing different outputs): `100K100$-$873` - for a minus symbol `100K100~-~73` - for space-dash-space `100K100{-}873` - for just a normal dash Probably the third is what you were aiming for... as it displays the same text as `100K100-873` ~ is the inline space symbol, which means "here should be one (and only one) space"
0
https://tex.stackexchange.com/users/298365
687676
319,018
https://tex.stackexchange.com/questions/387047
79
We have tons of nice TikZ-drawn pictures on this site. Among them some great pictures of animals like cfr's cat code. But they are distributed all over the site. As we definitely miss a place to collect them, this post asks about nice examples of animals/pets drawn with TikZ. Especially those pictures about **ducks** are welcome. For all of the duck friends, quack! Please do not close this question too early (I know it's a bit out-of-concept here, but there are other well-known showcases).
https://tex.stackexchange.com/users/124577
"The duck pond": showcase of TikZ-drawn animals/ducks
false
Some penguins from the [`tikzpingus`](https://www.ctan.org/pkg/tikzpingus) package, stolen straight from the documentation: ``` \documentclass{article} \usepackage{tikzpingus} \begin{document} \begin{tikzpicture} \pingu \pingu[% crown 2d=pingu@bronze, medal=pingu@purple, tie, eye patch left=teal, eye patch right=orange, right wing wave, sunglasses, glow thick=yellow, xshift=2.8cm ] \pingu[% cane left, right item flip, sign post right={Hi!}, monocle left, body=red, xshift=6cm ] \end{tikzpicture} \end{document} ```
3
https://tex.stackexchange.com/users/208544
687686
319,024
https://tex.stackexchange.com/questions/263122
4
I am using the following commands to have half-open interval in a real line: ``` \begin{tikzpicture}[scale=7] \draw[->, thick] (-0.1,0) -- (1.7,0); \foreach \x/\xtext in {0/8,0.2/$S_1$,0.4/$T_4$,0.6/$S_3$,0.8/$T_2$,1/$S_3$,1.2/14,1.4/$S_3$,1.6/16} \draw[thick] (\x,0.5pt) -- (\x,-0.5pt) node[below] {\xtext}; \draw (0.2,0.5pt) node[above] {$c$}; \draw[[-), ultra thick, blue] (0.2,.01) -- (.4,0.01); \draw[(-, ultra thick, green] (0.6,.02) -- (1,0.02); \end{tikzpicture} ``` Now, I need to have an open-close interval, but I am not able to have that close interval at the end, using the following command: ``` \begin{tikzpicture}[scale=7] \draw[->, thick] (-0.1,0) -- (1.7,0); \foreach \x/\xtext in {0/8,0.2/$S_1$,0.4/$T_4$,0.6/$S_3$,0.8/$T_2$,1/$S_3$,1.2/14,1.4/$S_3$,1.6/16} \draw[thick] (\x,0.5pt) -- (\x,-0.5pt) node[below] {\xtext}; \draw (0.2,0.5pt) node[above] {$c$}; \draw[(-], ultra thick, green] (0.6,.02) -- (1,0.02); \end{tikzpicture} ``` May I ask for anybody help?
https://tex.stackexchange.com/users/85421
How to draw open-close interval in LaTeX
false
sorry for my bad english, I'm from vzla, here one code that I use to my work with intervals: ``` \documentclass{article,11pt,letterpaper} \usepackage{tikz} \usetikzlibrary {arrows.meta} \usetikzlibrary {patterns,patterns.meta} \begin{document} \begin{tikzpicture} \begin{scope}[>=latex] \draw [line width=0.7pt][<->](-0.5,0)--(7,0); \end{scope} \draw [pattern={Lines[angle=45,distance={3pt/sqrt(2)}]},pattern color=blue,line width=0.6pt](4,0)--(4,0.5)--(5,0.5)--(5,0)--cycle; \draw [pattern={Lines[angle=135,distance={3pt/sqrt(2)}]},pattern color=red,line width=0.6pt](1,0)--(1,0.5)--(4.5,0.5)--(4.5,0)--cycle; \fill [color=black](4,0.5) circle (2.3pt); \fill [color=white,draw=black,line width=0.7pt] (5,0.5) circle (2.3pt); \fill [color=white,draw=black,line width=0.7pt] (1,0.5) circle (2.3pt); \fill [color=black] (4.5,0.5) circle (2.3pt); \draw [line width=0.7pt](0,-0.05)--(0,0.3); \pgftext[base,x=0cm,y=-0.3cm,] {\small $0$}; \pgftext[base,x=1cm,y=-0.3cm] {\small $1$}; \pgftext[base,x=4cm,y=-0.3cm] {\small $4$}; \pgftext[base,x=4.5cm,y=-0.3cm] {\small $4.5$}; \pgftext[base,x=5cm,y=-0.3cm] {\small $5$}; \end{tikzpicture} \end{document} ``` Here the result:
0
https://tex.stackexchange.com/users/298381
687698
319,027
https://tex.stackexchange.com/questions/687654
0
I am reading data for a supplementary info from different CSV files using the csvsimple package. To display things nicely, I have written my own csvstyle, as all the CSV files have the same format. For certain tables, the data is too long and requires multiple pages. This works easily by changing the csvstyle to use `long tabularray` instead of `tabularray`. A problem occurs now, when I want to add a caption to this long table: if I wrap the `\csvreader` and the `\caption` in e.g. `\begin{table}`, the table does not do any page breaks anymore; if I use e.g. `\begin{longtable}` instead of `\begin{table}`, compilation does not work anymore, each row gets another header row, and things like that, depending on the wrapper. What is the correct procedure to add a caption here? Below, a minimum reproducible example with the \begin{table}, that does not do page breaks. ``` \documentclass{article} \pagestyle{empty} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{blindtext} \usepackage[table,xcdraw,dvipsnames]{xcolor} \usepackage[labelfont={bf}, font=small, justification=justified]{caption} \usepackage[version=4]{mhchem} \usepackage{chemformula} \usepackage[separate-uncertainty = true, multi-part-units=single]{siunitx} \usepackage{sectsty} \usepackage{tabularx} \usepackage{listings} \usepackage{longtable} \usepackage{array} \usepackage{hhline} \usepackage{booktabs} % For including csv as tables \usepackage{tabularray} \UseTblrLibrary{siunitx} \usepackage{csvsimple-l3} \NewTableCommand\toprule{\hline[0.08em]} \NewTableCommand\midrule{\hline[0.05em]\vspace{1pt}} \NewTableCommand\bottomrule{\hline[0.08em]} \csvstyle{MyStyleLong}{ no head, before reading=\centering\sisetup{table-number-alignment=center,table-format=3.3,table-auto-round}, long tabularray={ colspec={c@{}S[table-format=3.4]S[table-format=1.2]l}, row{1} = {guard}, column{4} = {cmd=\ch} }, table head=\toprule\empty & m/z & {Relative Intensity} & Annotation \\\midrule, late after line=\\, late after first line=\\\hline\endhead, late after last line=, table foot=\bottomrule, late after line=\\, } \begin{filecontents*}[]{test-file-long.csv} mz, Intensity, annotation \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \\ 1.20, 56.01, CH3OH \\ 12.13, 1901.0, CH2OO- + H+\\ 1.20, 56.01, CH3OH \end{filecontents*} \begin{document} \blindtext % the first empty is for using S as first column \begin{table}[h] \caption{Test} \csvreader[MyStyleLong, filter expr={test{\ifnumgreater{\thecsvinputline}{1}}}]{test-file-long.csv}{}{\empty & \csvcoli & \csvcolii & \csvcoliii } \end{table} \end{document} ```
https://tex.stackexchange.com/users/164869
How to add a caption to a long tabularray table read by csvreader?
false
The `longtblr` environment provides the key `caption` as an option. As far as I saw, `csvsimple` does not provide any access to these options. However, one can redefine the template's default text in such a way: ``` \begin{document} \blindtext % the first empty is for using S as first column \DefTblrTemplate{caption-text}{default}{Test} \csvreader[MyStyleLong, filter expr={test{\ifnumgreater{\thecsvinputline}{1}}}]{test-file-long.csv}{}{\empty & \csvcoli & \csvcolii & \csvcoliii } \end{document} ```
0
https://tex.stackexchange.com/users/164869
687715
319,033
https://tex.stackexchange.com/questions/687714
2
There are two no operation functions in LaTeX3 called `\prg_do_nothing:` and `\scan_stop:`. What is the difference between them? Which one is preferable?
https://tex.stackexchange.com/users/241621
\prg_do_nothing: vs \scan_stop:
true
They do different things. The functions `\prg_do_nothing:` is expandable, and is documented as expanding to nothing at all. This means that for example ``` \tl_set:Nx \l_tmpa_tl { \prg_do_nothing: } \tl_if_empty:NTF \l_tmpa_tl ... ``` will take the `true` branch. On the other hand, `\scan_stop:` is not expandable, so the same setup ``` \tl_set:Nx \l_tmpa_tl { \scan_stop: } \tl_if_empty:NTF \l_tmpa_tl ... ``` takes the `false` branch. The `\scan_stop:` function also acts as a terminator for various low-level TeX constructs, which `\prg_do_nothing:` does not. Which you want depends on your use case. If you are working by expansion and need a marker that will 'disappear', `\prg_do_nothing:` is the right choice. If you need a marker that will *typeset* nothing but that will surive `x`/`e`-type expansion, you want `\scan_stop:`.
2
https://tex.stackexchange.com/users/73
687716
319,034
https://tex.stackexchange.com/questions/687695
1
I'm trying to write a command that wraps `\href` with a QR code to the given URL. For this I need to generate a temp file and reuse it later, so I wrote a `\mktemp` command that wraps the `mktemp` utility: ``` % Created 2023-06-03 Sat 13:05 % Intended LaTeX compiler: pdflatex \documentclass[11pt]{article} \usepackage{graphicx} \usepackage{hyperref} \usepackage{pdftexcmds} \newcommand{\mktemp}[0]{ \input|"mktemp" %% /tmp/tempfile.png } \newcommand{\hrefqr}[3][\mktemp]{ \immediate\write18{qrencode #2 -o #1} \href{#2}{#3 \includegraphics[]{#1}} } \begin{document} \hrefqr{www.example.com}{This is example.com} \end{document} ``` If I hard-code the \mktep filename, the document above compiles, but when I replace the hard-coded filename with `\input|"mktemp"`, I get a weird error: ``` This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (/home/ealfonso/git/keto/test.tex LaTeX2e <2020-10-01> patch level 4 L3 programming layer <2021-01-09> xparse <2020-03-03> (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2020/04/10 v1.4m Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo)) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def))) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty (/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) (/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty) (/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty (/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty)) (/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty) (/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) (/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty) (/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty) (/usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty) (/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty) (/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def) (/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty) (/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty) (/usr/share/texlive/texmf-dist/tex/latex/url/url.sty) (/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty (/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty)) (/usr/share/texlive/texmf-dist/tex/latex/base/atbegshi-ltx.sty)) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def (/usr/share/texlive/texmf-dist/tex/latex/base/atveryend-ltx.sty) (/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty (/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))) (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (./test.aux) (/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty (/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty) (/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty)) (./test.out) (./test.out) ! Use of \\hrefqr doesn't match its definition. \@ifnextchar ... \reserved@d =#1\def \reserved@a { #2}\def \reserved@b {#3}\f... l.20 \hrefqr{www.example.com}{This is example.com} ! ==> Fatal error occurred, no output PDF file produced! Transcript written on test.log. ``` I tried looking into the `test.log` but couldn't find any meaningful debug info. 1. What is the proper way to pipe the output of a command like `mktemp` into another command? 2. What is a good general way to debug obscure-looking latex compile errors? 3. I've seen [references](https://tex.stackexchange.com/questions/137111/how-to-actually-close-a-write-stream) to a `\tempfile` command, but I just get: `! Undefined control sequence. \mktemp -> \tempfile` when trying to use it. Where is this `\tempfile` command defined? I should note that I have modified my `textmf.cnf` to allow the commands `qrencode` and `mktemp`: ``` shell_escape_commands = \ bibtex,bibtex8,\ extractbb,\ gregorio,\ kpsewhich,\ makeindex,\ repstopdf,\ r-mpost,\ texosquery-jre8,\ qrencode,\ touch,\ mktemp,\ tr,\ mktemp-no-newline.sh,\ ```
https://tex.stackexchange.com/users/87864
Piping shell command output to another command
true
This seems to be a [XY problem](https://tex.meta.stackexchange.com/q/2449/277964) and you should have asked for making QR codes with LaTeX. There are [several packages for this](https://ctan.org/topic/qrcode). Here a short example using [package `qrcode`](https://ctan.org/pkg/qrcode): ``` \documentclass[11pt]{article} \usepackage{qrcode} \usepackage{hyperref} \begin{document} \qrcode*{This is example.com without link} \href{www.example.com}{\qrcode*{This is example.com}} \qrcode{www.example.com} \end{document} ```
1
https://tex.stackexchange.com/users/277964
687719
319,036
https://tex.stackexchange.com/questions/687705
0
We are aware that Microsoft Word has a feature called ink Equation that allows the user to write a formula with a light pen, even if the formula is complex, and then convert it into a real equation with an acceptable font. Obviously, this is an excellent option, since it is not necessary to use multiple commands to write a lengthy equation; instead, one can simply write the equation as seen. My query is: Is there a latex editor that includes this feature? If the answer is affirmative, which editor has this capability?
https://tex.stackexchange.com/users/94003
ink Equation in Latex
true
Ok, the request is for a primer in websearch. It's an `iterative process`: * you start somewhere * you refine your search * you select best solutions ### Potential shortcuts Whatch the right side under `Related`, showing links within this place. E.g. inspecting these lead you to either a solution or: new search terms. `Take notes` and watch the *Related* there, as well ... [What are the Open source WYSIWYG Independent Web Equation Editors available on LaTeX/MathML](https://tex.stackexchange.com/questions/5146/what-are-the-open-source-wysiwyg-independent-web-equation-editors-available-on-l?rq=1) [Visual Equation Editor to LaTeX Code](https://tex.stackexchange.com/questions/18155/visual-equation-editor-to-latex-code?rq=1) ### Iterations Start somewhere, e.g. using your title as search term: [ink Equation in Latex](https://www.google.com/search?q=ink%20Equation%20in%20Latex) . Almost the first entry leads me to [Mathpix](https://mathpix.com/equation-to-latex) , which probably is already what you are looking for. Check out the other links listed from this search term alone. ### Refinements * consult your notes, for synonyms, technical terms, nerdy slang etc. * same for the websites you followed by aboves links * use the search engines proposals as well, see screenshots * and of course try *alternative mathpix* and similar as serach term As is: Reduced/modified: If you are really nerdy: ### Verification TRY your findings in this sites search box as well, e.g. <https://tex.stackexchange.com/search?q=mathpix>, which leads to e.g. [Tikz tools like mathpix ?](https://tex.stackexchange.com/questions/501659/tikz-tools-like-mathpix) ### Using latest technology (with care) You can try AI, like so. This one seems to compile some own websearches into something presentable: ``` https://www.phind.com How to find what I want by a websearch? Answer | gpt-3.5 Model To find what you want by a web search, you can use filters to narrow down your results. Here are some tips to help you out: Use site or domain filters to search for results from a specific website or domain. Try filtering results based on where your search terms appear in the page, such as the title, text, or URL. Use SafeSearch to remove explicit results. Filter by file type to find specific formats like .pdf, .xls, or .ppt. Use usage rights to find pages that have license information attached to them. In addition, you can try using alternative search engines like SearX, which offers unbiased results from several sources and allows for customization and hosting on your own server. ```
2
https://tex.stackexchange.com/users/245790
687720
319,037
https://tex.stackexchange.com/questions/687710
3
I'm trying to store the text output of a shell command `mktemp` and reuse it later in another latex command. I'm attempting to do this using `\savebox` and `\usebox` as below. When using `\usebox` outside a command, the saved text is printed correctly. However, when used inside other commands like `\write18` and `\includegraphics`, the `\usebox` command appears to not be macroexpanded correctly: ``` \newcommand{\mktemp}[0]{ \input{|"mktemp"} } \newcommand{\hrefqr}[2]{% \tracingall \newsavebox{\tmp} \savebox{\tmp}{\mktemp} %% verify that \tmp is the same file and not repeated mktemp calls \usebox{\tmp} \\ \usebox{\tmp} \\ \immediate\write18{qrencode #1 -o \usebox{\tmp}} \href{#1}{#2 \includegraphics[]{\usebox{\tmp}}} } \begin{document} \hrefqr{www.example.com}{This is example.com} \end{document} ``` From the logs: ``` \write->qrencode www.example.com -o \usebox {\tmp } \usebox ->\protect \usebox \usebox #1->\leavevmode \copy #1\relax #1<-\tmp \leavevmode ->\unhbox \voidb@x runsystem(qrencode www.example.com -o \protect \unhbox \voidb@x \copy \tmp \rel ax )...executed safely (allowed). ``` And later: ``` ! LaTeX Error: File `\usebox {\tmp }' not found. ``` from the expansion of: ``` #1<-This is example.com \includegraphics []{\usebox {\tmp }} ``` What am I doing wrong?
https://tex.stackexchange.com/users/87864
usebox macro not expanded?
true
You can't store text in a box and retrieve it by macro expansion. When you do `\savebox{\tmp}{some text}` the argument is stored in the box register as *already typeset*. Here's a working implementation. I create a directory, rather than a file, and in it I create `temp.png`, otherwise `\includegraphics` wouldn't be able to determine its size. See <https://stackoverflow.com/a/59638023>. If your version of `mktemp` supports `-suffix`, you can use it, see later for details. ``` \documentclass{article} \usepackage{catchfile} \usepackage{graphicx} \usepackage{hyperref} \ExplSyntaxOn \NewDocumentCommand{\hrefqr}{mO{}m} { % get the name of a temporary file \sys_get_shell:nnN { mktemp ~ -d } { } \l_tmpa_tl \tl_trim_spaces:N \l_tmpa_tl % build the QRcode \sys_shell_now:x { qrencode ~ #1 ~ -o ~ \l_tmpa_tl/temp.png } % \href { #1 } { #3 ~ \includegraphics[#2]{ \l_tmpa_tl/temp.png } } } \ExplSyntaxOff \begin{document} \hrefqr{www.example.com}{This is example.com} \hrefqr{www.example.com}[scale=0.5]{This is example.com} \end{document} ``` On my system, `mktemp` doesn't support `--suffix`, but `gmktemp` (installed with Homebrew as part of `coreutils`) does. ``` \documentclass{article} \usepackage{catchfile} \usepackage{graphicx} \usepackage{hyperref} \ExplSyntaxOn \NewDocumentCommand{\hrefqr}{mO{}m} { % get the name of a temporary file \sys_get_shell:nnN { gmktemp ~ --suffix ~.png } { } \l_tmpa_tl \tl_trim_spaces:N \l_tmpa_tl % build the QRcode \sys_shell_now:x { qrencode ~ #1 ~ -o ~ \l_tmpa_tl } % \href { #1 } { #3 ~ \includegraphics[#2]{ \l_tmpa_tl } } } \ExplSyntaxOff \begin{document} \hrefqr{www.example.com}{This is example.com} \hrefqr{www.example.com}[scale=0.5]{This is example.com} \end{document} ```
6
https://tex.stackexchange.com/users/4427
687723
319,039
https://tex.stackexchange.com/questions/687467
0
I am currently trying to use the latest version of `ClassicThesis` (with `ArsClassica` style), but I have some problems with the look of some elements in the table of content. In the showcase example that is provided [on the home page of this package](https://bitbucket.org/amiede/classicthesis/wiki/Home), in the table of contents we can see that parts, chapters, appendix and bibliography are all uppercase, but if I compile that project, they will not be as such. How can I make them look like they appear in the example `.pdf`, i.e. uppercased? Here is an example that you can easily compile: ``` \documentclass[twoside, openright, titlepage, numbers = noenddot, headinclude, footinclude, cleardoublepage = empty, abstract = on, BCOR = 5mm, paper = a4, fontsize = 11pt]{scrreprt} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lipsum} \usepackage[eulerchapternumbers, eulermath, beramono, palatino, style = arsclassica]{classicthesis} \begin{document} \frenchspacing \raggedbottom \tableofcontents \chapter{I am a chapter} % This should be uppercase! \lipsum[1] \section{I am a section} \lipsum[1] \subsection{And I am a subsection} \lipsum[1] \end{document} ``` I downloaded and compiled the example project provided with `version 4.2` and everything looks as it should, but since I am not an expert in LaTex programming, I do not know how to force the same behavior in its latest version.
https://tex.stackexchange.com/users/298246
Chapters in ClassicThesis' table of content are not uppercase
true
Thanks to @user691586, I managed to fix the style of both chapters and bibliography with the following: ``` \newcommand{\tocFixedChapter}[1]{\chapter{\spacedlowsmallcaps{#1}}} \renewcommand{\tocEntry}[1]{\protect\numberline{}{\spacedlowsmallcaps{#1}}} ``` Now the result is also coherent with the `ArcClassica` package! This problem can be considered solved. Thanks!
2
https://tex.stackexchange.com/users/298246
687730
319,043
https://tex.stackexchange.com/questions/687731
0
I get this error: Missing character: There is no ⇒ (U+21D2) in font [lmmono12-regular]:! I use xelatex and the package unicode-math as suggested at [Entering Unicode characters in LaTeX](https://tex.stackexchange.com/questions/34604/entering-unicode-characters-in-latex) Should I install another font? I use Ubuntu 22.04 and texlive.
https://tex.stackexchange.com/users/27523
Unicode Rightarrow is missing from my font
true
If you have a monospace font with the character you do not need math at all. ``` \documentclass{article} \usepackage{fontspec} \setmonofont{Noto Sans Mono} \begin{document} \begin{verbatim} a ⇒ b → α \end{verbatim} \end{document} ``` (but `Noto Sans Mono` doesn't have the arrow either) so you can insert math: ``` \documentclass{article} \usepackage{unicode-math} \usepackage{newunicodechar} \newunicodechar{⇒}{\makebox[1em]{$⇒$}} \newunicodechar{α}{\makebox[1em]{$α$}} \begin{document} \begin{verbatim} a ⇒ b → α \end{verbatim} \end{document} ```
4
https://tex.stackexchange.com/users/1090
687734
319,045
https://tex.stackexchange.com/questions/687739
1
``` \documentclass{beamer} \mode<presentation> { \usetheme{default} \usecolortheme{default} \usefonttheme{default} \setbeamertemplate{navigation symbols}{} \setbeamertemplate{caption}[numbered] } \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tikz, amsmath, physics} \begin{document} \tikzstyle{na} = [baseline=-.5ex] \begin{frame} If truncated to the second order, the KM expansion becomes the \alert{Fokker-Planck (\textbf{FP}) equation} \begin{equation*} \uncover<2->{\alt<3->{\pdv{p_{1|1}}{t}=-\pdv{}{x}\bigg(\tikz[baseline]{ \node[fill=magenta!20,anchor=base] (u1) {$a_1(x,t)$};}\;p_{1|1}\bigg)+\frac{1}{2}\pdv[2]{}{x}\bigg(\tikz[baseline]{ \node[fill=blue!20,anchor=base] (u2) {$a_2(x,t)$};}\;p_{1|1}\bigg)}{\pdv{p_{1|1}}{t}=-\pdv{}{x}\bigg(a_1(x,t)\;p_{1|1}\bigg)+\frac{1}{2}\pdv[2]{}{x}\bigg(a_2(x,t)\;p_{1|1}\bigg)}} \end{equation*} \uncover<4->{ \begin{itemize}[<+-| alert@+>] \item[] {\textcolor{magenta}{drift} coefficient} \tikz[na] \node[coordinate] (l1) {}; \end{itemize} \begin{flushright} \begin{itemize}[<+-| alert@+>] \item[] {\alert{diffusion} coefficient} \tikz[na] \node[coordinate] (l2) {}; \end{itemize} \end{flushright} \begin{tikzpicture}[overlay] \path[->] (l1) edge [bend right] (u1); \path[->] (l2) edge [bend right] (u2); \end{tikzpicture} } \end{frame} \end{document} ``` Essentially, I would like to connect the arrows `(l1)` and `(l2)` to the nodes `(n1)` and `(n2)` of an equation, but it doesn't recognize them because they're out of scope. I tried to modify the code, but I'm just making things worse...
https://tex.stackexchange.com/users/232851
A problem with equation nodes in beamer
true
* if you want to use nodes from other tikzpictures, you should use the `remember picture` option * you must not draw your arrow on overlays on which you don't define the nodes. If you use `\alt`, `\uncover` etc to only define the nodes on some of your overlays, you must not draw your arrows on the other overlays. * instead of repeating your equation multiple times with and without the boxes, use the `overlay-beamer-styles` library to define on which overlays the fill colour shall be visible * I suggest to have a look at the `tikzmarks` library. This way you wouldn't have to reinvent the wheel * a lot of the packages you load are unnecessary. You should clean up your preamble and only load the package which you need for your presentation. --- ``` \documentclass{beamer} \mode<presentation> { % \usetheme{default} % \usecolortheme{default} % \usefonttheme{default} \setbeamertemplate{navigation symbols}{} \setbeamertemplate{caption}[numbered] } \usepackage[english]{babel} %\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tikz, %amsmath, physics} \tikzset{na/.style={baseline=-.5ex}} \usetikzlibrary{overlay-beamer-styles} \begin{document} \begin{frame}[t] If truncated to the second order, the KM expansion becomes the \alert{Fokker-Planck (\textbf{FP}) equation} \begin{equation*} \uncover<2->{\pdv{p_{1|1}}{t}=-\pdv{}{x}\bigg(\tikz[baseline,remember picture]{ \node[fill=magenta!20,anchor=base,fill on=<3->] (u1) {$a_1(x,t)$};}\;p_{1|1}\bigg)+\frac{1}{2}\pdv[2]{}{x}\bigg(\tikz[baseline,remember picture]{ \node[fill=blue!20,anchor=base,fill on=<3->] (u2) {$a_2(x,t)$};}\;p_{1|1}\bigg)} \end{equation*} \uncover<4->{ \begin{itemize}[<+-| alert@+>] \item[] {\textcolor{magenta}{drift} coefficient} \tikz[na,remember picture] \node[coordinate] (l1) {}; \end{itemize} % \begin{flushright} \begin{itemize}[<+-| alert@+>] \item[] {\alert{diffusion} coefficient} \tikz[na,remember picture] \node[coordinate] (l2) {}; \end{itemize} % \end{flushright} \begin{onlyenv}<4-> \begin{tikzpicture}[overlay,remember picture] \path[->] (l1) edge [bend right] (u1); \path[->] (l2) edge [bend right] (u2); \end{tikzpicture} \end{onlyenv} } \end{frame} \end{document} ```
1
https://tex.stackexchange.com/users/36296
687740
319,047
https://tex.stackexchange.com/questions/687735
0
I am about to write a 'PhD by publication'-type dissertation, which essentialy will have the following format: 1. Title page, abstracts, ToC, etc. 2. List of my 'main' publications (the ones on which the dissertation is based) 3. List of my other publications 4. Main description of the work 5. Bibliography (list of references by other authors) Splitbib allows me to have three categories with different labels, which is exactly what I need, but my question is, how can I print these categories separately? I still want to cite all of them in point 4.
https://tex.stackexchange.com/users/150358
Printing only specific bibliography categories
false
You could use keywords. First you assign each entry a keyword, with the syntax e.g. ``` @book { firstbook, title = {Title of Book in Group 1}, author = {Name Surname}, keywords = {firstgroup} } ``` Then you print the bibliography of each group, e.g. ``` \printbibliography[keyword=firstgroup,title={My First Group}] \printbibliography[keyword=secondgroup,title={My Second Group}] ``` And you can issue another `\printbibliography` without options to print the whole bibliography. See `biblatex` documentation for further details
0
https://tex.stackexchange.com/users/233251
687741
319,048
https://tex.stackexchange.com/questions/687282
1
I have the following box, but I want to change a bit the margins from all the sides. Is it possible to set custom margins (i.e., control where the text starts and ends)? Also I want to move the subtitles a bit to the left. Note that the text should start before the subtitles, as currently start of text and subtitles are aligned. ``` \usepackage{lipsum} \usepackage[most]{tcolorbox} \usepackage{tikz} \newtcolorbox{openningbox}[2]{ colback = white, colframe = black, before upper = \tcbsubtitle{\tikz{\node[draw=black,fill=white,line width=1pt,rounded corners=3.5pt,font=\bfseries\color{black}]{\rule[-.3\baselineskip]{0pt}{\baselineskip}\normalsize\sffamily\bfseries\normalfont ~~\textbf{Experiment} #1~~};}}, before lower = \tcbsubtitle{\tikz{\node[draw=black,fill=white,line width=1pt,rounded corners=3.5pt,font=\bfseries\color{black}]{\rule[-.3\baselineskip]{0pt}{\baselineskip}\normalsize\sffamily\bfseries\normalfont ~~\textbf{Experiment} #2~~};}}, subtitle style = { enhanced, interior hidden, frame hidden, top=-0.8cm }, boxrule=1pt, arc=2.5pt, sidebyside, sidebyside align = top, enhanced, segmentation style = {solid,line width=1pt} } \begin{document} \begin{openningbox}{Real}{Ideal} \lipsum*[1] \tcblower \lipsum*[2] \end{openningbox} \end{document} ```
https://tex.stackexchange.com/users/25588
How to change margins in tcolorbox?
true
This is an alternative definition of OP's `openningbox`. Main changes are: * Title and subtitle are replaced with an `attach boxed title to top` and a `\node` added through an `overlay` option. We could also use two overlay options to be sure that geometry of title is the same. * Text margins are adjusted with `left` and `right` parameters. Inner gap between side by side paragraphs is fixed with `sidebyside gap`. * `sidebyside align=top` works with the help of `yshift*` option in boxed title. * segmentation rule can be shortened with `shorten` options in its style. The code is: ``` \documentclass{article} \usepackage{lipsum} \usepackage[most]{tcolorbox} \usepackage{tikz} \newtcolorbox{openningbox}[2]{ enhanced, colback = white, colframe = black, title = {\textbf{Experiment}~#1~~}, coltitle=black, boxed title style={colframe=black, colback=white}, attach boxed title to top left={yshift*=-\tcboxedtitleheight/2, xshift=5mm}, overlay={\node[rounded corners=2.5pt, line width=1pt, draw, anchor=west, fill=white, inner xsep=3mm, inner ysep=1.25mm] at ([xshift=5mm]segmentation.north) {\textbf{Experiment}~#2~~};}, boxrule=1pt, boxsep=0pt, left=2mm, right=2mm, sidebyside gap=4mm, arc=2.5pt, sidebyside, sidebyside align = top, enhanced, segmentation style = {solid,line width=1pt, shorten >=1cm, shorten <=1cm} } \begin{document} \begin{openningbox}{Real}{Ideal} \lipsum*[1] \tcblower \lipsum*[2] \end{openningbox} \end{document} ```
2
https://tex.stackexchange.com/users/1952
687744
319,049
https://tex.stackexchange.com/questions/7453
390
I see that the code in many packages and examples contains percent signs `%` at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?
https://tex.stackexchange.com/users/1371
What is the use of percent signs (%) at the end of lines? (Why is my macro creating extra space?)
false
The question of the use of the symbol `%` is dealt with in numerous TeX.SE questions (see a non-exhaustive list at the end), so **this answer aims to make a summary of the practical recommendations concerning the use of the percent symbol**. Outline ======= 1. How `TeX` "deals with spaces"? 2. Practical recommendations concerning the use of the percent symbol 3. Related posts 4. Other resources 1. How `TeX` "deals with spaces"? ================================= The rules applied to spaces (except inside `verbatim`/`math` mode or when `\obeyspaces` is in effect) are listed in this [Martin Scharrer's answer](https://tex.stackexchange.com/a/34847/262081). For deeper explanations and "traps" regarding how `TeX` "deals with spaces": * [Mico's answer](https://tex.stackexchange.com/a/566580) (for beginners this answer is quite complete, very pedagogical and plenty of practical examples). * [TH.'s answer here](https://tex.stackexchange.com/a/7459/262081). * [egreg's answer](https://tex.stackexchange.com/a/74541/262081) (introducing also the three TeX *modes*: horizontal, vertical or math). * [another egreg's answer](https://tex.stackexchange.com/a/19955/262081) introducing the use of `\relax`, `\ignorespaces` and also the issues related to spaces after a constant number (and much more!). * [This blog](https://texhacks.blogspot.com/2009/10/spaces-in-tex.html) introducing the different *states* of TeX when reading input. * Chapter 8 of *The TeXbook*. 2. Practical recommendations concerning the use of the percent symbol ===================================================================== 1. Use a `%` when you want `TeX` "[to exclude everything that's on the remainder of the current input line from further processing](https://tex.stackexchange.com/a/566580)" (including the "invisible" end-of-line character), useful for writing a comment for e.g. 2. **No need to use `%` sign in preamble** (except in macro definition, see below). So NO need of `%` after the closing `}` of a macro definition. 3. **No need to use `%` sign between two consecutive undelimited arguments** ([details here](https://tex.stackexchange.com/a/19955/262081)): Then `\parbox {3cm} {text}` is equivalent to ``` \parbox {3cm} {text} ``` 4. In macro definition [[details here](https://tex.stackexchange.com/a/74541/262081)]: **A `%` will prevent from possible extra spaces** before AND after the word `bar` in the following example (unless the macro is used in math mode): ``` \newcommand{\foo}{% bar% } ``` Which is equivalent to `\newcommand{\foo}{bar}` **OR**: ``` \newcommand{\foo}{% bar} ``` But it is not optimal because in some cases (depending on the context at the macro "call"), there will be no spurious spaces "added" before and/or after the word `bar` in the output, then the `%` signs will be unnecessary (but not problematic). *So, if you really wants to optimise/minimise the use of the `%` sign in your macro definition, then take a look at this [egreg's answer](https://tex.stackexchange.com/a/74541/262081) and see also [ShreevatsaR's answer](https://tex.stackexchange.com/a/420561/262081) for good practice regarding macro writing.* 5. **Never put a `%` sign just after a constant number** but always PUT a space or a new line or a `\relax` instead (for e.g. - hereafter the `_` symbol stands as a space character - do `\ifnum\mycounter<13_` or `\mycount=123_` or `\mycount=123\relax` but NOT `\mycount=123%`), [details here](https://tex.stackexchange.com/a/19955/262081) and [here](https://tex.stackexchange.com/a/107697). * *About the use of `\relax` (especially in "incomplete glue assignment") an possible issues see [this answer](https://tex.stackexchange.com/a/19955/262081) and also [this one](https://tex.stackexchange.com/a/420531/262081).* 6. **Put a `%` between two consecutives `\end{subfigure}` and `\begin{subfigure}`** or `\end{minipage}` and `\begin{minipage}` if you want to avoid undesired space (which could induce non aligned `subfigure` or `minipage`, e.g. and detailed explanation [here](https://tex.stackexchange.com/a/407620/262081)) BUT an `\hfill` will do the trick (even "better/cleaner") also ([see here](https://tex.stackexchange.com/a/605499/262081)). 7. **No need to put a `%`** after a control sequence (e.g. `\foo`) because the space is already ignored. 8. **In LaTeX3 syntax**, spaces are ignored in macro definition unless you explicitly specify the space with a `~` character (see [Leo Liu's answer](https://tex.stackexchange.com/a/19927/262081)). 3. Related posts ================ *Legend : date in mm/dd/yyyy format.* | # | Question | Answer/comment | Insight | | --- | --- | --- | --- | | 1 | [Where are the necessary places to be appended with % to remove unwanted spaces? [duplicate]](https://tex.stackexchange.com/q/19922/262081) 06/05/2011 | [Leo Liu's answer](https://tex.stackexchange.com/a/19927/262081) | Overview of different way to "deal" with space in macro def | | 2 | // | [egreg's answer](https://tex.stackexchange.com/a/19955/262081) (cited in §1) | Introducing the use of `\relax`, `\ignorespaces` and also the use of spaces after a constant number and undelimited arguments | | 3 | [Tex Capacity Exceeded (if remove % after use of macro)](https://tex.stackexchange.com/q/20577/262081) 06/13/2011 | [Ryan Reich's answer](https://tex.stackexchange.com/a/20579/262081) | Illustrative problem with spurious spaces into `foreach` loop, main rules applied to spaces presented + some maro definition examples | | 4 | [When is it harmful to add percent character at end of lines in a \newcommand, or similar](https://tex.stackexchange.com/q/34844/262081) 11/14/2011 | [egreg's answer](https://tex.stackexchange.com/a/74541/262081) (cited in §1) | Introducing the three TeX *modes* (horizontal, vertical or math) and related effect on space tokenization, the use of spaces after a constant number and exercises | | 5 | // | [Martin Scharrer's answer](https://tex.stackexchange.com/a/34847/262081) (cited in §1) | Listing the rules applied to spaces | | 7 | [Why the end-of-line % in macro definitions? [duplicate]](https://tex.stackexchange.com/q/40946/262081) 01/13/2012 | [Martin Scharrer's answer](https://tex.stackexchange.com/a/40948/262081) | Differentiating macro with and without argument and the use of braces `{}` AND notice that the "(La)TeX rules can be dynamically changed" | | 8 | [Unwanted spaces [duplicate]](https://tex.stackexchange.com/q/52337/262081) - 04/18/2012 | [egreg's answer](https://tex.stackexchange.com/a/52341/262081) | Spurious spaces caused by missing `%` in macro def | | 9 | [Do assignments need to be appended by % to remove the trailing white spaces?](https://tex.stackexchange.com/q/107650) 04/09/2013 | [egreg's answer](https://tex.stackexchange.com/a/107697) (cited in §2) | Focus on the use of `%` sign after register, parameter, constant number, and focus on `\relax` | | 10 | // | [Ryan Reich's answer](https://tex.stackexchange.com/a/107697) | Explanation of how `TeX` scan "a dimension" or "a register" | | 11 | // | [Joseph Wright's answer](https://tex.stackexchange.com/a/40950/262081) | A bit of details about tokenization of macros | | 12 | [Does the comment symbol % remove the carriage return at the end of the line?](https://tex.stackexchange.com/q/278146) | [egreg's answer](https://tex.stackexchange.com/a/278150) (cited in §2) | Description of the tokenization process and examples where `%` after a control sequence can be harmful. | | 13 | [Unwanted spaces in user defined structures and the uses of % [duplicate]](https://tex.stackexchange.com/q/420481/262081) 03/16/2018 | [Steven B. Segletes' answer](https://tex.stackexchange.com/a/420531/262081) | Details about the use of `\relax` after constant number and possible issues AND "indentation and vertical mode" AND "brackets `[ ]` and Optional Arguments" | | 14 | // | [ShreevatsaR's answer](https://tex.stackexchange.com/a/420561/262081) | Good practice regarding macro writing in order to avoid spurious spaces | | 15 | [How to compare number from \newenvironment argument](https://tex.stackexchange.com/q/460011) 11/14/2018 | [Phelype Oleinik's answer](https://tex.stackexchange.com/a/460014) | Practical example on the usage of `%` and `ifnum` | | 16 | [(La)TeX -- What does the '%' character do? [duplicate]](https://tex.stackexchange.com/q/566578) 10/13/2020 | [Mico's answer](https://tex.stackexchange.com/a/566580) (cited in §1) | Interesting answer for beginners: presentations of the main rules regarding spaces, `%` usage in macro and after constant number, illustrate by practical examples | 4. Other resources ================== | # | Resource | Remark | Source | | --- | --- | --- | --- | | 1 | The TeXbook, Chapter 20 | "For general knowledge of macro definitions" | [Yan Zhou's answer](https://tex.stackexchange.com/a/19988/262081) | | 2 | TeX by Topic "distributed with TeXLive" | "Good introduction to how TeX read in your input" | [Yan Zhou's answer](https://tex.stackexchange.com/a/19988/262081) | | 3 | [egreg's article](https://tug.org/TUGboat/tb36-2/tb113gregorio.pdf), "Recollections of a spurious space catcher", TUGboat, Volume 36 (2015), No. 2), p.149-161 | | [ShreevatsaR's answer](https://tex.stackexchange.com/a/420561/262081) | | 4 | [egreg's video](https://www.youtube.com/watch?v=jGAiF2LBLuY), "Recollections of a spurious space catcher" | | [ShreevatsaR's answer](https://tex.stackexchange.com/a/420561/262081) |
2
https://tex.stackexchange.com/users/262081
687749
319,051
https://tex.stackexchange.com/questions/687748
1
I'm working on creating tables that are both informative and aesthetically pleasing and can't get Latex to allow me to change the text font to \textit within an tabular and also it doesn't allow me to add color as well. Does anyone know how to do that? The code I've used is shown below: ``` \begin{longtable}{|p{2cm}|p{6cm}|p{6cm}|} \hline \multicolumn{3}{|l|}{\begin{tabular}[c]{@{}l@{}} \rowcolor{iceberg} \textit{ How do the companies that sell information systems guide their clients to use this information and knowledge of client behavior?} \end{tabular}} \\ \hline Case firms & \textbf{A1} & \textbf{A2} ```
https://tex.stackexchange.com/users/297655
How to I add \textit into a table and color to different parts of my table?
false
I don't know how the "iceberg" color is defined. In the code below, I load the `xcolor` package with the option `svgnames` in order to access a prefefined color labelled "Linen". I suggest using the `p` column type, which allows automatic line breaking, for the combination of the three underlying columns. Since there's nothing in the code that's specific to the `longtable` environment, I've chosen to employ a basic `tabular` environment. ``` \documentclass{article} % or some other suitable document class \usepackage{array} % for \extrarowheight macro \setlength\extrarowheight{2pt} % for a less-cramped "look" \usepackage[svgnames]{xcolor} % for "Linen" color \usepackage{colortbl} % for \rowcolor macro \begin{document} \begin{tabular}{|p{2cm}|p{6cm}|p{6cm}|} % sum of usable widths: 14cm \hline \rowcolor{Linen} \multicolumn{3}{|p{\dimexpr14cm+4\tabcolsep+2\arrayrulewidth\relax}|}{% \textit{How do the companies that sell information systems guide their clients to use this information and knowledge of client behavior?}} \\ \hline Case firms & \textbf{A1} & \textbf{A2} \\ \hline \end{tabular} \end{document} ``` Observe the use of (a) a `\rowcolor` statement *before* `\multicolumn` and (b) `\textit` *inside* the third argument of `\multicolumn`.
0
https://tex.stackexchange.com/users/5001
687752
319,052
https://tex.stackexchange.com/questions/687424
0
With the bibliography style IEEEtran.bst, bibtex produces a lot of messages starting with ``` The format string "{f. ̃}{vv ̃}{ll}{, jj}" has an illegal brace-level-1 letter ``` For example having in the bibtex file: ``` @inproceedings{cn18, author = {Smith, John} } ``` What does it mean?
https://tex.stackexchange.com/users/8639
Issue`The format string "{f. ̃}{vv ̃}{ll}{, jj}" has an illegal brace-level-1 letter` with IEEEtran
true
I was using `@IEEEtranBSTCTL` inside the bib file, with an entry `CTLname_format_string = "{f. ̃}{vv ̃}{ll}{, jj}",`, where the tildes were the wrong ones (see first comment by @moewe to the question), probably after copying it from some pdf file (maybe the one of IEEEtran documentation). Solution was replacing combining tildes `̃` by tildes `~`.
1
https://tex.stackexchange.com/users/8639
687761
319,057
https://tex.stackexchange.com/questions/687762
2
I'm currently using gb4e package for my glossed examples. Their translations are sometimes quite long (more than one line). Since the paragraphs before and after have been defined \linespread{1.5}, so the paragraphs of the example translation also have the same spacing. Is there anyway to change the spacing of the translations (globally, since all long examples have the same issues)? ``` \documentclass[12pt]{article} \usepackage{gb4e} \noautomath \linespread{1.5} \usepackage{enumitem} \usepackage[utf8]{inputenc} \usepackage[a4paper,margin=1in]{geometry} \begin{document} \begin{exe} \ex ``Who should I talk to if I want to get a recommendation letter?'' \begin{xlist} \ex \gll Cong yiyue dao liuyue, dou shi Wang laoshi fuze xie tuijianxin. Qiyue dao shi'eryue shi cai laoshi fuze xie tuijianxin.\\ from Janarary until June all {\small{COP}} Wang teacher in.charge.of write recommendation.letter July until December {\small{COP}} Cai teacher in.charge.of write recommendation.letter\\ `From Janarary until June teacher Wang is in charge of writing recommendation letter. On July until December, teacher Cai is in charge of writing recommendation letter. ' \end{xlist} \end{exe} \end{document} ``` In other words, for these two sentences,`From Janarary until June teacher Wang is in charge of writing recommendation letter. On July until December, teacher Cai is in charge of writing recommendation letter,' I hope to have same line spacing as the first two glossed line. Thank you!!
https://tex.stackexchange.com/users/191734
Change the line spacing inside the long free translation (gb4e)
true
Generally if you want to change the document line spacing it's better to use the `setspace` package do do so. This will give you commands that can be used inside environments to go back to singlespacing when needed. Also, the free translation in `gb4e` should be introduced with `\glt` (or `\trans`). ``` \documentclass[12pt]{article} \usepackage{gb4e} \noautomath \usepackage{setspace} \doublespacing \usepackage{enumitem} \usepackage[utf8]{inputenc} \usepackage[a4paper,margin=1in]{geometry} \begin{document} \begin{exe} \ex ``Who should I talk to if I want to get a recommendation letter?'' \begin{xlist} \ex \gll Cong yiyue dao liuyue, dou shi Wang laoshi fuze xie tuijianxin. Qiyue dao shi'eryue shi cai laoshi fuze xie tuijianxin.\\ from Janarary until June all {\small{COP}} Wang teacher in.charge.of write recommendation.letter July until December {\small{COP}} Cai teacher in.charge.of write recommendation.letter\\ \glt\singlespacing`From Janarary until June teacher Wang is in charge of writing recommendation letter. On July until December, teacher Cai is in charge of writing recommendation letter. ' \end{xlist} \end{exe} \end{document} ```
1
https://tex.stackexchange.com/users/2693
687768
319,059
https://tex.stackexchange.com/questions/7453
390
I see that the code in many packages and examples contains percent signs `%` at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?
https://tex.stackexchange.com/users/1371
What is the use of percent signs (%) at the end of lines? (Why is my macro creating extra space?)
false
**When `%` is *not* the answer** ================================ 1. In the middle of a control sequence. \ta% u will not be reconstituted into `\tau`. A control sequence must be input as an unbroken unit. 2. After a number or <dimen> that is being used in an assignment. TeX will continue reading until the next token is definitely not numeric, or in the case of a <dimen> not `plus` or `minus`. Use `\relax` instead. These exceptions are already covered, but "buried", so a more prominent reminder is warranted. Another possibility, not as easily identified and often not mentioned in user documentation, is insertion of "padding" by a package, as in this example. ``` \documentclass{article} \usepackage{tcolorbox} \newcommand{\pink}[1]{\colorbox{red!20}{#1}} \newcommand{\Pink}[1]{{\fboxsep=0pt\colorbox{red!20}{#1}}} \begin{document} compress \par com\pink{p}ress \par com\Pink{p}ress \end{document} ``` This isn't usual, but action by a package should be considered when more likely possibilities fail to cure the problem.
5
https://tex.stackexchange.com/users/579
687769
319,060
https://tex.stackexchange.com/questions/510
393
Along the lines of [Why is \[ ... \] preferable to $$ ... $$?](https://tex.stackexchange.com/questions/503/why-are-and-preferable-to), what reasons are there (if any) to favor `\( ... \)` over `$ ... $`?
https://tex.stackexchange.com/users/206
Are \( and \) preferable to dollar signs for math mode?
false
The error reporting, the number of keystrokes, and the hooks into `\(…\)` have already been mentioned in other answers, so let us speak about highlighting. The default highlighting in emacs works somewhat differently for `$…$` and `\(…\)` in the scope of `\emph{…}`: The difference in highlighting is not only a question of taste (similar to the question of whether you like a BMW or a Mercedes more) but also important due to <https://tex.stackexchange.com/a/59195>. Apart from these details, there's not too much of a difference for a human typesetter. Personally, I switched from `$…$` to `\(…\)` a few years ago and probably make less errors since then (though I got more proficient, I tend to think that the increased quality is also due to this switching).
0
https://tex.stackexchange.com/users/292998
687772
319,062
https://tex.stackexchange.com/questions/687773
1
I've seen nowhere an option to split a `longtblr` into several beamer frames, does this feature exists ? If not, is there a mean to perform this ? Here is a MWE : ``` \documentclass{beamer} \usepackage{tabularray} \UseTblrLibrary{counter} %% added this line \NewTblrTheme{fancy}{ \SetTblrStyle{firsthead}{font=\bfseries} \SetTblrStyle{firstfoot}{fg=blue2} \SetTblrStyle{middlefoot}{\itshape} \SetTblrStyle{caption-tag}{red2} } \begin{document} \begin{frame}{Title} \begin{longtblr}[ theme = fancy, caption = {A Long Long Long Long Long Long Long Table}, entry = {Short Caption}, label = {tblr:test}, note{a} = {It is the first footnote.}, note{$\dag$} = {It is the second long long long long long long footnote.}, remark{Note} = {Some general note. Some general note. Some general note.}, remark{Source} = {Made up by myself. Made up by myself. Made up by myself.}, ]{ colspec = {XXX}, width = 0.85\linewidth, rowhead = 2, rowfoot = 1, row{odd} = {gray9}, row{even} = {brown9}, row{1-2} = {purple7}, row{Z} = {blue7}, } \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Alpha & Beta & Gamma \\ \hline Epsilon & Zeta & Eta \\ \hline Iota & Kappa & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Foot & Foot & Foot \\ \hline \end{longtblr} \frametitle{TEST} \end{frame} \end{document} ```
https://tex.stackexchange.com/users/28926
Splitting longtblr across beamer frames
false
You can manually split the table using `\pagebreak`: ``` \documentclass{beamer} \usepackage{tabularray} \UseTblrLibrary{counter} %% added this line \NewTblrTheme{fancy}{ \SetTblrStyle{firsthead}{font=\bfseries} \SetTblrStyle{firstfoot}{fg=blue2} \SetTblrStyle{middlefoot}{\itshape} \SetTblrStyle{caption-tag}{red2} } \begin{document} \begin{frame}[allowframebreaks]{Title} \begin{longtblr}[ theme = fancy, caption = {A Long Long Long Long Long Long Long Table}, entry = {Short Caption}, label = {tblr:test}, note{a} = {It is the first footnote.}, note{$\dag$} = {It is the second long long long long long long footnote.}, remark{Note} = {Some general note. Some general note. Some general note.}, remark{Source} = {Made up by myself. Made up by myself. Made up by myself.}, ]{ colspec = {XXX}, width = 0.85\linewidth, rowhead = 2, rowfoot = 1, row{odd} = {gray9}, row{even} = {brown9}, row{1-2} = {purple7}, row{Z} = {blue7}, } \hline Head & Head & Head \\ \hline Head & Head & Head \\ \hline Alpha & Beta & Gamma\\ \hline Epsilon & Zeta\TblrNote{a} & Eta \\ \hline Iota & Kappa\TblrNote{$\dag$} & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Alpha & Beta & Gamma \\\pagebreak \hline Epsilon & Zeta & Eta \\ \hline Iota & Kappa & Lambda \\ \hline Nu & Xi & Omicron \\ \hline Rho & Sigma & Tau \\ \hline Phi & Chi & Psi \\ \hline Foot & Foot & Foot \\ \hline \end{longtblr} \frametitle{TEST} \end{frame} \end{document} ```
2
https://tex.stackexchange.com/users/36296
687774
319,063
https://tex.stackexchange.com/questions/687782
4
I have a comma-separated list of information provided by the author as a preamble to my document. I then want to use this list and I'd like to put one item from my list per line. My idea was simply to replace commas with line breaks. But when I put formatting on my elements, it doesn't work. I'd like the author to be able to put in as much formatting as he likes (or references in the glossary) without there being any problems. **MWE :** ``` \documentclass{article} \usepackage{xstring} \begin{document} % In my case, the first argument is a command in the reality \StrSubstitute{Test, Test2, Test3}{,}{\newline} % OK \StrSubstitute{Test, \textit{Test2}, Test3}{,}{\newline} % NOK \end{document} ```
https://tex.stackexchange.com/users/296799
Comma separated list replacement
false
Here is with old LaTeX: ``` \documentclass{article} \makeatletter \newcommand\commatonewline[1]{% \@for\user@tmp:=#1\do{\user@tmp\newline}% } \makeatother \begin{document} indentation is normal at start of paragraph % In my case, the first argument is a command in the reality \commatonewline{Test, Test2, Test3} % OK \commatonewline{Test, \textit{Test2}, Test3} % OK, too \end{document} ``` Other answers will tell you with modern LaTeX (or with homemade loops which may have advantages compared to the old LaTeX2e ones).
6
https://tex.stackexchange.com/users/293669
687783
319,067
https://tex.stackexchange.com/questions/687782
4
I have a comma-separated list of information provided by the author as a preamble to my document. I then want to use this list and I'd like to put one item from my list per line. My idea was simply to replace commas with line breaks. But when I put formatting on my elements, it doesn't work. I'd like the author to be able to put in as much formatting as he likes (or references in the glossary) without there being any problems. **MWE :** ``` \documentclass{article} \usepackage{xstring} \begin{document} % In my case, the first argument is a command in the reality \StrSubstitute{Test, Test2, Test3}{,}{\newline} % OK \StrSubstitute{Test, \textit{Test2}, Test3}{,}{\newline} % NOK \end{document} ```
https://tex.stackexchange.com/users/296799
Comma separated list replacement
false
You don't want to expand formatting commands before printing. For example `\edef\test{\textit{Test2}}` will crash, but `\edef\test{\noexpand\textit{Test2}}` will run. But with xstring, you need to delay the expansion until it is through. ``` \documentclass{article} \usepackage{xstring} \begin{document} \let\foo=\relax% not expandable \StrSubstitute{Test, \foo{Test2}, Test3}{,}{\newline}[\test]% \let\foo=\textit% now expandable \test \end{document} ```
3
https://tex.stackexchange.com/users/34505
687787
319,069
https://tex.stackexchange.com/questions/86976
6
I am trying to define only the non-zeros elements in a sparse matrix, thus using some `\vdots` where the entries are zeros and specifying the row when needed (using the `blockarray` command, with `\usepackage{blkarray}` in the preamble). My matrix only has 2 columns (or 4), so I can't center the `\vdots` like I would like (the problem would be solved if the matrix had an odd number of columns). Here's an exemple: ``` $\begin{blockarray}{ccc} \begin{block}{[cc]l} \vdots \\ a & b & /K-1 \\ c & d & /K \\ \vdots \\ \end{block} \end{blockarray}$ ``` As you can see in this example, while I specified to center the entries inbetween `[` and `]`, the `\vdots` are centered on the first column. If I replace `cc` by any combination of `r`, `c`, and `l` it is still not satisfying. Also if I put the `\vdots` between any number of `&` on the right and/or on the left it still doesn't work. The other solution I have (but not satisfactory either) is to add another column: ``` $\begin{blockarray}{cccc} \begin{block}{[ccc]l} &\vdots& \\ a & & b & /K-1 \\ c & & d & /K \\ &\vdots& \\ \end{block} \end{blockarray}$ ``` But as you can see now the non-zeros entries are too far apart and the result is not really pretty. Thank you for your time and your help.
https://tex.stackexchange.com/users/23300
Centering \vdots in a sparse matrix with an even number of rows
false
With `{bNiceArray}` of `nicematrix`. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \renewcommand{\arraystretch}{1.4} $\begin{bNiceArray}{c:c}[last-col] \\ \Block{2-2}{} % prevent the vertical dotted rule in the \Block a & b & / K -1 \\ c & d & / K \\ \\ \end{bNiceArray}$ \end{document} ```
2
https://tex.stackexchange.com/users/163000
687795
319,073
https://tex.stackexchange.com/questions/46722
6
I would like to create a matrix with rows and columns being labeled. I would like the matrix elements to be right aligned, the row labels being displayed to the right of the matrix, and the column labels above the matrix. I tried: ``` \documentclass{article} \usepackage[T1]{fontenc} \usepackage[american,ngerman]{babel} \begin{document} % does work: $\bordermatrix{% & 1 & 2 \cr 1 & x1 & x2 \cr 2 & x3 & x423 \cr 3 & x5 & x6 }$ % does not work (see error below): % $\bordermatrix*{% % x1&x2&1\cr % x3&x4&2\cr % x5&x6&3\cr % 1&2 6 }$ \end{document} % ERROR: Misplaced alignment tab character &. % --- TeX said --- % l.17 x1& % x2&1\cr % --- HELP --- % The special character &, which should be used only to separate items % in an array or tabular environment, appeared in ordinary text. You % probably meant to type \&. ``` To get at least the row labels displayed at the correct side of the matrix, I wanted to use the starred version of `\bordermatrix`, but that did not work (as opposed to given in Voss's mathmode guide). Also, the matrix entries are not right aligned. How can I create such a matrix? Is there a way to do this with `amsmath`? **UPDATE** Thanks to the link by Werner, a minimal example is this: ``` \documentclass{article} \usepackage{blkarray} \newcommand{\matindex}[1]{\mbox{\scriptsize#1}} \begin{document} \[ A=\begin{blockarray}{rrl} \matindex{1} & \matindex{2} & \\ \begin{block}{(rr)l} \,100 & b\phantom{\,} & \matindex{row 1} \\ 2 & 12 & \matindex{row 2} \\ e & f & \matindex{ABDC} \\ \end{block} \end{blockarray} \] \end{document} ``` It's just a quick hack to get a bit more horizontal space between the parentheses and the matrix entries.
https://tex.stackexchange.com/users/8520
How to create a matrix with rows and columns labeled (at the right side)?
false
Here is a solution with `{pNiceMatrix}` of `nicematrix`. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \NiceMatrixOptions { code-for-first-row = $\small$ , code-for-last-col = $\small$ } $A = \begin{pNiceMatrix}[first-row,last-col,margin,r] 1 & 2 \\ 100 & b & \text{row } 1 \\ 2 & 12 & \text{row } 2 \\ e & f & \text{ABDC} \end{pNiceMatrix}$ \end{document} ``` You need several compilations (because `nicematrix` uses PGF/Tikz nodes under the hood).
1
https://tex.stackexchange.com/users/163000
687796
319,074
https://tex.stackexchange.com/questions/226272
3
I would like to right justify the columns in a border matrix. Is this possible? Default seems to be centre ``` \documentclass{article} \begin{document} $ \bordermatrix{~ & 5 & 6\cr 5 & 1 & 0 \cr 6 & 0 & -1 \cr} $ \end{document} ```
https://tex.stackexchange.com/users/69675
Right justify columns in border matrix
false
A solution with `{pNiceMatrix}` of `nicematrix`. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} % the key 'r' requires a right-justification $\begin{pNiceMatrix}[first-col,first-row,r] & 5 & 6 \\ 5 & 1 & 0 \\ 6 & 0 & -1 \\ \end{pNiceMatrix}$ \end{document} ```
0
https://tex.stackexchange.com/users/163000
687797
319,075
https://tex.stackexchange.com/questions/687782
4
I have a comma-separated list of information provided by the author as a preamble to my document. I then want to use this list and I'd like to put one item from my list per line. My idea was simply to replace commas with line breaks. But when I put formatting on my elements, it doesn't work. I'd like the author to be able to put in as much formatting as he likes (or references in the glossary) without there being any problems. **MWE :** ``` \documentclass{article} \usepackage{xstring} \begin{document} % In my case, the first argument is a command in the reality \StrSubstitute{Test, Test2, Test3}{,}{\newline} % OK \StrSubstitute{Test, \textit{Test2}, Test3}{,}{\newline} % NOK \end{document} ```
https://tex.stackexchange.com/users/296799
Comma separated list replacement
false
If you're just interested in processing the list for printing, there's no need to use [`xstring`](//ctan.org/pkg/xstring); [`etoolbox`](//ctan.org/pkg/etoolbox) provides list processing capabilities: ``` \documentclass{article} \usepackage{etoolbox} \newcommand{\processlist}[2][,]{% \def\itemdelim{\def\itemdelim{#1}}% Item delimiter delayed by one cycle (https://tex.stackexchange.com/a/89187/5764) \renewcommand*{\do}[1]{\itemdelim##1}% How each item is processed \docsvlist{#2}}% Process CSV list \begin{document} \setlength{\parindent}{0pt}% Just for this example First list: \processlist[\newline]{Test, Test2, Test3} \hrulefill Second list: \processlist[\newline]{Test, \textit{Test2}, Test3} \end{document} ``` --- There are also list parsers/processors available in LaTeX3. The following is taken partially from the [`xparse`](//ctan.org/pkg/xparse) [documentation](//texdoc.net/pkg/xparse) and produces the same result as above: ``` \documentclass{article} \NewDocumentCommand{\nextitem}{ m }{ #1 \par} \NewDocumentCommand{\processlist}{ > { \SplitList { , } } m }{% \ProcessList{#1}{ \nextitem } } \begin{document} \setlength{\parindent}{0pt}% Just for this example First list: \processlist{Test, Test2, Test3} \hrulefill Second list: \processlist{Test, \textit{Test2}, Test3} \end{document} ```
3
https://tex.stackexchange.com/users/5764
687798
319,076
https://tex.stackexchange.com/questions/687799
2
I'd like to include the TeX engine name and version in a document, Is there markup to capture those? I tried this ``` \documentclass{article} \usepackage{expl3} \usepackage{hyperref} \usepackage{listings} \ExplSyntaxOn \newcommand* \enginedetails { \c_sys_engine_exec_str \c_space_tl \c_sys_engine_version_str \c_space_tl (\c_sys_engine_format_str) } \ExplSyntaxOff \begin{document} \lstset{language=Rexx, extendedchars=true, frame=trbl} \title{Unicode Case and Width Issues} \author{Shmuel (Seymour J.) Metz} \thanks { This is a working document for the Rexx Language Association (RexxLA). It is written in \LaTeX \fmtversion and was rendered \today using \enginedetails{}. } \maketitle \end{document} ``` and got > > Undefined control sequence. } > > > with the line number of the closing } on the /thanks.
https://tex.stackexchange.com/users/110591
Markup to query engine and version
false
You could query all of the low-level detail, but as that is already done in `expl3`: ``` \documentclass{article} \ExplSyntaxOn \newcommand* \enginedetails { \c_sys_engine_exec_str \c_space_tl \c_sys_engine_version_str } \ExplSyntaxOff \begin{document} \enginedetails{} \end{document} ```
6
https://tex.stackexchange.com/users/73
687801
319,077
https://tex.stackexchange.com/questions/687792
1
There are many [node shapes](https://web.mit.edu/spin_v4.2.5/share/graphviz/doc/html/info/shapes.html), so is it possible (and how) to write numbers inside any other shape apart from a circle and rectangle? I have created new commands using tikz package. I can write inside the circle (and change radius), and rectangle (change side length), but not sure how to write inside e.g. hexagon polygon. I get an error when using \newcmdd{2}. ``` \documentclass{article} \usepackage{tikz} \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ \node[shape=circle,fill=white,draw,minimum size=5.5mm,inner sep=0.0pt,text=black] (char) {#1};}} \newcommand*\newcmd[1]{\tikz[baseline=(char.base)]{ \node[shape=rectangle,fill=white,draw,minimum size=5mm,inner sep=0.0pt,text=black] (char) {#1};}} % \newcommand*\newcmdd[1]{\tikz[baseline=(char.base)]{ % \node[shape=regular polygon, regular polygon sides=6, ,fill=white,draw, minimum size=5mm,inner sep=0.0pt,text=black] (char) {#1};}} \begin{document} \circled{2} \newcmd{2} % \newcmdd{2} \end{document} ```
https://tex.stackexchange.com/users/78526
How to write numbers inside polygon (pentagon, hexagon, octagon)?
false
The code gives the errors: ``` lalla.tex|19 error| Package pgfkeys Error: I do not know the key '/tikz/regular polygon sides', to which you passed '6', and I am going to ignore it. Perhaps you misspelled it. lalla.tex|19 error| Package tikz Error: Unknown shape ``regular polygon.'' Using ``rectangle'' instead. ``` So the "regular polygon" is not recognized. The problem is that, as you can see in the [example on the manual](https://tikz.dev/library-shapes#pgf.regular:polygon), you need to add ``` \usetikzlibrary {shapes.geometric} ``` in the preamble, after loading Ti*k*Z.
2
https://tex.stackexchange.com/users/38080
687802
319,078
https://tex.stackexchange.com/questions/687782
4
I have a comma-separated list of information provided by the author as a preamble to my document. I then want to use this list and I'd like to put one item from my list per line. My idea was simply to replace commas with line breaks. But when I put formatting on my elements, it doesn't work. I'd like the author to be able to put in as much formatting as he likes (or references in the glossary) without there being any problems. **MWE :** ``` \documentclass{article} \usepackage{xstring} \begin{document} % In my case, the first argument is a command in the reality \StrSubstitute{Test, Test2, Test3}{,}{\newline} % OK \StrSubstitute{Test, \textit{Test2}, Test3}{,}{\newline} % NOK \end{document} ```
https://tex.stackexchange.com/users/296799
Comma separated list replacement
true
To format a list of items separeted by commas or whatever as you want, you can use `listofitems`: ``` \documentclass{article} \usepackage{listofitems} \setsepchar{,} \readlist\foo{Test1,\textit{Test2},{\bfseries Test3},\LaTeX,Test4} \renewcommand\showitemsmacro[1]{\qquad\textbullet\quad #1\par} \begin{document} \foo[1] made with \foo[4]: \showitems\foo End of the example. \end{document} ``` or with the same result: ``` \documentclass{article} \usepackage{listofitems} \setsepchar{,} \readlist\foo{Test1,\textit{Test2},{\bfseries Test3},\LaTeX,Test4} \begin{document} \foo[1] made with \foo[4]: \foreachitem\test\in\foo{\qquad\textbullet\quad \test\par} End of the example. \end{document} ```
4
https://tex.stackexchange.com/users/11604
687803
319,079
https://tex.stackexchange.com/questions/687792
1
There are many [node shapes](https://web.mit.edu/spin_v4.2.5/share/graphviz/doc/html/info/shapes.html), so is it possible (and how) to write numbers inside any other shape apart from a circle and rectangle? I have created new commands using tikz package. I can write inside the circle (and change radius), and rectangle (change side length), but not sure how to write inside e.g. hexagon polygon. I get an error when using \newcmdd{2}. ``` \documentclass{article} \usepackage{tikz} \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ \node[shape=circle,fill=white,draw,minimum size=5.5mm,inner sep=0.0pt,text=black] (char) {#1};}} \newcommand*\newcmd[1]{\tikz[baseline=(char.base)]{ \node[shape=rectangle,fill=white,draw,minimum size=5mm,inner sep=0.0pt,text=black] (char) {#1};}} % \newcommand*\newcmdd[1]{\tikz[baseline=(char.base)]{ % \node[shape=regular polygon, regular polygon sides=6, ,fill=white,draw, minimum size=5mm,inner sep=0.0pt,text=black] (char) {#1};}} \begin{document} \circled{2} \newcmd{2} % \newcmdd{2} \end{document} ```
https://tex.stackexchange.com/users/78526
How to write numbers inside polygon (pentagon, hexagon, octagon)?
false
You can add `shape border rotate=<angle>` to the node options if you want to rotate the node (but not its contents). Note that `minimum width` affects the circumcircle, whereas `inner sep` affects the incircle. ``` \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \begin{document} \begin{tikzpicture}[every node/.style={minimum width=2cm, draw}] \draw[help lines](-1,-1)grid(11,1); \node[regular polygon, regular polygon sides=3, red] at (0,0) {3}; \node[regular polygon, regular polygon sides=4, orange] at (2,0) {4}; \node[regular polygon, regular polygon sides=5, yellow] at (4,0) {5}; \node[regular polygon, regular polygon sides=6, green] at (6,0) {6}; \node[regular polygon, regular polygon sides=7, blue] at (8,0) {7}; \node[regular polygon, regular polygon sides=8, violet] at (10,0) {8}; \end{tikzpicture} \end{document} ```
0
https://tex.stackexchange.com/users/125871
687816
319,085
https://tex.stackexchange.com/questions/687764
1
I don't know why but journal title field incorrectly displays comma. It looks like `“Journal title,”`, but should be `“Journal title”,`. I have tried like 5 multiple fixes found online, nothing helps. Alternatively I could accept reformating, but I don't know how to do it. I mean make journal title display like book title (for example `Journal title` without quotation marks in cursive), and make journal name field display with plain text without cursive. It's out of the scope of the question but I also can't figure out how to remove comma between author name and surname. It displays `Doe, J.` but should be `Doe J.`. ``` \documentclass[a4paper,12pt]{article} \usepackage[english]{babel} \usepackage[nottoc,numbib]{tocbibind} \usepackage[ bibstyle=ieee, citestyle=numeric, maxbibnames=99, giveninits=true]{biblatex} \usepackage{csquotes} \usepackage{multirow} \usepackage{colortbl} \addbibresource{bibliography.bib} \usepackage{algorithm} \usepackage{algpseudocode} \usepackage{mathptmx} \usepackage[titles]{tocloft} \setcounter{secnumdepth}{2} \setcounter{tocdepth}{2} \renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}} \DeclareNameAlias{sortname}{family-given} \DeclareNameAlias{author}{sortname} \DeclareDelimAlias{finalnamedelim}{multinamedelim} \title{Example} \author{Overleaf} \begin{document} \maketitle \tableofcontents \section{First Section} Cite. \cite{author00} \cite{author01} \cite{author02} \printbibliography \addcontentsline{toc}{section}{\refname} \end{document} ``` Bibliography file: ``` @book{author00, title = {Book Title}, author = {John Doe and Adam Smith and Peter Parker and John Edwards and George R. Martin}, year = {2023}, publisher = {Publisher} } @book{author01, title = {Book Title Part 2}, author = {John Goldberg and Adam Peterson and Peter Parker and John Edwards and George R. Martin}, year = {2023}, publisher = {Publisher} } @article{author02, title = {Journal Title}, author = {John Doe}, year = {2020}, journal = {Journal Name}, volume = {11}, number = {6} } ```
https://tex.stackexchange.com/users/289855
Removing comma from journal title in biblatex
true
This comma placement is typical for American English: Following punctuation is moved inside quotation marks even if it does not "logically" belong there. See <https://en.wikipedia.org/wiki/Quotation_marks_in_English#American_style>. This behaviour is usually only enabled for `biblatex`'s American localisation and not the generic `english`, but `biblatex-ieee` requests it explicitly with `\uspunctuation` (see [l. 34 in `ieee.bbx`](https://github.com/josephwright/biblatex-ieee/blob/7f67eea42f55ee0c27c8358dd7cd64bf47ad4a4c/ieee.bbx#L34).) You can counter that with a simple `\stdpunctuation`. Usually `\uspunctuation` and `\stdpunctuation` should be used inside `\DefineBibliographyExtras`, but since `biblatex-ieee` uses it outside, we will counter it outside as well. ``` \documentclass[a4paper,12pt]{article} \usepackage[english]{babel} \usepackage[ bibstyle=ieee, citestyle=numeric, maxbibnames=99, giveninits=true, ]{biblatex} \usepackage{csquotes} \DeclareNameAlias{sortname}{family-given} \DeclareNameAlias{author}{sortname} \DeclareDelimAlias{finalnamedelim}{multinamedelim} \stdpunctuation %\DefineBibliographyExtras{english}{\stdpunctuation} \begin{filecontents}{\jobname.bib} @book{author00, title = {Book Title}, author = {John Doe and Adam Smith and Peter Parker and John Edwards and George R. Martin}, year = {2023}, publisher = {Publisher} } @book{author01, title = {Book Title Part 2}, author = {John Goldberg and Adam Peterson and Peter Parker and John Edwards and George R. Martin}, year = {2023}, publisher = {Publisher} } @article{author02, title = {Journal Title}, author = {John Doe}, year = {2020}, journal = {Journal Name}, volume = {11}, number = {6} } \end{filecontents} \addbibresource{\jobname.bib} \begin{document} \tableofcontents \section{First Section} Cite. \cite{author00,author01,author02} \printbibliography[heading=bibintoc] \end{document} ```
2
https://tex.stackexchange.com/users/35864
687825
319,090
https://tex.stackexchange.com/questions/687782
4
I have a comma-separated list of information provided by the author as a preamble to my document. I then want to use this list and I'd like to put one item from my list per line. My idea was simply to replace commas with line breaks. But when I put formatting on my elements, it doesn't work. I'd like the author to be able to put in as much formatting as he likes (or references in the glossary) without there being any problems. **MWE :** ``` \documentclass{article} \usepackage{xstring} \begin{document} % In my case, the first argument is a command in the reality \StrSubstitute{Test, Test2, Test3}{,}{\newline} % OK \StrSubstitute{Test, \textit{Test2}, Test3}{,}{\newline} % NOK \end{document} ```
https://tex.stackexchange.com/users/296799
Comma separated list replacement
false
The main problem is that `xstring` tries full expansion of the arguments to its commands. Here's how to do it with `expl3`. ``` \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\typesetlist}{m +O{} +m +O{}} { #2 % before \exp_args:NV \clist_use:nn { #1 } { #3 } #4 } \ExplSyntaxOff \newcommand{\listprovidedbytheauthor}{Test1,\textit{Test2},{\bfseries Test3},\LaTeX,Test4} \begin{document} \typesetlist{\listprovidedbytheauthor}[\begin{flushleft}]{\\}[\end{flushleft}] \typesetlist{\listprovidedbytheauthor}[\noindent Keywords: ]{, } \end{document} ``` As you see, braces around the items are removed, which can have bad consequences in case wrong input such as `\bfseries Test3` is used (with or without braces). To be safe from such input errors, you can use a two-step approach: we split the list at commas and then surround each item by braces. ``` \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\typesetlist}{m +O{} +m +O{}} { #2 % before \clem_list_typeset:Vn #1 { #3 } #4 } \seq_new:N \l__clem_typeset_list_in_seq \seq_new:N \l__clem_typeset_list_out_seq \cs_new_protected:Nn \clem_list_typeset:nn { \seq_set_from_clist:Nn \l__clem_typeset_list_in_seq { #1 } \seq_set_map:NNn \l__clem_typeset_list_out_seq \l__clem_typeset_list_in_seq { {##1} } \seq_use:Nn \l__clem_typeset_list_out_seq { #2 } } \cs_generate_variant:Nn \clem_list_typeset:nn { V } \ExplSyntaxOff \newcommand{\listprovidedbytheauthor}{Test1,\textit{Test2},{\bfseries Test3},\LaTeX,Test4} \begin{document} \typesetlist{\listprovidedbytheauthor}[\begin{flushleft}]{\\}[\end{flushleft}] \typesetlist{\listprovidedbytheauthor}[\noindent Keywords: ]{, } \end{document} ```
4
https://tex.stackexchange.com/users/4427
687828
319,093
https://tex.stackexchange.com/questions/687711
1
If I externalize a tikzpicture, LaTeX does not keep in draft mode an appropriate space as in the case of includegraphics. It does not help to format the text properly. So I combined both commands to include the externalized picture if it exists. I do not know if it is possible to in a different way. However, I also use the tcolobox and it does not work together even if I add \tcbsetforeverylayer{shield externalize} as suggested in several discussions. Please, does anybody know how to fix it? I attach MWE. ``` \documentclass[draft]{tufte-book} \usepackage{pgf,tikz,pgfplots} \usepackage{tkz-euclide} \usetikzlibrary{patterns} \pgfplotsset{compat=1.18} \usetikzlibrary{external} \newcounter{extcounter} \setcounter{extcounter}{0} \newcommand{\cotoje}[1]{#1} \tikzsetfigurename{XYZ} \tikzexternalize % NOTE: Modified from https://tex.stackexchange.com/a/580401/140433 \newcommand{\setpgfexternalcounter}[1]{ \makeatletter% \pgfkeysgetvalue{/tikz/external/figure name}\myexternalname \expandafter\gdef\csname c@tikzext@no@\myexternalname\endcsname{#1}% \makeatother } \newcommand{\externalizuj}[1]{\setpgfexternalcounter{\theextcounter} \IfFileExists{./XYZ\theextcounter.pdf}{% \includegraphics{./XYZ\theextcounter.pdf}}{% #1 }% \addtocounter{extcounter}{1}} \usepackage{lipsum} \usepackage[most]{tcolorbox} \tcbsetforeverylayer{shield externalize} \newcommand{\textbox}[1]{{\tikzset{external/export=false}\tcbsetforeverylayer{shield externalize} \begin{tcolorbox}[colback=gray!15!white,colframe=gray,width=(\linewidth-15mm),breakable] \tikzset{external/export=false}#1 \end{tcolorbox}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \lipsum[1-2] \externalizuj{\begin{tikzpicture} \node {root} child {node {left}} child {node {right} child {node {child}} child {node {child}} }; \end{tikzpicture}} \begin{marginfigure}[2mm] \begin{center} \externalizuj{ \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=2.2cm,y=2.2cm] \draw[->,color=black] (-0.3,0) -- (1.5,0); \draw[->,color=black] (0,-0.3) -- (0,1.5); \clip(-0.3,-0.3) rectangle (1.5,1.5); \draw [fill=red] (0.,0.) circle (2.8pt); \draw [fill=red] (1.,0.) circle (2.8pt); \draw [fill=red] (1.,1.) circle (2.8pt); \draw [fill=red] (0.,1.) circle (2.8pt); \end{tikzpicture}}\vspace*{-2mm} \caption{}\label{Obr:KA.2.1.6a} \end{center} \end{marginfigure} \begin{marginfigure}[2mm] \begin{center} \externalizuj{\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=2.2cm,y=2.2cm] \draw[->,color=black] (-0.3,0) -- (1.5,0); \draw[->,color=black] (0,-0.3) -- (0,1.5); \clip(-0.3,-0.3) rectangle (1.5,1.5); \draw [fill=red] (0.,0.) circle (2.8pt); \draw [fill=red] (1.,0.) circle (2.8pt); \draw [fill=red] (1.,1.) circle (2.8pt); \draw [fill=red] (0.,1.) circle (2.8pt); \end{tikzpicture}}\vspace*{-2mm} \caption{}\label{Obr:KA.2.1.6aa} \end{center} \end{marginfigure} A simple image is \externalizuj{\tikz \fill (0,0) circle(5pt);}. \lipsum[2-4] \begin{marginfigure}[2mm] \begin{center} \externalizuj{\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=2.2cm,y=2.2cm] \draw[->,color=black] (-0.3,0) -- (1.5,0); \draw[->,color=black] (0,-0.3) -- (0,1.5); \clip(-0.3,-0.3) rectangle (1.5,1.5); \draw [fill=red] (0.,0.) circle (2.8pt); \draw [fill=red] (1.,0.) circle (2.8pt); \draw [fill=red] (1.,1.) circle (2.8pt); \draw [fill=red] (0.,1.) circle (2.8pt); \draw [line width=1.5pt] (0.,1.)-- (0.,0.); \draw [line width=1.5pt] (1.,0.)-- (0.,0.); \draw [line width=1.5pt] (0.,1.)-- (1.,1.); \draw [line width=1.5pt] (1.,1.)-- (1.,0.); \draw [line width=1.5pt] (1.,0.)-- (0.,1.); \draw [line width=1.5pt] (0.,0.)-- (1.,1.); \end{tikzpicture}}\vspace*{-2mm} \caption{}\label{Obr:KA.2.1.6b} \end{center} \end{marginfigure} \lipsum[3-5] \begin{center}\vspace*{-7mm} \textbox{\lipsum[1-2]} \end{center}\vspace*{-4mm} \end{document} ```
https://tex.stackexchange.com/users/298391
tikzexternalize & tcolorbox not working together
true
I found the solution. Surprisingly, it seems that the problem is with `\usepackage[most]{tcolorbox}`. If I replace it by `\usepackage[breakable,theorems,fitting,hooks,magazine,poster,raster,skins]{tcolorbox}` then it works fine. But when I add also `vignette`, it stops to work.
0
https://tex.stackexchange.com/users/298391
687832
319,095
https://tex.stackexchange.com/questions/687834
2
I am using the nice package `lua-widow-control` to slightly improve the appearance of the document. However, the warning messages "Widow/Orphan/Broken Hyphen NOT removed on page ..." was too long (contain too many lines), and when the document becomes lengthy, a large number of such warning messages can sometimes drown out other important warnings. I wonder if there is some way to change these messages from the level "Warning" into "Info" when the document is not finalized? Below is an example of such a warning message. ``` Widow/Orphan/Broken Hyphen NOT removed on page 10 [10] [11] warning (pdf backend): ignoring duplicate destination with the name 'page.11' [11] (./the-document.aux)) (see the transcript file for additional information) 4014 words of node memory still in use: 9 hlist, 2 vlist, 2 rule, 1 local_par, 4 glue, 4 kern, 2 penalty, 2 sub_mlist, 1 margin_kern, 6 glyph, 1546 attribute, 76 glue_spec, 102 attribute_list, 1 write, 10 user_defined nodes avail lists: 1:31,2:99181,3:1431,4:947,5:244,6:94,7:8887,8:42,9:4342,10:45,11:552 </usr/local/texlive/2023/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Sans.otf></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/tex-gyre-math/texgyrepagella-math.otf></Users/username/Library/Fonts/PalatinoSansLTPro-Regular.OTF></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/newcomputermodern/NewCMMono10-Bold.otf></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/fontawesome5/FontAwesome5Free-Solid-900.otf></Users/username/Library/Fonts/pala.TTF></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/newcomputermodern/NewCMMono10-Regular.otf></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Regular.otf></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Regular.otf></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/tex-gyre/texgyreheros-bold.otf></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/tex-gyre/texgyreheros-regular.otf></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Regular.otf></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/tex-gyre-math/texgyrepagella-math.otf></usr/local/texlive/2023/texmf-dist/fonts/opentype/public/tex-gyre-math/texgyrepagella-math.otf></Users/username/Library/Fonts/palabi.TTF></Users/username/Library/Fonts/palai.TTF></Users/username/Library/Fonts/pala.TTF></Users/username/Library/Fonts/palab.TTF></Users/username/Library/Fonts/SourceHanSerif.ttc></Users/username/Library/Fonts/SourceHanSerif.ttc></Users/username/Library/Fonts/SourceHanSerif.ttc></Users/username/Library/Fonts/SourceHanSerif.ttc></usr/local/texlive/2023/texmf-dist/fonts/type1/public/amsfonts/euler/eurb10.pfb></usr/local/texlive/2023/texmf-dist/fonts/type1/public/amsfonts/euler/eurb7.pfb></usr/local/texlive/2023/texmf-dist/fonts/type1/public/amsfonts/symbols/msam10.pfb> Output written on the-document.pdf (...). SyncTeX written on the-document.synctex.gz. Transcript written on the-document.log. Latexmk: Getting log file 'the-document.log' Latexmk: Examining 'the-document.fls' Latexmk: Examining 'the-document.log' Latexmk: Index file 'the-document.idx' was written Latexmk: Log file says output to 'the-document.pdf' Latexmk: All targets () are up-to-date ```
https://tex.stackexchange.com/users/194994
lua-widow-control: is it possible to change warnings into infos
true
The message comes from ``` --- When we are unable to remove a widow/orphan, print a warning --- --- @return nil local function remove_widows_fail() warning("Widow/Orphan/Broken Hyphen NOT removed on page " .. pagenum) ``` in `texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua` as such it is a locally defined function call (`warning`) inside the `local` declaration. So by design you can't really patch that from the outside. You could however copy that file to the current directory (or anywhere earlier in the path) then around line 242 you see ``` warning = function(str) luatexbase.module_warning(lwc.name, str) end info = function(str) luatexbase.module_info(lwc.name, str) end ``` and if you change `_warning` to `_info` then `warning()` will be like `info()` and only write to the log
1
https://tex.stackexchange.com/users/1090
687845
319,100
https://tex.stackexchange.com/questions/687763
0
I am using the `listings` package for displaying source code, and want to reformat the numbering to use the `oldstylenums`. The problem comes when using `microtype`, as it throws errors for every line of code in the listing like this ``` Argument of \MT@res@a has an extra }. import Paragraph ended before \MT@res@a was complete. import Extra \else. import ``` * Disabling `microtype` makes LaTeX compile. * Not reformatting the numbering makes LaTeX compile. * Disabling `hyperref` makes LaTeX compile. Is there a way to reformat the numbers without getting a `microtype` error, nor disabling one of the two fundamental packages `microtype` and `hyperref` for my document? Here is my minimal, non-working example. Doing any of the above points will make it run. ``` \documentclass{article} \usepackage[T1]{fontenc} \usepackage{textcomp} % Disabling the below makes it compile \usepackage{microtype} \usepackage{listings} \lstset{upquote=true} \lstdefinestyle{PythonStyle}{ language=Python, commentstyle=\itshape, basicstyle=\footnotesize\ttfamily, breaklines=true, numbers=left, numberstyle=\ttfamily\scriptsize, tabsize=4, numbersep=20pt, % separation between numbers and listing basewidth=0.5em, % the width of each character in the listing } % Disabling the below makes it compile \renewcommand*\thelstnumber{\oldstylenums{\arabic{lstnumber}}} % nicer numbering % Disabling the below makes it compile \usepackage[colorlinks=true, pdfusetitle]{hyperref} \begin{document} \section{Section} We are at page \pageref{sec:here}.\label{sec:here} \begin{lstlisting}[style=PythonStyle] import numpy as np # this is a comment a = np.sqrt(2) if a > 2: print("Interesting") \end{lstlisting} \end{document} ```
https://tex.stackexchange.com/users/281886
Error between microtype, hyperref, and listings when setting oldstylenums for listings
true
Thank you to Ulrike Fischer for the comment above. I thus found the working solution to be to define the number function outside the style call: ``` \newcommand\epicNumbers[1]{\oldstylenums{#1}} ``` and then calling that function inside the `lstdefinestyle` call, like this: ``` \lstdefinestyle{PythonStyle}{ language=Python, ..., numberstyle=\ttfamily\scriptsize\color[rgb]{0.5,0.5,1.0}\epicNumbers, ..., } ``` So the full working file is like this: ``` \documentclass{article} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage{microtype} \usepackage{listings} \newcommand\epicNumbers[1]{\oldstylenums{#1}} % this line is new \lstset{upquote=true} \lstdefinestyle{PythonStyle}{ language=Python, commentstyle=\itshape, basicstyle=\footnotesize\ttfamily, breaklines=true, numbers=left, numberstyle=\ttfamily\scriptsize\epicNumbers, % call the new number style tabsize=4, numbersep=20pt, basewidth=0.5em, } \usepackage[colorlinks=true, pdfusetitle]{hyperref} \begin{document} \section{Section} We are at page \pageref{sec:here}.\label{sec:here} \begin{lstlisting}[style=PythonStyle] import numpy as np # this is a comment a = np.sqrt(2) if a > 2: print("Interesting") \end{lstlisting} \end{document} ```
0
https://tex.stackexchange.com/users/281886
687846
319,101
https://tex.stackexchange.com/questions/687815
0
What's the easiest way to insert a PDF comment attached to a block of markdown? I discovered [pdfcomment](https://ctan.org/tex-archive/macros/latex/contrib/pdfcomment) but don't know how to use it with pandoc (or if that's even possible).
https://tex.stackexchange.com/users/12593
Inserting a PDF Comment with pandoc
false
It should be possible using pandoc `raw_tex` extension. The steps should be: 1. Within your md source, you write the comments using LaTex `pdfcomment` syntax. 2. You modify pandoc template for pdf adding in its preamble `\usepackage{pdfcomment}` (see pandoc manual for details). 3. You run `pandoc -f markdown+raw_tex -t pdf`
0
https://tex.stackexchange.com/users/233251
687856
319,105
https://tex.stackexchange.com/questions/687806
1
I am using [apxproof](https://ctan.math.illinois.edu/macros/latex/contrib/apxproof/apxproof.pdf) and would like to reference the repeated/generated appendix. I tried adding the following line to my preamble: ``` \usepackage[bibliography=common]{apxproof} \renewcommand{\appendixprelim}{\clearpage\onecolumn\appendix\appendixpage\section{}\label{apx:delayed_proofs}} ``` and then referring to the appendix via `\cref{apx:delayed_proofs}` but `\cref` does not give me text in the hyperlink that reads "Appendix A". MWE below: ``` \documentclass[paper=letter,DIV=10]{scrartcl} % %% %%% preamble %% % %%% main packages \usepackage{import} \usepackage[utf8]{inputenc} \usepackage{babel}% https://tex.stackexchange.com/questions/482222/automatically-use-german-style-french-quotes \usepackage{geometry} \usepackage[titletoc,title]{appendix} \usepackage{xpatch} \xpretocmd{\appendixpagename}{\sffamily}{}{} \usepackage{amssymb,amsmath,amsthm,amsfonts,bm} \usepackage{thmtools} \usepackage{cleveref} %%% appendix proofs \usepackage[bibliography=common]{apxproof} \renewcommand{\appendixprelim}{\clearpage\onecolumn\appendix\appendixpage\section{}\label{apx:delayed_proofs}} \newtheorem{theorem}{Theorem} \newtheoremrep{lemma}[theorem]{Lemma} \title{Test} \begin{document} \maketitle \tableofcontents \section{Test} \begin{lemmarep}[Test] Test! \end{lemmarep} \begin{proof} Test! \end{proof} Here's a reference to the \cref{apx:delayed_proofs}! \end{document} ```
https://tex.stackexchange.com/users/144086
refer to appendix in `apxproof`
true
This works fine: ``` \documentclass{scrartcl} \usepackage[titletoc,title]{appendix} \usepackage{xpatch} \xpretocmd{\appendixpagename}{\sffamily}{}{} \usepackage{cleveref} \usepackage[bibliography=common]{apxproof} \renewcommand{\appendixprelim}{\clearpage\onecolumn\appendix\appendixpage} \newtheorem{theorem}{Theorem} \newtheoremrep{lemma}[theorem]{Lemma} \title{Test} \begin{document} \maketitle \tableofcontents \section{Test} \begin{lemmarep}[Test] Test! \end{lemmarep} \begin{toappendix} \label{apx:delayed_proofs} \end{toappendix} \begin{proof} Test! \end{proof} Here's a reference to the \cref{apx:delayed_proofs}! \end{document} ```
2
https://tex.stackexchange.com/users/166858
687862
319,109
https://tex.stackexchange.com/questions/687859
1
while the following works: ``` \documentclass{article} \usepackage{luacode} \begin{document} \directlua{token.set_macro("prjdatetime", os.date())} \end{document} ``` I get in trouble when I want to customize the date- and timeformat: ``` \documentclass{article} \usepackage{luacode} \begin{document} \directlua{token.set_macro("prjdatetime", os.date("\%Y"))} \end{document} ``` The error is: ``` (./test.aux) (/usr/local/texlive/2023/texmf-dist/tex/latex/base/ts1cmr.fd)[\dir ectlua]:1: invalid escape sequence near '"\%'. l.4 ...ken.set_macro("prjdatetime", os.date("\%Y"))} ``` The command to compile I'am using is: ``` lualatex --jobname=test escape.tex ``` The version: ``` lualatex --version This is LuaHBTeX, Version 1.17.0 (TeX Live 2023) Development id: 7581 ``` Please help! Thx!
https://tex.stackexchange.com/users/224406
Can't use percent sign in \directlua
false
Thx to Willie Wongs tip I used following solution: ``` \makeatletter\let\percentchar\@percentchar\makeatother \directlua{token.set_macro("prjdatetime", os.date("\percentchar c \percentchar Z"))} ```
1
https://tex.stackexchange.com/users/224406
687864
319,110
https://tex.stackexchange.com/questions/349281
6
How to redefine the colours of questions, and make it appear bold when using `\documentclass{exam}`? I am not looking for a manual solution where I need to edit each and every question myself. ``` \documentclass{exam} \usepackage[utf8]{inputenc} \begin{document} \begin{questions} \question This is question 1 \begin{solution} Solution for question 1 \end{solution} \question This is question 2 \(\zeta(z)\) is \(\frac{1}{2}\) \question \begin{choices} \choice A \choice B \end{choices} \question This is question 3 \end{questions} \end{document} ```
https://tex.stackexchange.com/users/28439
Customizing the appearance and color of the question in exam class
false
To tweak Question styles, in a pure `exam.cls` way, you can redefine `\questionshook` which may continues to effect on Solution portions too, and this can be compensated with using `SolutionEmphasis` command both in preamble of the document. Thus you need ``` \renewcommand{\questionshook}{% \setlength{\leftmargin}{1cm}% \color{red}\bfseries } \SolutionEmphasis{\normalfont\color{black}} ``` You can also play with `\qformat`, `\partshook`, `\subpartshook`, `\subsubpartshook`, `\choiceshook`. [Relatable Question](https://tex.stackexchange.com/questions/180992/using-extrawidth-in-exam-class-results-in-unwanted-margin-changes-per-page)
0
https://tex.stackexchange.com/users/297046
687873
319,114
https://tex.stackexchange.com/questions/687852
1
I would like to use smaller fonts for the subscripts and superscripts in a user-defined LaTeX command. Do you have any ideas how to scale down the subscripts/superscripts proportionally? My MWE is the following: ``` \documentclass{article} \usepackage{etoolbox} \usepackage{ifmtarg} \newcommand{\defineSpecies}[2]{\csdef{spec@#1}{#2}} \newrobustcmd{\spec}[1]{% \ifcsname spec@#1\endcsname% \csuse{spec@#1}% \else \GenericError{}{Undefined species `#1'}{}{} \fi } \defineSpecies{hhe3+}{HHe$_3^+$} \begin{document} \fontsize{5}{6}\selectfont \spec{hhe3+} \end{document} ``` Here I would like to have much smaller subscript `3` and superscript `+`. A solution modifying the `\spec{}` command globally would be preferred, as I have a lot of species defined such a way. I would not switch to other 'chemistry' packages but stick to this command.
https://tex.stackexchange.com/users/142834
How to achive that subscripts/superscripts are scaled with the font size in a robust command?
true
I am assuming your question is > > I changed the text font size to be 5pt, but now the superscript and subscripts look too large; how do I change them to match? > > > Since you are creating the super/subscripts using math mode, you need to change the math sizes. This is [accomplished through the `\DeclareMathSizes{}{}{}{}` command](https://tex.stackexchange.com/questions/8434/how-to-scale-math-font-only). In the example below I changed script size to 3pts and scriptscript size to 2pts. (As an aside, since you didn't specify a fancy font, we are using Computer Modern, which doesn't allow arbitrary scalings; to fix that we load [`fix-cm`](https://ctan.org/pkg/fix-cm?lang=en).) ``` \RequirePackage{fix-cm} \documentclass{article} \usepackage{etoolbox} \usepackage{ifmtarg} \newcommand{\defineSpecies}[2]{\csdef{spec@#1}{#2}} \newrobustcmd{\spec}[1]{% \ifcsname spec@#1\endcsname% \csuse{spec@#1}% \else \GenericError{}{Undefined species `#1'}{}{} \fi } \defineSpecies{hhe3+}{HHe$_3^+$} \DeclareMathSizes{5}{5}{3}{2} \begin{document} \fontsize{5}{6}\selectfont \spec{hhe3+} \end{document} ```
1
https://tex.stackexchange.com/users/119
687879
319,118
https://tex.stackexchange.com/questions/687799
2
I'd like to include the TeX engine name and version in a document, Is there markup to capture those? I tried this ``` \documentclass{article} \usepackage{expl3} \usepackage{hyperref} \usepackage{listings} \ExplSyntaxOn \newcommand* \enginedetails { \c_sys_engine_exec_str \c_space_tl \c_sys_engine_version_str \c_space_tl (\c_sys_engine_format_str) } \ExplSyntaxOff \begin{document} \lstset{language=Rexx, extendedchars=true, frame=trbl} \title{Unicode Case and Width Issues} \author{Shmuel (Seymour J.) Metz} \thanks { This is a working document for the Rexx Language Association (RexxLA). It is written in \LaTeX \fmtversion and was rendered \today using \enginedetails{}. } \maketitle \end{document} ``` and got > > Undefined control sequence. } > > > with the line number of the closing } on the /thanks.
https://tex.stackexchange.com/users/110591
Markup to query engine and version
false
In LuaTeX, we can do this: ``` \def\luatexengine{\directlua{tex.print(status.luatex_engine)}} \def\luatexversion{\expandafter\putdot\directlua{tex.print(status.luatex_version)}} \def\luatexrevision{\directlua{tex.print(status.luatex_revision)}} \def\putdot#1{#1.} This is \luatexengine, \luatexversion.\luatexrevision. \bye ```
0
https://tex.stackexchange.com/users/51799
687884
319,121
https://tex.stackexchange.com/questions/687882
0
I want to create an environment that displays "Solution" as a title. After this title I want the text to start after a new line, so the following code should work ``` \newenvironment{sol}{$\triangleright$ \textbf{Solution.} \newline}{$\triangleleft$} ``` It does work, but if I start the text with an enumitem environment, the vertical space of the environment and the `newline` add in a bad way.
https://tex.stackexchange.com/users/270421
newline before enumitem environment
true
Instead of inserting a `\newline`, use `\par`. With that you also need a `\nobreak` to ensure the subsequent content stays with the "heading." However, if you're using a list, breaking may still occur, so you may require some manual intervention around the page boundary (or resort to packages like [`needspace`](//ctan.org/pkg/needspace) to check the available space on the page). ``` \documentclass{article} \usepackage{lipsum} \usepackage{enumitem} \newenvironment{sol}{% $\triangleright$ \textbf{Solution.} \par\nobreak }{% $\triangleleft$% } \begin{document} \lipsum[1][1-5] \begin{sol} \lipsum[2][1-5] \end{sol} \begin{sol} \begin{itemize} \item \lipsum[3][1-5] \end{itemize} \lipsum[3][6-10] \end{sol} \begin{sol} \begin{itemize}[nosep] \item \lipsum[4][1-5] \end{itemize} \lipsum[4][6-10] \end{sol} \end{document} ```
0
https://tex.stackexchange.com/users/5764
687887
319,122
https://tex.stackexchange.com/questions/687863
1
Is there a way to extend a `\vline` slightly beyond the boundary of the surrounding box? In the case I have in mind, I'm attempting to have a continuous vertical line between several items in an `enumerate` environment. This is what I've got going so far: ``` \begin{enumerate} \item \begin{enumerate} \item[] \parbox{0.47\linewidth}{\textbf{Version 1}} \hfill\vline\hfill \parbox{0.47\linewidth}{\textbf{Version 2}} \item \parbox[t]{0.47\linewidth}{Text that may cross to \\ a second line} \hfill\vline\hfill \parbox[t]{0.47\linewidth}{Text that may cross to \\ a second line} \end{enumerate} \end{enumerate} ``` This works well for lining up the vertical lines, but naturally there's a small gap between each line. I know I could use `\rule`, but then I'd have to manually set the height for every single item since they sometimes cover more than one line. I'm open to other general solutions for the vertical line, but I'd like to use `enumerate` still because items will sometimes be cross-referenced elsewhere in the text and I'd like those to work as hyperlinks. For example, I know this would be easy to do using `tabular`, but then I'd either lose cross-referencing or have to jump through some hoops to make it happen.
https://tex.stackexchange.com/users/154038
Extend vline slightly beyond surrounding box?
true
**UPDATE** after comment. This example uses `tikz` and the `tikzmark` library to draw a continuous vertical line. *(You don't need to understand tikz code)* The command `\DrawVerticalRule[<color of the line>]{<name of the top mark>}{<name of the bottom mark>}` (color is optional, default = black) will draw the vertical line between two tikzmarks. Before using `\DrawVerticalRule`, you must manually add the two `\tikzmark{<unique name>}`, before the beginning of each sentence. In the case of the bottom mark, it must be inserted after the last `\\`, with no white-space before the first word of the line. Notice that `\hfill` was added between the parboxes to add some space between them, and prevent the vertical line from touching the end of a long sentence. The line will have an x-offset of `1ex` to the left and will extend above or below each first letter by 1pt. The chosen line width is 0.8pt. ``` \documentclass[12pt,a4paper]{article} %********************************** added <<<<<<<<< \usepackage{tikz} \usetikzlibrary{calc,tikzmark} \newlength{\xshift} \setlength{\xshift}{1ex} % line separation from the text <<<< \newlength{\yshift} \settoheight{\yshift}{M} % height of M \newlength{\zshift} \settodepth{\zshift}{gjpqy} % depth of g \newcommand{\DrawVerticalRule}[3][black]{% \DrawVerticalRule[<color of the line>] default = black \begin{tikzpicture}[overlay,remember picture] \draw [color=#1, line width=0.8pt]($ (pic cs:#2) +(-\xshift,\yshift+1pt) $) -- ($ (pic cs:#3) +(-\xshift,-\zshift-1pt) $); \end{tikzpicture} } %************************************* \begin{document} \begin{enumerate} \item \begin{enumerate} \item[] \parbox{0.47\linewidth}{\textbf{Version 3}}\hfill % space between the parboxes \parbox{0.47\linewidth}{\textbf{\tikzmark{t1}Version 4}} % add the first tikzmark <<<<<<<<< \item \parbox[t]{0.47\linewidth}{Text that may cross to \\ a second line and it is longer...}\hfill % space between the parboxes \parbox[t]{0.47\linewidth}{Text that may cross to\\ \tikzmark{b1}a second line}% add the second tikzmark <<<<<<<< \end{enumerate} \end{enumerate} \DrawVerticalRule[blue]{t1}{b1} % draw the vertical line between the two tikzmarks t1 and b1 <<<<<<<<<< \begin{enumerate} \item \begin{enumerate} \item[] \parbox{0.47\linewidth}{\textbf{Version 5}}\hfill % space between the parboxes \parbox{0.47\linewidth}{\textbf{\tikzmark{t2}Version 6}} % add the first tikzmark <<<<<<<<< \item \parbox[t]{0.47\linewidth}{Text that may cross to \\ a second line and it is longer...}\hfill % space between the parboxes \parbox[t]{0.47\linewidth}{Text that may cross to\\a second line and maybe use \\ \tikzmark{b2}a third line.}% add the second tikzmark <<<<<<<< \end{enumerate} \end{enumerate} \DrawVerticalRule[red]{t2}{b2} % draw the vertical line between the two tikzmarks t2 and b2<<<<<<<<<< \end{document} ```
1
https://tex.stackexchange.com/users/161015
687889
319,123
https://tex.stackexchange.com/questions/123758
10
This is a question that arose in the comments here: [Change Section titles to Small Caps only in ToC](https://tex.stackexchange.com/questions/123549/change-section-titles-to-small-caps-only-in-toc/123551?noredirect=1#comment277105_123551) I normally hide footnotes from the TOC by doing this: `\section[title]{title\footnote{This is a footnote.}}`. This works in a lot of document classes (memoir, article, ...), but not in all of them. `amsbook`, for example, uses the optional argument only for the running heads so the footnote mark still ends up in the TOC. So what is the 'universal solution'?
https://tex.stackexchange.com/users/32655
How to hide a footnote in a section title from the table of contents
false
Several updates have occurred since the above answer and there is now a "Universal" solution which works with most packages (This works with the following: ``` \documentclass[a4paper,12pt]{book} \usepackage[T1]{fontenc} \usepackage{titlesec} ``` Use `\chapter[TOC_Title]{Title in chapter\protect\footnote{This is a footnote that will only appear in chapter.}}`
0
https://tex.stackexchange.com/users/298386
687891
319,124
https://tex.stackexchange.com/questions/687890
1
I am creating a list of special characters used for delimitation in my work. ``` "-","_"," " are delimiters ``` But the latex code is wrapping on `" "` ``` "-","_"," " are delimiters ``` How do I treat `" "` as a word that shouldn't be wrapped?
https://tex.stackexchange.com/users/236617
How to prevent wrapping on a space character?
true
The tie `~` can be used as per [Werner's](https://tex.stackexchange.com/users/5764/werner) comment. ``` "-","_","~" are delimiters ```
1
https://tex.stackexchange.com/users/236617
687894
319,125
https://tex.stackexchange.com/questions/687780
0
By default, TeX inserts a strut in lines with a height and depth of `0.7\baselineskip` and `0.3\baselineskip` respectively. These are the minimum height and depth of the lines. My question: Is there any way to modify these default settings for the `\strut` in lines? Let's say that I want to make the minimum height of each line equal to `\f@baselineskp` (the current height of the single line space) and to have a minimum depth of 0. I am not sure if this is good typography; I'm just looking into testing it out. I've tried to change the default `\strut` height and depth without success. See my MWE: ``` \documentclass{article} \makeatletter %Attempt 1: I attempt to redefine \set@fontsize from the latex2e kernel. This fails to compile. %\def\set@fontsize#1#2#3{% % \@defaultunits\@tempdimb#2pt\relax\@nnil % \edef\f@size{\strip@pt\@tempdimb}% % \@defaultunits\@tempskipa#3pt\relax\@nnil % \edef\f@baselineskip{\the\@tempskipa}% % \edef\f@linespread{#1}% % \let\baselinestretch\f@linespread % \def\size@update{% % \baselineskip\f@baselineskip\relax % \baselineskip\f@linespread\baselineskip % \normalbaselineskip\baselineskip % \setbox\strutbox\hbox{% % \vrule\@height.7\baselineskip % \@depth.3\baselineskip % \@width\z@}% %% \setbox\strutbox\hbox{% %% \vrule\@height\baselineskip %% \@depth.0001\baselineskip %% \@width\z@}% % \ifnum \tracingfonts>\tw@ % \ifx\f@linespread\@empty % \let\reserved@a\@empty % \else % \def\reserved@a{\f@linespread x}% % \fi % \@font@info{Changing size to \f@size/\reserved@a % \f@baselineskip}% % \aftergroup\type@restoreinfo \fi % \let\size@update\relax}% %} % %Attempt 2: Doesn't work for some reason. \setbox\strutbox\hbox{% \vrule\@height\f@baselineskip \@depth\z@\@width\z@ } %\maxdepth\z@ \makeatletter \usepackage{blindtext} \begin{document} \Blinddocument \end{document} ``` EDIT: I will leave this question up in case someone finds it helpful. I looked through `source2e.pdf`, particularly `ltpara.dtx`, and figured out the following solution: Just add a strut at the start of each paragraph to ensure that it has a minimum height. For example, `\AddToHook{para/begin}{\rule{\z@}{\f@baselineskip}}` sets a minimal height equal to the current line height and`\AddToHook{para/begin}{\rule{\z@}{\f@size\p@}}` sets a minimal height equal to the current font size.
https://tex.stackexchange.com/users/278534
How to change the default strut parameters?
true
I've answered my question by adding a strut at the beginning of every paragraph via hooks. This ensures that each line has a minimum height. For example, `\AddToHook{para/begin}{\rule{\z@}{\f@baselineskip}}` sets a minimal height equal to the current line height and `\AddToHook{para/begin}{\rule{\z@}{\f@size\p@}}` sets a minimal height equal to the current font size. If the paragraph touches the top of page, change the value of `\topskip` to ensure that that line has the same minimum height as the other lines.
1
https://tex.stackexchange.com/users/278534
687897
319,126
https://tex.stackexchange.com/questions/687896
2
How does one turn the circular degree symbol \textdegree > > ° > > > into an equilateral triangle degree symbol? I am just very curious about this, I only know how to type up basic mathematics.
https://tex.stackexchange.com/users/298504
Triangle instead of circle in degrees
true
You can simple use `^` to make a triangle appear as a superscript: ``` \documentclass{article} \begin{document} $15^\triangle$ \end{document} ``` or even smaller but requiring another package: ``` \documentclass{article} \usepackage{mathabx} \begin{document} $15^\smalltriangleup$ \end{document} ```
5
https://tex.stackexchange.com/users/281557
687899
319,127
https://tex.stackexchange.com/questions/436979
10
I wonder if someone could explain to me why ``` \documentclass{article} \begin{document} the standard approximation $\pi = \directlua{tex.sprint(math.pi)}$ \end{document} ``` works all right, whereas ``` \documentclass{article} \begin{document} the standard approximation $\pi = \directlua{tex.sprint(string.format(' %.3f', math.pi))}$ \end{document} ``` throws an `Undefined control sequence. \end{document}` It is probably something very basic, but I just don't get it. Thanks in advance
https://tex.stackexchange.com/users/165308
problem with string.format, \directlua and tex.sprint
false
What we can do in OpTeX: ``` $\pi \approx \directlua{tex.sprint(string.format('\%.3f', math.pi))}$ \bye ```
3
https://tex.stackexchange.com/users/51799
687900
319,128