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/692861
2
In `LuaLaTeX` I have this code (Please correct me if I have written something inappropriate.) ``` \usepackage{fontspec} \usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math} \defaultfontfeatures{Scale=MatchLowercase,Scale=MatchUppercase} \setmainfont[Path=./minion/, %Extension = .otf, UprightFont=*-Regular.otf, BoldFont=*-Bold.otf, %ItalicFont=EBGaramond-MediumItalic.ttf, ItalicFont=*-It.otf, %RawFeature=+cswh, ItalicFeatures={Scale=MatchUppercase},{Scale=MatchLowercase},%{Style=Swash}, %BoldItalicFont=EBGaramond-BoldItalic.ttf, BoldItalicFont=*-BoldIt.otf ]{MinionPro} \newfontface\Swash{MinionPro-It}[ Path=./minion/, Extension = .otf, Contextuals=Swash] \DeclareTextFontCommand{\textsw}{\Swash} % \addfontfeature{ItalicFeatures={Style=Swash},{Scale=MatchUppercase},{Scale=MatchLowercase}}, %\newfontface\Cha[ % Path=./minion/, % Extension = .ttf, % %UprightFont=*-Regular, % %AutoFakeSlant=0.15, % %AutoFakeBold=1.2, % ]{Chatelaine-Regular} %\newfontface\MPI[ % Path=./minion/, % Extension = .otf, % ]{MinionPro-It} \setmathfont{Garamond-Math.otf}[Scale=1.09] \setmathfont{Garamond-Math.otf}[ range=up/{num}, Scale=1] \setmathfontface\Neo[ Path=./minion/, Extension = .otf, UprightFont=*, AutoFakeSlant=0.15, AutoFakeBold=1.2, Scale=1.09 ]{NeoEuler} \newcommand{\me}{\ensuremath{\Neo e}} \setmathfont{STIX Two Math}[ range=bb, Scale=MatchUppercase, Scale=1.09 ] \unimathsetup{math-style=upright} \setmathfont[ range=up/{greek,Greek}, script-features={},% sscript-features{}, Path=minion/, Extension=.otf, UprightFont=*, AutoFakeSlant=0.15, AutoFakeBold=1.2, Scale=0.91 ]{NeoEuler} \renewcommand{\int}{\ensuremath{\char"222B}} \setmathfont[range="222B, Scale=1.09 ]{Erewhon Math} ``` to get `MinionPro` like main font, `Garamond-math` like math font with greeks letters from `NeoEuler`, blackboard math letters from `STIX2`, integral symbol from `Erewhon Math` font and a command for exponential `e` symbol due `NeoEuler`: I was going through the documentation and some posts here to achieve the same in `ConTeXt`. Initially i wrote ``` \definefontfamily[mainface][mm][Garamond-Math] \definefontfamily[mainface][rm][MinionPro] \setupbodyfont[mainface,11pt] ``` and it works (with the `otf's` installed) but italics and bold letters are not returned either despite using `{\it }` and `{\bf }`. I don't have the greek letters nor the symbols of the other fonts either. With the `otf` files in folder I tried the following as a first step to get the symbols from the other fonts ``` \startenvironment mainface %0x80-0x97=GREEK \definefontfallback[Neo-fallback][file:NeoEuler.otf][0x80-x097][force=yes] %0x98-0xAF=greek \definefontfallback[Neo-fallback][file:NeoEuler.otf][0x98-0xAF][force=yes] \starttypescript [serif] [mainface] \definefontsynonym [Serif] [file:MinionPro-Regular.otf] \definefontsynonym [SerifCaps] [Serif] [features=smallcaps] \definefontsynonym [SerifItalic] [file:MinionPro-Italic.otf] \definefontsynonym [SerifSwash] [SerifItalic] [features=swash] \definefontsynonym [SerifBold] [file:MinionPro-Bold.otf] \definefontsynonym [SerifBoldItalic] [file:MinionPro-BoldItalic.otf] \stoptypescript \starttypescript [math] [mainface] \definefontsynonym [mathgreek] [file:Garamond-Math.otf] [fallbacks=Neo-fallback] \stoptypescript \definetypeface [mainface] [rm] [serif] [mainface] [default] [features=default] \definetypeface [mainface] [mm] [math] [mainface] [default] [features=default] \stopenvironment \usetypescript[mainface][default] \setupbodyfont[mainface,rm,mm,11pt] ``` but the pdf cannot be generated. When I try to open the pdf file I only get the message: `the pdf file is damaged`. Installing the fonts, if I do `[Neo Euler]` instead of `[file:NeoEuler.otf]` and something similar for `MinionPro` and `Garamond-Math`: ``` \startenvironment mainface %0x80-0x97=GREEK \definefontfallback[Neo-fallback][Neo Euler][0x80-x097][force=yes] %0x98-0xAF=greek \definefontfallback[Neo-fallback][Neo Euler][0x98-0xAF][force=yes] \starttypescript [serif] [mainface] \definefontsynonym [Serif] [MinionPro-Regular] \definefontsynonym [SerifCaps] [Serif] [features=smallcaps] \definefontsynonym [SerifItalic] [MinionPro-Italic] \definefontsynonym [SerifSwash] [SerifItalic] [features=swash] \definefontsynonym [SerifBold] [MinionPro-Bold] \definefontsynonym [SerifBoldItalic] [MinionPro-BoldItalic] \stoptypescript \starttypescript [math] [mainface] \definefontsynonym [mathgreek] [Garamond-Math] [fallbacks=Neo-fallback] \stoptypescript \definetypeface [mainface] [rm] [serif] [mainface] [default] [features=default] \usetypescript[mainface][default] \setupbodyfont[mainface,rm,mm,11pt] ``` it is possible to generate the pdf file but the math fonts are not applied. The pdf file appears with `MinionPro` and `latinmodern-math` (`{\it }` and `{\bf }`no works). It is clear that I am not considering something to get the results of the code for LuaLaTeX above, in ConTeXt. How can I achieve it?
https://tex.stackexchange.com/users/14423
From LuaLaTeX unicode-math to ConTeXt typescript
true
There is too much code that I do not understand or that looks a bit odd, but let me show you a small (horrible) example where I use XCharter (I do not have Minion) as text, Garamond Math as math, and alter some alphabets/glyphs. This is likely not a complete answer, but it might get you going. The file `foo-math.lfg` looks like this: ``` return { name = "foo-math", comment = "Goodies that complement foo.", author = "juanuni", mathematics = { tweaks = { aftercopying = { { tweak = "replacealphabets", list = { { source = "uppercasescript", target = "uppercasecalligraphic", filename = "latinmodern-math.otf", rscale = 1, }, { source = "lowercasegreeknormal", target = "lowercasegreekitalic", filename = "euler-math.otf", rscale = 1, }, { source = { first = 0x222B }, -- integral filename = "stixtwomath-regular.ttf", }, }, } }, }, }, } ``` If you look in the ConTeXt distribution you will find some `.lfg` files, usually there is only one font that is used, and that one is tweaked. Above you only see one tweak, the `replacealphabets` one. The small example file looks like this: ``` \definefontfamily [mainface] [rm] [XCharter] \definefontfamily [mainface] [mm] [Garamond Math] \definefontfeature[default][default][goodies=foo-math.lfg] \setupbodyfont[mainface,11pt] \starttext \startTEXpage[offset=3pt] Text \im{ a+b+c } \im{\mathcal{ABC}} \im{\alpha\beta\gamma} \im{\int} \stopTEXpage \stoptext ``` Not so much to be said about it. The output looks like this: Looking carefully, we notice that we have Latin Modern for calligraphic, Euler-Math for greek, and a Stix Two Math integral sign. This can be compared with the output if the `\definefontfeature` line is commented:
5
https://tex.stackexchange.com/users/52406
692880
321,440
https://tex.stackexchange.com/questions/692885
0
I am creating my resume in Latex. I am having some space left at the bottom of my page after section 1 ends and when I start section 2 after it, it starts from new page rather than utilizing the space at the bottom. As we know, resume has to be as compact as possible and I need to fill up all the space that have on the page. How do I do that? So far what I tried: ``` \begin{samepage} section 1 section 2 \begin{samepage} ``` This would ensure that section 1 and section 2 are on same page. Assuming sections 1 and section 2 are small enough to fit in one page, latex will try to squeeze them in one page. This is sort of a workaround. But as my resume starts to grow big, I want to automate this process. I can't manually make an estimate, where to put these \samepage blocks. btw, I also tried ``` \nopagebreak ``` It doesn't work for me. Any constructive suggestions are welcome. Thanks.
https://tex.stackexchange.com/users/301998
How to utilize full space on a pdf page and not start sections from new page?
false
I solved my question by adding `samepage` declaration in the beginning and the end of the document, rather than choosing sections and making combinations. It seems, if I do so, Latex automatically tries to squeeze everything on a page, as much as it can. ``` \begin{document} \begin{samepage} . . document sections & content goes here . . \end{samepage} \end{document} ```
1
https://tex.stackexchange.com/users/301998
692887
321,442
https://tex.stackexchange.com/questions/692882
1
I am using `tabulate` to make a table that spans a few pages, but I need to place a caption over that table. Putting it inside `\startplacetable` and `\stopplacetable` makes it float, which is not wanted. I am unsure what to do because I have never used tabulate or made any long tables before. Please help. Thanks.
https://tex.stackexchange.com/users/283822
Caption for tabulate
true
> > I am using tabulate to make a table that spans a few pages, but I need to place a caption over that table. > > > [From the wiki:](https://wiki.contextgarden.net/Tabulate#Titles) > > ### Titles > > > A tabulating environment can have an optional name which will be > repeated above at every page break that occurs inside the table. This > name needs to be specified as the argument of the title key of > `\setuptabulate`. The header key has to be set to text for this to > work. > > > > ``` > \setuppapersize[A10, landscape][A8, landscape] > \setuppaper[nx=2,ny=2] > \setuparranging[XY] > > \switchtobodyfont[5pt] > \setuppagenumbering[location={header,inright}] > \showframe[edge] > > \setuptabulate > [split=yes, > header=text, > title={\color[red]{Fenchurch St. Paul}\strut}, > frame=on] > > \starttext > \starttabulate[|p(1.2cm)|p(1.2cm)|] > \dorecurse{6}{ > \NC Bells: \NC Tin tan din dan bim bam bom bo \NC\NR > \HL > \NC Name: \NC Tailor Paul \NC \NR > \HL > } > \stoptabulate > \stoptext > > ``` > > > > Putting it inside `\startplacetable` and `\stopplacetable` makes it float, which is not wanted. > > > You can use `location=force` to make a “float” not actually float: ``` % To show multiple pages in a single page \setuppapersize[A6][A4] \setuppaper[nx=2, ny=2] \setuparranging[XY] \showframe[edge] % Set up the table formatting \setupcaptions[table][location=top] \setupfloat[table][align=middle] \starttext \startplacetable[ title={Table title}, location={force, split}, ] \startTABLE[ split=yes, leftframe=off, rightframe=off ] \dorecurse{10}{ \NC One \NC Two \NC\NR \NC Three \NC Four \NC\NR \NC Five \NC Six \NC\NR \NC Seven \NC Eight \NC\NR \NC Nine \NC Ten \NC\NR } \stopTABLE \stopplacetable \stoptext ```
0
https://tex.stackexchange.com/users/270600
692891
321,444
https://tex.stackexchange.com/questions/655620
1
Since our paper has many authors, I try to cut down the metadata from the front page of our paper as much as possible. Thereby, I want to go with the name and the university (two lines per author) and take out the email and country parts. However, the missing country field throws an error. Is there a way to suppress this error? Thank you for your help
https://tex.stackexchange.com/users/163354
How to make acmart stop complaining about missing country in affiliation?
false
A simpler solution is to add `\country{}` in the affiliation but keep the body empty (if you don't want to add the country). Here is how the affiliation would look like in this case. ``` \affiliation{ \institution{Institute for Clarity in Documentation} \country{} } ```
1
https://tex.stackexchange.com/users/302006
692893
321,445
https://tex.stackexchange.com/questions/301865
10
I have been using overleaf.com for making my documents. They have templates for all popular formats like presentations, conference papers, and so on. Since I frequently ask questions here, I have noticed that people on this forum does not use online editors? Is installing packages like TexMaker better than any online resource? What about the version mismatch issue? What are the pros and cons of using online editors?
https://tex.stackexchange.com/users/78770
Is it a good idea to use online editors?
false
Besides the already mentioned benefits of using a Tex Editor (such as Texmaker) instead of an online editor, I would like to add: * With Overleaf, heavy documents that take more than a minute to compile require a payment of over 179 euros. However, with a local editor, compilation is free. * Different IDEs or text editors offer their own advantages, such as: code snippets and customizable shortcuts, the ability to use your preferred language checkers, multi-lines editing at once with built-in multi-cursor feature (such as in VScode or Sublime Text), git integration, and the option to define files.exclude to hide certain files from the vscode sidebar. Additionally, users can take advantage of particular plugins. * You have complete control over the compilation process, which speeds up compilation times (especially when dealing with heavy documents). * Files (including non .tex files) from local folders can be previewed/opened with your default external programs (easier than in Overleaf, where only you can see the filenames in the sidebar). * The ability for your code and the packages you include to call other external commands/utilities installed on your computer to execute various tasks (after enabling shell escape -shell-escape). Packages such as epstopdf, minted, gnuplot, among others use this. * Your relative/absolute paths can point to file locations without duplicating everything by pasting them in the folder with your main .tex file. Soft links can also be created to benefit of this. In contrast, an online editor, all files must be uploaded and updated in the cloud after any change, which can be time-consuming for large numbers of files or frequent updates, such as when figures files are programmatically generated by a script or program. * Including figures with the same filename but located in different folders is easier and doesn't require copying the full directory tree to the project's main.tex folder. In Overleaf, you would need to load all your files on its server and update them after changes. * Depending on the people you collaborate with (who, in many cases, don't use version managers like git, mercurial or svn), it can be very cumbersome to maintain a clean, error-free online version. It is easier to edit locally, compare with the online version (with a diff tool), merge the changes, and re-upload the merged version. * For students, it is better to know how Latex works than entrusting all the work and relying solely on a third-party service, as subscription prices for those services are subject to change without any prior notice.
0
https://tex.stackexchange.com/users/6406
692897
321,448
https://tex.stackexchange.com/questions/692602
0
My question is very simple I want to use the the LaTeX Math Black Board Font for a commercial design in Inkscape (does no matter file format), but don't know font name, nor download link.
https://tex.stackexchange.com/users/255415
What font uses \mathbb?
false
Generate a pdf containing the symbols you need: ``` \documentclass{article} \usepackage{amssymb} \begin{document} $\mathbb{ABCXYZ}$ \end{document} ``` And import the result in Inkscape:
2
https://tex.stackexchange.com/users/29873
692898
321,449
https://tex.stackexchange.com/questions/423791
3
I'd like to color individual columns in a 3x3 matrix created using `\blockarray`. I wish to give one color to the first column, and a second color to the 2nd and 3rd column. I found the answers two [this question](https://tex.stackexchange.com/questions/69713/matrix-change-row-or-column-background) helpful, however, they do not seem to solve my problem. However, I somehow cannot get the first answer using `\columncolor` from the `xcolor` package to work in this environment: ``` \documentclass{article} \usepackage{amsmath} \usepackage[table]{xcolor} \usepackage{blkarray} % blockarrays; \begin{document} \begin{align*} \begin{blockarray}{ccc} \begin{block}{\BAmulticolumn{3}{>{}c}} \oint_{S^\textnormal{rec}}&\\ \end{block} \begin{block}{(>{\scriptstyle}>{\columncolor{olive!20}}c>{\scriptstyle}c>{\scriptstyle}c)} a &\cdots & b\\ \vdots&\ddots&\vdots\\ cd &\cdots&N_\textnormal e\\ \end{block} \end{blockarray} \end{align*} \end{document} ``` It throws the following error message: ``` ! Undefined control sequence. \BA@.[10002,1]u ...\BA@bdollar \hfil \columncolor {olive!20}\scriptstyle l.19 \end{align*} ``` The second answer using the package `hf-tikz` and `\tikzmark` is also not solving the issue, as it fails for column entries of different lengths. Can someone help me getting this to work in the `\blockarray` environment?
https://tex.stackexchange.com/users/159420
Coloring columns in blockarray
false
A solution with `{pNiceMatrix}` of `nicematrix`. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \[\begin{pNiceMatrix}[first-row,margin] \Block{1-*}{\oint_{S^{\text{rec}}}} \\ \Block[fill=olive!20,rounded-corners]{3-1}{} a & \cdots & b \\ \vdots & \ddots & \vdots \\ cd & \cdots & N_{\text{e}} \end{pNiceMatrix}\] \end{document} ``` The same with the system of `nicematrix` for the dotted lines. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \[\begin{pNiceMatrix}[first-row,margin,xdots/shorten=2mm] \Block{1-*}{\oint_{S^{\text{rec}}}} \\ \Block[fill=olive!20,rounded-corners]{3-1}{} a & \Cdots & b \\ \Vdots & \Ddots & \Vdots \\ cd & \Cdots & N_{\text{e}} \end{pNiceMatrix}\] \end{document} ```
2
https://tex.stackexchange.com/users/163000
692899
321,450
https://tex.stackexchange.com/questions/692602
0
My question is very simple I want to use the the LaTeX Math Black Board Font for a commercial design in Inkscape (does no matter file format), but don't know font name, nor download link.
https://tex.stackexchange.com/users/255415
What font uses \mathbb?
true
There is no “mathbb” font. Maybe you're referring to the one you get with `amsfonts`. The letters are in their standard ASCII slot in the Type1 font ``` /usr/local/texlive/2023/texmf-dist/fonts/type1/public/amsfonts/symbols/msbm10.pfb ``` The part before `texmf-dist` is system dependent, you should be able to find the file in your distribution by issuing ``` kpsewhich msbm10.pfb ``` from the command line. The file is also available on CTAN <https://ctan.org/tex-archive/fonts/amsfonts/pfb> I don't know whether you can use Type1 fonts in Inkscape, but you should be able to find your way.
1
https://tex.stackexchange.com/users/4427
692901
321,452
https://tex.stackexchange.com/questions/692906
1
Here is my MWE ``` \documentclass{beamer} \usetheme{Madrid} \usepackage[dutch]{babel} \usepackage{lipsum} \def\leq{\leqslant} % eleganter \leq-symbool \def\geq{\geqslant} % eleganter \geq-symbool \title{De regel van Horner: \\ Een vleugje geschiedenis} \date{} \subject{Slides voor het vak Vakdidactiek wiskunde} % zichtbaar in het "Properties" venster van de PDF-viewer \keywords{LaTeX, beamer, presentaties} % idem \begin{document} \addtocounter{framenumber}{-1} \begin{frame}[plain] \titlepage \end{frame} \begin{frame} \begin{columns} \column{0.38\linewidth} \centering \includegraphics[height=5cm, width=3.5cm]{example-image} \captionof[graphics]{test} \column{0.58\linewidth} \textbf{William George Horner} (geboren in 1786, gestorven in 1837) was een Brits wiskundige. Hij studeerde aan de Kingswood School in Bristol, waar hij reeds op 14(!)-jarige leeftijd een masteropleiding volgde. Daarna trok hij richting Bath waar hij een school stichtte. \end{columns} \end{frame} \end{document} ``` I want to add a short caption to the image, how may I do this? TIA
https://tex.stackexchange.com/users/298871
Beamer: image next to text with a caption
false
If you want to use the `\captionof` macro you * have to load the caption package * the correct syntax is `\captionof{figure}{your caption text}` ``` \documentclass{beamer} \usetheme{Madrid} \usepackage[dutch]{babel} \def\leq{\leqslant} % eleganter \leq-symbool \def\geq{\geqslant} % eleganter \geq-symbool \title{De regel van Horner: \\ Een vleugje geschiedenis} \date{} \subject{Slides voor het vak Vakdidactiek wiskunde} % zichtbaar in het "Properties" venster van de PDF-viewer \keywords{LaTeX, beamer, presentaties} % idem \usepackage{caption} \begin{document} \begin{frame}[plain,noframenumbering] \titlepage \end{frame} \begin{frame} \begin{columns} \begin{column}{0.38\linewidth} \centering \includegraphics[height=5cm, width=3.5cm]{example-image} \captionof{figure}{test} \end{column} \begin{column}{0.58\linewidth} \textbf{William George Horner} (geboren in 1786, gestorven in 1837) was een Brits wiskundige. Hij studeerde aan de Kingswood School in Bristol, waar hij reeds op 14(!)-jarige leeftijd een masteropleiding volgde. Daarna trok hij richting Bath waar hij een school stichtte. \end{column} \end{columns} \end{frame} \end{document} ``` Or you could place your image in a `figure` environment and use the normal `\caption{...}` macro: ``` \documentclass{beamer} \usetheme{Madrid} \usepackage[dutch]{babel} \def\leq{\leqslant} % eleganter \leq-symbool \def\geq{\geqslant} % eleganter \geq-symbool \title{De regel van Horner: \\ Een vleugje geschiedenis} \date{} \subject{Slides voor het vak Vakdidactiek wiskunde} % zichtbaar in het "Properties" venster van de PDF-viewer \keywords{LaTeX, beamer, presentaties} % idem \begin{document} \begin{frame}[plain,noframenumbering] \titlepage \end{frame} \begin{frame} \begin{columns} \begin{column}{0.38\linewidth} \begin{figure} \includegraphics[height=5cm, width=3.5cm]{example-image} \caption{test} \end{figure} \end{column} \begin{column}{0.58\linewidth} \textbf{William George Horner} (geboren in 1786, gestorven in 1837) was een Brits wiskundige. Hij studeerde aan de Kingswood School in Bristol, waar hij reeds op 14(!)-jarige leeftijd een masteropleiding volgde. Daarna trok hij richting Bath waar hij een school stichtte. \end{column} \end{columns} \end{frame} \end{document} ```
0
https://tex.stackexchange.com/users/36296
692908
321,457
https://tex.stackexchange.com/questions/692907
0
I am trying to number equations of a subequations environment in subgroups (similar to the example) using the answers of [this](https://tex.stackexchange.com/questions/482575/subequations-how-to-continue-numbering-within-subequation), [this](https://tex.stackexchange.com/questions/187372/numbering-parentequation-of-subequations), and [this](https://tex.stackexchange.com/questions/188329/subequations-customize-arabic-numbering-in-aligned-environment) questions, but I could not reach to a results! ``` \documentclass{article} \usepackage{amsmath} \newcommand\StepSubequations{ \stepcounter{parentequation} \stepcounter{equation} \gdef\theparentequation{\arabic{parentequation}\Alph{equation}} \setcounter{equation}{0} \setcounter{parentequation}{1} } \begin{document} \begin{subequations} \begin{align} 1 &= 1\\ 2 &= 2\\ \StepSubequations 3 &= 3\\% from here a new equation number 4 &= 4\\ 5 &= 5\\ 6 &= 6\\ \StepSubequations 7 &= 7\\ 8 &= 8\\ \StepSubequations 9 &= 9\\ \end{align} \end{subequations} \end{document} ``` Expected results: (1aA) (1aB) (1bA) (1bB) (1bC) (1bD) (1cA) (1cB) (1d)
https://tex.stackexchange.com/users/302026
Division of numbering of subequations in groups
true
I am not sure what you intend to do exactly and I also don't know what should happen in a `subequations` environment where you don't use `\StepSubequations` ... maybe it would be a good idea to create a new environment (as a copy of the oroginal one) that handles things as you want, so you can keep the original behaviour. Anyways, something like this could work as starting point (but it won't suppress a single "A" as this would require to look ahead): ``` \documentclass{article} \usepackage{amsmath} \usepackage{etoolbox} \newcounter{equationgroup} \makeatletter \patchcmd\subequations {\def\theequation{\theparentequation\alph{equation}}} {\def\theequation{\theparentequation\Alph{equation}}\ifmeasuring@\else\setcounter{equationgroup}{1}\fi} {}{} \makeatother \newcommand\StepSubequations{ \stepcounter{equationgroup} \stepcounter{equation} \gdef\theparentequation{\arabic{parentequation}\alph{equationgroup}} \setcounter{equation}{0} } \begin{document} \begin{subequations} \begin{align} 1 &= 1\\ 2 &= 2\\ \StepSubequations 3 &= 3\\% from here a new equation number 4 &= 4\\ 5 &= 5\\ 6 &= 6\\ \StepSubequations 7 &= 7\\ 8 &= 8\\ \StepSubequations 9 &= 9 \end{align} \end{subequations} \begin{subequations} \begin{align} 1 &= 1\\ 2 &= 2\\ \StepSubequations 3 &= 3\\% from here a new equation number 4 &= 4\\ 5 &= 5\\ 6 &= 6\\ \StepSubequations 7 &= 7\\ 8 &= 8\\ \StepSubequations 9 &= 9 \end{align} \end{subequations} \end{document} ``` --- You could also place the redefinition into a command that you then need to execute (which would allow you to change between the original and the adjusted behaviour of the `subequations` environment more easily). So, maybe something like this: ``` \documentclass{article} \usepackage{amsmath} \newcounter{subequationsgroup} \makeatletter \AddToHook{env/subequations/after}{% \stepcounter{parentequation}% \gdef\theequation{\theparentequation}% } \newcommand{\InitializeSubequationsGroups}{% \ifmeasuring@\else% \setcounter{subequationsgroup}{\value{equation}}% \fi% } \newcommand{\StepSubequationsGroup}{% \ifmeasuring@\else% \stepcounter{subequationsgroup}% \setcounter{equation}{0}% \gdef\theequation{\theparentequation\alph{subequationsgroup}\Alph{equation}}% \fi% } \newcommand{\StepSubequationsSingle}{% \ifmeasuring@\else% \stepcounter{subequationsgroup}% \setcounter{equation}{0}% \gdef\theequation{\theparentequation\alph{subequationsgroup}}% \fi% } \makeatother \begin{document} \begin{subequations} \begin{align} 1 &= 1\\ 2 &= 2 \end{align} \end{subequations} \begin{subequations} \begin{align} \InitializeSubequationsGroups \StepSubequationsGroup 1 &= 1\\ 2 &= 2\\ \StepSubequationsGroup 3 &= 3\\% from here a new equation number 4 &= 4\\ 5 &= 5\\ \StepSubequationsSingle 6 &= 6\\ \StepSubequationsGroup 7 &= 7\\ 8 &= 8\\ 1 &= 1\\ 2 &= 2 \end{align} \end{subequations} \begin{subequations} \begin{align} 1 &= 1\\ 2 &= 2 \end{align} \end{subequations} \end{document} ``` --- My last try which should allow you to place more than one `align` inside of a `subequations` environment. You only need to take care where to place the `\EndSubequationsGroup` command if it comes last in the `subequations` environment: ``` \documentclass{article} \usepackage{amsmath} \newcounter{subequationsgroup} \makeatletter \AddToHook{env/subequations/before}{% \gdef\theequation{\arabic{equation}}% } \newcommand{\BeginSubequationsGroup}{% \ifmeasuring@\else% \setcounter{subequationsgroup}{\value{equation}}% \setcounter{equation}{0}% \stepcounter{subequationsgroup}% \gdef\theequation{\theparentequation\alph{subequationsgroup}\Alph{equation}}% \fi% } \newcommand{\EndSubequationsGroup}{% \ifmeasuring@\else% \setcounter{equation}{\value{subequationsgroup}}% \gdef\theequation{\theparentequation\alph{equation}}% \fi% } \makeatother \begin{document} \begin{subequations} \begin{align} 1 &= 1\\ 2 &= 2 \end{align} \end{subequations} \begin{subequations} \begin{align} \BeginSubequationsGroup 1 &= 1\\ 2 &= 2\\ \EndSubequationsGroup 3 &= 3\\ \BeginSubequationsGroup 4 &= 4\\ 5 &= 5\\ \EndSubequationsGroup 6 &= 6 \end{align} \end{subequations} \begin{subequations} \begin{align} 1 &= 1\\ 2 &= 2 \end{align} \begin{align} \BeginSubequationsGroup 1 &= 1\\ 2 &= 2 %\EndSubequationsGroup \end{align} \end{subequations} \begin{subequations} \begin{align} 1 &= 1\\ \BeginSubequationsGroup 2 &= 2\\ 3 &= 3\\ \EndSubequationsGroup 4 &= 4\\ 5 &= 5\\ \BeginSubequationsGroup 6 &= 6\\ 7 &= 7\\ 8 &= 8 \end{align} \begin{align} \EndSubequationsGroup 1 &= 1\\ 2 &= 2 \end{align} \end{subequations} \end{document} ```
0
https://tex.stackexchange.com/users/47927
692909
321,458
https://tex.stackexchange.com/questions/87108
12
After some struggle, I was able to render the matrix I was after. It now has the right "shape", but it does not look very nice; especially the spacing between the bracket and the matrix contents is too small, both horizontally and vertically. How can I solve this? Is there a way to define cell padding? ``` \documentclass{article} \usepackage{blkarray} \usepackage{multirow} \begin{document} \begin{equation} C = \begin{blockarray}{cccccccc} & & & & j & & & \\ \begin{block}{c[ccc|c|ccc]} % [I O] & 1 & & & 0 & 0 & \ldots & 0 \\ & & \ddots & & \vdots & \vdots & & \vdots \\ & & & 1 & 0 & 0 & \ldots & 0 \\ \BAhhline{&-------} i & \BAmulticolumn{3}{c|}{A_1} & Q_{11} & \multirow{4}{*}{$B_2+b_2$} & \multirow{4}{*}{$\ldots$} & \multirow{4}{*}{$B_n+b_n$} \\ \BAhhline{&----} & \BAmulticolumn{3}{c|}{A_1+a_1} & 0 & \\ & & \vdots & & \vdots & \\ & \BAmulticolumn{3}{c|}{A_n+A_n} & 0 & \\ \end{block} \end{blockarray} \end{equation} \end{document} ```
https://tex.stackexchange.com/users/15102
How can I pad cells of a blockarray?
false
Here is what you can do with `{bNiceArray}` of `nicematrix` (you need several compilations). ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \[C = \begin{bNiceArray}[first-row,first-col,margin]{ccc|c|lcr} & & & & j \\ & 1 & & & 0 & 0 & \Cdots & 0 \\ & & \Ddots & & \Vdots& \Vdots & & \Vdots \\ & & & 1 & 0 & 0 & \Cdots & 0 \\ \Hline i & \Block{1-3}{A_1} & & & Q_{11} & \Block[name=one]{4-1}{B_2+b_2} & & \Block[name=two]{4-1}{B_n+b_n} \\ \cline{1-4} & \Block[name=three]{1-3}{A_1+a_1} & & & 0 \\ & & & & \Vdots \\ & \Block[name=four]{1-3}{A_n+A_n} & & & 0 \\ \CodeAfter \line{one}{two} \line{three}{four} \end{bNiceArray} \] \end{document} ```
2
https://tex.stackexchange.com/users/163000
692911
321,459
https://tex.stackexchange.com/questions/692912
2
I'd like to cite two papers in one parenthesis, like [cite1; p.100, cite2; p.200] How can I do that? ``` \documentclass{article} \usepackage{eurosym} \usepackage{amssymb} \usepackage{amsfonts} \usepackage[all]{xy} \usepackage{amsmath} \begin{document} \cite[p.100, p.200]{Bredon, Chaber} \begin{thebibliography}{99} \bibitem{Bredon} Bredon, G. E. \bibitem{Chaber} Chaber, J. \end{thebibliography} \end{document} ```
https://tex.stackexchange.com/users/203843
Cite two papers in parentheses with page numbers
false
> > Like this `[Bredon; p.100, Chaber; p.200]` > > > I take it that you've constructed the bibliography by hand, i.e., by setting up various `\bibitem` directives. I further take it that you want to show *author-only* citation call-outs rather than the more common author-year style citation call-outs. If these assumptions are correct, the following solution may be of interest to you. It employs the `natbib` citation management package and its `\citeauthor` and `\citetext` macros. Note that it's important to provide both an optional argument (in square brackets -- note that it's essential to provide both author- and year-related information) and a mandatory argument (the "key", in curly braces) for each `\bibitem`. ``` \documentclass{article} \usepackage{natbib} % for '\citetext' and '\citeauthor' macros \setcitestyle{square,notesep={; }} \bibliographystyle{plainnat} % just to avoid an outright error message \begin{document} \noindent \dots\ \citetext{\citeauthor[p.~100]{Bredon}, \citeauthor[p.~200]{Chaber}} \dots \begin{thebibliography}{99} \bibitem[Bredon(1995)]{Bredon} Bredon, G. E., 1995, \dots \bibitem[Chaber(2005)]{Chaber} Chaber, J. 2005, \dots \end{thebibliography} \end{document} ``` --- *Addendum* to address the OP's follow-up comment (comments, actually): To generate numeric style citation call-outs of the form `[1; p.100, 2; p.200]`, I suggest you (a) change ``` \setcitestyle{square,notesep={; }} ``` to ``` \setcitestyle{numbers,square,notesep={; }} ``` and (b) replace ``` \citetext{\citeauthor[p.~100]{Bredon}, \citeauthor[p.~200]{Chaber}} ``` with ``` \citetext{\citealp[p.~100]{Bredon}, \citealp[p.~200]{Chaber}} ``` Then, recompile the test document twice to get this output:
3
https://tex.stackexchange.com/users/5001
692917
321,463
https://tex.stackexchange.com/questions/691594
2
The following is a minimal example of a problem I'm having with hyphenation. ``` \documentclass{article} \begin{document} \hyphenpenalty=0 \hyphenation{shame-less-ness} \begin{minipage}{18mm} shamelessness shameless\-ness Four score and seven years ago, shamelessness our forefathers brought forth upon this continent a new nation. \end{minipage} \end{document} ``` It seems that for a single-word paragraph inside a narrow column, I can't convince LaTeX to hyphenate the word. The result when I typeset this document looks like this: ``` shamelessness shameless- ness Four score and seven years ago, shameless- ness our forefathers brought forth upon this conti- nent a new nation. ``` The width of 18 mm is chosen to be narrower than the word "shamelessness." If I explicitly suggest a hyphenation, the word gets hyphenated. But implicit hyphenation doesn't happen, even though I did everything I could think of to encourage it, setting \hyphenpenalty to zero and explicitly providing a hyphenation for the word. However, when I insert the word at a random spot in a multi-line passage of text, it gets hyphenated. Why is latex refusing to do the implicit hyphenation here, and what can I do to fix the problem? [EDIT] Thanks, David Carlisle, for your comment. That answers my question.
https://tex.stackexchange.com/users/301047
Why no implicit hyphenation for a single-word paragraph in this narrow minipage?
false
TeX doesn't hyphenate the first word (unless you use luatex) you can prefix with `\hspace*{0pt}` to allow hyphenation
5
https://tex.stackexchange.com/users/1090
692918
321,464
https://tex.stackexchange.com/questions/692921
1
I am trying to make a short list of tables and list of figures in the appendix of a document, using the general commands `\listoffigures` and `listoftables`. That works, but there is a lot of abundant vertical space added. I want the appendix to be very concise. code: ``` \documentclass[12pt]{scrreprt}% scrreprt \begin{document} \begin{figure} \caption{Exemplary figure} \end{figure} \begin{table} \caption{Exemplary table} \end{table} \section{Appendix} \listoftables \listoffigures \end{document} ``` If you run the above code, the list of tables and the list of figures are both on a new page. I would like them to have on the same page as the section "Appendix". How can this be done in Koma script? More generally, I was looking for a way to have a new list of tables and list of figures, separately for the appendix. But that seems to be even more complicated than achieving what I want to do, as in my case, I am not using the commands for list of tables and list of figures in the main document. So I think it is easier to just use them in the Appendix.
https://tex.stackexchange.com/users/283916
Change vertical space before and after list of tables and list of figures in Koma script
true
Usually the lists of something are chapters in `scrreprt`. And so the titles are formatted as chapter headings. By default chapters start a new page and add some vertical space above. But the classes provide several configuration features for the lists of something. For example, there is option `listof=leveldown` to change the headings level. With `scrreprt` or `scrbook` the options make them to be sections instead of chapters. (With `scrartcl` they would be subsections instead of section.) Sections do not force a new page and insert less vertical space above: ``` \documentclass[12pt,listof=leveldown]{scrreprt}% scrreprt \begin{document} \begin{figure} \caption{Exemplary figure} \end{figure} \begin{table} \caption{Exemplary table} \end{table} \section{Appendix} \listoftables \listoffigures \end{document} ``` There are several more features. For example, you can explicitly define a new command for the heading. Or you can change the style of sections, e.g.: ``` % This example should not be used as it is. % It is just to illustrate some of the available features. \documentclass[12pt,listof=leveldown]{scrreprt}% scrreprt \usepackage{xcolor} \BeforeTOCHead[lof]{% \RedeclareSectionCommand[font=\color{green}]{section}% } \BeforeTOCHead[lot]{% \RedeclareSectionCommand[font=\color{blue},beforeskip=0pt,runin=false,afterskip=0pt]{section} } \begin{document} \begin{figure} \caption{Exemplary figure} \end{figure} \begin{table} \caption{Exemplary table} \end{table} \section{Appendix} \listoftables \listoffigures \end{document} ``` BTW: IMHO it would make more sense, to use `\addchap{Appendix}` instead of `\section{Appendix}`. Separated lists for the main part and the appendix are also possible. But because you've explicitly told, that you don't need this, I'll not show it.
1
https://tex.stackexchange.com/users/277964
692924
321,466
https://tex.stackexchange.com/questions/692855
0
I'm writing a citation style for a beamer presentation. I'm trying to keep the citations in the footnotes and keep only the necessary information. Hence, I'm omitting the titles from journal articles, but now I'd like to cite books as well and I can't find how to include it in this style. My current code is ``` \DeclareCiteCommand{\partcite} {\usebibmacro{prenote}} {\href{http://dx.doi.org/\thefield{doi}}{\printnames{labelname} \printfield{year}\setunit{\labelnamepunct}% \printfield[journaltitle]{shortjournal} \printfield{volume}, \printfield{pages}\printfield{eid}}% \newunit% \printfield[eprint:arxiv]{eprint}. } {\addsemicolon\space} {\usebibmacro{postnote}} ```
https://tex.stackexchange.com/users/144146
`DeclareCiteCommand`: how to print book titles, but not article titles?
true
From your question its not totally clear, were you want the book-title to be printed. But you can use the `\iffieldequalstr{<field>}{<string>}{<true>}{<false>}` test (Biblatex doc p. 251) to test for the `entrytype` and print the title in case its `book` (which means `true` in boolean syntax): ``` \DeclareCiteCommand{\partcite} {\usebibmacro{prenote}} {\href{http://dx.doi.org/\thefield{doi}}{\printnames{labelname} \printfield{year}\setunit{\labelnamepunct}% \iffieldequalstr{entrytype}{book}{\printfield{title}}{\printfield[journaltitle]{shortjournal} \printfield{volume}}, \printfield{pages}\printfield{eid}}% \newunit% \printfield[eprint:arxiv]{eprint}. } {\addsemicolon\space} {\usebibmacro{postnote}} ``` Of course you could place the test at another position. Hope that helps!
1
https://tex.stackexchange.com/users/297560
692925
321,467
https://tex.stackexchange.com/questions/692932
0
What exactly is involved with setting up delimiters with XeTeX, Unicode, and OpenType fonts? I found this answer <https://tex.stackexchange.com/a/692859/224317> which looks promising. I have also looked at `\Udelcode`, `\Udelcodenum`, and `\Udelimiter`, but cannot seem to find an example of how to set these up. I am *not* using `unicode-math` because I am using `mtpro2`. Is the "recipe" for resizing part of the font or is `unicode-math` required? `StixTwoMath-Regular.otf` has a number of nice delimiters. I was surprised that the double-parentheses (crescents) are resizable, so this gives me hope, but examples are scarce or nonexistent.
https://tex.stackexchange.com/users/224317
Resizable delimiters with StixTwo OTF without unicode-math
true
If you must... ``` \documentclass{article} % luatex \font\x="StixTwoMath:mode=base;script=math;language=dflt;" \font\x="[STIXTwoMath-Regular]" \newfam\stx \textfont\stx=\x \Umathcode"2985 4 \stx "2985 \Umathcode"2986 5 \stx "2986 \Udelcode"2985 \stx "2985 \Udelcode"2986 \stx "2986 \begin{document} $⦅x⦆ \Biggl⦅x\Biggr⦆$ \end{document} ```
1
https://tex.stackexchange.com/users/1090
692934
321,469
https://tex.stackexchange.com/questions/692937
2
I made the following table with `tabularx` and expected that in the second row, all cells have the same width, since they all use `multicolumn{2}`. But they don't. Instead the third and sixth cell width is double that of the others. Similar problems with rows 3 to 6. The first and fourth cell on each row is only half as wide as it should be, considering that it uses `multicolumn{4}`, while the other cells have double the expected width. Am I doing sth. wrong or does `tabularx` behave different than I think it does? I thought that the width of an `X` column will be relative to the nr of columns defined with `\multicolumn{n}`. I. e. if the whole table has 12 columns and I specify `\multicolumn{2}` that column width will be a sixth of the whole table. But apparently that isn't the case, or rather it only works for the first row... ``` \documentclass{article} \usepackage{tabularx} \usepackage{booktabs} \begin{document} \begin{table}[h] \begin{tabularx}{\textwidth}{*{12}{X|}} \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{|X|}{6 cols} \\ \hline \multicolumn{2}{|X|}{2 cols} & \multicolumn{2}{X|}{2 cols} & \multicolumn{2}{X|}{2 cols} & \multicolumn{2}{|X|}{2 cols} & \multicolumn{2}{X|}{2 cols} & \multicolumn{2}{X|}{2 cols}\\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \end{tabularx} \end{table} \end{document} ```
https://tex.stackexchange.com/users/302058
tabularx and multicolumn: column width is not correct
false
an `X` column is a `p` column for a width which is determined for the whole table, so if the first two columns are `|X|X|` (the first `|` is missing in your example), then `\multicolumn{2}{|X|}{...}` will span the columns but `...` will be forced into a parbox of the width determined by `X` which is less than half the required width. You could use `\multicolumn{2}{|l|}{...}` so the width is automatic, or if you need linebreaking, `\multicolumn{2}{|>{\hsize=\dimexpr2\hsize+2\tabcolsep+\arrayrulewidth}X|}{...}` so the `p` column is the width of two `X` columns and the spanned padding and rule.
3
https://tex.stackexchange.com/users/1090
692941
321,472
https://tex.stackexchange.com/questions/692937
2
I made the following table with `tabularx` and expected that in the second row, all cells have the same width, since they all use `multicolumn{2}`. But they don't. Instead the third and sixth cell width is double that of the others. Similar problems with rows 3 to 6. The first and fourth cell on each row is only half as wide as it should be, considering that it uses `multicolumn{4}`, while the other cells have double the expected width. Am I doing sth. wrong or does `tabularx` behave different than I think it does? I thought that the width of an `X` column will be relative to the nr of columns defined with `\multicolumn{n}`. I. e. if the whole table has 12 columns and I specify `\multicolumn{2}` that column width will be a sixth of the whole table. But apparently that isn't the case, or rather it only works for the first row... ``` \documentclass{article} \usepackage{tabularx} \usepackage{booktabs} \begin{document} \begin{table}[h] \begin{tabularx}{\textwidth}{*{12}{X|}} \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{|X|}{6 cols} \\ \hline \multicolumn{2}{|X|}{2 cols} & \multicolumn{2}{X|}{2 cols} & \multicolumn{2}{X|}{2 cols} & \multicolumn{2}{|X|}{2 cols} & \multicolumn{2}{X|}{2 cols} & \multicolumn{2}{X|}{2 cols}\\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \end{tabularx} \end{table} \end{document} ```
https://tex.stackexchange.com/users/302058
tabularx and multicolumn: column width is not correct
false
You asked, > > Am I doing something wrong? > > > Short answer: Yes. Slightly longer answer: Your `tabularx` environment contains too many mutually conflicting pieces of information; the result is a mess that cannot yield the "correct" column width. In some cases, it's by shear luck that things just happen to look like they're working out. However, that's just coincidence. The upshot? You need to stop providing these mutually conflicting directives. Let's break up the whole `tabularx` into smaller parts. Let's start with a simple-looking case: ``` \begin{tabularx}{\textwidth}{|*{12}{X|}} \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{ X|}{6 cols} \\ \hline \end{tabularx} ``` This looks innocuous, doesn't it? But, as always, looks can be deceiving. The source of the trouble that's lurking just below the surface is a case of abuse of notation: The `X` column type is being forced to do double duty. First, since there are supposed to be 12 equal-width columns, the default usable width of each column equals `\textwidth/12-2\tabcolsep-(13/12)\arrayrulewidth`. (Aside: `$13/12 \approx 1.08333$`.) But in `\multicolumn{6}{X|}{6 cols}`, the width of the cell is actually *6 times as large*. [I'll let the designer of the `tabularx` package explain why this abuse of notation was allowed to slide and doesn't throw an error...] Luckily -- by sheer happy coincidence, I must emphasize -- things turn out to be ok, i.e., LaTeX manages to figure out correctly what the width of combined columns is supposed to be. This is because ``` \begin{tabularx}{\textwidth}{| *{12}{X|} } \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{ X|}{6 cols} \\ \hline \end{tabularx} ``` can be simplified w.l.o.g. to ``` \begin{tabularx}{\textwidth}{| X | X |} \hline 1 col & 1 col \\ \hline \end{tabularx} ``` for which there's no more any abuse of notation. Put differently, LaTeX solves the puzzle by discarding the redundancies built into the first `tabularx` environment. --- Let's consider a slightly more interesting case: ``` \begin{tabularx}{\textwidth}{| *{12}{X|} } \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{ X|}{6 cols} \\ \hline \multicolumn{2}{|X|}{2 cols} & \multicolumn{2}{ X|}{2 cols} & \multicolumn{2}{ X|}{2 cols} & \multicolumn{2}{ X|}{2 cols} & \multicolumn{2}{ X|}{2 cols} & \multicolumn{2}{ X|}{2 cols} \\ \hline \end{tabularx} ``` Observe the rampant abuse of notation leading to the width of an `X`-type column potentially having three [3!] separate values. But a moment's reflection shows that this must be the same as ``` \begin{tabularx}{\textwidth}{|*{6}{X|}} \hline \multicolumn{3}{|X|}{3 cols} & \multicolumn{3}{ X|}{3 cols} \\ \hline 1 col & 1 col & 1 col & 1 col & 1 col & 1 col \\ \hline \end{tabularx} ``` for which there are, once again, no ambiguities. The point is that there aren't really 12 independent columns, but only 6, and LaTeX now has just enough information to skate back and forth between the two possible values for the width of an `X`-type column. Put differently, the simpler problem has no fatal ambiguities. --- Finally, let us turn to a case where the redundancies cannot be eliminated unambiguously. ``` \begin{tabularx}{\textwidth}{| *{12}{X|} } \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{ X|}{6 cols} \\ \hline \multicolumn{4}{|X|}{4 cols (?!)} & a & b & \multicolumn{4}{ X|}{4 cols (?!)} & c & d \\ \hline \end{tabularx} ``` LaTeX has been provided enough information to figure out that the combined width of the first three cells in row 2 must equal the width of the first cell in row 1. However, there simply isn't enough information left over to allow LaTeX to also infer that the width of the first cell in row 2 must be equal to *4 times* the width of cells 2 and 3 in that row. Instead, what you end up getting is three cells of equal width in row 2. Ouch. To resolve the situation, what's really needed is something like this: ``` \newlength\mylen \setlength\mylen{\textwidth/12-2\tabcolsep-1.08333\arrayrulewidth} \begin{tabularx}{\textwidth}{| *{2}{*{4}{X|} *{2}{wl{\mylen}|}} } \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{ X|}{6 cols} \\ \hline \multicolumn{4}{|X|}{4 cols} & a & b & \multicolumn{4}{ X|}{4 cols} & c & d \\ \hline \end{tabularx} ``` which produces this result: The reason this "works as expected" is that we're now giving LaTeX enough information to let it infer that the width of the cell given by `\multicolumn{4}{|X|}{4 cols}` must be two thirds (rather than just one third) of the width of the cell given `\multicolumn{6}{|X|}{6 cols}`. Moral of the story? Don't be surprised to learn that if you don't provide enough useful information to `tabularx`, it won't be able to solve the column width assignment problem correctly. --- Just for completeness, here are all six `tabularx` environments mentioned above: ``` \documentclass{article} \usepackage{tabularx,calc} % code needed for the final 'tabularx' example: \newlength\mylen \setlength\mylen{\textwidth/12-2\tabcolsep-1.08333\arrayrulewidth} \setlength\parindent{0pt} % just for this example \begin{document} \begin{tabularx}{\textwidth}{|*{12}{X|}} \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{ X|}{6 cols} \\ \hline \end{tabularx} \smallskip \begin{tabularx}{\textwidth}{|X|X|} \hline 1 col & 1 col \\ \hline \end{tabularx} \bigskip \begin{tabularx}{\textwidth}{*{12}{X|}} \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{ X|}{6 cols} \\ \hline \multicolumn{2}{|X|}{2 cols} & \multicolumn{2}{ X|}{2 cols} & \multicolumn{2}{ X|}{2 cols} & \multicolumn{2}{ X|}{2 cols} & \multicolumn{2}{ X|}{2 cols} & \multicolumn{2}{ X|}{2 cols} \\ \hline \end{tabularx} \smallskip \begin{tabularx}{\textwidth}{|*{6}{X|}} \hline \multicolumn{3}{|X|}{3 cols} & \multicolumn{3}{ X|}{3 cols} \\ \hline 1 col & 1 col & 1 col & 1 col & 1 col & 1 col \\ \hline \end{tabularx} \bigskip \begin{tabularx}{\textwidth}{|*{12}{X|}} \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{ X|}{6 cols} \\ \hline \multicolumn{4}{|X|}{4 cols (?!)} & a & b & \multicolumn{4}{ X|}{4 cols (?!)} & c & d \\ \hline \end{tabularx} \smallskip \begin{tabularx}{\textwidth}{| *{2}{*{4}{X|} *{2}{wl{\mylen}|}} } \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{ X|}{6 cols} \\ \hline \multicolumn{4}{|X|}{4 cols} & a & b & \multicolumn{4}{ X|}{4 cols} & c & d \\ \hline \end{tabularx} \end{document} ```
4
https://tex.stackexchange.com/users/5001
692942
321,473
https://tex.stackexchange.com/questions/692949
7
I am trying to set some text in all caps (not small caps) using the `\uppercase` command. Part of the text is variable and stored in a separate command, but that portion of the text is being set in lower case. How do I fix this? Here is an MWE: ``` \documentclass[10pt]{article} \begin{document} \newcommand{\test}{lower case} \uppercase{Why is the last part in \test}? \end{document} ```
https://tex.stackexchange.com/users/250103
All Caps with Commands
false
Use `\MakeUppercase` ``` \documentclass[10pt]{article} \begin{document} \newcommand{\test}{lower case} \newcommand{\testi}{upper case} \uppercase{Why is the last part in \test}? \MakeUppercase{Now everything is in \testi}. \end{document} ```
19
https://tex.stackexchange.com/users/241621
692951
321,477
https://tex.stackexchange.com/questions/692949
7
I am trying to set some text in all caps (not small caps) using the `\uppercase` command. Part of the text is variable and stored in a separate command, but that portion of the text is being set in lower case. How do I fix this? Here is an MWE: ``` \documentclass[10pt]{article} \begin{document} \newcommand{\test}{lower case} \uppercase{Why is the last part in \test}? \end{document} ```
https://tex.stackexchange.com/users/250103
All Caps with Commands
false
If you are willing and able to use `LuaLaTeX`, you can use Lua's `string.upper` function to perform the conversion to all-uppercase. ``` % !TEX TS-program = lualatex \documentclass{article} \newcommand{\test}{lower case} \newcommand\LuaUppercase[1]{\directlua{tex.sprint(string.upper("#1"))}} \usepackage{textgreek} \begin{document} \uppercase{Why is the last part in \test}? \LuaUppercase{Why is the last part in \test}? \end{document} ```
5
https://tex.stackexchange.com/users/5001
692954
321,478
https://tex.stackexchange.com/questions/683736
1
This is not strictly a TeX-related question, but as `Concrete Roman` fonts were designed by DEK and distributed with TeX, I hope to find an answer here. I'd like to use the `Concrete Roman` fonts on a website. However, finding ttf/otf files on the internet isn't easy. Are they available in any modern (=possible to use as web fonts) format? If so, what license are they available under? On CTAN I could only find mf/tfm files (useless for web) and [Type 1](https://www.ctan.org/pkg/cm-super) files (same). Googling didn't help a lot, the Wikipedia page directed me to [this page with a non-working download link](https://cm-unicode.sourceforge.io/download.html), [this page](https://fontlibrary.org/en/font/cmu-concrete) suggests that the fonts are available under the SIL Open Font License (which AFAIR is rather permissive), but the download link leads to some other font catalogue apparently not containing Concrete Roman at all...
https://tex.stackexchange.com/users/5626
Where to find Concrete Roman TTF/OTF fonts
false
[This web page](https://checkmyworking.com/cm-web-fonts/) addresses your use case: a collection of Computer Modern fonts put together for the web. [This more recent project](https://github.com/jarnosz/Concrete-LGC) may be off-topic for you but perhaps this variation of the Concrete font collection is worth a look.
3
https://tex.stackexchange.com/users/222832
692963
321,481
https://tex.stackexchange.com/questions/692949
7
I am trying to set some text in all caps (not small caps) using the `\uppercase` command. Part of the text is variable and stored in a separate command, but that portion of the text is being set in lower case. How do I fix this? Here is an MWE: ``` \documentclass[10pt]{article} \begin{document} \newcommand{\test}{lower case} \uppercase{Why is the last part in \test}? \end{document} ```
https://tex.stackexchange.com/users/250103
All Caps with Commands
true
Using TeX primitives requires knowing what they do. In this case you're trying to use `\uppercase`, but its actions are different from whay you might expect: 1. upon seeing `\uppercase`, TeX looks for `{` (explicit or implicit character token of category code 1) expanding tokens as it goes and ignoring space tokens or `\relax`; 2. once `{` has been found, TeX absorbs tokens ***without expansion*** until it finds a <right brace> (an explicit character token of category code 2); 3. at this point TeX sends the tokens it found down to a different processor that converts *character tokens* to their uppercase version, according to the `\uccode` array (without changing category codes); noncharacter tokens aren't touched; 4. at the end, the resulting token list is sent back in the main input stream to be processed as if it had been there to begin with. Point 3 applies to your `\test`: what you get is ``` WHY IS THE LAST PART IN \test ``` and when `\test` is found it's expanded to `lower case`. You might use the “expansion“ feature described in point 1 and do ``` \uppercase\expandafter{\expanded{Why is the last part in \test}} ``` because the expansion of `\expandafter` would trigger `\expanded` that in turn would pass `\uppercase` the token list ``` Why is the last part in lower case ``` But you're better not trying it, unless your text is completely free of accents and several other *dangerous* tokens. The input ``` \documentclass{article} \newcommand{\naive}{na\"ive} \begin{document} \uppercase\expandafter{\expanded{This is \naive}} \end{document} ``` would stop processing with ``` \protect ! Missing } inserted. <inserted text> } l.7 ...case\expandafter{\expanded{This is \naive}} ``` To the contrary, ``` \documentclass{article} \newcommand{\naive}{na\"ive} \begin{document} \MakeUppercase{This is \naive} \end{document} ``` would work flawlessly. Another example showing why `\MakeUppercase` is to be used: ``` \documentclass{article} \usepackage[turkish]{babel} \begin{document} \MakeUppercase{Bu türkçe bir cümle}% This is a sentence in Turkish \end{document} ``` produces the correct glyph when uppercasing “i”, according to Turkish orthography:
8
https://tex.stackexchange.com/users/4427
692965
321,483
https://tex.stackexchange.com/questions/264082
4
Suppose I have the following latex code which draws a matrix within a matrix as follows where the cell (1,2) of the outer matrix is a vector that defines the column labels and the cell (2,1) of the outer matrix is a vector that defines the row labels and the cell (2,2) contains the matrix: ``` \begin{matrix} & \begin{matrix} \cdots & \rho_{ij} & \cdots & \rho_{ik} & \cdots & \gamma_i & \cdots & \gamma_j & \cdots & \lambda \end{matrix}\\ \begin{matrix} \cdots \\ \rho_{ij}\\ \cdots \\ \rho_{ik}\\ \cdots \\ \gamma_i \\ \cdots \\ \lambda \\ \end{matrix} & \begin{bmatrix} \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \cdots & 1 & \cdots & 0 & \cdots & b_j \mu_j & \cdots & b_i \mu_i & \cdots & 0 \\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \cdots & 0 & \cdots & 1 & \cdots & b_j \mu_j & \cdots & 0 & \cdots & 0 \\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \cdots & b_j \mu_j & \cdots & b_k \mu_k & \cdots & 0 & \cdots & 0 & \cdots & -\mu_i\\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \cdots & 0 & \cdots & 0 & \cdots & -\mu_i & \cdots & -\mu_j & \cdots & 0 \end{bmatrix} \end{matrix} ``` The problem I have at hand is that the row labels (in cell (2,1)) and the column labels (in cell(1,2)) do not necessarily align with the matrix (in cell (2,2)). How can I align them?
https://tex.stackexchange.com/users/85203
aligning a matrix with its label
false
With `{bNiceMatrix}` of `nicematrix`. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \[ \begin{bNiceMatrix}[first-col,first-row] & \cdots & \rho_{ij} & \cdots & \rho_{ik} & \cdots & \gamma_i & \cdots & \gamma_j & \cdots & \lambda \\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \rho_{ij}& \cdots & 1 & \cdots & 0 & \cdots & b_j \mu_j & \cdots & b_i \mu_i & \cdots & 0 \\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \rho_{ik} & \cdots & 0 & \cdots & 1 & \cdots & b_j \mu_j & \cdots & 0 & \cdots & 0 \\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \gamma_i & \cdots & b_j \mu_j & \cdots & b_k \mu_k & \cdots & 0 & \cdots & 0 & \cdots & -\mu_i\\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \lambda & \cdots & 0 & \cdots & 0 & \cdots & -\mu_i & \cdots & -\mu_j & \cdots & 0 \end{bNiceMatrix} \] \end{document} ``` If you want the first column (outside the matrix) centered, you have to change slightly the code: ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \[ \begin{NiceArray}[first-row]{c[*{10}{c}]} & \cdots & \rho_{ij} & \cdots & \rho_{ik} & \cdots & \gamma_i & \cdots & \gamma_j & \cdots & \lambda \\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \rho_{ij}& \cdots & 1 & \cdots & 0 & \cdots & b_j \mu_j & \cdots & b_i \mu_i & \cdots & 0 \\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \rho_{ik} & \cdots & 0 & \cdots & 1 & \cdots & b_j \mu_j & \cdots & 0 & \cdots & 0 \\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \gamma_i & \cdots & b_j \mu_j & \cdots & b_k \mu_k & \cdots & 0 & \cdots & 0 & \cdots & -\mu_i\\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots\\ \lambda & \cdots & 0 & \cdots & 0 & \cdots & -\mu_i & \cdots & -\mu_j & \cdots & 0 \end{NiceArray} \] \end{document} ```
1
https://tex.stackexchange.com/users/163000
692967
321,484
https://tex.stackexchange.com/questions/692962
1
My goal is to include lengthy example code that exceeds a single page, and I would like to set a background color for this code. The native verbatim environment allows content to span multiple pages, but it doesn't support background color, so I'm looking for alternative approaches. I've explored some existing solutions on various forums, but none of them seem to meet my requirements: 1. The method mentioned [here](https://tex.stackexchange.com/a/141128/302017) involves using a box, which prevents the content from breaking across pages. 2. The solution in [this post](https://tex.stackexchange.com/a/53951/302017) does allow content to break across pages, but it introduces faint white lines between lines of code, affecting readability. 3. This [post](https://tex.stackexchange.com/a/15942/302017) also tried to solve the problem, but there is uncomfortable lines between snippet as well.([This post](https://tex.stackexchange.com/q/62202/302017) asked a similar question around 11 years ago but still no decent solution through its answers) 4. [Change the background color of native verbatim](https://tex.stackexchange.com/a/9036/302017) would not work either 5. Other solutions, including utilizing mdframed to break a box across pages, still fail to fully address the issue. Could you please advise me on how to proceed? --- For example, implementing fancyvrb and box would be perfect with content less than 1 page, but how to make it better with longer code like below ? ``` \documentclass{article} \usepackage{fancyvrb,newverbs,xcolor} \definecolor{cverbbg}{gray}{0.93} \newenvironment{lcverbatim} {\SaveVerbatim{cverb}} {\endSaveVerbatim \flushleft\fboxrule=0pt\fboxsep=.5em \colorbox{cverbbg}{% \makebox[\dimexpr\linewidth-2\fboxsep][l]{\BUseVerbatim{cverb}}% } \endflushleft } \begin{document} \begin{lcverbatim} // sensor_data.json { "time": "2023-05-12T00:47:00.496Z", "f1": "xxx1", "ws1": "WS1", "m1": "M1", "e1": "ETP", "o1": "OTP", "temp": 1.12" } // ingest spec part { …, "dataSource": "sensor_data", "spec": { "dataSchema": { "timestampSpec": { "column": "time", "format": "iso" }, "dimensionsSpec": { "dimensions": [ "f1", "ws", "m1", "e1", "o1" ] }, "metricsSpec": [ { "name": "temp", "type": "doubleSum", "fieldName": "temp" } ] } } } // ingest spec part 2 { …, "dataSource": "sensor_data", "spec": { "dataSchema": { "timestampSpec": { "column": "time", "format": "iso" }, "dimensionsSpec": { "dimensions": [ "f1", "ws", "m1", "e1", "o1" ] }, "metricsSpec": [ { "name": "temp", "type": "doubleSum", "fieldName": "temp" } ] } } } \end{lcverbatim} \end{document} ```
https://tex.stackexchange.com/users/302017
How to Set Background Color for verbatim Formatted Content Longer Than a Single Page?
true
As already told: You can use `tcolorbox`, e.g.: ``` \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{breakable} \tcbuselibrary{minted}% needs enabling of shell-escape \begin{document} \begin{tcblisting}{colback=gray!50,breakable,listing only} // sensor_data.json { "time": "2023-05-12T00:47:00.496Z", "f1": "xxx1", "ws1": "WS1", "m1": "M1", "e1": "ETP", "o1": "OTP", "temp": 1.12" } // ingest spec part { …, "dataSource": "sensor_data", "spec": { "dataSchema": { "timestampSpec": { "column": "time", "format": "iso" }, "dimensionsSpec": { "dimensions": [ "f1", "ws", "m1", "e1", "o1" ] }, "metricsSpec": [ { "name": "temp", "type": "doubleSum", "fieldName": "temp" } ] } } } // ingest spec part 2 { …, "dataSource": "sensor_data", "spec": { "dataSchema": { "timestampSpec": { "column": "time", "format": "iso" }, "dimensionsSpec": { "dimensions": [ "f1", "ws", "m1", "e1", "o1" ] }, "metricsSpec": [ { "name": "temp", "type": "doubleSum", "fieldName": "temp" } ] } } } \end{tcblisting} \end{document} ``` or ``` \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{breakable} \tcbuselibrary{listings} \begin{document} \begin{tcblisting}{colback=gray!50,breakable,listing only,listing options={basicstyle=\ttfamily,literate={…}{{\dots}}1}} // sensor_data.json { "time": "2023-05-12T00:47:00.496Z", "f1": "xxx1", "ws1": "WS1", "m1": "M1", "e1": "ETP", "o1": "OTP", "temp": 1.12" } // ingest spec part { …, "dataSource": "sensor_data", "spec": { "dataSchema": { "timestampSpec": { "column": "time", "format": "iso" }, "dimensionsSpec": { "dimensions": [ "f1", "ws", "m1", "e1", "o1" ] }, "metricsSpec": [ { "name": "temp", "type": "doubleSum", "fieldName": "temp" } ] } } } // ingest spec part 2 { …, "dataSource": "sensor_data", "spec": { "dataSchema": { "timestampSpec": { "column": "time", "format": "iso" }, "dimensionsSpec": { "dimensions": [ "f1", "ws", "m1", "e1", "o1" ] }, "metricsSpec": [ { "name": "temp", "type": "doubleSum", "fieldName": "temp" } ] } } } \end{tcblisting} \end{document} ``` See the manuals of `tcolorbox` and `listings` for more information.
0
https://tex.stackexchange.com/users/277964
692973
321,488
https://tex.stackexchange.com/questions/692975
1
I use pandoc and custom lua filters to simplify the design of my beamer presentations. Here is an example of the pandoc Markdown I currently write: ``` # Frame title ::: incremental ## Block title - [This is the first item]{target="to-some-where" onslide="<1->"} - [This is the second item]{target="to-some-where-else" onslide="<2->"} ::: ``` and the LaTeX I currently generate: ``` \begin{frame}{Frame title} \begin{block}{Block title} \begin{itemize}[<+->] \item \hyperlink<1->{to-some-where}{This is the first item} \item \hyperlink<2->{to-some-where-else}{This is the second item} \end{itemize} \end{block} \end{frame} ``` So far, so good, but instead of specifying the overlay (`onslide="<1->"`), which is tedious, error prone, and makes changes more difficult than what they should be, I'd like to refer to "*the current overlay number*". My pandoc Markdown would become: ``` # Frame title ::: incremental ## Block title - [This is the first item]{target="to-some-where"} - [This is the second item]{target="to-some-where-else"} ::: ``` I tried to add the following to my beamer template for pandoc: ``` \makeatletter \newcommand{\overlaynumber}{\beamer@overlaynumber} \makeatother ``` and to generate: ``` \item \hyperlink<\overlaynumber{}->{to-some-where-else}{This is the second item} ``` But the hyperlink is active on all slides, including those where the text is not yet visible. Of course, I could use my lua filters to somehow count the list items and generate a static overlay specification but this has many drawbacks (I sometimes want to add hyperlinks to something else than a list item, some lists are passed the `noincremental` attribute, I can have several lists in the same slide, plus other elements...) Is there a way to obtain this with pure TeX/LaTeX/beamer commands?
https://tex.stackexchange.com/users/108255
How to refer to current overlay number in hyperlink overlay specification?
true
You can use relative overlays: ``` \documentclass{beamer} \begin{document} \begin{frame}{Frame title} \begin{block}{Block title} \begin{itemize}[<+->] \item \hyperlink<.->{to-some-where}{This is the first item} \item \hyperlink<.->{to-some-where-else}{This is the second item} \end{itemize} \end{block} \end{frame} \end{document} ```
2
https://tex.stackexchange.com/users/36296
692976
321,489
https://tex.stackexchange.com/questions/692982
1
Consider this minimum working example. For example, some text is supposed to link to chapter 2.2, but links to chapter 1.2 instead. Here is the code: ``` \usepackage[top=4cm,bottom=4cm,left=3cm,right=3cm,asymmetric]{geometry} \usepackage{graphicx} \usepackage[utf8]{inputenc} \usepackage{multirow} \usepackage{longtable} \usepackage{array} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{float} \usepackage{soul} \usepackage[dvipsnames, table]{xcolor} \usepackage{tocloft} \usepackage{afterpage} \newcommand\blankpage{% \null \thispagestyle{empty}% \addtocounter{page}{-1}% \newpage} \renewcommand\thefootnote{\textcolor{Cerulean}{\arabic{footnote}}} \renewcommand\thefigure{\arabic{figure}} \renewcommand\thetable{\arabic{table}} \renewcommand\thechapter{\arabic{part}.\arabic{chapter}} \setlength{\parindent}{0pt} \usepackage{hyperref} \hypersetup{ colorlinks=true, linkcolor=black, filecolor=purple, urlcolor=Cerulean, pdfpagemode=FullScreen, } \usepackage[ backend=biber, style=alphabetic, sorting=ynt ]{biblatex} \usepackage{fancyhdr} \usepackage{subcaption} \pagestyle{fancy} \fancyhf{} \fancyhead[RE]{e} \fancyhead[LO]{f} \fancyhead[LE, RO]{\thepage} \usepackage[stable]{footmisc} \begin{document} \pagenumbering{arabic} \part{A} \newpage \setcounter{chapter}{0} \chapter{yes} \label{sec:1.1} \hyperref[sec:2.1]{\color{Cerulean}\underline{This is meant to link to chapter 2.1, and it just stays in place? (possibly links to chapter 1.1)}}\\ \hyperref[sec:2.2]{\color{Cerulean}\underline{This is meant to link to chapter 2.2, but links to chapter 1.2}} \chapter{asdfuhoaisdhfoih} \label{sec:1.2} \part{E} \setcounter{chapter}{0} \chapter{no} \label{sec:2.1} \chapter{maybe} \label{sec:2.2} \end{document} ``` Can anyone redirect the links to the correct places? Thank you!
https://tex.stackexchange.com/users/267647
Hyperref Link Not Working in Book Environment When Two Chapters Have the Same Number
true
Don't reset the counter manually inside `\part`, use `\counterwithin`, then hyperref can take care to setup its internal data: ``` \documentclass{book} \usepackage{hyperref} \counterwithin{chapter}{part} \begin{document} \tableofcontents \part{A} \chapter{chapter} \part{B} \chapter{chapter} \end{document} ```
2
https://tex.stackexchange.com/users/2388
692983
321,492
https://tex.stackexchange.com/questions/692937
2
I made the following table with `tabularx` and expected that in the second row, all cells have the same width, since they all use `multicolumn{2}`. But they don't. Instead the third and sixth cell width is double that of the others. Similar problems with rows 3 to 6. The first and fourth cell on each row is only half as wide as it should be, considering that it uses `multicolumn{4}`, while the other cells have double the expected width. Am I doing sth. wrong or does `tabularx` behave different than I think it does? I thought that the width of an `X` column will be relative to the nr of columns defined with `\multicolumn{n}`. I. e. if the whole table has 12 columns and I specify `\multicolumn{2}` that column width will be a sixth of the whole table. But apparently that isn't the case, or rather it only works for the first row... ``` \documentclass{article} \usepackage{tabularx} \usepackage{booktabs} \begin{document} \begin{table}[h] \begin{tabularx}{\textwidth}{*{12}{X|}} \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{|X|}{6 cols} \\ \hline \multicolumn{2}{|X|}{2 cols} & \multicolumn{2}{X|}{2 cols} & \multicolumn{2}{X|}{2 cols} & \multicolumn{2}{|X|}{2 cols} & \multicolumn{2}{X|}{2 cols} & \multicolumn{2}{X|}{2 cols}\\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \multicolumn{4}{|X|}{4 cols} & & & \multicolumn{4}{|X|}{4 cols} & & \\ \hline \end{tabularx} \end{table} \end{document} ```
https://tex.stackexchange.com/users/302058
tabularx and multicolumn: column width is not correct
false
I decided to answer my own question, since I couldn't fix the table using the provided answers. Thanks anyway @mico and @david-carlisle. **TL;DR:** I gave up explaining LaTeX how to determine the correct column width and did it manually. The following code results in the table I want: ``` \begin{tabular}{*{12}{l}} \hline \multicolumn{6}{|p{\dimexpr(\textwidth-3\arrayrulewidth-4\tabcolsep)/2\relax}|}{ 6 col } & \multicolumn{6}{p{\dimexpr(\textwidth-3\arrayrulewidth-4\tabcolsep)/2\relax}|}{ 6col } \\ \hline \multicolumn{2}{|p{\dimexpr(\textwidth-7\arrayrulewidth-12\tabcolsep)/6\relax}|}{ 2 col } & \multicolumn{2}{p{\dimexpr(\textwidth-7\arrayrulewidth-12\tabcolsep)/6\relax}|}{ 2 col } & \multicolumn{2}{p{\dimexpr(\textwidth-7\arrayrulewidth-12\tabcolsep)/6\relax}|}{ 2 col } & \multicolumn{2}{p{\dimexpr(\textwidth-7\arrayrulewidth-12\tabcolsep)/6\relax}|}{ 2 col } & \multicolumn{2}{p{\dimexpr(\textwidth-7\arrayrulewidth-12\tabcolsep)/6\relax}|}{ 2 col } & \multicolumn{2}{p{\dimexpr(\textwidth-7\arrayrulewidth-12\tabcolsep)/6\relax}|}{ 2 col } \\ \hline \multicolumn{4}{|p{\dimexpr(\textwidth-7\arrayrulewidth-12\tabcolsep)/3\relax}|}{ 4 col } & \multicolumn{1}{p{\dimexpr(\textwidth-13\arrayrulewidth-24\tabcolsep)/12\relax}|}{ 1 col } & \multicolumn{1}{p{\dimexpr(\textwidth-13\arrayrulewidth-24\tabcolsep)/12\relax}|}{ 1 col }& \multicolumn{4}{p{\dimexpr(\textwidth-7\arrayrulewidth-12\tabcolsep)/3\relax}|}{ 4 col } & \multicolumn{1}{p{\dimexpr(\textwidth-7\arrayrulewidth-24\tabcolsep)/12\relax}|}{ 1 col } & \multicolumn{1}{p{\dimexpr(\textwidth-13\arrayrulewidth-24\tabcolsep)/12\relax}|}{ 1 col } \\ \hline \end{tabular} ``` **Long version:** I tried to fix my table using the examples from @Mico, but I failed. E. g. the following code: ``` \documentclass{article} \usepackage{tabularx,calc} \begin{document} \newlength\mylen \setlength\mylen{\textwidth/12-2\tabcolsep-1.08333\arrayrulewidth} \begin{tabularx}{\textwidth}{| *{2}{*{4}{X|} *{2}{wl{\mylen}|}} } \hline \multicolumn{6}{|X|}{6 cols} & \multicolumn{6}{ X|}{6 cols} \\ \hline \multicolumn{4}{|X|}{4 cols} & a & b & \multicolumn{4}{ X|}{4 cols} & c & d \\ \hline \end{tabularx} \end{document} ``` rendered a wrong table locally and also on <https://www.papeeria.com>. What I didn't realize is that the default LaTeX version on papeeria.com is too old (from 2015!) to correctly compile that code. And locally, the code renders correctly when using a fresh document, but not when pasting it into my existing one. I did not debug this, as I already had my own working solution above when I realised that. **UPDATE**: I found a more elegant (and much shorter) solution using `tabularray`: ``` \documentclass{article} \usepackage{tabularray} \begin{document} \begin{table} \begin{tblr}{ width=\textwidth, colspec={|X|X|X|X|X|X|X|X|X|X|X|X|}, hline{1-Z} = {1-Z}{solid}, vline{1-Z} = {1-Z}{solid}, cells = {l}, cell{1}{1,7} = {c=6}{l}, cell{2}{1,3,5,7,9,11} = {c=2}{l}, cell{3-6}{1,7} = {c=4}{l}, } 6 cols & & & & & & 6 cols & & & & & \\ 2 cols & & 2 cols & & 2 cols & & 2 cols & & 2 cols & & 2cols & \\ 4 cols & & & & 1 col & 1 col & 4 cols & & & & 1col & 1col \\ \end{tblr} \end{table} \end{document} ``` This also results the table that I wanted.
0
https://tex.stackexchange.com/users/302058
692984
321,493
https://tex.stackexchange.com/questions/692936
0
I have got several Tikz pictures whose compilation takes up much time. More generally, I am wondering whether there is a switch that can make a specific environment `foo` disappear as if the code would not exist, similar in effect to the `comment` environment. Basically, given ``` \begin{foo} Whatever happens here \end{foo} ``` I want a switch that makes this environment completely ineffective as if it weren't in the Latex code.
https://tex.stackexchange.com/users/5251
How to make a specific environment disappear?
false
You can redefine and introduce a switch if you already have plenty of code instances of the same environment. So, expanding on Jasper Habicht's comment, you could do the following: * create a switch * redefine the environment in question * in the redefined environment, enclose a regular environment within an if clause (based on the switch), so it depends on that switch. LaTeX already has a built-in mechanic to create custom *if*'s. Have a look at [this post](https://tex.stackexchange.com/questions/5894/latex-conditional-expression). Since you have mentioned `tikz` in your question, I made an example upon `tikzpicture`. Here is how to put everything together. Every time you use `\tikzpicsfalse` you are going to turn off `tikz`, whereas `\tikzpicstrue` is going to bring it back. ``` \documentclass{article} \usepackage{tikz} \newif\iftikzpics \tikzpicsfalse % \tikzpicstrue to turn pictures on \NewEnvironmentCopy{oldtikzpicture}{tikzpicture} \RenewDocumentEnvironment{tikzpicture}{O{}+b}{% \iftikzpics \begin{oldtikzpicture}[#1] #2 \end{oldtikzpicture}\fi}{} \begin{document} X \begin{tikzpicture} \node {A}; \end{tikzpicture} \begin{tikzpicture}[ scale=2, baseline, every node/.style = {draw}, ] \node [transform shape] {B}; \end{tikzpicture} \end{document} ```
1
https://tex.stackexchange.com/users/31283
692986
321,495
https://tex.stackexchange.com/questions/692988
1
``` \documentclass[9pt]{beamer} \usepackage{xcolor} \begin{document} \frame { \begin{equation*}\text{\colorbox{white!90!black}{ $ \textcolor{red!70!black}{\min \quad f(x),} $}} \end{equation*} \textcolor{red!70!black}{ \begin{align*} \min \quad&f(x) \\ s.t.\quad &c_i(x)=0, \end{align*}} } \end{document} ```
https://tex.stackexchange.com/users/302077
I have used colorbox to one equation, how to use colorbox to two in align?
false
Something like that : The code : ``` \documentclass[9pt]{beamer} \usepackage{xcolor} \begin{document} \begin{frame} \begin{align*} \text{\colorbox{white!90!black}{$\textcolor{red!70!black}{\min \quad f(x),}$}} \quad \min \quad& f(x) \\ \textcolor{red!70!black}{s.t.} \quad & c_i(x) = 0, \end{align*} \end{frame} \end{document} ```
0
https://tex.stackexchange.com/users/209206
692989
321,496
https://tex.stackexchange.com/questions/692988
1
``` \documentclass[9pt]{beamer} \usepackage{xcolor} \begin{document} \frame { \begin{equation*}\text{\colorbox{white!90!black}{ $ \textcolor{red!70!black}{\min \quad f(x),} $}} \end{equation*} \textcolor{red!70!black}{ \begin{align*} \min \quad&f(x) \\ s.t.\quad &c_i(x)=0, \end{align*}} } \end{document} ```
https://tex.stackexchange.com/users/302077
I have used colorbox to one equation, how to use colorbox to two in align?
false
You could either use the `empheq` package: ``` \documentclass[9pt]{beamer} \usepackage{empheq} \newcommand*\mygraybox[1]{% \colorbox{white!90!black}{\hspace{1em}#1\hspace{1em}}} \begin{document} \begin{frame} {\color{red!70!black} \begin{empheq}[box=\mygraybox]{equation*} \min \quad f(x), \end{empheq}} {\color{red!70!black} \begin{empheq}[box=\mygraybox]{align*} \min \quad&f(x) \\ s.t.\quad &c_i(x)=0, \end{empheq}} \end{frame} \end{document} ``` Or you could combine it with the `tcolorbox` package: ``` \documentclass[9pt]{beamer} \usepackage[most]{tcolorbox} \usepackage{empheq} \tcbset{highlight math style={enhanced,frame hidden,colback=white!90!black,sharp corners}} \begin{document} \begin{frame} \begin{empheq}[box=\tcbhighmath]{equation*} \color{red!70!black} \min \quad f(x), \end{empheq} {\color{red!70!black} \begin{empheq}[box=\tcbhighmath]{align*} \min \quad&f(x) \\ s.t.\quad &c_i(x)=0, \end{empheq}} \end{frame} \end{document} ```
1
https://tex.stackexchange.com/users/36296
692990
321,497
https://tex.stackexchange.com/questions/692988
1
``` \documentclass[9pt]{beamer} \usepackage{xcolor} \begin{document} \frame { \begin{equation*}\text{\colorbox{white!90!black}{ $ \textcolor{red!70!black}{\min \quad f(x),} $}} \end{equation*} \textcolor{red!70!black}{ \begin{align*} \min \quad&f(x) \\ s.t.\quad &c_i(x)=0, \end{align*}} } \end{document} ```
https://tex.stackexchange.com/users/302077
I have used colorbox to one equation, how to use colorbox to two in align?
true
I don't think you need to load `xcolor`. It's already included in the `beamer` class. In case you actually want to append some additional options let's say to `xcolor`, use the options of the `beamer`, e.g. ``` \documentclass[...,svgnames]{beamer} ``` which is going to load extra colour setting for the `xcolor`; see the section 4.3 of the [manual](https://www.ctan.org/pkg/amsmath) to see the extra colours. EDIT. As suggested in comments, there is a more recommended way to pass options to `xcolor` package ``` \documentclass[xcolor={svgnames}]{beamer} ``` Another point is when we specify colours, the `white` is always appended as the last one. So the expression `white!90!black` is equivalent to `black!10` because this in turn is equivalent to `black!10!white`. As to your problem, you could just wrap a centred inline equation with an inner variant of a regular math environment, e.g. `align` -> `aligned` (see [documentation](https://www.ctan.org/pkg/amsmath) for more info). Here's one example. BTW, `\fboxsep` controls margins in boxes. ``` \documentclass[xcolor={svgnames}]{beamer} \colorlet{mbg}{black!10} \colorlet{mfg}{red!70!black} \setlength\fboxsep{5pt} \begin{document} \frame{ \begin{center} \colorbox{mbg}{\color{mfg}$\min \quad f(x)$} \end{center} \begin{center} \colorbox{mbg}{\color{mfg}\( \begin{aligned} \min \quad & f(x) \\ s.t. \quad & c_i(x)=0 \end{aligned} \)} \end{center} } \end{document} ```
1
https://tex.stackexchange.com/users/31283
692992
321,499
https://tex.stackexchange.com/questions/692950
0
I am currently finishing my thesis and my professor has asked me to split my bibliography into two sections, namely scientific sources and online/news sources. I have multiple .bib files, just because that made writing and citing easier and more clear for me. All sources are correctly labelled with either @article or @misc and look like this: ``` @article{laucuka_communicative_2018, title = {Communicative {Functions} of {Hashtags}}, volume = {15}, doi = {10.2478/jec-2018-0006}, journal = {Economics and Culture}, author = {Laucuka, Aleksandra}, month = jun, year = {2018}, pages = {56--62}, ``` The final result should look something like this (I do not want actual bullet points, just did not find another way to display the sources below each other here): **Bibliography** *=== Scientific Sources ===* * Source 1 * Source 2 * ... *=== Online/News Sources ===* * Source 1 * Source 2 * ... My "setup" currently looks sth like this: ``` \usepackage{natbib} \usepackage[hyphens]{url} \bibliographystyle{alpha} \bibliography{MyReferences, References_EventDescription, References_DyadsRethoricalPart, References_ResearchMethod, References_TwitterDataSource, References_EmotionalExpressionCrisis, References_DiscussionLimitations} ``` Mind you, I have all other important parts in there as well like start and end document, this is just everything I have in regards to bibliography. Also, within the multiple .bib files I have, the articles and online sources are mixed, so there might be multiple articles and online sources within one .bib file, rather than one file just containing one type of source. If it is necessary to sort them, I could do that. Not sure if what I am trying to do is achievable with natbib? Preferably, I would not like to switch since this will probably mess up my formatting and I'll have to go over citations again which will take a ton of time, but if there is no other way I am glad to switch to other citation packages of course.
https://tex.stackexchange.com/users/302060
Splitting my bibliography into two parts with natbib
false
With `biblatex` you could simply do `\printbibliography[type=article]` to get all cited articles. With `multibib` you would have to adapt the citations and use e.g. `\citeonline` for the online resources. And with `bibtopic` you would have to reorder the bib-files. Imho it would be worth to try to replace (in a test copy) natbib in the preamble by ``` \usepackage[style=alphabetic,natbib]{biblatex} \addbibresource{MyReferences.bib} \addbibresource{References_EventDescription} % more bib ressources ``` and the bibliography commands in the document by ``` \printbibliography[type=article] \printbibliography[type=misc] ``` Then adapt your editor so that is uses `biber` instead of `bibtex` (or call `biber` on the command line) [Biblatex with Biber: Configuring my editor to avoid undefined citations](https://tex.stackexchange.com/questions/154751/biblatex-with-biber-configuring-my-editor-to-avoid-undefined-citations) and look if something explodes.
1
https://tex.stackexchange.com/users/2388
692994
321,500
https://tex.stackexchange.com/questions/692993
5
I have problems with macros containing ifnum. After using the command \noexpand one macro works fine, nesting two of them does not compile but causes the error message --- Extra \fi. \fi --- as in the following code. How can I get my nested macros working? ``` \documentclass{article} \newcommand{\IFCONDA}{\noexpand{\ifnum1>0}} \newcommand{\IFCONDB}{\noexpand{\ifnum1=0}} \begin{document} \IFCONDA hello1 \else % \IFCONDA world1 % next three lines cause trouble (nested ifnum) \IFCONDB hello2 \fi % \IFCONDB \fi % \IFCONDA \end{document} ```
https://tex.stackexchange.com/users/146219
Trouble with nested macros containing ifnum
false
The `\noexpand` token do nothing at all, because `{` is not expandable. Thus your code is the same as without it. Surrounding the test with braces is not good programming, by the way. So I'll do as if `\noexpand` is not there. You get ``` {\ifnum1>0} hello1 \else world1 \par \IFCONDB hello2 \fi \fi ``` (the line breaks are only for clarity). The test returns true, so you remain with ``` } hello1 \else world1 \par \IFCONDB hello2 \fi \fi ``` The brace balances the initial one and is removed. Now TeX sends “hello1” and a space down for typesetting and remains with ``` \else world1 \par \IFCONDB hello2 \fi \fi ``` Since the test was true, TeX discards everything from `\else` to the matching `\fi` ***without expansion***, so `\IFCONDB` is discarded and the matching `\fi` is the first one. You remain with the trailing `\fi` which matches nothing, as the test `\ifnum1=0` is never seen. It would be different if the first test was `\ifnum1<0`, because in this case `\IFCONDB` would be expanded during processing of the “false text”, but you'd get ``` ### simple group (level 2) entered at line 14 ({) ### simple group (level 1) entered at line 8 ({) ``` because of the unmatched braces. It isn't possible to say much more, because it's not clear what's your aim. It is possible to use a conditional like style with the following changes: ``` \documentclass{article} \newcommand{\CONDA}{TT\fi\ifnum1>0 } \newcommand{\CONDB}{TT\fi\ifnum1=0 } \begin{document} \if\CONDA hello1 \else % \IFCONDA world1 % next three lines cause trouble (nested ifnum) \if\CONDB hello2 \fi \fi % \IFCONDA \end{document} ``` It's worth studying how it works…
7
https://tex.stackexchange.com/users/4427
692998
321,503
https://tex.stackexchange.com/questions/693001
2
When using the `proof` environment provided by the `amsthm` package, you get an empty square box at the end of your proof as the default QED symbol. Question: Is there a way to make it automatically put "QED" for some proofs but not others? Essentially, can one create a second proof environment which puts a different symbol at the end?
https://tex.stackexchange.com/users/302088
QED in LaTeX Proof Environment
true
Define a new environment based on `proof` environment and modify the `\qedsymbol` locally. ``` \documentclass{article} \usepackage{amsthm} \newenvironment{proofa}{% \renewcommand{\qedsymbol}{QED}\proof}{\endproof} \begin{document} \begin{proof} This is a proof with the original square symbol. \end{proof} \begin{proofa} This is another proof with ``QED'' symbol. \end{proofa} \end{document} ```
6
https://tex.stackexchange.com/users/241621
693004
321,504
https://tex.stackexchange.com/questions/692993
5
I have problems with macros containing ifnum. After using the command \noexpand one macro works fine, nesting two of them does not compile but causes the error message --- Extra \fi. \fi --- as in the following code. How can I get my nested macros working? ``` \documentclass{article} \newcommand{\IFCONDA}{\noexpand{\ifnum1>0}} \newcommand{\IFCONDB}{\noexpand{\ifnum1=0}} \begin{document} \IFCONDA hello1 \else % \IFCONDA world1 % next three lines cause trouble (nested ifnum) \IFCONDB hello2 \fi % \IFCONDB \fi % \IFCONDA \end{document} ```
https://tex.stackexchange.com/users/146219
Trouble with nested macros containing ifnum
false
You can not hide primitive `\if` tokens in macros (unless you take care to hide the matching`\else` and `\fi`), it is much simpler to use a syntax that takes two `{}` groups for true and false, such as `\ifthenelse` : ``` \documentclass{article} \usepackage{ifthen} \newcommand{\IFCONDA}{\ifthenelse{1>0}} \newcommand{\IFCONDB}{\ifthenelse{1=0}} \begin{document} \IFCONDA {hello1} {% world1 % next three lines cause trouble (nested ifnum) \IFCONDB {hello2} {}% }% \IFCONDA \end{document} ```
4
https://tex.stackexchange.com/users/1090
693006
321,505
https://tex.stackexchange.com/questions/693008
1
I have a long table which I need to include in my thesis appendix. However, I'm encountering an issue where, within certain rows, I have a list of genes that span over an entire page. Instead of these gene lists continuing onto a new page, they're being truncated. This problem persists across multiple rows in the table. How can I ensure that the table content flows seamlessly onto a new page instead of being cut off? I'm currently employing the `longtable` package, but I'm open to using alternative packages if they offer a better solution. (There are work arounds, but if someone finds a way to have the table automatically split across multiple pages, like it does in MS Word, then I will tick that answer) Here is the first two rows of my table: ``` \documentclass{article} \usepackage{longtable} \begin{document} \begin{longtable}{p{0.7in} >{\itshape}p{5in}} \caption{caption} \label{label} % Col names \hline \textbf{Group} & \textbf{Genes} \hline % contents of table: Group 1 & ANKRD54, APC2, ARFGEF2, C3orf20, C6orf223, COQ9, DLEU1, DNLZ, DYRK3, ECI1, ERMARD, FAHD1, FBL, FBXO22, FBXO5, GATAD1, GPR143, GRAMD4, HCFC1, HEATR3, HSPA4L, HTR7P1, HYAL2, IRF5, KIF2C, LOC100996724, LOC102723324, LOC105376933, LOC105379437, LOC107984436, LOC107985246, LOC112268051, LOC729609, LPAR1, MAK16, MBNL1-AS1, MCM6, MFSD13B, MISP3, MPHOSPH10, MSANTD4, MYC, NHEJ1, NUP62, PIGM, PLA2G6, PNO1, PTTG2, RBM4B, SEMA7A, SLC52A2, SMAD7, SNORD36A, STT3A-AS1, TCERG1, THTPA, TIGD4, TIPIN, TMEM169, TNFAIP1, UGGT2, USP24, USP32P2, WDR77, ZDHHC4, ZNF142, ZNF320, ZNF584, ZNF815P\\ Group 2 & ABHD13, ABHD18, ABHD5, ABRACL, ABRAXAS1, ACBD3, ACSL4, ADD1, ADI1, AGO4, AHCTF1, AHCTF1P1, AIF1, AMFR, ANAPC13, ANKIB1, ANKRD42, ANP32B, ANXA11, ANXA3, AP3B1, AP3S1, APOL6, ARHGAP45, ARHGEF11, ARL3, ARL6IP4, ARPC4, ARPC5, ASH2L, ATAD1, ATF4, ATG4B, ATOX1, ATP5F1E, ATP5IF1, ATP5MC2, ATP5ME, ATP5MF, ATP5MG, ATP5MPL, ATP5PB, ATP7A, ATRX, BAG1, BBIP1, BICD2, BICRAL, BLOC1S2, BLZF1, BRCA1, BTBD10, BUD31, C11orf54, C19orf53, C2orf76, C4orf3, C4orf48, C5AR2, C6orf89, CAB39, CAB39L, CABP7, CALM1, CALM2, CALM3, CAMTA1, CARS2, CASC4, CASTOR2, CBFA2T3, CBFB, CBWD1, CBX1, CCDC13, CCDC146, CCDC170, CCDC71L, CCDC9, CD37, CD59, CDC40, CDK11A, CDKN2D, CEMIP2, CEP19, CEP57, CEP63, CFAP45, CFDP1, CHCHD7, CHD8, CHFR, CIAO1, CIAO2A, CINP, CIR1, CLEC12B, CLEC2B, CLMP, CLN8, CMTM2, CNBP, CNOT7, COMMD2, COMMD6, COP1, COPS5, COX14, COX17, COX5A, COX5B, COX6A1, COX6B1, COX8A, CPEB2, CPSF7, CREB5, CSNK1G3, CSTA, CTCF, CTDNEP1, CUL4B, CUX1, CXorf38, CYB561D2, CYB5B, CYB5R1, CYSLTR1, CYTOR, DAD1, DAPK1, DAPP1, DBI, DCAF7, DEF6, DEK, DENND10, DENND10P1, DIP2B, DNAJA2, DNAJB14, DNAJB6, DPH3, DPP8, DRC1, DTX3L, DUSP22, DYNLRB1, DYNLT1, EAF2, EEF1B2, EEPD1, EGLN1, EIF2S2, EIF4EBP1, EIF4EBP2, ELMOD2, ELOB, EMBP1, EMSY, ENY2, ERF, ESD, EVI2A, EVI2B, EXOSC3, FAM133B, FAM136A, FAM160B1, FAM200B, FAM204A, FAM49A, FAM76B, FAR1, FAS, FAU, FBXL3, FBXL4, FCGR1B, FIG4, FIS1, FLI1, FOCAD, FOSB, FOXJ2, FOXJ3, FRAT2, FUT4, GABARAP, GALM, GDAP2, GIMAP4, GLRX, GLRX3, GLYR1, GMFG, GNAQ, GNG5, GOLT1B, GPN3, GPR141, GPR27, GPS2, GPSM3, GRIPAP1, GRK3, GSN, GSR, GSTK1, GSTP1, H2AC6, H2AZ1, H2BC4, H3-3A, H4C8, HADHB, HLA-B, HLX, HMCES, HMGB1, HMGN2, HMGN4, HNRNPA1, HNRNPDL, HRH2, HSBP1, HSP90B2P, HSPB11, HSPD1, HTATIP2, IFI6, IFIT5, IFITM2, IGFLR1, IGSF6, IL17RA, INTS8, IRF1, ISCU, ITM2B, ITPR2, JPT1, KCTD12, KIAA1143, KIAA2013, KIDINS220, KIF2A, KPNA4, KPNB1, LAGE3, LAMTOR2, LAMTOR4, LAMTOR5, LARP7, LASP1, LEPROT, LEPROTL1, LIN7C, LINC00623, LINC00910, LINC01138, LINC01506, LINC02067, LINC02158, LIX1L, LLPH, LOC100506023, LOC100507507, LOC101928595, LOC102723373, LOC102723878, LOC105372421, LOC105372499, LOC105373098, LOC105373582, LOC105374102, LOC105374121, LOC105374985, LOC105375713, LOC105376244, LOC105376287, LOC105376512, LOC105376786, LOC105377067, LOC105378819, LOC107984747, LOC107986158, LOC107987225, LOC112268267, LOC643072, LPIN2, LSM3, LST1, LXN, LY96, LYPLA1, LYRM1, LYST, LYZ, MACROH2A1, MALSU1, MAN1A2, MAP2K4, MAPK1, MBD2, MCTS1, MED10, MED11, MED13L, MED25, METTL14, MICOS10, MIR142, MIR22HG, MMP25, MPC2, MRPL50, MRPL53, MRPS31, MRPS36, MS4A6A, MSRA, MTHFD2, MTMR1, MYLIP, NAA38, NACA4P, NAT9, NCF2, NDRG3, NDUFA1, NDUFA12, NDUFA2, NDUFA4, NDUFA5, NDUFA7, NDUFB1, NDUFB3, NDUFB6, NDUFV3, NEDD8, NEK7, NFRKB, NFYA, NLRC5, NMNAT1, NOP10, NOTCH1, NSD3, NSMCE1-DT, NTMT1, NUDT16, NUTF2, OARD1, OGFR, ORC4, ORMDL2, OSER1, OST4, OXR1, P2RY13, PABPC1, PAIP2, PARP14, PCMT1, PDCD4-AS1, PDPK1, PDPR, PELI2, PGLS, PGM2, PGM5, PHF21A, PHKB, PIGX, PIK3CD, PIN4, PLEKHA3, PLPBP, PNPT1, POLR2I, POLR2J, PPM1A, PPM1F, PPM1M, PPP2R5C, PQBP1, PRDX5, PRPF18, PRPF4B, PRR34-AS1, PRRG4, PSMA5, PSMA7, PSMB3, PSMB7, PSMB8, PSMD10, PSMD6, PSME1, PSME2, PSME4, PSTPIP1, PTBP2, PTENP1, PTOV1-AS2, PTPRN2, PXN, PYCARD, RAB33B, RAB5IF, RABAC1, RABGAP1, RABIF, RALBP1, RALY, RANBP3, RARA, RARS2, RASGRP2, RASSF3, RBM17, RBM26, RBP7, RCBTB2, RCOR1, RELCH, REM2, RFX1, RGS14, RHOT1, RNF114, RNF141, RNF145, RNF181, RNF20, RNF213, RNF38, RNF44, RNFT1, RNPEP, ROPN1L, RP2, RPA3, RPL13, RPL21, RPL23A, RPL24, RPL26, RPL27A, RPL29, RPL34, RPL35A, RPL36AL, RPL37, RPL38, RPL7A, RPL9, RPS11, RPS12, RPS15, RPS19, RPS19BP1, RPS24, RPS26, RPS27A, RPS3, RPS7, RPS9, RRP12, RSRP1, RTN4, RUFY2, S100A11, S100A12, S100A4, S100A6, S100A8, S100A9, S1PR4, SAP18, SAR1A, SBF2, SCAF8, SCARNA10, SCFD1, SCNM1, SDHB, SDHD, SEC11A, SEC22C, SEMA4A, SEMA4D, SENP5, SENP6, SERTAD3, SF3A1, SF3B5, SF3B6, SFPQ, SFSWAP, SGPL1, SH3GLB1, SIAH2, SLC25A5, SLC31A1, SLC35A1, SLC44A2, SLC45A4, SLC48A1, SLC8A1-AS1, SLCO3A1, SMARCA5, SMIM14, SMIM25, SMIM26, SMIM27, SMIM7, SNAPC5, SNF8, SNORA105A, SNORD141B, SNORD14D, SNORD14E, SNRK, SNRNP25, SNRNP27, SNRNP70, SNRPE, SNTB1, SNX2, SNX3, SP140, SP140L, SPCS1, SPIDR, SPTLC2, SREK1IP1, SRP14, SRSF9, SS18L2, ST3GAL6, STAG1, STAMBP, STAT2, STEAP4, STX3, STXBP5, SULT1B1, SUPT16H, SVBP, SWAP70, SYF2, TACC1, TAF10, TAF12, TARDBP, TBC1D1, TBCA, TBL1X, TFEB, TGFBR2, THAP1, THOC2, TIAL1, TIMM8B, TIPRL, TMA7, TMCO1, TMCO6, TMEM107, TMEM131L, TMEM144, TMEM14B, TMEM159, TMEM199, TMEM219, TMEM30A, TMEM50A, TMEM70, TMSB4X, TOPORS, TOR1AIP2, TPRG1L, TPST2, TRADD, TRAF3IP2-AS1, TRAPPC1, TRAPPC6B, TRDMT1, TRIOBP, TRMT10A, TRMT112, TSPAN2, TTC1, TTC17, TTC9C, TUBA1C, TUBGCP4, TUSC2, TXN, TXNDC17, TXNDC9, TXNIP, TXNL4B, TYROBP, U2AF1L5, UBA3, UBA52, UBC, UBE2D1, UBE2K, UBE2L3, UBE2R2, UBR3, UNC93B1, UPF2, UQCR10, UQCR11, UQCRC1, USP25, USP47, UTP6, VAMP3, VAMP4, VAMP5, VAPA, VNN2, VPS29, VPS36, VPS41, WBP4, WDR82, WDR83OS, WIPF1, WIPI1, XAF1, XPNPEP3, YIPF1, YPEL5, YY1, ZBTB18, ZBTB34, ZBTB8OS, ZCCHC9, ZDHHC17, ZFAS1, ZFP36L2, ZFP91, ZMAT2, ZMAT5, ZNF200, ZNF271P, ZNF284, ZNF516, ZNF641, ZNF700, ZNF770, ZNF776, ZNF90, ZNHIT1\\ \end{longtable} \end{document} ```
https://tex.stackexchange.com/users/284206
Managing Longtable with Single-Row Contents Exceeding One Page's Length and Being Truncated
false
Table cells can not be broken across pages. You want a list here, not a table: ``` \documentclass{article} \usepackage{longtable} \begin{document} \begin{description}\sloppy \item [Group 1]ANKRD54, APC2, ARFGEF2, C3orf20, C6orf223, COQ9, DLEU1, DNLZ, DYRK3, ECI1, ERMARD, FAHD1, FBL, FBXO22, FBXO5, GATAD1, GPR143, GRAMD4, HCFC1, HEATR3, HSPA4L, HTR7P1, HYAL2, IRF5, KIF2C, LOC100996724, LOC102723324, LOC105376933, LOC105379437, LOC107984436, LOC107985246, LOC112268051, LOC729609, LPAR1, MAK16, MBNL1-AS1, MCM6, MFSD13B, MISP3, MPHOSPH10, MSANTD4, MYC, NHEJ1, NUP62, PIGM, PLA2G6, PNO1, PTTG2, RBM4B, SEMA7A, SLC52A2, SMAD7, SNORD36A, STT3A-AS1, TCERG1, THTPA, TIGD4, TIPIN, TMEM169, TNFAIP1, UGGT2, USP24, USP32P2, WDR77, ZDHHC4, ZNF142, ZNF320, ZNF584, ZNF815P \item[Group 2]ABHD13, ABHD18, ABHD5, ABRACL, ABRAXAS1, ACBD3, ACSL4, ADD1, ADI1, AGO4, AHCTF1, AHCTF1P1, AIF1, AMFR, ANAPC13, ANKIB1, ANKRD42, ANP32B, ANXA11, ANXA3, AP3B1, AP3S1, APOL6, ARHGAP45, ARHGEF11, ARL3, ARL6IP4, ARPC4, ARPC5, ASH2L, ATAD1, ATF4, ATG4B, ATOX1, ATP5F1E, ATP5IF1, ATP5MC2, ATP5ME, ATP5MF, ATP5MG, ATP5MPL, ATP5PB, ATP7A, ATRX, BAG1, BBIP1, BICD2, BICRAL, BLOC1S2, BLZF1, BRCA1, BTBD10, BUD31, C11orf54, C19orf53, C2orf76, C4orf3, C4orf48, C5AR2, C6orf89, CAB39, CAB39L, CABP7, CALM1, CALM2, CALM3, CAMTA1, CARS2, CASC4, CASTOR2, CBFA2T3, CBFB, CBWD1, CBX1, CCDC13, CCDC146, CCDC170, CCDC71L, CCDC9, CD37, CD59, CDC40, CDK11A, CDKN2D, CEMIP2, CEP19, CEP57, CEP63, CFAP45, CFDP1, CHCHD7, CHD8, CHFR, CIAO1, CIAO2A, CINP, CIR1, CLEC12B, CLEC2B, CLMP, CLN8, CMTM2, CNBP, CNOT7, COMMD2, COMMD6, COP1, COPS5, COX14, COX17, COX5A, COX5B, COX6A1, COX6B1, COX8A, CPEB2, CPSF7, CREB5, CSNK1G3, CSTA, CTCF, CTDNEP1, CUL4B, CUX1, CXorf38, CYB561D2, CYB5B, CYB5R1, CYSLTR1, CYTOR, DAD1, DAPK1, DAPP1, DBI, DCAF7, DEF6, DEK, DENND10, DENND10P1, DIP2B, DNAJA2, DNAJB14, DNAJB6, DPH3, DPP8, DRC1, DTX3L, DUSP22, DYNLRB1, DYNLT1, EAF2, EEF1B2, EEPD1, EGLN1, EIF2S2, EIF4EBP1, EIF4EBP2, ELMOD2, ELOB, EMBP1, EMSY, ENY2, ERF, ESD, EVI2A, EVI2B, EXOSC3, FAM133B, FAM136A, FAM160B1, FAM200B, FAM204A, FAM49A, FAM76B, FAR1, FAS, FAU, FBXL3, FBXL4, FCGR1B, FIG4, FIS1, FLI1, FOCAD, FOSB, FOXJ2, FOXJ3, FRAT2, FUT4, GABARAP, GALM, GDAP2, GIMAP4, GLRX, GLRX3, GLYR1, GMFG, GNAQ, GNG5, GOLT1B, GPN3, GPR141, GPR27, GPS2, GPSM3, GRIPAP1, GRK3, GSN, GSR, GSTK1, GSTP1, H2AC6, H2AZ1, H2BC4, H3-3A, H4C8, HADHB, HLA-B, HLX, HMCES, HMGB1, HMGN2, HMGN4, HNRNPA1, HNRNPDL, HRH2, HSBP1, HSP90B2P, HSPB11, HSPD1, HTATIP2, IFI6, IFIT5, IFITM2, IGFLR1, IGSF6, IL17RA, INTS8, IRF1, ISCU, ITM2B, ITPR2, JPT1, KCTD12, KIAA1143, KIAA2013, KIDINS220, KIF2A, KPNA4, KPNB1, LAGE3, LAMTOR2, LAMTOR4, LAMTOR5, LARP7, LASP1, LEPROT, LEPROTL1, LIN7C, LINC00623, LINC00910, LINC01138, LINC01506, LINC02067, LINC02158, LIX1L, LLPH, LOC100506023, LOC100507507, LOC101928595, LOC102723373, LOC102723878, LOC105372421, LOC105372499, LOC105373098, LOC105373582, LOC105374102, LOC105374121, LOC105374985, LOC105375713, LOC105376244, LOC105376287, LOC105376512, LOC105376786, LOC105377067, LOC105378819, LOC107984747, LOC107986158, LOC107987225, LOC112268267, LOC643072, LPIN2, LSM3, LST1, LXN, LY96, LYPLA1, LYRM1, LYST, LYZ, MACROH2A1, MALSU1, MAN1A2, MAP2K4, MAPK1, MBD2, MCTS1, MED10, MED11, MED13L, MED25, METTL14, MICOS10, MIR142, MIR22HG, MMP25, MPC2, MRPL50, MRPL53, MRPS31, MRPS36, MS4A6A, MSRA, MTHFD2, MTMR1, MYLIP, NAA38, NACA4P, NAT9, NCF2, NDRG3, NDUFA1, NDUFA12, NDUFA2, NDUFA4, NDUFA5, NDUFA7, NDUFB1, NDUFB3, NDUFB6, NDUFV3, NEDD8, NEK7, NFRKB, NFYA, NLRC5, NMNAT1, NOP10, NOTCH1, NSD3, NSMCE1-DT, NTMT1, NUDT16, NUTF2, OARD1, OGFR, ORC4, ORMDL2, OSER1, OST4, OXR1, P2RY13, PABPC1, PAIP2, PARP14, PCMT1, PDCD4-AS1, PDPK1, PDPR, PELI2, PGLS, PGM2, PGM5, PHF21A, PHKB, PIGX, PIK3CD, PIN4, PLEKHA3, PLPBP, PNPT1, POLR2I, POLR2J, PPM1A, PPM1F, PPM1M, PPP2R5C, PQBP1, PRDX5, PRPF18, PRPF4B, PRR34-AS1, PRRG4, PSMA5, PSMA7, PSMB3, PSMB7, PSMB8, PSMD10, PSMD6, PSME1, PSME2, PSME4, PSTPIP1, PTBP2, PTENP1, PTOV1-AS2, PTPRN2, PXN, PYCARD, RAB33B, RAB5IF, RABAC1, RABGAP1, RABIF, RALBP1, RALY, RANBP3, RARA, RARS2, RASGRP2, RASSF3, RBM17, RBM26, RBP7, RCBTB2, RCOR1, RELCH, REM2, RFX1, RGS14, RHOT1, RNF114, RNF141, RNF145, RNF181, RNF20, RNF213, RNF38, RNF44, RNFT1, RNPEP, ROPN1L, RP2, RPA3, RPL13, RPL21, RPL23A, RPL24, RPL26, RPL27A, RPL29, RPL34, RPL35A, RPL36AL, RPL37, RPL38, RPL7A, RPL9, RPS11, RPS12, RPS15, RPS19, RPS19BP1, RPS24, RPS26, RPS27A, RPS3, RPS7, RPS9, RRP12, RSRP1, RTN4, RUFY2, S100A11, S100A12, S100A4, S100A6, S100A8, S100A9, S1PR4, SAP18, SAR1A, SBF2, SCAF8, SCARNA10, SCFD1, SCNM1, SDHB, SDHD, SEC11A, SEC22C, SEMA4A, SEMA4D, SENP5, SENP6, SERTAD3, SF3A1, SF3B5, SF3B6, SFPQ, SFSWAP, SGPL1, SH3GLB1, SIAH2, SLC25A5, SLC31A1, SLC35A1, SLC44A2, SLC45A4, SLC48A1, SLC8A1-AS1, SLCO3A1, SMARCA5, SMIM14, SMIM25, SMIM26, SMIM27, SMIM7, SNAPC5, SNF8, SNORA105A, SNORD141B, SNORD14D, SNORD14E, SNRK, SNRNP25, SNRNP27, SNRNP70, SNRPE, SNTB1, SNX2, SNX3, SP140, SP140L, SPCS1, SPIDR, SPTLC2, SREK1IP1, SRP14, SRSF9, SS18L2, ST3GAL6, STAG1, STAMBP, STAT2, STEAP4, STX3, STXBP5, SULT1B1, SUPT16H, SVBP, SWAP70, SYF2, TACC1, TAF10, TAF12, TARDBP, TBC1D1, TBCA, TBL1X, TFEB, TGFBR2, THAP1, THOC2, TIAL1, TIMM8B, TIPRL, TMA7, TMCO1, TMCO6, TMEM107, TMEM131L, TMEM144, TMEM14B, TMEM159, TMEM199, TMEM219, TMEM30A, TMEM50A, TMEM70, TMSB4X, TOPORS, TOR1AIP2, TPRG1L, TPST2, TRADD, TRAF3IP2-AS1, TRAPPC1, TRAPPC6B, TRDMT1, TRIOBP, TRMT10A, TRMT112, TSPAN2, TTC1, TTC17, TTC9C, TUBA1C, TUBGCP4, TUSC2, TXN, TXNDC17, TXNDC9, TXNIP, TXNL4B, TYROBP, U2AF1L5, UBA3, UBA52, UBC, UBE2D1, UBE2K, UBE2L3, UBE2R2, UBR3, UNC93B1, UPF2, UQCR10, UQCR11, UQCRC1, USP25, USP47, UTP6, VAMP3, VAMP4, VAMP5, VAPA, VNN2, VPS29, VPS36, VPS41, WBP4, WDR82, WDR83OS, WIPF1, WIPI1, XAF1, XPNPEP3, YIPF1, YPEL5, YY1, ZBTB18, ZBTB34, ZBTB8OS, ZCCHC9, ZDHHC17, ZFAS1, ZFP36L2, ZFP91, ZMAT2, ZMAT5, ZNF200, ZNF271P, ZNF284, ZNF516, ZNF641, ZNF700, ZNF770, ZNF776, ZNF90, ZNHIT1 \end{description} \end{document} ```
2
https://tex.stackexchange.com/users/1090
693010
321,506
https://tex.stackexchange.com/questions/693005
1
Got this code from the website tried for hours to adopt it all I want to do is change the arrows in the middle of the parallelogram to the normal arrows seen in most mathematical text books >> but maybe a bit larger my MWE is below. ``` \documentclass{scrreprt} \usepackage{tikz} \usetikzlibrary{decorations.markings} \tikzset{% ->-/.style={decoration={markings, mark=at position 1.5 with {\arrow{>}}}, postaction={decorate}}, ->>-/.style={decoration={markings, mark=at position 1.0 with {\arrow{>>}}}, postaction={decorate}}, } \begin{document} \begin{tikzpicture}[meme/.pic={ \fill[red ] (150:6pt) to[bend right=10] (0:3pt) to[bend right=10] (-150:6pt)--cycle; }] \path (0,0) coordinate (A) (2,3) coordinate (B) (8,3) coordinate (C) (6,0) coordinate (D); \node [left] at (0,0) {D}; \node [left] at (2,3) {A}; \node [right] at (8,3) {B}; \node [right] at (6,0) {C}; \draw [thick] (2,3) -- (6,0); \draw[sloped] (A) --(B) pic[pos=.5]{meme} --(C) pic[pos=.46]{meme} pic[pos=.54]{meme} --(D) pic[pos=.5]{meme} --cycle pic[pos=.46]{meme} pic[pos=.54]{meme}; \end{tikzpicture} \end{document} ```
https://tex.stackexchange.com/users/149116
Arrows on Parallelogram
false
**Update:** The `meme` style from [this answer](https://tex.stackexchange.com/a/510451/140722) is made to create a user-flexible arrow in a simple way. Adapt to your question, just take a minor change to `meme` (you can put it in a `\tikzset`) ``` meme/.pic={ \draw (150:8pt) --(0,0)-- (-150:8pt); } ``` ``` \documentclass{scrreprt} \usepackage{tikz} \begin{document} \begin{tikzpicture}[meme/.pic={ \draw (150:8pt) --(0,0)-- (-150:8pt); }] \path (0,0) coordinate (D) node[below left]{$D$} (2,3) coordinate (A) node[above left]{$A$} (6,0) coordinate (C) node[below right]{$C$} (A)+(C) coordinate (B) node[above right]{$B$}; \draw[gray] (A)--(C) (B)--(D); \draw[thick] (A)--(B) pic[pos=.5,sloped,red]{meme} (D)--(C) pic[pos=.5,sloped,red]{meme} (D)--(A) pic[pos=.47,sloped,blue]{meme} pic[pos=.53,sloped,blue]{meme} (C)--(B) pic[pos=.47,sloped,blue]{meme} pic[pos=.53,sloped,blue]{meme} ; \end{tikzpicture} \end{document} ``` Do you see this simple and flexible? --- **Old:** Note that a `coordinate` is a `node` without content. Maybe what you want is the `Straight Barb` arrow from the `arrows.meta` library (see more in [the PGFmanual](https://www.ctan.org/pkg/pgf)). In `Straight Barb[angle=30:8pt]`, the meanings of `30` and `8pt` are tip angle and tip length. ``` \documentclass{scrreprt} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[>={Straight Barb[angle=30:8pt]}] \path (0,0) coordinate (D) node[below left]{$D$} (2,3) coordinate (A) node[above left]{$A$} (6,0) coordinate (C) node[below right]{$C$} (A)+(C) coordinate (B) node[above right]{$B$}; \draw[blue] (2,3) -- (6,0); \draw[->] (A)--(B); \draw[->] (D)--(C); \draw[->] (D)--(A); \draw[->] (C)--(B); \end{tikzpicture} \end{document} ```
3
https://tex.stackexchange.com/users/140722
693016
321,508
https://tex.stackexchange.com/questions/693011
2
I need help expanding this table to the hsize of the page in LaTeX: ``` \documentclass{article} \usepackage{adjustbox} \begin{document} \begin{adjustbox}{rotate=270} \begin{tabularx}{\textwidth} { >{\centering\arraybackslash}c >{\centering\arraybackslash}X >{\centering\arraybackslash}X >{\centering\arraybackslash}X >{\centering\arraybackslash}X >{\centering\arraybackslash}X >{\centering\arraybackslash}X >{\centering\arraybackslash}X >{\centering\arraybackslash}c } \hline [PW$_{11}$M(H$_2$O)O$_{39}$]$$^{q-}$ & O$_c$-P & O$_c$-M & O$_t$-M & O$_{a1}$-M & O$_{b2}$-M & O$_{a1}$-W & O$_{b2}$-W & O$_{a1}$-M-O$_{b2}$ \\ \hline [PW$_{11}$Mn(H$_2$O)O$_{39}$]$$^{4-}$ & 1.555 & 2.302 & 2.338 & 1.940 & 1.923 & 1.880 & 1.868 & 173.2 \\ $[$PW$_{11}$Mn(H$_2$O)O$_{39}$$]$$$^{5-}$ & 1.558 & 2.377 & 2.303 & 2.137 & 2.048 & 1.829 & 1.833 & 168.0 \\ $[$PW$_{11}$Fe(H$_2$O)O$_{39}$$]$$$^{4-}$ & 1.565 & 2.236 & 2.179 & 2.021 & 1.963 & 1.859 & 1.864 & 171.3 \\ $[$PW$_{11}$Fe(H$_2$O)O$_{39}$$]$$$^{5-}$& 1.562 & 2.275 & 2.226 & 2.047 & 2.013 & 1.840 & 1.833 & 170.8 \\ $[$PW$_{11}$Co(H$_2$O)O$_{39}$$]$$$^{4-}$ & 1.586 & 1.964 & 1.976 & 1.910 & 1.917 & 1.877 & 1.844 & 177.1 \\ $[$PW$_{11}$Co(H$_2$O)O$_{39}$$]$$$^{5-}$ & 1.561 &2.248 &2.202 &2.072 &2.013 & 1.831 & 1.824 & 173.5 \\ $[$PW$_{11}$Ru(H$_2$O)O$_{39}$$]$$$^{4-}$& 1.579 & 2.129 & 2.151 & 2.029 & 2.028 & 1.881 & 1.859 & 178.3 \\ $[$PW$_{11}$Ru(H$_2$O)O$_{39}$$]$$$^{5-}$ & 1.576 & 2.149 & 2.166 & 2.066 & 2.031 & 1.849 & 1.831 & 177.4 \\ \hline \end{tabularx} \end{adjustbox} \end{document} ```
https://tex.stackexchange.com/users/302093
Need to expand table to fit hsize
false
You really need to stop engaging in so much visual formatting. Do yourself a favor and take the time to learn how to use the `\ce` macro, which is provided by the `mhchem` package, to typeset chemical formulas. That way, you could replace `$[$PW$_{11}$Ru(H$_2$O)O$_{39}$$]$$$^{5-}$` with a much more manageable-looking `\ce{[PW11 Ru(H2O)O39]^{5-}}`, etc. Aside: For the table at hand, I recommend using a `sidewaystable` environment and a `tabular*` environment (with a target width of `\textwidth`) rather than a `tabularx` environment. ``` \documentclass{article} \usepackage{rotating} % for 'sidewaystable' env. \usepackage{mhchem} % for '\ce' macro \usepackage{booktabs} % for well-spaced horizontal rules \begin{document} \begin{sidewaystable} \setlength\tabcolsep{0pt} \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} l *{8}{c} } \toprule \ce{[PW11Mn(H2O)O39]^{q-}} & O$_c$-P & O$_c$-M & O$_t$-M & O$_{a1}$-M & O$_{b2}$-M & O$_{a1}$-W & O$_{b2}$-W & O$_{a1}$-M-O$_{b2}$ \\ \midrule \ce{[PW11Mn(H2O)O39]^{4-}} & 1.555 & 2.302 & 2.338 & 1.940 & 1.923 & 1.880 & 1.868 & 173.2\\ \ce{[PW11Mn(H2O)O39]^{5-}} & 1.558 & 2.377 & 2.303 & 2.137 & 2.048 & 1.829 & 1.833 & 168.0\\ \addlinespace \ce{[PW11Fe(H2O)O39]^{4-}} & 1.565 & 2.236 & 2.179 & 2.021 & 1.963 & 1.859 & 1.864 & 171.3\\ \ce{[PW11Fe(H2O)O39]^{5-}} & 1.562 & 2.275 & 2.226 & 2.047 & 2.013 & 1.840 & 1.833 & 170.8\\ \addlinespace \ce{[PW11Co(H2O)O39]^{4-}} & 1.586 & 1.964 & 1.976 & 1.910 & 1.917 & 1.877 & 1.844 & 177.1\\ \ce{[PW11Co(H2O)O39]^{5-}} & 1.561 & 2.248 & 2.202 & 2.072 & 2.013 & 1.831 & 1.824 & 173.5\\ \addlinespace \ce{[PW11Ru(H2O)O39]^{4-}} & 1.579 & 2.129 & 2.151 & 2.029 & 2.028 & 1.881 & 1.859 & 178.3\\ \ce{[PW11Ru(H2O)O39]^{5-}} & 1.576 & 2.149 & 2.166 & 2.066 & 2.031 & 1.849 & 1.831 & 177.4\\ \bottomrule \end{tabular*} \end{sidewaystable} \end{document} ```
5
https://tex.stackexchange.com/users/5001
693020
321,511
https://tex.stackexchange.com/questions/693008
1
I have a long table which I need to include in my thesis appendix. However, I'm encountering an issue where, within certain rows, I have a list of genes that span over an entire page. Instead of these gene lists continuing onto a new page, they're being truncated. This problem persists across multiple rows in the table. How can I ensure that the table content flows seamlessly onto a new page instead of being cut off? I'm currently employing the `longtable` package, but I'm open to using alternative packages if they offer a better solution. (There are work arounds, but if someone finds a way to have the table automatically split across multiple pages, like it does in MS Word, then I will tick that answer) Here is the first two rows of my table: ``` \documentclass{article} \usepackage{longtable} \begin{document} \begin{longtable}{p{0.7in} >{\itshape}p{5in}} \caption{caption} \label{label} % Col names \hline \textbf{Group} & \textbf{Genes} \hline % contents of table: Group 1 & ANKRD54, APC2, ARFGEF2, C3orf20, C6orf223, COQ9, DLEU1, DNLZ, DYRK3, ECI1, ERMARD, FAHD1, FBL, FBXO22, FBXO5, GATAD1, GPR143, GRAMD4, HCFC1, HEATR3, HSPA4L, HTR7P1, HYAL2, IRF5, KIF2C, LOC100996724, LOC102723324, LOC105376933, LOC105379437, LOC107984436, LOC107985246, LOC112268051, LOC729609, LPAR1, MAK16, MBNL1-AS1, MCM6, MFSD13B, MISP3, MPHOSPH10, MSANTD4, MYC, NHEJ1, NUP62, PIGM, PLA2G6, PNO1, PTTG2, RBM4B, SEMA7A, SLC52A2, SMAD7, SNORD36A, STT3A-AS1, TCERG1, THTPA, TIGD4, TIPIN, TMEM169, TNFAIP1, UGGT2, USP24, USP32P2, WDR77, ZDHHC4, ZNF142, ZNF320, ZNF584, ZNF815P\\ Group 2 & ABHD13, ABHD18, ABHD5, ABRACL, ABRAXAS1, ACBD3, ACSL4, ADD1, ADI1, AGO4, AHCTF1, AHCTF1P1, AIF1, AMFR, ANAPC13, ANKIB1, ANKRD42, ANP32B, ANXA11, ANXA3, AP3B1, AP3S1, APOL6, ARHGAP45, ARHGEF11, ARL3, ARL6IP4, ARPC4, ARPC5, ASH2L, ATAD1, ATF4, ATG4B, ATOX1, ATP5F1E, ATP5IF1, ATP5MC2, ATP5ME, ATP5MF, ATP5MG, ATP5MPL, ATP5PB, ATP7A, ATRX, BAG1, BBIP1, BICD2, BICRAL, BLOC1S2, BLZF1, BRCA1, BTBD10, BUD31, C11orf54, C19orf53, C2orf76, C4orf3, C4orf48, C5AR2, C6orf89, CAB39, CAB39L, CABP7, CALM1, CALM2, CALM3, CAMTA1, CARS2, CASC4, CASTOR2, CBFA2T3, CBFB, CBWD1, CBX1, CCDC13, CCDC146, CCDC170, CCDC71L, CCDC9, CD37, CD59, CDC40, CDK11A, CDKN2D, CEMIP2, CEP19, CEP57, CEP63, CFAP45, CFDP1, CHCHD7, CHD8, CHFR, CIAO1, CIAO2A, CINP, CIR1, CLEC12B, CLEC2B, CLMP, CLN8, CMTM2, CNBP, CNOT7, COMMD2, COMMD6, COP1, COPS5, COX14, COX17, COX5A, COX5B, COX6A1, COX6B1, COX8A, CPEB2, CPSF7, CREB5, CSNK1G3, CSTA, CTCF, CTDNEP1, CUL4B, CUX1, CXorf38, CYB561D2, CYB5B, CYB5R1, CYSLTR1, CYTOR, DAD1, DAPK1, DAPP1, DBI, DCAF7, DEF6, DEK, DENND10, DENND10P1, DIP2B, DNAJA2, DNAJB14, DNAJB6, DPH3, DPP8, DRC1, DTX3L, DUSP22, DYNLRB1, DYNLT1, EAF2, EEF1B2, EEPD1, EGLN1, EIF2S2, EIF4EBP1, EIF4EBP2, ELMOD2, ELOB, EMBP1, EMSY, ENY2, ERF, ESD, EVI2A, EVI2B, EXOSC3, FAM133B, FAM136A, FAM160B1, FAM200B, FAM204A, FAM49A, FAM76B, FAR1, FAS, FAU, FBXL3, FBXL4, FCGR1B, FIG4, FIS1, FLI1, FOCAD, FOSB, FOXJ2, FOXJ3, FRAT2, FUT4, GABARAP, GALM, GDAP2, GIMAP4, GLRX, GLRX3, GLYR1, GMFG, GNAQ, GNG5, GOLT1B, GPN3, GPR141, GPR27, GPS2, GPSM3, GRIPAP1, GRK3, GSN, GSR, GSTK1, GSTP1, H2AC6, H2AZ1, H2BC4, H3-3A, H4C8, HADHB, HLA-B, HLX, HMCES, HMGB1, HMGN2, HMGN4, HNRNPA1, HNRNPDL, HRH2, HSBP1, HSP90B2P, HSPB11, HSPD1, HTATIP2, IFI6, IFIT5, IFITM2, IGFLR1, IGSF6, IL17RA, INTS8, IRF1, ISCU, ITM2B, ITPR2, JPT1, KCTD12, KIAA1143, KIAA2013, KIDINS220, KIF2A, KPNA4, KPNB1, LAGE3, LAMTOR2, LAMTOR4, LAMTOR5, LARP7, LASP1, LEPROT, LEPROTL1, LIN7C, LINC00623, LINC00910, LINC01138, LINC01506, LINC02067, LINC02158, LIX1L, LLPH, LOC100506023, LOC100507507, LOC101928595, LOC102723373, LOC102723878, LOC105372421, LOC105372499, LOC105373098, LOC105373582, LOC105374102, LOC105374121, LOC105374985, LOC105375713, LOC105376244, LOC105376287, LOC105376512, LOC105376786, LOC105377067, LOC105378819, LOC107984747, LOC107986158, LOC107987225, LOC112268267, LOC643072, LPIN2, LSM3, LST1, LXN, LY96, LYPLA1, LYRM1, LYST, LYZ, MACROH2A1, MALSU1, MAN1A2, MAP2K4, MAPK1, MBD2, MCTS1, MED10, MED11, MED13L, MED25, METTL14, MICOS10, MIR142, MIR22HG, MMP25, MPC2, MRPL50, MRPL53, MRPS31, MRPS36, MS4A6A, MSRA, MTHFD2, MTMR1, MYLIP, NAA38, NACA4P, NAT9, NCF2, NDRG3, NDUFA1, NDUFA12, NDUFA2, NDUFA4, NDUFA5, NDUFA7, NDUFB1, NDUFB3, NDUFB6, NDUFV3, NEDD8, NEK7, NFRKB, NFYA, NLRC5, NMNAT1, NOP10, NOTCH1, NSD3, NSMCE1-DT, NTMT1, NUDT16, NUTF2, OARD1, OGFR, ORC4, ORMDL2, OSER1, OST4, OXR1, P2RY13, PABPC1, PAIP2, PARP14, PCMT1, PDCD4-AS1, PDPK1, PDPR, PELI2, PGLS, PGM2, PGM5, PHF21A, PHKB, PIGX, PIK3CD, PIN4, PLEKHA3, PLPBP, PNPT1, POLR2I, POLR2J, PPM1A, PPM1F, PPM1M, PPP2R5C, PQBP1, PRDX5, PRPF18, PRPF4B, PRR34-AS1, PRRG4, PSMA5, PSMA7, PSMB3, PSMB7, PSMB8, PSMD10, PSMD6, PSME1, PSME2, PSME4, PSTPIP1, PTBP2, PTENP1, PTOV1-AS2, PTPRN2, PXN, PYCARD, RAB33B, RAB5IF, RABAC1, RABGAP1, RABIF, RALBP1, RALY, RANBP3, RARA, RARS2, RASGRP2, RASSF3, RBM17, RBM26, RBP7, RCBTB2, RCOR1, RELCH, REM2, RFX1, RGS14, RHOT1, RNF114, RNF141, RNF145, RNF181, RNF20, RNF213, RNF38, RNF44, RNFT1, RNPEP, ROPN1L, RP2, RPA3, RPL13, RPL21, RPL23A, RPL24, RPL26, RPL27A, RPL29, RPL34, RPL35A, RPL36AL, RPL37, RPL38, RPL7A, RPL9, RPS11, RPS12, RPS15, RPS19, RPS19BP1, RPS24, RPS26, RPS27A, RPS3, RPS7, RPS9, RRP12, RSRP1, RTN4, RUFY2, S100A11, S100A12, S100A4, S100A6, S100A8, S100A9, S1PR4, SAP18, SAR1A, SBF2, SCAF8, SCARNA10, SCFD1, SCNM1, SDHB, SDHD, SEC11A, SEC22C, SEMA4A, SEMA4D, SENP5, SENP6, SERTAD3, SF3A1, SF3B5, SF3B6, SFPQ, SFSWAP, SGPL1, SH3GLB1, SIAH2, SLC25A5, SLC31A1, SLC35A1, SLC44A2, SLC45A4, SLC48A1, SLC8A1-AS1, SLCO3A1, SMARCA5, SMIM14, SMIM25, SMIM26, SMIM27, SMIM7, SNAPC5, SNF8, SNORA105A, SNORD141B, SNORD14D, SNORD14E, SNRK, SNRNP25, SNRNP27, SNRNP70, SNRPE, SNTB1, SNX2, SNX3, SP140, SP140L, SPCS1, SPIDR, SPTLC2, SREK1IP1, SRP14, SRSF9, SS18L2, ST3GAL6, STAG1, STAMBP, STAT2, STEAP4, STX3, STXBP5, SULT1B1, SUPT16H, SVBP, SWAP70, SYF2, TACC1, TAF10, TAF12, TARDBP, TBC1D1, TBCA, TBL1X, TFEB, TGFBR2, THAP1, THOC2, TIAL1, TIMM8B, TIPRL, TMA7, TMCO1, TMCO6, TMEM107, TMEM131L, TMEM144, TMEM14B, TMEM159, TMEM199, TMEM219, TMEM30A, TMEM50A, TMEM70, TMSB4X, TOPORS, TOR1AIP2, TPRG1L, TPST2, TRADD, TRAF3IP2-AS1, TRAPPC1, TRAPPC6B, TRDMT1, TRIOBP, TRMT10A, TRMT112, TSPAN2, TTC1, TTC17, TTC9C, TUBA1C, TUBGCP4, TUSC2, TXN, TXNDC17, TXNDC9, TXNIP, TXNL4B, TYROBP, U2AF1L5, UBA3, UBA52, UBC, UBE2D1, UBE2K, UBE2L3, UBE2R2, UBR3, UNC93B1, UPF2, UQCR10, UQCR11, UQCRC1, USP25, USP47, UTP6, VAMP3, VAMP4, VAMP5, VAPA, VNN2, VPS29, VPS36, VPS41, WBP4, WDR82, WDR83OS, WIPF1, WIPI1, XAF1, XPNPEP3, YIPF1, YPEL5, YY1, ZBTB18, ZBTB34, ZBTB8OS, ZCCHC9, ZDHHC17, ZFAS1, ZFP36L2, ZFP91, ZMAT2, ZMAT5, ZNF200, ZNF271P, ZNF284, ZNF516, ZNF641, ZNF700, ZNF770, ZNF776, ZNF90, ZNHIT1\\ \end{longtable} \end{document} ```
https://tex.stackexchange.com/users/284206
Managing Longtable with Single-Row Contents Exceeding One Page's Length and Being Truncated
false
I couldn't find how to split the table as it doesn't seem possible, like David Carlisle said. An alternative to keep this information still in a table but with the contents fitting into one page was to make the text tiny and have the table in landscape: ``` \documentclass{article} \usepackage{longtable} \begin{document} \begin{landscape} % Make the table landscape so less space is taken up with the first column \tiny % Make table text tiny \begin{longtable}{p{0.7in} >{\itshape}p{8in}} \caption{caption} \label{label} % Col names \hline \textbf{Group} & \textbf{Genes} \hline % contents of table: Group 1 & ANKRD54, APC2, ARFGEF2, C3orf20, C6orf223, COQ9, DLEU1, DNLZ, DYRK3, ECI1, ERMARD, FAHD1, FBL, FBXO22, FBXO5, GATAD1, GPR143, GRAMD4, HCFC1, HEATR3, HSPA4L, HTR7P1, HYAL2, IRF5, KIF2C, LOC100996724, LOC102723324, LOC105376933, LOC105379437, LOC107984436, LOC107985246, LOC112268051, LOC729609, LPAR1, MAK16, MBNL1-AS1, MCM6, MFSD13B, MISP3, MPHOSPH10, MSANTD4, MYC, NHEJ1, NUP62, PIGM, PLA2G6, PNO1, PTTG2, RBM4B, SEMA7A, SLC52A2, SMAD7, SNORD36A, STT3A-AS1, TCERG1, THTPA, TIGD4, TIPIN, TMEM169, TNFAIP1, UGGT2, USP24, USP32P2, WDR77, ZDHHC4, ZNF142, ZNF320, ZNF584, ZNF815P\\ Group 2 & ABHD13, ABHD18, ABHD5, ABRACL, ABRAXAS1, ACBD3, ACSL4, ADD1, ADI1, AGO4, AHCTF1, AHCTF1P1, AIF1, AMFR, ANAPC13, ANKIB1, ANKRD42, ANP32B, ANXA11, ANXA3, AP3B1, AP3S1, APOL6, ARHGAP45, ARHGEF11, ARL3, ARL6IP4, ARPC4, ARPC5, ASH2L, ATAD1, ATF4, ATG4B, ATOX1, ATP5F1E, ATP5IF1, ATP5MC2, ATP5ME, ATP5MF, ATP5MG, ATP5MPL, ATP5PB, ATP7A, ATRX, BAG1, BBIP1, BICD2, BICRAL, BLOC1S2, BLZF1, BRCA1, BTBD10, BUD31, C11orf54, C19orf53, C2orf76, C4orf3, C4orf48, C5AR2, C6orf89, CAB39, CAB39L, CABP7, CALM1, CALM2, CALM3, CAMTA1, CARS2, CASC4, CASTOR2, CBFA2T3, CBFB, CBWD1, CBX1, CCDC13, CCDC146, CCDC170, CCDC71L, CCDC9, CD37, CD59, CDC40, CDK11A, CDKN2D, CEMIP2, CEP19, CEP57, CEP63, CFAP45, CFDP1, CHCHD7, CHD8, CHFR, CIAO1, CIAO2A, CINP, CIR1, CLEC12B, CLEC2B, CLMP, CLN8, CMTM2, CNBP, CNOT7, COMMD2, COMMD6, COP1, COPS5, COX14, COX17, COX5A, COX5B, COX6A1, COX6B1, COX8A, CPEB2, CPSF7, CREB5, CSNK1G3, CSTA, CTCF, CTDNEP1, CUL4B, CUX1, CXorf38, CYB561D2, CYB5B, CYB5R1, CYSLTR1, CYTOR, DAD1, DAPK1, DAPP1, DBI, DCAF7, DEF6, DEK, DENND10, DENND10P1, DIP2B, DNAJA2, DNAJB14, DNAJB6, DPH3, DPP8, DRC1, DTX3L, DUSP22, DYNLRB1, DYNLT1, EAF2, EEF1B2, EEPD1, EGLN1, EIF2S2, EIF4EBP1, EIF4EBP2, ELMOD2, ELOB, EMBP1, EMSY, ENY2, ERF, ESD, EVI2A, EVI2B, EXOSC3, FAM133B, FAM136A, FAM160B1, FAM200B, FAM204A, FAM49A, FAM76B, FAR1, FAS, FAU, FBXL3, FBXL4, FCGR1B, FIG4, FIS1, FLI1, FOCAD, FOSB, FOXJ2, FOXJ3, FRAT2, FUT4, GABARAP, GALM, GDAP2, GIMAP4, GLRX, GLRX3, GLYR1, GMFG, GNAQ, GNG5, GOLT1B, GPN3, GPR141, GPR27, GPS2, GPSM3, GRIPAP1, GRK3, GSN, GSR, GSTK1, GSTP1, H2AC6, H2AZ1, H2BC4, H3-3A, H4C8, HADHB, HLA-B, HLX, HMCES, HMGB1, HMGN2, HMGN4, HNRNPA1, HNRNPDL, HRH2, HSBP1, HSP90B2P, HSPB11, HSPD1, HTATIP2, IFI6, IFIT5, IFITM2, IGFLR1, IGSF6, IL17RA, INTS8, IRF1, ISCU, ITM2B, ITPR2, JPT1, KCTD12, KIAA1143, KIAA2013, KIDINS220, KIF2A, KPNA4, KPNB1, LAGE3, LAMTOR2, LAMTOR4, LAMTOR5, LARP7, LASP1, LEPROT, LEPROTL1, LIN7C, LINC00623, LINC00910, LINC01138, LINC01506, LINC02067, LINC02158, LIX1L, LLPH, LOC100506023, LOC100507507, LOC101928595, LOC102723373, LOC102723878, LOC105372421, LOC105372499, LOC105373098, LOC105373582, LOC105374102, LOC105374121, LOC105374985, LOC105375713, LOC105376244, LOC105376287, LOC105376512, LOC105376786, LOC105377067, LOC105378819, LOC107984747, LOC107986158, LOC107987225, LOC112268267, LOC643072, LPIN2, LSM3, LST1, LXN, LY96, LYPLA1, LYRM1, LYST, LYZ, MACROH2A1, MALSU1, MAN1A2, MAP2K4, MAPK1, MBD2, MCTS1, MED10, MED11, MED13L, MED25, METTL14, MICOS10, MIR142, MIR22HG, MMP25, MPC2, MRPL50, MRPL53, MRPS31, MRPS36, MS4A6A, MSRA, MTHFD2, MTMR1, MYLIP, NAA38, NACA4P, NAT9, NCF2, NDRG3, NDUFA1, NDUFA12, NDUFA2, NDUFA4, NDUFA5, NDUFA7, NDUFB1, NDUFB3, NDUFB6, NDUFV3, NEDD8, NEK7, NFRKB, NFYA, NLRC5, NMNAT1, NOP10, NOTCH1, NSD3, NSMCE1-DT, NTMT1, NUDT16, NUTF2, OARD1, OGFR, ORC4, ORMDL2, OSER1, OST4, OXR1, P2RY13, PABPC1, PAIP2, PARP14, PCMT1, PDCD4-AS1, PDPK1, PDPR, PELI2, PGLS, PGM2, PGM5, PHF21A, PHKB, PIGX, PIK3CD, PIN4, PLEKHA3, PLPBP, PNPT1, POLR2I, POLR2J, PPM1A, PPM1F, PPM1M, PPP2R5C, PQBP1, PRDX5, PRPF18, PRPF4B, PRR34-AS1, PRRG4, PSMA5, PSMA7, PSMB3, PSMB7, PSMB8, PSMD10, PSMD6, PSME1, PSME2, PSME4, PSTPIP1, PTBP2, PTENP1, PTOV1-AS2, PTPRN2, PXN, PYCARD, RAB33B, RAB5IF, RABAC1, RABGAP1, RABIF, RALBP1, RALY, RANBP3, RARA, RARS2, RASGRP2, RASSF3, RBM17, RBM26, RBP7, RCBTB2, RCOR1, RELCH, REM2, RFX1, RGS14, RHOT1, RNF114, RNF141, RNF145, RNF181, RNF20, RNF213, RNF38, RNF44, RNFT1, RNPEP, ROPN1L, RP2, RPA3, RPL13, RPL21, RPL23A, RPL24, RPL26, RPL27A, RPL29, RPL34, RPL35A, RPL36AL, RPL37, RPL38, RPL7A, RPL9, RPS11, RPS12, RPS15, RPS19, RPS19BP1, RPS24, RPS26, RPS27A, RPS3, RPS7, RPS9, RRP12, RSRP1, RTN4, RUFY2, S100A11, S100A12, S100A4, S100A6, S100A8, S100A9, S1PR4, SAP18, SAR1A, SBF2, SCAF8, SCARNA10, SCFD1, SCNM1, SDHB, SDHD, SEC11A, SEC22C, SEMA4A, SEMA4D, SENP5, SENP6, SERTAD3, SF3A1, SF3B5, SF3B6, SFPQ, SFSWAP, SGPL1, SH3GLB1, SIAH2, SLC25A5, SLC31A1, SLC35A1, SLC44A2, SLC45A4, SLC48A1, SLC8A1-AS1, SLCO3A1, SMARCA5, SMIM14, SMIM25, SMIM26, SMIM27, SMIM7, SNAPC5, SNF8, SNORA105A, SNORD141B, SNORD14D, SNORD14E, SNRK, SNRNP25, SNRNP27, SNRNP70, SNRPE, SNTB1, SNX2, SNX3, SP140, SP140L, SPCS1, SPIDR, SPTLC2, SREK1IP1, SRP14, SRSF9, SS18L2, ST3GAL6, STAG1, STAMBP, STAT2, STEAP4, STX3, STXBP5, SULT1B1, SUPT16H, SVBP, SWAP70, SYF2, TACC1, TAF10, TAF12, TARDBP, TBC1D1, TBCA, TBL1X, TFEB, TGFBR2, THAP1, THOC2, TIAL1, TIMM8B, TIPRL, TMA7, TMCO1, TMCO6, TMEM107, TMEM131L, TMEM144, TMEM14B, TMEM159, TMEM199, TMEM219, TMEM30A, TMEM50A, TMEM70, TMSB4X, TOPORS, TOR1AIP2, TPRG1L, TPST2, TRADD, TRAF3IP2-AS1, TRAPPC1, TRAPPC6B, TRDMT1, TRIOBP, TRMT10A, TRMT112, TSPAN2, TTC1, TTC17, TTC9C, TUBA1C, TUBGCP4, TUSC2, TXN, TXNDC17, TXNDC9, TXNIP, TXNL4B, TYROBP, U2AF1L5, UBA3, UBA52, UBC, UBE2D1, UBE2K, UBE2L3, UBE2R2, UBR3, UNC93B1, UPF2, UQCR10, UQCR11, UQCRC1, USP25, USP47, UTP6, VAMP3, VAMP4, VAMP5, VAPA, VNN2, VPS29, VPS36, VPS41, WBP4, WDR82, WDR83OS, WIPF1, WIPI1, XAF1, XPNPEP3, YIPF1, YPEL5, YY1, ZBTB18, ZBTB34, ZBTB8OS, ZCCHC9, ZDHHC17, ZFAS1, ZFP36L2, ZFP91, ZMAT2, ZMAT5, ZNF200, ZNF271P, ZNF284, ZNF516, ZNF641, ZNF700, ZNF770, ZNF776, ZNF90, ZNHIT1\\ \end{longtable} \end{landscape} \end{document} ```
0
https://tex.stackexchange.com/users/284206
693021
321,512
https://tex.stackexchange.com/questions/693023
5
Consider the following: ``` \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\demo}{m}{ \str_case:nnF{#1} { {a} {Run case 1\\ % Actually super long code } {b} {Run case 1\\ % Actually super long code } } { % False code } } \ExplSyntaxOff \begin{document} \demo{a} \demo{b} \end{document} ``` Is there any way I can define the "`b`" case without having to copy all of my "actually super long code"?
https://tex.stackexchange.com/users/34551
Grouping multiple matches with \str_case:nnF
false
You could try regular expressions, such as in the following example (note that the order of the two first arguments is different between `\regex_match_case:nnF` and `\str_case:nnF`): ``` \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\demo}{m}{ \regex_match_case:nnF{ {\A[ab]\Z} {Run case 1\\ % Actually super long code } }{#1}{ % false code } } \ExplSyntaxOff \begin{document} \demo{a} \demo{b} \end{document} ```
4
https://tex.stackexchange.com/users/47927
693027
321,514
https://tex.stackexchange.com/questions/22867
32
I know that a nice list of (English) hyphenation exceptions was published in TUGboat, in quite a few installments. Is it compiled somewhere in one place?
https://tex.stackexchange.com/users/5626
Where can I find a list of English hyphenation exceptions?
false
On MiKTeX, the path is `C:\MiKTeX\tex\generic\hyphenex\ushyphex.tex`, in case MiKTeX is installed at `C:\MiKTeX`. On CTAN, the package is [hyphenex](https://ctan.org/pkg/hyphenex), which contains [ushyphex.tex](http://mirrors.ctan.org/info/digests/tugboat/hyphenex/ushyphex.tex). Additional information: I was interested in using the list. Following an example using luatex and [showhypens](https://ctan.org/pkg/showhyphens) to illustrate the new hyphenation. The package works with pdflatex, too. ``` % !TeX program = lualatex \documentclass{article} \usepackage{showhyphens} \begin{document} \input{ushyphex} antinuclear \enddocument} ``` Note: One needs to update MiKTeX to [August 2023](https://github.com/MiKTeX/miktex-packaging/issues/388) (or later) to make use of the file.
0
https://tex.stackexchange.com/users/9075
693030
321,515
https://tex.stackexchange.com/questions/693029
0
I cannot find the musical symbol for semi-flat. This is a reversed flat symbol. Where can I find this symbol?
https://tex.stackexchange.com/users/302101
How do I include the musical symbol for half-flat?
false
You can use the `lilyglyphs` package that gives you access to the Emmentaler font that contains a huge range of musical symbols. Not every symbol has a shorthand command defined by the package, but you can access all glyphs using the `\lilyGlyph` command. Check the list of available glyphs and their names in the [online Lilypond documentation](https://lilypond.org/doc/v2.23/Documentation/notation/the-emmentaler-font). For this to work, you need to compile with XeLaTeX or LuaLaTeX. ``` \documentclass{article} \usepackage{fontspec, lilyglyphs} \begin{document} \begin{tabular}{ p{2em} l } \flat & \verb|\flat| \\ \lilyGlyph[scale=1.5]{accidentals.flat} & \verb|\lilyGlyph[scale=1.5]{accidentals.flat}| \\ \flatflat & \verb|\flatflat| \\ \lilyGlyph[scale=1.5]{accidentals.flatflat} & \verb|\lilyGlyph[scale=1.5]{accidentals.flatflat}| \\ \lilyGlyph[scale=1.5]{accidentals.mirroredflat} & \verb|\lilyGlyph[scale=1.5]{accidentals.mirroredflat}| \\ \lilyGlyph[scale=1.5]{accidentals.mirroredflat.flat} & \verb|\lilyGlyph[scale=1.5]{accidentals.mirroredflat.flat}| \\ \end{tabular} \end{document} ```
4
https://tex.stackexchange.com/users/47927
693031
321,516
https://tex.stackexchange.com/questions/693023
5
Consider the following: ``` \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\demo}{m}{ \str_case:nnF{#1} { {a} {Run case 1\\ % Actually super long code } {b} {Run case 1\\ % Actually super long code } } { % False code } } \ExplSyntaxOff \begin{document} \demo{a} \demo{b} \end{document} ``` Is there any way I can define the "`b`" case without having to copy all of my "actually super long code"?
https://tex.stackexchange.com/users/34551
Grouping multiple matches with \str_case:nnF
false
Change `b` to `a` before testing ``` \documentclass{article} \ExplSyntaxOn \cs_generate_variant:Nn\str_case:nnF{e} \NewDocumentCommand{\demo}{m}{ \str_case:enF{ \str_case:enF{#1}{ {b}{a} } {#1} } { {a} {Run case 1\par % Actually super long code } } { % False code } } \ExplSyntaxOff \begin{document} \demo{a} \demo{b} \end{document} ```
5
https://tex.stackexchange.com/users/1090
693032
321,517
https://tex.stackexchange.com/questions/693012
1
Whenever I use `\autoref{sec:anexo1}`, it displays 'Apêndice'. However, I want it to display 'Anexo', because the document uses Portuguese as main language and the word Anexo suits better than Apêndice for what I am doing. The issue here is not with the toc or with the sections of the appendix. I just want `autoref` to write *Anexo* instead of *Apêndice*. I have tried many solutions, unsuccessful, such as ``` \addto\captionsportuguese{% \renewcommand\appendixname{Anexo} \renewcommand\appendixpagename{Anexos} }. ``` More details about the used syntax: ``` \documentclass[12pt]{article} \usepackage[portuguese]{babel} % [...] \appendix \renewcommand{\thesection}{\Roman{section}} \section{ANEXO I -- blablabla \label{sec:anexo1}} This is \autoref{sec:anexo1}. % here it displays Apêndice I and I want Anexo I. \section{ANEXO II -- blablabla \label{sec:anexo2}} This is \autoref{sec:anexo2}. % here it displays Apêndice II and I want Anexo II. ```
https://tex.stackexchange.com/users/193443
change appendix name when using autoref
true
I found it burried in the hyperref code. The name is stored in the aux file as `appendix`, but autoref uses `\csname #1autorefname\endcsname` to translate. ``` \documentclass[12pt]{article} \usepackage[portuguese]{babel} \usepackage{hyperref} %\AtBeginDocument{\def\appendixautorefname{Anexo}} \addto\extrasportuguese{\def\appendixautorefname{Anexo}} \begin{document} \appendix \renewcommand{\thesection}{\Roman{section}} \section{ANEXO I -- blablabla \label{sec:anexo1}} This is \autoref{sec:anexo1}. % here it displays Apêndice I and I want Anexo I. \section{ANEXO II -- blablabla \label{sec:anexo2}} This is \autoref{sec:anexo2}. % here it displays Apêndice II and I want Anexo II. \end{document} ```
2
https://tex.stackexchange.com/users/34505
693033
321,518
https://tex.stackexchange.com/questions/242132
11
The following code is from the "gallery of examples in the manual - PGFPlots". ``` \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pagestyle{empty} \begin{document} \begin{tikzpicture} \begin{axis}[ title={$x \exp(-x^2-y^2)$}, domain=-2:2,enlarge x limits, view={0}{90}, ] \addplot3[contour gnuplot={number=14},thick] {exp(0-x^2-y^2)*x}; \end{axis} \end{tikzpicture} \end{document} ``` Unfortunately the code does not work and I get the following error message: ``` ! Package pgfplots Error: sorry, plot file{example_175_contourtmp0.table} could not be opened. See the pgfplots package documentation for explanation. Type H <return> for immediate help. ... l.17 {exp(0-x^2-y^2)*x}; ? ! Emergency stop. ... l.17 {exp(0-x^2-y^2)*x}; End of file on the terminal! ``` I have no idea what could be the problem. It would be great if anbody can offer a solution.
https://tex.stackexchange.com/users/58922
Plot file could not be opened
false
In 2023 I think the recommended best practice is to use the `luatex` engine if possible. Then you just need to change `contour gnuplot` to `contour lua` and it Just Works without needing to run an external problem.
0
https://tex.stackexchange.com/users/1402
693035
321,520
https://tex.stackexchange.com/questions/693023
5
Consider the following: ``` \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\demo}{m}{ \str_case:nnF{#1} { {a} {Run case 1\\ % Actually super long code } {b} {Run case 1\\ % Actually super long code } } { % False code } } \ExplSyntaxOff \begin{document} \demo{a} \demo{b} \end{document} ``` Is there any way I can define the "`b`" case without having to copy all of my "actually super long code"?
https://tex.stackexchange.com/users/34551
Grouping multiple matches with \str_case:nnF
false
Use a function that provides the very long code. It's recommended to use `\New(Expandable)DocumentCommand` just to parse the arguments and then to pass control to a function. Whenever you have long code that's part of other code, it's best to make auxiliary functions. ``` \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\demo}{m} { \clement_code_cases:n { #1 } } \cs_new:Nn \clement_code_cases:n { \str_case:nnF{#1} { {a} { \__clement_code_superlong: } {b} { \__clement_code_superlong: } {c} { Simpler~code } } { False~code } } \cs_new:Nn \__clement_code_superlong: { Some~very~long~code } \ExplSyntaxOff \begin{document} \demo{a} \demo{b} \demo{c} \demo{d} \end{document} ``` Remember to use `\cs_new_protected:(...)` when the code contains unexpandable functions.
6
https://tex.stackexchange.com/users/4427
693038
321,521
https://tex.stackexchange.com/questions/692993
5
I have problems with macros containing ifnum. After using the command \noexpand one macro works fine, nesting two of them does not compile but causes the error message --- Extra \fi. \fi --- as in the following code. How can I get my nested macros working? ``` \documentclass{article} \newcommand{\IFCONDA}{\noexpand{\ifnum1>0}} \newcommand{\IFCONDB}{\noexpand{\ifnum1=0}} \begin{document} \IFCONDA hello1 \else % \IFCONDA world1 % next three lines cause trouble (nested ifnum) \IFCONDB hello2 \fi % \IFCONDB \fi % \IFCONDA \end{document} ```
https://tex.stackexchange.com/users/146219
Trouble with nested macros containing ifnum
false
While your code can never work for the reasons stated by egreg and David. It is possible to implement it approximately with a TeX macro using a cleverly chosen parameter text (see one of the following: The TeXbook chapter 20, TexbyTopic 11.5, or [How TeX macros actually work: Part 4](https://www.overleaf.com/learn/latex/How_TeX_macros_actually_work%3A_Part_4)). I provide two possible solutions, although I would note you probably dont want to do this and are better off using `ifthen` as suggested by David. First I show a solution where the conditions are static (e.g. 1>0) and later a more general one which can work on a more realistic conditions. ``` \documentclass{article} \edef\ifconda #1\fi{\ifnum1>0 #1 \fi} \edef\ifelseconda #1\else#2\fi{\ifnum1>0 #1 \else #2 \fi} \edef\ifcondb #1\fi{\ifnum1=0 #1 \fi} \edef\ifelsecondb #1\else#2\fi{\ifnum1=0 #1 \else #2 \fi} \begin{document} % original test case \ifelseconda{ hello1 }\else{ world1 \ifcondb{ hello2 }\fi }\fi --- % more general test case \ifelseconda{ \ifelsecondb{ hello1 }\else{ hello2 }\fi }\else{ \ifelsecondb{ hello3 }\else{ hello4 }\fi }\fi \ifelseconda{ \ifelseconda{ world1 }\else{ world2 }\fi }\else{ \ifelseconda{ world3 }\else{ world4 }\fi }\fi \end{document} ``` Typesets: ``` hello1 --- hello2 world1 ``` Note that this will only work if the condition can and should be evaluated when defining `\ifconda` etc.... As an `\edef` will expand its replacement text when defined (so `\edef\ifelseconda #1\else#2\fi{\ifnum1>0 #1 \else #2 \fi}` is expanded to `\edef\ifelseconda #1\else#2\fi{#1}` for example). If you dont want the condition to be evaluated at definition time you can use a plain `\def` but we will need to change the spelling of `\fi` to avoid the need for excessive token juggling (which is probably possible but beyond what I want to reason through). ``` \documentclass{article} \def\ifconda #1\fii{\ifnum1>0 #1 \fi} \def\ifelseconda #1\else#2\fii{\ifnum1>0 #1 \else #2 \fi} \def\ifcondb #1\fii{\ifnum1=0 #1 \fi} \def\ifelsecondb #1\else#2\fii{\ifnum1=0 #1 \else #2 \fi} \begin{document} % original test case \ifelseconda{ hello1 }\else{ world1 \ifcondb{ hello2 }\fii }\fii ... ```
2
https://tex.stackexchange.com/users/174982
693041
321,523
https://tex.stackexchange.com/questions/693008
1
I have a long table which I need to include in my thesis appendix. However, I'm encountering an issue where, within certain rows, I have a list of genes that span over an entire page. Instead of these gene lists continuing onto a new page, they're being truncated. This problem persists across multiple rows in the table. How can I ensure that the table content flows seamlessly onto a new page instead of being cut off? I'm currently employing the `longtable` package, but I'm open to using alternative packages if they offer a better solution. (There are work arounds, but if someone finds a way to have the table automatically split across multiple pages, like it does in MS Word, then I will tick that answer) Here is the first two rows of my table: ``` \documentclass{article} \usepackage{longtable} \begin{document} \begin{longtable}{p{0.7in} >{\itshape}p{5in}} \caption{caption} \label{label} % Col names \hline \textbf{Group} & \textbf{Genes} \hline % contents of table: Group 1 & ANKRD54, APC2, ARFGEF2, C3orf20, C6orf223, COQ9, DLEU1, DNLZ, DYRK3, ECI1, ERMARD, FAHD1, FBL, FBXO22, FBXO5, GATAD1, GPR143, GRAMD4, HCFC1, HEATR3, HSPA4L, HTR7P1, HYAL2, IRF5, KIF2C, LOC100996724, LOC102723324, LOC105376933, LOC105379437, LOC107984436, LOC107985246, LOC112268051, LOC729609, LPAR1, MAK16, MBNL1-AS1, MCM6, MFSD13B, MISP3, MPHOSPH10, MSANTD4, MYC, NHEJ1, NUP62, PIGM, PLA2G6, PNO1, PTTG2, RBM4B, SEMA7A, SLC52A2, SMAD7, SNORD36A, STT3A-AS1, TCERG1, THTPA, TIGD4, TIPIN, TMEM169, TNFAIP1, UGGT2, USP24, USP32P2, WDR77, ZDHHC4, ZNF142, ZNF320, ZNF584, ZNF815P\\ Group 2 & ABHD13, ABHD18, ABHD5, ABRACL, ABRAXAS1, ACBD3, ACSL4, ADD1, ADI1, AGO4, AHCTF1, AHCTF1P1, AIF1, AMFR, ANAPC13, ANKIB1, ANKRD42, ANP32B, ANXA11, ANXA3, AP3B1, AP3S1, APOL6, ARHGAP45, ARHGEF11, ARL3, ARL6IP4, ARPC4, ARPC5, ASH2L, ATAD1, ATF4, ATG4B, ATOX1, ATP5F1E, ATP5IF1, ATP5MC2, ATP5ME, ATP5MF, ATP5MG, ATP5MPL, ATP5PB, ATP7A, ATRX, BAG1, BBIP1, BICD2, BICRAL, BLOC1S2, BLZF1, BRCA1, BTBD10, BUD31, C11orf54, C19orf53, C2orf76, C4orf3, C4orf48, C5AR2, C6orf89, CAB39, CAB39L, CABP7, CALM1, CALM2, CALM3, CAMTA1, CARS2, CASC4, CASTOR2, CBFA2T3, CBFB, CBWD1, CBX1, CCDC13, CCDC146, CCDC170, CCDC71L, CCDC9, CD37, CD59, CDC40, CDK11A, CDKN2D, CEMIP2, CEP19, CEP57, CEP63, CFAP45, CFDP1, CHCHD7, CHD8, CHFR, CIAO1, CIAO2A, CINP, CIR1, CLEC12B, CLEC2B, CLMP, CLN8, CMTM2, CNBP, CNOT7, COMMD2, COMMD6, COP1, COPS5, COX14, COX17, COX5A, COX5B, COX6A1, COX6B1, COX8A, CPEB2, CPSF7, CREB5, CSNK1G3, CSTA, CTCF, CTDNEP1, CUL4B, CUX1, CXorf38, CYB561D2, CYB5B, CYB5R1, CYSLTR1, CYTOR, DAD1, DAPK1, DAPP1, DBI, DCAF7, DEF6, DEK, DENND10, DENND10P1, DIP2B, DNAJA2, DNAJB14, DNAJB6, DPH3, DPP8, DRC1, DTX3L, DUSP22, DYNLRB1, DYNLT1, EAF2, EEF1B2, EEPD1, EGLN1, EIF2S2, EIF4EBP1, EIF4EBP2, ELMOD2, ELOB, EMBP1, EMSY, ENY2, ERF, ESD, EVI2A, EVI2B, EXOSC3, FAM133B, FAM136A, FAM160B1, FAM200B, FAM204A, FAM49A, FAM76B, FAR1, FAS, FAU, FBXL3, FBXL4, FCGR1B, FIG4, FIS1, FLI1, FOCAD, FOSB, FOXJ2, FOXJ3, FRAT2, FUT4, GABARAP, GALM, GDAP2, GIMAP4, GLRX, GLRX3, GLYR1, GMFG, GNAQ, GNG5, GOLT1B, GPN3, GPR141, GPR27, GPS2, GPSM3, GRIPAP1, GRK3, GSN, GSR, GSTK1, GSTP1, H2AC6, H2AZ1, H2BC4, H3-3A, H4C8, HADHB, HLA-B, HLX, HMCES, HMGB1, HMGN2, HMGN4, HNRNPA1, HNRNPDL, HRH2, HSBP1, HSP90B2P, HSPB11, HSPD1, HTATIP2, IFI6, IFIT5, IFITM2, IGFLR1, IGSF6, IL17RA, INTS8, IRF1, ISCU, ITM2B, ITPR2, JPT1, KCTD12, KIAA1143, KIAA2013, KIDINS220, KIF2A, KPNA4, KPNB1, LAGE3, LAMTOR2, LAMTOR4, LAMTOR5, LARP7, LASP1, LEPROT, LEPROTL1, LIN7C, LINC00623, LINC00910, LINC01138, LINC01506, LINC02067, LINC02158, LIX1L, LLPH, LOC100506023, LOC100507507, LOC101928595, LOC102723373, LOC102723878, LOC105372421, LOC105372499, LOC105373098, LOC105373582, LOC105374102, LOC105374121, LOC105374985, LOC105375713, LOC105376244, LOC105376287, LOC105376512, LOC105376786, LOC105377067, LOC105378819, LOC107984747, LOC107986158, LOC107987225, LOC112268267, LOC643072, LPIN2, LSM3, LST1, LXN, LY96, LYPLA1, LYRM1, LYST, LYZ, MACROH2A1, MALSU1, MAN1A2, MAP2K4, MAPK1, MBD2, MCTS1, MED10, MED11, MED13L, MED25, METTL14, MICOS10, MIR142, MIR22HG, MMP25, MPC2, MRPL50, MRPL53, MRPS31, MRPS36, MS4A6A, MSRA, MTHFD2, MTMR1, MYLIP, NAA38, NACA4P, NAT9, NCF2, NDRG3, NDUFA1, NDUFA12, NDUFA2, NDUFA4, NDUFA5, NDUFA7, NDUFB1, NDUFB3, NDUFB6, NDUFV3, NEDD8, NEK7, NFRKB, NFYA, NLRC5, NMNAT1, NOP10, NOTCH1, NSD3, NSMCE1-DT, NTMT1, NUDT16, NUTF2, OARD1, OGFR, ORC4, ORMDL2, OSER1, OST4, OXR1, P2RY13, PABPC1, PAIP2, PARP14, PCMT1, PDCD4-AS1, PDPK1, PDPR, PELI2, PGLS, PGM2, PGM5, PHF21A, PHKB, PIGX, PIK3CD, PIN4, PLEKHA3, PLPBP, PNPT1, POLR2I, POLR2J, PPM1A, PPM1F, PPM1M, PPP2R5C, PQBP1, PRDX5, PRPF18, PRPF4B, PRR34-AS1, PRRG4, PSMA5, PSMA7, PSMB3, PSMB7, PSMB8, PSMD10, PSMD6, PSME1, PSME2, PSME4, PSTPIP1, PTBP2, PTENP1, PTOV1-AS2, PTPRN2, PXN, PYCARD, RAB33B, RAB5IF, RABAC1, RABGAP1, RABIF, RALBP1, RALY, RANBP3, RARA, RARS2, RASGRP2, RASSF3, RBM17, RBM26, RBP7, RCBTB2, RCOR1, RELCH, REM2, RFX1, RGS14, RHOT1, RNF114, RNF141, RNF145, RNF181, RNF20, RNF213, RNF38, RNF44, RNFT1, RNPEP, ROPN1L, RP2, RPA3, RPL13, RPL21, RPL23A, RPL24, RPL26, RPL27A, RPL29, RPL34, RPL35A, RPL36AL, RPL37, RPL38, RPL7A, RPL9, RPS11, RPS12, RPS15, RPS19, RPS19BP1, RPS24, RPS26, RPS27A, RPS3, RPS7, RPS9, RRP12, RSRP1, RTN4, RUFY2, S100A11, S100A12, S100A4, S100A6, S100A8, S100A9, S1PR4, SAP18, SAR1A, SBF2, SCAF8, SCARNA10, SCFD1, SCNM1, SDHB, SDHD, SEC11A, SEC22C, SEMA4A, SEMA4D, SENP5, SENP6, SERTAD3, SF3A1, SF3B5, SF3B6, SFPQ, SFSWAP, SGPL1, SH3GLB1, SIAH2, SLC25A5, SLC31A1, SLC35A1, SLC44A2, SLC45A4, SLC48A1, SLC8A1-AS1, SLCO3A1, SMARCA5, SMIM14, SMIM25, SMIM26, SMIM27, SMIM7, SNAPC5, SNF8, SNORA105A, SNORD141B, SNORD14D, SNORD14E, SNRK, SNRNP25, SNRNP27, SNRNP70, SNRPE, SNTB1, SNX2, SNX3, SP140, SP140L, SPCS1, SPIDR, SPTLC2, SREK1IP1, SRP14, SRSF9, SS18L2, ST3GAL6, STAG1, STAMBP, STAT2, STEAP4, STX3, STXBP5, SULT1B1, SUPT16H, SVBP, SWAP70, SYF2, TACC1, TAF10, TAF12, TARDBP, TBC1D1, TBCA, TBL1X, TFEB, TGFBR2, THAP1, THOC2, TIAL1, TIMM8B, TIPRL, TMA7, TMCO1, TMCO6, TMEM107, TMEM131L, TMEM144, TMEM14B, TMEM159, TMEM199, TMEM219, TMEM30A, TMEM50A, TMEM70, TMSB4X, TOPORS, TOR1AIP2, TPRG1L, TPST2, TRADD, TRAF3IP2-AS1, TRAPPC1, TRAPPC6B, TRDMT1, TRIOBP, TRMT10A, TRMT112, TSPAN2, TTC1, TTC17, TTC9C, TUBA1C, TUBGCP4, TUSC2, TXN, TXNDC17, TXNDC9, TXNIP, TXNL4B, TYROBP, U2AF1L5, UBA3, UBA52, UBC, UBE2D1, UBE2K, UBE2L3, UBE2R2, UBR3, UNC93B1, UPF2, UQCR10, UQCR11, UQCRC1, USP25, USP47, UTP6, VAMP3, VAMP4, VAMP5, VAPA, VNN2, VPS29, VPS36, VPS41, WBP4, WDR82, WDR83OS, WIPF1, WIPI1, XAF1, XPNPEP3, YIPF1, YPEL5, YY1, ZBTB18, ZBTB34, ZBTB8OS, ZCCHC9, ZDHHC17, ZFAS1, ZFP36L2, ZFP91, ZMAT2, ZMAT5, ZNF200, ZNF271P, ZNF284, ZNF516, ZNF641, ZNF700, ZNF770, ZNF776, ZNF90, ZNHIT1\\ \end{longtable} \end{document} ```
https://tex.stackexchange.com/users/284206
Managing Longtable with Single-Row Contents Exceeding One Page's Length and Being Truncated
false
If you persist to use table even if for it you need to use `\tiny` font size and squish it on single page, than you may consider to use simple table in `sidewaystable` of `rotating` packages and for horizontal table lines use rules defined in the `booktabs package: ``` \documentclass{article} \usepackage{rotating} \usepackage{booktabs, tabularx} \begin{document} \begin{sidewaystable} \caption{caption} \label{label} \tiny % Make table text tiny \setlength\tabcolsep{4pt} \begin{tabularx}{\linewidth}{@{}l >{\itshape}X @{}} \toprule % column headers \textbf{Group} & \textbf{Genes} \\ \midrule % contents of table: Group 1 & ANKRD54, APC2, ARFGEF2, C3orf20, C6orf223, COQ9, DLEU1, DNLZ, DYRK3, ECI1, ERMARD, FAHD1, FBL, FBXO22, FBXO5, GATAD1, GPR143, GRAMD4, HCFC1, HEATR3, HSPA4L, HTR7P1, HYAL2, IRF5, KIF2C, LOC100996724, LOC102723324, LOC105376933, LOC105379437, LOC107984436, LOC107985246, LOC112268051, LOC729609, LPAR1, MAK16, MBNL1-AS1, MCM6, MFSD13B, MISP3, MPHOSPH10, MSANTD4, MYC, NHEJ1, NUP62, PIGM, PLA2G6, PNO1, PTTG2, RBM4B, SEMA7A, SLC52A2, SMAD7, SNORD36A, STT3A-AS1, TCERG1, THTPA, TIGD4, TIPIN, TMEM169, TNFAIP1, UGGT2, USP24, USP32P2, WDR77, ZDHHC4, ZNF142, ZNF320, ZNF584, ZNF815P\\ \addlinespace Group 2 & ABHD13, ABHD18, ABHD5, ABRACL, ABRAXAS1, ACBD3, ACSL4, ADD1, ADI1, AGO4, AHCTF1, AHCTF1P1, AIF1, AMFR, ANAPC13, ANKIB1, ANKRD42, ANP32B, ANXA11, ANXA3, AP3B1, AP3S1, APOL6, ARHGAP45, ARHGEF11, ARL3, ARL6IP4, ARPC4, ARPC5, ASH2L, ATAD1, ATF4, ATG4B, ATOX1, ATP5F1E, ATP5IF1, ATP5MC2, ATP5ME, ATP5MF, ATP5MG, ATP5MPL, ATP5PB, ATP7A, ATRX, BAG1, BBIP1, BICD2, BICRAL, BLOC1S2, BLZF1, BRCA1, BTBD10, BUD31, C11orf54, C19orf53, C2orf76, C4orf3, C4orf48, C5AR2, C6orf89, CAB39, CAB39L, CABP7, CALM1, CALM2, CALM3, CAMTA1, CARS2, CASC4, CASTOR2, CBFA2T3, CBFB, CBWD1, CBX1, CCDC13, CCDC146, CCDC170, CCDC71L, CCDC9, CD37, CD59, CDC40, CDK11A, CDKN2D, CEMIP2, CEP19, CEP57, CEP63, CFAP45, CFDP1, CHCHD7, CHD8, CHFR, CIAO1, CIAO2A, CINP, CIR1, CLEC12B, CLEC2B, CLMP, CLN8, CMTM2, CNBP, CNOT7, COMMD2, COMMD6, COP1, COPS5, COX14, COX17, COX5A, COX5B, COX6A1, COX6B1, COX8A, CPEB2, CPSF7, CREB5, CSNK1G3, CSTA, CTCF, CTDNEP1, CUL4B, CUX1, CXorf38, CYB561D2, CYB5B, CYB5R1, CYSLTR1, CYTOR, DAD1, DAPK1, DAPP1, DBI, DCAF7, DEF6, DEK, DENND10, DENND10P1, DIP2B, DNAJA2, DNAJB14, DNAJB6, DPH3, DPP8, DRC1, DTX3L, DUSP22, DYNLRB1, DYNLT1, EAF2, EEF1B2, EEPD1, EGLN1, EIF2S2, EIF4EBP1, EIF4EBP2, ELMOD2, ELOB, EMBP1, EMSY, ENY2, ERF, ESD, EVI2A, EVI2B, EXOSC3, FAM133B, FAM136A, FAM160B1, FAM200B, FAM204A, FAM49A, FAM76B, FAR1, FAS, FAU, FBXL3, FBXL4, FCGR1B, FIG4, FIS1, FLI1, FOCAD, FOSB, FOXJ2, FOXJ3, FRAT2, FUT4, GABARAP, GALM, GDAP2, GIMAP4, GLRX, GLRX3, GLYR1, GMFG, GNAQ, GNG5, GOLT1B, GPN3, GPR141, GPR27, GPS2, GPSM3, GRIPAP1, GRK3, GSN, GSR, GSTK1, GSTP1, H2AC6, H2AZ1, H2BC4, H3-3A, H4C8, HADHB, HLA-B, HLX, HMCES, HMGB1, HMGN2, HMGN4, HNRNPA1, HNRNPDL, HRH2, HSBP1, HSP90B2P, HSPB11, HSPD1, HTATIP2, IFI6, IFIT5, IFITM2, IGFLR1, IGSF6, IL17RA, INTS8, IRF1, ISCU, ITM2B, ITPR2, JPT1, KCTD12, KIAA1143, KIAA2013, KIDINS220, KIF2A, KPNA4, KPNB1, LAGE3, LAMTOR2, LAMTOR4, LAMTOR5, LARP7, LASP1, LEPROT, LEPROTL1, LIN7C, LINC00623, LINC00910, LINC01138, LINC01506, LINC02067, LINC02158, LIX1L, LLPH, LOC100506023, LOC100507507, LOC101928595, LOC102723373, LOC102723878, LOC105372421, LOC105372499, LOC105373098, LOC105373582, LOC105374102, LOC105374121, LOC105374985, LOC105375713, LOC105376244, LOC105376287, LOC105376512, LOC105376786, LOC105377067, LOC105378819, LOC107984747, LOC107986158, LOC107987225, LOC112268267, LOC643072, LPIN2, LSM3, LST1, LXN, LY96, LYPLA1, LYRM1, LYST, LYZ, MACROH2A1, MALSU1, MAN1A2, MAP2K4, MAPK1, MBD2, MCTS1, MED10, MED11, MED13L, MED25, METTL14, MICOS10, MIR142, MIR22HG, MMP25, MPC2, MRPL50, MRPL53, MRPS31, MRPS36, MS4A6A, MSRA, MTHFD2, MTMR1, MYLIP, NAA38, NACA4P, NAT9, NCF2, NDRG3, NDUFA1, NDUFA12, NDUFA2, NDUFA4, NDUFA5, NDUFA7, NDUFB1, NDUFB3, NDUFB6, NDUFV3, NEDD8, NEK7, NFRKB, NFYA, NLRC5, NMNAT1, NOP10, NOTCH1, NSD3, NSMCE1-DT, NTMT1, NUDT16, NUTF2, OARD1, OGFR, ORC4, ORMDL2, OSER1, OST4, OXR1, P2RY13, PABPC1, PAIP2, PARP14, PCMT1, PDCD4-AS1, PDPK1, PDPR, PELI2, PGLS, PGM2, PGM5, PHF21A, PHKB, PIGX, PIK3CD, PIN4, PLEKHA3, PLPBP, PNPT1, POLR2I, POLR2J, PPM1A, PPM1F, PPM1M, PPP2R5C, PQBP1, PRDX5, PRPF18, PRPF4B, PRR34-AS1, PRRG4, PSMA5, PSMA7, PSMB3, PSMB7, PSMB8, PSMD10, PSMD6, PSME1, PSME2, PSME4, PSTPIP1, PTBP2, PTENP1, PTOV1-AS2, PTPRN2, PXN, PYCARD, RAB33B, RAB5IF, RABAC1, RABGAP1, RABIF, RALBP1, RALY, RANBP3, RARA, RARS2, RASGRP2, RASSF3, RBM17, RBM26, RBP7, RCBTB2, RCOR1, RELCH, REM2, RFX1, RGS14, RHOT1, RNF114, RNF141, RNF145, RNF181, RNF20, RNF213, RNF38, RNF44, RNFT1, RNPEP, ROPN1L, RP2, RPA3, RPL13, RPL21, RPL23A, RPL24, RPL26, RPL27A, RPL29, RPL34, RPL35A, RPL36AL, RPL37, RPL38, RPL7A, RPL9, RPS11, RPS12, RPS15, RPS19, RPS19BP1, RPS24, RPS26, RPS27A, RPS3, RPS7, RPS9, RRP12, RSRP1, RTN4, RUFY2, S100A11, S100A12, S100A4, S100A6, S100A8, S100A9, S1PR4, SAP18, SAR1A, SBF2, SCAF8, SCARNA10, SCFD1, SCNM1, SDHB, SDHD, SEC11A, SEC22C, SEMA4A, SEMA4D, SENP5, SENP6, SERTAD3, SF3A1, SF3B5, SF3B6, SFPQ, SFSWAP, SGPL1, SH3GLB1, SIAH2, SLC25A5, SLC31A1, SLC35A1, SLC44A2, SLC45A4, SLC48A1, SLC8A1-AS1, SLCO3A1, SMARCA5, SMIM14, SMIM25, SMIM26, SMIM27, SMIM7, SNAPC5, SNF8, SNORA105A, SNORD141B, SNORD14D, SNORD14E, SNRK, SNRNP25, SNRNP27, SNRNP70, SNRPE, SNTB1, SNX2, SNX3, SP140, SP140L, SPCS1, SPIDR, SPTLC2, SREK1IP1, SRP14, SRSF9, SS18L2, ST3GAL6, STAG1, STAMBP, STAT2, STEAP4, STX3, STXBP5, SULT1B1, SUPT16H, SVBP, SWAP70, SYF2, TACC1, TAF10, TAF12, TARDBP, TBC1D1, TBCA, TBL1X, TFEB, TGFBR2, THAP1, THOC2, TIAL1, TIMM8B, TIPRL, TMA7, TMCO1, TMCO6, TMEM107, TMEM131L, TMEM144, TMEM14B, TMEM159, TMEM199, TMEM219, TMEM30A, TMEM50A, TMEM70, TMSB4X, TOPORS, TOR1AIP2, TPRG1L, TPST2, TRADD, TRAF3IP2-AS1, TRAPPC1, TRAPPC6B, TRDMT1, TRIOBP, TRMT10A, TRMT112, TSPAN2, TTC1, TTC17, TTC9C, TUBA1C, TUBGCP4, TUSC2, TXN, TXNDC17, TXNDC9, TXNIP, TXNL4B, TYROBP, U2AF1L5, UBA3, UBA52, UBC, UBE2D1, UBE2K, UBE2L3, UBE2R2, UBR3, UNC93B1, UPF2, UQCR10, UQCR11, UQCRC1, USP25, USP47, UTP6, VAMP3, VAMP4, VAMP5, VAPA, VNN2, VPS29, VPS36, VPS41, WBP4, WDR82, WDR83OS, WIPF1, WIPI1, XAF1, XPNPEP3, YIPF1, YPEL5, YY1, ZBTB18, ZBTB34, ZBTB8OS, ZCCHC9, ZDHHC17, ZFAS1, ZFP36L2, ZFP91, ZMAT2, ZMAT5, ZNF200, ZNF271P, ZNF284, ZNF516, ZNF641, ZNF700, ZNF770, ZNF776, ZNF90, ZNHIT1\\ \bottomrule \end{tabularx} \end{sidewaystable} \end{document} ``` Anyway, I would rather stick with solution provided by @David Carlisle.
0
https://tex.stackexchange.com/users/18189
693048
321,527
https://tex.stackexchange.com/questions/693005
1
Got this code from the website tried for hours to adopt it all I want to do is change the arrows in the middle of the parallelogram to the normal arrows seen in most mathematical text books >> but maybe a bit larger my MWE is below. ``` \documentclass{scrreprt} \usepackage{tikz} \usetikzlibrary{decorations.markings} \tikzset{% ->-/.style={decoration={markings, mark=at position 1.5 with {\arrow{>}}}, postaction={decorate}}, ->>-/.style={decoration={markings, mark=at position 1.0 with {\arrow{>>}}}, postaction={decorate}}, } \begin{document} \begin{tikzpicture}[meme/.pic={ \fill[red ] (150:6pt) to[bend right=10] (0:3pt) to[bend right=10] (-150:6pt)--cycle; }] \path (0,0) coordinate (A) (2,3) coordinate (B) (8,3) coordinate (C) (6,0) coordinate (D); \node [left] at (0,0) {D}; \node [left] at (2,3) {A}; \node [right] at (8,3) {B}; \node [right] at (6,0) {C}; \draw [thick] (2,3) -- (6,0); \draw[sloped] (A) --(B) pic[pos=.5]{meme} --(C) pic[pos=.46]{meme} pic[pos=.54]{meme} --(D) pic[pos=.5]{meme} --cycle pic[pos=.46]{meme} pic[pos=.54]{meme}; \end{tikzpicture} \end{document} ```
https://tex.stackexchange.com/users/149116
Arrows on Parallelogram
true
I took inspiration from [a quick Google search](https://images.app.goo.gl/wj9p3sG5zzW5XYzPA). I prefer the `arrow` pic over using the `decorations.markings` library. The first line of its code shifts the drawing so that the middle of the whole construct is where we want it (otherwise the tips wouldn't be symmetric). These pics are placed via an `edge node` style so that we don't have to write out each pic specification. The example shows two ways to double such an arrow: 1. Using `>>` in the `->>-` style which just adds the second arrow tip right behind the first one. 2. Using `->-` which a `>` specification of a double arrow tip (because I want a `sep`eration between those Bars). Code ---- ``` \documentclass[tikz]{standalone} \usetikzlibrary{arrows.meta, quotes} \tikzset{ reversed/.style={xscale=-1}, pics/arrow/.style={/tikz/sloped, /tikz/allow upside down, code=% \pgfarrowtotallength{#1}\tikzset{xshift/.expanded=.5*\csname pgf@x\endcsname}% \pgfarrowdraw{#1}}, pics/arrow/.default=>} \begin{document} \tikz[ line join=round, Arr/.tip={Straight Barb[angle'=60, scale=2]}, ||/.tip={Bar[sep] . Bar}, > = Arr, ->-/.style={edge node={pic[#1]{arrow}}}, ->>-/.style={edge node={pic[#1]{arrow=>>}}}, ] \draw[thick, draw=purple] (0, 0) coordinate["$D$" left] (D) to[->>-] (2, 3) coordinate["$A$" left] (A) to[->-] (8, 3) coordinate["$B$" right] (B) to[->>-=reversed] (6, 0) coordinate["$C$" right] (C) to[->- =reversed] cycle coordinate["$E$"] (E) at (intersection of D--B and A--C) [behind path, every edge/.append style={black, thin}, arrows={[slant=.2]}] (A) edge[>=||, ->-=near start, ->-=near end] (C) (B) edge[>=|, ->-=near start, ->-=near end] (D); \end{document} ``` Output ------
2
https://tex.stackexchange.com/users/16595
693057
321,530
https://tex.stackexchange.com/questions/693051
0
I've been trying to split highlighted text into lines and not go over the margin in the `itemize` environment, but `linegoal` calculates the wrong margin in `itemize`. Also, the highlighting always gets to the end of the line, not the end of the text. Is it possible to make it go to the end of the text instead? Thank you! Minimal working example: ``` \documentclass{book} \usepackage{hyperref} \usepackage{soul} \usepackage[top=4cm,bottom=4cm,left=3cm,right=3cm,asymmetric]{geometry} \usepackage[dvipsnames, table]{xcolor} \usepackage{color, linegoal} \begin{document} \large \colorbox{yellow}{\parbox[t]{\linegoal}{This is pretty much fine, I guess, but this doesn't really work in itemize environment, also if possible get rid of the yellow space to the right of this text.}} \begin{itemize} \item \colorbox{yellow}{\parbox[t]{\linegoal}{This doesn't work, it is short by a little, and if possible, get rid of the yellow space to the right of this text as well.}} \end{itemize} \end{document} ``` Thank you!
https://tex.stackexchange.com/users/267647
Highlighting Text and Making it Go to the Next Line in Itemize, and Removing Space at End of Highlighting, with Soul and Linegoal
true
You need to issue `\linegoal` before doing the `\parbox`. Here I add `showframe` just to show the margins of the text block. ``` \documentclass{book} \usepackage{soul} \usepackage[top=4cm,bottom=4cm,left=3cm,right=3cm,asymmetric,showframe]{geometry} \usepackage[dvipsnames, table]{xcolor} \usepackage{linegoal} \usepackage{hyperref} \makeatletter \newcommand{\highlightparbox}[1]{% \noindent \dimen@=\linegoal \dimen@=\dimexpr\dimen@-2\fboxsep+\@totalleftmargin\relax \colorbox{yellow}{\parbox[t]{\dimen@}{#1}}% } \makeatother \begin{document} \highlightparbox{This is pretty much fine, I guess, but this doesn't really work in itemize environment, also if possible get rid of the yellow space to the right of this text.} \begin{itemize} \item \highlightparbox{This doesn't work, it is short by a little, and if possible, get rid of the yellow space to the right of this text as well.} \end{itemize} \end{document} ```
1
https://tex.stackexchange.com/users/4427
693061
321,533
https://tex.stackexchange.com/questions/693042
3
On my local machine, running TeXLive 2022 I can get the following code to work just fine ``` \documentclass[ a4paper , onecolumn , superscriptaddress , 10pt % , draft , accepted=2022-02-14 , issue=6 , volume=5 , shorttitle=papers/compositionality-5-6 ]{compositionalityarticle} \pdfoutput=1 \usepackage{hyperref} \begin{document} \title{Xxxxxxxxxxxxx xxxxx-xxxxx xxxxxxxx xxx xxx xxxxxxxx xxxxxxxxx xxxxx xxx xxxxxxxxxx} \maketitle \end{document} ``` where `compositionalityarticle.cls` is available from [this GitHub repo](https://github.com/Compositionality/compositionality-latex-template/blob/main/compositionalityarticle.cls) (and one needs [this image](https://github.com/Compositionality/compositionality-latex-template/blob/main/logo-eps-converted-to.pdf) to avoid an error). In testing this on the arXiv's current setup (TeXLive 2023), the title does not line-wrap. However, if I uncomment the `draft` option, then the arXiv's TeX engine gives the intended behaviour. The piece of the `.cls` file that handles making the title contains the following commands, which I hope is enough for people to see what might be going wrong: ``` %title \def\@printtitle{% {% \iftoggle{@unpublished}% {% \@printtitletextwithappropriatefontsize% }% {% \edef\@titleexpanded{\detokenize\expandafter{\@title}}% \iftoggle{@xstring}% {\saveexploremode\exploregroups\StrSubstitute{\@titleexpanded}{ }{\%20}[\@titleforurl]\restoreexploremode}% {\gdef\@titleforurl{\@titleexpanded}}% \href{https://compositionality-journal.org/\@shorttitle/} {% \color{compositionalitypink}{% \@printtitletextwithappropriatefontsize\unskip% }% }% }% }% } ``` and ``` \def\@maketitle{% \sffamily \null \let \footnote \thanks \noindent% \begin{minipage}{\textwidth}% \iftoggle{@titlepage}{\centering}{}% \noindent{\huge\hyphenpenalty=5000 \@printtitle\par}% \end{minipage}% \vskip 1.5em% \noindent\@printauthors \vskip 1em% \noindent\@printaffiliations \vskip 0em% \ifdefempty{\@date}{}{\noindent{\footnotesize\color{compositionalitygray}\@date}}% \par \vskip 1.5em \makeatletter% \begingroup \hypersetup{% pdftitle={\detokenize\expandafter{\@title}}, pdfauthor={\@authorsonly}, pdfkeywords={\@keywords}, pdfcreator={LaTeX with hyperref package and class compositionalityarticle \csname ver@compositionalityarticle.cls\endcsname}, }% \endgroup \makeatother% } ``` Here's something from the log in the broken compile: ``` (./compositionality_test.out) (./compositionality_test.out) Underfull \hbox (badness 10000) in paragraph at lines 21--21 []\OT1/lmss/m/n/24.88 Xxxxxxxxxxxxx xxxxx-xxxxx xxxxxxxx Underfull \hbox (badness 2229) in paragraph at lines 21--21 \OT1/lmss/m/n/24.88 xxx xxx xxxxxxxx xxxxxxxxx xxxxx xxx Underfull \hbox (badness 10000) in paragraph at lines 21--21 []\OT1/lmss/m/n/20.74 Xxxxxxxxxxxxx xxxxx-xxxxx xxxxxxxx xxx xxx Overfull \hbox (286.71513pt too wide) in paragraph at lines 21--21 [][][][][][] ``` but here's the corresponding part of the working compile on my machine ``` \@titelsaveboxHuge=\box54 Underfull \hbox (badness 10000) in paragraph at lines 18--18 []\OT1/lmss/m/n/24.88 Xxxxxxxxxxxxx xxxxx-xxxxx xxxxxxxx [] Underfull \hbox (badness 2229) in paragraph at lines 18--18 \OT1/lmss/m/n/24.88 xxx xxx xxxxxxxx xxxxxxxxx xxxxx xxx [] \@titelsaveboxHugeoneline=\box55 \@titelsaveboxhhuge=\box56 Underfull \hbox (badness 10000) in paragraph at lines 18--18 []\OT1/lmss/m/n/20.74 Xxxxxxxxxxxxx xxxxx-xxxxx xxxxxxxx xxx xxx [] Underfull \hbox (badness 10000) in paragraph at lines 18--18 [][][]\OT1/lmss/m/n/20.74 Xxxxxxxxxxxxx xxxxx-xxxxx xxxxxxxx xxx xxx [] ``` It might be these are useful to see what is going on.
https://tex.stackexchange.com/users/141
Title flowing off page in arXiv (TeXLive 2023) but not locally (TeXLive 2022), unless draft option enabled
true
Imho arxiv wants to find the `\pdfoutput=1` in the first 5 lines and in your document it is too late as you have too many class options. This means that arxiv is not correctly switching to pdflatex and the links can't break. Add the `\pdfoutput=1` before the class and use in the class options `nopdfoutputerror` to avoid that it reverts the settings again. (Imho the class is trying to be too clever with all its arxiv detection code and options. And arxiv should offer a proper option to select the engine.).
6
https://tex.stackexchange.com/users/2388
693063
321,534
https://tex.stackexchange.com/questions/693052
0
I want to get "(4c)-(4e)" instead on produced wrong "(4a)" in the last line. I also got error. ``` \documentclass{article} \usepackage{amsmath} \usepackage[colorlinks=true, allcolors=blue]{hyperref} % for adjustting large optimization problems \usepackage{IEEEtrantools} % % for reference ... \usepackage[noabbrev]{cleveref} \newcommand\crefrangeconjunction{\textendash} \crefname{equation}{}{} \begin{document} We have the following equations: \begin{align} &1 = 1 \label{eq:Ymin}\\ & 2 = 2 \label{eq:Omax} \\ & 3 = 3 \label{eq:Vmin} \end{align} \begin{subequations}\label{OptDet} \begin{IEEEeqnarray}{s,l} &\IEEEeqnarraymulticol{1}{l}{x\label{OptDet:Obj} }\\ s.t. & t = 1,\dots,T\nonumber\\ & 1 = 1 \label{OptDet:ConstQ} \\ & 1 \leq 1 \IEEEyesnumber \label{OptDet:ConstYmin}\IEEEyessubnumber\label{OptDet:ConstYminA} \\ &1 \leq 1\IEEEyessubnumber\label{OptDet:ConstYminB} \\ &1 \geq 1\IEEEyessubnumber\label{OptDet:ConstYminC} \\ &1 \geq 1\IEEEyessubnumber\label{OptDet:ConstYminD} \\ &2 \geq 2 \IEEEyesnumber \label{OptDet:ConstOmax}\IEEEyessubnumber\label{OptDet:ConstOmaxA} \\ &2 \geq 2 \IEEEyessubnumber\label{OptDet:ConstOmaxB} \\ &2 \leq 2 \IEEEyessubnumber\label{OptDet:ConstOmaxC} \\ &2 \leq 2 \IEEEyessubnumber\label{OptDet:ConstOmaxD} \\ &3 \leq 3 \IEEEyesnumber \label{OptDet:ConstVmin}\IEEEyessubnumber\label{OptDet:ConstVminA} \\ &3 \leq 3 \IEEEyessubnumber\label{OptDet:ConstVminB} \\ &3 \geq 3 \IEEEyessubnumber\label{OptDet:ConstVminC} \\ &3 \geq 3 \IEEEyessubnumber\label{OptDet:ConstVminD} \end{IEEEeqnarray} \end{subequations} We have three sets of constraints \cref{OptDet:ConstYmin,OptDet:ConstOmax,OptDet:ConstVmin}, respectively, corresponding to the three equations \cref{eq:Ymin,eq:Omax,eq:Vmin}. \end{document} ``` I want to definitely use `IEEEtrantools` in the `article` class and also use `cleveref` for referencing.
https://tex.stackexchange.com/users/302026
Error in citing more than two subequations in IEEEtrantools with \cref
true
This particular example works (almost) out of the box with `zref-clever`, in case you'd like to try it out. The only adjustment needed is to set currentcounter inside `IEEEeqnarray` because of how `amsmath`'s `subequation` handles counters. However, @UlrikeFischer is right in saying that `zref-clever` provides no special support for `IEEEtrans`. This should normally not be a problem, but since, as she says, it does lots of special numbering, it may be a problem. Truth is, I'm not acquainted with `IEEEtrans`, and haven't checked it to work well with `zref-clever`. So, if you choose to use it, beware of possible edge cases. ``` \documentclass{article} \usepackage{amsmath} \usepackage{zref-clever} \AddToHook{env/IEEEeqnarray/begin}{% \zcsetup{ currentcounter = equation }% } \zcRefTypeSetup{equation}{ rangesep=\textendash, name-sg=, name-pl=, Name-sg=, Name-pl=, } \usepackage[colorlinks=true, allcolors=blue]{hyperref} % for adjustting large optimization problems \usepackage{IEEEtrantools} \begin{document} We have the following equations: \begin{align} &1 = 1 \label{eq:Ymin}\\ & 2 = 2 \label{eq:Omax} \\ & 3 = 3 \label{eq:Vmin} \end{align} \begin{subequations}\label{OptDet} \begin{IEEEeqnarray}{s,l} &\IEEEeqnarraymulticol{1}{l}{x\label{OptDet:Obj} }\\ s.t. & t = 1,\dots,T\nonumber\\ & 1 = 1 \label{OptDet:ConstQ} \\ & 1 \leq 1 \IEEEyesnumber \label{OptDet:ConstYmin}\IEEEyessubnumber\label{OptDet:ConstYminA} \\ &1 \leq 1\IEEEyessubnumber\label{OptDet:ConstYminB} \\ &1 \geq 1\IEEEyessubnumber\label{OptDet:ConstYminC} \\ &1 \geq 1\IEEEyessubnumber\label{OptDet:ConstYminD} \\ &2 \geq 2 \IEEEyesnumber \label{OptDet:ConstOmax}\IEEEyessubnumber\label{OptDet:ConstOmaxA} \\ &2 \geq 2 \IEEEyessubnumber\label{OptDet:ConstOmaxB} \\ &2 \leq 2 \IEEEyessubnumber\label{OptDet:ConstOmaxC} \\ &2 \leq 2 \IEEEyessubnumber\label{OptDet:ConstOmaxD} \\ &3 \leq 3 \IEEEyesnumber \label{OptDet:ConstVmin}\IEEEyessubnumber\label{OptDet:ConstVminA} \\ &3 \leq 3 \IEEEyessubnumber\label{OptDet:ConstVminB} \\ &3 \geq 3 \IEEEyessubnumber\label{OptDet:ConstVminC} \\ &3 \geq 3 \IEEEyessubnumber\label{OptDet:ConstVminD} \end{IEEEeqnarray} \end{subequations} We have three sets of constraints \zcref{OptDet:ConstYmin,OptDet:ConstOmax,OptDet:ConstVmin}, respectively, corresponding to the three equations \zcref{eq:Ymin,eq:Omax,eq:Vmin}. \end{document} ```
0
https://tex.stackexchange.com/users/105447
693064
321,535
https://tex.stackexchange.com/questions/510
393
Along the lines of [Why is \[ ... \] preferable to $$ ... $$?](https://tex.stackexchange.com/questions/503/why-are-and-preferable-to), what reasons are there (if any) to favor `\( ... \)` over `$ ... $`?
https://tex.stackexchange.com/users/206
Are \( and \) preferable to dollar signs for math mode?
false
Here are some mitigating factors for the disadvantages of `\(...\)`. * **Slower to type & frequently used**: This isn't an uncommon problem in TeX. For instance, `\mathbb{R}` for the real numbers, or every environment's `\begin{}...\end{}`. You can consider these problems on a case-by-case basis: perhaps you'd define the macro `\bbR` for `\mathbb{R}`, use `$...$` instead of `\(...\)`, and grow a stomach for writing environments. Alternatively, you can find an editor that can fix all these problems at once, e.g. via a [snippet engine](https://en.wikipedia.org/wiki/Snippet_(programming)). * **Harder to read than `$...$`**: If your formula has a lot of parentheses and slashes, then it *is* harder to read: + `\(f(x) = (x^2+1)/5\)` + `$f(x) = (x^2+1)/5$`Changing the spacing can help: + `\( f(x)=(x^2+1)/5 \)`You can even go so far as to write ``` \( f(x) = (x^2+1)/5 \) ``` This amount of spacing might appear excessive, but as the complexity of the expression increases, separating it from the surrounding text becomes more and more desirable. This applies equally to `$...$`. Again, if you're acquainted with a good editor, you can minimize the amount of typing you actually have to do.
2
https://tex.stackexchange.com/users/135633
693067
321,536
https://tex.stackexchange.com/questions/693066
2
I am preparing a document of class `article` in LaTex. I am required to include the figure captions, but provide the figures themselves as separate image files without incorporating them into the document. Therefore, I would like to create a section in my file containing all the figure captions, but format them basically like the rest of the "normal" text in the document. I believe someone asked a [similar question](https://tex.stackexchange.com/questions/30477/can-i-easily-reformat-a-document-to-place-figure-legends-on-a-separate-page) before, but wanted to create a list of figures to basically the same end by only printing the long title. However, I would like to know whether this is also possible by modifying e.g. the `\vspace` parameter. So far, I have used the following code for each of my figures: ``` \documentclass[12pt,a4paper]{article} \usepackage[a4paper,left=2.6cm, right=2.9cm, top=3.5cm, bottom=3.5cm]{geometry} \renewcommand{\baselinestretch}{2} \usepackage{lineno} \usepackage{caption} \captionsetup{justification=raggedright,singlelinecheck=false} \begin{document} \linenumbers \section{Some section} Some text \section{Figure legends} \begin{figure}[!h] \internallinenumbers \caption{This is my caption.} \label{fig:myfig} \vspace{-1.2cm} \end{figure} \begin{figure}[!h] \internallinenumbers \caption{This is my other caption.} \label{fig:myfig1} \vspace{-1.2cm} \end{figure} \clearpage \end{document} ``` This gives an output that is somewhat similar to what I need. However, I have the problem my last caption does not fit on the same page as the others and is therefore positioned in the middle of the following page. I have tried replacing `\begin{figure}[!h]` with `\begin{figure}[!t]`, but this does not yield the output I need. Instead I would like the caption to start in the first line of the new page. Also, I wonder whether there is a way to set the spacing between the different captions to equal that of lines in the rest of the text.
https://tex.stackexchange.com/users/290331
Space figure captions as the "normal" text
true
Given your requirements, it sounds like you don't need the `figure` environment at all. The `figure` environment is a floating environment, which means LaTeX can move it around to fit the overall layout of the page, and this is why you're seeing the unexpected positioning. Since you're not including any images, you can just use the `\captionof` command from the `caption` package to create captions outside a figure environment. This will treat the caption like normal text. Here is your adjusted code: ``` \documentclass[12pt,a4paper]{article} \usepackage[a4paper,left=2.6cm, right=2.9cm, top=3.5cm, bottom=3.5cm]{geometry} \renewcommand{\baselinestretch}{2} \usepackage{lineno} \usepackage{caption} \captionsetup{justification=raggedright,singlelinecheck=false} \begin{document} \linenumbers \section{Some section} Some text \section{Figure legends} \internallinenumbers \captionof{figure}{This is my caption.} \label{fig:myfig} \internallinenumbers \captionof{figure}{This is my other caption.} \label{fig:myfig1} \clearpage \end{document} ``` The `\captionof` command takes two arguments: the first is the type of caption (in this case, 'figure'), and the second is the actual caption text. This command will make the caption look like normal text and will not cause any unusual space before or after it.
2
https://tex.stackexchange.com/users/302135
693071
321,537
https://tex.stackexchange.com/questions/693075
1
I can't figure out how one puts data of a multipart nodes in a matrix. Is this allowed ? The Following MRE works well ``` \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{trees, shapes, arrows, arrows.meta, matrix, calc, graphs, plotmarks, backgrounds, cd} \begin{document} \begin{tikzpicture} \node[rectangle split, rectangle split parts=2] at (1,1) {1 \nodepart{second} A}; \matrix (M) [matrix of math nodes, nodes={rectangle split, rectangle split parts=2}] { X & 2 \\ }; \end{tikzpicture} \end{document} ``` However if I replace the X in the matrix by `{1 \nodepart{second} A}` with or without curly brace, I got ``` ERROR: Missing } inserted. --- TeX said --- <inserted text> } l.11 {1 \nodepart{second} A} & 2 \\ --- HELP --- TeX has become confused. The position indicated by the error locator is probably beyond the point where the incorrect input is. ``` Am I doing some obvious mistake ? Is there a workaround ?
https://tex.stackexchange.com/users/36872
tikz matrix of multipart nodes
false
I see, your question is about TikZ matrices in LaTeX. The issue you're encountering is due to how the node naming in TikZ matrices works. When you define a matrix of nodes in TikZ, each cell of the matrix automatically gets a node name following the pattern `matrixname-rownumber-columnnumber`. For example, the first cell in a matrix named `M` would be `M-1-1`. In your example, you're placing a node inside a matrix cell, which is also a node. This means that the node inside the cell doesn't automatically get a name following the usual pattern, hence the error "No shape named `M-1-1' is known." A workaround for this is to manually name the inner node, like this: ``` \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.multipart, matrix} \begin{document} \begin{tikzpicture} \matrix (M) [matrix of nodes, nodes={rectangle split, rectangle split parts=2, draw, anchor=center}] { \node[name=M-1-1] {1 \nodepart{second} A}; & 2 \\ }; \end{tikzpicture} \end{document} ``` In this code, `\node[name=M-1-1] {1 \nodepart{second} A}` names the node inside the first cell of the matrix `M-1-1`. Now you can refer to this node using the name `M-1-1` in other parts of your TikZ picture. Please let me know if this solves your problem or if you need further assistance.
0
https://tex.stackexchange.com/users/302135
693076
321,539
https://tex.stackexchange.com/questions/693066
2
I am preparing a document of class `article` in LaTex. I am required to include the figure captions, but provide the figures themselves as separate image files without incorporating them into the document. Therefore, I would like to create a section in my file containing all the figure captions, but format them basically like the rest of the "normal" text in the document. I believe someone asked a [similar question](https://tex.stackexchange.com/questions/30477/can-i-easily-reformat-a-document-to-place-figure-legends-on-a-separate-page) before, but wanted to create a list of figures to basically the same end by only printing the long title. However, I would like to know whether this is also possible by modifying e.g. the `\vspace` parameter. So far, I have used the following code for each of my figures: ``` \documentclass[12pt,a4paper]{article} \usepackage[a4paper,left=2.6cm, right=2.9cm, top=3.5cm, bottom=3.5cm]{geometry} \renewcommand{\baselinestretch}{2} \usepackage{lineno} \usepackage{caption} \captionsetup{justification=raggedright,singlelinecheck=false} \begin{document} \linenumbers \section{Some section} Some text \section{Figure legends} \begin{figure}[!h] \internallinenumbers \caption{This is my caption.} \label{fig:myfig} \vspace{-1.2cm} \end{figure} \begin{figure}[!h] \internallinenumbers \caption{This is my other caption.} \label{fig:myfig1} \vspace{-1.2cm} \end{figure} \clearpage \end{document} ``` This gives an output that is somewhat similar to what I need. However, I have the problem my last caption does not fit on the same page as the others and is therefore positioned in the middle of the following page. I have tried replacing `\begin{figure}[!h]` with `\begin{figure}[!t]`, but this does not yield the output I need. Instead I would like the caption to start in the first line of the new page. Also, I wonder whether there is a way to set the spacing between the different captions to equal that of lines in the rest of the text.
https://tex.stackexchange.com/users/290331
Space figure captions as the "normal" text
false
This creates a file of "normal" captions, one per page, no margins. You could add the images here as well. But since this is a separate file, `\label` will do no good. I got `\textwidth` from your document. Not sure what the line numbering was about, unless the captions count against the total number of lines (as opposed to being part of the image). ``` \documentclass[multi={figure}]{standalone} \usepackage{graphicx} \usepackage{caption} \captionsetup{justification=raggedright,singlelinecheck=false, position=below} \makeatletter \renewenvironment{figure}{\def\@captype{figure}\minipage{441.01773pt}}{\endminipage} \makeatother \begin{document} \begin{figure} \caption{This is my caption.} \end{figure} \begin{figure} \caption{This is my other caption.} \end{figure} \end{document} ```
2
https://tex.stackexchange.com/users/34505
693082
321,540
https://tex.stackexchange.com/questions/693023
5
Consider the following: ``` \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\demo}{m}{ \str_case:nnF{#1} { {a} {Run case 1\\ % Actually super long code } {b} {Run case 1\\ % Actually super long code } } { % False code } } \ExplSyntaxOff \begin{document} \demo{a} \demo{b} \end{document} ``` Is there any way I can define the "`b`" case without having to copy all of my "actually super long code"?
https://tex.stackexchange.com/users/34551
Grouping multiple matches with \str_case:nnF
false
The simplest solution that I found was to call the macro again with the other argument, as follows: ``` \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\demo}{m}{ \str_case:nnF{#1} { {a} {Run case 1\\ % Actually super long code } {b} { \demo{a} } } { % False code } } \ExplSyntaxOff \begin{document} \demo{a} \demo{b} \end{document} ``` It may be restricted to my particular use case, but it works fine.
1
https://tex.stackexchange.com/users/34551
693085
321,542
https://tex.stackexchange.com/questions/693075
1
I can't figure out how one puts data of a multipart nodes in a matrix. Is this allowed ? The Following MRE works well ``` \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{trees, shapes, arrows, arrows.meta, matrix, calc, graphs, plotmarks, backgrounds, cd} \begin{document} \begin{tikzpicture} \node[rectangle split, rectangle split parts=2] at (1,1) {1 \nodepart{second} A}; \matrix (M) [matrix of math nodes, nodes={rectangle split, rectangle split parts=2}] { X & 2 \\ }; \end{tikzpicture} \end{document} ``` However if I replace the X in the matrix by `{1 \nodepart{second} A}` with or without curly brace, I got ``` ERROR: Missing } inserted. --- TeX said --- <inserted text> } l.11 {1 \nodepart{second} A} & 2 \\ --- HELP --- TeX has become confused. The position indicated by the error locator is probably beyond the point where the incorrect input is. ``` Am I doing some obvious mistake ? Is there a workaround ?
https://tex.stackexchange.com/users/36872
tikz matrix of multipart nodes
true
Your code is okay; I just use `matrix` and `shapes.multipart` libraries. One more thing: essentially, TikZ has the only one command: `\path`; and TikZ drawing is just putting `node`s and `pic`s along a path. Therefore, although [the PGF manual](https://www.ctan.org/pkg/pgf) usually write ``` \matrix [matrix of nodes] {...} ``` but in my experience, it's better (less errors may arise) to write ``` \path (2,3) node[matrix,matrix of nodes] {...} ``` Likewise, I like writing `\path (1,1) node[] {};` instead of `\node[] {} at (1,1);` Below is your code with my writing style. Hope this helps! ``` \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.multipart, matrix} \begin{document} \begin{tikzpicture} \path (1,1) node[rectangle split, rectangle split parts=2]{1 \nodepart{second} $A$}; \path (0,0) node[matrix,matrix of math nodes, nodes={rectangle split, rectangle split parts=2}] (M) { X & 2 \\ }; \end{tikzpicture} \end{document} ```
1
https://tex.stackexchange.com/users/140722
693086
321,543
https://tex.stackexchange.com/questions/693088
1
So I'm writing a book, and I've used straight quotes (") in my latex files throughout the entire project. Now whenever I compile my document in Overleaf, these, to no ones surprise, come out as no starting quote, and a straight quote at the end of what's quoted. What I wish is for all straight quotes in my tex files is to actually appear as straight quotes in the generated pdf, regardless of whether they are situated at the front or end of a word. Here's an example: ``` % In my .tex file This is a "nice quote". ``` I want this to appear exactly like this in my document: This is a "nice quote". Is there anything I can do to override the default behaviour? I really do not want to go through my entire project consisting of many .tex files finding and replacing characters, all I want is simply the straight quote symbol to appear as an actual straight quote in my text regardless of whether it's a start-quote or an end-quote.
https://tex.stackexchange.com/users/103558
Making straight quotes in TeX appear as straight quotes in document
true
I think the best way is [the one suggested by @Stephen](https://tex.stackexchange.com/questions/693088/making-straight-quotes-in-tex-appear-as-straight-quotes-in-document/693089#comment1719880_693088). But you can use `\textquotesdbl` if you want. ``` \documentclass{article} \usepackage[T1]{fontenc} \begin{document} This is how quotes are ``supposed to be''. But you can use straight ones \textquotedbl{}if you really\textquotedbl{} like them... \end{document} ``` If you replace *exactly* `"` with `\textquotedbl{}`, you should have the result you are looking for (with no extra or missing spaces). You can also redefine the meaning of `"` --- but this is dangerous and can become a problem with a lot of packages (`babel` and `tikz` just to name a couple of them): ``` \documentclass{article} \usepackage[T1]{fontenc} %% Use at your own risk. It will probably break *everything* \catcode`"=\active\def"{\textquotedbl} \begin{document} This is how quotes are ``supposed to be''. But you can use straight ones "if you really" like them... \end{document} ```
3
https://tex.stackexchange.com/users/38080
693089
321,544
https://tex.stackexchange.com/questions/125744
13
Background: I have all bibliographic entries in one giant .bib file. In my CV, I'd like to have a section that lists all my articles and another section that lists all my conference presentations. My current approach is this: I tag my own entries with the keyword "own" and then use biblatex: ``` \printbibliography[type=article,keyword=own,heading="Articles"] \printbibliography[type=inproceedings,keyword=own,heading="Conference Presentations"] ``` This approach has two drawbacks. First, I have to tag all my entries and it happened that I missed some. Second, I have to nocite all my entries, which is another great opportunity to make mistakes. The first problem can be addressed using bib2bib, which allows me to extract my own articles from the big .bib file by specifying a filter for the `author` field. However, I was wondering if there is a simpler solution using only tools within LaTeX. `\printbibliography` already seems to have some filtering facility but from reading the manual I couldn't figure out how to filter entries based on the values of their fields.
https://tex.stackexchange.com/users/34277
How to print a bibliography for a particular author only?
false
I experienced a similar problem like tmalsburg with the current EXPORT function for the .bib file of CITAVI. The issue is CITAVE generally uses a ";" as a separator while LATEX uses a "," so if you EXPORT from CITAVI the keywordlines in the .bib look like: ``` keywords = {Result CV;wearable}, ``` But what you would need is: ``` keywords = {Result CV,wearable}, ``` So with the direct export result you can select the keyword "Result CV;wearable" in latex then it prints you the respective reference... so it sees this as one keyword... I haven't found a solution in citavi to change this, but will report the issue to them. **The best solution I could give at the moment is:** Assign your keywords in Citavi Export .bib file from Citavi Open the .bib file with notepad++ and in the replace function do the following Find what: `^(.*keywords.*);` Replace with:`$1,` Run repeatedly until you get 0 occurrences.
0
https://tex.stackexchange.com/users/284842
693097
321,548
https://tex.stackexchange.com/questions/693102
0
Newb here. When I look up how to create two columns, I get a bunch of tutorials that assume one text will run from the bottom of column A to the top of column B, like a newspaper article that spans two columns. That's not what I want to do. I want to put one text in the left column, a different text in the right column. Like two separate newspaper columns. When the text reaches the bottom of column A, instead of picking up at the top of column B, it should start at the top of column A on the next page.
https://tex.stackexchange.com/users/302148
How to create two columns with two entirely separate texts in each, side-by-side?
true
Some like this? ``` \documentclass{article} \usepackage{geometry} \usepackage{paracol} \usepackage{xcolor} \usepackage{microtype} \usepackage{lipsum} \usepackage{parskip} \begin{document} \lipsum[1] \begin{paracol}{2} \color{blue} \lipsum[2-20] \switchcolumn \color{red} \lipsum[22-40] \end{paracol} \lipsum[41] \end{document} ```
2
https://tex.stackexchange.com/users/11604
693106
321,550
https://tex.stackexchange.com/questions/414028
2
The following gives many strange errors: ``` \begin{tcolorbox}[fit,height=5cm,blank, borderline={1pt}{-2pt},nobeforeafter] \begin{verbatim} [83 democrat / 66 republican] | | a_b_c = y: [28 democrat / 64 republican] \end{verbatim} \end{tcolorbox} ``` including "Missing $ inserted", "Double subscript", so `verbatim` isn't working. Without `tcolorbox` the code works fine. How can I use `verbatim` with `tcolorbox`?
https://tex.stackexchange.com/users/116513
How to use verbatim with tcolorbox?
false
`tcolorbox` has a mechanism to define fully-fledged color box verbatim environment: ``` \documentclass{article} \usepackage[most]{tcolorbox} \newtcblisting{qwr}{listing only,fit,height=5cm,blank, borderline={1pt}{-2pt},nobeforeafter} \begin{document} \begin{qwr} [83 democrat / 66 republican] | | a_b_c = y: [28 democrat / 64 republican] \end{qwr} \end{document} ```
0
https://tex.stackexchange.com/users/65
693115
321,554
https://tex.stackexchange.com/questions/693112
2
I'm trying to make that table: ``` \documentclass[default]{sn-jnl} \usepackage{verbatim} \usepackage{hyperref} \usepackage{graphicx}% \usepackage{multirow}% \usepackage{amsmath,amssymb,amsfonts}% \usepackage{amsthm}% \usepackage{mathrsfs}% \usepackage[title]{appendix}% \usepackage{xcolor}% \usepackage{textcomp}% \usepackage{manyfoot}% \usepackage{booktabs}% \usepackage{algorithm}% \usepackage{algorithmicx}% \usepackage{algpseudocode}% \usepackage{listings}% \usepackage{adjustbox}% \theoremstyle{thmstyleone}% \newtheorem{theorem}{Theorem}% \newtheorem{proposition}[theorem]{Proposition}% \theoremstyle{thmstyletwo}% \newtheorem{example}{Example}% \newtheorem{remark}{Remark}% \theoremstyle{thmstylethree}% \newtheorem{definition}{Definition}% \raggedbottom \begin{document} \title[Some title]{Some title} \abstract{Some abstract} \maketitle \section{INTRODUCTION} ..... \begin{table*}[ht] \centering \caption{Statistical tests.\label{tab:II}} \begin{adjustbox}{max width=1.0\textwidth,center} \begin{tabular}{c c c c c c} \hline \multirow{5}{*}{Algorithm} & \multirow{5}{*}{No. of streams} \\ \multicolumn{5}{l}{$\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad$ Inter-stream correlation} \\[6pt] \cline{3-6} & & \multirow{2}{*}{NIST} & \multirow{2}{*}{Dieharder} & \multirow{2}{*}{TestU01} & \multirow{2}{*}{PractRand (bytes)} \\[11pt] \hline \\ \textbf{A} & $2^{127}$ & $>$ min. pass rate &passed & passed & $>2^{43}$, $>2^{43}$ \\[7pt] \textbf{B} & $2^{63}$ & $>$ min. pass rate &passed & passed & $>2^{43}$, $>2^{43}$ \\[7pt] \textbf{C} & $2^{63}$ & $>$ min. pass rate &passed & passed & $>2^{43}$, $>2^{43}$ \\[7pt] CG32 & $2^{31}$ & not applied &not applied & not applied & $> 2^{43}$, $< 2^{34}$ \\[7pt] CG64-32 & $2^{31}$ & not applied &not applied & not applied & $> 2^{43}$, $< 2^{35}$ \\[7pt] CG16 & $2^{15}$ & not applied &not applied & not applied &$< 2^{24}$, $< 2^{17}$ \\[7pt] CG32-16 & $2^{15}$ & not applied &not applied & not applied & $< 2^{20}$, $< 2^{18}$ \\[7pt] \hline \end{tabular} \end{adjustbox} \end{table*}% \raggedbottom \bibliography{cg-bibliography} \end{document} ``` But I can't use cline, beacuse I get undefined control sequence. How to make that cline? The full log: ``` ! Undefined control sequence. l.472 \cline {3-6} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ```
https://tex.stackexchange.com/users/299602
Why I get undefined control sequence with cline?
true
The class is written quite horribly. If you don't *have* to use it, then use another one. Anyway, the problem *here* is that it defines `\toprule` and `\bottomrule` similar to those of `booktabs` but... no idea what is supposed to happen after that. After these definitions you find ``` \let\cline\cmidrule ``` but the trouble is that at this point `\cmidrule` is not defined, and using it in the document will result in the error. There are some workarounds but none will result in whatever the class is probably supposed to do. 1. You can load `\RequirePackage{booktabs}` before `\documentclass`. In this way you have a working `\cline` (which is the same as `\cmidrule`) but the class will overwrite the definition of `\toprule` and `\bottomrule`. 2. You can add `\usepackage{booktabs}\let\cline\cmidrule` in the preamble. Everything should then work, but the class' own definitions will be overwritten. 3. You can copy the original definition of `\cline` and restore it afterwards `\let\LaTeXcline\cline\documentclass{sn-jnl}\let\cline\LaTeXcline`. Then you'll have `\cline` and`\cidrule` doing different things. I don't know which one's worse `;-)`
4
https://tex.stackexchange.com/users/82917
693116
321,555
https://tex.stackexchange.com/questions/693108
2
I want to get the QED symbol at the right end of the proof without using the proof environment and I want the QED symbol inside \begin{itemize}... \end{\itemize} environment. Is it possible? Thanks you,
https://tex.stackexchange.com/users/226044
How to get the QED symbol without using the proof environment
true
> > I want to get the [QED symbol] at the right [hand] end of the proof without using the `proof` environment. ... I want the [QED symbol] inside an `itemize` environment. > > > Something like this? ``` \documentclass{article} \usepackage{amsthm} % for \qedsymbol macro \usepackage{lipsum} % filler text \begin{document} \begin{itemize} \item \lipsum[1][1-5] \hfill\qedsymbol \item \lipsum[2][1-4] \hfill\qedsymbol \end{itemize} \end{document} ```
2
https://tex.stackexchange.com/users/5001
693120
321,558
https://tex.stackexchange.com/questions/414028
2
The following gives many strange errors: ``` \begin{tcolorbox}[fit,height=5cm,blank, borderline={1pt}{-2pt},nobeforeafter] \begin{verbatim} [83 democrat / 66 republican] | | a_b_c = y: [28 democrat / 64 republican] \end{verbatim} \end{tcolorbox} ``` including "Missing $ inserted", "Double subscript", so `verbatim` isn't working. Without `tcolorbox` the code works fine. How can I use `verbatim` with `tcolorbox`?
https://tex.stackexchange.com/users/116513
How to use verbatim with tcolorbox?
false
You can use `listings` to emulate plain verbatim, using a language that has nothing at all. ``` \documentclass{article} \usepackage[most]{tcolorbox} \lstdefinelanguage{none}{} \newtcblisting{tcbverbatim}{ fit, height=5cm, blank, borderline={1pt}{-2pt}, %nobeforeafter, listing only, listing options={ language=none, basicstyle=\ttfamily, columns=flexible, } } \begin{document} \begin{tcbverbatim} [83 democrat / 66 republican] | | a_b_c = y: [28 democrat / 64 republican] \end{tcbverbatim} \end{document} ```
0
https://tex.stackexchange.com/users/4427
693123
321,560
https://tex.stackexchange.com/questions/693122
0
I am looking for a way to set the vertical space after headers, end of paragraphs, etc., to specific values, using koma script. I checked previous answers, but the closest I found was the following: [Adjusting spacing around section/subsection titles with koma-script](https://tex.stackexchange.com/questions/223508/adjusting-spacing-around-section-subsection-titles-with-koma-script) which I found quite confusing. My code for testing: ``` \documentclass[12pt]{scrreprt} \usepackage{setspace} \usepackage{lipsum} \RedeclareSectionCommands[ beforeskip=-.5\baselineskip, afterskip=.25\baselineskip ]{section,subsection,subsubsection} \RedeclareSectionCommands[ beforeskip=.5\baselineskip, afterskip=-1em]{paragraph,subparagraph} \doublespacing \begin{document} \section{Hello} \lipsum \end{document} ``` So lets say I want to have exactly 12 pt vertical space after each header (chapters, sections, subsections, etc), and also 12 pt space after the end of a paragraph and before a new section, is that possible to obtain? In my case the space always seems to be a bit larger when there is both a paragraph ending and a new section beginning. It would be very helpful to know the case with zero space to start from, and then put in values from there. I am confused by the before- and afterskips, which dont tell me what is the base and what I will end up with eventually.
https://tex.stackexchange.com/users/283916
Set vertical spacing before and after text elements (sections, paragraphs, etc.)
true
You can see the effect using `\showoutput` ``` \documentclass[12pt]{scrreprt} %\usepackage{setspace}% use koma functions not this \usepackage{lipsum} \showoutput \showboxdepth=4 \RedeclareSectionCommands[ beforeskip=11.1pt, afterskip=22.2pt ]{section,subsection,subsubsection} %\doublespacing \begin{document} \section{Hello} \lipsum \end{document} ``` produces ``` ...\hbox(12.0+0.0)x448.13095, glue set 186.72131fil ....\hbox(12.0+0.0)x33.79214 [] ....\OT1/cmss/bx/n/17.28 H ....\OT1/cmss/bx/n/17.28 e ....\OT1/cmss/bx/n/17.28 l ....\OT1/cmss/bx/n/17.28 l ....\OT1/cmss/bx/n/17.28 o ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 plus 1.0fil ...\write1{\@writefile{toc}{\protect \contentsline {section}{\protect \numberli ne \ETC.} ...\penalty 10000 ...\glue 22.2 ...\glue(\parskip) 0.0 plus 1.0 ...\glue(\parskip) 0.0 ...\glue(\baselineskip) 6.16669 ...\hbox(8.33331+2.33331)x448.13095, glue set - 0.63269 ....\hbox(0.0+0.0)x11.74988 ....\OT1/cmr/m/n/12 L ....\OT1/cmr/m/n/12 o ....\OT1/cmr/m/n/12 r ....\OT1/cmr/m/n/12 e ....\OT1/cmr/m/n/12 m ....\glue 3.91663 plus 1.95831 minus 1.30554 ``` so between Hello and Lorem you get 22.2pt (here) in addition to the `\parskip` of `0pt plus 1pt` and `\baselineskip` of `6.16669pt` which combined with the height `8.33331pt` of L gives the 14.5pt baselineskip set by the class
2
https://tex.stackexchange.com/users/1090
693124
321,561
https://tex.stackexchange.com/questions/15010
40
I have two variables: `\vec{x}` and another one which is somehow dual to the first. Therefore I would like to symbolize the second with something similar but a leftarrow on top of the x. I already tried `\stackrel{leftarrow}{x}` but it looks to different (too big gap between x and the arrow, and too big arrow). Is there a way to define a `\cev` command which does what I want?
https://tex.stackexchange.com/users/2381
\vec{x} but with arrow from right to left?
false
(Copied from [What is to `\vec` as `\overleftarrow` is to `\overrightarrow`?](https://tex.stackexchange.com/questions/693044/)) The standard Computer Modern Math font only has a right arrow (in position "7E or 126 in decimal). It has however no left arrow. The STIX font provides both a left arrow (in position "91 or 145 in decimal) and a right arrow (in position "92 or 146 in decimal). ``` \documentclass{article} \DeclareFontEncoding{LS1}{}{} \DeclareFontSubstitution{LS1}{stix}{m}{n} \DeclareSymbolFont{stixletters}{LS1}{stix}{m}{it} \DeclareMathAccent{\cev}{\mathord}{stixletters}{"91} \DeclareMathAccent{\vec}{\mathord}{stixletters}{"92} \DeclareMathAccent{\vecev}{\mathord}{stixletters}{"95} \begin{document} $\vec{a}, \cev{a}$ $\vec{A}, \cev{A}$ Bonus: $\vecev{a}, \vecev{A}$ \end{document} ```
0
https://tex.stackexchange.com/users/94293
693125
321,562
https://tex.stackexchange.com/questions/693134
2
My tables are being spread out across a page, and using `t` for placement wouldn't help. What should I do? I've tried `\raggedbottom`, which does not work. MWE: ``` \usepackage{array} \usepackage{booktabs} \usepackage{placeins} \begin{document} Blah blah blah. \FloatBarrier \newpage %Here the pages with tables begins. \begin{table}[b] ... Tabular Blah Blah ... \end{table} \begin{table}[b] ... Tabular Blah Blah ... \end{table} % Lots of the tables \FloatBarrier \newpage %Following this page is something that's not tables. Blah blah blah. ``` Thanks in advance!
https://tex.stackexchange.com/users/302117
Why are my tables being spread out?
true
To guarantee that the two `tabular` environments are typeset closely together, just use a single `table` environment. Note that a `table` float on a page all by itself will be centered vertically by default. --- ``` \documentclass{article} \begin{document} Some blah blah blah. \clearpage % force page break and flush the float stack \begin{table} \centering ... tabular bla bla ... \caption{bla bla} \vspace{2cm} % set the amount of vertical whitespace separation ... tabular ble ble ... \caption{ble ble} \end{table} \clearpage % force another page brea and flush the float stack More blah blah blah. \end{document} ```
4
https://tex.stackexchange.com/users/5001
693137
321,565
https://tex.stackexchange.com/questions/693141
3
In order to exchange the font of my document to Times New Roman, my preamble includes ``` \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{times} ``` (to be quite honest, I'm not exactly sure what the two first packages do). In any case, in math mode, I frequently use (or define macros containing) `\text{}` to denote operators such as the trace, min/maximum and etc. The problem is that the Times font is ugly for that end (and I suppose the \text{} command simply defaults the argument to the main font). How do I make `\text{}` return another font -- in particular, the latex default (is it Modern Computer Roman?)? I'm open to alternative suggestions as to a better practice to replace `\text{}` as I'm using it.
https://tex.stackexchange.com/users/102296
Change the font of $\text{}$ within mathmode
true
You appear to be ruling out the possibility of employing a Times Roman-based math font to accompany your document's main text font. If this impression is correct, you should heed @Zarko's suggestion and use `\DeclareMathOperator`, a macro provided by the `amsmath` package, to create "math operators" for items such as "trace". Not only will this give you the desired Computer Modern math font glyphs, it'll also apply spacing rules that are standard for other math operators, such as `\sin` and `\ln`. Oh, and do yourself a big favor and stop using the deprecated `times` package. Instead, do load the `newtxtext` package. That way, if and when you're ready to take the plunge and can employ Times Roman-based math fonts, all you'll need to do is add the instruction `\usepackage{newtxmath}`. ``` \documentclass{article} \usepackage[T1]{fontenc} % for improved handling of words that contain accented characters \usepackage{amsmath} \DeclareMathOperator{\Tr}{Tr} % create a new "math operator" (trace) \usepackage{newtxtext} % 'times' package is obsolete %%%\usepackage{newtxmath} \begin{document} $\text{Tr}\mathbf{A}$ vs.\ $\Tr\mathbf{A}$ $\text{sin}\alpha$ vs.\ $\sin\alpha$ $\text{ln}5$ vs.\ $\ln 5$ \end{document} ```
5
https://tex.stackexchange.com/users/5001
693144
321,567
https://tex.stackexchange.com/questions/693147
3
``` \documentclass{article} \begin{document} \begin{tabular}{r|r@{\,}l|} 1&2&300\\ 10&-2&X\\ \multicolumn{2}{r@{\,}}{2}&\multicolumn{1}{l}{X} \end{tabular} \end{document} ``` According to Lamport, the columns formatting consists of three parts: `r|` + `r@{\,}` + `l|` hence I would expect the two X's to be in the same position. But the X in the third line is shifted to the right (compared to the X in the second line). By trial and error I found a solution by replacing `\multicolumn{1}{l}{X}` with `\multicolumn{1}{@{}l}{X}`. What is the reason behind this behaviour?
https://tex.stackexchange.com/users/278007
Lamport's rule for \multicolumn not valid?
true
You only gave part of the rule, and the output you show is affected by the other part. It is true that (apart from the first column) inter-column material from `@{..}` or `|` is added to the right hand edge of a column, so the `@{\,}` adds a thin space to the right edge of column 2, not the left edge of column 3. But `@` (unlike the `!` added by the `array` package) does not only add the material specified in its argument; it *removes* the `\tabcolsep` space. `\tabcolsep` padding is added to *both* sides of each column and using `@` removes it from the right side of the current column *and* the left edge of the following. So column 3 has no `\tabcolsep` padding on the left and is flush against column 2, the simplest way to achieve that in a `\multicolumn` is as you show, to apply `@{}` which adds nothing but removes `\tabcolsep` space.
5
https://tex.stackexchange.com/users/1090
693148
321,568
https://tex.stackexchange.com/questions/693146
3
I'm using the multiaudience package - works pretty nice. Here is an example ``` \usepackage{multiaudience} \SetNewAudience{internGER} \SetNewAudience{externGER} \DefCurrentAudience{internGER} ... \begin{shownto}{internGER, externGER} text for everyone \begin{shownto}{internGER} text for internals only \end{shownto} \end{shownto} ``` Now I would love to create an extra-option, that allows me to "mark" (text in red or underline or something like this) the internal text. That will make text-approval much easier, as you do not have to check both documents, but only one. So I tried to recreate the shownto environment ``` \let\oldshownto\shownto \let\endoldshownto\endshownto \renewenvironment{shownto}[1][]{% THIS TEXT WILL BE VISIBLE TO #1 :\\ \oldshownto }{ % END OF VISIBLE TEXT\\ \endoldshownto } ``` my plan was to use some "if-magic" based on argument #1, unfortunately there is no content in #1. What is wrong with this? Here is the full minimal example - its compiling ``` \documentclass{article} \usepackage{multiaudience} \SetNewAudience{internGER} \SetNewAudience{externGER} \DefCurrentAudience{internGER} %\DefCurrentAudience{externGER} \let\oldshownto\shownto \let\endoldshownto\endshownto \renewenvironment{shownto}[1][]{% -THIS TEXT WILL BE VISIBLE TO #1-, \oldshownto }{ % -END-\\ \endoldshownto } \begin{document} \begin{shownto}{internGER, externGER} text for everyone. \begin{shownto}{internGER} text for internals only \end{shownto} \end{shownto} \end{document} ``` Thanks Georg
https://tex.stackexchange.com/users/302184
Trying to modify multiaudience environment
false
You are defining the environment to take an *optional* argument, which by default is empty, but you want (1) the environment to take a *mandatory* argument, and (2) to pass this argument to the original environment. However, the `{shownto}` environment is defined by `\NewEnviron` (in a way which makes me think that the author kind of misunderstood its usage...), so I'd take a different approach: ``` \documentclass{article} \usepackage{multiaudience} \SetNewAudience{internGER} \SetNewAudience{externGER} \DefCurrentAudience{internGER} %\DefCurrentAudience{externGER} % original definition %\NewEnviron{shownto}[1]{% % \@MULTAU@shownfalse\@MULTAU@includetrue % \setkeys{MULTAU}{#1}% % \if@MULTAU@shown\BODY\fi} \makeatletter \RenewEnviron{shownto}[1]{% \@MULTAU@shownfalse\@MULTAU@includetrue \setkeys{MULTAU}{#1}% \if@MULTAU@shown [START TEXT SHOWN TO #1]% \BODY [END]% \fi } \makeatother \begin{document} \begin{shownto}{internGER, externGER} text for everyone. \begin{shownto}{internGER} text for internals only \end{shownto} \end{shownto} \end{document} ```
2
https://tex.stackexchange.com/users/82917
693150
321,569
https://tex.stackexchange.com/questions/693098
1
I include pics in my document using just: ``` \begin{center} \includegraphics{...} \end{center} ``` However, I want captions with the `captions` package and correct hyperlink anchors, so I end up with something like: ``` \begin{center} \captionsetup{type=figure} \includegraphics{...} \caption{asdf} \label{fig1} \end{center} ``` Now the problem is the vertical space this seems to produce if the image is included **at the top of a page**. Otherwise, things are fine. Use the **MWE** below to see what I mean. The MWE shows two workarounds as well, but I'm unhappy with both. How do I get this right? ``` \documentclass{scrartcl} \usepackage{mwe} \usepackage[hypcap=true]{caption} \usepackage[colorlinks=true]{hyperref} \usepackage[showframe]{geometry} \begin{document} \listoffigures \newpage \begin{center}% \captionsetup{type=figure}% \includegraphics[width=.25\linewidth]{example-image} \caption{asdf} \label{fig1} \end{center} Why do I get vertical space above figure \ref{fig1} \begin{center}% \captionsetup{type=figure}% \includegraphics[width=.25\linewidth]{example-image} \caption{asdf} \label{fig2} \end{center} Looks good here for \ref{fig2}. So must have something to do with top of page. \newpage \begin{center} \captionsetup{type=figure} \vspace{-3.5mm} \includegraphics[width=.25\linewidth]{example-image} \caption{asdf} \label{fig3} \end{center} A workaround with some vspace for figure \ref{fig3}, however, the link anchor is now not optimal. \newpage \noindent \begin{minipage}{\linewidth} \centering\captionsetup{type=figure} \includegraphics[width=.25\linewidth]{example-image} \caption{asdf} \label{fig4} \end{minipage} Using a minipage works as described in docs: \url{https://mirror.clientvps.com/CTAN/macros/latex/contrib/caption/caption.pdf} But now the spacing between caption and the text is too tight. \newpage \noindent \begin{minipage}{\linewidth} \centering\captionsetup{type=figure} \includegraphics[width=.25\linewidth]{example-image} \caption{asdf} \label{fig5} \end{minipage} \vskip\baselineskip \noindent So another workaround... \end{document} ```
https://tex.stackexchange.com/users/299754
caption package: vertical space at top of page
true
Minipage is needed but is a rather low-level environment, spacing must be added explicitly. This can be done with vspace commands, but also e.g. with center or use float which handles also the spacing ``` \documentclass{scrartcl} \usepackage{mwe} \usepackage[hypcap=true]{caption} \usepackage[colorlinks=true]{hyperref} \usepackage[showframe]{geometry} \usepackage{float} \begin{document} \listoffigures \newpage \vspace*{35\baselineskip} \begin{center}% \captionsetup{type=figure}% \includegraphics[width=.25\linewidth]{example-image} \caption{asdf} \label{fig1} \end{center} You need a minipage to avoid that caption and picture gets separated, see \ref{fig1} \newpage \noindent \begin{minipage}{\linewidth} \centering\captionsetup{type=figure} \includegraphics[width=.25\linewidth]{example-image} \caption{asdf} \label{fig2} \end{minipage} But now the spacing between caption and the text is too tight. \newpage \begin{center}% \noindent \begin{minipage}{\linewidth} \centering\captionsetup{type=figure} \includegraphics[width=.25\linewidth]{example-image} \caption{asdf} \label{fig3} \end{minipage} \end{center} Minipage is a rather low-level environment, spacing must be added explicitly. This can be done with vspace commands, but also e.g. with center or use float which handles also the spacing, see \ref{fig4} \newpage \begin{figure}[H] \centering \includegraphics[width=.25\linewidth]{example-image} \caption{asdd} \label{fig4} \end{figure} with some text behind \end{document} ```
2
https://tex.stackexchange.com/users/2388
693151
321,570
https://tex.stackexchange.com/questions/693153
3
I am using `newtx` with old style figures, specified as ``` \usepackage[osf]{newtxtext} ``` However, at one place I need lining figures instead. Is it possible to call lining figures just for that one instance? I already tried ``` {\renewcommand{\rmdefault}{ntxrx}\fontfamily\familydefault\selectfont<number>} ``` but I get error ``` LaTeX Font Warning: Font shape `OT1\ntxrx\m\n' undefined ```
https://tex.stackexchange.com/users/3450
Lining figures with osf option in newtx
true
Use `\liningnums` ``` \documentclass{article} \usepackage[osf]{newtxtext} \begin{document} 1234567890 vs \liningnums{1234567890} \end{document} ```
4
https://tex.stackexchange.com/users/82917
693154
321,571
https://tex.stackexchange.com/questions/693149
0
I have a tex-document with the `scartcl` class. In the preamble I redefine `\it` by `\RenewDocumentCommand{\it}{...}{...}`. Moreover, I have to different environment in which I want to comple the document with LuaLaTeX. 1. Version 1.13.0 (TeX Live 2021/CVE-2023-32700 patched) (on my local machine) 2. Version 1.15.0 (TeX Live 2022/Debian) (within a podman container) In the older version on my local machine everything works fine. I searched the log for "err", "warn" and "depr" and did not find anything concerning. However, in the newer version in the container I get `! LaTeX cmd Error: Command '\it' undefined`. As well as an error that says that the old font command `\it` will not work anymore. I tried to fix the first problem by adding `\provideDocumentCommand{\it}`. That resulted in `LaTeX cmd Error: Invalid argument type '\RenewDocumentCommand ' in command` and the `scratcl` error remaining. Can someone explain to me what the problem is here? Ty, Franz
https://tex.stackexchange.com/users/193625
Unexpected LaTeX cmd Errors
true
Consider the following short test file: ``` % franz.tex \documentclass{scrartcl} \show\it \end{document} ``` If I run on my system (where I keep TeX Live from 2012 on) with ``` /usr/local/texlive/2021/bin/universal-darwin/pdflatex franz ``` I get ``` > \it=macro: ->\protect \it . l.2 \show\it ``` If I do instead ``` /usr/local/texlive/2022/bin/universal-darwin/pdflatex franz ``` I get ``` > \it=undefined. l.2 \show\it ``` What happened? In the transition from TL 2021 to TL 2022, the koma classes changed the management of the old font commands. Until TL 2021, those commands were defined so that they would “work” also in the preamble. Later, they are “defined” only at begin document. This is the cause of the difference: if you do `\RenewDocumentCommand{\it}{...}{...}` in the preamble, you get no error with TL 2021, because `\it` indeed has a definition. But you get the error with later releases because in the preamble `\it` is no longer defined. Solution: ``` \providecommand{\it}{}% in case \it isn't defined \RenewDocumentCommand{\it}{...}{...} ``` However, I wouldn't recommend reusing `\it` for any purpose.
4
https://tex.stackexchange.com/users/4427
693156
321,572
https://tex.stackexchange.com/questions/91124
285
When you `itemize` items you usually have the entire list indented. This is expected when you have a title or description of what you are listing. I want to `itemize` but not have the natural indent. I need to move all of the bullet points over towards the the leftmost edge of the margin like all other text you would enter. How can I do this?
https://tex.stackexchange.com/users/24217
itemize, removing natural indent
false
If you prefer not to use an additional package `\usepackage{enumitem}` in your latex file, try the following code ``` \begin{enumerate} \itemindent=-13pt \item 1 \item 2 \item 3 \end{enumerate} ``` It works perfect for me.
1
https://tex.stackexchange.com/users/293138
693169
321,575
https://tex.stackexchange.com/questions/693139
1
When I try to enable fontawesome icons in moderncv, I get this error in the `pdflatex` log: ``` ! LaTeX Error: Encoding scheme `TU' unknown. ``` A minimal example: ``` \documentclass[11pt,a4paper,sans]{moderncv} \moderncvstyle{casual} \moderncvcolor{blue} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{babel} \name{John}{Doe} \title{C/C++ Development} \phone[mobile]{+1~xxx-yyyy} \email{john.doe@gmail.com} \homepage{www.tractor.com} \social[linkedin]{johndoe} \social[github]{john-doe} \social[stackoverflow]{012345/johndoe} \social[orcid]{0000-0001-2345-6778} \social[researchgate]{John-Doe} \social[googlescholar]{ADFIE89AD} \moderncvicons{awesome} \renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]} \begin{document} \makecvtitle foo \end{document} ``` In `fontawesomebrands.fd` and `fontawesomepro.fd` there are many references to `TU`, so it appears to be some kind of central element. But without any hint from `pdflatex`, and nothing in google searches, I don't have a way to figure out what's missing or configured wrong. UPDATE: excerpts from the log file that look relevant to fontawesome (since there is no way to post an actual log file attachment): ``` This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex 2023.3.13) 10 AUG 2023 12:33 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **minimal.tex (./minimal.tex LaTeX2e <2020-10-01> patch level 4 L3 programming layer <2021-05-07> (/usr/share/texlive/texmf-dist/tex/latex/moderncv/moderncv.cls Document Class: moderncv 2021/01/21 v2.1.0 modern curriculum vitae and letter document class ... (/usr/share/texlive/texmf-dist/tex/latex/fontawesome5/fontawesome5.sty Package: fontawesome5 2020/03/24 v5.13.0 Font Awesome 5 (/usr/share/texlive/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty Package: l3keys2e 2021-05-07 LaTeX2e option processing using LaTeX3 keys ) (/usr/share/texlive/texmf-dist/tex/latex/fontawesome5/fontawesome5-generic-help er.sty Package: fontawesome5-generic-helper 2020/03/24 v5.13.0 non-uTeX helper for fon tawesome5 (/usr/share/texlive/texmf-dist/tex/latex/fontawesome5/fontawesome5-mapping.def) )) (/usr/share/texlive/texmf-dist/tex/latex/academicons/academicons.sty Package: academicons 2020/08/14 v1.9.0 Academicons Icons )) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty Package: hyperref 2021-02-27 v7.00k Hypertext links for LaTeX ... LaTeX Font Info: Trying to load font information for U+fontawesomefree2 on i nput line 33. (/usr/share/texlive/texmf-dist/tex/latex/fontawesome5/ufontawesomefree2.fd) (/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-cmr.cfg File: mt-cmr.cfg 2013/05/19 v2.2 microtype config. file: Computer Modern Roman (RS) ) LaTeX Font Info: Trying to load font information for TS1+lmr on input line 3 3. (/usr/share/texlive/texmf-dist/tex/latex/lm/ts1lmr.fd File: ts1lmr.fd 2015/05/01 v1.6.1 Font defs for Latin Modern ) LaTeX Font Info: Trying to load font information for U+fontawesomefree1 on i nput line 33. (/usr/share/texlive/texmf-dist/tex/latex/fontawesome5/ufontawesomefree1.fd) LaTeX Font Info: Trying to load font information for U+fontawesomebrands0 on input line 33. (/usr/share/texlive/texmf-dist/tex/latex/fontawesome5/ufontawesomebrands0.fd) LaTeX Font Info: Font shape `U/fontawesomebrands0/solid/n' in size <10> not available (Font) Font shape `U/fontawesomebrands0/regular/n' tried instead o n input line 33. LaTeX Font Info: Trying to load font information for U+fontawesomebrands1 on input line 33. (/usr/share/texlive/texmf-dist/tex/latex/fontawesome5/ufontawesomebrands1.fd) LaTeX Font Info: Font shape `U/fontawesomebrands1/solid/n' in size <10> not available (Font) Font shape `U/fontawesomebrands1/regular/n' tried instead o n input line 33. ! LaTeX Error: Encoding scheme `TU' unknown. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.33 \end{document} ```
https://tex.stackexchange.com/users/13649
Encoding scheme `TU' unknown (fontawesome with moderncv)
true
The message that `TU` is unknown indicates that you are trying to use a font package which only works with LuaLaTeX and XeLaTeX in a pdfLaTeX document. The font causing this issue is `academicons` which automatically gets loaded by `moderncv` up to version 2.1.0 when `\moderncvicons{awesome}` is selected. In `moderncv` version 2.2.0 (released on 2021-07-28), `\moderncvicons{awesome}` has been changed to no longer automatically load `academicons` and therefore became compatible with pdfLaTeX. So in order to solve this issue, you need to install a newer `moderncv` version. The latest version (v2.3.1) still got into TeX Live 2021, so you can do this either by updating to e.g. TeX Live 2023 or by installing package updates for your existing TeX Live 2021. When trying to update an existing installation, remember that since TeX Live 2022 has been released the default mirrors no longer contain packages for TeX Live 2021, so to update TeX Live 2021 you have to follow the instructions [for updating historic distributions](https://tex.stackexchange.com/a/683038/80496). That's assuming that you installed TeX Live manually. If you got it from some distribution package you need to follow the usual procedures to update your packages.
2
https://tex.stackexchange.com/users/80496
693179
321,579
https://tex.stackexchange.com/questions/692958
1
I simply want a version of the pgf/Ti*k*Z manual with the bolder `mlmodern` fonts instead of the original `lm` fonts. To achieve this, I cloned the pgf repo from git, loaded the `mlmodern` package after the `amsmath` and `amssymb` packages in the `pgfmanual-en-main-preamble.tex` file and compiled it on an updated (today) version of `TeX Live` using `l3build doc -q -H`. The `amsmath` and `amssymb` packages were already loaded in the code. It compiled for a very long time and generated a pdf, but I don't see the `mlmodern` fonts in the pdf. The compiled pdf is not correct as well; I don't find the monospaced font used for the code. I can share the log files if needed. How do I replace the lm fonts with the mlmodern fonts in the PGF manual?
https://tex.stackexchange.com/users/128462
How to compile the pgfmanual with mlmodern fonts?
true
Force the use of `\usepackage[T1]{fontenc}` to make `mlmodern` work with LuaTeX. From lines 158 -- 180 of `pgfmanual-en-main-preamble.tex` as it appears in the pgf GitHub repository currently, ``` \ifluatex % \usepackage[no-math]{fontspec} % \usepackage{luatextra} % TT: I have commented luatextra since it loads fontspec, which % currently breaks "$\mathrm{\Omega}$" (nothing is % shown). Also, fontspec loads so much stuff, I'm not really sure % any of it is needed... % \filedescription is defined in expl3, required by fontspec, % required by luatextra. Needs to be \relaxed since % pgfmanual-en-macros.tex defines an environment named filedescription \let\filedescription\relax \usepackage[utf8]{luainputenc} % dvisvgm does not support OpenType fonts so we have to bite the bullet and % use T1 where quotes are weird. In LuaTeX \outputmode=0 means DVI. \ifnum\outputmode=0 \usepackage[T1]{fontenc} \fi \else \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \fi ``` The manual build uses `lualatex` by default. So we enter the first branch of the conditional. Comments indicate that `LuaTeX \outputmode=0 means DVI`, and `lualatex` ordinarily generates a PDF, so we skip the `\ifnum` conditional, and `\usepackage[T1]{fontenc}` is never inserted, but it is required for `mlmodern` to work in LuaTeX. So, you can add ``` \usepackage[T1]{fontenc} \usepackage{mlmodern} ``` after the outer `\iflatex ... \else ... \fi` block above. Comments also suggest `quotes are weird` for `T1` with LuaTeX. I don't have much experience with LuaTeX, but compiling in this way, I don't see anything wrong with ordinary ```quotations''`, and don't find any glaring artifacts after scanning through the manual.
1
https://tex.stackexchange.com/users/47128
693193
321,584
https://tex.stackexchange.com/questions/690137
1
I'm trying to use [`readarray` package](https://www.ctan.org/pkg/readarray) to load several multi-line files with `\readrecordarray` command for the next processing. Due to processing of several files `\readrecordarray` is used in a command with a name of macro to store the values as an argument. So instead of `\readrecordarray{file.in}\someNewMacro` I need to use `\csname` in some way to define macro "`\csname #1\endcsname`" to store all values. From the package sources I understand that `\readrecordarray` for the second argument, e.g. `\someNewMacro` is trying to cut off the first symbol '`\`' and define the corresponding macro but still can't make it in a proper way. Copying with `\LetLtxMacro` from a temporary macro also didn't help because that temporary macro is overwritten with each new file. Is there any way to use `\readrecordarray` with macro arguments (e.g.#1) (according to the source code below)? Thanks! ``` \newcommand\readrecordarray[2]{% \edef\@arrayident{\rdar@macroname#2}% \def\ra@TermA{\@readdef{#1}}% \def\ra@TermB{\expandafter\ra@TermA\csname\@arrayident def\endcsname}% \expandafter\ra@TermB\expandafter{\@arrayident}% } \def\rdar@macroname{\expandafter\@gobble\string} ```
https://tex.stackexchange.com/users/260143
Use of \readrecordarray with macro arguments
false
It is not wholly clear what you are requesting. But, if I understood the gist, you need the array into which `\readrecordarray` parses the file contents to be specified by way of a `\csname` variable. In the MWE below, I show the process if the array is specifed in the standard way, and then I show it again, in which the array is specified by way of a cs specification. In both cases, the file is read and the 3rd array element (3rd line of the file) is detokenized to the output. ``` \documentclass{article} \usepackage[T1]{fontenc} \usepackage{readarray} \begin{document} Note: junk.tex is the name of this source code file. \readrecordarray{junk.tex}\arrayA \arraytomacro\arrayA[3]\tmp \detokenize\expandafter{\tmp} \def\snippet{\readrecordarray{junk.tex}} \expandafter\snippet\csname arrayB\endcsname \arraytomacro\arrayB[3]\tmp \detokenize\expandafter{\tmp} \end{document} ```
0
https://tex.stackexchange.com/users/25858
693195
321,585
https://tex.stackexchange.com/questions/693194
-1
can someone help me with the latex code for a test tube that consists of a cylinder and a hemisphere and is filled with a liquid to height h? I am trying to write a solution for a question that asks for volume of the test tube. I am in Year 7 (1st year of secondary school). Thank you!
https://tex.stackexchange.com/users/302215
How to draw a (standing up) test tube filled with water to height h
false
``` \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \fill[color=gray!30] (-0.75,-3) arc (180:0:0.75 and 0.2) -- (0.75,-5) arc (0:-180:0.75); \fill[color=black!70] (0,-3) ellipse (0.75 and .2); \draw[thick] (0.75,0) -- (0.75,-5) arc (0:-180:0.75) -- (-0.75,0); \draw[thick] (0,0) ellipse (0.75 and 0.2); \draw[thick, <->] (1.2,-3) -- (1.2,-5.75); \node at (1.5,-4.375) {\(h\)}; \end{tikzpicture} \hspace{1cm} \begin{tikzpicture} \fill[color=gray!30] (-0.75,-3) arc (180:0:0.75 and 0.2) -- (0.75,-5) arc (0:-180:0.75); \fill[color=black!70] (0,-3) ellipse (0.75 and .2); \draw[thick] (0.75,0) -- (0.75,-5) arc (0:-180:0.75) -- (-0.75,0); \draw[thick] (0,0) ellipse (0.75 and 0.2); \draw[thick, <->] (1.2,-3) -- (1.2,-5); \node at (1.5,-4) {\(h\)}; \end{tikzpicture} \end{document} ``` I have copied the code from [Drawing liquid inside a tilted test tube](https://tex.stackexchange.com/questions/628123/drawing-liquid-inside-a-tilted-test-tube).
-1
https://tex.stackexchange.com/users/128462
693196
321,586
https://tex.stackexchange.com/questions/693127
0
How do I set `\pdfminorversion=6` in `org-mode`? I don't know how to put that line before anything else in the resulting `.tex` file. This is the workaround I am using now: [\pdfminorversion on the command line](https://tex.stackexchange.com/questions/462661/pdfminorversion-on-the-command-line)
https://tex.stackexchange.com/users/67125
How to set \pdfminorversion in org-mode
true
From [`org-mode` manual](https://orgmode.org/manual/LaTeX-header-and-sectioning.html): > > > ``` > #+LATEX_CLASS: article > #+LATEX_CLASS_OPTIONS: [a4paper] > #+LATEX_HEADER: \usepackage{xyz} > > * Headline 1 > some text > * Headline 2 > some more text > > ``` > > So you can do ``` #+LATEX_HEADER: \pdfminorversion=6 ``` You may want to research how to ensure that org-mode uses pdftex (it did on my system by default), or use an `\ifPDFTeX ... \fi` block.
0
https://tex.stackexchange.com/users/47128
693197
321,587
https://tex.stackexchange.com/questions/643459
0
I learn that in order to restore settings in TexStudio, I need to do `Menu > Options > Save/Load profile`. However, I find that `Load profile` can not restore settings like `Syntax highlight`, `favorite symbols` and many others. I find in order to restore the complete settings, it needs to backup %APPDATA%\texstudio folder first and remove the folder. (I can not find texstudio.ini file in the same folder for TexStudio 4.2.3.) Then reinstall TexStudio and restore the backup folder. Only in this way, I can restore the complete settings. I wonder if this is a correct procedure or if there is a bug in TexStudio or whatever the problem.
https://tex.stackexchange.com/users/75077
How to restore settings in TexStudio
true
After several attempts, I believe how it works is to backup `%APPDATA%\texstudio` folder on the old machine first (normally on `AppData\Roaming\Texstudio` on Windows). Then after installing TexStudio on the new machine, copy this folder to the `%APPDATA%\texstudio` and it is done. In this way, entire settings on the old machine can be transferred to the new machine.
0
https://tex.stackexchange.com/users/75077
693201
321,588
https://tex.stackexchange.com/questions/400108
11
I want to put a vertical line among some words in order to separate them, for example I want this: Website | Email | Address But I cannot produce these vertical line perfectly. What should I do? (I do not want to use tabular environment)
https://tex.stackexchange.com/users/125789
How to put vertical line among the words?
false
I have a question to the provided solution: ``` \newcommand\mybar{\kern1pt\rule[-\dp\strutbox]{1pt}{\baselineskip}\kern1pt} ``` How can I colorize the bar? I tried this, below it doesn't work. ``` \newcommand\mybar[1]{ \color{#1}\kern1pt\rule[-\dp\strutbox]{\leftbarwidth}{\baselineskip}\color{black}\kern3pt } ``` call with: ``` \mybar[red] Foo \mybar[green] Bar ```
0
https://tex.stackexchange.com/users/302236
693220
321,594
https://tex.stackexchange.com/questions/693222
3
I see some very strange behaviour related to the use of `\sfrac` in a figure caption. The reason seems to be font size issues, but I can't figure out how to resolve them. MWE === The issues appear in the following example. ``` \documentclass[11pt]{article} \usepackage{amssymb} \usepackage{anyfontsize} \usepackage[font=small]{caption} \usepackage{xfrac} \begin{document} \begin{figure} \caption{Test 1: $\sfrac12$, $\sfrac14$.} \end{figure} \begin{figure} \caption{Test 2: $\sfrac12$, $\sfrac14$.} \end{figure} \begin{figure} \caption{Test 3: $\sfrac12$, $\sfrac14$.} \end{figure}% \end{document} ``` The problem =========== The figure caption is the same three times in a row, but only the third one triggers errors, namely the following (taken from the log file, it appears there six times): ``` (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd File: umsb.fd 2013/01/14 v3.01 AMS symbols B ) ! Improper `at' size (0.0pt), replaced by 10pt. <to be read again> relax l.20 \caption{Test 3: $\sfrac12$, $\sfrac14$.} I can only handle fonts at positive sizes that are less than 2048pt, so I've changed what you said to 10pt. ``` Observations and comments ========================= * If I take out one of the figures and leave only two of them, everything seems fine. * Taking out any of the `amssymb`, `anyfontsize`, or `caption` packages (or even just the `small` option of the caption package) resolves the problem. I don't want to take any of these out though in my original document (Ironically, I believe I started using `anyfonsize` to get rid of font size replacement warnings...) Any help is much appreciated, even if it's just towards understanding what is going on here.
https://tex.stackexchange.com/users/256504
Font size problem with \sfrac in figure caption
true
The problem is with the obsolete package `anyfontsize`: ``` % anyfontsize.sty -- allow font size substitutions % by Péter Szabó <pts@fazekas.hu> at Sat Feb 3 13:56:49 CET 2007 ``` The right package to use is `fix-cm`. ``` \RequirePackage{fix-cm}% because you're using OT1 \documentclass[11pt]{article} \usepackage{amssymb} \usepackage[font=small]{caption} \usepackage{xfrac} \begin{document} \begin{figure} \caption{Test 1: $\sfrac12$, $\sfrac14$.} \end{figure} \begin{figure} \caption{Test 2: $\sfrac12$, $\sfrac14$.} \end{figure} \begin{figure} \caption{Test 3: $\sfrac12$, $\sfrac14$.} \end{figure}% \end{document} ``` You can load `fix-cm` as usual after `\documentclass` if you pass to the T1 encoding, with `\usepackage[T1]{fontenc}`. But, of course, `\sfrac` is to be used only in recipe books.
3
https://tex.stackexchange.com/users/4427
693224
321,595
https://tex.stackexchange.com/questions/527797
2
I'm using `latexmk` in Visual Studio Code and I'd like to output the .pdf file to the current directory (same directory as the .tex file), while outputting all auxiliary files to a different directory. I've tried messing with -outdir and -auxdir, but those options didn't seem to work. First line of .log file: `This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Arch Linux) (preloaded format=pdflatex 2020.1.31) 12 FEB 2020 16:44` Is this possible?
https://tex.stackexchange.com/users/206639
Output *.pdf file to a different directory using latexmk
false
I ran into the same problem using TeXLive and found this [latexmkrc](https://github.com/debian-tex/latexmk/blob/upstream/4.65/example_rcfiles/fix-aux.latexmkrc) file. Simply put the contents into a file named LatexMk (no file extension) in C:\latexmk if you're on Windows. Then you can use -auxdir with TexLive. I couldn't find the mentioned file in the current distribution of latexmk, so it may be outdated or have some other bugs that I'm unaware of. However, it is running fine for me. (Windows 11, TexLive 2023)
1
https://tex.stackexchange.com/users/302242
693231
321,597
https://tex.stackexchange.com/questions/270391
14
I want to plot a graph of tangent function, but it appears as a straight line instead. What is the error? Why does it not compile? ``` \documentclass{minimal} \usepackage{tikz,pgfplots} \usepackage{xcolor} \begin{document} \begin{center} \begin{tikzpicture}[domain=-4:7] [scale=0.8] \draw[ultra thick, ->] (-4,0) -- (7.5,0) node[right] {$\textbf{X}$}; \draw[ultra thick,->] (0,-2) -- (0,4.2) node[above] {$\textbf{Y}$}; \draw[dashed, thick,red] (1.57,0) -- (1.57,1); \draw[dashed, thick,red] (4.71,0) -- (4.71,1); \draw[dashed, thick,red] (-1.57,0) -- (-1.57,1); \draw[ultra thick,color=blue] plot [samples =100](\x,tan(\x r)) node[right] {$y = \tan~x$}; \end{tikzpicture} \end{center} \end{document} ```
https://tex.stackexchange.com/users/36688
Plotting a graph of tangent function returns a straight line instead
false
There is a new option in `addplot` namely `restrict y to domain`. It is very minimalistic and prevents the tangent from exploding and thus solves the line problem: ``` \addplot[mark=none, color=blue, ultra thick, restrict y to domain=-5:5] {tan(deg(x))} ``` Here is the full code: ``` \begin{figure}[ht] \centering \begin{tikzpicture} \begin{axis}[axis lines=middle, xlabel={$x$}, ylabel={$y$}, domain=-pi/2 + 0.01:pi/2 - 0.01, samples=200, legend style={at={(1.1,0.35)}, anchor=north east,},] \addplot[mark=none, color=blue, ultra thick, restrict y to domain=-5:5] {tan(deg(x))}; \addlegendentry{$\tan(x)$}; \end{axis} \end{tikzpicture} \end{figure} ``` A less elegant solution would be to set `ymax` and `ymin`.
0
https://tex.stackexchange.com/users/153173
693232
321,598
https://tex.stackexchange.com/questions/693226
0
I would like to have a line with both equations and text, but the math environment takes over. What can I do so that I can include text in the equation display ?
https://tex.stackexchange.com/users/302229
Line with equations and text
true
Like this: Code: ``` \documentclass[italian,10pt,a4paper]{article} \usepackage{amsmath} \begin{document} Text with equation $E=mc^2$ followed by text and $x=\frac{\sqrt{x-1}}{x^+2}$.\\ Another line of text. \end{document} ``` or like this: Code: ``` \documentclass[italian,10pt,a4paper]{article} \usepackage{amsmath} \begin{document} Text with equation $E=mc^2$ followed by text and $x=\frac{\sqrt{x-1}}{x^+2}$.\\ Another line of text.\\ Equation with text: \[ x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} \quad\text{solution of:}\quad ax^2+bx+c=0\] \end{document} ```
2
https://tex.stackexchange.com/users/24644
693233
321,599
https://tex.stackexchange.com/questions/693234
0
I want to change the separation between lines in paragraphs by factor of `1.3`. How does one do that ? Had a go at using ``` \setstretch{1.618} ``` and ``` \setstretch{baselinestretch 1.3} ``` Here is my document ``` \documentclass[a4paper,12pt]{book} \usepackage{geometry} \begin{document} \begin{titlepage} \title{AGAMA} \author{Pengo} \date{\today} \maketitle \tableofcontents \end{titlepage} \setstretch{1.618} \setstretch{baselinestretch 1.3} \chapter{Introduction} This chapter's content... \end{document} ``` But latex complains with ``` ! Undefined control sequence. l.81 \setstretch {1.618} ! Undefined control sequence. l.82 \setstretch {baselinestretch 1.3} ```
https://tex.stackexchange.com/users/302229
Changing line spacing within paragraphs
true
It's hard to help if you don't provide details of your problem. Also, it depends on what you want to achieve. This is not a trivial problem and you are advised to gather more info about it. Here is a good document on Overleaf: [How to change paragraph spacing in LaTeX](https://www.overleaf.com/learn/latex/Articles/How_to_change_paragraph_spacing_in_LaTeX). Anyway, you probably should load [setspace](https://www.ctan.org/pkg/setspace) package and use this macro ``` \setstretch{<factor>} ``` Here the `<factor>` is related to `1.2`, a **ratio** of `\baselineskip` and font size. By default, this is `12pt/10pt = 1.2`. `\setstretch` alters this number by the `<factor>`, that is a new baseline stretch becomes `1.2 x <factor>`. Having said that, if you just want to increase paragraph spacing exactly by `1.3`, simply use `\setstretch{1.3}`; you will gain a slightly larger spacing compared to one-half spacing because the new **ratio** becomes `1.56`. On the other hand, you need to work out the `<factor>` if you want to gain desired *1.3-spacing*. Simply divide the *spacing* by the **ratio** and use such a number in `\setstretch`. For instance, the new baseline stretch in your case becomes `1.3/1.2 = 1.083`. One important note: the **ratio** might differ between documents as well as font sizes (see [Overleaf](https://www.overleaf.com/learn/latex/Articles/How_to_change_paragraph_spacing_in_LaTeX)). For comparison, the following are common factors: for one-half spacing -> `factor = 1.5/1.2 = 1.25` and for double spacing -> `factor = 2/1.2 = 1.67`. In the latter cases though, one is advised to use `\onehalfspacing` or `\doublespacing` instead. Here's an example. Note, apart from the macro `\setstretch`, you can also use environments ``` \documentclass{article} \usepackage{setspace} \usepackage{kantlipsum} % \setstretch{1.3}% \begin{document} Standard spacing: \kant[1] \bigskip \begin{setstretch}{1.083} \kant[2] \end{setstretch} \bigskip \begin{setstretch}{1.3} \kant[3] \end{setstretch} \end{document} ```
2
https://tex.stackexchange.com/users/31283
693237
321,600
https://tex.stackexchange.com/questions/693203
0
Is there a way of creating an interactive slider by using TikZ and ocgx2 like this? 1. Multiple instances of `\actionsocg[onmouseall]{}{convenient code}{convenient code}{convenient space}` are put side by side on top of a TikZ slider, for instance, one of those found [here](https://tex.stackexchange.com/questions/181319/sliders-in-latex/181334#181331). 2. As the user moves the mouse across those links, ocgx2 moves slider's button and moves a point along a parabola built in TikZ. **Edit:** I realize that the explanation was not sufficiently clear so I decided to modify [this](https://tex.stackexchange.com/questions/235770/want-to-overlay-multiple-plots-on-top-of-each-other#235834) example to better show what I have in mind with a working example. ``` \documentclass{article} \usepackage{mwe} \usepackage{ocgx2} \begin{document} \begin{figure}\centering \makebox[0pt][l]{% \begin{ocg}{A}{A}{1}% \includegraphics[width=0.3\paperwidth]{example-image-a}% \end{ocg}% }% \makebox[0pt][l]{% \begin{ocg}{B}{B}{0}% \includegraphics[width=0.3\paperwidth]{example-image-b}% \end{ocg}% }% \begin{ocg}{C}{C}{0}% \includegraphics[width=0.3\paperwidth]{example-image-c}% \end{ocg} \actionsocg[onmouseall]{}{A,,,}{B C}{\fbox{A}} \actionsocg[onmouseall]{}{B,,,}{A C}{\fbox{B}} \actionsocg[onmouseall]{}{C,,,}{A B}{\fbox{C}} \caption{``Slider'' with three sections} \end{figure} \end{document} ``` Imagine the boxes A B C as being sections of a slider. Moving the mouse over the boxes A B C it works like a slider. Now imagine the boxes A B C as being transparent and behind them, we also see convenient images of a slider.
https://tex.stackexchange.com/users/302220
Working slider in LaTeX with TikZ and ocgx2
true
Adding all OCGs (PDF layers) to a common radio button group simplifies the code, esp. when using a lot of slider increments which result in a lot of OCGs. With a radio button group, simple `\showocg` can be applied on a single OCG, as hiding of the previously visible OCG is automatic. The `onmouseenter` trigger used in both, OP and this answer, only works in Acrobat Reader. ``` \documentclass[a5paper]{article} \usepackage{graphicx} \usepackage{ocgx2} \usepackage{pgffor} \begin{document} \begin{figure} \centering \makebox[0pt][l]{% \begin{ocg}[radiobtngrp=sliderEx]{X}{X}{1}% \includegraphics[width=0.6\linewidth]{example-image}% \end{ocg}% }% \makebox[0pt][l]{% \begin{ocg}[radiobtngrp=sliderEx]{A}{A}{0}% \includegraphics[width=0.6\linewidth]{example-image-a}% \end{ocg}% }% \makebox[0pt][l]{% \begin{ocg}[radiobtngrp=sliderEx]{B}{B}{0}% \includegraphics[width=0.6\linewidth]{example-image-b}% \end{ocg}% }% \begin{ocg}[radiobtngrp=sliderEx]{C}{C}{0}% \includegraphics[width=0.6\linewidth]{example-image-c}% \end{ocg} \foreach \i in {X,A,B,C,X,A,B,C,X,A,B,C} {% \showocg[onmouseenter]{\i}{\framebox[0.05\linewidth]{\i}}% } \end{figure} \end{document} ```
1
https://tex.stackexchange.com/users/1053
693240
321,601
https://tex.stackexchange.com/questions/693239
1
I have a PGF bar chart where the values of the bars are given by variables, using `\newcounter`. Now, the counters are updated after the PGF plot is rendered. Therefore, the plot does not render correctly. How can I render the plot before the counters are updated, but making the PGF plot include the updated counters? Example (not working) ``` \documentclass{article} \usepackage{pgfplots} \newcounter{criticalfindings} \newcounter{highfindings} \newcounter{mediumfindings} \newcounter{lowfindings} \newcounter{informationalfindings} \setcounter{criticalfindings}{0} \setcounter{highfindings}{0} \setcounter{mediumfindings}{0} \setcounter{lowfindings}{0} \setcounter{informationalfindings}{0} \begin{document} \begin{tikzpicture} \begin{axis}[ title=Overzicht, ymajorgrids=true, scale only axis, xtick={1,2,3,4,5}, xticklabels={Kritiek, Hoog, Midden, Laag, Informatief}, every axis plot/.append style={ ybar, bar width=20, bar shift=0pt, fill }, ymin=0, ] \addplot coordinates {(1,\thecriticalfindings)}; \addplot coordinates {(2,\thehighfindings)}; \addplot coordinates {(3,\themediumfindings)}; \addplot coordinates {(4,\thelowfindings)}; \addplot coordinates {(5,\theinformationalfindings)}; \end{axis} \end{tikzpicture} \stepcounter{informationalfindings} \end{document} ``` Here, the `informationalfindings` counter has been incremented to 1. However, this is not reflected in the PGF plot. How can I make this work?
https://tex.stackexchange.com/users/289049
Changed variable is not reflected in PGF chart
false
With some changes I have this Code: ``` \documentclass{article} \usepackage{pgfplots} \newcounter{criticalfindings} \newcounter{highfindings} \newcounter{mediumfindings} \newcounter{lowfindings} \newcounter{informationalfindings} % changed \setcounter{criticalfindings}{20} \setcounter{highfindings}{10} \setcounter{mediumfindings}{20} \setcounter{lowfindings}{15} \setcounter{informationalfindings}{30} \begin{document} % added \begin{tikzpicture} \begin{axis}[ title=Overzicht, ymajorgrids=true, scale only axis, xtick={1,2,3,4,5}, xticklabels={Kritiek, Hoog, Midden, Laag, Informatief}, every axis plot/.append style={ ybar, bar width=20, bar shift=0pt, fill }, ymin=0, ] \addplot coordinates {(1,\thecriticalfindings)}; \addplot coordinates {(2,\thehighfindings)}; \addplot coordinates {(3,\themediumfindings)}; \addplot coordinates {(4,\thelowfindings)}; \addplot coordinates {(5,\theinformationalfindings)}; %\stepcounter{informationalfindings} \end{axis} \end{tikzpicture} \end{document} ```
1
https://tex.stackexchange.com/users/24644
693241
321,602
https://tex.stackexchange.com/questions/693242
0
I would like to shift beamer footnote further to the right (ideally, I would like it centered, but I can achieve what I want by adding space to the left). I tried ``` \addtobeamertemplate{footnote}{}{\hspace{10ex}} ``` but this did not do anytihng (interestingly adding `\vspace` works). Is there a way of achieving what I want to do? If there is, is there a way to do it in only one frame or do I have to do it at the preamble for all footnotes? Many thanks.
https://tex.stackexchange.com/users/8801
How to put horizontal space in beamer footnote
true
Beamer normally used `\raggedright` in its default footnote template. You could redefine it to use `\centering` instead of `\raggedright`: ``` \documentclass{beamer} \begin{document} { \makeatletter \setbeamertemplate{footnote}{ \parindent 1em\noindent% \centering \hbox to 1.8em{\hfil\insertfootnotemark}\insertfootnotetext\par% } \makeatother \begin{frame} abc \footnote{text} \end{frame} } \begin{frame} abc \footnote{text} \end{frame} \end{document} ```
1
https://tex.stackexchange.com/users/36296
693243
321,603
https://tex.stackexchange.com/questions/618616
2
It is a common problem that TexnicCenter fails to call Adobe Acrobat Reader as the pdf viewer: > > [DocOpen("%bm.pdf")]... Cannot execute the command. > > > This happens often when there is an update to Reader. See, e.g. [TeXnicCenter & Adobe Reader DC](https://tex.stackexchange.com/questions/250472/texniccenter-adobe-reader-dc?noredirect=1&lq=1) and [TeXnicCenter & Adobe Reader DC in 2020](https://tex.stackexchange.com/questions/525310/texniccenter-adobe-reader-dc-in-2020?rq=1) I know that this can be fixed by changing the name of the "server" in the viewer output profile. This is how I have fixed it every time before. Currently I have it as "acroviewR21", which has worked this year until today. Usually it can be fixed just by updating the year, but since it is still 2021 (as is my version of acrobat reader DC), I am really not sure what to do. I have tried various permutations of the capitalization to no effect. I have tried making it 22 with no effect. Any ideas?
https://tex.stackexchange.com/users/254432
Texnic center and Adobe Acrobat DC, again
false
This work's for me. Thank's This is my ADobe Reader version:
0
https://tex.stackexchange.com/users/302262
693245
321,604
https://tex.stackexchange.com/questions/693246
1
I have an error that I cannot seem to fix. Here is the minimal working example: ``` \documentclass{article} \usepackage{hyperref} \begin{document} See \footnote{\footnote{text}}. \end{document} ``` This produces: ``` pdfTeX warning (dest): name{Hfootnote.2} has been referenced but does not exist, replaced by a fixed one ``` and I cannot see where the bug actually is. I saw the messages [here](https://tex.stackexchange.com/questions/16268/warning-with-footnotes-namehfootnote-xx-has-been-referenced-but-does-not-exi) and [there](https://tex.stackexchange.com/questions/67989/pdftex-warning-has-been-referenced-but-does-not-exist-replaced-by-a-fixed-one) but that does not seem to match my problem.
https://tex.stackexchange.com/users/214919
pdfTeX warning (dest): name{Hfootnote.x} has been referenced but does not exist , replaced by a fixed one
false
Actually, there are two bugs in the code. First, the `footnote` is not properly defined. The code should be: ``` \documentclass{article} \usepackage{hyperref} \begin{document} See \footnote{text}. % OK \end{document} ``` But this was hidden in a bunch of text and I could not locate the bug because LaTeX does not produce any error message for this particular line. Second, the message does not appear if hyperref is not used: ``` \documentclass{article} \begin{document} See \footnote{\footnote{text}}. % Not OK, but does not produce a warning \end{document} ``` The previous code does not produce any warning or error message. The footnote is not properly displayed, however. We see that the footnote is empty.
1
https://tex.stackexchange.com/users/214919
693247
321,605
https://tex.stackexchange.com/questions/456878
0
I need to enter some words that begin with an Arabic hamza. Because of publishers' limitation, I don't use Lua/XeLaTeX, and I experience conflicts with ucs package. LaTeX returns error when it encounters the hamza in the text: "not set up for use with LaTeX". At this point I can only approximate the hamza with \usepackage{rotating} \newcommand{\hamza}{\reflectbox{\large{\textquoteright}}} But I want a real hamza (ء) I use emacs. C-x 8 RET 0621 before a word produces wordء. Emacs thinks I'm writing arabic and so put it to right and works from right to left. But anyway LaTeX does not know the hamza glyph.
https://tex.stackexchange.com/users/21909
Entering Arabic hamza (ء) with LaTeX
false
In my opinion using the package ``` \usepackage{semtrans} ``` provides the easiest solution. All you have to do is put it in your preamble and whenever you want to type a Hamza, write ``` \Ayn ``` in your code, which will print the symbol in the document.
1
https://tex.stackexchange.com/users/290966
693248
321,606
https://tex.stackexchange.com/questions/693239
1
I have a PGF bar chart where the values of the bars are given by variables, using `\newcounter`. Now, the counters are updated after the PGF plot is rendered. Therefore, the plot does not render correctly. How can I render the plot before the counters are updated, but making the PGF plot include the updated counters? Example (not working) ``` \documentclass{article} \usepackage{pgfplots} \newcounter{criticalfindings} \newcounter{highfindings} \newcounter{mediumfindings} \newcounter{lowfindings} \newcounter{informationalfindings} \setcounter{criticalfindings}{0} \setcounter{highfindings}{0} \setcounter{mediumfindings}{0} \setcounter{lowfindings}{0} \setcounter{informationalfindings}{0} \begin{document} \begin{tikzpicture} \begin{axis}[ title=Overzicht, ymajorgrids=true, scale only axis, xtick={1,2,3,4,5}, xticklabels={Kritiek, Hoog, Midden, Laag, Informatief}, every axis plot/.append style={ ybar, bar width=20, bar shift=0pt, fill }, ymin=0, ] \addplot coordinates {(1,\thecriticalfindings)}; \addplot coordinates {(2,\thehighfindings)}; \addplot coordinates {(3,\themediumfindings)}; \addplot coordinates {(4,\thelowfindings)}; \addplot coordinates {(5,\theinformationalfindings)}; \end{axis} \end{tikzpicture} \stepcounter{informationalfindings} \end{document} ``` Here, the `informationalfindings` counter has been incremented to 1. However, this is not reflected in the PGF plot. How can I make this work?
https://tex.stackexchange.com/users/289049
Changed variable is not reflected in PGF chart
true
It seems you think that the graph is a kind of widget, like the ones that you can generate in `jupyter` notebooks, or in other software. But no, in LaTeX the graph is generated/plotted with the current value of the parameter, set "in stone" in the PDF file at that point. I changed your code so that the graphic generation is inside a macro that you can call whenever you want to show the effect. If you want a dynamic graph that tracks the change in counters, I fear LaTeX (which is a *typesetting* system, meant to produce a document, not a widget) is not the correct tool. ``` \documentclass{article} \usepackage{pgfplots}\pgfplotsset{compat=1.18} \newcounter{criticalfindings} \newcounter{highfindings} \newcounter{mediumfindings} \newcounter{lowfindings} \newcounter{informationalfindings} \setcounter{criticalfindings}{0} \setcounter{highfindings}{0} \setcounter{mediumfindings}{0} \setcounter{lowfindings}{0} \setcounter{informationalfindings}{0} \newcommand{\domygraph}{% \begin{tikzpicture} \begin{axis}[ title=Overzicht, ymajorgrids=true, scale only axis, xtick={1,2,3,4,5}, xticklabels={Kritiek, Hoog, Midden, Laag, Informatief}, every axis plot/.append style={ ybar, bar width=20pt,% <<<<<< NOTICE!!! bar shift=0pt, fill }, ymin=0, ] \addplot coordinates {(1,\thecriticalfindings)}; \addplot coordinates {(2,\thehighfindings)}; \addplot coordinates {(3,\themediumfindings)}; \addplot coordinates {(4,\thelowfindings)}; \addplot coordinates {(5,\theinformationalfindings)}; \end{axis} \end{tikzpicture}% } \begin{document} \stepcounter{informationalfindings} \domygraph \stepcounter{highfindings} \domygraph \end{document} ``` I also 1. added a `compat` version for pgfplots (you had a warning about it) 2. added a dimension value for the bar width (newer `pgfplot` will consider a plain `20` to be the same units of the x-axis). You should also probably add a fixed vertical scale.
1
https://tex.stackexchange.com/users/38080
693249
321,607
https://tex.stackexchange.com/questions/692993
5
I have problems with macros containing ifnum. After using the command \noexpand one macro works fine, nesting two of them does not compile but causes the error message --- Extra \fi. \fi --- as in the following code. How can I get my nested macros working? ``` \documentclass{article} \newcommand{\IFCONDA}{\noexpand{\ifnum1>0}} \newcommand{\IFCONDB}{\noexpand{\ifnum1=0}} \begin{document} \IFCONDA hello1 \else % \IFCONDA world1 % next three lines cause trouble (nested ifnum) \IFCONDB hello2 \fi % \IFCONDB \fi % \IFCONDA \end{document} ```
https://tex.stackexchange.com/users/146219
Trouble with nested macros containing ifnum
false
`\if..\else..\fi`-matching only works out with TeX's `\if..`, `\else` and `\fi`-primitives. `\if..\else..\fi`-matching does not apply to macro-tokens which have a phrase `if` or `IF` in their name. With `\if..\else..\fi`-matching expansion of expandable tokens usually only takes places with tokens considered in branches which denote the actual case and which therefore do not just get discarded. For the sake of clarity in your code let's rename `\IFCONDA` to `\MACROA` and `\IFCONDB` to `\MACROB`: ``` \documentclass{article} \newcommand{\MACROA}{\noexpand{\ifnum1>0}} \newcommand{\MACROB}{\noexpand{\ifnum1=0}} \begin{document} \MACROA hello1 \else world1 % next three lines cause trouble (nested ifnum) \MACROB hello2 \fi \fi \end{document} ``` So when the preamble and `\begin{document}` is processed, you have this: ``` \MACROA hello1 \else world1 % next three lines cause trouble (nested ifnum) \MACROB hello2 \fi \fi ``` Now `\MACROA` is expanded and you have s.th. like this: ``` \noexpand{\ifnum1>0}% hello1 \else world1 % next three lines cause trouble (nested ifnum) \MACROB hello2 \fi \fi ``` Now `\noexpand` "tells" TeX not to expand the subsequent token if that is expandable. But the subsequent token is `{` which is not expandable, so `\noexpand` actually has no effect: ``` {\ifnum1>0}% hello1 \else world1 % next three lines cause trouble (nested ifnum) \MACROB hello2 \fi \fi ``` Now due to `{` TeX opens up a local scope, then encounters `\ifnum1>0`. Be aware that brace-nesting (`{`...`}`) is independent from `\if..`-`\else`-`\fi`-nesting! `\ifnum1>0` is true, so TeX processes everything until finding a matching `\fi` or a matching `\else`. *(In case a matching `\fi` is encountered, it gets removed. In case a matching `\else` is found, that `\else` and everything between that `\else` and the matching `\fi` and the matching `\fi` itself gets removed.)* So TeX now encounters `}` and closes the local scope. Then TeX encounters the character tokens `h`, `e`, `l`, `l`, `o`, `1` and a space token. *(The space token comes into being because usually TeX appends a space token to the token stream when in the .tex-input-file finding an end of a line of input while the last token appended to the token stream was not a control word token. `1` is not a control word token but is a character token.)* These tokens are processed further, thus they may affect the result of typesetting/creating a .pdf-file. Then the matching `\else` is found. Thus that `\else` and everything between it and the matching `\fi` and the matching `\fi` itself gets discarded. The first `\fi` is considered the matching `\fi`. The second `\fi` is considered an extra `\fi`. --- In order to avoid confusion when it comes to `\if..`-`\else`-`\fi`-nesting, in many situations you can do s.th. like this: ``` \documentclass{article} \newcommand\FirstOfTwo[2]{#1}% \newcommand\SecondOfTwo[2]{#2}% \newcommand\CheckWhetherConditionA{\ifnum1>0 \expandafter\FirstOfTwo\else\expandafter\SecondOfTwo\fi}% \newcommand\CheckWhetherConditionB{\ifnum1=0 \expandafter\FirstOfTwo\else\expandafter\SecondOfTwo\fi}% \begin{document} \CheckWhetherConditionA{hello1 }{world1\par\CheckWhetherConditionB{hello2}{}}% \end{document} ``` (I said "in many situations" because the `\FirstOfTwo`/`\SecondOfTwo`-method does not work out for choosing one of two instances of a `\verb|...|`-command or a `verbatim`-environment or the like where it is relied on the changes of the category-code-régime introduced by these commands/environments being in effect when reading from the .tex-input-file and tokenizing their arguments/contents.)
0
https://tex.stackexchange.com/users/118714
693250
321,608
https://tex.stackexchange.com/questions/693236
0
``` \begin{table} \caption{SAW parameters of selected substrate materials\cite{campbell1991surface}} \label{materialtable} \begin{tabular}{lm{1.5cm}m{1cm\centering}m{2cm}cm{2.5cm}m{3cm}} \hline \textbf{Material}&\textbf{Crystal Cut}&\textbf{SAW Axis}&\textbf{SAW Velocity (m/s)}& \textbf{$K^2(\%)$}& \textbf{Temperature coefficient of Delay (ppm/\textcelsius)}&\textbf{Application}\\ \hline Quartz& ST&X&3158& 0.11&0&Oscillators,Filters\\ $LiNbO_3$&Y&Z&3488 &4.5& +94&Wide-band filters\\ $LiNbO_3$&128\textdegree&X&3992&5.3&+75&Wide-band filters\\ \vspace{.3cm} $Bi_12GeO_20$&110&001& 1681&1.4&+120&Long delay times\\ $LiTaO_3$&Y&Z&3230&0.72&+35&Oscillators\\ GaAs&\textless001\textgreater&(110)&\textless2841&\textless0.06&-49&Semiconductor IC\\ \hline \end{tabular} \end{table} ```
https://tex.stackexchange.com/users/301034
How to center text in a table column of specified size
false
I would write your table on the following way: * use `tabularray` package for table, its column specifier has simple syntax to declare text centered in cells (see MWE below) * use `mhchem` package (as suggested in comments) for chem expressions, * for horizontal rules use rules defined in the `booktabs` package (loaded as `tabularray` library) * for units and quantities use `siunitx` package MWE (Minimal Working Example): ``` \documentclass{article} \usepackage{geometry} %--------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} %---------------------------------------------------------------% \usepackage[T1]{fontenc} \usepackage{tabularray} \UseTblrLibrary{booktabs, siunitx} \sisetup{input-comparators, retain-explicit-plus} \usepackage[version=4]{mhchem} \begin{document} \begin{table}[htb] \caption{SAW parameters of selected substrate materials \cite{campbell1991surface}} \label{materialtable} \centering \begin{tblr}{colsep=4pt, colspec = {@{} l *{2}{X[c]} X[2, c, si={table-format={<\,}4.0}] X[ c, si={table-format={<\,}1.3}, mode=math] X[2.2, c, si={table-format=-3.0}] l @{}}, row{1} = {guard, m, font=\small\bfseries} } \toprule Material & Crystal Cut & SAW Axis & SAW Velocity (\unit{meter\per\second}) & K^2\ (\%) & Temperature coefficient of Delay (\unit{ppm\per\degreeCelsius}) & Application \\ \midrule Quartz & ST & X & 3158 & 0.11 & 0 & Oscillators, Filters \\ \ce{LiNbO3} & Y & Z & 3488 & 4.5 & +94 & Wide-band filters \\ \ce{LiNbO3} & \qty{128}{\degree} & X & 3992 & 5.3 & +75 & Wide-band filters \\ \ce{Bi12GeO20} & 110 & 001 & 1681 & 1.4 & +120 & Long delay times \\ \addlinespace \ce{LiTaO3} & Y & Z & 3230 & 0.72 & +35 & Oscillators \\ \ce{GaAs} & <001> & (110) & <2841 & <0.06 & -49 & Semiconductor IC \\ \bottomrule \end{tblr} \end{table} \end{document} ``` (red lines indicate page layout)
1
https://tex.stackexchange.com/users/18189
693254
321,610
https://tex.stackexchange.com/questions/693280
1
What would be the procedure to see the value of a latex variable such as `\baselinestretch` and `\parskip`. Macros, such as `\baselinestretch): \show\baselinestretch` and for a dimension such as `\parskip): \showthe\parskip` have been suggested to me. Are the above commands that would be displayed in the latex document ?
https://tex.stackexchange.com/users/302229
Displaying values of latex variables
true
> > What would be the procedure to see the value of a latex variable such as `\baselinestretch` and `\parskip`. > > > Macros, such as `\baselinestretch): \show\baselinestretch` and for a dimension such as `\parskip): \showthe\parskip` have been suggested to me. > > > Are the above commands that would be displayed in the latex document ? > > > It depends on the kind of variable and on where you wish to see the value of the variable: Commands are to occur in the .tex-input-file/in the file containing the .tex source for your document. As `\show` is mentioned while `\show` does actually not refer to the value of a "variable" but does refer to the meaning of a token, let's point out that the meaning of a token is not the same as the value of a "variable". The term **meaning of a token** refers to information about the kind of which the token in question is, plus additional information depending on the kind of token. I.e., whether the token in question denotes a macro or a register or a primitive or a character or ... . In case of the token being a macro you also get information about predicates like `\long`, `\outer`, `\protected` and about parameter text and replacement text. The command `\show*⟨token⟩*` causes TeX to write information about the meaning of the token in question to the console and to the .log-file. The command `\meaning*⟨token⟩*` causes TeX to append character tokens of category 12(other), except spaces which are of category 10(space), to the token stream so that the sequence of these character tokens denotes the information about the meaning of the token in question. Further processing of these character tokens may lead to typesetting information about the meaning of the token in question to the output-file/.pdf-file which TeX is about to produce. **The term "variable"** was officially introduced into TeX-jargon by the developers of LaTeX3/expl3. Outside LaTeX3/expl3 the concept "variable" is rather vague in TeX/LaTeX. Outside LaTeX3/expl3 "value of variable" may denote, e.g., * the value stored in a register, * the value of a TeX-parameter, * the replacement text of a parameterless macro in case that macro serves as "variable" and thus is defined so that the tokens forming its replacement text can be considered the value of the variable, * the value of a LaTeX-counter defined via `\newcounter`. **If "variable" is about a register or a TeX-parameter or the like :** The command `\showthe*⟨token⟩*` causes TeX to write information about the meaning of the value of the register/TeX-parameter denoted by `*⟨token⟩*` to the console and to the .log-file. The command `\the*⟨token⟩*` causes TeX to append character tokens of category 12(other), except spaces which are of category 10(space), to the token stream so that the sequence of these character tokens denotes the information about the value of the register/TeX-parameter denoted by `*⟨token⟩*`. Further processing of these character tokens may lead to typesetting information about the value of the register/TeX-parameter in question to the output-file/.pdf-file which TeX is about to produce. **If "variable" is about a parameterless macro whose expansion is considered to be the value of the variable:** The command `\message{*⟨token⟩*}` causes TeX to write the "value" of the "variable" denoted by the macro `*⟨token⟩*` to the console and to the .log-file. The `*⟨token⟩*` itself, i.e., the command `*⟨token⟩*`, causes TeX to append to the token stream the tokens that form the replacement text of the macro/variable denoted by `*⟨token⟩*`. As that replacement text is considered to be the value of the "variable" denoted by the macro token `*⟨token⟩*`, further processing of the tokens forming that replacement text may lead to typesetting information about the value of the "variable" in question to the output-file/.pdf-file which TeX is about to produce. In order to prevent further expansion of the tokens forming the replacement text of *⟨token⟩*, you can do s.th. like `\detokenize\expandafter{*⟨token⟩*}` . **If "variable" is about a LaTeX-counter defined via `\newcounter`**, then, e.g., `\number\value{*⟨counter⟩*}` and `\the\numexpr\value{*⟨counter⟩*}\relax` can be used for obtaining a set of character tokens of category 12(other) denoting the value of that counter. For writing to console and .log-file you can wrap that between `\message{` and `}`.
1
https://tex.stackexchange.com/users/118714
693281
321,616
https://tex.stackexchange.com/questions/492911
0
I am using Fedora30 and Emacs26.2 in i3wm, TeX 3.14159265 (TeX Live 2018), and AucTex v12.1. I am working on large project (book), and will create quite a few .tex files. Question. Is it possible to use preview-latex outside of main.tex file in which I link sections belonging to chapters. Preview-latex works in main.tex but not in linked section.tex file. Main.tex looks something like: ``` \documentclass[a4paper, 11pt, twoside, openright, ]{book} \title{Title} \usepackage{import} \usepackage{makeidx} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{caption} \usepackage{parskip} \usepackage{tikz} %following 2 lines allow preview-latex for tikz in main.tex %https://tex.stackexchange.com/questions/28564/tikzpicture-blank-in-preview#40461 \usepackage[active,float]{preview} \PreviewEnvironment{tikzpicture} \makeindex \begin{document} \maketitle \frontmatter \import{./}{title.tex} \clearpage \thispagestyle{empty} \tableofcontents{} \mainmatter \chapter*{Introduction} \addcontentsline{toc}{chapter}{Introduction} \markboth{Introduction}{} \import{sections/}{intro.1.tex} \chapter{chapter1} \import{sections/}{ch01.section1.tex} \backmatter \end{document} ``` In ch01.section1.tex file in my case I have for example: ``` \section{some-text} text...text...text... \begin{tikzpicture} \draw[gray, thick] (-1,2) -- (2,-4); \draw[gray, thick] (-1,-1) -- (2,2); \filldraw[black] (0,0) circle (2pt) node[anchor=west] {Intersection point}; \end{tikzpicture} ``` By moving that chapter to main.tex I can confirm that I can use preview-latex on tikz code (thanks to [tikzpicture blank in preview](https://tex.stackexchange.com/questions/28564/tikzpicture-blank-in-preview#40461)), although I get dark background (due to my emacs background I guess) preview of drawing. However, I am not able to get any kind of preview when trying it against ch01.section.tex file. I should add that I was not able to produce any preview-latex in separate file. Not only tikzpicture but also \section and \subsection are not previewed. Errors I was getting when trying preview-latex against ch.01.section1.tex separate file were not surprisingly "LaTeX Error: Missing \begin{document}" Does anyone knows how to enable preview-latex in separate .tex files. **EDIT**: Well, after trying barbara's answer although knowing it has to do with document structure and not with my problem and playing with it, I accidentally found following. I can get preview-latex in separate chapter file by running for example C-c C-p C-p from main.tex file. It does not really matter where from in main.tex I execute this command (preview at point) it will show preview in both, main.tex and chapter.tex. In order to remove preview from both files I have to issue commands in both windows. That works regardless if I use \include or \import. One more thing. I had to remove ``` \usepackage[active,float]{preview} ``` from main.tex because I was getting strange results with that one active. Although I got to see what I was after (preview-latex in separate file) I will still wait a bit before closing this question. Maybe (hopefully) someone has better way of acheiving this. **EDIT2** I forgot to add that I had to change ch01.section1.tex and add \begin{figure} and \end{figure} in order to get preview-latex display in ch01.section1.tex file ``` \begin{figure} \begin{tikzpicture} \draw[gray, thick] (-1,2) -- (2,-4); \draw[gray, thick] (-1,-1) -- (2,2); \filldraw[black] (0,0) circle (2pt) node[anchor=west] {Intersection point}; \end{tikzpicture} \end{figure} ```
https://tex.stackexchange.com/users/189846
preview-latex in separate section file
false
**Posting OP‘s answer that was formerly (if the edit goes through) inside the question, now here as a community wiki:** Now I can use preview-latex in emacs outside of main.tex. I can still use main.tex to compile .pdf, but at the same time in linked file (a.tex in my example) I can use fast preview-latex (C-c C-p C-p) to check on tikzpicture. I also removed all previous clutter, no need for it any more, I think. No idea how to upvote answers I got. but it was Fran's answer about docmute package that worked. Not tested, but I guess my linked (\input) files will not have to have its preamble updated beyond what is needed for tikzpicture in my case. Please someone, enlighten me how to upvote those answers I got. main.tex ``` \documentclass{book} %\usepackage{standalone} \usepackage{listings} \usepackage{tikz} \usetikzlibrary{shapes} \usetikzlibrary{shapes.geometric} \usetikzlibrary{shapes.misc} %\usepackage[active,float]{preview} %\PreviewEnvironment{tikzpicture} \usepackage{docmute} \begin{document} \input{a.tex} \end{document} ``` a.tex ``` \documentclass{book} \usepackage{listings} \usepackage{tikz} \usetikzlibrary{shapes} \usetikzlibrary{shapes.geometric} \usetikzlibrary{shapes.misc} \usepackage[active,float]{preview} \PreviewEnvironment{tikzpicture} \begin{document} \section{some} some text some more text \begin{tikzpicture}[my shape/.style={ rectangle split, rectangle split parts=#1, draw, anchor=center}] \node [my shape=5] at (0,1) {abcdetghijkl\nodepart{two}b\nodepart{three}c\nodepart{four}d\nodepart{five}e}; \end{tikzpicture} \end{document} ```
1
https://tex.stackexchange.com/users/246057
693285
321,619
https://tex.stackexchange.com/questions/693286
-1
Is it possible to write text within math display environment without using the amsmath package ? Have seen the use of `\text{something}` but the command is from `amsmath`.
https://tex.stackexchange.com/users/302287
Text without use of amsmath
true
You can use any of the `\textXX` formatting commands (`\textrm`, `\textit`, etc.) to switch to text mode. The `\text` command from `amsmath` will get the surrounding formatting (e.g., in a theorem, it would print the text in italics), but I think that this is rarely, if ever, desirable. The other thing that `amsmath` gives you which is harder to replicate is that it automatically makes all of these commands adjust size if they appear in super- or subscripts, so, for example, you could write `$e^{\textrm{really big number}}$` and get the expected size adjustment. That said, in most instances, you probably really want to do something like `$n_{\mathrm{something}}$` since text mode is only necessary if you have spaces in your text and multi-word sub- and super-scripts are uncommon.
3
https://tex.stackexchange.com/users/202780
693287
321,620
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?
false
You will cannot do a customization of vertical and horizontal lines in a separate way using the gridpapers package because - in accordance with the implementation given in the documentation of the package - the developers used the instruction `rectangle` to define the grid, in that way, the best option to do what you want is doing something like campa.
1
https://tex.stackexchange.com/users/302207
693292
321,622