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/693779
3
I have long lines like this: ``` Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist, \\ Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word, \\ Saint Raphael, who didst lead Tobias safely through his journey to his home again, \\ ``` Which render as: > > Saint Gabriel, who didst foretell to Zachary the birth and ministry of > John the Baptist, > > Saint Gabriel, who didst announce to Blessed Mary the Incarnation > of the Divine Word, > > Saint Raphael, who didst lead Tobias safely through his journey to > his home again, > > > But I want: > > Saint Gabriel, who didst foretell to Zachary the birth and ministry of >      John the Baptist, > > Saint Gabriel, who didst announce to Blessed Mary the Incarnation >      of the Divine Word, > > Saint Raphael, who didst lead Tobias safely through his journey to >      his home again, > > > How do I indent what is wrapped? Is there a way of doing with with a `\renewcommand{\\}{…}`?
https://tex.stackexchange.com/users/36603
Individually indent wrapped lines of lines broken with \\
false
Just wondering why you didn't post minimal code? Here is one approach, taking into account the default behavior; as you can see, there's little more to do unless we know at least your pages geometry etc.: ``` \documentclass[12pt,letter]{article} \begin{document} \section{As posted} Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist, \\ Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word, \\ Saint Raphael, who didst lead Tobias safely through his journey to his home again, \\ \section{Some trials} Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist, \\ Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word, \\ Saint Raphael, who didst lead Tobias safely through his journey to his home again, \\ \end{document} ```
1
https://tex.stackexchange.com/users/245790
693802
321,858
https://tex.stackexchange.com/questions/693779
3
I have long lines like this: ``` Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist, \\ Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word, \\ Saint Raphael, who didst lead Tobias safely through his journey to his home again, \\ ``` Which render as: > > Saint Gabriel, who didst foretell to Zachary the birth and ministry of > John the Baptist, > > Saint Gabriel, who didst announce to Blessed Mary the Incarnation > of the Divine Word, > > Saint Raphael, who didst lead Tobias safely through his journey to > his home again, > > > But I want: > > Saint Gabriel, who didst foretell to Zachary the birth and ministry of >      John the Baptist, > > Saint Gabriel, who didst announce to Blessed Mary the Incarnation >      of the Divine Word, > > Saint Raphael, who didst lead Tobias safely through his journey to >      his home again, > > > How do I indent what is wrapped? Is there a way of doing with with a `\renewcommand{\\}{…}`?
https://tex.stackexchange.com/users/36603
Individually indent wrapped lines of lines broken with \\
false
I guess you want such text separated from the context by some vertical space and with wider margins. In this realization, the standard width is 75% of the column width, but you can specify a different one with an optional argument. I use this feature to show that when the width is the same as the column width, the lines fit exactly in the text box. Instead of `\\` I suggest to use blank lines, but it's up to you to choose. ``` \documentclass{article} \usepackage{lipsum} % for context \newenvironment{hymn}[1][0.75\columnwidth] {% \par\addvspace{\topsep}% \setlength{\parindent}{-\hymnindent}% \setlength{\leftskip}{\dimeval{(\columnwidth-#1)/2+\hymnindent}}% \setlength{\rightskip}{\dimeval{\leftskip-\hymnindent}}% \let\\=\par } {\par\addvspace{\topsep}} \newlength{\hymnindent} \AtBeginDocument{% \setlength{\hymnindent}{\parindent}% or whatever you prefer } \begin{document} \lipsum[1][1-4] \begin{hymn} Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist,\\ Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word,\\ Saint Raphael, who didst lead Tobias safely through his journey to his home again, and did something else which I write here just to show what happens with a long line \end{hymn} \lipsum[2][1-4] \begin{hymn}[\columnwidth] Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist, Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word, Saint Raphael, who didst lead Tobias safely through his journey to his home again, and did something else which I write here just to show what happens with a long line \end{hymn} \lipsum[3][1-4] \end{document} ``` You may want to have the headlines flush left. ``` \documentclass{article} \usepackage{lipsum} % for context \newenvironment{hymn}[1][0.75\columnwidth] {% \par\addvspace{\topsep}% \setlength{\parindent}{-\hymnindent}% \setlength{\leftskip}{\hymnindent} \setlength{\rightskip}{\dimeval{\columnwidth+\hymnindent-#1}}% \let\\=\par } {\par\addvspace{\topsep}} \newlength{\hymnindent} \AtBeginDocument{% \setlength{\hymnindent}{\parindent}% or whatever you prefer } \begin{document} \lipsum[1][1-4] \begin{hymn} Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist,\\ Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word,\\ Saint Raphael, who didst lead Tobias safely through his journey to his home again, and did something else which I write here just to show what happens with a long line \end{hymn} \lipsum[2][1-4] \begin{hymn}[\columnwidth] Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist, Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word, Saint Raphael, who didst lead Tobias safely through his journey to his home again, and did something else which I write here just to show what happens with a long line \end{hymn} \lipsum[3][1-4] \end{document} ``` With `parskip`: ``` \documentclass{article} \usepackage{parskip} \usepackage{lipsum} % for context \newenvironment{hymn}[1][0.75\columnwidth] {% \par \addvspace{\parskip}% \setlength{\parskip}{0pt}% \setlength{\parindent}{-\hymnindent}% \setlength{\leftskip}{\hymnindent}% \setlength{\rightskip}{\dimeval{\columnwidth+\hymnindent-#1}}% \let\\=\par } {\par} \newlength{\hymnindent} \AtBeginDocument{% \setlength{\hymnindent}{2em}% or whatever you prefer } \begin{document} \lipsum[1][1-4] \lipsum[1][1-4] \begin{hymn} Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist,\\ Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word,\\ Saint Raphael, who didst lead Tobias safely through his journey to his home again, and did something else which I write here just to show what happens with a long line \end{hymn} \lipsum[2][1-4] \lipsum[2][1-4] \begin{hymn}[\columnwidth] Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist, Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word, Saint Raphael, who didst lead Tobias safely through his journey to his home again, and did something else which I write here just to show what happens with a long line \end{hymn} \lipsum[3][1-4] \end{document} ```
3
https://tex.stackexchange.com/users/4427
693809
321,862
https://tex.stackexchange.com/questions/693795
2
I have seen that a number of packages exist that define symbols. How can I find a list of just the core symbols provided by the Latex Team, but without the use of packages like `amssymb`, `MnSymbol` and so on.
https://tex.stackexchange.com/users/302314
Latex list of symbols
true
The LaTeX Team are not responsible for font production and the Computer Modern and AMS fonts are always available so the symbols provided by `amssymb` are always available in LaTeX, the package just gives them command names. You can inspect the documented latex sources to see which command names are defined without any package by `texdoc source2e` [or online](https://texdoc.org/serve/source2e/0) in fontdef chapter B, pages following 598 which look like ... ...
5
https://tex.stackexchange.com/users/1090
693810
321,863
https://tex.stackexchange.com/questions/198905
3
I updated TeXstudio portable 2.6.6 to 2.8.2 by copying the content of the `zip`-file into the existing directory. Unfortunately, all settings, macros etc. were gone when starting the new TeXstudio. How can I update TeXstudio portable without loosing the settings, macros etc?
https://tex.stackexchange.com/users/14200
Update TeXstudio portable and keep settings
false
I came across this question just today, and the solution is now slightly different. You can still use the `texstudio.ini` file. Alternatively, you can choose "Save Profile..." in your old version, then "Load Profile..." in the updated version, under "Options". > > > Depending on how you updated, this may not transfer the *macros*, though. * If you *overwrote* your previous portable folder, then your macros probably remained. * If you simply renamed/deleted your old portable folder, and use the newly extracted one, then the macros won't be there. To get the macros,, there is a folder in `/config` called `macros`. Simply copy and paste that folder into your new `/config` folder.
0
https://tex.stackexchange.com/users/81928
693814
321,864
https://tex.stackexchange.com/questions/693795
2
I have seen that a number of packages exist that define symbols. How can I find a list of just the core symbols provided by the Latex Team, but without the use of packages like `amssymb`, `MnSymbol` and so on.
https://tex.stackexchange.com/users/302314
Latex list of symbols
false
I would like to suggest that you go through the [Comprehensive LaTeX Symbol List](https://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf) document *selectively*. The full 422-page document currently lists more than 18,000 symbols, grouped in 575 [!] tables. * To accommodate your apparent aversion to using any symbols that are not directly provided by the LaTeX kernel, I suggest you check the document's table of contents (which itself is 12 pages long) and look only for tables whose captions do *not* contain disturbing words such as `AMS`, `pifont`, `tipa`, etc etc. * Be careful: Some table captions may not contain a disturbing word, but a careful reading reveals that it's nevertheless necessary to load the `fontenc` package with options such as `T1`, `T4`, and `T5`. Since accessing these symbols requires loading at least one extra package, I will assume you want to exclude them from further consideration. Applying these exclusion restrictions leaves just 24 tables. They are * Table 1, LaTeX2e escapable "special" characters. E.g., `\$`, `\&`, `\%`. * Table 2, Predefined LaTeX2e text-mode commands. E.g., `\textbullet`, `\textendash`. * Table 3, LaTeX2e commands defined to work in both math and text mode. E.g., `\{`, `\}`, `\dag`, `\S`. * Table 18, Text-mode accents. `\"{a}`, `\'{e}`, `\c{c}`, `\u{g}`. * Table 48, Math-mode versions of text symbols. E.g., `\mathdollar`, `\mathsection`. * Table 50, Binary operators. `\cap`, `\cup`, `\times`, `\div`. * Table 72, Variable-sized math operators. `\bigcap`, `\bigcup`, `\sum`, `\int`. * Table 89, Binary relations. `\sim`, `\approx`, `\equiv`, `\perp`. * Table 113, Subset and superset relations. `\subset`, `\supset`. * Table 123, Inequalities. `\geq`, `\leq`, `\neq`. * Table 139, Arrows. `\leftarrow`, `\rightarrow`, `\uparrow`. * Table 140, Harpoons. `\leftharpoondown`, `\rightleftharpoons`. * Table 178, Extension characters. `\relbar`, `\Relbar`. * Table 183, Log-like symbols. `\log`, `\cos`, `\arctan`. * Table 188, Greek letters. `\alpha`, `\beta`, etc. * Table 203, Letter-like symbols. `\in`, `\partial`, `\imath`. * Table 222, Variable-sized delimiters. `\langle`, `\lfloor`, `rceil`. * Table 223, Large variable-sized delimiters (must be used with `\left` and `\right`). * Table 236, Math-mode accents. `\hat`, `\tilde`, `\bar`, `\dot`, `\ddot`. * Table 246, Extensible accents. `\widehat`, `\widetilde`, `\overline`. * Table 277, Dots. `\cdots`, `\ddots`, `\vdots`. * Table 302, Miscellaneous LaTeX2e math symbols. `\aleph`, `\nabla`, `\infty`. * Table 434, LaTeX2e musical symbols. `\flat`, `\natural`, `\sharp`. * Table 473, LaTeX2e playing-card suits. `\clubsuit`, `\diamdondsuit`, `\heartsuit`, `\spadesuit`. --- Just in case you're unsure about this: There is absolutely nothing virtuous, pure, or otherwise desirable about using only symbols that are listed in one of these 24 tables.
6
https://tex.stackexchange.com/users/5001
693817
321,866
https://tex.stackexchange.com/questions/301379
1
I have to write a list of two matrix equations. They are almost identical, but the elements in one matrix are slightly larger than the other one, which makes it look badly. ``` \begin{align} \begin{pmatrix} -\id & \id \\ \id & -\id \\ \end{pmatrix} u = 0 \\ \begin{pmatrix} \id & \id \\ \id & \id \end{pmatrix} v = 0 \end{align} ``` Is there a simple and elegant way to make the two matrices match size? I've found [this](https://tex.stackexchange.com/questions/288902/equal-spacing-in-two-matrices-with-matrix-entries-of-differing-length), but it is a much complex case than mine. Is there something simpler?
https://tex.stackexchange.com/users/54836
Stack of matrices with unequal sizes
false
The package `nicematrix` has tools designed to address that kind of problem. In particular, there is an environment `{NiceMatrixBlock}` with a key `auto-columns-width` to impose the same width for all the columns of the matrices in a given scope. However, you need several compilations. ``` \documentclass{article} \usepackage{nicematrix} \DeclareMathOperator{\id}{{id}} \begin{document} \begin{NiceMatrixBlock}[auto-columns-width] \NiceMatrixOptions{right-margin=2pt} \begin{align} \begin{pNiceMatrix}[r] -\id & \id \\ \id & -\id \\ \end{pNiceMatrix} u = 0 \\ \begin{pNiceMatrix}[r] \id & \id \\ \id & \id \end{pNiceMatrix} v = 0 \\ \begin{pNiceMatrix}[r] \id & \id \\ \id & \id \end{pNiceMatrix} v = 0 \end{align} \end{NiceMatrixBlock} \end{document} ```
1
https://tex.stackexchange.com/users/163000
693819
321,867
https://tex.stackexchange.com/questions/570585
0
i would like to use the \CUBE function from calculator package, but it does not work with numbers greater than 25 ``` \documentclass[10pt,a4paper]{article} \usepackage{relsize,amsmath} \usepackage{calculator} %%%%%%%%%%%%%% \begin{document} %%%%%%%%%%%%%%% \CUBE{5}{\sol} \sol\\ \CUBE{15}{\sol2} \sol2\\ \CUBE{25}{\sol3} \sol3\\ \CUBE{26}{\sol4} \sol4\\ \end{document} ``` i get the the error message: ``` ! Dimension too large. <recently read> \cctr@lengtha l.16 \CUBE{26}{\sol4} ? ``` Is there any help?
https://tex.stackexchange.com/users/199184
\CUBE function from calculator package do not work with numbers greater than 25
false
The calculator package can calculate up to 16,383.99998 (aka 214 − 2 × 10−5). So 263 > 16,383.99998, It can't calculate. Here's The cube table. | *x* | *x*3 | | --- | --- | | 1 | 13 = 1 | | 2 | 23 = 8 | | 3 | 33 = 27 | | ⋮ | ⋮ | | 24 | 243 = 13,824 | | 25 | 253 = 15,625 | | 26 | 263 = 17,576 |
-1
https://tex.stackexchange.com/users/302658
693820
321,868
https://tex.stackexchange.com/questions/513869
1
how can I make the sum of 2 variables in cm? Example: \y+ \n \x + \m Thank in advance Minimal coding: ``` \documentclass{article} \usepackage[absolute,overlay]{textpos} \usepackage{xcolor} \newcommand*{\x}{0.5cm} \newcommand*{\y}{2.0cm} \newcommand*{\m}{1.5cm} \newcommand*{\n}{2.5cm} \begin{document} \title{Texblock color} \textblockcolour{cyan} \begin{textblock*}{5cm}(2cm,10cm) 123 \end{textblock*} \textblockcolour{red} \begin{textblock*}{5cm}(\x,\y+\n) 456 \end{textblock*} \textblockcolour{yellow} \begin{textblock*}{5cm}(\x+\m,16cm) 789 \end{textblock*} \end{document} ```
https://tex.stackexchange.com/users/169612
sum of two variables
false
Use `calculator` package. ``` \documentclass{article} \usepackage{calculator} \usepackage{amsmath} \newcommand{\x}{0.5} \newcommand{\y}{2} \newcommand{\m}{1.5} \newcommand{\n}{2.5} \begin{document} \ADD{\x}{\y}{\one} \(\x\text{cm} + \y\text{cm} = \one\text{cm}\) \ADD{\m}{\n}{\two} And \(\m\text{cm} + \n\text{cm} = \two\text{cm}\) \end{document} ```
0
https://tex.stackexchange.com/users/302658
693828
321,871
https://tex.stackexchange.com/questions/825
41
How can I reduce the amount of space around items in an itemized or enumerated list? I would like to reduce the vertical space between items, the space to the left of the bullet, and the space between the bullet and the text.
https://tex.stackexchange.com/users/35
Remove space around bullet points in itemized or enumerated list
false
Complementing the answer provided by [Stefan](https://tex.stackexchange.com/a/831/183028), we can use the enumitem to create a compact list using the `\setlist{nolistsep}` or parametrizing each component of `\setlist`, as following: ``` \setlist{ topsep=0pt, partopsep=0pt, itemsep=0pt, parsep=0pt } ``` Where `topsep` and `partopsep` are the vertical space between the list and the paragraphs, `itemsep` is the vertical space between items, and `parsep` is the vertical space between the item's paragraphs. The below picture, from the [enumitem manual](https://ctan.org/pkg/enumitem), illustrates each parameter. It is worth noticing that we can also change horizontal spacing for a even more compact list.
0
https://tex.stackexchange.com/users/183028
693829
321,872
https://tex.stackexchange.com/questions/513869
1
how can I make the sum of 2 variables in cm? Example: \y+ \n \x + \m Thank in advance Minimal coding: ``` \documentclass{article} \usepackage[absolute,overlay]{textpos} \usepackage{xcolor} \newcommand*{\x}{0.5cm} \newcommand*{\y}{2.0cm} \newcommand*{\m}{1.5cm} \newcommand*{\n}{2.5cm} \begin{document} \title{Texblock color} \textblockcolour{cyan} \begin{textblock*}{5cm}(2cm,10cm) 123 \end{textblock*} \textblockcolour{red} \begin{textblock*}{5cm}(\x,\y+\n) 456 \end{textblock*} \textblockcolour{yellow} \begin{textblock*}{5cm}(\x+\m,16cm) 789 \end{textblock*} \end{document} ```
https://tex.stackexchange.com/users/169612
sum of two variables
false
I suggest not defining one-letter command, but to use a more semantic approach. ``` \documentclass{article} \usepackage[absolute,overlay]{textpos} \usepackage{xcolor} \ExplSyntaxOn \NewDocumentCommand{\definevar}{mm} { \tl_clear_new:c { l_forti_var_#1_tl } \tl_set:cn { l_forti_var_#1_tl } { #2 } } \NewExpandableDocumentCommand{\usevar}{m} { \tl_use:c { l_forti_var_#1_tl } } \ExplSyntaxOff \definevar{x}{0.5cm} \definevar{y}{2.0cm} \definevar{m}{1.5cm} \definevar{n}{2.5cm} \begin{document} \title{Texblock color} \textblockcolour{cyan} \begin{textblock*}{5cm}(2cm,10cm) 123 \end{textblock*} \textblockcolour{red} \begin{textblock*}{5cm}(\usevar{x},\dimeval{\usevar{y}+\usevar{n}}) 456 \end{textblock*} \textblockcolour{yellow} \begin{textblock*}{5cm}(\dimeval{\usevar{x}+\usevar{m}},16cm) 789 \end{textblock*} \end{document} ``` You can still go the `\newcommand` way, with the same syntax with `\dimeval` to perform the operation, so like ``` \begin{textblock*}{5cm}(\x,\dimeval{\y+\n}) ``` if you prefer the style I don't recommend.
2
https://tex.stackexchange.com/users/4427
693831
321,874
https://tex.stackexchange.com/questions/689896
1
Using the documentclass `tufte-book` with `biblatex` requires seemingly the option `[nobib]` [following this question](https://tex.stackexchange.com/questions/587605/tufte-book-biblatex-error-biblatex-incompatible-with-natbib). Using a current version of lualatex ``` This is LuaHBTeX, Version 1.15.0 (TeX Live 2022/Debian) (format=lualatex 2023.6.17) 29 JUN 2023 15:24 restricted system commands enabled. ``` and the versions of `tufte-book` from github the desired `pdf` are produced but I have a number of error messages (and sometimes no output). What needs to be changed in my MVE: ``` \documentclass[nobib] {tufte-handout} \usepackage{fontspec} \usepackage{csquotes} \usepackage[english]{babel} \usepackage{microtype} \renewcommand{\allcapsspacing}[1]{\textls[200]{#1}}% \renewcommand{\smallcapsspacing}[1]{\textls[50]{#1}}% \usepackage[backend=biber, style=authoryear, autocite=footnote, ]{biblatex} \addbibresource{xxxxxxx/BibTexLatex.bib} \usepackage{makeidx} \makeindex \begin{document} With a reference to \autocite{frank09geo} and unpublished \autocite{hamster11}. \printbibliography \end{document} ``` The error messages start with ``` Argument of \MakeLowercase has an extra }. Paragraph ended before \MakeLowercase was complete. Paragraph ended before \MakeLowercase was complete. ``` ... My bib entries are: ``` @Unpublished{hamster11, author = {Andrew U. Frank}, date = {2011-02-11}, title = {User Manual for {HAMSTER}}, abstract = {Hamster deals with three issues of importance.}, file = {docs/docsH/Manual_GUI.pdf}, owner = {frank}, timestamp = {2018.11.30}, year = {2011}, } @InProceedings{frank09geo, author = {Frank, Andrew U.}, title = {Geo-Ontologies Are Scale Dependent (abstract only)}, booktitle = {European Geosciences Union, General Assembly 2009, Session Knowledge and Ontologies}, year = {2009}, editor = {Pulkkinen, Tuija}, url = {http://publik.tuwien.ac.at/files/PubDat-175453.pdf}, file = {docs/docs4/4698_GeoOntologies_abstarct_EUG_09.pdf}, groups = {authorAF}, keywords = {Onto}, owner = {frank}, timestamp = {2018.11.29}, } ```
https://tex.stackexchange.com/users/161067
documentclass tufte-latex produces error messages with biblatex
true
The answer @UlrikeFischer worked perfectly. Just add: \renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}
0
https://tex.stackexchange.com/users/161067
693833
321,875
https://tex.stackexchange.com/questions/689997
0
A `tufte-handout` produces a `sementation fault` for a minimal text including an `\emph`. When I remove surrounding text, it compiles with lualatex. An `\emph` at another spot works ok as well. Running in documentclass `article` works as well. What causes the fault? ``` \documentclass[a4paper,openany,nobib] %openright to force parts and chapter to start right {tufte-handout} %testhandout testzwei \usepackage{microtype} \renewcommand{\allcapsspacing}[1]{\textls[200]{#1}}% \renewcommand{\smallcapsspacing}[1]{\textls[50]{#1}}% \renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}} \renewcommand{\allcaps}[1]{\allcapsspacing{\MakeTextUppercase{#1}}}% \renewcommand{\smallcaps}[1]{\smallcapsspacing{\scshape\MakeTextLowercase{#1}}}% ``` \usepackage[ngerman]{babel} % was originally lost, % readded per comment from Ulrike Fisher ``` % -- -- --- ---------- ---- ---- --------------- \begin{document} some text \emph{other text} is ok (alone) Ein besseres Bild der Realwirtschaft bieten wohl die weniger verzerrten Werte für die\emph{Haushaltsausgaben} pro Kopf. Hier liegen die Industrieländer näher zusammen und die Werte scheinen mir realistischer. \end{document} ``` The log file in a terminal is ``` This is LuaHBTeX, Version 1.15.0 (TeX Live 2022/Debian) restricted system commands enabled. (./025_6_1.tex LaTeX2e <2022-11-01> patch level 1 L3 programming layer <2023-01-16> (/usr/share/texlive/texmf-dist/tex/latex/tufte-latex/tufte-handout.cls Document Class: tufte-handout 2015/06/21 v3.5.2 Tufte-handout class (/usr/share/texlive/texmf-dist/tex/latex/tufte-latex/tufte-common.def (/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty (/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex (/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex (/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex)))) (/usr/share/texlive/texmf-dist/tex/latex/xifthen/xifthen.sty (/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty) (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty) (/usr/share/texlive/texmf-dist/tex/latex/ifmtarg/ifmtarg.sty)) (/usr/share/texlive/texmf-dist/tex/latex/hardwrap/hardwrap.sty (/usr/share/texlive/texmf-dist/tex/latex/ifplatform/ifplatform.sty (/usr/share/texlive/texmf-dist/tex/latex/tools/shellesc.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/iftex/iftex.sty) (/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)) (/usr/share/texlive/texmf-dist/tex/generic/catchfile/catchfile.sty (/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty)) (/usr/share/texlive/texmf-dist/tex/generic/iftex/ifluatex.sty)) (/usr/share/texlive/texmf-dist/tex/generic/iftex/ifxetex.sty)) (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2022/07/02 v1.4n Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (/usr/share/texlive/texmf-dist/tex/generic/iftex/ifpdf.sty) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-luatex.def))) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (/usr/share/texlive/texmf-dist/tex/latex/psnfss/mathpazo.sty) (/usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.sty) (/usr/share/texlive/texmf-dist/tex/latex/titlesec/titletoc.sty) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty (/usr/share/texlive/texmf-dist/tex/latex/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/hyperref/nameref.sty (/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty) (/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.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/latex/hyperref/puenc.def) (/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/hluatex.def (/usr/share/texlive/texmf-dist/tex/generic/stringenc/stringenc.sty) (/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/ragged2e/ragged2e.sty) (/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty (/usr/share/texlive/texmf-dist/tex/generic/iftex/ifvtex.sty)) (/usr/share/texlive/texmf-dist/tex/latex/changepage/changepage.sty) (/usr/share/texlive/texmf-dist/tex/latex/paralist/paralist.sty) (/usr/share/texlive/texmf-dist/tex/latex/textcase/textcase.sty) (/usr/share/texlive/texmf-dist/tex/generic/soul/soul.sty) (/usr/share/texlive/texmf-dist/tex/latex/setspace/setspace.sty) (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg) (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/luatex.def) (/usr/share/texlive/texmf-dist/tex/latex/graphics/mathcolor.ltx) (/usr/share/texlive/texmf-dist/tex/latex/graphics/dvipsnam.def) (/usr/share/texlive/texmf-dist/tex/latex/xcolor/svgnam.def)) (/usr/share/texlive/texmf-dist/tex/latex/sauerj/optparams.sty) (/usr/share/texlive/texmf-dist/tex/latex/placeins/placeins.sty) (/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty) (/usr/share/texlive/texmf-dist/tex/latex/tools/multicol.sty))) (/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.sty (/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty) (/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.def) (/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.cfg)) (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty (/usr/share/texlive/texmf-dist/tex/generic/babel/luababel.def) (/usr/share/texlive/texmf-dist/tex/generic/babel/luababel.def) (/usr/share/texlive/texmf-dist/tex/generic/babel-german/ngerman.ldf (/usr/share/texlive/texmf-dist/tex/generic/babel-german/ngermanb.ldf (/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-de-1996. tex UTF-8 German hyphenation patterns (reformed orthography) (/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-de-1996. tex German Hyphenation Patterns (Reformed Orthography, 2006) `dehyphn-x' 2021-02-26 (WL)))))) (/usr/share/texlive/texmf-dist/tex/generic/babel/locale/de/babel-ngerman.tex) (/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.sty (/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype-luatex.def) (/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.cfg)) LaTeX Warning: Unused global option(s): [openany]. (./025_6_1.aux) (/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd) (./025_6_1.out) (./025_6_1.out) *geometry* driver: auto-detecting *geometry* detected driver: luatex (/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) Package microtype Warning: Unable to apply patch `footnote' on input line 42. (/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-Palatino.cfg)Segmentation fault frank@santafe:~/bakedHomepage/Essays/Worldorder/p20situation$ ```
https://tex.stackexchange.com/users/161067
A small text with `\emph` in a `tufte-handout` produces a segmentation fault
true
The issue was, as @UlrikeFischer pointed out, with an old version of texlive. Install `texlive-2023` and the problem is solved.
0
https://tex.stackexchange.com/users/161067
693834
321,876
https://tex.stackexchange.com/questions/693836
9
pgfmanual.pdf, VII Utilities, Repeating Things: The Foreach Statement, says: > > `\foreach \x in {0,0.1,...,0.5} {\x, }` yields 0, 0.1, 0.20001, 0.30002, 0.40002, > > > and warns about rounding-errors causing this. Is doing things in terms of expl3's `\fp_step_inline:nnnn` generally safer? (If I do ``` \documentclass{article} \begin{document} \ExplSyntaxOn\fp_step_inline:nnnn {0}{0.1}{0.5}{#1,~}\ExplSyntaxOff \end{document} ``` , then I get: "0, 0.1, 0.2, 0.3, 0.4, 0.5, " .)
https://tex.stackexchange.com/users/301872
Calculating things with TikZ/pgf versus calculating things with l3fp
true
Yes, `\fp_step_inline:nnnn` uses decimal floating point values with 16 digits precision, so unless you need more than 16 significant digits, all values only involving numbers expressable as decimal numbers should provide precise results. As a downside the calculations will be slower though.
11
https://tex.stackexchange.com/users/80496
693838
321,879
https://tex.stackexchange.com/questions/692424
1
I am trying to convert the HTML output with MathML and TeX equations based on the brilliant Solution given by [michal.h21](https://tex.stackexchange.com/users/2891/michal-h21) in the below Thread 1. [Make4HT with \begin{align} (MathML and LaTeX Output)](https://tex.stackexchange.com/questions/637885/make4ht-with-beginalign-mathml-and-latex-output/637910#637910) 2. [mathml configuration](https://tex.stackexchange.com/questions/270155/mathml-configuration) I have a problem when converting HTML 1. when using `\begin{equation}/begin{equation*}` showing error ``` ! Missing } inserted. } l.26 \end {equation*} ``` 2. for Double `$$` used equation, TeX equation part not converted in the HTML output 3. Need to re-configure for the Equation Number (label) as `<eqno id="x1-3r2">(1)</eqno>` of the all display Numbered Equation/environment (this is for cleanup purpose to move the equation Label to outside of the MathML and restructure the XML tag) `<display-math><label>..<label><mathML>...</mathML><tex-math>...</tex-math>` Here is my MWE: I am running a file through `make4ht` - `make4ht -l -a debug -c myconfig.cfg Sample.tex` ``` \documentclass[9pt]{book} \usepackage[utf8]{inputenc} \usepackage{hyperref} \usepackage{amsmath,amssymb} \usepackage{xspace} \newcommand\eqannotate[1]{#1} \begin{document} Display equation with doble dollar $$ a+b=c $$ Display equation (equation env) \begin{equation} x+y=1 \end{equation} Display equation (equation env) \begin{equation*} x+y=z \end{equation*} eqnarray environment \begin{eqnarray} x+y=1 \end{eqnarray} display equation \[ d+f=g \] we revealed a universal physical behaviour in the experimentally observed binding of two well-characterized NTRs, \begin{align} W^{(i)}(z) &= c^{(i)}(z) + V_{ext}^{(i)}(z) + \int \rho^{(3)}(z) u^{(i)}(z-z')\textrm{d}z' - \mu^{(i)} \nonumber, \\ & \approx - k_{\textrm{B}}T \ln \left( \frac{\rho^{(i)}(z)}{\rho^{(i)}_{\textrm{bulk}}} \right), \end{align} Was Further validated by a minimal physical model that treated the FG Nups as flexible homopolymers the NTRs as uniformly cohesive spheres. \begin{align*} W^{(i)}(z) &= c^{(i)}(z) + V_{ext}^{(i)}(z) + \int \rho^{(3)}(z) u^{(i)}(z-z')\textrm{d}z' - \mu^{(i)} \nonumber, \\ & \approx - k_{\textrm{B}}T \ln \left( \frac{\rho^{(i)}(z)}{\rho^{(i)}_{\textrm{bulk}}} \right), \end{align*} \end{document} ``` MY CFG ``` \Configure{ext}{xhtml} \Preamble{xhtml,mathml,NLM,charset=UTF-8,-xtpipes,NoFonts,refcaption,ext=.xhtml} \Configure{HtmlPar}{\EndP\HCode{<p class="noindent">}} {\EndP\HCode{<p class="\ifdim\parindent=0pt no\fi indent">}} {\HCode{</p>}} {\HCode{</p>}} \Configure{HTML}{\HCode{<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML">}} {\HCode{</html>}} \Configure{mathml}{mml:} \Configure{MathClass}{0}{*}{<mml:mi>}{</mml:mi>}{} \Configure{MathClass}{1}{*}{<mml:mo mmlclass="MathClass-op">}{</mml:mo>}{} \Configure{MathClass}{2}{*}{<mml:mo mmlclass="MathClass-bin">}{</mml:mo>}{} \Configure{MathClass}{3}{*}{<mml:mo mmlclass="MathClass-rel">}{</mml:mo>}{} \Configure{MathClass}{4}{*}{<mml:mrow><mml:mo mmlclass="MathClass-open">} {</mml:mo><mml:mrow>}{} \Configure{MathClass}{5}{*}{</mml:mrow><mml:mo mmlclass="MathClass-close">} {</mml:mo></mml:mrow>}{} \Configure{MathClass}{6}{*}{<mml:mo mmlclass="MathClass-punc">}{</mml:mo>}{} \Configure{MathClass}{7}{*}{<mml:mn>}{</mml:mn>} {0123456789} \newtoks\eqtoks \ExplSyntaxOn \cs_new_protected:Npn \alteqtoks #1 { \tl_set:Nx \l_tmpa_tl {\detokenize{#1}} % % replace < > and & with xml entities \regex_replace_all:nnN { \x{26} } { &amp; } \l_tmpa_tl \regex_replace_all:nnN { \x{3C} } { &lt; } \l_tmpa_tl \regex_replace_all:nnN { \x{3E} } { &gt; } \l_tmpa_tl % replace \par command with blank lines \regex_replace_all:nnN { \x{5C}par\b } {\x{A}\x{A}} \l_tmpa_tl \tl_set:Nx \eqtoks{ \l_tmpa_tl } %\HCode{\l_tmpb_tl} } \ExplSyntaxOff \def\AltMath#1${\alteqtoks{#1}% #1\HCode{</mrow><annotation encoding="application/x-tex">\eqtoks</annotation>}$} \Configure{$}{\Configure{@math}{display="inline"}\DviMath\HCode{<semantics><mrow>}}{\HCode{</semantics>}\EndDviMath}{\expandafter\AltMath} \long\def\AltDisplay#1\]{\alteqtoks{#1}#1\HCode{</mrow><annotation encoding="application/x-tex">\eqtoks</annotation></semantics>}\]} \Configure{[]}{\Configure{@math}{display="block"}\DviMath$$\DisplayMathtrue\HCode{<semantics><mrow>}\AltDisplay}{$$\EndDviMath} \renewcommand\eqannotate[1]{\alteqtoks{#1}\HCode{<semantics><mrow>}#1\HCode{</mrow><annotation encoding="application/x-tex">\eqtoks</annotation></semantics>}} % environment support \newcommand\VerbMathToks[2]{% \alteqtoks{\begin{#2} #1 \end{#2}}% \ifvmode\IgnorePar\fi\EndP\Configure{@math}{display="block"}\DviMath\DisplayMathtrue\HCode{<semantics><mrow>} \begin{old#2} #1 \end{old#2} \HCode{</mrow><annotation encoding="application/x-tex">} \HCode{\eqtoks} \HCode{</annotation></semantics>} \EndDviMath } \ExplSyntaxOn \newcommand\VerbMath[1]{% \cs_if_exist:cTF{#1}{ \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname \expandafter\let\csname endold#1\expandafter\endcsname\csname end#1\endcsname \RenewDocumentEnvironment{#1}{+!b}{% \NoFonts\expandafter\VerbMathToks\expandafter{##1}{#1}\EndNoFonts% }{} }{}% } \ExplSyntaxOff \begin{document} \VerbMath{aligned} \VerbMath{alignedat} \VerbMath{gather} \VerbMath{gather*} \VerbMath{alignat} \VerbMath{alignat*} \VerbMath{xalignat} \VerbMath{xalignat*} \VerbMath{xxalignat} \VerbMath{align} \VerbMath{align*} \VerbMath{flalign} \VerbMath{flalign*} \VerbMath{multline} \VerbMath{multline*} \VerbMath{equation} \VerbMath{equation*} \VerbMath{math} \VerbMath{displaymath} \VerbMath{eqnarray} \VerbMath{eqnarray*} \EndPreamble ```
https://tex.stackexchange.com/users/33673
Make4HT - HTML with LaTeX equation and MathML output
true
I would base the code on the [newer answer](https://tex.stackexchange.com/a/637910/2891). The second seems obsolete. It just needs a fix for equations, they cause the compilation error. Other than that, it mostly works. Except for `$$ ... $$` math, I cannot find a correct solution. Here is the updated config file: ``` \Preamble{xhtml,mathml,mathjax} \newtoks\eqtoks \ExplSyntaxOn \cs_new_protected:Npn \alteqtoks #1 { \tl_set:Nx \l_tmpa_tl {\detokenize{#1}} % % replace < > and & with xml entities \regex_replace_all:nnN { \x{26} } { &amp; } \l_tmpa_tl \regex_replace_all:nnN { \x{3C} } { &lt; } \l_tmpa_tl \regex_replace_all:nnN { \x{3E} } { &gt; } \l_tmpa_tl % replace \par command with blank lines \regex_replace_all:nnN { \x{5C}par\b } {\x{A}\x{A}} \l_tmpa_tl \tl_set:Nx \eqtoks{ \l_tmpa_tl } %\HCode{\l_tmpb_tl} } \ExplSyntaxOff \def\AltMath#1${\alteqtoks{#1}% #1\HCode{</mrow><annotation encoding="application/x-tex">\eqtoks</annotation>}$} \Configure{$}{\Configure{@math}{display="inline"}\DviMath\HCode{<semantics><mrow>}}{\HCode{</semantics>}\EndDviMath}{\expandafter\AltMath} \long\def\AltDisplay#1\]{\alteqtoks{#1}#1\HCode{</mrow><annotation encoding="application/x-tex">\eqtoks</annotation></semantics>}\]} \Configure{[]}{\Configure{@math}{display="block"}\DviMath$$\DisplayMathtrue\HCode{<semantics><mrow>}\AltDisplay}{$$\EndDviMath} \renewcommand\eqannotate[1]{\alteqtoks{#1}\HCode{<semantics><mrow>}#1\HCode{</mrow><annotation encoding="application/x-tex">\eqtoks</annotation></semantics>}} % environment support \newcommand\VerbMathToks[2]{% \alteqtoks{\begin{#2} #1 \end{#2}}% \begingroup% \ifvmode\IgnorePar\fi\EndP\Configure{@math}{display="block"}\DviMath\DisplayMathtrue\HCode{<semantics><mrow>} \Configure{$$}{}{}{} \begin{old#2} #1 \end{old#2} \HCode{</mrow><annotation encoding="application/x-tex">} \HCode{\eqtoks} \HCode{</annotation></semantics>} \EndDviMath \endgroup } \makeatletter % we must handle equations separatelly. % it is a bit messy \newcommand\VerbMathToksEquation[2]{% \alteqtoks{\begin{#2} #1 \end{#2}}% \begingroup% \def\@tempa{#2}% \def\@equationname{equation}% \def\mlabeledtr{mtr} \ifx\@equationname\@tempa% \def\mlabeledtr{mlabeledtr} % this element can be used to print the equation number, but it is supported only by MathJax \fi \ifvmode\IgnorePar\fi\EndP\Configure{@math}{display="block"}\DviMath\DisplayMathtrue\HCode{<semantics><mrow><mtable><\mlabeledtr><mtd>}% \ifx\@equationname\@tempa% \incr@eqnum% \print@eqnum% \HCode{</mtd><mtd>}% \fi #1% \HCode{</mtd></\mlabeledtr></mtable></mrow><annotation encoding="application/x-tex">}% \HCode{\eqtoks}% \HCode{</annotation></semantics>}% \EndDviMath% \endgroup% } \makeatother \ExplSyntaxOn \newcommand\VerbMath[1]{% \cs_if_exist:cTF{#1}{ \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname \expandafter\let\csname endold#1\expandafter\endcsname\csname end#1\endcsname \RenewDocumentEnvironment{#1}{+!b}{% \NoFonts\expandafter\VerbMathToks\expandafter{##1}{#1}\EndNoFonts% }{} }{}% } \newcommand\VerbEquation[1]{% \cs_if_exist:cTF{#1}{ \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname \expandafter\let\csname endold#1\expandafter\endcsname\csname end#1\endcsname \RenewDocumentEnvironment{#1}{+!b}{% \NoFonts\expandafter\VerbMathToksEquation\expandafter{##1}{#1}\EndNoFonts% }{} }{}% } \ExplSyntaxOff \begin{document} \VerbMath{subarray} \VerbMath{smallmatrix} \VerbMath{matrix} \VerbMath{pmatrix} \VerbMath{bmatrix} \VerbMath{Bmatrix} \VerbMath{vmatrix} \VerbMath{Vmatrix} \VerbMath{cases} \VerbMath{subequations} \VerbMath{aligned} \VerbMath{alignedat} \VerbMath{gathered} \VerbMath{gather} \VerbMath{gather*} \VerbMath{alignat} \VerbMath{alignat*} \VerbMath{xalignat} \VerbMath{xalignat*} \VerbMath{xxalignat} \VerbMath{align} \VerbMath{align*} \VerbMath{flalign} \VerbMath{flalign*} \VerbMath{split} \VerbMath{multline} \VerbMath{multline*} \VerbEquation{equation} \VerbEquation{equation*} \VerbMath{math} \VerbMath{displaymath} \VerbMath{eqnarray} \VerbMath{eqnarray*} \EndPreamble ``` This is the result: ``` <!DOCTYPE html> <html lang='en-US' xml:lang='en-US'> <head> <title></title> <meta charset='utf-8' /> <meta content='TeX4ht (https://tug.org/tex4ht/)' name='generator' /> <meta content='width=device-width,initial-scale=1' name='viewport' /> <link href='sample.css' rel='stylesheet' type='text/css' /> <meta content='sample.tex' name='src' /> <script async='async' id='MathJax-script' src='https://cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js' type='text/javascript'></script> </head><body> <!-- l. 10 --><p class='noindent'>Inline math <!-- l. 10 --><math display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><semantics><mrow><mi>a</mi> <mo class='MathClass-bin' stretchy='false'>+</mo> <mi>b</mi> <mo class='MathClass-rel' stretchy='false'>=</mo> <mi>c</mi></mrow><annotation encoding='application/x-tex'>a+b=c</annotation></semantics></math> </p><!-- l. 12 --><p class='indent'> Display equation with doble dollar <!-- tex4ht:inline --></p><!-- l. 13 --><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mrow> <mi>a</mi> <mo class='MathClass-bin' stretchy='false'>+</mo> <mi>b</mi> <mo class='MathClass-rel' stretchy='false'>=</mo> <mi>c</mi> </mrow></math> <!-- l. 15 --><p class='nopar'> </p><!-- l. 18 --><p class='indent'> <!-- l. 18 --><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mrow> <semantics><mrow><mi>a</mi> <mo class='MathClass-bin' stretchy='false'>+</mo> <mi>b</mi> <mo class='MathClass-rel' stretchy='false'>=</mo> <mi>c</mi></mrow><annotation encoding='application/x-tex'> a+b=c </annotation></semantics> </mrow></math> </p><!-- l. 22 --><p class='indent'> Display equation (equation env) </p><!-- l. 25 --><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><semantics><mrow><mtable><mlabeledtr><mtd><mstyle class='label' id='x1-2r1'></mstyle><!-- endlabel --><mstyle class='maketag'><mtext>(1)</mtext></mstyle><mspace class='nbsp' width='0.33em'></mspace></mtd><mtd> <mi>x</mi><mo class='MathClass-bin' stretchy='false'>+</mo><mi>y</mi><mo class='MathClass-rel' stretchy='false'>=</mo><mn>1</mn> </mtd></mlabeledtr></mtable></mrow><annotation encoding='application/x-tex'>\begin {equation} x+y=1 \end {equation}</annotation></semantics></math> <!-- l. 27 --><p class='indent'> Display equation (equation* env) </p><!-- l. 30 --><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><semantics><mrow><mtable><mtr><mtd> <mi>x</mi><mo class='MathClass-bin' stretchy='false'>+</mo><mi>y</mi><mo class='MathClass-rel' stretchy='false'>=</mo><mi>z</mi> </mtd></mtr></mtable></mrow><annotation encoding='application/x-tex'>\begin {equation*} x+y=z \end {equation*}</annotation></semantics></math> <!-- l. 32 --><p class='indent'> eqnarray environment </p><!-- l. 35 --><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mrow><semantics><mrow> <mtable class='eqnarray' columnalign='right center left' displaystyle='true'> <mtr><mtd class='eqnarray-1'> <mi>x</mi> <mo class='MathClass-bin' stretchy='false'>+</mo> <mi>y</mi> <mo class='MathClass-rel' stretchy='false'>=</mo> <mn>1</mn></mtd><mtd class='eqnarray-2'> </mtd><mtd class='eqnarray-3'> </mtd><mtd class='eqnarray-4'> <mtext class='eqnarray'>(2)</mtext><mtext class='label' id='x1-3r'></mtext><mtext class='endlabel'></mtext></mtd> </mtr></mtable> </mrow><annotation encoding='application/x-tex'> \begin {eqnarray} x+y=1 \end {eqnarray} </annotation></semantics> </mrow></math> <!-- l. 37 --><p class='indent'> display equation <!-- l. 38 --><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mrow> <semantics><mrow><mi>d</mi> <mo class='MathClass-bin' stretchy='false'>+</mo> <mi>f</mi> <mo class='MathClass-rel' stretchy='false'>=</mo> <mi>g</mi></mrow><annotation encoding='application/x-tex'> d+f=g </annotation></semantics> </mrow></math> </p><!-- l. 42 --><p class='indent'> we revealed a universal physical behaviour in the experimentally observed binding of two well-characterized NTRs, </p><!-- l. 46 --><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mrow><semantics><mrow> <!-- tex4ht:inline --><mrow><mtable class='align' columnalign='left' displaystyle='true'> <mtr><mtd class='align-odd' columnalign='right'><msup><mrow><mi>W</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi><mo class='MathClass-close' stretchy='false'>)</mo></mtd> <mtd class='align-even'> <mo class='MathClass-rel' stretchy='false'>=</mo> <msup><mrow><mi>c</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi><mo class='MathClass-close' stretchy='false'>)</mo> <mo class='MathClass-bin' stretchy='false'>+</mo> <msubsup><mrow><mi>V</mi> </mrow><mrow> <mi mathvariant='italic'>ext</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msubsup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi><mo class='MathClass-close' stretchy='false'>)</mo> <mo class='MathClass-bin' stretchy='false'>+</mo><mo> ∫ <!-- nolimits --></mo><!-- nolimits --><msup><mrow><mi>ρ</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mn>3</mn><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi><mo class='MathClass-close' stretchy='false'>)</mo><msup><mrow><mi>u</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi> <mo class='MathClass-bin' stretchy='false'>−</mo> <msup><mrow><mi>z</mi></mrow><mrow><mi>′</mi></mrow></msup><mo class='MathClass-close' stretchy='false'>)</mo><mstyle class='text'><mtext class='textrm' mathvariant='normal'>d</mtext></mstyle><msup><mrow><mi>z</mi></mrow><mrow><mi>′</mi></mrow></msup><mo class='MathClass-bin' stretchy='false'>−</mo> <msup><mrow><mi>μ</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-punc' stretchy='false'>,</mo><mspace width='2em'></mspace></mtd> <mtd class='align-label' columnalign='right'></mtd> <mtd class='align-label'> <mspace width='2em'></mspace></mtd></mtr><mtr><mtd class='align-odd' columnalign='right'></mtd> <mtd class='align-even'> <mo class='MathClass-rel' stretchy='false'>≈</mo><mo class='MathClass-bin' stretchy='false'>−</mo><msub><mrow><mi>k</mi></mrow><mrow><mstyle class='text'><mtext class='textrm' mathvariant='normal'>B</mtext></mstyle></mrow></msub><mi>T</mi><mi class='qopname'>ln</mi><mo> ⁡<!-- FUNCTION APPLICATION --> </mo><!-- nolimits --> <mrow><mo fence='true' form='prefix'> (</mo><mrow> <mfrac><mrow><msup><mrow><mi>ρ</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow> <mrow><msubsup><mrow><mi>ρ</mi></mrow><mrow><mstyle class='text'><mtext class='textrm' mathvariant='normal'>bulk</mtext></mstyle></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msubsup></mrow></mfrac> </mrow><mo fence='true' form='postfix'>)</mo></mrow> <mo class='MathClass-punc' stretchy='false'>,</mo><mspace width='2em'></mspace></mtd> <mtd class='align-label' columnalign='right'><mstyle class='label' id='x1-4r3'></mstyle><!-- endlabel --><mstyle class='maketag'><mtext>(3)</mtext></mstyle><mspace class='nbsp' width='0.33em'></mspace> </mtd></mtr></mtable></mrow> </mrow><annotation encoding='application/x-tex'> \begin {align} W^{(i)}(z) &amp;= c^{(i)}(z) + V_{ext}^{(i)}(z) + \int \rho ^{(3)}(z) u^{(i)}(z-z')\textrm {d}z' - \mu ^{(i)} \nonumber , \\ &amp; \approx - k_{\textrm {B}}T \ln \left ( \frac {\rho ^{(i)}(z)}{\rho ^{(i)}_{\textrm {bulk}}} \right ), \end {align} </annotation></semantics> </mrow></math> <!-- l. 48 --><p class='noindent'>Was Further validated by a minimal physical model that treated the FG Nups as flexible homopolymers the NTRs as uniformly cohesive spheres. </p><!-- l. 52 --><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mrow><semantics><mrow> <!-- tex4ht:inline --><mrow><mtable class='align-star' columnalign='left' displaystyle='true'> <mtr><mtd class='align-odd' columnalign='right'><msup><mrow><mi>W</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi><mo class='MathClass-close' stretchy='false'>)</mo></mtd> <mtd class='align-even'> <mo class='MathClass-rel' stretchy='false'>=</mo> <msup><mrow><mi>c</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi><mo class='MathClass-close' stretchy='false'>)</mo> <mo class='MathClass-bin' stretchy='false'>+</mo> <msubsup><mrow><mi>V</mi> </mrow><mrow> <mi mathvariant='italic'>ext</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msubsup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi><mo class='MathClass-close' stretchy='false'>)</mo> <mo class='MathClass-bin' stretchy='false'>+</mo><mo> ∫ <!-- nolimits --></mo><!-- nolimits --><msup><mrow><mi>ρ</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mn>3</mn><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi><mo class='MathClass-close' stretchy='false'>)</mo><msup><mrow><mi>u</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi> <mo class='MathClass-bin' stretchy='false'>−</mo> <msup><mrow><mi>z</mi></mrow><mrow><mi>′</mi></mrow></msup><mo class='MathClass-close' stretchy='false'>)</mo><mstyle class='text'><mtext class='textrm' mathvariant='normal'>d</mtext></mstyle><msup><mrow><mi>z</mi></mrow><mrow><mi>′</mi></mrow></msup><mo class='MathClass-bin' stretchy='false'>−</mo> <msup><mrow><mi>μ</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-punc' stretchy='false'>,</mo><mspace width='2em'></mspace></mtd> <mtd class='align-label' columnalign='right'></mtd> <mtd class='align-label'> <mspace width='2em'></mspace></mtd></mtr><mtr><mtd class='align-odd' columnalign='right'></mtd> <mtd class='align-even'> <mo class='MathClass-rel' stretchy='false'>≈</mo><mo class='MathClass-bin' stretchy='false'>−</mo><msub><mrow><mi>k</mi></mrow><mrow><mstyle class='text'><mtext class='textrm' mathvariant='normal'>B</mtext></mstyle></mrow></msub><mi>T</mi><mi class='qopname'>ln</mi><mo> ⁡<!-- FUNCTION APPLICATION --> </mo><!-- nolimits --> <mrow><mo fence='true' form='prefix'> (</mo><mrow> <mfrac><mrow><msup><mrow><mi>ρ</mi></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msup><mo class='MathClass-open' stretchy='false'>(</mo><mi>z</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow> <mrow><msubsup><mrow><mi>ρ</mi></mrow><mrow><mstyle class='text'><mtext class='textrm' mathvariant='normal'>bulk</mtext></mstyle></mrow><mrow><mo class='MathClass-open' stretchy='false'>(</mo><mi>i</mi><mo class='MathClass-close' stretchy='false'>)</mo></mrow></msubsup></mrow></mfrac> </mrow><mo fence='true' form='postfix'>)</mo></mrow> <mo class='MathClass-punc' stretchy='false'>,</mo><mspace width='2em'></mspace></mtd> <mtd class='align-label' columnalign='right'></mtd> <mtd class='align-label'><mspace width='2em'></mspace></mtd></mtr></mtable></mrow> </mrow><annotation encoding='application/x-tex'> \begin {align*} W^{(i)}(z) &amp;= c^{(i)}(z) + V_{ext}^{(i)}(z) + \int \rho ^{(3)}(z) u^{(i)}(z-z')\textrm {d}z' - \mu ^{(i)} \nonumber , \\ &amp; \approx - k_{\textrm {B}}T \ln \left ( \frac {\rho ^{(i)}(z)}{\rho ^{(i)}_{\textrm {bulk}}} \right ), \end {align*} </annotation></semantics> </mrow></math> </body> </html> ```
2
https://tex.stackexchange.com/users/2891
693839
321,880
https://tex.stackexchange.com/questions/693821
0
I am building an online `LaTeX` editor and now face issues with slow compilation for documents of increased size. Everytime the user changes the document, the compiler has to recompile the whole document. Is it possible to only compile the changed part and speed up compile performance that way?
https://tex.stackexchange.com/users/69600
Can LaTeX only compile changed parts to speed up compilation?
false
The other thing I've found that helps (and might help here a bit) is to (i) compile the preamble into a .fmt file (using the mylatexformat package), and then (ii) compile my document using this .fmt file. For my bigger projects (books, mostly), I often have 20, 30 or more packages in the preamble, such that reading in those packages (and various associated options and such) is the rate-limiting step of compiling the document. For example, a 160 page set of lecture notes (which I just tested) -- compile time for the full document is cut by almost 65-70% if I use a pre-compiled preamble, relative to including the preamble 'as is, the normal way'. Just grist for the mill...
0
https://tex.stackexchange.com/users/16184
693846
321,882
https://tex.stackexchange.com/questions/693672
0
In a book I want to create a double-page photo spread, so when you open the book, the left half of the photo is on the left, and the right half is on the right. I want it to be as big as possible, so would like to eliminate both left/right margins, and the header and footer. I tried the geometry package to eliminate margins, header, footer, but this inserted a `\clearpage` which added a blank page impossible to suppress. I want no blank pages on either side of the spread. I decided instead I'll just eliminate the left and right margins, and leave the header and footer for now. I tried `\addtolength` for the margins, but this does not work with the figure environment. The left hand margin default is still present to the left of each photo. If I eliminate the figure environment, then the margins are eliminated, but the page does not break between left and right, and the right half of the photo prints over the left half. If I force a page break with `\clearpage`, then the page breaks but a much wider margin of around 4 cm is created to the left of each photo. Minimum working example below. How can I print the photo all the way to the left and right edges of both pages? Edit: All photos will start at the top of the page. Unique trim: each photo needs to be cropped, and the aspect ratio is unique to each photo and different from the page. I'd like to do the cropping within LaTeX so that it is recorded and easily changeable, in case editors prefer a different crop, and I'm assuming trim can be used to crop the photo so that the aspect ratio fits that of the page. I'm flexible on captions, probably would prefer them at the bottom of either the preceding or following page so that the photo is as large as possible without any white space. More on captions: if a photo's dimensions are such that the best crop results in white space at the bottom, then preferably the caption should be in the white space at the bottom, either on the left page or right page, but not both. Probably the right page would be preferable. ``` \documentclass{book} \begin{document} \newpage \addtolength{\oddsidemargin}{-1in} \addtolength{\evensidemargin}{-1in} \begin{figure} \rule{1in}{1in} \end{figure} \clearpage \begin{figure} \rule{1in}{1in} \end{figure} \end{document} ```
https://tex.stackexchange.com/users/302551
How to create a double-page photo spread with no margins
true
The command `\DoublePhoto{<photo to be splitted>}` will place the top left corner of the left half of image in the top left corner of the even page, expanding the half-image to fill the full height and the width of the page, thus printing the left side of the image. It will repeat the action on the opposite (odd) page printing the right side of the image. It is assumed that the image already has the same aspect ratio of the page (double) that will be used (to completely fill the pages). It uses the `geometry` package to set the layout of the document pages. The `\DoublePhoto` command sets the layout of the two half-image pages using `\newgeometry` and `\restoregeometry` after. Both will start a new page. Then it uses the `tikz` package to position the images. The command will clear the header and footers of both pages (`\thispagestyle{empty}`). It begins in a new page, so you must take care to end the material above the photo on a even page. The left and right image halves are generated using the `adjustbox` package. ``` % !TeX TS-program = pdflatex \documentclass[12pt]{book} \usepackage[left=3.00cm, right=3.00cm, top=4.00cm, bottom=3.00cm,showframe]{geometry}% define margins+ show margins \usepackage{kantlipsum} % only for dummy text \usepackage{tikz}% needed <<< \usepackage[export]{adjustbox}% cut & adjust the image size<<< \newcommand{\DoublePhoto}[1]{% \DoublePhoto{<photo to be splitted>} \thispagestyle{empty} \newgeometry{left=0.00cm, right=0.0cm, top=0.00cm, bottom=0.00cm }% set the right margin value <<< \begin{tikzpicture}[remember picture,overlay] \node at (current page.north west) [inner sep=0pt, anchor=north west] {\adjincludegraphics[height=\paperheight,trim={0 0 {.5\width} 0},clip, width=\textwidth+\marginparsep]{#1}}; \end{tikzpicture} \clearpage\thispagestyle{empty} \begin{tikzpicture}[remember picture,overlay] \node at (current page.north east) [inner sep=0pt, anchor=north east] {\adjincludegraphics[height=\paperheight,trim={{.5\width} 0 0 0},clip, width=\textwidth+\marginparsep]{#1}}; \end{tikzpicture} \restoregeometry } \begin{document} \kant[1-7] \DoublePhoto{example-image} \kant[1-5] \end{document} ``` To keep the inner margins use for example ``` \newgeometry{left=0.00cm, right=3.0cm, top=0.00cm, bottom=0.00cm } ``` to set the right margin of the half-images pages equal to the rest of the document. Or use your binding width. This is a more colorful example with two labels added. The image was taken from [Solar System](https://en.wikipedia.org/wiki/Solar_System#/media/File:Solar_System_true_color.jpg) (wikipedia) ``` % !TeX TS-program = pdflatex \documentclass[12pt]{book} \usepackage[left=3.00cm, right=3.00cm, top=4.00cm, bottom=3.00cm,]{geometry}% define margins+ show margins \usepackage{kantlipsum} % only for dummy text \usepackage{tikz}% needed <<< \usepackage[export]{adjustbox}% cut & adjust the image size<<< \newcommand{\SolarCaptioni}{Finally... the true color of the Solar System! Dwarf planets are sorted by radius ascending from top down, with four main classifications from right to left: Asteroid belt (Ceres, above the Jovian moons), Kuiper belt (Orcus, Quaoar, Makemake, Haumea, Pluto), scattered disk (Gonggong, Eris), and detached objects (Sedna). Dwarfs are at a larger scale than the moons.} \newcommand{\SolarCaptionii}{Planet and moon credits: User:MotloAstro (Sun); NASA (Mercury, Venus, Earth, Moon, Jupiter, Saturn, Uranus, Neptune, Io, Europa (with color correction), Ganymede, Callisto (reprocessed by Kevin M. Gill), Mimas, Enceladus, Tethys, Dione, Rhea, Titan, Miranda, Ariel, Umbriel, Titania, Oberon, Triton); ISRO / ISSDC / Justin Cowart (Mars) Dwarf planets + moons credit: NASA and ESA.} \newcommand{\DoublePhoto}[1]{% \DoublePhoto{<photo to be splitted>} \thispagestyle{empty} \newgeometry{left=0.00cm, right=3.0cm, top=0.00cm, bottom=0.00cm }% set the right margin value <<< \begin{tikzpicture}[remember picture,overlay] \node at (current page.north west) [inner sep=0pt, anchor=north west, label={below:{\parbox{\textwidth}{\sffamily\SolarCaptioni}}}] {\adjincludegraphics[trim={0 0 {.5\width} 0},clip, width=\textwidth+\marginparsep]{#1}}; \end{tikzpicture} \clearpage\thispagestyle{empty} \begin{tikzpicture}[remember picture,overlay] \node at (current page.north east) [inner sep=0pt, anchor=north east, label={below:{\parbox{\textwidth}{\sffamily\SolarCaptionii}}}] {\adjincludegraphics[trim={{.5\width} 0 0 0},clip, width=\textwidth+\marginparsep]{#1}}; \end{tikzpicture} \restoregeometry } \begin{document} \kant[1-7] \DoublePhoto{Solar_System_true_color_(captions)} \kant[1-5] \end{document} ```
0
https://tex.stackexchange.com/users/161015
693848
321,883
https://tex.stackexchange.com/questions/397031
2
The cross-reference (`\nameref`) in the code below does not populate unless I remove the `titlesec` package. I need both packages. How can I get around this? ``` \documentclass{article} \usepackage{titlesec} \usepackage{hyperref} \begin{document} \section*{Section title}\label{first} See section \nameref{first}. \end{document} ```
https://tex.stackexchange.com/users/8792
Conflict with hyperref and titlesec
false
Another workaround is just keeping your numbered sections, but visually hide them by using a combination of [removing the numbering of sections](https://tex.stackexchange.com/a/517837/70734) and the [removing of numbering from toc](https://tex.stackexchange.com/a/218699/70734): ``` \usepackage{tocloft} \renewcommand\numberline[1]{} \titleformat{\section}{\normalfont\Large\bfseries}{}{0pt}{} ``` This creates a TOC with nicely aligned links without numbers, linking to nicely aligned section headers without numbers, precisely to where the numbered section would link.
0
https://tex.stackexchange.com/users/70734
693852
321,887
https://tex.stackexchange.com/questions/693679
4
Is there a function akin to scanf of C that can simultaneously parse stdin or txt and assign them to variables? For example, I am trying to typeset a pdf from a text file. The first line contains the number of lines I should typeset, and the rest contains three numbers that form an addition problem. ``` $ cat input.txt 5 5 2 7 4 7 11 8 0 8 7 5 12 9 7 16 ``` In C one could do as follows: ``` $ cat program.c #include <stdio.h> int main() { FILE* input = fopen("input.txt", "r"); int n, a, b, c, i; fscanf(input, "%d", &n); for (i = 1; i <= n; i++) { fscanf(input, "%d %d %d", &a, &b, &c); printf("%d + %d = %d\n", a, b, c); } return 0; } $ gcc program.c -o program.o $ program.o 5 + 2 = 7 4 + 7 = 11 8 + 0 = 8 7 + 5 = 12 9 + 7 = 16 ``` I am close to a working example and just need to find the right command. ``` $ cat program.tex \documentclass{article} \usepackage{pgffor} \begin{document} \newread\input \openin\input=input.txt % Read first line and assign to n \foreach \i in {1,...,n} {% % Read line and assign to a, b, c $\a + \b = \c$\\% }% \closein\input \end{document} ```
https://tex.stackexchange.com/users/302560
scanf functionality in TeX?
false
If you are in the mood for "oldschoolness", you can implement a loop based on `\immediate\read` and `\ifeof` and decrementing. But the TeXbook says in Chapter 20: Definitions (also called Macros): > > To get input from an open file, you say > > `\read⟨number⟩to⟨control sequence⟩` > > and the control sequence is defined to be a parameterless macro whose replacement text is the contents of the next line read from the designated file. This line is converted to a token list, using the procedure of Chapter 8, based on the current category codes. > > Additional lines are read, if necessary, until an equal number of left and right braces has been found. **An empty line is implicitly appended to the end of a file that is being `\read`**. > > > I. e., with existing files opened via `\openin` for reading via `\read` TeX always pretends that there is an additional empty line appended to that file. Thus, if the file exists, then `\ifeof` can only be true after doing some `\read`, whereby also the appended additional empty line was read. Therefore I suggest cranking out empty lines; a line being a TeX-comment is the same as emptiness. With the example, reading lines of data ends if at most as many entries were read and processed as denoted in the 1st line of the data file. In case the file does not have that many entries, then reading/processing lines of data ends when the end of the data file is reached. ``` \begin{filecontents*}{equationdata.txt} % Amount of entries to process: 5 % Operand1 Operand2 Result Operator % Operator: 0=+, 1=-, 2=*, 3=/ 12 34 46 0 90 5 18 3 117 38 79 1 23 4 19 2 6 7 42 2 22 5 110 2 85 17 5 3 \end{filecontents*} % There is an incorrectness: The line "23 4 19 2" should be "23 4 19 1". % This is on purpose so you can see that the \ifnum-check with the result calculated % via \numexpr detects the difference. \documentclass{article} \newcommand\FirstOfTwo[2]{#1} \newcommand\SecondOfTwo[2]{#2} \newcommand\Exchange[2]{#2#1} \newread\dataread \newcommand*\dataline{}% \newcommand*\scanf[3]{% % #1 - file % #2 - routine for splitting a line of equation-data into its components - assumes a space token is appended at % the end of the line; the loop does append a space token for you. % #3 - separator between calls to routine for splitting a line of equation-data \immediate\openin\dataread=#1 % \readdatalinesloop{1}{}{}{\SplitOneDelimitedArgAndDefineScratchmacro{\dataline}}{\dataread}% \readdatalinesloop{\dataline}{}{#3}{#2}{\dataread}% \immediate\closein\dataread }% \newcommand\readdatalinesloop[5]{% %------------------------------------------------------------------------------------------------------------------------- % #1 - amount of entries to read % #2 - separator between calls to prepend in this iteration % #3 - separator between calls to routine for splitting a line of data into its components % #4 - routine for splitting a line of data into its components - assumes a space token is appended at % the end of the line; the loop does append a space token for you. % #5 - \read-handle %------------------------------------------------------------------------------------------------------------------------- \ifeof#5\expandafter\FirstOfTwo\else\expandafter\SecondOfTwo\fi{}{% \ifnum\numexpr(#1)\relax<1 \expandafter\FirstOfTwo\else\expandafter\SecondOfTwo\fi{}{% %-------------------------------------------------------------------------------------------------------------------- % Read the next line of data from the file: %-------------------------------------------------------------------------------------------------------------------- \begingroup \endlinechar=-1 % \immediate\read#5 to \dataline %-------------------------------------------------------------------------------------------------------------------- % Check if the next line of data from the file is empty: %-------------------------------------------------------------------------------------------------------------------- \ifcat$\detokenize\expandafter{\dataline}$\expandafter\FirstOfTwo\else\expandafter\SecondOfTwo\fi {% \endgroup \expandafter\readdatalinesloop\expandafter{\the\numexpr(#1)\relax}{#2}% }{% \expandafter\Exchange\expandafter{\dataline}{\endgroup#2#4} % \expandafter\readdatalinesloop\expandafter{\the\numexpr((#1)-1)\relax}{#3}% }% {#3}{#4}{#5}% }% }% }% \csname @ifdefinable\endcsname\SplitOneDelimitedArgAndDefineScratchmacro{% \def\SplitOneDelimitedArgAndDefineScratchmacro#1#2 {% % #1 scratch macro to define % #2 number in 1st line of file \def#1{#2}% }% }% \csname @ifdefinable\endcsname\SplitFourSpaceDelimitedArgs{% \def\SplitFourSpaceDelimitedArgs#1 #2 #3 #4 {% % #1 operand ; #2 operand ; #3 result; #4 number denoting operator %-------------------------------------------------------------------------------------------------- % Deliver the tokens forming the equation: %-------------------------------------------------------------------------------------------------- $#1\ifcase\numexpr(#4)\relax+\or-\or\times\or\div\fi#2=#3$% %-------------------------------------------------------------------------------------------------- % Calculate, using eTeX-extensions' \numexpr - you can comment this out if you don't want it: %-------------------------------------------------------------------------------------------------- \Exchange({ }\texttt{\string\numexpr}-calculation % \ifnum\the\numexpr(#1\ifcase\numexpr(#4)\relax+\or-\or*\or/\fi#2)\relax=\numexpr(#3)\relax also yields% \else yields a different number% \fi : \the\numexpr(#1\ifcase\numexpr(#4)\relax+\or-\or*\or/\fi#2)\relax)% %-------------------------------------------------------------------------------------------------- % End of code for calculating using \numexpr. %-------------------------------------------------------------------------------------------------- }% }% \begin{document} \noindent \scanf{"equationdata.txt"}{\SplitFourSpaceDelimitedArgs}{\\} \end{document} ```
0
https://tex.stackexchange.com/users/118714
693857
321,890
https://tex.stackexchange.com/questions/654984
3
In <https://repo.or.cz/wortliste.git/blob/HEAD:/wortliste> (which is, in my opinion, the source of the current German hyphenation patterns used by [PDF|Xe|Lua]LaTeX with `\babelprovide[hyphenrules=ngerman-x-latest]{ngerman}`) we see that for many words the priorities of the breaking points are specified. For example, for *Fußgängerampel* the breaking-point choices are specified as `Fuß=gän-ger==am-pel`. If I get it right, this means that * *Fußgängerampel* is a compound word, being composed of *Fußgänger* and *ampel*, and can be split between the two parts; * *Fußgänger* is itself a compound word, being composed of *Fuß* and *gänger*, and can be split between the two parts; * *gänger* can be split at the syllable border as *gän-ger*, and the breaking point is within a morpheme, and, similarly, * *ampel* can be split at the syllable border as *am-pel*, and the breaking point is within a morpheme. Moreover, `Fuß=gän-ger==am-pel` tells us that the main way to split the word is *Fußgänger-ampel*, doesn't it? Any way to tell [Xe|Lua|PDF]LaTeX to use this information? As of TeX Live from today, on 2022-08-23, feeding ``` \documentclass{article} \usepackage[ngerman]{babel} \babelprovide[hyphenrules=ngerman-x-latest]{ngerman}% provides me with patterns from 2022-03-16 as of now % \hyphenpenalty=49%% one less than the default value 50. % \exceptionpenalty=50%% ad-hoc value greater than \hyphenpenalty. % \exhyphenpenalty=48%% ad-hoc value less than \hyphenpenalty (though usually they coincide). % \babelhyphenation[ngerman]{Fuß{-}{}{}[1]gän{-}{}{}[2]ger-am{-}{}{}[2]pel}%% of course, we could have an exception list. \showoutput \begin{document} Fußgängerampel \end{document} ``` to `lualatex` yields ``` ....\TU/lmr/m/n/10 F ....\kern-0.83 (font) ....\TU/lmr/m/n/10 u ....\TU/lmr/m/n/10 ß ....\discretionary (penalty 50) .....< \TU/lmr/m/n/10 - ....\TU/lmr/m/n/10 g ....\TU/lmr/m/n/10 ä ....\TU/lmr/m/n/10 n ....\discretionary (penalty 50) .....< \TU/lmr/m/n/10 - ....\TU/lmr/m/n/10 g ....\TU/lmr/m/n/10 e ....\TU/lmr/m/n/10 r ....\discretionary (penalty 50) .....< \TU/lmr/m/n/10 - ....\TU/lmr/m/n/10 a ....\TU/lmr/m/n/10 m ....\discretionary (penalty 50) .....< \TU/lmr/m/n/10 - ....\TU/lmr/m/n/10 p ....\kern0.28 (font) ....\TU/lmr/m/n/10 e ....\TU/lmr/m/n/10 l ``` on the standard output. This means, unfortunately, that LuaLaTeX does not prefer any of the four breaking points over any other one, does it?
https://tex.stackexchange.com/users/nan
How to use the known weights of different breaking points in German words?
false
Look at Keno Wehr's [autotype](https://codeberg.org/wehr/autotype/) package for LuaLaTeX, which provides weighted hyphenation for German, together with automatic prevention of wrong ligatures at compound word boundaries (for example, 'Auf-lage') and automatic replacement of round s with long s ( ſ ) for typesetting with Fraktur fonts. The biggest drawback of using this package is currently that processing documents becomes *much* slower.
2
https://tex.stackexchange.com/users/20911
693859
321,891
https://tex.stackexchange.com/questions/693256
2
I'd like to create a weighted grid paper template. I'd like it to basically look like a sheet of lined paper, but with faint, equally spaced, vertical lines through it. I looked into the [gridpapers](https://ctan.org/pkg/gridpapers?lang=en) template which has a set of templates but I could not figure out how to change the properties of the vertical/horizontal lines.
https://tex.stackexchange.com/users/302100
How can I create grid paper, where horizontal rules are thicker than vertical ones?
true
I ended up w/ ``` %% Calligraphy Guide Lines %% Peter Grill %% %% ---------------------- Note: May need to run this twice --------------------- %% %% --------------------------------------------------- Select Lines %% ---------------------------------------------------------------- Horizontal Lines \def\VerticalSkip{.75cm}% 0.10cm through 2cm \def\UseAltStyleEveryNthHorizontalLine{2}% %% ---------------------------------------------------------------- Vertical Slant Lines \def\HorizontalSlantSkip{0.75cm}% \def\SlantAngle{55}% Degrees >30, < 60 \def\UseAltStyleEveryNthSlantLine{4}% %% ---------------------------------------------------------------- Vertical Lines \def\HorizontalSkip{0.75cm}% \def\UseAltStyleEveryNthVerticalLine{5}% %% ---------------------------------------------------------------- Select Margins \def\MarginTop{0.25cm} \def\MarginBottom{0.25cm} \def\MarginLeft{0.25cm} \def\MarginRight{0.25cm} %% ---------------------------------------------------------------- Select Paper \def\Paper{a4paper}% letter | a4paper | a5paper, .... \def\Orientation{portrait}%% portrait | landscape %% ----------------------- \documentclass[\Paper, \Orientation]{article}% Version 1.1 \usepackage{tikz} \usepackage{xstring} \pagestyle{empty} %% Select the line style. I prefer using the second one here and using the output underneath %% the actual paper as guide lines. The first is better if you want to actually write on %% top of the guide lines %% %% Few other options that can be applied here (last applied options override earlier ones). %% solid %% dotted, densely dotted, loosely dotted, %% dashed, densely dashed, loosely dashed, %% dash dot dot, densely dash dot dot, loosely dash dot dot, %% loosely dashed, %% %% Custom line styles can be defined also be specifying the on/off patter: %% dash pattern=on 2pt off 3pt on 4pt off 4pt %% %% To disable ANY lines use the draw=none as the last style. %\tikzset{Line Style/.style={line width=1pt, densely dotted, gray, draw opacity=0.1}} \tikzset{Line Style/.style={ line width=0.2pt, solid, gray, draw opacity=0.5 }} \tikzset{Horizontal Line Style/.style={ Line Style, line width=0.2pt, dashed, draw opacity=1.0 }} \tikzset{Horizontal Line Style Alternate/.style={ Line Style, line width=0.2pt, dashed, draw opacity=1.0, }} \tikzset{Slant Line Style/.style={ draw=none }} \tikzset{Slant Line Style Alternate/.style={ draw=none }} \tikzset{Vertical Line Style/.style={ Line Style, line width=0.1pt, style=gray, dashed, draw opacity=0.5}} \tikzset{Vertical Line Style Alternate/.style={ Line Style, line width=0.1pt, style=gray, dashed, draw opacity=0.5}} \tikzset{Border Line Style/.style={Line Style, thin}} \newlength{\DeltaY} \newlength{\TempLength} \pgfmathtruncatemacro{\MaxHorizontalLines}{\paperheight/\VerticalSkip} \pgfmathsetmacro{\TanSlantAngle}{tan(\SlantAngle)} \pgfmathsetlength{\DeltaY}{\HorizontalSlantSkip*\TanSlantAngle} \pgfmathtruncatemacro{\MaxSlantLinesX}{\paperwidth/\HorizontalSlantSkip} \pgfmathtruncatemacro{\MaxSlantLinesY}{\paperheight/\DeltaY} \pgfmathtruncatemacro{\MaxVerticalLines}{\paperwidth/\HorizontalSkip} \newcommand*{\SetLineStyle}[4]{% %% #1 = style name to set %% #2 = default line style %% #3 = line number %% #4 = which lines get the alternate line style \pgfmathtruncatemacro{\Remainder}{mod(#3,#4)}% \ifnum\Remainder=0\relax \tikzset{#1/.style={#2 Alternate}}% \else \tikzset{#1/.style={#2}}% \fi }% \begin{document}% \begin{tikzpicture}[ remember picture, overlay, shift=(current page.south west),% So that (0,0) is south west of paper ] %% Clip to create the border \clip (\MarginLeft,\MarginBottom) rectangle (\paperwidth-\MarginRight,\paperheight-\MarginTop); \foreach \y in {1,...,\MaxHorizontalLines} {% Horizontal guide lines \SetLineStyle {This Horizontal Line Style}{Horizontal Line Style} {\y}{\UseAltStyleEveryNthHorizontalLine} \begin{scope}[yshift=-\MarginTop] \draw[This Horizontal Line Style] (0pt,\paperheight-\y*\VerticalSkip) -- (\paperwidth,\paperheight-\y*\VerticalSkip) ; \end{scope} } \foreach \x in {1,...,\MaxVerticalLines} {% Vertical guide lines \SetLineStyle {This Vertical Line Style}{Vertical Line Style} {\x}{\UseAltStyleEveryNthVerticalLine} \begin{scope}[xshift=\MarginLeft] \draw[This Vertical Line Style] (\x*\HorizontalSkip,0pt) -- (\x*\HorizontalSkip,\paperheight) ; \end{scope} } \pgfmathsetlength{\TempLength}{\paperwidth*\TanSlantAngle} \foreach \x in {0,...,\MaxSlantLinesX} {% Slant Lines starting along bottom of page \SetLineStyle {This Slant Line Style}{Slant Line Style} {\x}{\UseAltStyleEveryNthSlantLine} \draw[This Slant Line Style] (\x*\HorizontalSlantSkip,0pt) -- ++(\paperwidth,\TempLength) ; } \foreach \y in {1,...,\MaxSlantLinesY} {% Slant Lines starting along left of page \SetLineStyle {This Slant Line Style}{Slant Line Style} {\y}{\UseAltStyleEveryNthSlantLine} \draw[This Slant Line Style] (0pt,\y*\DeltaY) -- ++(\paperwidth,\TempLength) ; } %% Draw border \draw [Border Line Style] (\MarginLeft,\MarginBottom) rectangle (\paperwidth-\MarginRight,\paperheight-\MarginTop); \end{tikzpicture}% \end{document} ``` I think the code should be cleaned up (eg. I'd like to only have to specify one line style, not the main line style and the alternate line style.
2
https://tex.stackexchange.com/users/302100
693862
321,892
https://tex.stackexchange.com/questions/693863
1
I want to use the arev font for math. I noticed that the `\nexists` symbol does not render properly. Is it possible for me to use this font while having access to any special symbols that may be missing with the package?
https://tex.stackexchange.com/users/302100
Not exists in with arev?
false
(modified the answer to make `\nexists` work in all math styles) The macro `\nexists` defined below may be used in all of TeX's "math styles" -- `\displaystyle`, `\textstyle`, `\scriptstyle`, and `\scriptscriptstyle`. ``` \documentclass{article} % or some other suitable document class \usepackage{arev} \let\nexists\relax % undefine the existing macro % See https://tex.stackexchange.com/a/683452/5001 % for the inspiration for the following code. \usepackage{graphicx} % for '\scalebox' macro \makeatletter \DeclareRobustCommand{\nexists}{% \mathchoice{\@nexists{\f@size}}{\@nexists{\f@size}} {\@nexists{\sf@size}}{\@nexists{\ssf@size}}% } \DeclareRobustCommand{\@nexists}[1]{% \scalebox{\fpeval{(#1)/(\f@size)}}{\@@nexists}} \DeclareRobustCommand{\@@nexists}{% \ooalign{\kern1.15pt\raise0.5pt\hbox{/}\cr$\exists$}} \makeatletter \begin{document} $\exists$ $\nexists$ \end{document} ```
1
https://tex.stackexchange.com/users/5001
693864
321,893
https://tex.stackexchange.com/questions/693869
1
I want to create a solution environment that works somehow like this: If at the beginning of the document, solutions are TRUE I want to show the text in the environment and be highlithed. If it is FALSE, the environment should pretend as if there is no text at all. Is there any possibility to create such an environment?
https://tex.stackexchange.com/users/292979
How to create a solution environment
false
Here are a couple of available packages you may choose from. ### Topic [conditional compilation](https://ctan.org/topic/cond-comp) Here you see package comment, as I mentioned. However, there may be packages better suited for your unvoiced needs. ### Package [codesection](https://ctan.org/pkg/codesection) Does exactly what you described: Package [multiaudience](https://ctan.org/pkg/multiaudience) ----------------------------------------------------------- It seems to be quite similar: ### Package [censor](https://ctan.org/pkg/censor) As known from film, Muller report and similar documents:
0
https://tex.stackexchange.com/users/245790
693878
321,896
https://tex.stackexchange.com/questions/693868
1
How can I place the text `(a case)` at the end of the last bracket? ``` \begin{align} P_{12}= \begin{cases} \begin{split} -\biggl(\left [ \text{Some expression here} \right ]\\-\left [ \text{Some expression here}\right ]\biggr) \end{split} \text{a case} \end{cases} \end{align} ```
https://tex.stackexchange.com/users/299988
Placing text in a cases environment
true
One of the following cases [pun intended]? It wasn't clear to me if you want to place "a case" and "another case" vertically centered or at the bottom of the expression to the immdiate left. ``` \documentclass{article} % or some other suitable document class \usepackage{mathtools} % for 'dcases' env. \begin{document} \begin{equation} P_{12}= \begin{dcases} \begin{aligned} -\Bigl( [ \text{Some expression here}]& \\ - [ \text{Some expression here}]& \Bigr) \end{aligned} & \text{a case} \\[3ex] \begin{aligned}[b] -\Bigl( [ \text{Some expression here}]& \\ - [ \text{Some expression here}]& \Bigr) \end{aligned} & \text{another case} \end{dcases} \end{equation} \end{document} ```
2
https://tex.stackexchange.com/users/5001
693881
321,898
https://tex.stackexchange.com/questions/693880
8
I'm trying to put a table float in a book manuscript that uses the `memoir` class. This used to work fine until a few days ago, when I ran an update using the TexLive utility. (I think the `memoir` class got updated recently.) I now get the following baffling error message: ``` ! LaTeX Error: Unknown float option `\'. ``` even though I'm loading the `float` package without any options. Here's an MWE: ``` \documentclass{memoir} \usepackage{float} \begin{document} \begin{table}[htp] \centering \caption{This is a caption} \begin{tabular}{ccc} cell1 & cell2 & cell3 \\ \end{tabular} \end{table} \end{document} ``` The example code compiles fine if I replace the `memoir` class with either `article` or `book`.
https://tex.stackexchange.com/users/92104
Conflict between memoir class and float package?
true
The generic `cmd/xxx/after` hooks are rather fragile. If they work depends a lot on the actually definition of the command `\xxx`. As float redefines `\@xfloat` it breaks as soon as the hook is declared (even if it is empty). It would probably be safer if memoir would put its code into `\@floatboxreset` instead of patching `\@xfloat`: ``` \documentclass{memoir} \usepackage{float} \makeatletter \DisableGenericHook{cmd/@xfloat/after} %disable the \@xfloat hook alltogether \AddToHook{cmd/@floatboxreset/after}{% reinstate the memoir code \def\baselinestretch{\m@m@float@spacing}% \normalsize% \@nameuse{\@captype adjustment}} \makeatother \begin{document} \begin{table}[htp] \centering \caption{This is a caption} \begin{tabular}{ccc} cell1 & cell2 & cell3 \\ \end{tabular} \end{table} \end{document} ```
5
https://tex.stackexchange.com/users/2388
693883
321,900
https://tex.stackexchange.com/questions/693805
0
**Aim** To change the background color of a sentence in which italicized words occur that use the `\textit{}` command. **Minimal Working Example (MWE)** ``` \documentclass[12pt]{report} \usepackage{ragged2e} \usepackage{soul} \usepackage{xcolor} \begin{document} This is an example of a sentence that I DO NOT want to highlight. This is an example of a \textit{sentence} that I want to highlight. This is an example of a sentence that I DO NOT want to highlight. \end{document} ``` **Preferred outcome** To have the sentence of italicized words highlighted in yellow.
https://tex.stackexchange.com/users/13362
Highlight sentences in yellow for specific commands such as italic
true
Try the following: ``` \documentclass[12pt]{report} \usepackage{ragged2e} \usepackage{soul} \usepackage{xcolor} \let\oldtextit\textit % <--- \renewcommand{\textit}[1]{\oldtextit{\hl{#1}}} % <--- \begin{document} This is an example of a sentence that I DO NOT want to highlight. This is an example of a \textit{sentence} that I want to highlight. This is an example of a sentence that I DO NOT want to highlight. \end{document} ``` Is this what you asked me in your comment?
1
https://tex.stackexchange.com/users/18189
693885
321,901
https://tex.stackexchange.com/questions/693888
0
I have pages sized 145×205 mm. I can put two-in-one with command: ``` pdfjam file.pdf --nup 2x1 --landscape --twoside \ --papersize '{205mm,290mm}' --outfile nup.pdf ``` Now I want to put this 290×205 mm page **unscaled** in the center of a landscaped A4 page, that is 297×210 mm. This means there should be unused vertical and horizontal borders 3.5 mm and 2.5 mm respectively. However whatever I try the page always scales up slightly, with no vertical borders at all and horizontal ones proportionally smaller. Are there some parameters or settings to achieve what I want?
https://tex.stackexchange.com/users/85499
How to center smaller unscaled page on A4 page with pdfjam
true
Hmm, and as soon as I asked I've found the answer. (Works almost everytime.) I need to use *negative* sized trims: ``` pdfjam nup.pdf --trim '-3.5mm -2.5mm -3.5mm -2.5mm' --clip true --landscape \ --papersize '{210mm,297mm}' --outfile result.pdf ```
0
https://tex.stackexchange.com/users/85499
693890
321,903
https://tex.stackexchange.com/questions/693891
6
This MWE works correctly with pdflatex but fails to produce an o-cedilla (o̧) with xelatex even if you uncomment the fontspec. ``` \documentclass{article} %\usepackage{fontspec} \begin{document} Here is a c-cedilla: \c{c} and an o-cedilla: \c{o} \end{document} ``` I'm missing something, but what?
https://tex.stackexchange.com/users/355
Cedilla failing with XeLaTeX
false
You coud make a cedilla, but `\textcommabelow` is available out of the box, and may (or may not) be suitable ``` \documentclass{article} %\usepackage{fontspec} \DeclareTextCompositeCommand{\c}{TU}{o}{\textcommabelow{o}} \begin{document} Here is a c-cedilla: \c{c} and an o-cedilla: \c{o} \end{document} ```
2
https://tex.stackexchange.com/users/1090
693892
321,904
https://tex.stackexchange.com/questions/693891
6
This MWE works correctly with pdflatex but fails to produce an o-cedilla (o̧) with xelatex even if you uncomment the fontspec. ``` \documentclass{article} %\usepackage{fontspec} \begin{document} Here is a c-cedilla: \c{c} and an o-cedilla: \c{o} \end{document} ``` I'm missing something, but what?
https://tex.stackexchange.com/users/355
Cedilla failing with XeLaTeX
false
This is a problem with the font, compounded by a bad design decision forty years ago. By default, when the document tries to use a character that the current font does not have, TeX replaces it with a blank space. You’re supposed to carefully proofread every line and catch this. If you add the command `\tracinglostchars=3`, this will become an error, and the TeX engine will crash with the message: > > ! Missing character: There is no ̧ (U+0327) in font [lmroman10-regular]:mapping > =tex-text;. > > > I suggest you add `\tracinglostchars=3` to all your documents. (I see that the default behavior is now to at least print a warning message to the console instead of failing silently, which used to require a different command.) That tells us what the problem is: the default font that `fontspec` loads doesn’t have a combining cedilla accent. To fix this, load a font that does, such as New Computer Modern. The `fontsetup` package is the easiest way: ``` \documentclass{article} \tracinglostchars=3 \usepackage[default]{fontsetup} \begin{document} Here is a c-cedilla: \c{c} and an o-cedilla: \c{o} \end{document} ``` There is no precomposed o̧ in Unicode, although there is a ǫ (U+01EB), and Latin Modern has it. There is a good chance that you really want an ogonek, not a cedilla. ``` \documentclass{article} \usepackage{fontspec} \DeclareRobustCommand\oogonek{\symbol{"01EB}} \begin{document} Here is a c-cedilla: \c{c} and an o-ogonek: \oogonek \end{document} ``` This was meant more as an example, but: David Carlisle points out that `\k{o}` works for ǫ. So would entering the precomposed UTF-8 character into your source file directly.
5
https://tex.stackexchange.com/users/61644
693894
321,905
https://tex.stackexchange.com/questions/693524
0
Let's say I have this pretty standard CSV file: ``` id,x0,y,sy,yhat,yerr,yrelerr,ychi2 0,-1,-1.083108355,0.075,-1.013608377,-0.069499978,0.068566894,0.85871057 1,-0.857142857,-0.625857469,0.075,-0.583690434,-0.042167035,0.072242122,0.316099357 2,-0.714285714,-0.103646818,0.075,-0.15377249,0.050125672,-0.32597295,0.446681425 3,-0.571428571,0.378297428,0.075,0.276145454,0.102151974,0.369920899,1.855115709 4,-0.428571429,0.721552903,0.075,0.706063397,0.015489506,0.02193784,0.042653297 5,-0.285714286,1.068762988,0.075,1.135981341,-0.067218353,-0.059172057,0.803254567 6,-0.142857143,1.576471029,0.075,1.565899284,0.010571745,0.006751229,0.019868763 7,0,1.955555616,0.075,1.995817228,-0.040261612,-0.020172995,0.288177313 8,0.142857143,2.358688591,0.075,2.425735171,-0.067046581,-0.027639695,0.799154489 9,0.285714286,2.936295065,0.075,2.855653115,0.08064195,0.028239407,1.15611094 10,0.428571429,3.346102227,0.075,3.285571059,0.060531168,0.018423333,0.651381746 11,0.571428571,3.814462054,0.075,3.715489002,0.098973052,0.026637961,1.741451551 12,0.714285714,4.110972552,0.075,4.145406946,-0.034434394,-0.008306638,0.210795996 13,0.857142857,4.54753839,0.075,4.575324889,-0.027786499,-0.00607312,0.137260362 14,1,4.935172219,0.075,5.005242833,-0.070070614,-0.013999443,0.872869489 ``` And I want to render the table as follow: ``` \begin{table}[!ht] \centering \pgfplotstabletypeset[ debug=true, col sep={\,}, row sep={\r\n}, header=has colnames, every head row/.style={before row=\toprule}, every last row/.style={after row=\bottomrule} ]{./media/data.csv} \end{table} ``` I am getting this following error: ``` ! Missing \endcsname inserted. <to be read again> \protect l.11 ] {./media/data.csv} ``` That I don't understand. I have already tried those posts: * [Missing \endcsname inserted in pgfplotstable](https://tex.stackexchange.com/questions/530032/missing-endcsname-inserted-in-pgfplotstable) * [Compilation Error "! Missing \endcsname inserted" The control sequence marked <to be read again> should not appear between \csname and \endcsname](https://tex.stackexchange.com/questions/147077/compilation-error-missing-endcsname-inserted-the-control-sequence-marked-t) Without success. What is going wrong with this table?
https://tex.stackexchange.com/users/42357
Cannot plot CSV with PGFPlotTable, Missing \endcsname inserted
false
for your next question could you please provide an example which can be copy-pasted and is compile-ready? This solves a lot of trouble for the people helping you. I managed to compile your table with the following code ``` \documentclass{article} \usepackage{csvsimple} \usepackage{pgfplotstable} \usepackage{booktabs} \pgfplotsset{compat=1.18} \begin{document} \begin{table}[!ht] \centering \pgfplotstabletypeset[ col sep=comma, header=has colnames, every head row/.style={before row=\toprule}, every last row/.style={after row=\bottomrule} ]{data.csv} \end{table} \end{document} ```
2
https://tex.stackexchange.com/users/204627
693895
321,906
https://tex.stackexchange.com/questions/693861
0
To create a double-page spread, in which an image is spread across two pages of an open book, with no white space (no margins, headers, and footers), the package `hvfloat` is recommended. This package, however, does not seem to be working for me in a two-column book. If the figure is placed after the last page of a chapter, whose left column is longer than the right column, then the left side of the figure is near the middle of the page, rather than flush with the left side of the page, as the documentation promises. Inserting `\clearpage` before the float fails to solve the problem, and creates more problems with columns and caption in the following chapter (not shown). The `hvfloat` syntax is copied exactly from the `hvfloat` example document `doublepage2s2c.tex`. Minimum working example below. ``` \documentclass[12pt, twoside]{book} \usepackage[letterpaper, bindingoffset=5mm, left=16mm, right=16mm, top=20mm, bottom=20mm, footskip=5mm]{geometry} \usepackage{hvfloat} \usepackage{lipsum} \begin{document} \twocolumn \chapter{1} \lipsum[1-5] \hvFloat[doubleFULLPAGE,capWidth=n,twoColumnCaption,capPos=after,separatorLine]% {figure}% {\includegraphics[doubleFULLPAGE]{example-image-b}}% [A doublepage image with a caption on the page following.]% {A caption for a double-sided image that will be placed on the bottom of the page after the right side of the image. The illustration begins on the left edge of the paper. A short form is used for the LOF. The parameter is \texttt{doubleFULLPAGE}}% {fig:doubleFULLPAGE0after2col} \chapter{2} \lipsum[1-5] \end{document} ```
https://tex.stackexchange.com/users/302551
How to create double fullpage spreads in a two-column environment
true
Change the `geometry` settings to: ``` \usepackage[letterpaper, left=21mm,%16mm +5mm right=16mm, top=20mm, bottom=20mm, includefoot,% showframe % optional, show the margins ]{geometry} ``` and place `\hvFloat` before the text so that it stays within the chapter. Also add `bindCorr=5mm` to the float. ``` \documentclass[12pt, twoside]{book} \usepackage[letterpaper, left=21mm,%16mm +5mm right=16mm, top=20mm, bottom=20mm, includefoot,% showframe ]{geometry} \usepackage{hvfloat} \usepackage{lipsum} \begin{document} \twocolumn \chapter{1} \hvFloat[doubleFULLPAGE,capWidth=n,twoColumnCaption,capPos=after,separatorLine, bindCorr=5mm]% here <<<< {figure}% {\includegraphics[doubleFULLPAGE]{example-image-b}}% [A doublepage image with a caption on the page following.]% {A caption for a double-sided image that will be placed on the bottom of the page after the right side of the image. The illustration begins on the left edge of the paper. A short form is used for the LOF. The parameter is \texttt{doubleFULLPAGE}}% {fig:doubleFULLPAGE0after2col} \lipsum[1-5] \chapter{2} \lipsum[1-5] \end{document} ``` In a real document you can use the option `nonFloat=true` to insert the float close to the desired place. For example: ``` % !TeX TS-program = pdflatex \documentclass[12pt, twoside]{book} \usepackage[letterpaper, left=21mm,%16mm +5mm right=16mm, top=20mm, bottom=20mm, includefoot,% showframe % optional, show the margins ]{geometry} \usepackage{hvfloat} \usepackage{lipsum} \begin{document} \twocolumn \chapter{1} \lipsum[1] \hvFloat[doubleFULLPAGE,capWidth=n,twoColumnCaption,capPos=after,separatorLine, bindCorr=5mm, nonFloat=true]% here <<<< {figure}% {\includegraphics[doubleFULLPAGE]{example-image-b}}% [A doublepage image with a caption on the page following.]% {A caption for a double-sided image that will be placed on the bottom of the page after the right side of the image. The illustration begins on the left edge of the paper. A short form is used for the LOF. The parameter is \texttt{doubleFULLPAGE}}% {fig:doubleFULLPAGE0after2col} \lipsum[2-5] \chapter{2} \lipsum[1-5] \end{document} ```
1
https://tex.stackexchange.com/users/161015
693901
321,911
https://tex.stackexchange.com/questions/693898
2
I'm trying to insert capital letters into frameboxes. Every time I use the letter Q on its own or in a string of capital letters, the frameboxes gets stretched vertically compared to the other letters' frameboxes. Is there a workaround for this problem or other fonts maybe? MWE: ``` \documentclass{article} \begin{document} \framebox[35pt]{P} \framebox[35pt]{Q} \framebox[35pt]{R} \end{document} ``` Thank you in advance.
https://tex.stackexchange.com/users/211669
Capital letters in frameboxes
true
You can use `\strut` to reserve a reasonable vertical space. Or you can use `\smash{WHATQ}` to **ignore** the vertical dimensions of WHATQ. With smash, then you have to set *manually* the vertical dimensions, for which I recommend \vphantom with a reasonable size template(A): `\vphantom{A}\smash{WHATQ}`. ``` \documentclass{article} \begin{document} \newcommand\test{\medbreak \f[35pt]{P} \f[35pt]{Q} \f[35pt]{R} } % I do not implement the optional parameter properly. \newcommand{\f}[2][???pt]{\framebox[#1]{#2}} \test original \renewcommand{\f}[2][???pt]{\framebox[#1]{\strut #2}} \test with strut \renewcommand{\f}[2][???pt]{\framebox[#1]{\vphantom{A}\smash{#2}}} \test with smash \end{document} ```
3
https://tex.stackexchange.com/users/302342
693902
321,912
https://tex.stackexchange.com/questions/693898
2
I'm trying to insert capital letters into frameboxes. Every time I use the letter Q on its own or in a string of capital letters, the frameboxes gets stretched vertically compared to the other letters' frameboxes. Is there a workaround for this problem or other fonts maybe? MWE: ``` \documentclass{article} \begin{document} \framebox[35pt]{P} \framebox[35pt]{Q} \framebox[35pt]{R} \end{document} ``` Thank you in advance.
https://tex.stackexchange.com/users/211669
Capital letters in frameboxes
false
An alternative is to use a `parbox` inside the `framebox`. This would be the solution: ``` \documentclass{article} \begin{document} \framebox{\parbox[c][1em]{35pt}{\centering P}} \framebox{\parbox[c][1em]{35pt}{\centering Q}} \framebox{\parbox[c][1em]{35pt}{\centering R}} \end{document} ``` This is the syntac of the `parbox` command: ``` \parbox[position][height][inner-pos]{width}{text} ``` Above is the original result of the question, below is the output of the solution:
0
https://tex.stackexchange.com/users/200971
693903
321,913
https://tex.stackexchange.com/questions/693869
1
I want to create a solution environment that works somehow like this: If at the beginning of the document, solutions are TRUE I want to show the text in the environment and be highlithed. If it is FALSE, the environment should pretend as if there is no text at all. Is there any possibility to create such an environment?
https://tex.stackexchange.com/users/292979
How to create a solution environment
false
I'm not sure how efficient or safe this is, but here's a quick way: ``` \documentclass{article} \usepackage{xcolor} \newif\ifsolution \NewDocumentEnvironment{solution}{+b}{\ifsolution\color{red}#1\else\ignorespacesafterend\fi}{} \begin{document} Bla bla bla \begin{solution} some text here \end{solution} foo foo foo. \solutiontrue Bla bla bla \begin{solution} some text here \end{solution} foo foo foo. \end{document} ```
0
https://tex.stackexchange.com/users/82917
693912
321,916
https://tex.stackexchange.com/questions/693891
6
This MWE works correctly with pdflatex but fails to produce an o-cedilla (o̧) with xelatex even if you uncomment the fontspec. ``` \documentclass{article} %\usepackage{fontspec} \begin{document} Here is a c-cedilla: \c{c} and an o-cedilla: \c{o} \end{document} ``` I'm missing something, but what?
https://tex.stackexchange.com/users/355
Cedilla failing with XeLaTeX
false
Undeclare the text composite and redeclare it; however it's likely that you want “o with ogonek” rather than with a cedilla. The problem is that Latin Modern has no “combining cedilla” character U+0327. ``` \documentclass{article} \usepackage{fontspec} % https://tex.stackexchange.com/a/58115/4427 \providecommand*\UndeclareTextComposite[3]{% \expandafter\let\csname\expandafter\string\csname #2\endcsname\string#1-#3\endcsname\relax} \UndeclareTextComposite{\c}{TU}{o} \DeclareTextCompositeCommand{\c}{TU}{o}{\accent"B8 o} \begin{document} Here is a c-cedilla: \c{c} and an o-cedilla: \c{o} Probably you want \k{o} (o with ogonek) \end{document} ```
1
https://tex.stackexchange.com/users/4427
693915
321,919
https://tex.stackexchange.com/questions/693863
1
I want to use the arev font for math. I noticed that the `\nexists` symbol does not render properly. Is it possible for me to use this font while having access to any special symbols that may be missing with the package?
https://tex.stackexchange.com/users/302100
Not exists in with arev?
false
This is a bug in `arev`. The package, at some point, loads `ams-mdbch.sty`, where we find, at line 160 ``` \DeclareMathSymbol{\nexists} {\mathord}{mathdesignA}{"40} ``` However, the symbol font *doesn't* have a “not exists” symbol at that slot, but a circle. The loaded symbol font is supposed to mirror `AMSb` from `amssymb`, but it is definitely different from it. See also <https://tex.stackexchange.com/a/362735/4427> for more symbols to fix. Anyway, borrowing `\nexists` from `amssymb` is not a choice: here is the output with the borrowed symbol next to `\exists` from `arev`: A solution might be to construct the symbol from a slash and `\exists`, but just superimposing them doesn't work. So my strategy is to 1. scale up the slash vertically by 10%; 2. scale down the slash horizontally by 20%; 3. raise the scaled slash to be vertically centered with respect to `\exists`. ``` \documentclass{article} % or some other suitable document class \usepackage{arev} \usepackage{graphicx} % for '\scalebox' macro \let\nexists\relax % undefine the existing macro \makeatletter \DeclareRobustCommand{\nexists}{\mathord{\mathpalette\nexists@\relax}} \newcommand{\nexists@}[2]{% \vphantom{\nexists@slash{#1}}% for the bounding box \ooalign{\hidewidth\nexists@slash{#1}\hidewidth\cr$\m@th#1\exists$\cr}% } \newcommand{\nexists@slash}[1]{\raisebox{0.02\height}{\scalebox{0.8}[1.1]{$#1/$}}} \makeatletter \begin{document} $\exists\nexists$ $\scriptstyle\exists\nexists$ $\scriptscriptstyle\exists\nexists$ \medskip {\Large$\nexists$} \end{document} ```
2
https://tex.stackexchange.com/users/4427
693916
321,920
https://tex.stackexchange.com/questions/693918
2
I'm trying to label an arrow in an xymatrix but because one of the formulas is quite long the label for the arrow is appearing over the second formula rather than over the arrow. What is the best way to fix this? Here is an example: ``` \documentclass{amsart} \usepackage[all]{xy} \begin{document} \[\xymatrix{ B\ar[r]^{\delta} & A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A) }\] \end{document} ```
https://tex.stackexchange.com/users/297024
xymatrix arrow labels for long formulas
false
While you're waiting for an `xy` solution, here it is with `tikzcd`, which fixes this and many other spacing issues from `xy`. ``` \documentclass{amsart} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} B\arrow[r,"\delta"] & A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \end{tikzcd} \end{document} ```
1
https://tex.stackexchange.com/users/125871
693923
321,923
https://tex.stackexchange.com/questions/693924
2
I want `\NP` command to produce the string "NP" in both text and math (e.g. P=NP formula) modes. I also want it to be styled (even if it is in math mode) the same as the surrounding text (italic or bold if the surrounding text is italic or bold).
https://tex.stackexchange.com/users/18083
\NP macro as in P=NP formula, to work for both text and math modes
true
Using `amsmath`, the command `\text` will take on the surrounding style. ``` \documentclass{article} \usepackage{amsmath} \newcommand{\NP}{\text{NP}} \begin{document} We have \NP. \emph{To emphasize, we have \NP}. \textbf{In bold we have \NP}. \textit{Here is italic text with math $\text{P}=\NP$.} Here is upright text with math $\text{P}=\NP$. \end{document} ```
10
https://tex.stackexchange.com/users/125871
693925
321,924
https://tex.stackexchange.com/questions/625048
2
Hi I use fancy header but the page number overlaps with the section name in the header. Is there a way to force either a tiny bit smaller text or just allow for longer margins in the header? Thanks. MRE: ``` \documentclass{book} \usepackage[utf8]{inputenc} \usepackage{fancyhdr} \fancyhf{} \fancyhead[LE]{\small\leftmark}%left on even \fancyhead[RO]{\small\rightmark}%right on odd \fancyhead[RE,LO]{ {\textbf{Page \thepage}} } %page number is right on even left on odd \pagestyle{fancy} \begin{document} \chapter{Introduction} \section{something} Filler text \subsection{something something} Filler text \newpage \section{REALLY REALLY LONG TITLE OF SECTION} \newpage \section{REALLY REALLYy REALLY REALLY LONG TITLE OF SECTION} \end{document} ```
https://tex.stackexchange.com/users/119616
fancyhdr long section name overlaps page number
false
You can redefine these commands, wrapping the section titles in a custom-length box (or reducing the section titles font size): ``` \renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter . \parbox[t]{0.45\textwidth{\textit{#1}}}{}}} \renewcommand{\sectionmark}[1]{\markright{\thesection.\ \parbox[t]{0.45\textwidth}{#1}}} ```
0
https://tex.stackexchange.com/users/253770
693929
321,925
https://tex.stackexchange.com/questions/625048
2
Hi I use fancy header but the page number overlaps with the section name in the header. Is there a way to force either a tiny bit smaller text or just allow for longer margins in the header? Thanks. MRE: ``` \documentclass{book} \usepackage[utf8]{inputenc} \usepackage{fancyhdr} \fancyhf{} \fancyhead[LE]{\small\leftmark}%left on even \fancyhead[RO]{\small\rightmark}%right on odd \fancyhead[RE,LO]{ {\textbf{Page \thepage}} } %page number is right on even left on odd \pagestyle{fancy} \begin{document} \chapter{Introduction} \section{something} Filler text \subsection{something something} Filler text \newpage \section{REALLY REALLY LONG TITLE OF SECTION} \newpage \section{REALLY REALLYy REALLY REALLY LONG TITLE OF SECTION} \end{document} ```
https://tex.stackexchange.com/users/119616
fancyhdr long section name overlaps page number
false
You also can use a short title only in header, leaving the TOC entry and the section title in the main content untouched: ``` \section{Large title} \sectionmark{Short title} \label{sec:label} ```
0
https://tex.stackexchange.com/users/253770
693930
321,926
https://tex.stackexchange.com/questions/693931
5
Is it possible to change text width in the middle of a page? If I use `\newgeometry` and `\restoregeometry` this forces a page break. The package `changepage` and the command `\adjustwidth` work for the MWE but give an error in my real .tex file, clashing with `microtype`. ``` \documentclass{article} \usepackage[textwidth=5cm,textheight=15cm]{geometry} \usepackage{lipsum} \begin{document} This is a sentence that should have a 5 cm textwidth. And now we pass to 10 cm \newgeometry{textwidth=10cm,} \lipsum[1] \restoregeometry \lipsum[1] \end{document} ```
https://tex.stackexchange.com/users/254618
Change text width for parts of the page
false
If you want to change width of lines in a single paragraph, then use `\parshape` primitive or `\hangindent` and `\hangafter` primitive registers. The width of the paragraph itself is given by the `\hsize` register and `\leftskip` and `\rightskip` registers gives the space before and after each line in the paragraph. The mentioned primitive registers are used by TeX internal paragraph builder when it builds the paagraph, i.e. at the `\par` command (which is typically inserted at empty lines by the TeX token processor).
6
https://tex.stackexchange.com/users/51799
693932
321,927
https://tex.stackexchange.com/questions/693934
2
I'm having a problem with numbering sections in my project. I want to remove a certain ordinal index, and then replace it with another number. For instance, I have 10 sections, which are normally indexed from 1 to 10. But I want to change the index of 5th section to 6, and the rest sections are indexed from 7 to 11. May you help me with this ? My thanks so much.
https://tex.stackexchange.com/users/302727
How to change the index of a certain section
false
> > I have 10 sections, which are normally indexed from 1 to 10. But I want to change the index of [the] 5th section to 6, and the [remaining] sections are indexed from 7 to 11. > > > For this use case, I suggest you insert the instruction ``` \stepcounter{section} ``` immediately ahead of the `\section` directive that would be numbered "5" by default -- and which you want to be numbered "6" instead.
3
https://tex.stackexchange.com/users/5001
693935
321,928
https://tex.stackexchange.com/questions/14730
6
I'm trying to get a big table to fit into my document using the booktabs package, but it is too wide. An example of a couple of rows of the table is given below. I'm using the `\noindent\makebox[\textwidth]{%` line because that seemed to work for me before, but its not helping now. Example: ``` \usepackage{graphicx} \usepackage{booktabs} \begin{document} \begin{table} \small \begin{center} \noindent\makebox[\textwidth]{% \begin{tabular}{lcccccccccccccccccc} \toprule Event & \multicolumn{2}{c}{Counts}& \multicolumn{8}{c}{Genres} &\multicolumn{8}{c}{Genres blabla} \\ \cmidrule(r){1-1} \cmidrule(r){2-3} \cmidrule(r){4-11}\cmidrule(r){12-19} &&&&&&&&&&&&&&&&&&\\ \midrule Test1 & 138 & 8 & 0 & 0 & 60 & 4 & 61 & 4 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 16 & 0\\ Test2 & 162 & 136 & 0 & 0 & 71 & 63 & 89 & 72 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 2 & 1\\ Test3 & 161 & 120 & 0 & 0 & 66 & 40 & 85 & 77 & 0 & 0 & 0 & 0 & 0 & 0 & 6 & 3 & 4 & 0\\ Test4 & 122 & 109 & 0 & 0 & 55 & 48 & 63 & 61 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 3 & 0\\ Test5 & 126 & 3 & 1 & 0 & 45 & 1 & 36 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 43 & 1\\ \bottomrule \end{tabular} } \end{center} \end{table} \end{document} ``` And secondly, on the `&&&&&&&&&&&&&&&&&&\\` line, I need to add the column names. But these are quite long, so i would like to have them rotated about 45 degrees and close to eachother. I tried `\rotatebox{45}{sentence1} & \rotatebox{45}{sentence2} & ... ,` but that doesn't do exactly what I want. Using `\rotatebox`, the head of `sentence2` will start where the tail of `sentence1` ended. I would like the head of `sentence2` to be right next to the head of `sentence1`. Below is an example of what i mean. When this code is compiled, there is a big spacing between the 3 headings. I would like the word "this" of the second heading to be right next to the "this" of the first one. etc. ``` \documentclass[12pt]{article} \usepackage{graphicx} \begin{document} \begin{table} \begin{tabular}{ccc} \rotatebox{45}{This is a very long heading} & \rotatebox{45}{This is a very long heading} & \rotatebox{45}{This is a very long heading} \end{tabular} \end{table} \end{document} ``` I hope that makes sense
https://tex.stackexchange.com/users/4583
Big table with rotated column labels using booktabs
false
Here is a way to construct that table with `{NiceTabular}` of `nicematrix` ( ≥ 6.22 2023-08-14) with the labels rotated by 90° as suggested by Gonzalo Medina. ``` \documentclass{article} \usepackage{booktabs} \usepackage{nicematrix} \begin{document} \begin{table} \footnotesize \setlength\tabcolsep{3pt} \centering \begin{NiceTabular}{l*{18}{c}} \toprule Event & \Block{1-2}{Counts} && \Block{1-8}{Genres} &&&&&&&& \Block{1-8}{Genres blabla} \\ \cmidrule(r){1-1} \cmidrule(r){2-3} \cmidrule(r){4-11}\cmidrule(l){12-19} \RowStyle{\rotate\scriptsize} \Block{}{some long long\\ heading} & \Block{}{some long long\\ heading} & \Block{}{some long long\\ heading} & short heading & \Block{}{some long long\\ heading} & \Block{}{some long long\\ heading} & short heading & \Block{}{some long long\\ heading} & \Block{}{some long long\\ heading} & short heading & \Block{}{some long long\\ heading} & short heading & \Block{}{some long long\\ heading} & short heading & \Block{}{some long long\\ heading} & short heading & short heading & short heading & short heading \\ \cmidrule(r){1-1} \cmidrule(rl){2-2} \cmidrule(rl){3-3} \cmidrule{4-4} \cmidrule(rl){5-5} \cmidrule(rl){6-6} \cmidrule{7-7} \cmidrule(rl){8-8} \cmidrule(rl){9-9} \cmidrule{10-10} \cmidrule(rl){11-11} \cmidrule{12-12} \cmidrule(rl){13-13} \cmidrule{14-14} \cmidrule(rl){15-15} \cmidrule(r{1pt}){16-16} \cmidrule(l{1pt}r{1pt}){17-17} \cmidrule(l{1pt}r{1pt}){17-17}\cmidrule(l{1pt}r{1pt}){18-18}\cmidrule(l{1pt}){19-19} Test1 & 138 & 8 & 0 & 0 & 60 & 4 & 61 & 4 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 16 & 0 \\ Test2 & 162 & 136 & 0 & 0 & 71 & 63 & 89 & 72 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 2 & 1 \\ Test3 & 161 & 120 & 0 & 0 & 66 & 40 & 85 & 77 & 0 & 0 & 0 & 0 & 0 & 0 & 6 & 3 & 4 & 0 \\ Test4 & 122 & 109 & 0 & 0 & 55 & 48 & 63 & 61 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 3 & 0 \\ Test5 & 126 & 3 & 1 & 0 & 45 & 1 & 36 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 43 & 1 \\ \bottomrule \end{NiceTabular} \end{table} \end{document} ```
0
https://tex.stackexchange.com/users/163000
693938
321,930
https://tex.stackexchange.com/questions/693931
5
Is it possible to change text width in the middle of a page? If I use `\newgeometry` and `\restoregeometry` this forces a page break. The package `changepage` and the command `\adjustwidth` work for the MWE but give an error in my real .tex file, clashing with `microtype`. ``` \documentclass{article} \usepackage[textwidth=5cm,textheight=15cm]{geometry} \usepackage{lipsum} \begin{document} This is a sentence that should have a 5 cm textwidth. And now we pass to 10 cm \newgeometry{textwidth=10cm,} \lipsum[1] \restoregeometry \lipsum[1] \end{document} ```
https://tex.stackexchange.com/users/254618
Change text width for parts of the page
false
Even if the OP marked the question as solved in a comment, here two working solutions, for the case someone else has a similar problem. Without additional package (`geometry` only for simple show the margin and setting `textwidth`) you could set the `leftskip` and `rightskip` (here as `newenvironment`) as mentioned by **wipet**: ``` \documentclass{article} \usepackage{blindtext} \usepackage[textwidth=10cm, showframe]{geometry} \newenvironment{smallmargin}{% \par\setlength\leftskip{2.5cm}% \setlength\rightskip\leftskip}{% \par} \begin{document} \blindtext \begin{smallmargin} \blindtext \end{smallmargin} \blindtext \end{document} ``` Or with `adjuswidth` environment provided by package `changepage` (which offers additional options), as suggested by **David Carlisle**: ``` \documentclass{article} \usepackage[textwidth=10cm,showframe]{geometry} \usepackage{changepage} \usepackage{blindtext} \begin{document} \begin{adjustwidth}{2.5cm}{2.5cm} \blindtext \end{adjustwidth} \blindtext \end{document} ```
2
https://tex.stackexchange.com/users/297560
693939
321,931
https://tex.stackexchange.com/questions/693931
5
Is it possible to change text width in the middle of a page? If I use `\newgeometry` and `\restoregeometry` this forces a page break. The package `changepage` and the command `\adjustwidth` work for the MWE but give an error in my real .tex file, clashing with `microtype`. ``` \documentclass{article} \usepackage[textwidth=5cm,textheight=15cm]{geometry} \usepackage{lipsum} \begin{document} This is a sentence that should have a 5 cm textwidth. And now we pass to 10 cm \newgeometry{textwidth=10cm,} \lipsum[1] \restoregeometry \lipsum[1] \end{document} ```
https://tex.stackexchange.com/users/254618
Change text width for parts of the page
true
To spell out and a wee bit extend and clarify your comment. The `adjustwidth` macro of `changepage` package can use also in two side documents: ``` \documentclass[twoside]{article} % <--- \usepackage[textwidth=5cm,textheight=15cm]{geometry} %--------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} % \usepackage{lipsum} % for dummy text %---------------------------------------------------------------% \usepackage[latin]{babel} \usepackage[strict]{changepage} \begin{document} This is a odd side page. Here the text has width of 5 cm. \newpage This is a even side page. Normally here the text width is 5 cm, \begin{adjustwidth*}{}{-5cm} % <--- \itshape But we can change width by use of \verb+adjustwidth*+ macro, which locally push paragraph's outside margin so, that the \verb+\textwidth+ become 10 cm wide. \lipsum[66] \end{adjustwidth*} And here the text width is again 5 cm. As before the use of the \verb+adjustwidth*+ macro. \end{document} ``` In the cases, when your document is just one sided, than you not need to load `changepage` with `strict` option. Now the `adjustwidth` can be used as ``` \begin{adjustwidth}{0cm}{-5cm} % <--- \itshape But we can change width by use of \verb+adjustwidth+ macro, which locally push paragraph's right margin so, that the \verb+\textwidth+ become 10 cm wide. \lipsum[66] \end{adjustwidth} ``` and text on any page will protrude out of the right pages text borders:
3
https://tex.stackexchange.com/users/18189
693941
321,932
https://tex.stackexchange.com/questions/693918
2
I'm trying to label an arrow in an xymatrix but because one of the formulas is quite long the label for the arrow is appearing over the second formula rather than over the arrow. What is the best way to fix this? Here is an example: ``` \documentclass{amsart} \usepackage[all]{xy} \begin{document} \[\xymatrix{ B\ar[r]^{\delta} & A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A) }\] \end{document} ```
https://tex.stackexchange.com/users/297024
xymatrix arrow labels for long formulas
true
You can place the label in the exact middle of the arrow by ``` \ar[r]^-{\delta} ``` Full example: ``` \documentclass{amsart} \usepackage[all,cmtip]{xy} \begin{document} \[ \xymatrix{ B\ar[r]^-{\delta} & A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A \oplus A } \] \end{document} ``` I added `cmtip` to avoid the unsightly arrow tips that are used by default.
1
https://tex.stackexchange.com/users/4427
693943
321,934
https://tex.stackexchange.com/questions/284116
18
Is there an automated way to generate either a wordcloud or at the very least a list of all symbols used in all math environments in a LaTeX document? I'd like to generate a symbol-only wordcloud, and I found [Wordle](http://www.wordle.net/), and [a semi-automatic way to get it directly into a TeX document](https://tex.stackexchange.com/a/948/174), but not how to only include math in the wordcloud, let alone that subscripts would be kept intact. I also found [this externalization to R](https://tex.stackexchange.com/questions/134638/showcase-tex-typography-for-tugs-calendar), which seems to be great (including choosing the font for the result), although I'm not sure how it would handle math or math-only... Is there any way to generate this without copy-pasting each equation into the Wordle input form and hope I don't run out of input size?
https://tex.stackexchange.com/users/174
Generate wordcloud of LaTeX document symbols
false
Now it could be possible with the wordcloud package : <https://www.ctan.org/pkg/wordcloud>
4
https://tex.stackexchange.com/users/217400
693951
321,935
https://tex.stackexchange.com/questions/693952
8
I searched on the Internet for the answer and found none. How can one find it? Also, I write "SLITEX" because methinks every letter of the name is, even if small, raised or lowered, the capital one but feel free to groundedly correct.
https://tex.stackexchange.com/users/302737
Who made SLITEX?
false
If you download LaTeX 2.09 from `/CTAN/obsolete/macros/latex209/distribs/latex209.tar.gz`, (by the way, it is still possible to run this distribution using TeX today since TeX itself hasn’t introduced any incompatible changes) you will find in the file `general/slitex.tex`, ``` % SLITEX VERSION 2.09 <25 March 1992> % Copyright (C) 1992 by Leslie Lamport ``` Since it is contained in the 209 distribution, it is not surprise that SLITEX is made by Lamport himself. If you have further doubts, in Norman Walsh's dated LaTeX guide he [said](https://nwalsh.com/tex/texhelp/SliTeX.html) > > For a description of SliTeX, you should consult Appendix A of "A Document Preparation System: LaTeX" by Leslie Lamport, ISBN 0-201-15790-X, published jointly by the American Mathematical Society and Addison-Wesley Publishing Company. > > > I'm unable to find the 1st edition online, but if you are lucky might able to find one in your local library.
11
https://tex.stackexchange.com/users/246082
693953
321,936
https://tex.stackexchange.com/questions/693952
8
I searched on the Internet for the answer and found none. How can one find it? Also, I write "SLITEX" because methinks every letter of the name is, even if small, raised or lowered, the capital one but feel free to groundedly correct.
https://tex.stackexchange.com/users/302737
Who made SLITEX?
false
For a description of `SliTeX`, consult Appendix A of **A Document Preparation System: LaTeX** by Leslie Lamport (First edition, ISBN 0-201-15790-X), published jointly by the American Mathematical Society and Addison-Wesley Publishing Company. `SliTeX` has been eliminated as of `LaTeX 2ε`, i.e. 1994. (The all caps `SLITEX` spelling stems form the fact that it was a FORTRAN program.)
3
https://tex.stackexchange.com/users/26614
693955
321,938
https://tex.stackexchange.com/questions/693949
7
Using `\usym{2776}` one can typeset numbers in circles. Is it possible, to also add numbers to other symbols, e.g., `\faBookmark`? ``` \documentclass{article} \usepackage{relsize} \usepackage{utfsym} \usepackage{fontawesome5} \begin{document} My text {\relscale{1.1}\usym{2776}} is awesome. My text {\relscale{.9}\faBookmark} is awesome. \end{document} ```
https://tex.stackexchange.com/users/110154
Adding Text (e.g., Numbers) to Symbols
true
Yes, it is possible. One way is to write your symbol and then add a number on top of it, for example with `\ooalign`. Here's a possible solution. ``` \documentclass{article} \usepackage{relsize} \usepackage{utfsym} \usepackage{fontawesome5} \usepackage{xcolor} \newcommand*{\faBookmarknum}[1]{% \ooalign{% \relscale{.9}\faBookmark\cr% \hfil\raisebox{.5ex}{% \color{white}\relscale{.65}#1% }\hfil\cr% }% } \begin{document} My text {\relscale{1.1}\usym{2776}} is awesome. My text \faBookmarknum{1} is awesome. \footnotesize \faBookmarknum{1} \faBookmarknum{2} \faBookmarknum{3} \faBookmarknum{4} \faBookmarknum{5} \faBookmarknum{6} \faBookmarknum{7} \faBookmarknum{8} \faBookmarknum{9} \faBookmarknum{0} \normalsize \faBookmarknum{1} \faBookmarknum{2} \faBookmarknum{3} \faBookmarknum{4} \faBookmarknum{5} \faBookmarknum{6} \faBookmarknum{7} \faBookmarknum{8} \faBookmarknum{9} \faBookmarknum{0} \large \faBookmarknum{1} \faBookmarknum{2} \faBookmarknum{3} \faBookmarknum{4} \faBookmarknum{5} \faBookmarknum{6} \faBookmarknum{7} \faBookmarknum{8} \faBookmarknum{9} \faBookmarknum{0} \Large \faBookmarknum{1} \faBookmarknum{2} \faBookmarknum{3} \faBookmarknum{4} \faBookmarknum{5} \faBookmarknum{6} \faBookmarknum{7} \faBookmarknum{8} \faBookmarknum{9} \faBookmarknum{0} \end{document} ``` --- Here's another option were the symbol is lowered instead of the number being raised, so that the baseline of the number aligns with that of the text. ``` \documentclass{article} \usepackage{relsize} \usepackage{utfsym} \usepackage{fontawesome5} \usepackage{xcolor} \newcommand*{\faBookmarknum}[1]{% \ooalign{% \raisebox{-.5ex}{% \relscale{.9}\faBookmark% }\cr% \hfil\textcolor{white}{\relscale{.65}#1}\hfil\cr% }% } \begin{document} My text {\relscale{1.1}\usym{2776}} is awesome. My text \faBookmarknum{1} is awesome. \footnotesize \faBookmarknum{1} \faBookmarknum{2} \faBookmarknum{3} \faBookmarknum{4} \faBookmarknum{5} \faBookmarknum{6} \faBookmarknum{7} \faBookmarknum{8} \faBookmarknum{9} \faBookmarknum{0} \normalsize \faBookmarknum{1} \faBookmarknum{2} \faBookmarknum{3} \faBookmarknum{4} \faBookmarknum{5} \faBookmarknum{6} \faBookmarknum{7} \faBookmarknum{8} \faBookmarknum{9} \faBookmarknum{0} \large \faBookmarknum{1} \faBookmarknum{2} \faBookmarknum{3} \faBookmarknum{4} \faBookmarknum{5} \faBookmarknum{6} \faBookmarknum{7} \faBookmarknum{8} \faBookmarknum{9} \faBookmarknum{0} \Large \faBookmarknum{1} \faBookmarknum{2} \faBookmarknum{3} \faBookmarknum{4} \faBookmarknum{5} \faBookmarknum{6} \faBookmarknum{7} \faBookmarknum{8} \faBookmarknum{9} \faBookmarknum{0} \end{document} ```
8
https://tex.stackexchange.com/users/201628
693959
321,940
https://tex.stackexchange.com/questions/693927
-3
How can I set the text colour of all chapters to the following gradient? ``` linear-gradient(90deg, rgba(254,122,58,1) 0%, rgba(218,60,152,1) 100%) ``` At first glance, the obvious choice would be the [`gradient-text` package](https://ctan.math.illinois.edu/macros/latex/contrib/gradient-text/gradient-text.pdf), but it explicitly says: > > `{⟨text⟩}` is the text you desire to have gradient color. Be aware that this command most > likely wouldn’t output content as expected if this parameter is filled with tokens that > cannot expand into pure text. > > > That makes it impossible to use necessary commands like `\thechapter` (which I tried unsuccessfully). ChatGPT recommended me the following code, though it won't print the actual chapter heading, but only the text `\protect\rule` (the gradient is fine, though). ``` \documentclass{scrbook} \usepackage{titlesec} \usepackage{color} \usepackage{tikz} \usepackage{gradient-text} \titleformat{\chapter}[display] {\normalfont\huge\bfseries}{ \begin{center} \begin{tikzpicture} \node[inner sep=0pt, outer sep=0pt] (gradient) { \gradientRGB{\rule{8cm}{2cm}}{254,122,58}{218,60,152} }; \node[anchor=west, text=white] at (gradient.west) {\thechapter}; \end{tikzpicture} \end{center} }{20pt}{\Huge} \begin{document} \chapter{Chapter One} blablabla \end{document} ``` Are there any alternatives? Thank you!
https://tex.stackexchange.com/users/254751
How to set a colour gradient for all chapter headings?
true
It's unclear from your question exactly what you want, but perhaps something like this? ``` \documentclass{book} \usepackage{gradient-text} \usepackage{titlesec} \newcommand{\mygradient}[1]{\gradientRGB{#1}{254,122,58}{218,60,152}} \titleformat{\chapter}[display] {\normalfont\huge\bfseries} {\ExpandArgs{x}\mygradient{\chaptertitlename\space\thechapter}} {20pt} {\Huge\ExpandArgs{x}\mygradient} \begin{document} \chapter{Some title} \end{document} ``` There are some limitations to what you can put in the argument of `\chapter`, but simple things like `\the<counter>` should expand into text.
1
https://tex.stackexchange.com/users/208544
693971
321,947
https://tex.stackexchange.com/questions/693972
4
The table is required to occupy full page width (Evenly stretched) (the code looks a bit awful due to use of auto-table generator, any cleanup/beautification will help additionally). MWE is given below-- ``` \documentclass[listof=totoc,a4paper,11pt,oneside,chapterprefix=true,sfdefaults=false]{scrbook} \usepackage{caption} \usepackage{booktabs} \begin{document} % For tables use \begin{table}[ht] \centering \caption[Supported Sensors in Smartphone]{Some supported sensors in smartphone\\\emph{Em:Embedded, Ex:External, PC:Proprioceptive, EC:Exteroceptive, A:Active, P:Passive}} \label{comptable} \begin{tabular}{l|l|l|l|l} \toprule \textit{\textbf{Category}} & \textit{\textbf{Name}} & \textit{\textbf{Em/Ex}} & \textit{\textbf{PC/EC}} & \textit{\textbf{A/P}} \\ \midrule Tactile & Proximity & Em/Ex & EC & A/P \\ \hline Acceleration & \begin{tabular}[c]{@{}l@{}}Gyroscope\\Accelerometer\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em\\Ex\end{tabular} & \begin{tabular}[c]{@{}l@{}}PC\\PC\end{tabular} & \begin{tabular}[c]{@{}l@{}}P\\P\end{tabular} \\ \hline Thermal & Temperature & Ex & EC & P/A \\ \hline ~Image & \begin{tabular}[c]{@{}l@{}}CMOS camera\\Camcorder\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em\\Ex\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}P/A\\A\end{tabular} \\ \hline Light & \begin{tabular}[c]{@{}l@{}}Ambient light\\Back illuminated\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em/Ex\\Ex\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}A\\P\end{tabular} \\ \hline Hydro & \begin{tabular}[c]{@{}l@{}}Moisture\\Humidity\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em\\Ex\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}P\\P\end{tabular} \\ \hline Location & \begin{tabular}[c]{@{}l@{}}Digital compass\\GPS\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em\\Em\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}A\\P\end{tabular} \\ \hline Height & Altimeter &------ & EC & P \\ \hline Medical & \begin{tabular}[c]{@{}l@{}}Barometer \\Heart rate monitor\\Bio-sensors\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em\\------\\------\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}P\\P\\P\end{tabular} \\ \hline Acoustic & Microphone & Em & EC & P \\ \hline Radio & \begin{tabular}[c]{@{}l@{}}RFID\\Bluetooth\end{tabular} & \begin{tabular}[c]{@{}l@{}}------\\Em\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}A\\A\end{tabular} \\ \bottomrule \end{tabular} \end{table} \end{document} ```
https://tex.stackexchange.com/users/218773
Table not spreading full page width
true
To make the table occupy the full width of the text block, I suggest you switch to a `tabular*` environment. To make the table look more appealing, I'd get rid of all vertical rules and replace all instances of `\hline` with `\addlinespace`. Oh, I'd get rid of the completely unnecessary ***bolding and italicizing*** of the header row. ``` \documentclass[listof=totoc,a4paper,11pt,oneside, chapterprefix=true,sfdefaults=false ]{scrbook} \usepackage{booktabs} % handy shortcut macro: \newcommand\mytab[1]{% \begin{tabular}[t]{@{}l@{}} #1 \end{tabular}} \begin{document} \begin{table}[ht] \setlength{\tabcolsep}{0pt} % make LaTeX figure out intercolumn padding \caption[Supported Sensors in Smartphones]{% Some supported sensors in smartphones\\ Em:~Embedded, Ex:~External; PC:~Proprioceptive, EC:~Exteroceptive;\\ A:~Active, P:~Passive.} \label{ comptable} \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} lllll } \toprule Category & Name & Em/Ex & PC/EC & A/P \\ \midrule Tactile & Proximity & Em/Ex & EC & A/P \\ \addlinespace Acceleration & \mytab{Gyroscope\\Accelerometer} & \mytab{Em\\Ex} & \mytab{PC\\PC} & \mytab{P\\P} \\ \addlinespace Thermal & Temperature & Ex & EC & P/A \\ \addlinespace Image & \mytab{CMOS camera\\Camcorder} & \mytab{Em\\Ex} & \mytab{EC\\EC} & \mytab{P/A\\A} \\ \addlinespace Light & \mytab{Ambient light\\Back illuminated} & \mytab{Em/Ex\\Ex} & \mytab{EC\\EC} & \mytab{A\\P} \\ \addlinespace Hydro & \mytab{Moisture\\Humidity} & \mytab{Em\\Ex} & \mytab{EC\\EC} & \mytab{P\\P} \\ \addlinespace Location & \mytab{Digital compass\\GPS} & \mytab{Em\\Em} & \mytab{EC\\EC} & \mytab{A\\P} \\ \addlinespace Height & Altimeter &-- & EC & P \\ \addlinespace Medical & \mytab{Barometer \\Heart rate monitor \\Bio-sensors} & \mytab{Em\\--\\--} & \mytab{EC\\EC\\EC} & \mytab{P\\P\\P} \\ \addlinespace Acoustic & Microphone & Em & EC & P \\ \addlinespace Radio & \mytab{RFID\\Bluetooth} & \mytab{--\\Em} & \mytab{EC\\EC} & \mytab{A\\A} \\ \bottomrule \end{tabular*} \end{table} \end{document} ```
2
https://tex.stackexchange.com/users/5001
693976
321,948
https://tex.stackexchange.com/questions/693972
4
The table is required to occupy full page width (Evenly stretched) (the code looks a bit awful due to use of auto-table generator, any cleanup/beautification will help additionally). MWE is given below-- ``` \documentclass[listof=totoc,a4paper,11pt,oneside,chapterprefix=true,sfdefaults=false]{scrbook} \usepackage{caption} \usepackage{booktabs} \begin{document} % For tables use \begin{table}[ht] \centering \caption[Supported Sensors in Smartphone]{Some supported sensors in smartphone\\\emph{Em:Embedded, Ex:External, PC:Proprioceptive, EC:Exteroceptive, A:Active, P:Passive}} \label{comptable} \begin{tabular}{l|l|l|l|l} \toprule \textit{\textbf{Category}} & \textit{\textbf{Name}} & \textit{\textbf{Em/Ex}} & \textit{\textbf{PC/EC}} & \textit{\textbf{A/P}} \\ \midrule Tactile & Proximity & Em/Ex & EC & A/P \\ \hline Acceleration & \begin{tabular}[c]{@{}l@{}}Gyroscope\\Accelerometer\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em\\Ex\end{tabular} & \begin{tabular}[c]{@{}l@{}}PC\\PC\end{tabular} & \begin{tabular}[c]{@{}l@{}}P\\P\end{tabular} \\ \hline Thermal & Temperature & Ex & EC & P/A \\ \hline ~Image & \begin{tabular}[c]{@{}l@{}}CMOS camera\\Camcorder\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em\\Ex\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}P/A\\A\end{tabular} \\ \hline Light & \begin{tabular}[c]{@{}l@{}}Ambient light\\Back illuminated\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em/Ex\\Ex\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}A\\P\end{tabular} \\ \hline Hydro & \begin{tabular}[c]{@{}l@{}}Moisture\\Humidity\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em\\Ex\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}P\\P\end{tabular} \\ \hline Location & \begin{tabular}[c]{@{}l@{}}Digital compass\\GPS\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em\\Em\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}A\\P\end{tabular} \\ \hline Height & Altimeter &------ & EC & P \\ \hline Medical & \begin{tabular}[c]{@{}l@{}}Barometer \\Heart rate monitor\\Bio-sensors\end{tabular} & \begin{tabular}[c]{@{}l@{}}Em\\------\\------\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}P\\P\\P\end{tabular} \\ \hline Acoustic & Microphone & Em & EC & P \\ \hline Radio & \begin{tabular}[c]{@{}l@{}}RFID\\Bluetooth\end{tabular} & \begin{tabular}[c]{@{}l@{}}------\\Em\end{tabular} & \begin{tabular}[c]{@{}l@{}}EC\\EC\end{tabular} & \begin{tabular}[c]{@{}l@{}}A\\A\end{tabular} \\ \bottomrule \end{tabular} \end{table} \end{document} ```
https://tex.stackexchange.com/users/218773
Table not spreading full page width
false
Another ways is use `tabularray` table. With it code is a bit more concise: ``` \documentclass[listof=totoc, a4paper,11pt,oneside, chapterprefix=true, sfdefaults=false ]{scrbook} \usepackage{caption} \usepackage{tabularray} \UseTblrLibrary{booktabs} \begin{document} \begin{table}[ht] \caption[Supported Sensors in Smartphone] {Some supported sensors in smartphone\\ \emph{Em:Embedded, Ex:External, PC:Proprioceptive, EC:Exteroceptive, A:Active, P:Passive} } \label{comptable} \begin{tblr}{colspec = {@{} l X[2, l] *{3}{X[l] } @{}}, row{1} = {font=\bfseries\itshape}, colsep=8pt, rowsep = 1pt, row{even[4]} = {abovesep=7pt} } \toprule Category & Name & Em/Ex & PC/EC & A/P \\ \midrule Tactile & Proximity & Em/Ex & EC & A/P \\ Acceleration & {Gyroscope\\ Accelerometer} & {Em\\ Ex} & {PC\\ PC} & {P\\P} \\ Thermal & Temperature & Ex & EC & P/A \\ Image & {CMOS camera\\ Camcorder} & {Em\\ Ex} & {EC\\ EC} & {P/A\\ A} \\ Light & {Ambient light\\ Back illuminated} & {Em/Ex\\ Ex} & {EC\\ EC} & {A\\ P} \\ Hydro & {Moisture\\ Humidity} & {Em\\Ex} & {EC\\ EC} & {P\\ P} \\ Location & {Digital compass\\ GPS} & {Em\\ Em} & {EC\\ EC} & {A\\ P} \\ Height & Altimeter & -- & EC & P \\ Medical & {Barometer\\ Heart rate monitor\\ Bio-sensors} & {Em\\ -- \\--} & {EC\\ EC\\ EC} & {P\\ P\\ P} \\ Acoustic & Microphone & Em & EC & P \\ Radio & {RFID\\ Bluetooth} & {--\\ Em} & {EC\\ EC} & {A\\ A} \\ \bottomrule \end{tblr} \end{table} \end{document} ```
2
https://tex.stackexchange.com/users/18189
693977
321,949
https://tex.stackexchange.com/questions/693978
1
How can I make page numbers red in table of contents? I have * `colorlinks=true`, `linkcolor=blue`, so standard internal links are blue; * `linctoc=all`, so both table of contents entry names and page numbers are links (the dots themselves are not); * `\hypersetup{linkcolor=black}` in the group generating the table of contents, so the links in the table of contents are black instead of blue everywhere else. Finally, I hoped to change the color of the page numbers (to red, for example) in table of contents independently from the entry name color (black in this instace). As a start, I added `\renewcommand{\cftsecpagefont}{\color{red}}` to change the page numbers of sections, but it is ignored. *(It is also ignored when placed inside the group generating the table of contents. Furthermore, it is ignored even if `\hypersetup{linkcolor=black}` is removed from the group. Conversely, `\renewcommand{\cftsecpagefont}{\bfseries}` has the intended effect...)* ``` \documentclass{book} \usepackage{tocloft} \usepackage{titlesec} \usepackage{xcolor} \usepackage[colorlinks=true, linkcolor=blue, hypertexnames=false, linktoc=all]{hyperref} % blue internal links for document; in TOC, entry name and page nr are links \renewcommand{\cftsecpagefont}{\color{red}} % does not work \begin{document} {\hypersetup{linkcolor=black} % black links for table of contents (but you may comment this out, red color still not added) \tableofcontents} \chapter{Example chapter} \section{Example section} \subsection{Example subsection} This is some text. \end{document} ``` --- The question [Change the page numbers in the Table of Contents to red](https://tex.stackexchange.com/q/405164/116907) by [A H](https://tex.stackexchange.com/users/119987/a-h) is ***not** a duplicate*: there `linktoc=all` is replaced with `linktocpage`. This removes links from entry names which is not desired.
https://tex.stackexchange.com/users/116907
How to make red page numbers in table of contents while 'linktoc=all' and '\hypersetup{linkcolor=black}' are present?
true
You could hide the link colour in the toc: ``` \documentclass{book} \usepackage{tocloft} \usepackage{titlesec} \usepackage{xcolor} \usepackage[colorlinks=true, linkcolor=blue, hypertexnames=false, linktoc=all]{hyperref} % blue internal links for document; in TOC, entry name and page nr are links \renewcommand{\cftsecpagefont}{\color{red}} % does not work \begin{document} {\hypersetup{hidelinks} \tableofcontents} \chapter{Example chapter} \section{Example section} \subsection{Example subsection} This is some text. \end{document} ```
2
https://tex.stackexchange.com/users/36296
693979
321,950
https://tex.stackexchange.com/questions/693981
0
I am in a situation in which it seems desirable to use multiple `tabularx` environments to feign a single one. But I would like for the contents of their right-most columns to be flush left with each other. That is, is there a way to adjust the code below so that, of the words 'Yessir,' 'Yessirino,' and 'Ya-huh,' the one with the greatest width (namely 'Yessirino') is automatically chosen to establish a common width for the right-most column in each of the three `tabularx` environments? ``` \documentclass{article} \usepackage{tabularx} \usepackage{showframe} \begin{document} \centering \begin{tabularx}{\linewidth}{r >$r<$ @{} >{\raggedright${}}X<{$} l} Yes & Yes & Yes & Yessir \end{tabularx} \begin{tabularx}{\linewidth}{r >$r<$ @{} >{\raggedright${}}X<{$} l} Yes & Yes & Yes & Yessirino \end{tabularx} \begin{tabularx}{\linewidth}{r >$r<$ @{} >{\raggedright${}}X<{$} l} Yes & Yes & Yes & Ya-huh \end{tabularx} \end{document} ``` (Note: If you would like a partial explanation as to why I would like to use multiple `tabularx` environments to feign a single one, see David Carlisle's answer to a previous question of mine at <https://tex.stackexchange.com/a/693585/277990>. This, however, is probably not essential to my question.)
https://tex.stackexchange.com/users/277990
Make contents of several tabularx environments' corresponding columns flush
true
Do you after the following: Vertical line before last column is added that it is better visible equal width of last columns in all tables. In the real document you can remove it. ``` \documentclass{article} \usepackage{tabularx} \newlength\colwidth \usepackage{showframe} \begin{document} \begingroup \centering \settowidth\colwidth{Yessirino} % <--- select the longest text in the last columns \begin{tabularx}{\linewidth}{r >{$}r<{$} @{} >{\raggedright${}}X<{$} | p{\colwidth}} Yes & Yes & Yes & Yessir \end{tabularx} \begin{tabularx}{\linewidth}{r >{$}r<{$} @{} >{\raggedright${}}X<{$} | p{\colwidth}} Yes & Yes & Yes & Yessirino \end{tabularx} \begin{tabularx}{\linewidth}{r >{$}r<{$} @{} >{\raggedright${}}X<{$} | p{\colwidth}} Yes & Yes & Yes & Ya-huh \end{tabularx} \endgroup \end{document} ```
1
https://tex.stackexchange.com/users/18189
693984
321,952
https://tex.stackexchange.com/questions/693863
1
I want to use the arev font for math. I noticed that the `\nexists` symbol does not render properly. Is it possible for me to use this font while having access to any special symbols that may be missing with the package?
https://tex.stackexchange.com/users/302100
Not exists in with arev?
true
The response from @user94293 establishes the problem. The correct answer, I guess, would be to manually define the missing symbols in arev including `nexists` using either @egreg's or @Mico's answers. I ended up just changing the font to newtxsf which is not missing symbols (to my knowledge) and looks alright to me.
0
https://tex.stackexchange.com/users/302100
693990
321,955
https://tex.stackexchange.com/questions/129274
116
Optical illusions are fun, so I thought it would be a good idea to have a list of optical illusions designed using MetaPost, or PGF/TikZ, or PS-Tricks, or Asymptote. Each entry should display one optical illusion and the code necessary to produce it.
https://tex.stackexchange.com/users/3954
Showcase of optical illusions made with TeX/LaTeX/LuaTeX/ConTeXt
false
I have enhanced [@**osjerick**](https://tex.stackexchange.com/users/14589/osjerick)'s [**response**](https://tex.stackexchange.com/a/149780/302766) by making the **illustration dynamic**. You can now adjust the **number of squares** both vertically and horizontally, along with their **heights** and **widths**, and more. I hope you find it appealing. The result ========== The code ======== ``` \documentclass[tikz]{standalone} \begin{document} \def\ncolumns{6} \def\nrows{9} \def\width{1} \def\height{1} \def\phaseShift{4} \pgfmathsetmacro\offset{2/\phaseShift} % Tweaking might % be necessary to achieve a good result. \definecolor{customgray}{HTML}{808080} \begin{tikzpicture} \filldraw[color=customgray] (-\offset/2+\width*2,{\height*(\nrows+1)}) rectangle (\offset/2+2*\width,\height); \filldraw[color=customgray] (-\offset/2+\width*2*\ncolumns+\width,\height) rectangle (\offset/2+\width*2*\ncolumns+\width,{\height*(\nrows+1)}); \foreach \y in {1,2,...,\nrows} { \pgfmathsetmacro\X{sin(2.5*36*(\y-1))/\phaseShift} \foreach \x in {1,2,...,\ncolumns} { \filldraw (\width*2*\x+\X, \y*\height) rectangle +(\width, \height); } \ifnum\y=1 \else \draw[ color=customgray, line width = \height * 0.25 mm ] (-\offset/2+2*\width,\y*\height) -- (\offset/2+\width*2*\ncolumns+\width, \y*\height); \fi } \end{tikzpicture} \end{document} ```
2
https://tex.stackexchange.com/users/302766
693994
321,956
https://tex.stackexchange.com/questions/610647
1
I am trying to adjust the size of a table in landscape view so that (1) one can read the content and (2) no space is left on the pages. Currently it looks like this: ``` \documentclass[12pt,a4paper,twoside]{scrreprt} \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry} \usepackage{graphicx} \usepackage{booktabs} \usepackage[table,xcdraw]{xcolor} \usepackage{lscape} \begin{document} \begin{sidewaystable}[] \resizebox{\textwidth}{!}{% \begin{tabular}{@{}|l|c|c|c|c|c|c|c|c|c|c|@{}} \toprule \rowcolor[HTML]{C0C0C0} \multicolumn{1}{|c|}{\cellcolor[HTML]{C0C0C0}{\color[HTML]{000000} \textbf{Technology Category}}} & \textbf{\begin{tabular}[c]{@{}c@{}}Average Number of Claims\\ (Median)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Q1 Share of Granted Patents\\ in \%\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Q2 Average Technological Scope\\ (Median)\end{tabular}} & {\color[HTML]{000000} \textbf{\begin{tabular}[c]{@{}c@{}}Q3 Average International Scope\\ (Median)\end{tabular}}} & \textbf{\begin{tabular}[c]{@{}c@{}}Q4 Average Forward Citation (Pfc)\\ (Median)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Patent Activity (PATC)\\ (Absolute Counts)\end{tabular}} & {\color[HTML]{000000} \textbf{\begin{tabular}[c]{@{}c@{}}Technology Share (Pts)\\ in \%\end{tabular}}} & \textbf{\begin{tabular}[c]{@{}c@{}}Average Patent Quality (PQTC)\\ (Sum of Q1-Q4)\end{tabular}} & \textbf{Patent Strength (PSTC)} & \textbf{\begin{tabular}[c]{@{}c@{}}Technology Share (PTSTC)\\ based on Patent Strength in \%\end{tabular}} \\ \midrule \rowcolor[HTML]{E6DEDE} \multicolumn{11}{|l|}{\cellcolor[HTML]{E6DEDE}\textbf{TP1 Fossil Substitution}} \\ \midrule Fermentation/Utilization of microorganisms & 18 & 77 & 3 & 14 & 0 & 4.369 & 10 & 17.8 & 77.7637 & 6 \\ \midrule Bioethanol/Bio-based chemicals & 19 & 72 & 3 & 12 & 0 & 7.963 & 18 & 15.7 & 125.178 & 10 \\ \midrule \rowcolor[HTML]{E6DEDE} \multicolumn{11}{|l|}{\cellcolor[HTML]{E6DEDE}\textbf{TP2 Agriculture}} \\ \midrule Water management & 7 & 35 & 3 & 1 & 5 & 2.483 & 6 & 9.4 & 23.216 & 2 \\ \midrule Precision farming/agricultural systems & 10 & 44 & 53 & 2 & 2 & 14.688 & 34 & 57.4 & 843.679 & 66 \\ \midrule \rowcolor[HTML]{E6DEDE} \multicolumn{11}{|l|}{\cellcolor[HTML]{E6DEDE}\textbf{TP3 Biomass Use/Processing}} \\ \midrule Waste reuse/processing & 9 & 47 & 3 & 2 & 2 & 1.722 & 4 & 7.5 & 12.863 & 1 \\ \midrule Biomass processing & 18 & 68 & 3 & 9 & 0 & 1.459 & 3 & 12.7 & 18.500 & 1 \\ \midrule \rowcolor[HTML]{E6DEDE} \multicolumn{11}{|l|}{\cellcolor[HTML]{E6DEDE}\textbf{TP4 High Value}} \\ \midrule Chemistry advance/green chemistry & 18 & 60 & 2 & 8 & 1 & 2.973 & 7 & 11.6 & 34.487 & 3 \\ \midrule Enzyme technologies & 20 & 71 & 3 & 13 & 0 & 8.089 & 18 & 16.7 & 135.167 & 11 \\ \bottomrule \end{tabular}% } \caption{Summary Patent Indicators} \label{tab: Summary Patent Indicators} \end{sidewaystable} \end{document} ``` Any suggestions on how to increase the size, either on the same page, or over multiple pages? Both options are fine for me, readability has priority.
https://tex.stackexchange.com/users/249103
Scaling large table in landscape view
false
Here is a solution with `{NiceTabular}` of `nicematrix` (≥ 6.22 of 2023-08-14). You need several compilations. ``` \documentclass[12pt,a4paper,twoside]{scrreprt} \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry} \usepackage{nicematrix} \usepackage{booktabs} \usepackage{rotating} \begin{document} \begin{sidewaystable}[htbp] \NewDocumentCommand{\SubTitle}{m}{\Block[l,fill=[HTML]{E6DEDE}]{1-*}{\textbf{#1}}} \small \renewcommand{\arraystretch}{1.2} \setlength{\tabcolsep}{0pt} \begin{NiceTabular}{l*{10}{X[c]}}[color-inside] \rowcolor[HTML]{C0C0C0} \textbf{Technology Category} & \RowStyle[cell-space-top-limit=3pt]{\rotate} \Block{}{Average Number\\ of Claims (Median)} & \Block{}{Q1 Share of Granted\\ Patents in \%} & \Block{}{Q2 Average\\ Technological Scope\\ (Median)} & \Block{}{Q3 Average\\ International Scope\\ (Median)} & \Block{}{Q4 Average\\ Forward Citation (Pfc)\\ (Median)} & \Block{}{Patent Activity\\ (PATC)\\ (Absolute Counts)} & \Block{}{Technology Share (Pts)\\ in \%} & \Block{}{Average Patent Quality\\ (PQTC) (Sum of Q1-Q4)} & \Block{}{Patent Strength (PSTC)} & \Block{}{Technology Share\\ (PTSTC) based on\\ Patent Strength in \%} \\ \midrule \SubTitle{TP1 Fossil Substitution} \\ Fermentation/Utilization of microorganisms & 18 & 77 & 3 & 14 & 0 & 4.369 & 10 & 17.8 & 77.7637 & 6 \\ Bioethanol/Bio-based chemicals & 19 & 72 & 3 & 12 & 0 & 7.963 & 18 & 15.7 & 125.178 & 10 \\ \SubTitle{TP2 Agriculture} \\ Water management & 7 & 35 & 3 & 1 & 5 & 2.483 & 6 & 9.4 & 23.216 & 2 \\ Precision farming/agricultural systems & 10 & 44 & 53 & 2 & 2 & 14.688 & 34 & 57.4 & 843.679 & 66 \\ \SubTitle{TP3 Biomass Use/Processing} \\ Waste reuse/processing & 9 & 47 & 3 & 2 & 2 & 1.722 & 4 & 7.5 & 12.863 & 1 \\ Biomass processing & 18 & 68 & 3 & 9 & 0 & 1.459 & 3 & 12.7 & 18.500 & 1 \\ \SubTitle{TP4 High Value} \\ Chemistry advance/green chemistry & 18 & 60 & 2 & 8 & 1 & 2.973 & 7 & 11.6 & 34.487 & 3 \\ Enzyme technologies & 20 & 71 & 3 & 13 & 0 & 8.089 & 18 & 16.7 & 135.167 & 11 \\ \bottomrule \end{NiceTabular} \caption{Summary Patent Indicators} \label{tab: Summary Patent Indicators} \end{sidewaystable} \end{document} ``` You need several compilations (because `nicematrix` uses PGF/Tikz nodes under the hood).
0
https://tex.stackexchange.com/users/163000
693996
321,957
https://tex.stackexchange.com/questions/693904
0
I have a voluminous book with the following bibliography setup: ``` \usepackage[backend=bibtex, bibstyle=authoryear, citestyle=authoryear-icomp, natbib=true, ibidpage=true]{biblatex} ``` As far as I can tell, packages like authorindex or makeidx won't work with this, right? Unfortunately, I can't change much on this set-up. I need `natbib` formatting, and bibtex broke in this document a few years ago, and I could never find out what the problem was.
https://tex.stackexchange.com/users/302700
Is an author index possible with Biblatex natbib=true
false
`authorindex` isn't directly compatible with `biblatex` (and changing anything in `natbib.cfg` will not do anything for `biblatex` no matter if the `natbib` compatibility mode is used: the `natbib` compatibility mode essentially only enables `natbib` names of some cite commands, see [Is there a disadvantage to using natbib=true with biblatex?](https://tex.stackexchange.com/q/149313/35864)). But as mentioned [in the comments](https://tex.stackexchange.com/questions/693904/is-an-author-index-possible-with-biblatex-natbib-true#comment1722176_693904) by [Dai Bowen](https://tex.stackexchange.com/users/106162/dai-bowen) and demonstrated in [How to create an author index using BibLaTeX with Biber backend and APA style](https://tex.stackexchange.com/q/546456/35864) and the example documents linked there, `biblatex` has indexing support out of the box, so there should be no need for `authorindex`. If you want indexing in a document using `biblatex` I strongly suggest you look into `biblatex`'s built-in capabilities instead of external packages for cite indexing. [How to create an author index using BibLaTeX with Biber backend and APA style](https://tex.stackexchange.com/q/546456/35864) and the example documents linked there can be a start, but if your document setup is already more complicated when it comes to citations, the bibliography or indexing and you cannot manage to get anything going based on the link, I suggest you ask a new question with a compilable example document and a clear description of what you want to achieve.
0
https://tex.stackexchange.com/users/35864
693998
321,959
https://tex.stackexchange.com/questions/296778
4
I have some arrays in math mode, such as the one below. I would like a diagonal line in a cell, something like `diagbox` (diagbox package) or `diaghead` (makecell package). But it seems that `diagbox` and `diaghead` only work in a `tabular` environment. Of course a way to go consists in using `tabular` instead of `array` but this requires to put some `$`'s in each cell. I'm looking for a less tedious solution. ``` \documentclass{article} \usepackage{diagbox} \begin{document} $$ \begin{array}{r|cccc} %\diagbox{x}{y} & (0,0) & (0,1) & (1,0) & (1,1) \\ \hline (0,0) & \phi^{-1} & \frac{f_n}{f_{n-1}} - \phi^{-1} & 0 & \frac{f_{n+1}}{f_{n-1}} \\ (0,1) & f_{n}/f_{n-1} & 0 & f_{n+1}/f_{n-1} & 0 \\ (1,0) & \phi^{-1} & \phi^{-2} & 0 & 0 \\ (1,1) & 1 & 0 & 0 & 0 \\ \end{array} $$ \end{document} ```
https://tex.stackexchange.com/users/18595
Diagonal line in math arrays
false
The package `nicematrix` provides its own built-in command `\diagbox` in all its environments: `{NiceTabular}`, `{NiceArray}`, `{pNiceMatrix}`, etc. Here, you might use `{NiceArray}`: ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \[\renewcommand{\arraystretch}{1.4} \begin{NiceArray}{r|cccc} \diagbox{x}{y} & (0,0) & (0,1) & (1,0) & (1,1) \\ \hline (0,0) & \phi^{-1} & \frac{f_n}{f_{n-1}} - \phi^{-1} & 0 & \frac{f_{n+1}}{f_{n-1}} \\ (0,1) & f_{n}/f_{n-1} & 0 & f_{n+1}/f_{n-1} & 0 \\ (1,0) & \phi^{-1} & \phi^{-2} & 0 & 0 \\ (1,1) & 1 & 0 & 0 & 0 \\ \end{NiceArray}\] \end{document} ```
0
https://tex.stackexchange.com/users/163000
694000
321,961
https://tex.stackexchange.com/questions/375260
0
I am new to using LaTeX. I started to creating a simple table and found it difficult to create all lines in first row of table (horizontal and vertical) wider than the rest of table. How can I do that? Thanks, Thomas Edit: I try to edit code of what I have in mind, maybe it will be more specific. Consider please this table: ``` \begin{center} \begin{tabu} to \textwidth { | l | X[c] | l | } \hline item 11 & item 12 & item 13 \\ \hline item 21 & item 22 & item 23 \\ \hline \end{tabu} \end{center} ``` And I want the first and second \hline and vertical line before "item11", all vertical lines between items11, 12 and 13 and vertical line after item 13 wider than the rest of lines in the table.
https://tex.stackexchange.com/users/135531
Changing line width of all lines in first row of table
false
Here is a solution with `{NiceTabular}` of `nicematrix`. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \begin{center} \begin{NiceTabular}{cX[c]c}[hvlines] \RowStyle{\Block[draw,line-width=1pt]{}{}} item 11 & item 12 & item 13 \\ item 21 & item 22 & item 23 \\ \end{NiceTabular} \end{center} \end{document} ```
0
https://tex.stackexchange.com/users/163000
694008
321,967
https://tex.stackexchange.com/questions/456243
6
I can remember that I might get a easy solution, but now I can't find this in this site. ``` $ whereis pdflatex pdflatex: /usr/bin/pdflatex /usr/bin/X11/pdflatex /usr/share/man/man1/pdflatex.1.gz ``` But, updated installation location is ``` /usr/local/texlive/2018/bin/x86_64-linux ``` Some solution [Set PATH to use the current TeX Live bin directory](https://tex.stackexchange.com/questions/379878/set-path-to-use-the-current-tex-live-bin-directory) [TeXlive update - how do I permanently set the path?](https://tex.stackexchange.com/questions/266969/texlive-update-how-do-i-permanently-set-the-path) [How do I configure the paths for TexLive2011 to work on my system with TexWorks 0.5?](https://tex.stackexchange.com/questions/27316/how-do-i-configure-the-paths-for-texlive2011-to-work-on-my-system-with-texworks)
https://tex.stackexchange.com/users/128718
What is the easiest way to set path of updated(new version) texlive installation?
false
I think, ``` tlmgr path add ``` is the command to add the binaries to the `PATH`. It is not quite commended to add `.../texlive/bin/x86_64-linux` to the path directly as `biber` and other tools might be installed in other locations. Source: <http://tug.ctan.org/info/tlmgrbasics/doc/tlmgr.pdf>
0
https://tex.stackexchange.com/users/9075
694010
321,969
https://tex.stackexchange.com/questions/354787
4
I'm trying to add a vertical double line to the horizontal one using \hhline. I want to add this double vertical line after column Year, before (a,b) in my table (the second line from the left). I want this new vertical double line to go from the top, down to the bottom of the table. My code is: ``` \begin{table}[h!] \begin{center} \begin{tabular}{|c|c|c|c|c|c|} \hline Year & a & c &e & g\\ &b & d & f &h \\ \hhline{|=|=|=|=|=|} 1995 & 423 & 1049.5 & 3.4 & 31.1 \\ \hline 1996 & 224 & 1009.9 & 3.2 & 31.0\\ \hline 1997 & 209 & 1069.1* & 3.5 & 30.8\\ \hline 1998 & 298 & 1270.9 & 4.0 & 31.9\\ \hline 1999 & 322 & 1386.1 &4.2 & 32.9\\ \hline 2000 & 507 & 1633.9 & 5.0&32.7 \\ \hline 2001 & 472 & 1515.5 & 4.5&34.0\\ \hline \end{tabular} \end{center} \end{table} ``` What do I do to improve it? I tried searching other threads but I couldn't get the solutions to work for me.
https://tex.stackexchange.com/users/125875
Adding double vertical line in one column
false
If you actually want a double vertical line crossing a double horizontal line (without being broken), you might use `{NiceTabular}` of `nicematrix`. With the package, the vertical lines are drawn with PGF/TikZ and are never broken. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}{|c||c|c|c|c|} \hline Year & a & c &e & g\\ &b & d & f &h \\ \hline\hline 1995 & 423 & 1049.5 & 3.4 & 31.1\\ \hline 1996 & 224 & 1009.9 & 3.2 & 31.0\\ \hline 1997 & 209 & 1069.1\rlap{*} & 3.5 & 30.8\\ \hline 1998 & 298 & 1270.9 & 4.0 & 31.9\\ \hline 1999 & 322 & 1386.1 & 4.2 & 32.9\\ \hline 2000 & 507 & 1633.9 & 5.0 & 32.7\\ \hline 2001 & 472 & 1515.5 & 4.5 & 34.0\\ \hline \end{NiceTabular} \end{document} ``` However, if you want the default behavior of `{tabular}` with `{NiceTabular}` (because you want to use `{NiceTabular}` for other functionnalities), you can define a column `I` with the original definition of `|`. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \newcolumntype{I}{!{\vrule}} \begin{NiceTabular}{|cIIc|c|c|c|} \hline Year & a & c &e & g\\ &b & d & f &h \\ \hline\hline 1995 & 423 & 1049.5 & 3.4 & 31.1\\ \hline 1996 & 224 & 1009.9 & 3.2 & 31.0\\ \hline 1997 & 209 & 1069.1\rlap{*} & 3.5 & 30.8\\ \hline 1998 & 298 & 1270.9 & 4.0 & 31.9\\ \hline 1999 & 322 & 1386.1 & 4.2 & 32.9\\ \hline 2000 & 507 & 1633.9 & 5.0 & 32.7\\ \hline 2001 & 472 & 1515.5 & 4.5 & 34.0\\ \hline \end{NiceTabular} \end{document} ```
0
https://tex.stackexchange.com/users/163000
694014
321,971
https://tex.stackexchange.com/questions/693983
1
I am working on a presentation with beamer. I have the following code to splits the table of contents (several sections) on more slides, and it works very fine. Issue is that a section includes a large number of subsections, and I am not able to split that portion of the table of contents over two or more pages. Instead, the list of titles gets written past below the botton of the slide (see Section C in the code below) EDIT If I use `allowframebreaks` as suggested in a comment, entries for subsections are not rendered, but the extra ones for section C (those which go into the second Index II page) ``` \documentclass{beamer} \mode<presentation> \usepackage[italian]{babel} \setbeamertemplate{navigation symbols}{} \usetheme{Antibes} \usecolortheme{seahorse} \useoutertheme{tree} \setbeamertemplate{footline}[frame number] \usefonttheme{serif} \begin{document} \section{A} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{B} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{C} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \subsection{5} \subsection{6} \subsection{7} \subsection{8} \subsection{9} \subsection{10} \subsection{11} \subsection{12} \subsection{13} \subsection{14} \subsection{15} \subsection{16} \section{D} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{E} \begin{frame}[t,allowframebreaks] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={-1}] \end{frame} \begin{frame}[t,noframenumbering,allowframebreaks] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={2-2}] \end{frame} \begin{frame}[t,noframenumbering,allowframebreaks] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={3-3}] \end{frame} \begin{frame}[t,noframenumbering,allowframebreaks] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={4-}] \end{frame} \end{document} ``` Note, .toc has entries from `\beamer@subsectionintoc {3}{1}` to `\beamer@subsectionintoc {3}{16}`, and I would like somethig like ``` \tableofcontents[pausesections, pausesubsections,sections={3-3}, **subsections={-7}**] ```
https://tex.stackexchange.com/users/14803
beamer. \tableofcontents. How do I split on two pages a very long list of subsections?
true
`pausesection` etc. uses overlays to uncover the items one by one. They don't mix well with `allowframebreaks`. If you want to use `allowframebreaks`, you should remove the `pause(sub-)section`s to get the whole toc. For this specific case, one could fake the split with overlays like this: ``` \documentclass{beamer} \mode<presentation> \usepackage[italian]{babel} \setbeamertemplate{navigation symbols}{} \usetheme{Antibes} \usecolortheme{seahorse} \useoutertheme{tree} \setbeamertemplate{footline}[frame number] \usefonttheme{serif} \makeatletter \setbeamertemplate{subsection in toc}{% \ifnum\inserttocsubsectionnumber<11 \only<1-12>{\leavevmode\leftskip=5ex\llap{% \usebeamercolor[bg]{subsection number projected}% \vrule width1ex height1ex\kern1ex}\inserttocsubsection\par}% \else% \only<12->{\leavevmode\leftskip=5ex\llap{% \usebeamercolor[bg]{subsection number projected}% \vrule width1ex height1ex\kern1ex}\inserttocsubsection\par}% \fi% } \makeatother \begin{document} \section{A} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{B} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{C} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \subsection{5} \subsection{6} \subsection{7} \subsection{8} \subsection{9} \subsection{10} \subsection{11} \subsection{12} \subsection{13} \subsection{14} \subsection{15} \subsection{16} \section{D} \subsection{1} \subsection{2} \subsection{3} \subsection{4} \section{E} \begin{frame}<1-5>[t] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={-1}] \end{frame} \begin{frame}<1-5>[t,noframenumbering] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={2-2}] \end{frame} \begin{frame}<1-17>[t,noframenumbering] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={3-3}] \only<12>{\vspace{-2.9cm}}% \end{frame} \begin{frame}<1-6>[t,noframenumbering] \frametitle{Index} \tableofcontents[pausesections, pausesubsections,sections={4-}] \end{frame} \end{document} ```
1
https://tex.stackexchange.com/users/36296
694017
321,972
https://tex.stackexchange.com/questions/694018
2
I am using the symbol `\sagittarius` from `wasysym` in math mode, and it does not resize appropriately e.g. when it appears in a subscript or superscript. How can I fix this? This question is a special case (not a duplicate) of [this one](https://tex.stackexchange.com/questions/554460/scale-own-math-symbol-image-appropriately).
https://tex.stackexchange.com/users/43137
Wasysym astrological symbol does not resize appropriately in math (e.g. subscript/superscript)
false
The symbol `\sagittarius`, like other astrology symbols in `wasysym`, works both in text and in math mode. While the math mode version does not scale appropriately, the text one does, so you could use: ``` \newcommand{\sagittariusmath}{{\text{\sagittarius}}} ``` Now `$a_\sagittariusmath$` will look better than `$a_\sagittarius$`.
2
https://tex.stackexchange.com/users/43137
694019
321,973
https://tex.stackexchange.com/questions/694020
3
I want to include a large table into my document. I use the landscape environment to make it sideways and managed to make it fill out the entire width of the page by using \linewidth, but my table doesn't fill the entire height of the page, so the fontsize is very small and hardly readable. In order to change it I thought about including automatic linebreaks with tabularx but couldn't figure out how to do so. Any ideas on how I can have my table fill the entire page? This is my minimal working example: ``` \documentclass[11pt]{book} \usepackage{pdfpages} \usepackage{pdflscape} \usepackage{adjustbox} \usepackage{makecell} \begin{document} \begin{landscape} \begin{table} \centering \caption{Übersicht gängiger Bodenerosionsmodelle } \begin{adjustbox}{width=\linewidth} \begin{tabular}{l|c|c|c|c|c} \thead{Modell}&\thead{Modelltyp}&\thead{Anwendungsbereich}&\thead{Zeitliche Auflösung}&\thead{modellierte Erosionsform}&\thead{Anmerkungen}\\ \hline \thead{Allgemeine Bodenabtragsgleichung (ABAG)}&empirisch&Hang/kleine landwirtschaftliche EZG& jährlicher Mittelwert&Anpassung der USLE für den mitteleuropäischen Raum\\ \hline \thead{Agricultural Non-Point \\Source Model\\(AGNPS)}&konzeptionell&landwirtschaftliche EZG bis 20.000ha&ereignisbezogen&Flächen-, Rillen-, Grabenerosion&Fokus auf der Modellierung von Nähr- und Schadstoffen\\ \hline \thead{Areal Non-point Source\\ Watershed Environment \\Response Simulation\\(ANSWERS)}&physikalisch&landwirtschaftliche EZG bis 10000 ha&ursprünglich ereignisbezogen, mittlerweile auch kontinuierliche Simulation&Flächen- Rillen-, später auch Grabenerosion&erstes physikalisches Modell, dass auf einem Raster beruht\\ \hline \thead{Chemicals, Runoff and \\Erosion from Agricultural\\ Management Systems\\(CREAMS)}&physikalisch&feldgroßes EZG, 40-400 ha&täglich oder ereignisbezogen& Grabenerosion und -deposition&verwendet statt eines Rasters ein Diskretisierungsverfahren, mit dem homogene Elemente festgelegt werden\\ \hline \thead{Limburg Soil Erosion Model\\(LISEM)}&physikalisch&Hang/kleines EZG&ereignisbezogen&simuliert keine Erosionstypen sondern den Abtrag durch Wasseransammlungen&räumliche Verteilung des Outputs wird als Karte ausgegeben\\ \hline \thead{Productivity, Erosion and Runoff,\\ Functions to Evaluate Conservation Techniques \\(PERFECT)}&physikalisch&blablabla&blablabla&blablabla&blablabla\\ \hline \thead{Universal Soil Loss Equation\\(USLE)}&empirisch&Hang/kleine landwirtschaftliche EZG&jährlicher Mittelwert&Rillen- und Flächenerosion&beruht auf langährigen Messreihen aus der USA, Basis für viele weitere Modelle\\ \hline \thead{Water Erosion Prediction Project (WEPP)}&physikalisch&Module für Hang/EZG&ereignisbezogen, monatlich&Flächen-, Rillen-,Grabenerosion&verschiedene Version auch für Wald- und Straßenbau\\ \end{tabular} \end{adjustbox} \end{table} \end{landscape} \end{document} ```
https://tex.stackexchange.com/users/302788
Landscape table to fit entire page by automatic line breaks
false
(added `\foreignlanguage{english}{...}` wrappers for material in column 1, added code to suppress an inappropriate f-l ligature in the word "Auflösung", uploaded a better screenshot) I would like to suggest that you employ a `tabularx` environment, with a target width of `\linewidth` and automatic line breaking enabled for five of the six columns of the table. And, do place the `tabularx` environment inside a `sidewaystable` environment to switch to landscape format. And, to give the table a more open "look", I'd get rid of all vertical rules and employ fewer, but well-spaced, horizontal rules. ``` \documentclass[11pt]{book} \usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters suitably \usepackage[T1]{fontenc} \usepackage[english,ngerman]{babel} \usepackage{rotating} % for 'sidewaystable' env. \usepackage{tabularx} % for 'tabularx' env. and 'X' col. type \usepackage{ragged2e} % for '\RaggedRight' macro \usepackage{booktabs} % for well-spaced horiz. rules \newcolumntype{L}{>{\RaggedRight\hspace{0pt}}X} % no full justification \usepackage[skip=0.333\baselineskip]{caption} \hyphenation{graben-ero-sion flächen-ero-sion creams answers ero-sions-typen boden-abtrags-glei-chung ereignis-bezogen} \begin{document} \begin{sidewaystable} \small % 10% linear reduction in font size \setlength\tabcolsep{3.5pt} % default: 6pt \caption{Übersicht gängiger Bodenerosionsmodelle} \begin{tabularx}{\textwidth}{@{} L l LLLL @{}} \toprule % suppress f-l ligature in "Auflösung" ... Modell & Modelltyp & Anwendungsbereich & Zeitliche Auf\kern0.03em lösung & Modellierte Erosionsform & Anmerkungen \\ \midrule Allgemeine Bodenabtragsgleichung (ABAG) & empirisch & Hang\slash kleine landwirtschaftliche EZG & jährlicher Mittelwert & Anpassung der USLE für den mitteleuropäischen Raum \\ \addlinespace \foreignlanguage{english}{Agricultural Non-Point Source Model} (AGNPS) & konzeptionell & landwirtschaftliche EZG bis 20.000~ha & ereignisbezogen & Flächen-, Rillen-, Grabenerosion & Fokus auf der Modellierung von Nähr- und Schadstoffen \\ \addlinespace \foreignlanguage{english}{Areal Non-point Source Watershed Environment Response Simulation} (ANSWERS) & physikalisch & landwirtschaftliche EZG bis 10.000~ha & ursprünglich ereignisbezogen, mittlerweile auch kontinuierliche Simulation & Flächen- Rillen-, später auch Grabenerosion & erstes physikalisches Modell, dass auf einem Raster beruht \\ \addlinespace \foreignlanguage{english}{Chemicals, Runoff and Erosion from Agricultural Management Systems} (CREAMS) & physikalisch & feldgroßes EZG, 40--400 ha & täglich oder ereignisbezogen & Grabenerosion und \mbox{-deposition} & verwendet statt eines Rasters ein Diskretisierungsverfahren, mit dem homogene Elemente festgelegt werden \\ \addlinespace \foreignlanguage{english}{Limburg Soil Erosion Model} (LISEM) & physikalisch & Hang\slash kleines EZG & ereignisbezogen & simuliert keine Erosionstypen sondern den Abtrag durch Wasseransammlungen & räumliche Verteilung des Outputs wird als Karte ausgegeben \\ \addlinespace \foreignlanguage{english}{Productivity, Erosion and Runoff, Functions to Evaluate Conservation Techniques} (PERFECT) & physikalisch & blablabla & blablabla & blablabla & blablabla \\ \addlinespace \foreignlanguage{english}{Universal Soil Loss Equation} (USLE) & empirisch & Hang\slash kleine landwirtschaftliche EZG & jährlicher Mittelwert & Rillen- und Flächenerosion & beruht auf langjährigen Messreihen aus den USA, Basis für viele weitere Modelle \\ \addlinespace \foreignlanguage{english}{Water Erosion Prediction Project} (WEPP) & physikalisch & Module für Hang\slash EZG & ereignisbezogen, monatlich & Flächen-, Rillen-, Grabenerosion & verschiedene Version auch für Wald- und Straßenbau\\ \bottomrule \end{tabularx} \end{sidewaystable} \end{document} ```
5
https://tex.stackexchange.com/users/5001
694025
321,978
https://tex.stackexchange.com/questions/52170
7
I wanted to set the SumatraPDF Inverse-Search option on Inlage, according to [instructions on this page](http://www.inlage.com/wiki/setting_up_sumatra_pdf). For some reason, my "options" menu ends at "Make SumatraPDF my default PDF reader" and doesn't show the "set inverse-search command-line" option. I have the latest 2.0.1 version. Any ideas?
https://tex.stackexchange.com/users/13644
SumatraPDF Inverse Search
false
In SumatraPDF-settings.txt (that can be accessed from the Menu **Settings>Advanced Options**) make: **EnableTeXEnhancements = true**
0
https://tex.stackexchange.com/users/39306
694029
321,981
https://tex.stackexchange.com/questions/694020
3
I want to include a large table into my document. I use the landscape environment to make it sideways and managed to make it fill out the entire width of the page by using \linewidth, but my table doesn't fill the entire height of the page, so the fontsize is very small and hardly readable. In order to change it I thought about including automatic linebreaks with tabularx but couldn't figure out how to do so. Any ideas on how I can have my table fill the entire page? This is my minimal working example: ``` \documentclass[11pt]{book} \usepackage{pdfpages} \usepackage{pdflscape} \usepackage{adjustbox} \usepackage{makecell} \begin{document} \begin{landscape} \begin{table} \centering \caption{Übersicht gängiger Bodenerosionsmodelle } \begin{adjustbox}{width=\linewidth} \begin{tabular}{l|c|c|c|c|c} \thead{Modell}&\thead{Modelltyp}&\thead{Anwendungsbereich}&\thead{Zeitliche Auflösung}&\thead{modellierte Erosionsform}&\thead{Anmerkungen}\\ \hline \thead{Allgemeine Bodenabtragsgleichung (ABAG)}&empirisch&Hang/kleine landwirtschaftliche EZG& jährlicher Mittelwert&Anpassung der USLE für den mitteleuropäischen Raum\\ \hline \thead{Agricultural Non-Point \\Source Model\\(AGNPS)}&konzeptionell&landwirtschaftliche EZG bis 20.000ha&ereignisbezogen&Flächen-, Rillen-, Grabenerosion&Fokus auf der Modellierung von Nähr- und Schadstoffen\\ \hline \thead{Areal Non-point Source\\ Watershed Environment \\Response Simulation\\(ANSWERS)}&physikalisch&landwirtschaftliche EZG bis 10000 ha&ursprünglich ereignisbezogen, mittlerweile auch kontinuierliche Simulation&Flächen- Rillen-, später auch Grabenerosion&erstes physikalisches Modell, dass auf einem Raster beruht\\ \hline \thead{Chemicals, Runoff and \\Erosion from Agricultural\\ Management Systems\\(CREAMS)}&physikalisch&feldgroßes EZG, 40-400 ha&täglich oder ereignisbezogen& Grabenerosion und -deposition&verwendet statt eines Rasters ein Diskretisierungsverfahren, mit dem homogene Elemente festgelegt werden\\ \hline \thead{Limburg Soil Erosion Model\\(LISEM)}&physikalisch&Hang/kleines EZG&ereignisbezogen&simuliert keine Erosionstypen sondern den Abtrag durch Wasseransammlungen&räumliche Verteilung des Outputs wird als Karte ausgegeben\\ \hline \thead{Productivity, Erosion and Runoff,\\ Functions to Evaluate Conservation Techniques \\(PERFECT)}&physikalisch&blablabla&blablabla&blablabla&blablabla\\ \hline \thead{Universal Soil Loss Equation\\(USLE)}&empirisch&Hang/kleine landwirtschaftliche EZG&jährlicher Mittelwert&Rillen- und Flächenerosion&beruht auf langährigen Messreihen aus der USA, Basis für viele weitere Modelle\\ \hline \thead{Water Erosion Prediction Project (WEPP)}&physikalisch&Module für Hang/EZG&ereignisbezogen, monatlich&Flächen-, Rillen-,Grabenerosion&verschiedene Version auch für Wald- und Straßenbau\\ \end{tabular} \end{adjustbox} \end{table} \end{landscape} \end{document} ```
https://tex.stackexchange.com/users/302788
Landscape table to fit entire page by automatic line breaks
false
* It seems, that your table is to big that can be fit on one page, so I suggest to use some kind of long table and `landscape` environment. * For automatic breaking text in cells into several lines you need to prescribe columns widths. This can be simple done with use of `X` column type as defined for example in `tabularx` or in `tabularray` packages. * With `tabularray` package MWE can be as follows: ``` \documentclass[11pt]{book} \usepackage{geometry} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{pdflscape} \usepackage{ragged2e} % for '\RaggedRight' macro \usepackage{tabularray} \UseTblrLibrary{booktabs, siunitx} \hyphenation{graben-ero-sion flächen-ero-sion creams answers ero-sions-typen} \begin{document} \begin{landscape} \begin{longtblr}[ caption = {Übersicht gängiger Bodenerosionsmodelle}, label = {tab:?} ]{colsep=3pt, colspec = {@{} X[cmd=\RaggedRight] l *{4}{X[cmd=\RaggedRight]} @{}}, cells = {font=\small\linespread{0.9}\selectfont}, %rowsep = 3pt, row{1} = {c, m}, rowhead=1 } \toprule Modell & Modelltyp & Anwendungsbereich & Zeitliche Auflösung & Modellierte Erosionsform & Anmerkungen \\ \midrule Allgemeine Bodenabtragsgleichung (ABAG) & empirisch & Hang\slash kleine landwirtschaftliche EZG & jährlicher Mittelwert & Anpassung der USLE für den mitteleuropäischen Raum & & \\ Agricultural Non-Point Source Model (AGNPS) & konzeptionell & landwirtschaftliche EZG bis \qty{20000}{\hectare} & ereignisbezogen & Flächen-, Rillen-, Grabenerosion & Fokus auf der Modellierung von Nähr- und Schadstoffen \\ Areal Non-point Source Watershed Environment Response Simulation (ANSWERS) & physikalisch & landwirtschaftliche EZG bis \qty{1000}{\hectare} ha & ursprünglich ereignisbezogen, mittlerweile auch kontinuierliche Simulation & Flächen- Rillen-, später auch Grabenerosion & erstes physikalisches Modell, dass auf einem Raster beruht \\ Chemicals, Runoff and Erosion from Agricultural Management Systems (CREAMS) & physikalisch & feldgroßes EZG, \qtyrange{40}{400}{\hectare} & täglich oder ereignisbezogen & Grabenerosion und -deposition & verwendet statt eines Rasters ein Diskretisierungsverfahren, mit dem homogene Elemente festgelegt werden \\ Limburg Soil Erosion Model (LISEM) & physikalisch & Hang\slash kleines EZG & ereignisbezogen & simuliert keine Erosionstypen sondern den Abtrag durch Wasseransammlungen & räumliche Verteilung des Outputs wird als Karte ausgegeben \\ Productivity, Erosion and Runoff, Functions to Evaluate Conservation Techniques (PERFECT) & physikalisch & blablabla & blablabla & blablabla & blablabla \\ Universal Soil Loss Equation (USLE) & empirisch & Hang\slash kleine landwirtschaftliche EZG & jährlicher Mittelwert & Rillen- und Flächenerosion & beruht auf langährigen Messreihen aus den USA, Basis für viele weitere Modelle & & \\ Water Erosion Prediction Project (WEPP) & physikalisch & Module für Hang\slash EZG & ereignisbezogen, monatlich & Flächen-, Rillen-, Grabenerosion & verschiedene Version auch für Wald- und Straßenbau & & & \\ \bottomrule \end{longtblr} \end{landscape} \end{document} ```
4
https://tex.stackexchange.com/users/18189
694030
321,982
https://tex.stackexchange.com/questions/694018
2
I am using the symbol `\sagittarius` from `wasysym` in math mode, and it does not resize appropriately e.g. when it appears in a subscript or superscript. How can I fix this? This question is a special case (not a duplicate) of [this one](https://tex.stackexchange.com/questions/554460/scale-own-math-symbol-image-appropriately).
https://tex.stackexchange.com/users/43137
Wasysym astrological symbol does not resize appropriately in math (e.g. subscript/superscript)
true
The `wasysym` package allocates a symbol font, but doesn't declare all symbols as math ones, only those that the author deemed likely to be useful as math symbols. You can supplement the list: ``` \documentclass{article} \usepackage{wasysym} \DeclareMathSymbol\sagitmath {\mathord}{wasy}{99} %or \mathbin or \mathrel ... \begin{document} $\sagitmath a^{\sagitmath^{\sagitmath}} b_{\sagitmath}$ \end{document} ```
7
https://tex.stackexchange.com/users/2388
694032
321,983
https://tex.stackexchange.com/questions/541983
4
I have a tex document which renders glossaries just fine when compiled locally. However, when using overleaf the entries defined as `\newacronym` are linked, but the summary of the glossary entries is not output even though `\printGlossaries` is called. Are there some hidden settings in the overleaf compiler to enable glossaries? edit ---- as requested: 1. The overleaf link <https://www.overleaf.com/3442153234jktjqgtdjkmw> 2. the contents directly below as well The document: ``` \documentclass{article} \usepackage[acronym]{glossaries} \makeglossaries \newacronym{isp}{ISP}{internet service provider} \begin{document} A dummy glossary not showing up \gls{isp}. \printglossary \end{document} ```
https://tex.stackexchange.com/users/77109
overleaf not printing glossaries
false
As the previous poster suggested, this is due to the main file not sitting in the root folder. I added a `.latexmkrc` file in the root folder as a workaround for me. With this file, I can still keep my files organized in subfolders and the glossaries are rendered correctly. Please adapt according to your needs. *Disclaimer: I am not an expert, but this works for me.* ``` # Specify the main files @default_files = ('paper.tex'); $pdflatex = 'pdflatex %O -interaction=nonstopmode -shell-escape %S'; # Specify the bibliography $bibtex = 'bibtex %O %B'; $makeglossaries = 'makeglossaries %O %B'; # Continuous preview mode $continuous_mode = 1; # Output to PDF $pdf_mode = 1; # Keep auxiliary files $clean_ext = ""; add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' ); add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' ); $clean_ext .= " acr acn alg glo gls glg"; sub makeglossaries { my ($base_name, $path) = fileparse( $_[0] ); my @args = ( "-q", "-d", $path, $base_name ); if ($silent) { unshift @args, "-q"; } return system "makeglossaries", "-d", $path, $base_name; } # Silence warnings $silent = 1; ```
1
https://tex.stackexchange.com/users/30103
694033
321,984
https://tex.stackexchange.com/questions/694020
3
I want to include a large table into my document. I use the landscape environment to make it sideways and managed to make it fill out the entire width of the page by using \linewidth, but my table doesn't fill the entire height of the page, so the fontsize is very small and hardly readable. In order to change it I thought about including automatic linebreaks with tabularx but couldn't figure out how to do so. Any ideas on how I can have my table fill the entire page? This is my minimal working example: ``` \documentclass[11pt]{book} \usepackage{pdfpages} \usepackage{pdflscape} \usepackage{adjustbox} \usepackage{makecell} \begin{document} \begin{landscape} \begin{table} \centering \caption{Übersicht gängiger Bodenerosionsmodelle } \begin{adjustbox}{width=\linewidth} \begin{tabular}{l|c|c|c|c|c} \thead{Modell}&\thead{Modelltyp}&\thead{Anwendungsbereich}&\thead{Zeitliche Auflösung}&\thead{modellierte Erosionsform}&\thead{Anmerkungen}\\ \hline \thead{Allgemeine Bodenabtragsgleichung (ABAG)}&empirisch&Hang/kleine landwirtschaftliche EZG& jährlicher Mittelwert&Anpassung der USLE für den mitteleuropäischen Raum\\ \hline \thead{Agricultural Non-Point \\Source Model\\(AGNPS)}&konzeptionell&landwirtschaftliche EZG bis 20.000ha&ereignisbezogen&Flächen-, Rillen-, Grabenerosion&Fokus auf der Modellierung von Nähr- und Schadstoffen\\ \hline \thead{Areal Non-point Source\\ Watershed Environment \\Response Simulation\\(ANSWERS)}&physikalisch&landwirtschaftliche EZG bis 10000 ha&ursprünglich ereignisbezogen, mittlerweile auch kontinuierliche Simulation&Flächen- Rillen-, später auch Grabenerosion&erstes physikalisches Modell, dass auf einem Raster beruht\\ \hline \thead{Chemicals, Runoff and \\Erosion from Agricultural\\ Management Systems\\(CREAMS)}&physikalisch&feldgroßes EZG, 40-400 ha&täglich oder ereignisbezogen& Grabenerosion und -deposition&verwendet statt eines Rasters ein Diskretisierungsverfahren, mit dem homogene Elemente festgelegt werden\\ \hline \thead{Limburg Soil Erosion Model\\(LISEM)}&physikalisch&Hang/kleines EZG&ereignisbezogen&simuliert keine Erosionstypen sondern den Abtrag durch Wasseransammlungen&räumliche Verteilung des Outputs wird als Karte ausgegeben\\ \hline \thead{Productivity, Erosion and Runoff,\\ Functions to Evaluate Conservation Techniques \\(PERFECT)}&physikalisch&blablabla&blablabla&blablabla&blablabla\\ \hline \thead{Universal Soil Loss Equation\\(USLE)}&empirisch&Hang/kleine landwirtschaftliche EZG&jährlicher Mittelwert&Rillen- und Flächenerosion&beruht auf langährigen Messreihen aus der USA, Basis für viele weitere Modelle\\ \hline \thead{Water Erosion Prediction Project (WEPP)}&physikalisch&Module für Hang/EZG&ereignisbezogen, monatlich&Flächen-, Rillen-,Grabenerosion&verschiedene Version auch für Wald- und Straßenbau\\ \end{tabular} \end{adjustbox} \end{table} \end{landscape} \end{document} ```
https://tex.stackexchange.com/users/302788
Landscape table to fit entire page by automatic line breaks
false
This is basically Mico's answer with a few additions. The idea is to use the hook from floatpag to rotate the page/view. ``` \documentclass[11pt]{book} \usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters suitably \usepackage[T1]{fontenc} \usepackage[english,ngerman]{babel} \usepackage{rotating} % for 'sidewaystable' env. \usepackage{tabularx} % for 'tabularx' env. and 'X' col. type \usepackage{ragged2e} % for '\RaggedRight' macro \usepackage{booktabs} % for well-spaced horiz. rules \newcolumntype{L}{>{\RaggedRight\hspace{0pt}}X} % no full justification \usepackage[skip=0.333\baselineskip]{caption} \hyphenation{graben-ero-sion flächen-ero-sion creams answers ero-sions-typen boden-abtrags-glei-chung ereignis-bezogen} \usepackage{floatpag} \usepackage{pdflscape} \makeatletter \newcommand{\rotateview}{\global\@namedef{\number\@currbox @float}{\PLS@AddRotate{-90}% \AddToHookNext{shipout/after}{\PLS@RemoveRotate}}} \makeatother \usepackage{lipsum} \begin{document} \begin{sidewaystable} \rotateview \small % 10% linear reduction in font size \setlength\tabcolsep{3.5pt} % default: 6pt \caption{Übersicht gängiger Bodenerosionsmodelle} \begin{tabularx}{\textwidth}{@{} L l LLLL @{}} \toprule % suppress f-l ligature in "Auflösung" ... Modell & Modelltyp & Anwendungsbereich & Zeitliche Auf\kern0.03em lösung & Modellierte Erosionsform & Anmerkungen \\ \midrule Allgemeine Bodenabtragsgleichung (ABAG) & empirisch & Hang\slash kleine landwirtschaftliche EZG & jährlicher Mittelwert & Anpassung der USLE für den mitteleuropäischen Raum \\ \addlinespace \foreignlanguage{english}{Agricultural Non-Point Source Model} (AGNPS) & konzeptionell & landwirtschaftliche EZG bis 20.000~ha & ereignisbezogen & Flächen-, Rillen-, Grabenerosion & Fokus auf der Modellierung von Nähr- und Schadstoffen \\ \addlinespace \foreignlanguage{english}{Areal Non-point Source Watershed Environment Response Simulation} (ANSWERS) & physikalisch & landwirtschaftliche EZG bis 10.000~ha & ursprünglich ereignisbezogen, mittlerweile auch kontinuierliche Simulation & Flächen- Rillen-, später auch Grabenerosion & erstes physikalisches Modell, dass auf einem Raster beruht \\ \addlinespace \foreignlanguage{english}{Chemicals, Runoff and Erosion from Agricultural Management Systems} (CREAMS) & physikalisch & feldgroßes EZG, 40--400 ha & täglich oder ereignisbezogen & Grabenerosion und \mbox{-deposition} & verwendet statt eines Rasters ein Diskretisierungsverfahren, mit dem homogene Elemente festgelegt werden \\ \addlinespace \foreignlanguage{english}{Limburg Soil Erosion Model} (LISEM) & physikalisch & Hang\slash kleines EZG & ereignisbezogen & simuliert keine Erosionstypen sondern den Abtrag durch Wasseransammlungen & räumliche Verteilung des Outputs wird als Karte ausgegeben \\ \addlinespace \foreignlanguage{english}{Productivity, Erosion and Runoff, Functions to Evaluate Conservation Techniques} (PERFECT) & physikalisch & blablabla & blablabla & blablabla & blablabla \\ \addlinespace \foreignlanguage{english}{Universal Soil Loss Equation} (USLE) & empirisch & Hang\slash kleine landwirtschaftliche EZG & jährlicher Mittelwert & Rillen- und Flächenerosion & beruht auf langjährigen Messreihen aus den USA, Basis für viele weitere Modelle \\ \addlinespace \foreignlanguage{english}{Water Erosion Prediction Project} (WEPP) & physikalisch & Module für Hang\slash EZG & ereignisbezogen, monatlich & Flächen-, Rillen-, Grabenerosion & verschiedene Version auch für Wald- und Straßenbau\\ \bottomrule \end{tabularx} \end{sidewaystable} \lipsum[1-8] \end{document} ```
3
https://tex.stackexchange.com/users/34505
694046
321,987
https://tex.stackexchange.com/questions/694041
1
I am trying to write a command that will do the following, in order: 1. Measure the width of an input word. 2. Compare this value to an existing value. 3. If the input word's width is greater, then take on that measure as value. Otherwise, do nothing. What is going wrong with the following code? ``` \documentclass{article} \usepackage{ifthen} \usepackage{calc} \usepackage{showframe} \newlength\shape \setlength{\shape}{1mm} \newcommand{\shifter}[1]{\ifthenelse {\shape<\widthof{#1}} % If the width of the input word is greater than the length of \shape, {\setlength{\shape}{\widthof{#1}}} % then make the length of \shape equal to the width of the input word. {} % Otherwise, do nothing. }% \setlength{\parindent}{0pt} \begin{document} \hspace{\shape}Hello % Output as expected: `Hello' is indented 1mm from the left margin. \shifter{Tyrannosaurus} \hspace{\shape}Hello % Output not as expected. I wanted `Hello' to be indented the width of the word `Tyrannosaurus' from the left margin. Instead, `Hello' is indented 1mm from the left margin. \end{document} ``` Possibly relevant: I am getting the following error: > > A number should have been here; I inserted `0'. > > > Why?
https://tex.stackexchange.com/users/277990
Error with a command whose purpose is to allow a value to adapt over the course of a document
true
You neither need `ifthen` nor `calc`. Just define a second dimen for comparison, set it to the width with `settowidth` (really descriptive) and use a more robust condition of `etoolbox`: ``` \documentclass{article} \usepackage{etoolbox} \usepackage{showframe} \newdimen\shape \setlength{\shape}{1mm} \newdimen\shapecompare \newcommand{\shifter}[1]{% \settowidth\shapecompare{#1}% \ifdimless{\shape}{\shapecompare}% {\setlength{\shape}{\shapecompare}}% {}% }% \setlength{\parindent}{0pt} \begin{document} \hspace{\shape}Hello \shifter{Tyrannosaurus} Tyrannosaurus \hspace{\shape}Hello \end{document} ```
1
https://tex.stackexchange.com/users/297560
694049
321,990
https://tex.stackexchange.com/questions/654780
1
I was trying to find ways to install MikTex on Linux Mint 21 (which is based on Ubuntu 22.04 LTS) but could not find any solution yet.
https://tex.stackexchange.com/users/278659
How to install MikTex on Linux Mint 21?
false
For a CI/CD pipeline, I think, it might make some sense to use MiKTeX on Linux. I was assuming, it behaves the same as on Windows. However, it does not in all cases. Therefore, I asked the question at <https://github.com/MiKTeX/miktex/discussions/1365>. I came this far (for Ubuntu Jammy - for others, adapt the second line in the following script accordingly) ``` sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/miktex.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D6BC243565B2087BC3F897C9277A7293F59E4889 echo "deb [arch=amd64 signed-by=/usr/share/keyrings/miktex.gpg] https://miktex.org/download/ubuntu jammy universe" | sudo tee /etc/apt/sources.list.d/miktex.list sudo apt-get update -y -q sudo apt-get install -qq -y --no-install-recommends miktex miktexsetup --verbose finish initexmf --verbose --set-config-value=[MPM]AutoInstall=1 miktex --verbose packages update-package-database miktex --verbose packages update miktex --verbose packages update miktex --verbose packages install cm-super miktex --verbose fndb refresh initexmf --verbose --update-fndb initexmf --verbose --mklinks --force updmap ``` Then, following LaTeX document compiles fine: ``` \documentclass{article} \usepackage[T1]{fontenc} \usepackage[expansion=alltext]{microtype} \begin{document} text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text \end{document} ``` Full CI pipeline at <https://github.com/koppor/mwe-miktex/blob/main/.github/workflows/check.yml>
0
https://tex.stackexchange.com/users/9075
694051
321,992
https://tex.stackexchange.com/questions/64
151
A lot of people write makefiles that say something like ``` paper.pdf: paper.tex pdflatex paper bibtex paper pdflatex paper pdflatex paper ``` To handle re-running TeX to get new/changed references and so forth. Is there a better way to do this?
https://tex.stackexchange.com/users/60
Tools for automating document compilation
false
[latexrun](https://github.com/aclements/latexrun) is my preferred way. It is a simple download of a single file and easy to use. Unless there are no warnings or errors, the output is very limited - and in case there are, it presents warnings and errors clearly. It also by default collects intermediate files in a subdirectory, so much cleaner than other methods, and is easy to integrate with for example GNU Make. ``` ./latexrun document.tex ```
0
https://tex.stackexchange.com/users/93517
694054
321,993
https://tex.stackexchange.com/questions/598818
35
I need to enable shell escape for a package that I want to use. What is shell escape exactly, and how do I enable it in my editor or compiling toolchain? Links to answers for different editors/toolchains, in alphabetical order: * [Arara](https://tex.stackexchange.com/a/598824/) * AUCTeX (Emacs) [GUI](https://tex.stackexchange.com/a/598827/), [user function](https://tex.stackexchange.com/a/598863/) * [Kile](https://tex.stackexchange.com/questions/518819/how-to-configure-kile-livepreview-with-shell-escape) (*link to other question*) * [Latexmk](https://tex.stackexchange.com/a/598822/) * [Overleaf](https://tex.stackexchange.com/a/598821/) * [Terminal/Command Prompt](https://tex.stackexchange.com/a/598820/) * [Texmaker](https://tex.stackexchange.com/a/599008/) * [Texpad](https://tex.stackexchange.com/q/296981/250119) (*link to other question*) * [TeXworks](https://tex.stackexchange.com/q/82699/250119) (*link to other question*) * [TeXstudio](https://tex.stackexchange.com/a/598924/) * [VimTeX](https://tex.stackexchange.com/a/598841/) * [Visual Studio Code with LaTeX Workshop](https://tex.stackexchange.com/a/647624/) * [WinEdt](https://tex.stackexchange.com/a/37509/) (*link to other question*) * with texify: [need `--tex-option`](https://tex.stackexchange.com/q/187276/) (*link to other question*) Note: this is a FAQ post. Related Meta question: [Canonical question on enabling shell-escape in different editors](https://tex.meta.stackexchange.com/questions/8772/canonical-question-on-enabling-shell-escape-in-different-editors). Please add an answer for your own editor/toolchain if it is missing. Thank you! When adding an answer, please indicate if the setting is permanent or per-document, and/or describe how you can *add* a button, shortcut, menu item, etc. to make it easy to switch between shell-escape and regular compilation.
https://tex.stackexchange.com/users/89417
How can I enable shell-escape?
false
latexrun ======== [latexrun](https://github.com/aclements/latexrun) defaults to `pdflatex` so we can add `--shell-escape` using the `--latex-args` flag in a similar way to the [Terminal/Command Prompt](https://tex.stackexchange.com/a/598820/93517) answer. ``` ./latexrun --latex-args="--shell-escape" test.tex ```
1
https://tex.stackexchange.com/users/93517
694055
321,994
https://tex.stackexchange.com/questions/98807
7
Bit of a niche question. There is a beautiful set of TrueType fonts called [Chartwell](https://www.fontfont.com/how-to-use-ff-chartwell) designed for producing graphs from text. I am trying to get these to work in Latex. I have switched to Xe(La)tex, and can now get the fonts to appear. However I would like to change text colour without sequence of numbers being split into two. Best explained with some code and a picture. ``` \documentclass[13pt]{article} \usepackage{fontspec} \usepackage{xcolor} % Now define your quick commands for switching fonts \setmainfont{ChartwellRose} \newfontfamily\cwrose[Ligatures=Rare, Color=blue]{ChartwellRose} \begin{document} \raggedright Here is the text without ligatures \fontsize{48}{60} \selectfont 40+20+50 \rmfamily \normalsize Here is the text with ligatures \cwrose \fontsize{48}{60} \selectfont 40+70 \rmfamily \normalsize Here is the text with a colour change inserted \cwrose \fontsize{48}{60} \selectfont 40+\addfontfeature{Color=red}+70 \rmfamily \normalsize And as you can see the colour change has broken the effect of enabling the ligatures and the 'rose' is now presented as two separate objects (rather than a single object with 2 different colours. \end{document} ``` Is it possible therefore to change the colour of a part of the text without the ligature formation being broken? Here is a [screenshot](http://d.pr/i/MbXL) of the compiled example and here is a [screenshot](http://d.pr/i/3Fq4) of unbroken form of the last example
https://tex.stackexchange.com/users/25658
Chartwell fonts and changing colour with ligatures
false
New user here, so I cannot comment under the David Carlisle answer. He had: ``` %CHARTWELL (Be sure to load style set 1, otherwise the ligatures won't be activated.) \newfontface\cwp[StylisticSet={1}]{ChartwellPies} ``` Travis Kochel, the creator of Chartwell, emailed me directly to say that `ss01` and `[StylisticSet={1}]` were for older versions of Chartwell. Instead use discretionary ligatures: ``` \defaultfontfeatures{Ligatures={Discretionary}} \newfontface\cwp{ChartwellPies} ``` This works for me under LuaLaTeX like it does in the David Carlisle MWE.
0
https://tex.stackexchange.com/users/302797
694058
321,995
https://tex.stackexchange.com/questions/693293
0
I'm writing a latex/PDF book with [R/bookdown](https://bookdown.org/). I'm trying to include, in the bibliography, a list of the pages that each article was cited in (i.e., backrefs). However, the `backref` and `pagebackref` options of the `hyperref` latex package are not working for me for the PDF output. Here's the code I include in the preamble to try to include backrefs: ``` \usepackage[pagebackref=true]{hyperref} ``` However, this does not create a list of "pages cited in" next to the articles in my bibliography. I am using the [`apa.csl`](https://www.zotero.org/styles/apa) Citation Style Language and the `krantz2` document class ([`krantz.cls`](https://github.com/yihui/bookdown-crc/blob/master/krantz.cls)). Here are the contents of the `.tex` file that is generated: ``` % Options for packages loaded elsewhere \PassOptionsToPackage{unicode}{hyperref} \PassOptionsToPackage{hyphens}{url} % \documentclass[ krantz2]{krantz} \usepackage{amsmath,amssymb} \usepackage{lmodern} \usepackage{iftex} \ifPDFTeX \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{textcomp} % provide euro and other symbols \else % if luatex or xetex \usepackage{unicode-math} \defaultfontfeatures{Scale=MatchLowercase} \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} \fi % Use upquote if available, for straight quotes in verbatim environments \IfFileExists{upquote.sty}{\usepackage{upquote}}{} \IfFileExists{microtype.sty}{% use microtype if available \usepackage[]{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} \makeatletter \@ifundefined{KOMAClassName}{% if non-KOMA class \IfFileExists{parskip.sty}{% \usepackage{parskip} }{% else \setlength{\parindent}{0pt} \setlength{\parskip}{6pt plus 2pt minus 1pt}} }{% if KOMA class \KOMAoptions{parskip=half}} \makeatother \usepackage{xcolor} \usepackage{longtable,booktabs,array} \usepackage{calc} % for calculating minipage widths % Correct order of tables after \paragraph or \subparagraph \usepackage{etoolbox} \makeatletter \patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} \makeatother % Allow footnotes in longtable head/foot \IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} \makesavenoteenv{longtable} \setlength{\emergencystretch}{3em} % prevent overfull lines \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setcounter{secnumdepth}{5} \newlength{\cslhangindent} \setlength{\cslhangindent}{1.5em} \newlength{\csllabelwidth} \setlength{\csllabelwidth}{3em} \newlength{\cslentryspacingunit} % times entry-spacing \setlength{\cslentryspacingunit}{\parskip} \newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing {% don't indent paragraphs \setlength{\parindent}{0pt} % turn on hanging indent if param 1 is 1 \ifodd #1 \let\oldpar\par \def\par{\hangindent=\cslhangindent\oldpar} \fi % set entry spacing \setlength{\parskip}{#2\cslentryspacingunit} }% {} \usepackage{calc} \newcommand{\CSLBlock}[1]{#1\hfill\break} \newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} \newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} \newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} \usepackage{booktabs} \usepackage{longtable} \usepackage[bf,singlelinecheck=off]{caption} \captionsetup[table]{labelsep=space} \captionsetup[figure]{labelsep=space} \usepackage[scale=.8]{sourcecodepro} \usepackage{framed,color} \definecolor{shadecolor}{RGB}{248,248,248} \renewcommand{\textfraction}{0.05} \renewcommand{\topfraction}{0.8} \renewcommand{\bottomfraction}{0.8} \renewcommand{\floatpagefraction}{0.75} \renewenvironment{quote}{\begin{VF}}{\end{VF}} \usepackage[pagebackref=true]{hyperref} \let\oldhref\href \renewcommand{\href}[2]{#2\footnote{\url{#1}}} \makeatletter \newenvironment{kframe}{% \medskip{} \setlength{\fboxsep}{.8em} \def\at@end@of@kframe{}% \ifinner\ifhmode% \def\at@end@of@kframe{\end{minipage}}% \begin{minipage}{\columnwidth}% \fi\fi% \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep \colorbox{shadecolor}{##1}\hskip-\fboxsep % There is no \\@totalrightmargin, so: \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}% \MakeFramed {\advance\hsize-\width \@totalleftmargin\z@ \linewidth\hsize \@setminipage}}% {\par\unskip\endMakeFramed% \at@end@of@kframe} \makeatother \makeatletter \@ifundefined{Shaded}{ }{\renewenvironment{Shaded}{\begin{kframe}}{\end{kframe}}} \makeatother \usepackage{makeidx} \makeindex % to create a "see also" that appears at the bottom of the % subentries and with no page number, do the following: % \index{Main entry!zzzzz@\igobble|seealso{Other item}} \newcommand{\ii}[1]{{\it #1}} \newcommand{\nn}[1]{#1n} \def\igobble#1{} \urlstyle{tt} \usepackage{amsthm} \makeatletter \def\thm@space@setup{% \thm@preskip=8pt plus 2pt minus 4pt \thm@postskip=\thm@preskip } \makeatother \frontmatter \ifLuaTeX \usepackage{selnolig} % disable illegal ligatures \fi \IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available \urlstyle{same} % disable monospaced font for URLs \hypersetup{ pdftitle={Book Title}, pdfauthor={Author Name}, hidelinks, pdfcreator={LaTeX via pandoc}} \title{Book Title} \author{Author Name} \date{2023-08-16} \begin{document} \maketitle \thispagestyle{empty} \begin{center} INSERT DEDICATION \end{center} \setlength{\abovedisplayskip}{-5pt} \setlength{\abovedisplayshortskip}{-5pt} { \setcounter{tocdepth}{1} \tableofcontents } \hypertarget{preface}{% \chapter*{Preface}\label{preface}} INSERT TEXT HERE (Xie, 2022). \hypertarget{references}{% \chapter*{References}\label{references}} \hypertarget{refs}{} \begin{CSLReferences}{1}{0} \leavevmode\vadjust pre{\hypertarget{ref-R-bookdown}{}}% Xie, Y. (2022). \emph{{bookdown}: Authoring books and technical documents with {R} {Markdown}}. \url{https://CRAN.R-project.org/package=bookdown} \end{CSLReferences} \backmatter \printindex \end{document} ``` Here is the minimal reproducible example (along with [`apa.csl`](https://www.zotero.org/styles/apa) and [`krantz.cls`](https://github.com/yihui/bookdown-crc/blob/master/krantz.cls)—I'm not sure how to make those two files "minimal") that generates the above `.tex` file: `index.rmd`: ``` --- title: "Book Title" author: "Author Name" date: "`r Sys.Date()`" documentclass: krantz classoption: krantz2 bibliography: [book.bib] site: bookdown::bookdown_site --- ``` `01-Preface.rmd`: ``` # Preface {-} INSERT TEXT HERE [@R-bookdown]. ``` `preamble.tex`: ``` \usepackage{booktabs} \usepackage{longtable} \usepackage[bf,singlelinecheck=off]{caption} \captionsetup[table]{labelsep=space} \captionsetup[figure]{labelsep=space} \usepackage[scale=.8]{sourcecodepro} \usepackage{framed,color} \definecolor{shadecolor}{RGB}{248,248,248} \renewcommand{\textfraction}{0.05} \renewcommand{\topfraction}{0.8} \renewcommand{\bottomfraction}{0.8} \renewcommand{\floatpagefraction}{0.75} \renewenvironment{quote}{\begin{VF}}{\end{VF}} \usepackage[pagebackref=true]{hyperref} \let\oldhref\href \renewcommand{\href}[2]{#2\footnote{\url{#1}}} \makeatletter \newenvironment{kframe}{% \medskip{} \setlength{\fboxsep}{.8em} \def\at@end@of@kframe{}% \ifinner\ifhmode% \def\at@end@of@kframe{\end{minipage}}% \begin{minipage}{\columnwidth}% \fi\fi% \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep \colorbox{shadecolor}{##1}\hskip-\fboxsep % There is no \\@totalrightmargin, so: \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}% \MakeFramed {\advance\hsize-\width \@totalleftmargin\z@ \linewidth\hsize \@setminipage}}% {\par\unskip\endMakeFramed% \at@end@of@kframe} \makeatother \makeatletter \@ifundefined{Shaded}{ }{\renewenvironment{Shaded}{\begin{kframe}}{\end{kframe}}} \makeatother \usepackage{makeidx} \makeindex \newcommand{\ii}[1]{{\it #1}} \newcommand{\nn}[1]{#1n} \def\igobble#1{} \urlstyle{tt} \usepackage{amsthm} \makeatletter \def\thm@space@setup{% \thm@preskip=8pt plus 2pt minus 4pt \thm@postskip=\thm@preskip } \makeatother \frontmatter ``` `after_body.tex`: ``` \backmatter \printindex ``` `book.bib`: ``` @Manual{R-bookdown, title = {{bookdown}: Authoring books and technical documents with {R} {Markdown}}, author = {Yihui Xie}, note = {R package version 0.26}, year = {2022}, url = {https://CRAN.R-project.org/package=bookdown}, } ``` `_output.yml`: ``` bookdown::pdf_book: includes: in_header: latex/preamble.tex after_body: latex/after_body.tex keep_tex: true dev: "cairo_pdf" latex_engine: xelatex citation_package: none template: null pandoc_args: [ "--csl", "apa.csl", "--top-level-division=chapter" ] toc_depth: 2 toc_unnumbered: false toc_appendix: true quote_footer: ["\\VA{", "}{}"] highlight_bw: true ``` If you want to see the full, working reproducible example, see here: <https://github.com/isaactpetersen/mre> You can see the output pdf of the minimal reproducible example in the GitHub Actions workflow of the repo (click on the most recent workflow run and click `_book` to download the artifact that includes the PDF): <https://github.com/isaactpetersen/mre/actions>
https://tex.stackexchange.com/users/35243
Backrefs not working when creating a pdf using bookdown/latex
false
According to this [link](https://bookdown.org/yihui/rmarkdown/pdf-document.html#latex-packages-for-citations), it should be possible to configure usage of latex bibliography processing, which I hope in turn could result in hyperref acting on that. This is what they say: ``` By default, citations are processed through pandoc-citeproc, which works for all output formats. For PDF output, sometimes it is better to use LaTeX packages to process citations, such as natbib or biblatex. To use one of these packages, just set the option citation_package to be natbib or biblatex, e.g. --- output: pdf_document: citation_package: natbib --- ``` It seems to me, that of course, you have to use PDF output. I do not expect that `hyperref` would be able to modify HTML output stream for example. Even if I am wrong about that, you should at least initially refrain from `output_format = c("all"))`, switch to PDF output (see [link](https://bookdown.org/yihui/rmarkdown/pdf-document.html)) and use `citation_package` similar way to the above. If this does not lead to the results quickly, I suggest first to start with some new tiny project and exercise in that the suggestions of the manual and only after that to return to your big project. For example [here](https://github.com/rstudio/rmarkdown/issues/2113) I see that your code `bookdown::pdf_book` most probably is already `R` code and not just a markup. Although it seems not to exclude latex biblio processing, it may be too much complex/foreign thing for most of TeX people, certainly for me it is. The same [link](https://github.com/rstudio/rmarkdown/issues/2113) also mentions some more complex examples that do work (or do not because of bugs) which might be useful.
0
https://tex.stackexchange.com/users/302342
694065
321,999
https://tex.stackexchange.com/questions/669141
14
I've been trying to create a command to generalize this but I don't know what I'm doing wrong. Maybe it's more complex than I thought. How should I do it? Please include descriptions to steps because I don't know too much about latex and tikz. Also explain what I'm doing wrong please. ``` \documentclass[parskip]{scrartcl} \usepackage[margin=15mm]{geometry} \usepackage{tikz} \begin{document} \newcommand{\polygram}[4]{%radius, number of total points, connect points skipping this number of points, draw options \draw[#4] ({360/#2}:#1) %draw at starting point \foreach \x in {1, ..., #2} %cycle through other points, drawing to the next, skipping #3 points { -- ({360/(\x+#3)}:#1)} -- cycle; } \tikz \polygram{2}{5}{2}{blue}; \end{document} ``` More info: [Polygram (Wikipedia)](https://en.wikipedia.org/wiki/Polygram_(geometry))
https://tex.stackexchange.com/users/224811
How to draw any polygram using tikz?
false
This creates a polygram with `\nsides` sides. ``` \documentclass[tikz,border=5]{standalone} \def\nsides{5} \begin{document} \begin{tikzpicture}[declare function={r=2;c=360/\nsides;}] \foreach \i in {1,...,\nsides}{ \draw[blue](\i*c:r)--(\i*c+2*c:r); \fill[red](\i*c:r)circle(.03); } \end{tikzpicture} \end{document} ```
2
https://tex.stackexchange.com/users/302822
694066
322,000
https://tex.stackexchange.com/questions/693779
3
I have long lines like this: ``` Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist, \\ Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word, \\ Saint Raphael, who didst lead Tobias safely through his journey to his home again, \\ ``` Which render as: > > Saint Gabriel, who didst foretell to Zachary the birth and ministry of > John the Baptist, > > Saint Gabriel, who didst announce to Blessed Mary the Incarnation > of the Divine Word, > > Saint Raphael, who didst lead Tobias safely through his journey to > his home again, > > > But I want: > > Saint Gabriel, who didst foretell to Zachary the birth and ministry of >      John the Baptist, > > Saint Gabriel, who didst announce to Blessed Mary the Incarnation >      of the Divine Word, > > Saint Raphael, who didst lead Tobias safely through his journey to >      his home again, > > > How do I indent what is wrapped? Is there a way of doing with with a `\renewcommand{\\}{…}`?
https://tex.stackexchange.com/users/36603
Individually indent wrapped lines of lines broken with \\
false
Although note quite its intended use, perhaps the `scripture` package would suit you. There's plenty of options to adjust the indents and spacing. ``` \documentclass{article} \usepackage{lipsum} \usepackage{scripture} \scripturesetup{ poetry/indent=0pt, poetry/bigindent=2em, } \begin{document} \lipsum[1] \begin{quote} \begin{scripture} \begin{poetry} Saint Gabriel, who didst foretell to Zachary the birth and ministry of John the Baptist, Saint Gabriel, who didst announce to Blessed Mary the Incarnation of the Divine Word, Saint Raphael, who didst lead Tobias safely through his journey to his home again, \end{poetry} \end{scripture} \end{quote} \lipsum[2] \end{document} ```
0
https://tex.stackexchange.com/users/87678
694069
322,002
https://tex.stackexchange.com/questions/694041
1
I am trying to write a command that will do the following, in order: 1. Measure the width of an input word. 2. Compare this value to an existing value. 3. If the input word's width is greater, then take on that measure as value. Otherwise, do nothing. What is going wrong with the following code? ``` \documentclass{article} \usepackage{ifthen} \usepackage{calc} \usepackage{showframe} \newlength\shape \setlength{\shape}{1mm} \newcommand{\shifter}[1]{\ifthenelse {\shape<\widthof{#1}} % If the width of the input word is greater than the length of \shape, {\setlength{\shape}{\widthof{#1}}} % then make the length of \shape equal to the width of the input word. {} % Otherwise, do nothing. }% \setlength{\parindent}{0pt} \begin{document} \hspace{\shape}Hello % Output as expected: `Hello' is indented 1mm from the left margin. \shifter{Tyrannosaurus} \hspace{\shape}Hello % Output not as expected. I wanted `Hello' to be indented the width of the word `Tyrannosaurus' from the left margin. Instead, `Hello' is indented 1mm from the left margin. \end{document} ``` Possibly relevant: I am getting the following error: > > A number should have been here; I inserted `0'. > > > Why?
https://tex.stackexchange.com/users/277990
Error with a command whose purpose is to allow a value to adapt over the course of a document
false
There are a few problems with your code. First problem: if you want to compare lengths with `\ifthenelse` you need `\lengthtest` (only comparison between integers needs nothing). Second problem: `\widthof` doesn't work in `\lengthtest`. Fix: use a scratch dimension register. ``` \documentclass{article} \usepackage{ifthen} \usepackage{showframe} \newlength\shape \setlength{\shape}{1mm} \newcommand{\shifter}[1]{% \settowidth{\dimen0}{#1}% \ifthenelse{\lengthtest{\shape<\dimen0}}{\setlength{\shape}{\dimen0}}{}% } \setlength{\parindent}{0pt} \begin{document} \hspace{\shape}Hello \shifter{Tyrannosaurus} \hspace{\shape}Hello Tyrannosaurus % check the space \end{document} ``` You don't need `ifthen`, actually: ``` \newcommand{\shifter}[1]{% \settowidth{\dimen0}{#1}% \ifdim\shape<\dimen0 \setlength{\shape}{\dimen0}% \fi } ```
0
https://tex.stackexchange.com/users/4427
694070
322,003
https://tex.stackexchange.com/questions/694063
5
I am planning to use [changes](https://ctan.math.illinois.edu/macros/latex/contrib/changes/changes.english.withcode.pdf) package for marking up changes in the latex document. I like to denote new additions in green, modifications in blue and deletions in red. However, changes package uses the same color for every change. Is it possible to use different colors for the above three commands? Currently, since I am the only author editing the tex file, I've defined three authors as below ``` \definechangesauthor[name=new additions, color=teal]{new} \definechangesauthor[name=in place modifications, color=blue]{modified \definechangesauthor[name=deletions, color=red]{deleted} ``` and when adding, modifying, or deleting text, I use corresponding `id`. However, this cannot be used when there are multiple authors. Further, there are redundancies here. I have to use the command `\added` and still specify `id=new`. And in the rendered pdf document, along with the green color, there will be a superscipt saying it is `new`. How can I do this more efficiently and cleanly? Edit 1: I have been able to get rid of the superscript by setting `\usepackage[authormarkup=none]{changes}` as suggested in the first comment to [this question](https://tex.stackexchange.com/q/694064/178369). However, it still requires me to use `\added[id=new]{new text}`
https://tex.stackexchange.com/users/178369
Changes package - use different color for added, replaced and deleted text
false
For one author you can do something like this: ``` \documentclass{article} \usepackage{changes} \makeatletter \AddToHook{cmd/added/before}{\def\Changes@AuthorColor{red}} \AddToHook{cmd/deleted/before}{\def\Changes@AuthorColor{green}} \AddToHook{cmd/replaced/before}{\def\Changes@AuthorColor{blue}} \makeatother \begin{document} {\added{added} \deleted{deleted} \replaced{new}{old}} \added{added} \deleted{deleted} \replaced{new}{old} \end{document} ``` For more authors you will have to be more specific about what should happen. And you should also provide an example that can be used for a test.
3
https://tex.stackexchange.com/users/2388
694073
322,005
https://tex.stackexchange.com/questions/694076
0
Is it somehow possible to change only the font size of the main font without changing anything else? (The line height should also remain the same.)
https://tex.stackexchange.com/users/217628
LuaTeX: Change font size of mainfont without changing any other font sizes
true
You really are not clear what you want to change but I suspect this does what you need ``` \documentclass{article} \usepackage{fontspec} \setmainfont[Scale=0.5]{TeX Gyre Termes} \begin{document} Abc \textsf{Abc} \texttt{Abc} \textit{Abc} \end{document} ``` This scales the main font *family* but not other families so monospace and sans serif are not scaled but (for example) the italic version of the main font is scaled. If you don't want to scale italic, you could reset the scale to 1: ``` \documentclass{article} \usepackage{fontspec} \setmainfont[Scale=0.5, ItalicFeatures={ Scale=1 } ]{TeX Gyre Termes} \begin{document} Abc \textsf{Abc} \texttt{Abc} \textit{Abc} \end{document} ```
1
https://tex.stackexchange.com/users/1090
694080
322,008
https://tex.stackexchange.com/questions/472740
1
I have following table in LaTeX: ``` \documentclass[]{article} \begin{document} \begin{center} \begin{tabular}{r *{10}{| c}} \cline{2-9} 1 & & & & & & & & \cellcolor{black} \\ \cline{2-9} 2 & & & & & & & & \cellcolor{black} \\ \cline{2-9} 3 & & & & & & & & \\ \cline{2-9} 4 & & & & & & & & \\ \cline{2-9} 5 & & & & & & & & \\ \cline{2-9} 6 & & & & & & & & \\ \cline{2-9} 7 & & & & & & & & \\ \cline{2-9} 8 & & & & & & & & \\ \cline{2-9} \multicolumn{1}{c}{} & \multicolumn{1}{c}{a} & \multicolumn{1}{c}{b} & \multicolumn{1}{c}{c} & \multicolumn{1}{c}{d} & \multicolumn{1}{c}{e} & \multicolumn{1}{c}{f} & \multicolumn{1}{c}{g} & \multicolumn{1}{c}{h} \end{tabular} \end{center} \end{document} ``` How would I go about getting single borders (not rows or columns, but for example the left side of a specific cell) to have a specific color? Thanks in advance.
https://tex.stackexchange.com/users/180634
Get single cell borders to have their own colors
false
The environment `{NiceTabular}` of `nicematrix` is similar to the classical environment `{tabular}` (as provided by the package `array`) but creates PGF/TikZ nodes under the cells, rows and columns. Then it's possible to use those nodes with TikZ in the co-called `\CodeAfter` to draw whatever rule you want. ``` \documentclass{article} \usepackage{nicematrix,tikz} \begin{document} \begin{center} \begin{NiceTabular}{*{8}{c}}[first-col,last-row,hvlines] 1 \\ 2 \\ 3 \\ 4 \\ 5 \\ 6 \\ 7 \\ 8 \\ & a & b & c & d & e & f & g & h \CodeAfter \tikz \draw [red] (6-|3) -- (7-|3) ; \end{NiceTabular} \end{center} \end{document} ``` It's also possible to use the command `\Block` (provided by `niceamtrix`) and its key `borders` to draw the border of the cell with the command inserted at the right place. ``` \documentclass{article} \usepackage{nicematrix,tikz} \begin{document} \begin{center} \begin{NiceTabular}{*{8}{c}}[first-col,last-row,hvlines] 1 \\ 2 \\ 3 \\ 4 \\ 5 \\ 6 & & \Block[borders={tikz={color=red},right}]{}{}\\ 7 \\ 8 \\ & a & b & c & d & e & f & g & h \end{NiceTabular} \end{center} \end{document} ```
1
https://tex.stackexchange.com/users/163000
694086
322,011
https://tex.stackexchange.com/questions/694063
5
I am planning to use [changes](https://ctan.math.illinois.edu/macros/latex/contrib/changes/changes.english.withcode.pdf) package for marking up changes in the latex document. I like to denote new additions in green, modifications in blue and deletions in red. However, changes package uses the same color for every change. Is it possible to use different colors for the above three commands? Currently, since I am the only author editing the tex file, I've defined three authors as below ``` \definechangesauthor[name=new additions, color=teal]{new} \definechangesauthor[name=in place modifications, color=blue]{modified \definechangesauthor[name=deletions, color=red]{deleted} ``` and when adding, modifying, or deleting text, I use corresponding `id`. However, this cannot be used when there are multiple authors. Further, there are redundancies here. I have to use the command `\added` and still specify `id=new`. And in the rendered pdf document, along with the green color, there will be a superscipt saying it is `new`. How can I do this more efficiently and cleanly? Edit 1: I have been able to get rid of the superscript by setting `\usepackage[authormarkup=none]{changes}` as suggested in the first comment to [this question](https://tex.stackexchange.com/q/694064/178369). However, it still requires me to use `\added[id=new]{new text}`
https://tex.stackexchange.com/users/178369
Changes package - use different color for added, replaced and deleted text
true
Nuisance with writing `\added[id=new]{new text}` can be avoided by defining ``` \newcommand\noidadded{\added[id=new]} ``` and then wring simply `\noidadded{new text}`. --- @Ulrike Fischer's approach is very interesting, but has two drawbacks: First, it requires a recent version of latex kernel. The second is that using his hooked `\added` has effect also for all following commands of the package (unless they are also hooked, to get their own colour). The following reduces the impact (but has some side-effects, too). ``` \makeatletter \AddToHook{cmd/added/before}{\bgroup\def\Changes@AuthorColor{red}} \AddToHook{cmd/added/after}{\egroup} \makeatother ```
1
https://tex.stackexchange.com/users/302342
694095
322,013
https://tex.stackexchange.com/questions/592545
3
Suppose I have a LaTeX repo, which contains main file and lots of image files, also in LaTeX format (with tikz inside). I would like to achieve multiple goals: 1. Separate compilation. All images can be compiled separately to their own pdf, and then included into main document. 2. No meaningless recompilations - if the image source did not change, it is not recompiled. 3. No hacks. (shell escape included) 4. One command. It must compile all images which were changed and then compile the main file. 5. Portability. The solution should work both on Windows and Linux As I see it, I need a build system, some simple version of cmake. The question is, is there any? Update #1: Tried latexmk, as comments suggest. So, there are two possible ways to solve my problem: 1. Use custom dependencies feature. In my case it looks like this: ``` add_cus_dep('tex', 'pdf', 1, 'texinclude2pdf'); sub texinclude2pdf { system("pdflatex -synctex=1 -aux-directory \"$aux_dir\" -output-directory \"$out_dir/images\" \"$_[0].tex\""); } ``` This solution has several problems: * It reacts to all \*.pdf includes in the main document. * It does not allow to specify search directory for tex image files * It is a script inside config file - why even use latexmk then? * This script uses "system" command - it is no better than shell escape. 2. Use @default\_files: ``` @default_files = (); push @default_files, 'images/picture1.tex'; push @default_files, 'main.tex'; ``` That works much better, but it does not allow to specify custom output directory (which is build/images) for image tex inputs.
https://tex.stackexchange.com/users/238470
LaTeX build system similar to CMake
false
I do like do use Docker+Make (or any build automation tool) to achieve this. 1. *Separate compilation*. We compile figures separately in a separate Docker container, and the document itself in another. The document will be compiled with `latexmk` (or however you want really) if needed. 2. *No meaningless recompilations*. We use GNU Make to achieve this. Figures will be rebuilt if their code changed. 3. *No hacks*. OK, you got me here. 4. *One command*. `make figures render`. 5. *Portability*. Docker is of course portable, and [GNU Make should be](https://gnuwin32.sourceforge.net/packages/make.htm) but ymmv. See [How to annoy your co-authors: a Gitlab CI pipeline for LaTeX](https://blog.martisak.se/2020/05/11/gitlab-ci-latex-pipeline/) for how to achieve this - including building using [Gitlab CI](https://docs.gitlab.com/ee/ci/). Using Gitlab CI here has the advantage of increasing portability. A minimal example ----------------- The directory structure is ``` . ├── Makefile ├── images │   ├── Makefile │   └── image1.tex └── main.tex ``` where the first `Makefile` contains ``` all: main.pdf .PHONY: images main.pdf: images images: docker run -it --rm -w /data/ -v`pwd`:/data martisak/texlive:2022 -- sh -c "make -C images" %.pdf: %.tex docker run --rm -w /data/ -v`pwd`:/data martisak/texlive:2022 -- sh -c "latexmk -pdf $<" clean: -make -C images clean latexmk -CA -rm -rf build ``` and `images/Makefile` contains ``` IMAGES_DIR = ../images BUILD_DIR = ../build/images IMAGES_TEX_FILES = $(wildcard $(IMAGES_DIR)/*.tex) IMAGES_PDF_FILES = $(patsubst $(IMAGES_DIR)/%.tex, $(BUILD_DIR)/%.pdf, $(IMAGES_TEX_FILES)) .PHONY: all clean all: $(IMAGES_PDF_FILES) $(BUILD_DIR)/%.pdf: $(IMAGES_DIR)/%.tex @mkdir -p $(BUILD_DIR) latexmk -pdf -output-directory=$(BUILD_DIR) $< clean: latexmk -CA ``` For completeness, `images/image1.tex` is ``` \documentclass[tikz, border=2pt]{standalone} \begin{document} \begin{tikzpicture} \draw (0,0) circle (1); \fill (0,0) circle (2pt); \end{tikzpicture} \end{document} ``` and `main.tex`: ``` \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{graphicx} \title{An example} \begin{document} \begin{figure}[htbp] \centering \includegraphics[width=0.5\textwidth]{build/images/image1.pdf} \caption{caption} \label{fig:label} \end{figure} \end{document} ``` You can omit the Docker-container if you wish, and run `latexmk` directly. Start compilation with `make`.
1
https://tex.stackexchange.com/users/93517
694099
322,015
https://tex.stackexchange.com/questions/683257
0
I was given a project to build a thesis document which has a `cover.tex` and a `main.tex`. The `cover.tex` generates the necessary covers to comply with the institution's style. The `main.tex` file imports the pages from `cover.tex` with `\includepdf[pages=-]{cover.pdf}`. Is there a way, using `latexmk` (which I'm already using for `makeglossaries`), to generate the cover PDF automatically when building the main document?
https://tex.stackexchange.com/users/295290
Depend on the "compilation" of another file with latexmk
false
Look into using a build automation tool such as GNU Make. A simple `Makefile` can look like ``` all: main.pdf main.pdf: cover.pdf %.pdf: %.tex latexmk -pdf $< clean: latexmk -CA ``` Using the command `make` we build `cover.pdf` if needed and then `main.pdf`, each using the [pattern rule](https://www.gnu.org/software/make/manual/html_node/Pattern-Rules.html) `%.pdf: %.tex` to build the file using `latexmk`.
0
https://tex.stackexchange.com/users/93517
694102
322,018
https://tex.stackexchange.com/questions/694093
0
I'm trying to get LaTeX to print several non-Latin scripts, e.g. Arabic, Farsi, and possibly some others. I'm using PDFLaTeX in TeXstudio. I've tried using this solution: <https://tex.stackexchange.com/a/368201/289942> but nothing happens or rather, it just doesn't work as it's described there. My main language is English. MWE: ``` \documentclass[a4paper, 12pt, oneside]{article} \usepackage[a4paper, portrait, margin=0.9in,headheight=14.5pt]{geometry} \usepackage[utf8]{inputenc} \usepackage[arabic,farsi,english]{babel} \begin{document} Giaurs - From Persian \FR{فروشگاه‎}(gâvor) \end{document} ``` The error tells me: `Unicode character ‎ (U+200E) not set up for use with LaTeX. Giaurs - From Persian \FR{فروشگاه‎}` that `U+200E` is the R to L invisible character, but when I try defining it there's no change. Is there an option to just pass through non-Latin characters as is? Any solution as to why this isn't working are appreciated.
https://tex.stackexchange.com/users/289942
PDFLaTeX and Arabic, Farsi and other scripts
true
I can't read the script so apologies if this is completely messed up, but with lualatex, something like ``` \documentclass[a4paper, 12pt, oneside]{article} \usepackage[bidi=basic]{babel} \babelprovide[main, import]{english} \babelprovide[onchar = ids fonts]{arabic} \babelfont[arabic]{rm}[Renderer = HarfBuzz, Scale = MatchLowercase]{Amiri} \begin{document} Giaurs - From Persian فروشگاه‎ (gâvor) \end{document} ```
1
https://tex.stackexchange.com/users/1090
694103
322,019
https://tex.stackexchange.com/questions/694107
0
Seeking pointers to additional hyphenation controls under LuaLaTeX with `microtype`. Typography books (e.g., Bringhurst’s *The Elements of Typographic Style* and Argentsinger’s *A Grammar of Typography*) recommend a number of hyphenation rules: * Minimum word length for hyphenation (6 per Argentsinger) * Not hyphenating the last word in a paragraph (both) * Maximum consecutive hyphenation (both recommend 3) * Not hyphenating acronyms * Adjusting the width of the “hyphenation zone” * Adjusting the tradeoff between better spacing and fewer hyphens (an InDesign setting, apparently) Both authors would, for example, have us set `\lefthyphenmin2` and `\righthyphenmin3` (in English). I understand `\hyphenpenalty=####`, `\emergencystretch`, and `\tolerance` can dial hyphenation up and down. Overall, I am seeking guidance to better hyphenation, but specifically: **Are there LaTeX settings to control the bulleted factors directly?** Or, should I just delegate to the hyphenation engine?
https://tex.stackexchange.com/users/302797
Hyphenation controls beyond \lefthyphenmin \righthyphenmin
false
* Minimum word length for hyphenation (6 per Argentsinger) `\hyphenationmin=6` * Not hyphenating the last word in a paragraph (both) You could use a lua callback to box the last word before hyphenation * Maximum consecutive hyphenation (both recommend 3) Not directly but you can set `\doublehyphendemerits` to discourage (or ban) adjacent pairs of hyphenated lines. * Not hyphenating acronyms make your acronym macro box the acronym * Adjusting the width of the “hyphenation zone” Not sure what you mean, but perhaps configure protrusion for `-` character using microtype * Adjusting the tradeoff between better spacing and fewer hyphens (an InDesign setting, apparently) That is the basic mechanism of TeX's line breaker doing a least cost optimisation for linebreaking a paragraph so balancing the penalties (and demerits which are penalties squared) from stretching white space and adding hyphens.
2
https://tex.stackexchange.com/users/1090
694109
322,020
https://tex.stackexchange.com/questions/694110
0
Before when I was using acronyms, I was handling the long and short acronym by using \acrlong{} and \acrshort{}. I'd like to know if there's a way that when you call up an acronym, it displays the whole acronym the first time and then just the acronym the other times. Thanks in advance
https://tex.stackexchange.com/users/272111
Automatic display of long and short acronyms
true
Check out [glossaries-extra](https://ctan.org/pkg/glossaries-extra?lang=en). ``` \usepackage[acronym,nomain]{glossaries-extra} \newacronym{CNN}{CNN}{Convolutional Neural Network} \makeglossaries ``` Then you use `\gls{CNN}` in the text! You can use `\glsxtrshort{CNN}` and `\glsxtrlong{CNN}` to manually use short and long versions. Print out your acronyms with `\printglossary[type=acronym]`. Remember to run `makeglossaries main` (you will be reminded). [Overleaf has a nice guide](https://www.overleaf.com/learn/latex/Glossaries) on how to use this.
1
https://tex.stackexchange.com/users/93517
694116
322,025
https://tex.stackexchange.com/questions/694089
0
I have this code: > > `\subsubsection{subsubsection}` > > > in this subsubsection I have one text > > > `\subsubsection{subsubsection||}` > > > Plus text in this subsubsection > > > But when i pu the `||` (2 in roman numbers) my compiler (overleaf - XeLaTex) does not do that I want. Can anyone help me?
https://tex.stackexchange.com/users/302183
How I can put roman numbers in a subsubsection title?
false
Perhaps you want something like this? ``` \setcounter{secnumdepth}{5} \renewcommand{\thesubsubsection}{Subsubsection \Roman{subsubsection}} \subsubsection{Title of the subsubsection} Text of the subsubsection \subsubsection{Title of the second subsubsection} Text of the subsubsection ``` Output:
1
https://tex.stackexchange.com/users/233251
694121
322,028
https://tex.stackexchange.com/questions/694089
0
I have this code: > > `\subsubsection{subsubsection}` > > > in this subsubsection I have one text > > > `\subsubsection{subsubsection||}` > > > Plus text in this subsubsection > > > But when i pu the `||` (2 in roman numbers) my compiler (overleaf - XeLaTex) does not do that I want. Can anyone help me?
https://tex.stackexchange.com/users/302183
How I can put roman numbers in a subsubsection title?
true
using the comment of @David Carlisle ``` \documentclass{article} \usepackage{fontspec} \begin{document} \section{Section} Some text in the section. \subsection{Subsection} Some text in the subsection. \subsubsection{Subsubsection} In this subsubsection, I have some text. \subsubsection{Subsubsection\ \UseName{@Roman}{2}} Additional text in this subsubsection. \end{document} ``` output
0
https://tex.stackexchange.com/users/197451
694122
322,029
https://tex.stackexchange.com/questions/694090
0
I made matlab2tikz convert two matlab graps into .tex files, the first image generated the following code: ``` \definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}% \definecolor{mycolor2}{rgb}{0.85000,0.32500,0.09800}% \definecolor{mycolor3}{rgb}{0.92900,0.69400,0.12500}% % \begin{tikzpicture} \begin{axis}[% width=4.521in, height=3.566in, at={(0.758in,0.481in)}, scale only axis, xmode=log, xmin=1, xmax=1023, xminorticks=true, ymode=log, ymin=0.000605918006841938, ymax=1, yminorticks=true, axis background/.style={fill=white}, title style={font=\bfseries}, title={$\text{Mesh uniforme, }\alpha\text{ = 5/3}$}, legend style={legend cell align=left, align=left, draw=white!15!black} ] \addplot [color=mycolor1, mark=asterisk, mark options={solid, mycolor1}] table[row sep=crcr]{% 3 0.139792014524203\\ 7 0.072479842055017\\ 15 0.0370157945331386\\ 31 0.0187746232975879\\ 63 0.00948601785348729\\ 127 0.00478085586105112\\ 255 0.00240517988982091\\ 511 0.00120838462520132\\ 1023 0.000606477293609539\\ }; \addlegendentry{Quadratura} \addplot [color=mycolor2, mark=asterisk, mark options={solid, mycolor2}] table[row sep=crcr]{% 3 0.138651919621344\\ 7 0.0720316322486566\\ 15 0.036847197754512\\ 31 0.0187112162712767\\ 63 0.00946188033580206\\ 127 0.00477154931108847\\ 255 0.00240155605217295\\ 511 0.00120696404181309\\ 1023 0.000605918006841938\\ }; \addlegendentry{Calcolo esatto} \addplot [color=mycolor3, dashed] table[row sep=crcr]{% 3 0.25\\ 7 0.125\\ 15 0.0625\\ 31 0.03125\\ 63 0.015625\\ 127 0.0078125\\ 255 0.00390625\\ 511 0.001953125\\ 1023 0.0009765625\\ }; \addlegendentry{h} \end{axis} \begin{axis}[% width=5.833in, height=4.375in, at={(0in,0in)}, scale only axis, xmin=0, xmax=1, ymin=0, ymax=1, axis line style={draw=none}, ticks=none, axis x line*=bottom, axis y line*=left ] \end{axis} \end{tikzpicture}% ``` and here's what the second image gave as result ``` \definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}% \definecolor{mycolor2}{rgb}{0.85000,0.32500,0.09800}% \definecolor{mycolor3}{rgb}{0.92900,0.69400,0.12500}% % \begin{tikzpicture} \begin{axis}[% width=4.521in, height=3.566in, at={(0.758in,0.481in)}, scale only axis, xmode=log, xmin=1, xmax=1023, xminorticks=true, ymode=log, ymin=0.0009765625, ymax=1, yminorticks=true, axis background/.style={fill=white}, title style={font=\bfseries}, title={$\text{Mesh uniforme, }\alpha\text{ = 10}$}, legend style={legend cell align=left, align=left, draw=white!15!black} ] \addplot [color=mycolor1, mark=asterisk, mark options={solid, mycolor1}] table[row sep=crcr]{% 3 0.197209957231232\\ 7 0.125510101886693\\ 15 0.0652111253628991\\ 31 0.0328432469804731\\ 63 0.0164486751222861\\ 127 0.00822763156405254\\ 255 0.00411422476433522\\ 511 0.00205716341817707\\ 1023 0.00102858808587584\\ }; \addlegendentry{Quadratura} \addplot [color=mycolor2, mark=asterisk, mark options={solid, mycolor2}] table[row sep=crcr]{% 3 0.153395370790933\\ 7 0.112257863184386\\ 15 0.0631720206082784\\ 31 0.0325749327203\\ 63 0.0164147037161947\\ 127 0.00822337153398153\\ 255 0.00411369183465216\\ 511 0.00205709678865042\\ 1023 0.00102857975676872\\ }; \addlegendentry{Calcolo esatto} \addplot [color=mycolor3, dashed] table[row sep=crcr]{% 3 0.25\\ 7 0.125\\ 15 0.0625\\ 31 0.03125\\ 63 0.015625\\ 127 0.0078125\\ 255 0.00390625\\ 511 0.001953125\\ 1023 0.0009765625\\ }; \addlegendentry{h} \end{axis} \begin{axis}[% width=5.833in, height=4.375in, at={(0in,0in)}, scale only axis, xmin=0, xmax=1, ymin=0, ymax=1, axis line style={draw=none}, ticks=none, axis x line*=bottom, axis y line*=left ] \end{axis} \end{tikzpicture}% ``` Now, i succeded in showing this two graph in my latex main thanks to the following instructions: ``` \begin{figure}[h] \centering \input{Error_uniform_53} \caption{Caption 1} \label{fig:1} \end{figure} \begin{figure}[h] \centering \input{Error_uniform_10} \caption{Caption 2} \label{fig:2} \end{figure} ``` Where `Error_uniform_53` is the name of the first .tex file and `Error_uniform_10` is the name i gave to the second .tex file. I would like to have these two graphs placed side by side, i've already tried using subfigure but it seems not to work, probably because of the tikzpiucture. Can someone help me? I leave here a MWE (keep in mind the name i gave to the .tex files containing the pictures): ``` \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage{graphicx, subfigure} \usepackage{amsmath, amsfonts, amssymb, amsthm} \usepackage{caption} \usepackage{float} \usepackage{tikz} \usetikzlibrary{plotmarks} \usepackage{tikz-cd} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{figure}[h] \centering \input{Error_uniform_53} \caption{Caption 1} \label{fig:1} \end{figure} \begin{figure}[h] \centering \input{Error_uniform_10} \caption{Caption 2} \label{fig:2} \end{figure} \end{document} ```
https://tex.stackexchange.com/users/302841
Matlab2tikz and alignment: i need help
true
Ok, here's a way to do it. I'm afraid, you need to rework the generated `tikz`-pictures, as you can't `\input` them directly without creating layout problems. I.e. comment out the parts mentioned below, first. Let's have a look. ### Preamble Working with yours was ... nasty. So this one works in the context given below, where the ams-packages are ONLY needed for the title created inside `pgfplots`: ``` \documentclass[10pt,a4paper]{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{amsmath, amsfonts, amssymb, amsthm} \usepackage{caption} ``` Package `caption` is needed, as minipage doesn't use a float environment. Use like: ``` \captionof{figure}{Cap 2}\label{fig:2} ``` ### Using minipages Similar to what @Zarko proposed, the structure is: ``` \begin{minipage}{7cm}% ~~~ minipage 1 ~~~~~~~~~~ ... // first drawing \end{minipage} \hfill \begin{minipage}{7cm}% ~~~ minipage 2 ~~~~~~~~~~ ... // second drawing \end{minipage} ``` Now, my use of the `minipage` environment can certainly be improved, while this one works. ### Let's turn to the drama, the 2 generated files In brief, that code provides some unpleasant surprises in your intended context, though they work fine individually. So in order to just `\input` them, you need to comment them out a little. My code below just copies both parts, to better show, what's obsolete, even causing trouble. Meaningless and controproductive changes to layout, scale, psoitioning; just get rid of it: ``` %width=4.521in,% <<< all these give unwanted shifts and scalings %height=3.566in, %at={(0.758in,0.481in)}, %scale only axis, ``` This part at the end is crazy, causing even more hard to localize problems; so, get rid of it: ``` %\begin{axis}[% <<< these are simply not good %width=5.833in, %height=4.375in, %at={(0in,0in)}, %scale only axis, %xmin=0, %xmax=1, %ymin=0, %ymax=1, %axis line style={draw=none}, %ticks=none, %axis x line*=bottom, %axis y line*=left %] %\end{axis} ``` Kindly also check this innocent line at the beginning of each generated plot, which you have to add or modify for the scaling: ``` \begin{tikzpicture}[scale=.8,transform shape] ``` Balance this scaling-factor with the widths you use for the minipages. ### Result + code ``` \documentclass[10pt,a4paper]{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{amsmath, amsfonts, amssymb, amsthm} \usepackage{caption} \begin{document} % ~~~ using 2 minipage-environments, with a \hfill inbetween ~~~~~ \begin{minipage}{7cm}% ~~~ minipage 1 ~~~~~~~~~~ \definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}% \definecolor{mycolor2}{rgb}{0.85000,0.32500,0.09800}% \definecolor{mycolor3}{rgb}{0.92900,0.69400,0.12500}% % \begin{tikzpicture}[scale=.8,transform shape] \begin{axis}[% %width=4.521in,% <<< all these give unwanted shifts and scalings %height=3.566in, %at={(0.758in,0.481in)}, %scale only axis, xmode=log, xmin=1, xmax=1023, xminorticks=true, ymode=log, ymin=0.000605918006841938, ymax=1, yminorticks=true, axis background/.style={fill=white}, title style={font=\bfseries}, title={$\text{Mesh uniforme, }\alpha\text{ = 5/3}$}, legend style={legend cell align=left, align=left, draw=white!15!black} ] \addplot [color=mycolor1, mark=asterisk, mark options={solid, mycolor1}] table[row sep=crcr]{% 3 0.139792014524203\\ 7 0.072479842055017\\ 15 0.0370157945331386\\ 31 0.0187746232975879\\ 63 0.00948601785348729\\ 127 0.00478085586105112\\ 255 0.00240517988982091\\ 511 0.00120838462520132\\ 1023 0.000606477293609539\\ }; \addlegendentry{Quadratura} \addplot [color=mycolor2, mark=asterisk, mark options={solid, mycolor2}] table[row sep=crcr]{% 3 0.138651919621344\\ 7 0.0720316322486566\\ 15 0.036847197754512\\ 31 0.0187112162712767\\ 63 0.00946188033580206\\ 127 0.00477154931108847\\ 255 0.00240155605217295\\ 511 0.00120696404181309\\ 1023 0.000605918006841938\\ }; \addlegendentry{Calcolo esatto} \addplot [color=mycolor3, dashed] table[row sep=crcr]{% 3 0.25\\ 7 0.125\\ 15 0.0625\\ 31 0.03125\\ 63 0.015625\\ 127 0.0078125\\ 255 0.00390625\\ 511 0.001953125\\ 1023 0.0009765625\\ }; \addlegendentry{h} \end{axis} %\begin{axis}[% <<< these are simply not good %width=5.833in, %height=4.375in, %at={(0in,0in)}, %scale only axis, %xmin=0, %xmax=1, %ymin=0, %ymax=1, %axis line style={draw=none}, %ticks=none, %axis x line*=bottom, %axis y line*=left %] %\end{axis} \end{tikzpicture}% \captionof{figure}{Cap 1}\label{fig:2} \end{minipage} \hfill \begin{minipage}{7cm}% ~~~ minipage 2 ~~~~~~~~~~ \definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}% \definecolor{mycolor2}{rgb}{0.85000,0.32500,0.09800}% \definecolor{mycolor3}{rgb}{0.92900,0.69400,0.12500}% % \begin{tikzpicture}[scale=.8,transform shape] \begin{axis}[% %width=4.521in, %height=3.566in, %at={(0.758in,0.481in)}, %scale only axis, xmode=log, xmin=1, xmax=1023, xminorticks=true, ymode=log, ymin=0.0009765625, ymax=1, yminorticks=true, axis background/.style={fill=white}, title style={font=\bfseries}, title={$\text{Mesh uniforme, }\alpha\text{ = 10}$}, legend style={legend cell align=left, align=left, draw=white!15!black} ] \addplot [color=mycolor1, mark=asterisk, mark options={solid, mycolor1}] table[row sep=crcr]{% 3 0.197209957231232\\ 7 0.125510101886693\\ 15 0.0652111253628991\\ 31 0.0328432469804731\\ 63 0.0164486751222861\\ 127 0.00822763156405254\\ 255 0.00411422476433522\\ 511 0.00205716341817707\\ 1023 0.00102858808587584\\ }; \addlegendentry{Quadratura} \addplot [color=mycolor2, mark=asterisk, mark options={solid, mycolor2}] table[row sep=crcr]{% 3 0.153395370790933\\ 7 0.112257863184386\\ 15 0.0631720206082784\\ 31 0.0325749327203\\ 63 0.0164147037161947\\ 127 0.00822337153398153\\ 255 0.00411369183465216\\ 511 0.00205709678865042\\ 1023 0.00102857975676872\\ }; \addlegendentry{Calcolo esatto} \addplot [color=mycolor3, dashed] table[row sep=crcr]{% 3 0.25\\ 7 0.125\\ 15 0.0625\\ 31 0.03125\\ 63 0.015625\\ 127 0.0078125\\ 255 0.00390625\\ 511 0.001953125\\ 1023 0.0009765625\\ }; \addlegendentry{h} \end{axis} %\begin{axis}[% %width=5.833in, %height=4.375in, %at={(0in,0in)}, %scale only axis, %xmin=0, %xmax=1, %ymin=0, %ymax=1, %axis line style={draw=none}, %ticks=none, %axis x line*=bottom, %axis y line*=left %] %\end{axis} \end{tikzpicture}% \captionof{figure}{Cap 2}\label{fig:2} \end{minipage} \end{document} ```
1
https://tex.stackexchange.com/users/245790
694123
322,030
https://tex.stackexchange.com/questions/650896
0
I am trying to compile a latex document in Linux; however, the images are not being found from the command line, despite them being found in Gummi. I am running `latex [document_name]` from the Linux command line and I am using the following tex code for the figures: ``` \begin{figure}[tb] \centering \includegraphics[width=0.47\textwidth]{waveplot_norm_ann} \end{figure} ``` The image is a png file in the same directory as the latex source file. The error I get when trying to compile is as follows: ``` ! LaTeX Error: File `waveplot_norm_ann' not found. ``` Does anyone know why Gummi can find it, but the command line compiler can't?
https://tex.stackexchange.com/users/263692
Latex command line compiler can't find image files, but Gummi can
false
Open a command prompt console and go to the directory that your .tex file resides. Issue the following command: ``` $ pdflatex -synctex=1 -interaction=nonstopmode your_latex_file.tex ``` If you can see the auxiliary files and your\_latex\_file.pdf then it means the Texmaker setting is wrong. Probably it executes `latex` instead of `pdflatex` command. Right side of "Run" button on toolbar you can set the compiler to PDFLaTeX and it should work.
0
https://tex.stackexchange.com/users/106360
694125
322,031
https://tex.stackexchange.com/questions/513063
4
I am submitting an article to "Advanced Quantum Technologies", a Wiley journal (<https://onlinelibrary.wiley.com/journal/25119044>). I am using LaTeX, with BibTeX to prepare the references. Unfortunately the journal seems much more geared towards submissions made in Word, and so it does not provide any useful style files. I can satisfy most of their requirements, but the references must be formatted in a rather specific way: > > [1] A. B. Firstauthor, C. D. Secondauthor, E. F. Lastauthor, *Journal Title* **YEAR**, *Volume*, Page. > > > Journal Title and Volume should be italic; YEAR should be bold. Does anyone have an idea how I can manage this, without having to write my own `.bst` file?
https://tex.stackexchange.com/users/199829
Reference formatting for Advances in Quantum Technologies
false
As of 2023, the journal's [Author Guidelines](https://onlinelibrary.wiley.com/page/journal/25119044/homepage/author-guidelines#Documents) links to a .zip archive containing a [LaTeX template](https://onlinelibrary.wiley.com/pb-assets/assets/vch/msp/LaTeX-template-1593698612150.zip). This archive contains a BibTeX style file named `MSP.bst` that produces citations in their desired format. Example results:
0
https://tex.stackexchange.com/users/128923
694132
322,032
https://tex.stackexchange.com/questions/694131
1
I just put my latex build on a new machine, and all the sudden I'm getting a problem with in-text citations: two-author citations don't have a space after the "&" in the in-text citation, even though the reference looks fine. It seems to be limited to files where I have Greek text, for which I'm using babel. An MWE is below. Any suggestions, including easy work-arounds, would be much appreciated. ``` \documentclass{article} \usepackage[polutonikogreek,english]{babel} \usepackage{natbib} \begin{document} {\greektext >'estalka }\\ \cite{princesmolensky}, \cite{mp1995} \begin{thebibliography}{2} \bibitem[{McCarthy \& Prince(1995)}]{mp1995} McCarthy, John~J. \& Alan Prince. 1995. \newblock Faithfulness and {{Reduplicative Identity}}. \newblock In Jill Beckman, Suzanne Urbanczyk \& Laura~Walsh Dickey (eds.), \emph{Papers in {{Optimality Theory}}} (University of {{Massachusetts Occasional Papers}} in {{Linguistics}}~18), 249--384. {Amherst, MA}: {Graduate Linguistics Student Association}. \bibitem[{Prince \& Smolensky([1993] 2004)}]{princesmolensky} Prince, Alan \& Paul Smolensky. [1993] 2004. \newblock \emph{Optimality {{Theory}}: {{Constraint Interaction}} in {{Generative Grammar}}}. \newblock {Malden, MA}: {Blackwell Publishing}. \end{thebibliography} \end{document} ```
https://tex.stackexchange.com/users/123042
Spacing problem with in-text citations - interaction between natbib and babel
true
> > Any suggestions, including easy work-arounds, would be much appreciated. > > > I have two suggestions: * Just change the `\bibitem` directives from ``` \bibitem[{McCarthy \& Prince(1995)}]{mp1995} \bibitem[{Prince \& Smolensky([1993] 2004)}]{princesmolensky} ``` to ``` \bibitem[{McCarthy \&\ Prince(1995)}]{mp1995} \bibitem[{Prince \&\ Smolensky([1993] 2004)}]{princesmolensky} ``` * Alternatively, insert the following instructions toward the end of the preamble: ``` \usepackage{etoolbox} \makeatletter \apptocmd{\bbl@greek@ampersand}{\space}{}{} \makeatother ``` --- Now for a longer examination of what's going. If neither of the suggested fixes is applied, the aux file contains the following two lines of code if -- and, AFAICT, only if -- one of the `babel` language options is `polutonikogreek`: ``` \bibcite{mp1995}{{1}{1995}{{McCarthy \bbl@greek@ampersand Prince}}{{}}} \bibcite{princesmolensky}{{2}{[1993] 2004}{{Prince \bbl@greek@ampersand Smolensky}}{{}}} ``` Observe that there are no spacing diretives after `\bbl@greek@ampersand` . Yes, that's three [3] blank spaces at the end but, importantly, no `\` spacing directive. It looks to me like a programming error may have snuck in. Either of the fixes suggested fixes serves to re-introduce the needed spacing after `\bbl@greek@ampersand`. ``` \documentclass{article} \usepackage[T1]{fontenc} \usepackage[polutonikogreek,english]{babel} \usepackage[authoryear]{natbib} \usepackage{etoolbox} % for '\apptocmd' patching macro \makeatletter \apptocmd{\bbl@greek@ampersand}{\space}{}{} \makeatother \begin{document} {\greektext >'estalka} \citet{princesmolensky}, \citep{mp1995} \begin{thebibliography}{2} \bibitem[McCarthy \& Prince(1995)]{mp1995} McCarthy, John~J. \& Alan Prince. 1995. \newblock Faithfulness and Reduplicative Identity. \newblock In Jill Beckman, Suzanne Urbanczyk \& Laura~Walsh Dickey (eds.), \emph{Papers in Optimality Theory} (University of Massachusetts Occasional Papers in Linguistics~18), 249--384. Amherst, MA: Graduate Linguistics Student Association. \bibitem[Prince \& Smolensky({[1993] 2004})]{princesmolensky} Prince, Alan \& Paul Smolensky. [1993] 2004. \newblock \emph{Optimality Theory: Constraint Interaction in Generative Grammar}. \newblock Malden, MA: Blackwell Publishing. \end{thebibliography} \end{document} ```
1
https://tex.stackexchange.com/users/5001
694136
322,035
https://tex.stackexchange.com/questions/694138
1
I have a test L3 package (that does not do anything useful for now) where a key is used to set a lua variable : ``` \NeedsTeXFormat{LaTeX2e} \ProvidesExplPackage {package} {} {} {} \keys_define:nn {MWE} { MWEkey .code:n = \lua_now:e { luaVar = "\lua_escape:n {#1}" } } \ProcessKeyOptions[MWE] ``` However, if I set a document ``` \documentclass{standalone} \usepackage[MWEkey={\essai}]{package} \begin{document} \end{document} ``` I get an Undefined command error pertaining to `\essai`, before reaching the package code. If I say ``` \def\essai{t} \usepackage[MWEkey={\essai}]{package} ``` then `luaVar` is set to `\essai`. This is fine, because we are not actually going to interpret `\essai` as a TeX command in the lua code. I read that `\ProcessKeyOptions` was better than `\ProcessKeysOptions` because it does not have expansion problems, but here I am confused as to why `\essai` not being defined causes a problem. Is there a tweak in it to manage this situation ?
https://tex.stackexchange.com/users/103608
Using an undefined control sequence as value for ProcessKeyOptions
true
It is safer to separate the key handling ``` \documentclass{standalone} \usepackage{package} \MWEsetup{MWEkey={\essai}} \directlua{texio.write('luaVar=' .. luaVar)} \begin{document} \end{document} ``` --- ``` \NeedsTeXFormat{LaTeX2e} \ProvidesExplPackage {package} {} {} {} \keys_define:nn {MWE} { MWEkey .code:n = \lua_now:e { luaVar = "\lua_escape:n {#1}" } } \ProcessKeyOptions[MWE] \newcommand\MWEsetup[1]{\SetKeys[MWE]{#1}} ``` produces ``` luaVar=\essai ``` On the terminal. "Safe" keys can be set via the pakage options, but not this.
1
https://tex.stackexchange.com/users/1090
694143
322,036
https://tex.stackexchange.com/questions/694064
2
When using the [changes](https://ctan.math.illinois.edu/macros/latex/contrib/changes/changes.english.withcode.pdf) package, it highlights the changed text and adds a superscript denoting the author id. Is it possible to suppress this superscript? I use different colors for different authors. PS: This is a follow-up question to [this question](https://tex.stackexchange.com/q/694063/178369), but is also a stand-alone question.
https://tex.stackexchange.com/users/178369
Suppress author tag when using changes package
true
As [Teepeemm](https://tex.stackexchange.com/users/107497/teepeemm) said, ``` \usepackage[authormarkup=none]{changes} ``` should work.
1
https://tex.stackexchange.com/users/302874
694156
322,040
https://tex.stackexchange.com/questions/694151
2
I know there is a command like `\degreeCelsius` in `siunitx`. But I do not know how to define something like `\degreeKelvin` (in a title like [this](https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/JB083iB03p01257)). using `\qty{300}{\degree\Kelvin}` will add too many spaces.
https://tex.stackexchange.com/users/61591
How to define a \degreeKelvin using siunitx?
true
The general case of declaring a new unit is covered by [Defining new unit (year, century) in siunitx](https://tex.stackexchange.com/questions/6016/defining-new-unit-year-century-in-siunitx/6018). Here, the degree symbol is slightly tricky. Assuming you are not using `unicode-math` then a definition that matches that for `\degreeCelsius` would be ``` \DeclareSIUnit \degreekelvin {\ifmmode{}^{\circ}\else\textdegree\fi K} ``` (Other than Celsius, unit names are not capitalised.) If you are loading `unicode-math`, then ``` \DeclareSIUnit\degreekelvin{°K} ``` should work. However, for a 'one off' case like this, I'd be tempted just to use literal unit input ``` \qty{300}{{}^{\circ} K} ``` (or similar): you don't need all of the unit processing, you can be sure of math vs text mode, etc.
4
https://tex.stackexchange.com/users/73
694160
322,043
https://tex.stackexchange.com/questions/694172
1
I do not understand why this generates a `Underfull \hbox (badness 10000)` warning: ``` \documentclass{article} \usepackage{enumitem} \usepackage{tabularray} \UseTblrLibrary{varwidth} \usepackage{xcolor} \NewDocumentEnvironment{mytblr}{+b}{ \noindent\begin{tblr}{hlines, vlines, colspec={X[1]X[2]}, measure=vbox, row{1} = {gray8,font=\bfseries}, stretch=-1, rowsep=4pt, row{2-Z} = {font=\footnotesize}} #1 \end{tblr} }{} \begin{document} \begin{mytblr} Case & Description \\ A & B \\ C & D \\ \end{mytblr} \end{document} ``` Thank you in advance!
https://tex.stackexchange.com/users/271310
Underfull hbox with tblr
true
There is a `%` missing at the end of l.11. Without it, the unprotected line ending will act like a space, making your new environment too wide to fit in a single line. ``` \documentclass{article} \usepackage{enumitem} \usepackage{tabularray} \UseTblrLibrary{varwidth} \usepackage{xcolor} \NewDocumentEnvironment{mytblr}{+b}{% \noindent\begin{tblr}{hlines, vlines, colspec={X[1]X[2]}, measure=vbox, row{1} = {gray8,font=\bfseries}, stretch=-1, rowsep=4pt, row{2-Z} = {font=\footnotesize}} #1 \end{tblr}% }{} \begin{document} \begin{mytblr} Case & Description \\ A & B \\ C & D \\ \end{mytblr} \end{document} ```
2
https://tex.stackexchange.com/users/36296
694173
322,049
https://tex.stackexchange.com/questions/88657
115
Is there a command which does the same like `\clearpage` (typesetting all floats which have not been typeset yet) **but** then does *not* insert a pagebreak but continues with the following text/graphics on the same page?
https://tex.stackexchange.com/users/4009
Clearpage without pagebreak?
false
I made a MWE to compare different solutions. ### Code ``` \documentclass{article} \usepackage{lipsum} \usepackage{graphicx} \usepackage{afterpage} \usepackage{placeins} \begin{document} \section{foo} \lipsum[1-2] \begin{figure}[htb] \includegraphics[width=\textwidth, height=40mm]{example-image-a} \end{figure} \lipsum[4] \begin{figure}[htb] \includegraphics[width=\textwidth, height=\textheight]{example-image-b} \end{figure} %\clearpage % (variant 1) %\afterpage{\clearpage} % (variant 2) %\FloatBarrier % (variant 3) %\afterpage{\FloatBarrier} % (variant 4) \lipsum[3] \section{bar} \lipsum[5-7] \end{document} ``` ### Result #### Variant 0: nothing * Image B is moved to the end. #### Variant 1: `\clearpage` * Image B is placed before anything after `\clearpage`. #### Variant 2 `\afterpage{\clearpage}` (see [answer by Werner](https://tex.stackexchange.com/a/88658/123129)) * Image B is placed after the current page ends. ### Variant 3: `\FloatBarrier` (see [answer by Max](https://tex.stackexchange.com/a/88659/123129)) Note, in this specific example variant 3 behaves as variant 1, but that's not the case in general (see example below). #### Variant 4: `\afterpage{\FloatBarrier}` (see [answer by stefanct](https://tex.stackexchange.com/a/587026/123129)) Note, in this specific example variant 4 behaves as variant 2, but that's not the case in general (see example below). Difference between `\clearpage` and `\FloatBarrier` --------------------------------------------------- Another example without Fig. B. ### Code ``` \documentclass{article} \usepackage{lipsum} \usepackage{graphicx} \usepackage{afterpage} \usepackage{placeins} \begin{document} \section{foo} \lipsum[1-2] \begin{figure}[htb] \includegraphics[width=\textwidth, height=40mm]{example-image-a} \end{figure} \lipsum[4] \clearpage % (variant 1) %\FloatBarrier % (variant 3) \section{bar} \lipsum[5-7] \end{document} ``` ### Result #### Variant 1: `\clearpage` #### Variant 3: `\FloatBarrier` * `\FloatBarrier` does not insert a page break if there are no floats to insert.
0
https://tex.stackexchange.com/users/123129
694177
322,051
https://tex.stackexchange.com/questions/22346
67
I'm trying build my own theme to use for work-related presentations in `beamer`. I'm not so familiar with how to write the themes, I'm customizing a title page manually at the moment. What I want to do is have fine control over where text goes on the page when the `\titlepage` command is issued. I want to shift it rightwards and downwards from where `beamer` is choosing to put it.
https://tex.stackexchange.com/users/5879
How to customize \titlepage in beamer?
false
Since beamer version 3.70, the title page is structured much more modularly. Instead of one monolithic code block, it now consists of several smaller templates. This means you can do a lot of tweaks just by changing or modifying these templates. Examples: * to add the name of a supervisor below the author, you can use ``` \addtobeamertemplate{author}{}{Supervisor\par} ``` * to change the spacing above the date: ``` \addtobeamertemplate{date}{\vskip1cm}{} ``` * to change the order in which the various fields are shown on the title page: ``` \setbeamertemplate{title page}{ \vbox{} \vfill \begingroup \centering \usebeamertemplate{title} \vskip0.5em \usebeamertemplate{titlegraphic} \vskip1em \usebeamertemplate{author} \usebeamertemplate{institute} \usebeamertemplate{date} \endgroup \vfill } ``` --- ``` \documentclass{beamer} \title{Title} \author{Author} \institute{Institute} \titlegraphic{\includegraphics[width=3cm]{example-image-duck}} \setbeamertemplate{title page}{ \vbox{} \vfill \begingroup \centering \usebeamertemplate{title} \vskip0.5em \usebeamertemplate{titlegraphic} \vskip1em \usebeamertemplate{author} \usebeamertemplate{institute} \usebeamertemplate{date} \endgroup \vfill } \addtobeamertemplate{author}{}{Supervisor\par} \addtobeamertemplate{date}{\vskip1cm}{} \begin{document} \begin{frame} \titlepage \end{frame} \end{document} ```
0
https://tex.stackexchange.com/users/36296
694179
322,052