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/686892
0
I want to create a custom list while using enumitem and polyglossia. Running `latexmk main` on this `main.tex`: ``` \documentclass[12pt, a4paper]{report} \usepackage{polyglossia} \setmainlanguage{czech} \usepackage{enumitem} \newlist{enumfp}{enumerate}{1} \setlist[enumfp]{label=\textbf{FP-\arabic*},ref=FP-\arabic*} \begin{document} \begin{enumfp} \item A \item B \item C \end{enumfp} \end{document} ``` Produces this output ``` ! Missing number, treated as zero. <to be read again> \c@- l.10 \item A ? ! Missing number, treated as zero. <to be read again> \c@- l.11 \item B ? ! Missing number, treated as zero. <to be read again> \c@- l.12 \item C ? [1] (main.aux) ) ``` But as soon as I remove the polyglossia package and setmainlanguage, the document is produced without any problems. `.latexmkrc`: ``` $pdf_mode = 5; $xelatex = "xelatex --shell-escape %O %S"; $xdvipdfmx = "xdvipdfmx -z 0 -o %D %O %S"; $dvi_mode = 0; $postscript_mode = 0; $hash_calc_ignore_pattern{'timestamp'} = '^'; ```
https://tex.stackexchange.com/users/144491
Enumitem custom list does not work with polyglossia
false
The czech language file contains code that looks ahead at hyphens to implement special hyphenation rules. With XeLaTeX this is rather fragile (your code runs with luaLaTeX). You can protect the hyphen by putting something between it and the following \arabic: ``` \setlist[enumfp]{label=\textbf{FP-{}\arabic*},ref=FP-\arabic*} ``` or ``` \setlist[enumfp]{label=\textbf{FP-\relax\arabic*},ref=FP-\arabic*} ```
1
https://tex.stackexchange.com/users/2388
686895
318,660
https://tex.stackexchange.com/questions/14386
131
Is there a general way to change the font of a particular symbol without switching packages? For example, suppose I'm using Computer Modern for my entire document, but I want the "subset" operator to look as it does in mathabx. How can I redefine it to appear in this way?
https://tex.stackexchange.com/users/4482
Importing a Single Symbol From a Different Font
false
A rewriting of the existing answers, plus some small modifications to demonstrate a way to not use up a symbol font using `\text` instead of `\mathchoice` (and a few other things). --- For example with the `\subset` symbol here: Another example, `\rightlsquigarrow` (example taken from <https://tex.stackexchange.com/a/36088/250119>): --- You can also run the above with your own math package/symbol. I made a solution that works "mostly" automatically -- given a symbol and math font package, it determines the commands needed to define the symbol standalone. <https://www.overleaf.com/read/gywpcrmnyrdx> In order to run it with your own symbol you would need to * fork the Overleaf project * edit the preamble to load the appropriate math font package * modify the symbol to be searched * recompile the PDF. Be careful while copy-pasting code from output PDF. For now, it may not work with everything e.g. delimiter/radical etc. will not work. Unicode math font will also not work.
0
https://tex.stackexchange.com/users/250119
686896
318,661
https://tex.stackexchange.com/questions/454126
4
After hours of trying to figure it out, I finally decided to ask for help. I checked various related answers but I am new to Natbib and couldn't figure out the problem if you might please be able to help. Here is the tex code- ``` \documentclass{article} \usepackage[preprint]{nips_2018} \usepackage[utf8]{inputenc} % allow utf-8 input \usepackage[T1]{fontenc} % use 8-bit T1 fonts \usepackage{hyperref} % hyperlinks \usepackage{url} % simple URL typesetting \usepackage{booktabs} % professional-quality tables \usepackage{amsfonts} % blackboard math symbols \usepackage{nicefrac} % compact symbols for 1/2, etc. \usepackage{microtype} % microtypography \title{Whatever the title maybe} \author{ Writer Name\thanks{32nd Conference on Neural Information Processing Systems (NIPS 2018), Montréal, Canada. ---\emph{whatever it may be}.} \\ Institution and University\\ London, United Kingdom\\ \texttt{bla-bla-bla} \\ } \begin{document} \maketitle \begin{abstract} The abstract paragraph should be indented \nicefrac{1}{2}~inch (3~picas) on both the left- and right-hand margins. Use 10~point type, with a vertical spacing (leading) of 11~points. The word \textbf{Abstract} must be centered, bold, and in point size 12. Two line spaces precede the abstract. The abstract must be limited to one paragraph. \end{abstract} \section{Heading 1} So, for example \citet{hasselmo} investigated that\dots \section{Heading 2} \section{Heading 3} \section{Heading 4} \subsubsection*{Acknowledgments} Use unnumbered third level headings for the acknowledgments. All acknowledgments go at the end of the paper. Do not include acknowledgments in the anonymized submission, only in the final paper.of the margin problems come from figures positioned by hand using or other commands. We suggest using the command from the graphicx package. Always specify the figure width as a multiple of the line width as in the example below \section*{References} References follow the acknowledgments. Use unnumbered first-level heading for the references. Any choice of citation style is acceptable as long as you are consistent. It is permissible to reduce the font size to \verb+small+ (9 point) when listing the references. {\bf Remember that you can use more than eight pages as long as the additional pages contain \emph{only} cited references.} \medskip \small [1] Alexander, J.A.\ \& Mozer, M.C.\ (1995) Template-based algorithms for connectionist rule extraction. In G.\ Tesauro, D.S.\ Touretzky and T.K.\ Leen (eds.), {\it Advances in Neural Information Processing Systems 7}, pp.\ 609--616. Cambridge, MA: MIT Press. [2] Bower, J.M.\ \& Beeman, D.\ (1995) {\it The Book of GENESIS: Exploring Realistic Neural Models with the GEneral NEural SImulation System.} New York: TELOS/Springer--Verlag. [3] Hasselmo, M.E., Schnell, E.\ \& Barkai, E.\ (1995) Dynamics of learning and recall at excitatory recurrent synapses and cholinergic modulation in rat hippocampal region CA3. {\it Journal of Neuroscience} {\bf 15}(7):5249-5262. \end{document} ``` I am using this [NIPS 2018 Style-file listed here](https://nips.cc/Conferences/2018/PaperInformation/StyleFiles) and I'm slightly confused if I need to mention the authors in some author = {}, year = {}, etc.. etc.. format or should natbib be already capable of making that sense for me? I am sure it must be some mistake on my end since while compiling natbib says "undefined citation" and puts "?" in the output pdf. If it helps, I am using TexMaker.
https://tex.stackexchange.com/users/46607
Package natbib Warning: Undefined Citation Warning
false
uncommenting the lines: > > > ``` > \PassOptionsToPackage{numbers, compress}{natbib} > > ``` > > in the template works for me
1
https://tex.stackexchange.com/users/265379
686900
318,663
https://tex.stackexchange.com/questions/686898
13
So, I stumbled across a document that began with, ``` \DocumentMetadata{pdfversion=1.2} \nonstopmode\synctex=1 \documentclass{article} ``` I have seen line 2 and 3 in the wild but I have never seen line 1 anywhere before. I am curious what is it, what does it do and what values does it accept?
https://tex.stackexchange.com/users/93994
What is \DocumentMetadata? What key-value pairs does it take and when should I use it?
false
If everything else fails there's read-the-source-code in `texdoc source2e`. As suggested, proceed to `texdoc documentmetadata-support`. So in this case the command will "set the PDF version explicitly" to 1.2. --- Internally, you can guess that LaTeX simply forward it to the corresponding engine primitive: Technically, you can set whatever value you want and it seem to work anyway: ``` \DocumentMetadata{pdfversion=9.9} \documentclass{article} \begin{document} hello world \end{document} ``` gives a PDF file that starts with ``` %PDF-9.9 %¿÷¢þ ``` Realistically, [according to Wikipedia](https://en.wikipedia.org/wiki/PDF#File_format) the latest version is 2.0, and viewer compatibility varies. See [Why is 1.5 the default pdf version? - TeX - LaTeX Stack Exchange](https://tex.stackexchange.com/questions/301386/why-is-1-5-the-default-pdf-version) for the difference between PDF format versions and which version to pick.
4
https://tex.stackexchange.com/users/250119
686901
318,664
https://tex.stackexchange.com/questions/686903
0
Here is the code: ``` \documentclass[a4paper,twoside,12pt]{article} \usepackage[margin=1.5cm]{geometry} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amssymb,fge,stackengine,scalerel} \usepackage{mathtools} \usepackage{parskip} \usepackage{xcolor} \usepackage{enumitem} \usepackage{graphicx} \usepackage{ushort} \usepackage{colortbl} \usepackage{csquotes} \usepackage{xfrac} \usepackage{BOONDOX-calo} \usepackage[mathscr]{eucal} \usepackage{upgreek} \usepackage{fourier} \DeclareMathAlphabet\mathrsf{U}{rsfso}{m}{n} \pagestyle{empty} \appto\normalsize{\belowdisplayshortskip=\belowdisplayskip} \renewcommand{\vec}{\boldsymbol} \begin{document} $\vec f(\vec x)\vec\cdot\vec f(\vec y)=\vec x\vec\cdot\vec y$ \end{document} ``` If I don’t include the fourier package, \cdot gets bolded. However I really want to use the fourier package, as well as have bolded \cdot’s. Can anybody help?
https://tex.stackexchange.com/users/297887
\boldsymbol does not boldify \cdot
false
May be loading `bm` package will help: ``` \documentclass[a4paper,twoside,12pt]{article} \usepackage[margin=1.5cm]{geometry} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amssymb,fge,stackengine,scalerel} \usepackage{mathtools} \usepackage{parskip} \usepackage{xcolor} \usepackage{enumitem} \usepackage{graphicx} \usepackage{ushort} \usepackage{colortbl} \usepackage{csquotes} \usepackage{xfrac} \usepackage{BOONDOX-calo} \usepackage[mathscr]{eucal} \usepackage{upgreek} \usepackage{fourier} \DeclareMathAlphabet\mathrsf{U}{rsfso}{m}{n} \usepackage{bm} \pagestyle{empty} \appto\normalsize{\belowdisplayshortskip=\belowdisplayskip} \renewcommand{\vec}{\boldsymbol} \begin{document} $\vec f(\vec x)\vec\cdot\vec f(\vec y)=\vec x\vec\cdot\vec y$ \end{document} ```
0
https://tex.stackexchange.com/users/120578
686904
318,665
https://tex.stackexchange.com/questions/686898
13
So, I stumbled across a document that began with, ``` \DocumentMetadata{pdfversion=1.2} \nonstopmode\synctex=1 \documentclass{article} ``` I have seen line 2 and 3 in the wild but I have never seen line 1 anywhere before. I am curious what is it, what does it do and what values does it accept?
https://tex.stackexchange.com/users/93994
What is \DocumentMetadata? What key-value pairs does it take and when should I use it?
true
`\DocumentMetadata` is a rather new command, it has been announced one year ago in the [LaTeX news](https://www.latex-project.org/news/2022/03/21/latex-dev-2022-1/) . It is the trigger to tell LaTeX that the current document is a new/modern document that should use concepts not available in traditional LaTeX2e documents, for example, everything developed for the PDF tagging project which has the goal to enable LaTeX to easily and automatically produce tagged PDF's. (<https://www.latex-project.org/publications/indexbytopic/pdf/>) This new command has to come first in a LaTeX document, before `\documentclass`. It is used, as the name suggests, to set metadata about the entire document, but while the PDF tagging project is being worked on, it is also used to enable new code from this project. If you use it without any option if will load the new PDF management code (currently in the pdfmanagement-testphase package) which is used for various PDF related tasks like transparency, spotcolors, XMP-metadata, changing the pdfversion and support for PDF standards. A visible effect is that it will change the default link colors of hyperref. `\DocumentMetadata` has a number of keys which are described in documentmetadata-support-doc.pdf (and also in ltdocinit.pdf of the pdfmanagement-testphase package): * `pdfversion`: to set the pdfversion, e.g. `pdfversion=2.0` (setting it to 1.2 as in your example is not something that I would recommend). * `pdfstandard`: to set a standard, e.g. `pdfstandard=A-2b` * `lang`: to set the /Lang key in the pdf catalog, e.g. `lang=de` * `xmp`: a boolean to suppress the XMP-metadata * `colorprofiles`: to add and configure color profiles (more info in l3pdfmeta.pdf) * `uncompress`: to produce an uncompressed PDF (it is a short hand for `debug={uncompress}`, but I need it so often ...). * `backend`: to set a backend/engine that can not be detected automatically, e.g. dvipdfmx. * `debug`: to set debug options There are a few packages and classes which are not compatible with the PDF management, but for most documents it should be unproblematic to use `\DocumentMetadata` with the keys mentioned above. This is not the case for last key `testphase`. It enables automation for tagging and all of this automation is currently in a prototype state and restricted to the use of standard classes (article, report, and book) and supports only a limited number of add-on packages (feedback about problems with other packages are welcome). The `testphase` key accepts a comma list of values. Currently the main values are `phase-I` (a bit tagging), `phase-II` (more tagging), `phase-III` (needs LaTeX 2023-06-01 or newer and perhaps a latex-dev). But there are some more, e.g. with `\DocumentMetadata{testphase={phase-III,math}}` you can additionally load a prototype for math tagging. It is recommended to follow the LaTeX news and to check the `latex-lab` bundle if you want to test that.
17
https://tex.stackexchange.com/users/2388
686905
318,666
https://tex.stackexchange.com/questions/686891
0
I would like line numbers to not reset when using `poetry` environment. Consider this MWE: ``` \documentclass{article} \usepackage{poetry} \setcounter{poemlinenumsevery}{5} \begin{document} {\bf First} \begin{poem} Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\! Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\! \end{poem} {\bf Second} \begin{poem} Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\! Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\! \end{poem} \end{document} ``` Is there a way to make the line numbering continue counting even though you've started a new verse environment?
https://tex.stackexchange.com/users/188424
Don't reset line numbers using Poetry package
false
Ask the package maintainer for the enhancement. If I understand correctly, line numbering can be carried across `poem` environments with a helper counter and its associated code changes added to each `poem` beginning and end, but then the modulo function will need to be rewritten. MWE ``` \documentclass{article} \usepackage{poetry} %\setcounter{poemlinenumsevery}{5} \newcount\oldpoemlineno% \newcounter{oldpoemline}% \begin{document} \textbf{First} \begin{poem} Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\! Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\? \setcounter{oldpoemline}{\the\poemlineno}% \end{poem} \textbf{Second} \begin{poem}*% \setcounter{poemline}{\theoldpoemline}% \poemlineno=\thepoemline% \ifnum\poemlineno=1\poemlineno=\thepoemline\*\fi% Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\! Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\? \setcounter{oldpoemline}{\the\poemlineno}% \end{poem} \textbf{Third} \begin{poem}*% \setcounter{poemline}{\theoldpoemline}% \poemlineno=\thepoemline% \ifnum\poemlineno=1\poemlineno=\thepoemline\*\fi% Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\! Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit\\? \setcounter{oldpoemline}{\the\poemlineno}% \end{poem} \end{document} ```
1
https://tex.stackexchange.com/users/182648
686912
318,667
https://tex.stackexchange.com/questions/87536
38
Using latexdiff I have the problem, that by adding new `\section`, I get the following error by trying to run pdflatex. ``` ! Argument of \UL@word has an extra }. <inserted text> \par l.69 \subsection{\DIFadd{Some Text}} ``` Here you can see the redefined `\section` command... ``` \renewcommand{\section}{% \@startsection{section}% {1} % Structure level {0mm} % Indention {2ex plus 1ex minus 1ex} % Pre-Margin {0.5ex plus 0.5ex minus 0.5ex} % Post-Margin {\chapterheadfont\Large\bfseries} % Style } \renewcommand{\subsection}{% \@startsection{subsection}% {2} % Structure level {0mm} % Indention {1.5ex plus 1ex minus 0.5ex} % Pre-Margin {0.3ex plus 0.3ex minus 0.3ex} % Post-Margin {\chapterheadfont\large\bfseries} % Style } ``` How can I fix the problem? It would work for me also to ignore the changed section names.
https://tex.stackexchange.com/users/23455
Problem using latexdiff and pdflatex with custom command
false
I was able to resolve this by treating `hyperref` differently while building the diff. There's an [issue](https://github.com/ftilmann/latexdiff/issues/13) on the latexdiff repo that talks about it: `latexdiff old.tex new.tex --packages=hyperref > testdiff.tex` After this `pdflatex` on the diff started working for me.
0
https://tex.stackexchange.com/users/110136
686922
318,674
https://tex.stackexchange.com/questions/686903
0
Here is the code: ``` \documentclass[a4paper,twoside,12pt]{article} \usepackage[margin=1.5cm]{geometry} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amssymb,fge,stackengine,scalerel} \usepackage{mathtools} \usepackage{parskip} \usepackage{xcolor} \usepackage{enumitem} \usepackage{graphicx} \usepackage{ushort} \usepackage{colortbl} \usepackage{csquotes} \usepackage{xfrac} \usepackage{BOONDOX-calo} \usepackage[mathscr]{eucal} \usepackage{upgreek} \usepackage{fourier} \DeclareMathAlphabet\mathrsf{U}{rsfso}{m}{n} \pagestyle{empty} \appto\normalsize{\belowdisplayshortskip=\belowdisplayskip} \renewcommand{\vec}{\boldsymbol} \begin{document} $\vec f(\vec x)\vec\cdot\vec f(\vec y)=\vec x\vec\cdot\vec y$ \end{document} ``` If I don’t include the fourier package, \cdot gets bolded. However I really want to use the fourier package, as well as have bolded \cdot’s. Can anybody help?
https://tex.stackexchange.com/users/297887
\boldsymbol does not boldify \cdot
false
If switching to `lualatex` is an option for you, you could use the `fourier-otf` fonts which provide a (limited) support for bold maths. Here is an example: ``` \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage[bold-style=ISO]{fourier-otf} \setmathfont{Erewhon-Math-Bold}[version=bold,bold-style=ISO] \begin{document} $f(x)\cdot f(y) = x \cdot y$ $\symbf{f(x)\cdot f(y) = x \cdot y}$ {\mathversion{bold}$f(x)\cdot f(y) = x \cdot y$} \end{document} ``` and the output:
1
https://tex.stackexchange.com/users/69978
686927
318,675
https://tex.stackexchange.com/questions/686843
2
A follow up to this question: [How to align numbers on decimal points? Please explain the meaning of the code](https://tex.stackexchange.com/questions/686800/how-to-align-numbers-on-decimal-points-please-explain-the-meaning-of-the-code) My table: ``` \begin{table}[!htb] \centering \caption{question} \label{tab:q} \begin{tabular}{lcccccl} \hline & \multicolumn{6}{c}{\textbf{Pooled OLS}} \\ \cline{2-7} & (1) & & (2) & & (3) & \multicolumn{1}{c}{} \\ & \multicolumn{6}{c}{\textbf{Outcome variable}} \\ \hline \textit{\textbf{Group 1}} & & & & & \multicolumn{1}{l}{} & \\ \textbf{Treatment} & 0.0929 & \multicolumn{1}{l}{***} & 0.0615 & \multicolumn{1}{l}{***} & 0.0548 & ** \\ \textbf{} & (0.0177) & & (0.0173) & & (0.0177) & \\ \textbf{Base control} & No & & Yes & & Yes & \\ \textbf{Additional controls} & No & \multicolumn{1}{l}{} & No & \multicolumn{1}{l}{} & Yes & \\ \textbf{Observations} & 4,537 & & 4,537 & & 4,493 & \\ \hline \textit{\textbf{Group 2}} & & & & & \multicolumn{1}{l}{} & \\ \textbf{Treatment} & $-$0.0078 & \multicolumn{1}{l}{} & $-$0.0323 & \multicolumn{1}{l}{***} & $-$0.0354 & *** \\ \textbf{} & (0.0125) & & (0.0123) & & (0.01249) & \\ \textbf{Base control} & No & & Yes & & Yes & \\ \textbf{Additional controls} & No & \multicolumn{1}{l}{} & No & \multicolumn{1}{l}{} & Yes & \\ \textbf{Observations} & 5,401 & & 5,401 & & 5,383 & \\ \hline \multicolumn{7}{l}{\footnotesize Standard errors are in parentheses.} \end{tabular} \end{table} ``` I want to align the number with decimals by decimal points, but keep the words and integers centered. I followed @Steven B. Segletes yesterday by adding ``` \usepackage{tabularx,stackengine,collcell,booktabs} \let\endecm\relax \newcolumntype{D}[1]{>{\collectcell\Decm l{#1}}r<% {..\endDecm\endcollectcell}} \def\decm#1#2#3.#4.#5\endDecm{#3.% \stackengine{0pt}{#4}{\rule{#2\wd0}{0pt}}{O}{#1}{F}{F}{L}} \newcommand\Decm[1]{\setbox0=\hbox{0}\decm#1} ``` and change `\begin{tabular}{lcccccl}` to `\begin{tabular}{lD{5}cD{5}cD{5}l}` But then the `Yes` and `No` and the observation numbers are not centered.
https://tex.stackexchange.com/users/251582
How to align numbers by decimal points but still keep the words centered?
true
The problem with the `D` columns in the referenced answer ([How to align numbers on decimal points? Please explain the meaning of the code](https://tex.stackexchange.com/questions/686800/how-to-align-numbers-on-decimal-points-please-explain-the-meaning-of-the-code)) is that all entries in a `D` column are assumed to be decimal numbers. Here, I have amended that answer so that a cell entry in a `D` column is first checked to see if it contains a decimal point. If it does, it treats it as before. If it does not, it merely presents the cell contents centered in box of width equal to 2 digits larger than the specified decimal width, which itself is right-aligned to the decimal entries in the column. This approach is not a fix all, because the choice of "2 digits larger than the specified decimal width" is somewhat arbitrary and may not present nicely for all data. Nonetheless it is an improvement. ``` \documentclass{article} \usepackage{tabularx,stackengine,collcell,booktabs} \let\endecm\relax \newcolumntype{D}[1]{>{\collectcell\Decm l{#1}}r<% {..\endDecm\endcollectcell}} \def\decm#1#2#3.#4.#5\endDecm{\ifx\relax#4\relax \makebox[\numexpr2+#2\relax\wd0]{#3}\else #3.\stackengine{0pt}{#4}{\rule{#2\wd0}{0pt}}{O}{#1}{F}{F}{L}\fi} \newcommand\Decm[1]{\setbox0=\hbox{0}\decm#1} \begin{document} \begin{tabular}{lD{5}cD{5}cD{6}l}\hline & \multicolumn{6}{c}{\textbf{Pooled OLS}} \\ \cline{2-7} & (1) & & (2) & & (3) & \multicolumn{1}{c}{} \\ & \multicolumn{6}{c}{\textbf{Outcome variable}} \\ \hline \textit{\textbf{Group 1}} & & & & & \multicolumn{1}{l}{} & \\ \textbf{Treatment} & 0.0929 & \multicolumn{1}{l}{***} & 0.0615 & \multicolumn{1}{l}{***} & 0.0548 & ** \\ \textbf{} & (0.0177) & & (0.0173) & & (0.0177) & \\ \textbf{Base control} & No & & Yes & & Yes & \\ \textbf{Additional controls} & No & \multicolumn{1}{l}{} & No & \multicolumn{1}{l}{} & Yes & \\ \textbf{Observations} & 4,537 & & 4,537 & & 4,493 & \\ \hline \textit{\textbf{Group 2}} & & & & & \multicolumn{1}{l}{} & \\ \textbf{Treatment} & $-$0.0078 & \multicolumn{1}{l}{} & $-$0.0323 & \multicolumn{1}{l}{***} & $-$0.0354 & *** \\ \textbf{} & (0.0125) & & (0.0123) & & (0.01249) & \\ \textbf{Base control} & No & & Yes & & Yes & \\ \textbf{Additional controls} & No & \multicolumn{1}{l}{} & No & \multicolumn{1}{l}{} & Yes & \\ \textbf{Observations} & 5,401 & & 5,401 & & 5,383 & \\ \hline \multicolumn{7}{l}{\footnotesize Standard errors are in parentheses.} \end{tabular} \end{document} ```
2
https://tex.stackexchange.com/users/25858
686928
318,676
https://tex.stackexchange.com/questions/686915
0
I am using the `scrbook` document class, and **I just want to set the background color** for the standard title page created through `\maketitle`. I already tried using the `pagecolor` package [1], but it shows no effect for the `scrbook` class. (Works with `memoir`, though.) [1] <https://tex.stackexchange.com/a/240862/222387> Any help is appreciated!
https://tex.stackexchange.com/users/222387
Set background color for scrbook \maketitle page
true
I don't see any problem without needing a special package for it: ``` \documentclass{scrbook} \usepackage{xcolor} \AddToHook{env/titlepage/begin}{\pagecolor{green}} \AddToHook{env/titlepage/after}{\nopagecolor} \begin{document} \title{Title} \author{Author} \maketitle \chapter{Test} \end{document} ``` Or for those, who use an old LaTeX without generic hooks: ``` \documentclass{scrbook} \usepackage{xcolor} \begin{document} \pagecolor{green} \title{Title} \author{Author} \maketitle \nopagecolor \chapter{Test} \end{document} ``` Both examples have the same result:
2
https://tex.stackexchange.com/users/277964
686929
318,677
https://tex.stackexchange.com/questions/12587
7
I would like to allow the user to interact with the document at compilation time, for example to choose the color of hyperlinks. For that, I created a new if and used `\typein` like in the following example : ``` \documentclass{article} \usepackage[colorlinks]{hyperref} \newif\ifcllinks \newcommand\cllink{} \typein[\cllink]{Coloried links (true or false) ?} \csname cllinks\cllink \endcsname \ifcllinks \hypersetup{linkcolor=red,citecolor=blue,filecolor=green,urlcolor=blue} \else \hypersetup{linkcolor=black,citecolor=black,filecolor=black,urlcolor=black} \fi \begin{document} \section{Title}\label{one} The section \ref{one} \end{document} ``` This works, but I'm not satisfied because of the supplementary macro `\cllink` that isn't very necessary (I think). I try ``` \newif\ifcllinks \csname cllinks\typein{Coloried links (true or false) ?} \endcsname ``` But this doesn't work (`missing \endcsname inserted`). Is it possible to make it works with some TeX hackery (`\expandafter`, `\string`, …) ?
https://tex.stackexchange.com/users/3172
Is it possible to simplify this interactive macro using \typein so it doesn't use an auxiliary macro?
false
With shell-escape you can make "`\typein`" expandable with `\@@input "|⟨command⟩"`. Assumes UNIX-like system with bash-like shell. Only for academical purpose, not for any serious usage. Of course there's also the trivial solution of using `\directlua` if it's LuaTeX (which can actually be used seriously). ``` \documentclass{article} \usepackage[colorlinks]{hyperref} \newif\ifcllinks \makeatletter \def\zap@one@space#1 {#1} \begingroup\expandafter\endgroup\csname cllinks% \expandafter\zap@one@space\@@input "|echo >&2;read -p 'Coloried links (true or false) ?';echo $REPLY"\endcsname \makeatother \ifcllinks \hypersetup{linkcolor=red,citecolor=blue,filecolor=green,urlcolor=blue} \else \hypersetup{linkcolor=black,citecolor=black,filecolor=black,urlcolor=black} \fi \begin{document} \section{Title}\label{one} The section \ref{one} \end{document} ``` The `zap@one@space` is needed to delete the trailing newline which is tokenized into a space (assuming `\endlinechar=13` and `\catcode 13=5`). The `\begingroup\expandafter\endgroup` is just a convenience thing to raise an error in case the user type something other than `true` or `false`.
1
https://tex.stackexchange.com/users/250119
686930
318,678
https://tex.stackexchange.com/questions/686379
2
I have the following code and I would like to have individual line numbers for both first and second parts Code: ``` \documentclass{article} \usepackage{amsmath} \usepackage{mdframed} \begin{figure} \begin{mdframed} First part:\\ first line \\ second line\\ Second part:\\ something here \end{mdframed} \end{figure} ``` Preferred format is ``` ------------------- | First part: | |1 first line | |2 second line | | Second part: | |1 something here | ------------------- ```
https://tex.stackexchange.com/users/297518
How to add line numbers inside a box?
true
One way with `listings`, but is designed to put the line numbers at margin, without indenting the code, so you must add a tabulation to each line of code if you want to indent this number and the code like the items of a list. On the other hand, the code will be printed as is, so you should not break lines with `\\` ``` \documentclass[twocolumn,a5paper]{article} \usepackage{xcolor} \usepackage{mdframed} \usepackage{listings} \lstset{numbers=left,,basicstyle=\ttfamily, numbersep=-10pt,tabsize=4} \begin{document} \begin{figure} \begin{mdframed} First part: \begin{lstlisting}[name=Foo] first line second line \end{lstlisting} Second part: \begin{lstlisting}[name=Bah] something here \end{lstlisting} \end{mdframed} \end{figure} \end{document} ```
1
https://tex.stackexchange.com/users/11604
686937
318,681
https://tex.stackexchange.com/questions/655524
0
I would like margin notes in the left margin, aligned with the first line of a paragraph, similar to [this question](https://tex.stackexchange.com/questions/5132/vertical-align-a-marginpar-with-the-first-line-of-a-2-line-statement). Basically these are headings for the paragraph. In the source code, I'd like the margin note to *precede* the paragraph it's meant to be attached to, for readability (the reader will read the margin note first, so I want to write it first). The linked question says that this should work, but for me this aligns the margin note with the last line of the *previous* paragraph: ``` \marginpar{Note} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ```
https://tex.stackexchange.com/users/32297
How do I align a marginal note with the first line of the paragraph immediately following it?
false
`\marginpar` is not the right tool for the job. If this is a section header, it should be done with `\section` with the formatting to put the header in the margin. The following is some undocumented code I wrote that does this at the `\subsection` level. ``` \def\subsection{\@afterindentfalse\secdef\@subsection\@ssubsection} \def\@subsection[#1]#2{% \ifnum \c@secnumdepth>1 \refstepcounter{subsection} \addcontentsline{toc}{subsection}{\protect\numberline{\thesubsection}#1}% \else \addcontentsline{toc}{subsection}{#1}% \fi \subsectionmark{#1} \vskip 12pt plus2pt minus1pt \def\@svsechd{\raggedright\reset@font\normalsize\textit{\ifnum\c@secnumdepth>1\relax\thesubsection~\fi#2}} \@@afterheading} \def\@ssubsection#1{\def\@svsechd{\reset@font\raggedleft\large\sc#1}% \@@afterheading} \def\@@afterheading{\global\@nobreaktrue \everypar{\if@nobreak \global\@nobreakfalse \if@afterindent \else {\setbox0=\lastbox}\fi % \interlinepenalty \@M \vadjust{\llap{\vbox to0pt{\vskip-9pt \vtop{\hsize\marginparwidth \@svsechd}\vss}\hskip\marginparsep}}% \clubpenalty \@M \else \clubpenalty \@clubpenalty \interlinepenalty \@interlinepenalty \everypar{}\fi}} ``` There is a limitation with this code that if there is a `\subsubsection` immediately following the `\subsection` that the header will disappear.¹ This code is a bit old and I likely would have done somethings differently if I were creating it from scratch now, but it should be at least a good starting point. --- 1. “Doctor, it hurts when I do this.” “Then don’t do that.”
0
https://tex.stackexchange.com/users/202780
686948
318,686
https://tex.stackexchange.com/questions/686884
0
I'm writing a book with CRC publishing who gave me their proprietary `Alon.cls` class file[^1]; unfortunately, its documentation warns of incompatibility with `hyperref` without giving more details, and indeed I'm getting errors when I try to use it with pandoc-generated LaTeX (I'm writing the book in Quarto, which lets me produce e-book, website, etc. from the same input). Is there a good/easy way to provide dummy replacements for hyperref's macros such as ``` \hypertarget{intro}{% \section*{Introduction}\label{intro}} ``` or any other workaround when one is forced to use such a class? [1]: Apparently someone posted a copy of `Alon.cls` in their public gitee repo
https://tex.stackexchange.com/users/269911
Alon.cls incompatibility with hyperref – workarounds?
false
Thanks to David's comments I'm now using defining these dummy macros as a workaround: ``` \newcommand\hypertarget[2]{#2} \newcommand\texorpdfstring[2]{#1} \newcommand\bookmarksetup[1]{} \newcommand\href[1]{#1} ``` This seems to cover the macros introduced by pandoc relying on bookmark and hyperref. Hopefully someday CRC will fix the mess they've made in that Alon.cls class.
0
https://tex.stackexchange.com/users/269911
686951
318,688
https://tex.stackexchange.com/questions/686865
0
(Please suggest a better title!) The following LaTeX document defines a macro called `/PrintStuff`. This macro uses `pgfkeys` to define one optional argument, `rowidstring`. The macro `\rowidstring@tables` is used to store the value assigned to that argument. If I pass the macro `\rowidstring` as the value to the `rowidstring` argument, I get the following error. ``` ! Use of \rowidstring doesn't match its definition. \pgfkeys@code ... ->\edef \rowidstring @tables{#1} ``` This problem disappears if I use `\foobar`, for example. Clearly TeX is unhappy that I'm using the same string `\rowidstring` as part of the name of two different macros, but beyond that I'm not clear what the problem is. And technically aren't `\rowidstring@tables` and `\rowidstring` two different macro names? Running a trace on the document produces huge quantities of output, but nothing I can understand. Also, it's convenient to use the same string in both places as I am doing here. So is there a workaround that will let me do this? ``` \documentclass[a4paper]{scrartcl} \usepackage{pgf} \pgfkeys { /printstuff/.is family, /printstuff, default/.style = { rowidstring, }, rowidstring/.estore in = \rowidstring@tables, rowidstring/.default = {}, } \NewDocumentCommand{\PrintStuff}{O{}} { \pgfkeys{/printstuff, default, #1}% \typeout{ROWIDSTRING is \rowidstring@tables} } \newcommand{\rowidstring}{id1,id2} %\newcommand{\foobar}{id1,id2} \begin{document} \PrintStuff[rowidstring=\rowidstring] %\PrintStuff[rowidstring=\foobar] \end{document} ```
https://tex.stackexchange.com/users/3406
Name collision when defining a macro using pgfkeys
false
Lets first reduce what `.estore in` does. Your key is in principle identical to ``` \edef<macro>{<value>} ``` But `pgfkeys` doesn't check whether `<macro>` really is a single token. In your case `@` is of category 12, and hence your `rowidstring` is identical to ``` \edef\rowidstring @tables{<value>} ``` If you use this you define a macro `\rowidstring` that has the argument pattern `@tables` (so expects that literal input directly following it). Each time you call `default` you do `\edef\rowidstring @tables{}` so you define the macro to expect the input `@tables` and expand to nothing. When you use that in your code everything's fine, because your usage of `\rowidstring` is normally followed by `@tables` in `\PrintStuff` (because you originally wanted to use the control word `\rowidstring@tables`). Now in your breaking usage of `\PrintStuff[rowidstring=\rowidstring]` what you implicitly do is ``` \edef\rowidstring @tables{} % the effect of `default` \edef\rowidstring @tables{\rowidstring} ``` The first overwrites your `\newcommand{\rowidstring}{id1,id2}` by the macro expecting to be followed by `@tables`. The second then uses this macro, but it is followed by `}` and not by `@tables`. TeX tries to expand that in `\edef`, but it can't and throws the error ``` ! Use of \rowidstring doesn't match its definition. ```
2
https://tex.stackexchange.com/users/117050
686952
318,689
https://tex.stackexchange.com/questions/686943
0
In the following MWE, ``` \documentclass[12pt]{book} \usepackage{afterpage} \usepackage{epigraph} \usepackage{fancyhdr} \setlength{\headheight}{27.15pt} \pagestyle{fancy} \newcommand\blankpage{% \null \thispagestyle{empty}% \addtocounter{page}{-1}% \newpage} \newcounter{mycounter} \setcounter{mycounter}{0} \begin{document} \begin{titlepage} A title\\ and its subtitle \afterpage{\blankpage} \end{titlepage} \afterpage{\blankpage} \pagenumbering{roman} \indent Copyright \textcopyright\ 2023 The author All rights reserved. \frontmatter \newpage \begin{center} \(\mathit{for \ my \ partner}\) \end{center} \chapter{Preface} \newpage \chapter{Acknowledgements} \newpage \thispagestyle{empty} \tableofcontents \setcounter{tocdepth}{2} \chapter{Introduction } \medskip \ \setlength{\epigraphwidth}{0.16\textwidth} \epigraph{An epigraph} \mainmatter \chapter{The formal language} \end{document} ``` the pagination of the front matter is divided into two groups, and the pattern of counting all pages and paginating only odd pages is not maintained. How may these problems be resolved? I would prefer it if all pages in front matter were paginated.
https://tex.stackexchange.com/users/24406
Frontmatter pagination problem
false
Here is an answer based upon a tip by @egreg in the comment section: ``` \documentclass[12pt]{book} \usepackage[greek,english]{babel} \usepackage{hyperref} \usepackage{afterpage} \usepackage{epigraph} \usepackage{fancyhdr} \setlength{\headheight}{27.15pt} \pagestyle{fancy} \newcommand\blankpage{% \null \thispagestyle{empty}% \addtocounter{page}{0}% \newpage} \newcounter{mycounter} \setcounter{mycounter}{1} \begin{document} \begin{titlepage} A title\\ and its subtitle \afterpage{\blankpage} \end{titlepage} \frontmatter \pagenumbering{roman} \indent Copyright \textcopyright\ 2023 The author All rights reserved. \newpage \begin{center} \(\mathit{for \ my \ partner}\) \end{center} \chapter{Preface} \newpage \chapter{Acknowledgements} \newpage \tableofcontents \setcounter{tocdepth}{2} \chapter{Introduction } \medskip \ \setlength{\epigraphwidth}{0.16\textwidth} \epigraph{An epigraph} \mainmatter \chapter{The formal language} \end{document} ```
0
https://tex.stackexchange.com/users/24406
686963
318,694
https://tex.stackexchange.com/questions/686938
5
Page 9 of the LaTeX 3 interfaces file (interface3.pdf) discusses the commands `\ProvidesExplPackage`, `\ProvidesExplClass`, and `\ProvidesExplFile`. > > These functions act broadly in the same way as the corresponding LATEX2ε kernel functions > \ProvidesPackage, \ProvidesClass and \ProvidesFile. However, they also implicitly > switch \ExplSyntaxOn for the remainder of the code with the file. At the end > of the file, \ExplSyntaxOff will be called to reverse this. (This is the same concept as > LATEX2ε provides in turning on \makeatletter within package and class code.) > > > So I've just tested the latter command `\ProvidesFile` and it does not appear to do this. I tested a MWE: ``` \documentclass{article} \input{ExplFile} \newcommand{\pangram}{The Five Boxing Wizards Jump Quickly!} \begin{document} \pangram \end{document} ``` The input `ExplFile`, located in the same folder, has code ``` % \ProvidesExplFile{ExplFile}{2023/05/27}{1.0.0}{Test file} % %FILE CONTENTS % ``` The compiled pdf displays only the `\pangram` but all the space characters are removed. The only reason the space characters wouldn't display as usual is due to ExplSyntax not turning off automatically at the end of the file with `\ProvidesExplFile`. EDIT: 2023-07-03 I just learned that this issue was already posted on GitHub. <https://github.com/latex3/latex3/issues/817>
https://tex.stackexchange.com/users/278534
\ProvidesExplFile Question
false
`\ProvidesExplFile` is based on `\ProvidesFile`, which then 'goes with `\ProvidesPackage` and `\ProvidesClass`. These all use the LaTeX catcode stack to save/restore `@` (classically) and `ExplSyntaxOn/Off` status. However, to do that, you have to load the files in the right way: `\RequirePackage`, `\LoadClass`, etc. At present, for arbitrary files there is only `\@onefilewithoptions`, which is really internal: that is something we need to address. If, however, you use this mechanism, you will find that the code status is correctly handled.
4
https://tex.stackexchange.com/users/73
686984
318,699
https://tex.stackexchange.com/questions/686985
2
Suggest me `LaTeX` command and package on how the words `Chapter 1` can be appeared in the table of contents instead of just `1` and so on for the next chapters. Following is the template of the thesis of our university: ``` \documentclass[12pt,openany,oneside]{book} \usepackage[pdftex]{graphicx} \usepackage[a4paper,portrait,left=1.5in, right=1in,top=1in, bottom=1.33in, footskip=0.33in]{geometry} %\usepackage{sectsty} %\sectionfont{\fontsize{12}{15}\selectfont} \usepackage{titlesec} \usepackage{lipsum} %\titleformat{\chapter}[display] %{\normalfont\Large\filcenter\sffamily} %{\vspace*{\fill} %\titlerule[1pt] %\vspace{1pc} %\LARGE\MakeUppercase{\chaptertitlename}~\thechapter} %{1pc} %{\titlerule\Huge} %[\vspace*{\fill}\newpage] \titleformat{\chapter}[display] {\normalfont\huge\bfseries\centering}{\chaptertitlename \ \thechapter}{20pt}{\Huge} \titlespacing*{\chapter}{0pt}{250pt}{40pt} \usepackage{epstopdf} \usepackage{subfigure} \usepackage{epsfig} \usepackage{color} %\usepackage{a4wide} \usepackage{amsmath} \usepackage{amssymb} \usepackage{enumitem} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage{ntheorem} \usepackage[normalem]{ulem} \usepackage{chngcntr} %\usepackage[pdfencoding = auto, psdextra, bookmarksdepth = 4]{hyperref} %\usepackage{microtype} \overfullrule=5pt \hfuzz=20pt \vfuzz=20pt \hbadness=10000 \vbadness=\maxdimen \renewcommand{\chaptermark}[1]{ \markboth{\chaptername\ \thechapter.\ #1}{}} \renewcommand{\sectionmark}[1]{ \markright {\thesection.\ #1}} \parindent0pt \newlength{\defbaselineskip} \setlength{\defbaselineskip}{\baselineskip} \newcommand{\setlinespacing}[1]% {\setlength{\baselineskip}{#1 \defbaselineskip}} \newcommand{\doublespacing}{\setlength{\baselineskip}% {2.0 \defbaselineskip}} \newcommand{\singlespacing}{\setlength{\baselineskip}{\defbaselineskip}} \setlinespacing{1.5} \newtheorem*{theorem-non}{Theorem} \newtheorem{definition}{Definition}[chapter] \newtheorem{lemma}{Lemma}[chapter] \newtheorem{theorem}{Theorem}[chapter] \newtheorem{remark}{Remark}[chapter] \newtheorem{example}{Example}[chapter] \newtheorem{corollary}{Corollary}[chapter] \newenvironment{proof}% {\medskip\par\noindent{\bf Proof\;}}% {\hspace{\fill}$\Box$\medskip\par} \numberwithin{equation}{chapter} \numberwithin{theorem}{chapter} \numberwithin{lemma}{chapter} \numberwithin{corollary}{chapter} \numberwithin{example}{chapter} \numberwithin{remark}{chapter} \numberwithin{definition}{chapter} \renewcommand{\bibname}{} \hyphenpenalty 50 \newtheorem{property}{Property} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %\newcommand{\cchapter}[1]{\chapter[#1]}{\centering #1}} %%%%%%%%%%%%%%%%%%%%% %\newgeometry{left=1.5in, right=1.0in, bottom=1.75in, top=1in, footskip=0.75in} %\addtolength{\oddsidemargin}{0.5cm} % \addtolength{\evensidemargin}{0.5cm} % \addtolength{\textwidth}{0.0cm} % \addtolength{\topmargin}{0.0cm} % \addtolength{\textheight}{0.0cm} %%%%%%%%%%%%%%%%%%% \usepackage[noabbrev]{cleveref} \begin{document} \pagestyle{plain} \setlinespacing{1.5} %\input{Acknowledgement} \newpage \input{mytitle.tex} %%%%%%%%%%%%%%%%%%%% \newpage \pagenumbering{arabic} \setcounter{page}{1} \input{chap1.tex} %%%%%%%%%%%%%%%%%% \input{chap2.tex} %%%%%%%%%%%%%%%%%% \input{chap3.tex} %%%%%%%%%%%%%%%% \input{chap4.tex} %%%%%%%%%%%%%%%%% \input{chap5.tex} %%%%%%%%%%%%%%%%%%% \input{chap6.tex} %%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%% \input{chap7.tex} %%%%%%%%%%%%%%%%%%% \input{chap8.tex} \input{bib.tex} %%%%%%%%%%%%%%% \end{document} ``` Table of contents have the following command: ``` \newpage \tableofcontents ```
https://tex.stackexchange.com/users/287582
How to write "Chapter 1" instead of "1" in table of contents of a thesis
false
I suggest you employ the `tocloft` package to achieve your formatting objective. Observe that the *only* thing the code shown below does is to insert the word "Chapter" (and space) before the chapter number. In particular, the appearance of `section`-level entries in the Table of Contents is not modified. ``` \documentclass{book} \usepackage{calc} % for '\widthof' macro \usepackage[titles]{tocloft} \renewcommand\cftchappresnum{Chapter } \cftsetindents{chap}{0pt}{\widthof{\large\textbf{Chapter 1}}} \begin{document} \tableofcontents \chapter{AAA} \section{A1} \section{A2} \chapter{BBB} \section{B1} \section{B2} \end{document} ```
3
https://tex.stackexchange.com/users/5001
686988
318,701
https://tex.stackexchange.com/questions/686991
5
I'm new to LaTeX; is there a way to tell the TeX engine to generate the hyphenation of a given list of words as a text output file? For example: ``` abdomen abduction aberrance ... ``` What I want is something like: ``` ab-domen ab-duc-tion aber-rance ... ``` possibly as text.
https://tex.stackexchange.com/users/297947
Generate the hyphenation of a given list of words
false
There are a number of ways to do this. With LuaLaTeX, you can use the `showhyphenation` package. ``` \documentclass{article} \usepackage{showhyphenation} \begin{document} %\parbox{0pt}{% abdomen abduction aberrance %} \end{document} ``` You can also place the words in a `parbox` of zero width. Each word (except the first word in some engines) will automatically line break at each of its hyphenation points. ``` \documentclass{article} \begin{document} \parbox{0pt}{% abdomen abduction aberrance } \end{document} ```
6
https://tex.stackexchange.com/users/278534
686992
318,702
https://tex.stackexchange.com/questions/686991
5
I'm new to LaTeX; is there a way to tell the TeX engine to generate the hyphenation of a given list of words as a text output file? For example: ``` abdomen abduction aberrance ... ``` What I want is something like: ``` ab-domen ab-duc-tion aber-rance ... ``` possibly as text.
https://tex.stackexchange.com/users/297947
Generate the hyphenation of a given list of words
true
`\showhyphens` writes this to the terminal and log: ``` \documentclass{article} \showhyphens{ abdomen abduction aberrance } \begin{document} \end{document} ``` Produces a log file with ``` [] \OT1/cmr/m/n/10 ab-domen ab-duc-tion aber-rance ```
8
https://tex.stackexchange.com/users/1090
686994
318,703
https://tex.stackexchange.com/questions/687002
2
First I write a tex named thequest like: ``` \begin{quest} Just a problem. \end{quest} ``` Then in the main tex, I write ``` \newtheorem{quest}{Question} \newcommand{\Fakeframe}[1]{\ifthenelse{\equal{#1}{}}{}{ \begin{frame}[t] #1 \end{frame} }} \FakeFrame{\input{thequest.tex}} ``` Then xelatex. There will be "Argument of \reserved@a has an extra }." and "Paragraph ended before \reserved@a was complete." But the pdf is correct. Why????? If I don't use the ifthenelse, or just not use the input, everything will be OK. But if I use the newcommand with a ifthenelse, and that input, there must have two errors. That's so weird.
https://tex.stackexchange.com/users/239990
A funny bug with input, newcommand, ifthenelse in a beamer
false
I'm not sure what this would be useful for: it makes little sense to check for emptiness of the argument, in that case just don't use `\FakeFrame{}`. Anyway, `\equal` tries to expand its argument and with `\input` this fails. Use `xifthen` and `\isempty`. ``` \begin{filecontents*}{\jobname-quest} \begin{quest} Just a problem. \end{quest} \end{filecontents*} \documentclass{beamer} \usepackage{xifthen} \newtheorem{quest}{Question} \newcommand{\FakeFrame}[1]{\ifthenelse{\isempty{#1}}{}{% \begin{frame}[t] #1 \end{frame} }} \begin{document} \FakeFrame{\input{\jobname-quest.tex}} \end{document} ``` If you want to load the file only if it's not empty, then use a different strategy. ``` \begin{filecontents*}{\jobname-quest} \begin{quest} Just a problem. \end{quest} \end{filecontents*} \begin{filecontents*}{\jobname-empty} \end{filecontents*} \documentclass{beamer} \newtheorem{quest}{Question} \ExplSyntaxOn \NewDocumentCommand{\FakeFrameInput}{m} {% #1 = filename \file_get:nnN { #1 } { } \l_tmpa_tl \tl_remove_all:Nn \l_tmpa_tl { \par } \tl_if_blank:VF \l_tmpa_tl { \begin{frame}[t] \input{#1} \end{frame} } } \ExplSyntaxOff \begin{document} \FakeFrameInput{\jobname-quest.tex} \FakeFrameInput{\jobname-empty.tex} \end{document} ``` This will only produce one frame. The file is read into a token list variable in which we remove all `\par` tokens (generated by empty lines). If nothing remains (or just spaces), the file is considered empty.
4
https://tex.stackexchange.com/users/4427
687006
318,710
https://tex.stackexchange.com/questions/687007
0
Both É (upper case E with accent aigu) and é (lower case E with accent aigu) are disappearing. ``` \documentclass[draft]{article} \usepackage{fontspec} \usepackage{hyperref} \usepackage{listings} \begin{document} \lstset{language=Rexx, extendedchars=true, frame=trbl} \section{Statement of problem} \subsection{Secondary Problem} sets bar to REN\'{e} rather than to REN\capitalacute{E}. \end{document} ``` This happens with both pdflatex and with xelatex. Changing the source to ``` \documentclass[draft]{article} \usepackage[T1]{fontenc} \usepackage{hyperref} \usepackage{listings} \begin{document} \lstset{language=Rexx, extendedchars=true, frame=trbl} \section{Statement of problem} \subsection{Secondary Problem} using \\' and \\capitalacute: sets bar to REN\'{e} rather than to REN\capitalacute{E}. %Command \capitalacute unavailable in encoding T1. r than to REN\capitalacute using actual é and É sets bar to RENé rather than to RENÉ. \end{document} ``` I get the error message > > Command \capitalacute unavailable in encoding T1. r than to > REN\capitalacute > > > What package and parameters do I need in order to allow both the symbols and the actual letters?
https://tex.stackexchange.com/users/110591
Accented letters disappearing
false
The problem is unclear, but if you load the `fontenc` package with the `T1` option you don't need `\capitalacute`. ``` \documentclass[draft]{article} \usepackage[T1]{fontenc} \usepackage{listings} \usepackage{hyperref} \begin{document} Ren\'{e} René REN\capitalacute{E} REN\'{E} RENÉ \end{document} ```
0
https://tex.stackexchange.com/users/4427
687019
318,717
https://tex.stackexchange.com/questions/136240
54
This is a follow up on [beamer's fragile frame as default](https://tex.stackexchange.com/questions/11328/beamers-fragile-frame-as-default). What are the drawbacks of setting the default frame to be fragile (or passing the optional fragile argument to all frames). The [beamer user guide](http://mirror.ox.ac.uk/sites/ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf) says > > If a frame contains fragile text, different internal mechanisms are > used to typeset the frame to ensure that inside the frame the > character codes can be reset. The price of switching to another > internal mechanism is that either you cannot use overlays or an > external file needs to be written and read back (which is not always > desirable). > > > Presumably writing and reading a file takes time and so this increases the time it takes to compile, but are there things that do not work in a fragile frame? As for an MWE: ``` \documentclass{beamer} \def\foo{Something that makes the fragile frame fail is: } \begin{document} \begin{frame} \foo \end{frame} \begin{frame}[fragile] \foo \end{frame} \end{document} ``` I am trying to understand what `\foo` would need to be defined as to cause problems.
https://tex.stackexchange.com/users/10038
Drawbacks of using fragile frames in beamer
false
The `fragile` option has some impact on centering: ``` \documentclass{beamer} \begin{document} \begin{frame} \centering center \end{frame} \begin{frame}[fragile] \centering not center \end{frame} \begin{frame}[fragile] \begin{center} center again \end{center} \end{frame} \end{document} ```
2
https://tex.stackexchange.com/users/95100
687022
318,718
https://tex.stackexchange.com/questions/687008
0
The markup ``` \documentclass[draft]{article} \usepackage{fontspec} \usepackage{hyperref} \usepackage{listings} \begin{document} \lstset{language=Rexx, extendedchars=true, frame=trbl} \section{Statement of problem} \subsection{Secondary Problem} \begin{lstlisting} foo = 'Ren\'{e}' parse upper var foo bar \end{lstlisting} \end{document} ``` displays an empty frame both with frame=single and with frame=trbl.
https://tex.stackexchange.com/users/110591
The listings package is rendering an empty frame
false
The `listings` package has a `draft` option (that is also collected from the global `draft` you pass to `\documentclass`). If you want your listing to show either remove the `draft` key from `\documentclass` or add the `final` key to `\usepackage{listings}`: ``` \documentclass[draft]{article} \usepackage{fontspec} \usepackage[final]{listings} % hyperref should be loaded last with only a few exceptions \usepackage{hyperref} \begin{document} \lstset{language=Rexx, extendedchars=true, frame=trbl} \section{Statement of problem} \subsection{Secondary Problem} \begin{lstlisting} foo = 'Ren\'{e}' parse upper var foo bar \end{lstlisting} \end{document} ```
1
https://tex.stackexchange.com/users/117050
687023
318,719
https://tex.stackexchange.com/questions/687000
0
I am writing a paper on Overleaf and synced my bib-file with a Zotero private group to keep my references automatically updated (explained [here](https://xhluca.medium.com/exporting-zotero-citations-to-overleaf-for-one-private-group-b36151038171)). While this generally works, only about 20 out of my 30 references show up in my synced bib-document in Overleaf. Why is it that some references are excluded? I tried to find commonalities between the references not showing up, but without success so far. Thank you for any ideas. Note: I do not have access to Overleaf Premium which has a Zotero plug-in, hence this solution.
https://tex.stackexchange.com/users/229011
Syncing Zotero private group with Overleaf bib file - not all references shown
true
The first thing to check is that the .bib file is actually missing the items. This might just be a problem with how you are trying to find or cite them. If you are trying to cite some items that you think should be in the .bib file and are not finding them that way, this could be due to a syntax problem with the .bib. All the items might be there, but either the Overleaf reference search, or bibtex/biblatex itself might fail to find them if there are problems with the bib exported from Zotero. So, in Overleaf, download the .bib and check to see if the items are missing or just failing to be found. If all the entries are there and you cannot load them, you need to check the .bib file for errors. If some bib items are actually missing, the next thing to look at is the URL that you are using from Zotero. The Zotero API uses pagination to send only a chunk of the total group library. You can either set the pagination to return more items, or use two separate URLs to bring over multiple chunks as separate bib files. For example, `https://api.zotero.org/groups/<GROUP_NUMBER>/items?format=bibtex&limit=100` should bring in in references 0 to 99 for your group. You can find out more information on the [Zotero dev forum](https://groups.google.com/g/zotero-dev) if you search there for "group API."
3
https://tex.stackexchange.com/users/205904
687024
318,720
https://tex.stackexchange.com/questions/687009
0
I want to bold, e.g., **Config\_C2B()**. I get error messages using \textbf, so I tried wrapping the text in \verb, but that still fails. ``` \documentclass[draft]{article} \usepackage{fontspec} \usepackage{hyperref} \usepackage{listings} \begin{document} \lstset{language=Rexx, extendedchars=true, frame=trbl} \section{Statement of problem} \subsection{Primary Problem} With single braces \textbf{\verb|Config_C2B()|} With double braces \textbf{{\verb|Config_C2B()|}} \end{document} ```
https://tex.stackexchange.com/users/110591
Bolding text containig parentheses and underscores
false
Use `\_` if you want to type an underscore: ``` \documentclass{article} \begin{document} With single braces \textbf{Config\_C2B()} \end{document} ``` By the way you can't use `\verb` inside the argument of another macro (and `\verb` would reset the font to non-bold tt-family anyway), so `\textbf{\verb|stuff|}` can't work.
3
https://tex.stackexchange.com/users/117050
687025
318,721
https://tex.stackexchange.com/questions/687000
0
I am writing a paper on Overleaf and synced my bib-file with a Zotero private group to keep my references automatically updated (explained [here](https://xhluca.medium.com/exporting-zotero-citations-to-overleaf-for-one-private-group-b36151038171)). While this generally works, only about 20 out of my 30 references show up in my synced bib-document in Overleaf. Why is it that some references are excluded? I tried to find commonalities between the references not showing up, but without success so far. Thank you for any ideas. Note: I do not have access to Overleaf Premium which has a Zotero plug-in, hence this solution.
https://tex.stackexchange.com/users/229011
Syncing Zotero private group with Overleaf bib file - not all references shown
false
As an alternative to the (correct) answer by Dan MacKinnon that will work for group libraries with more than 100 items (and has some other advantages like guaranteed stable citekeys, and more advanced bibtex support in general) you can use the [Better BibTeX](https://retorque.re/zotero-better-bibtex/) add-on from Zotero to [set up auto-export](https://retorque.re/zotero-better-bibtex/exporting/auto/) of a group (or a collection in a group) to a .bib file that you then sync automatically, e.g. using Dropbox, GitHub or some other sync functionality. You can then point Overleaf at the URL of that file (e.g., the Dropbox share link).
1
https://tex.stackexchange.com/users/31980
687026
318,722
https://tex.stackexchange.com/questions/687033
1
I am trying to make some changes in [GeoURV Poster template](https://www.overleaf.com/latex/templates/geourv-poster-template/ygvdtpypxvrq). There is a file beamerthemeGeoURV.sty inside this template, where the blocks are defined as follows ``` \setbeamertemplate{block begin}{ \vskip.75ex \begin{beamercolorbox}[ht=3.5ex,dp=0.5ex,center,leftskip=-1em,colsep*=.75ex]{block title}% \usebeamerfont*{block title}% {\phantom{Gg}\insertblocktitle}% phantom because of baseline problem \end{beamercolorbox}% {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}% \usebeamerfont{block body}% \begin{beamercolorbox}[leftskip=1em,colsep*=.75ex,sep=0.5ex,vmode]{block body}% \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}% \end{beamercolorbox} \setbeamertemplate{block end}{} } ``` But I would like to have all these blocks framed, and more, these orange title blocks to be rounded. I tried to use \fbox{...}, but this didn't work. Can somebody help me?
https://tex.stackexchange.com/users/297971
Frame in block in poster
true
You can use the `tcolorbox` inner beamer theme: ``` \input{preamble.tex} \input{metadata.tex} \useinnertheme[rounded]{tcolorbox} \tcbsetforeverylayer{ frame style={draw=col4,line width=2mm} } \begin{document} \begin{frame}[t] \begin{block}{Resum/Objectius} \lipsum[1][1-8] \end{block} \end{frame} \end{document} ```
0
https://tex.stackexchange.com/users/36296
687034
318,725
https://tex.stackexchange.com/questions/566608
2
When I go to TexStudio -> Options -> Configure TexStudio -> Build -> User Commands, I can add arbitrary shell commands. Inside the commands, I can use the character % to refer to the current file name - without extension and without folder. How can I refer to the *folder* of the current file? The [manual](http://svn.code.sf.net/p/texstudio/code/trunk/utilities/usermanual_en.html#SECTION02a) says: "If you need more options (e.g. absolute paths) use ? and look at the instruction on the bottom of the configuration dialog." But I did not find these instructions.
https://tex.stackexchange.com/users/20929
User commands in TexStudio: how to refer to the current folder?
false
You can use `?a)` For example, I created a user command which copies the .bib file into the current directory as a user command. I used ``` /home/user/bin/copy_library ?a) ```
0
https://tex.stackexchange.com/users/225513
687036
318,726
https://tex.stackexchange.com/questions/687035
0
I am trying to change the color of the title block in template [GeoURV Poster template](https://www.overleaf.com/latex/templates/geourv-poster-template/ygvdtpypxvrq). I know that i may change color in the beamerthemeGeoURV.sty. But I would like it to change in the gradient style, let's say from black to orange.
https://tex.stackexchange.com/users/297971
Changing color of the title block in poster template
false
You could redefine the headline template like this (change the value in l. 9 to match the height of your headline as needed): ``` \input{preamble.tex} \input{metadata.tex} \setbeamercolor{headline}{bg=} \makeatletter \newlength{\foo} \setlength{\foo}{8cm} \pgfdeclareverticalshading{beamer@frametitleshade}{\paperwidth}{% color(0pt)=(black); color(\foo)=(col3) } \setbeamertemplate{headline}{ \leavevmode \begin{pgfpicture}{0pt}{0pt}{\paperwidth}{\foo} \begin{pgfscope} \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\foo}}% \pgfusepath{clip}% \pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}% \end{pgfscope} \end{pgfpicture} \vskip-\foo \begin{beamercolorbox}[wd=\paperwidth]{headline} \begin{columns}[T] \begin{column}{.02\paperwidth} \end{column} \begin{column}{.7\paperwidth} \vskip4ex \raggedright \usebeamercolor{title in headline}{\color{fg}\textbf{\LARGE{\inserttitle}}\\[1ex]} \usebeamercolor{author in headline}{\color{fg}\large{\insertauthor}\\[1ex]} \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]} \end{column} \begin{column}{.25\paperwidth} \vskip8ex \begin{center} \includegraphics[width=.8\linewidth]{figures/dgeo-apilat-color.png} \end{center} \vskip2ex \end{column} \begin{column}{.02\paperwidth} \end{column} \end{columns} \vskip2ex \end{beamercolorbox} \begin{beamercolorbox}[wd=\paperwidth]{lower separation line head} \rule{0pt}{3pt} \end{beamercolorbox} } \makeatother \useinnertheme[rounded]{tcolorbox} \tcbsetforeverylayer{ frame style={draw=col4,line width=2mm} } \begin{document} \begin{frame}[t] \end{frame} \end{document} ```
1
https://tex.stackexchange.com/users/36296
687037
318,727
https://tex.stackexchange.com/questions/686975
1
I am using the tasks package to layout answers to exercises. However the exercises are numbered 1, 3, 5, 7, etc. Of course tasks wants to increment by 1 to get 1, 2, 3, 4, etc. Is there anyway to set a increment value for tasks? ``` \documentclass{article} \usepackage{tasks} \begin{document} \begin{tasks}[label=\arabic*](3) \task $x^2$ \task $y^5$ \task $a^5$ \task $b^5$ \task $c^5$ \task $d^5$ \end{tasks} \end{document} ```
https://tex.stackexchange.com/users/5303
Increment counter by 2 in tasks package
true
Using the stepcounter idea by Circada in their comment we get what we're looking for. Better than adding the numbers manually using \task[number]. It's easier to add new entries without manually renumbering everything. ``` \documentclass{article} \usepackage{tasks} \begin{document} \begin{tasks}[label=\arabic*](3) \task $x^2$ \task $y^5$ \stepcounter{task} \task $a^5$ \stepcounter{task} \task $b^5$ \stepcounter{task} \task $c^5$ \stepcounter{task} \task $d^5$ \stepcounter{task} \end{tasks} \end{document} ```
0
https://tex.stackexchange.com/users/5303
687044
318,731
https://tex.stackexchange.com/questions/49643
226
I need some help with creating an appendix for my thesis. I have about 10 figures which need to be in the appendix. I have a good appendix with the following code: ``` \appendix \addcontentsline{toc}{chapter}{APPENDICES} \chapter{XXXX} ``` I have a main `thesis.tex` file where I call this `appendix.tex` file after the last chapter. Problems are: 1. The appendix starts without any notice that it is the appendix except for the chapter number being `A`, but I want to have either a separate page which says "Appendix" prior to the start of the appendix or on top of the first appendix page to explicitly say "Appendix". 2. Now I use the `\chapter{}` command to have the title of the appendix but I think I will have only one chapter in the appendix. Is there some command which can make the title insited of chapter?
https://tex.stackexchange.com/users/13017
making appendix for thesis
false
If your are trying to do this and you don´t have the expected output...verify where is declarated the `\backmatter`. You have to typped after the last appendix section or exactly above of `\end{document}` statement.
1
https://tex.stackexchange.com/users/220052
687050
318,734
https://tex.stackexchange.com/questions/443171
2
I have the MWE: ``` \documentclass{article} \usepackage{algorithm} \usepackage{algpseudocode} \begin{document} \noindent \begin{minipage}[tb]{\textwidth} \centering \setlength{\intextsep}{0pt} \begin{minipage}[t]{.49\textwidth} \null \begin{algorithm}[H] \caption{New algorithm 1a}\label{a:1a} \begin{algorithmic}[1] \State\Return \end{algorithmic} \end{algorithm} \end{minipage} \hfill\vline\hfill \begin{minipage}[t]{.49\textwidth} \null \begin{algorithm}[H] \caption{New algorithm 1b}\label{a:1b} \begin{algorithmic}[1] \State\Return \end{algorithmic} \end{algorithm} \end{minipage} \end{minipage} \end{document} ``` What I need is to rename the left algorithm number to 1(a) and the right to 1(b). After that, I have another algorithm in full page width, for which I need algorithm number 2. How can I do that?
https://tex.stackexchange.com/users/38244
Algorithm sub-numbering
false
This is my approach, originally based on [Werner](https://tex.stackexchange.com/users/5764/werner) and [egreg](https://tex.stackexchange.com/users/4427/egreg)'s answers. This is a nest-able environment that will append a counter to the current figure name for any algorithms defined inside of it. ``` \newenvironment{subalgorithms}{% \edef\lastAlgorithm{\value{algorithm}}% Store the current algorithm counter (parent algorithm counter) \edef\parentAlgorithm{\thealgorithm}% Store the value of \thealgorithm which is the entire algorithm number \setcounter{algorithm}{0}% Reset algorithm counter (to count subalgorithms) % Redefine \thealgorithm to include the parent algorithm number \renewcommand{\thealgorithm}{\parentAlgorithm.\arabic{algorithm}}% }{% \edef\previousAlgorithm{\value{algorithm}}% Store the 'last breadcrumb' algorithm counter \setcounter{algorithm}{\lastAlgorithm}% Restore algorithm counter (to parent algorithm counter) \addtocounter{algorithm}{-\previousAlgorithm}% Subtract subalgorithm count from parent algorithm count \addtocounter{algorithm}{1}% But add 1 to account for the parent algorithm } ``` --- **Example Usage** ``` \begin{algorithm} \caption{The SAT Function} \end{algorithm} \subsubsection{The Auxiliary Functions} \begin{subalgorithms} \begin{algorithm}[H] \caption{The $SAT_{EX}$ Auxiliary Function for SAT} \label{alg:sat_ex}\label{alg:the-sat-ex-algorithm-for-ctl} \index{SAT!Formal Definition for CTL!$SAT_{EX}$ Auxiliary Function} \end{algorithm} \begin{algorithm}[H] \caption{The $SAT_{EX}$ Auxiliary Function for SAT} \end{algorithm} \begin{algorithm}[H] \caption{The $SAT_{EX}$ Auxiliary Function for SAT} \end{algorithm} \begin{subalgorithms} \begin{algorithm}[H] \caption{The $SAT_{EX}$ Auxiliary Function for SAT} \end{algorithm} \begin{algorithm}[H] \caption{The $SAT_{EX}$ Auxiliary Function for SAT} \end{algorithm} \end{subalgorithms} \end{subalgorithms} \begin{algorithm} \caption{The $SAT_{EX}$ Auxiliary Function for SAT} \end{algorithm} \begin{algorithm} \caption{The $SAT_{EX}$ Auxiliary Function for SAT} \end{algorithm} ``` --- **Note that** figures will inherit the 'parent' figure number (i.e., the leading portion of the figure number) from any algorithms preceding the subalgorithms environment. So, if you were to place multiple `subalgorithms` environments after each other, all but the first would repeat numbering. This is a design choice to allow you to simply place a `subalgorithms` environment after an algorithm to add additional `subalgorithms` for it. If you wish to place multiple `subalgorithms` environments after one-another, simply use `\addtocounter{algorithm}{1}` between the environments to increment the 'parent' algorithm counter.
1
https://tex.stackexchange.com/users/289285
687057
318,737
https://tex.stackexchange.com/questions/687048
1
Since there is no `--recursive` option, I wonder how to recursively format all entries in `\input{}` present in the main `.tex` file.
https://tex.stackexchange.com/users/222785
How to make latexindent format recursively all files put within \input{}?
false
Due to lack of apparent solution for this this issue, the following shell command forces `latexindent` to run for every `\input{}` entry found in the main `.tex` file: ``` grep -oP "(?<=\\\\input{)[^}]+" main.tex | while read file; do latexindent --silent --overwrite ${file} done ``` where `main.tex` is the main latex file with your `\input{}` entries. That is a ad-hoc solution, though. I would like to have a more elegant way out.
1
https://tex.stackexchange.com/users/222785
687060
318,739
https://tex.stackexchange.com/questions/686975
1
I am using the tasks package to layout answers to exercises. However the exercises are numbered 1, 3, 5, 7, etc. Of course tasks wants to increment by 1 to get 1, 2, 3, 4, etc. Is there anyway to set a increment value for tasks? ``` \documentclass{article} \usepackage{tasks} \begin{document} \begin{tasks}[label=\arabic*](3) \task $x^2$ \task $y^5$ \task $a^5$ \task $b^5$ \task $c^5$ \task $d^5$ \end{tasks} \end{document} ```
https://tex.stackexchange.com/users/5303
Increment counter by 2 in tasks package
false
Musing arithmetically, MWE ``` \documentclass{article} \usepackage{tasks} \ExplSyntaxOn \NewDocumentCommand { \makeodd } { m } { \int_set:Nn \l_tmpa_int { \value{#1} } \int_eval:n { \l_tmpa_int + \l_tmpa_int -1 } } \ExplSyntaxOff \begin{document} Since the set of natual numbers is infinite, and the set of odd numbers is also infinite, one can be mapped to the other (in this case, via $n*2-1$) to display odd-numbered labels in the `enumerate`-style task list without needing to change the actual task number. For the case where the start value for the list numbering is `1`, the calculation \texttt{\textbackslash makeodd}, in expl3 syntax \begin{quotation}\noindent \begin{verbatim} \NewDocumentCommand { \makeodd } { m } { \int_set:Nn \l_tmpa_int { \value{#1} } \int_eval:n { \l_tmpa_int + \l_tmpa_int -1 } } \end{verbatim} \end{quotation} and called via the \verb|tasks| environment's \verb|label=| option, \begin{quotation}\noindent \verb|label={(\makeodd*)},| \end{quotation} gives: \begin{tasks}[% style=enumerate, label={(\makeodd*)}, label-width=4ex, % start = {20}, ](3) \task $xx^2$ \task $xy^5$ \task $xa^5$ \task $xb^5$ \task $xc^5$ \task $xd^5$ \end{tasks} \end{document} ```
0
https://tex.stackexchange.com/users/182648
687062
318,740
https://tex.stackexchange.com/questions/686851
0
Here is what I have on my latex file: ``` \usepackage[backend=biber, style=alphabetic, bibstyle=ieee-alphabetic, sortcites=true, maxbibnames = 99, maxalphanames = 8, maxcitenames = 6, minalphanames = 6, minnames = 4, ]{biblatex} ``` Here is what I have in my .bib file: ``` @article {ipv10, AUTHOR = {Ioana, Adrian and Popa, Sorin and Vaes, Stefaan}, TITLE = {A class of superrigid group von {N}eumann algebras}, JOURNAL = {Annals of Mathematics}, VOLUME = {178}, YEAR = {2013}, NUMBER = {1}, PAGES = {231--286}, } ``` When I cite it on the `.tex` file, I get [IPV13]. However, I would like [IPV10] to appear. Is that possible? If so, what are the commands to get it?
https://tex.stackexchange.com/users/297854
Change year of citation
false
In `alphabetic` styles, `biblatex` usually calculates the citation label from the `author` (or `editor`) field and the publication `date`/`year`. For the shown entry your configuration will indeed produce > > IPV13 > > > The entry key `ipv10` is almost never used to generate printed data in citations or the bibliography. It is supposed to be a purely internal ID of the entry. So if you want to force a "10" where there is no "10" in the data, you need to use something like `shorthand` to completely override the generated label. Note that you have to give the whole citation label (so you have to calculate the "IPV" part yourself) and that this `shorthand` will be used even if you use a numeric style. ``` \documentclass[british]{article} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{csquotes} \usepackage[backend=biber, style=ieee-alphabetic, sortcites=true, maxbibnames = 99, maxalphanames = 8, maxcitenames = 6, minalphanames = 6, minnames = 4, ]{biblatex} \begin{filecontents}{\jobname.bib} @article{ipv10, AUTHOR = {Ioana, Adrian and Popa, Sorin and Vaes, Stefaan}, TITLE = {A Class of Superrigid Group von {Neumann} Algebras}, JOURNAL = {Annals of Mathematics}, VOLUME = {178}, YEAR = {2013}, NUMBER = {1}, PAGES = {231-286}, shorthand = {IPV10}, } \end{filecontents} \addbibresource{\jobname.bib} \addbibresource{biblatex-examples.bib} \begin{document} Lorem \autocite{sigfridsson,ipv10} \printbibliography \end{document} ``` Alternatively, you can use set up slightly more involved machinery to override the date bit of the label with a field called `realdate` (`labeldate` would have been the obvious choice, but that field already exists with a different meaning). The advantage is that you don't use the all-overriding `shorthand` field in this case. ``` \documentclass[british]{article} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{csquotes} \begin{filecontents}{realdate.dbx} \DeclareDatamodelEntrytypes{realdate} \DeclareDatamodelFields[type=field, datatype=date, skipout]{ realdate} \end{filecontents} \usepackage[backend=biber, style=ieee-alphabetic, datamodel=realdate, sortcites=true, maxbibnames=99, maxalphanames=8, maxcitenames=6, minalphanames=6, minnames=4, ]{biblatex} \DeclareLabelalphaTemplate{ \labelelement{ \field[final]{shorthand} \field{label} \field[strwidth=3,strside=left,ifnames=1]{labelname} \field[strwidth=1,strside=left]{labelname} } \labelelement{ \field[strwidth=2,strside=right]{realyear} \field[strwidth=2,strside=right]{year} } } \begin{filecontents}{\jobname.bib} @article{ipv10, AUTHOR = {Ioana, Adrian and Popa, Sorin and Vaes, Stefaan}, TITLE = {A Class of Superrigid Group von {Neumann} Algebras}, JOURNAL = {Annals of Mathematics}, VOLUME = {178}, YEAR = {2013}, NUMBER = {1}, PAGES = {231-286}, realdate = {2010}, } \end{filecontents} \addbibresource{\jobname.bib} \addbibresource{biblatex-examples.bib} \begin{document} Lorem \autocite{sigfridsson,ipv10} \printbibliography \end{document} ``` The disadvantage is that you have to use a `.dbx` file.
1
https://tex.stackexchange.com/users/35864
687065
318,742
https://tex.stackexchange.com/questions/686962
1
I am experiencing a weird issue while trying to write a paper using INTERSPEECH 2023 template (available from [here](https://www.overleaf.com/latex/templates/interspeech-2023-paper-kit/kzcdqdmkqvbr)). It normally uses `bibtex` to generate the bibliography but as far as I know that does not support an operation similar to ``` \AtEveryBibitem{\clearlist{language}} \AtEveryBibitem{\clearfield{note}} ``` that is available when one uses `biblatex`. For this reason I tried to switch to `biblatex` but this causes the following errors: ``` ] ! Missing number, treated as zero. <to be read again> \relax l.119 A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.) ! Illegal unit of measure (pt inserted). <to be read again> \relax l.119 Dimensions can be in units of em, ex, in, pt, pc, cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one! I'll assume that you meant to say pt, for printer's points. To recover gracefully from this error, it's best to delete the erroneous units; e.g., type `2' to delete two letters. (See Chapter 27 of The TeXbook.) ! Missing number, treated as zero. <to be read again> } l.119 A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.) ! Illegal unit of measure (pt inserted). <to be read again> } l.119 ``` Few things I have already tried: * Line 119 at main.tex basically contains the \printbibliography command. When I replace `INTERSPEECH2023.sty` the issue goes away. * When I seach `INTERSPEECH2023.sty` for terms like 'bibliography', 'references', 'citation' etc. there is a single segment I could found and modifying that did not help with anything. * If the error message was only a bit longer (if it gave the slight before of the context) then I suppose I could debug and solve but I could not really get anything from this much message. If there are any tips to make the log output more verbose I would also appreciate that. MWE: (you need the `INTERSPEECH2023.sty' from the overleaf [project](https://www.overleaf.com/latex/templates/interspeech-2023-paper-kit/kzcdqdmkqvbr)) ``` % main.tex \documentclass{INTERSPEECH2023} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{comment} \usepackage[ backend=biber, style=alphabetic, sorting=ynt ]{biblatex} \addbibresource{mybib.bib} \title{Bibliography management: \texttt{biblatex} package} \name{Overleaf} \date{ } \begin{document} \maketitle Using \texttt{biblatex} you can display bibliography divided into sections, depending of citation type. Let's cite! The Einstein's journal paper \cite{einstein}. \printbibliography \end{document} % mybib.bib @article{einstein, author = "Albert Einstein", title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German}) [{On} the electrodynamics of moving bodies]", journal = "Annalen der Physik", volume = "322", number = "10", pages = "891--921", year = "1905", DOI = "http://dx.doi.org/10.1002/andp.19053221004", keywords = "physics" } ```
https://tex.stackexchange.com/users/297920
Interspeech template breaks biblatex
true
Generally speaking the only good reason to use a conference template is when you want to submit your work to that conference. If you want to do that you should usually not change the citation and bibliography setup: You should not switch the document to `biblatex` (even if that works without error) and you should not select a different style (BibTeX and `biblatex` styles are incompatible and there is no one-to-one replacement for most styles, so this is almost inevitable). The error you get in your document is caused by the fact that the class redefines the sectioning commands `\section` and friends in a way that they no longer have a starred variant (`\section*`). By default `biblatex` typesets the heading with the starred `\section*`, which errors here. You can force a numbered heading as follows ``` \printbibliography[heading=bibnumbered] ``` With this change the document compiled for me. But as I said, I don't think you should try to use `biblatex` here. Stick with the style the template uses and get rid of the undesired fields in your `.bib` file with a tool like JabRef.
1
https://tex.stackexchange.com/users/35864
687067
318,743
https://tex.stackexchange.com/questions/686975
1
I am using the tasks package to layout answers to exercises. However the exercises are numbered 1, 3, 5, 7, etc. Of course tasks wants to increment by 1 to get 1, 2, 3, 4, etc. Is there anyway to set a increment value for tasks? ``` \documentclass{article} \usepackage{tasks} \begin{document} \begin{tasks}[label=\arabic*](3) \task $x^2$ \task $y^5$ \task $a^5$ \task $b^5$ \task $c^5$ \task $d^5$ \end{tasks} \end{document} ```
https://tex.stackexchange.com/users/5303
Increment counter by 2 in tasks package
false
When the value for `label` has the form `\foo*`, `tasks` will apply `\foo` to the default counter. Define a command that does simple arithmetic with the counter's value. ``` \documentclass{article} \usepackage{tasks} \NewExpandableDocumentCommand{\makeodd}{m}{% \inteval{2*\value{#1}-1}% } \begin{document} \begin{tasks}[label=\makeodd*](3) \task $x^2$ \task $y^5$ \task $a^5$ \task $b^5$ \task $c^5$ \task $d^5$ \end{tasks} \end{document} ```
3
https://tex.stackexchange.com/users/4427
687070
318,744
https://tex.stackexchange.com/questions/100932
48
My `texmf.cnf` file contains these lines: ``` % Allow TeX \openin, \openout, or \input on filenames starting with `.' % (e.g., .rhosts) or outside the current tree (e.g., /etc/passwd)? % a (any) : any file can be opened. % r (restricted) : disallow opening "dotfiles". % p (paranoid) : as `r' and disallow going to parent directories, and % restrict absolute paths to be under $TEXMFOUTPUT. openout_any = p openin_any = a ``` But if I compile the following code via `lualatex`, the file `/home/login/unsafe.txt` is created! ``` \documentclass{article} \usepackage{luatextra} \begin{luacode*} function securityproblem(a) local file = assert(io.open(os.getenv("HOME") .. "/unsafe.txt", "w")) file:write("foobar\n") file:write(a) file:close() end \end{luacode*} \begin{document} \directlua{securityproblem("\today")} \end{document} ``` *Is luatex as secure as pdftex?* **Edit:** With the `--safer` option, `luatex` can't write files (via `io.open`) but `fontspec` (for example) is unusable. *Is there a safe way to use LuaTEX with `fontspec` (and other useful features of LuaTeX) ?* **Edit (May 2023)** The security of Lua(La)TeX seems to be taken into account in certain aspects: [LuaTeX Security Vulnerabilities](https://tug.org/%7Emseven/luatex.html) *Ten years after, does my question have an acceptable answer?*
https://tex.stackexchange.com/users/14500
Is luatex as secure as pdftex?
false
> > **Edit (May 2023)** > > > The security of Lua(La)TeX seems to be taken into account in certain > aspects: [LuaTeX Security > Vulnerabilities](https://tug.org/%7Emseven/luatex.html) > > > *Ten years after, does my question have an acceptable answer?* > > > I'm the one who wrote that linked article, so let's take a closer look at some of the issues there. ### CVE-2023-32700 (the “`popen`” vulnerability) This is the main issue discussed in that link. We'll start with a quote from [the LuaTeX manual](https://texdoc.org/serve/luatex/0) §4.1.3: > > The switches `--[no-]shell-escape`, `--[enable|disable]-write18`, and `--shell-restricted` have the same effects as in pdfTeX, and additionally make `io.popen()`, `os.execute`, `os.exec` and `os.spawn` adhere to the requested option. > > > And for some further context, §5.5 of [the `web2c` manual](https://texdoc.org/serve/web2c/0): > > TeX can execute shell escapes, that is, arbitrary shell commands. Although tremendously useful, this also has obvious security implications. Therefore, as of TeX Live 2009, a restricted mode for shell escapes is the default mode of operation, which allows executing only certain commands, as specified in the `texmf.cnf` configuration file. > > > * Unrestricted shell escapes are allowed if the option `--shell-escape` is specified, or if the environment variable or config file value `shell_escape` is set to ‘t’ or ‘y’ and ‘1’. > * Restricted shell escapes are allowed if `shell_escape` is set to ‘p’. This is the default. > * Shell escapes are completely disabled if `--no-shell-escape` is specified, or if `shell_escape` is set to anything else. > > > [...] > > > The purpose of this feature is to make it possible for TeX documents to perform useful external actions in the common case of an individual user running a known document on his or her own machine. In such environments as CGI scripts or wikis where the input has to be considered untrustworthy, shell escapes should be completely disabled. > > > And finally, an excerpt from `luatex --help`: > > > ``` > --[no-]shell-escape disable/enable system commands > --shell-restricted restrict system commands to a list of commands given in texmf.cnf > > ``` > > #### What should we expect Based off of the quoted snippets in these manuals, you would expect that compiling a document with something like ``` $ luatex --no-shell-escape some-document.tex ``` means that this document cannot execute any shell command at all. So let's test it: ``` $ luatex --no-shell-escape '\directlua{print(io.popen("python3 --version"))}\end' This is LuaTeX, Version 1.17.0 (TeX Live 2023) nil all command execution is disabled $ luatex --shell-restricted '\directlua{print(io.popen("python3 --version"))}\end' This is LuaTeX, Version 1.17.0 (TeX Live 2023) restricted system commands enabled. nil specific command execution disabled $ luatex --shell-escape '\directlua{print(io.popen("python3 --version"):read("a"))}\end' This is LuaTeX, Version 1.17.0 (TeX Live 2023) system commands enabled. Python 3.11.3 ``` This worked exactly as we would expect: only with “unrestricted” shell escape can we run arbitrary commands. #### The vulnerability But if you're particularly clever, you can work around this: ``` % shell-escape-test.tex \directlua{ local function get_upvalue(func, name) local nups = debug.getinfo(func).nups for i = 1, nups do local current, value = debug.getupvalue(func, i) if current == name then return value end end end local outer = get_upvalue(io.popen, "popen") local popen = get_upvalue(outer or io.popen, "io_popen") print(popen(arg[rawlen(arg)]):read("*a")) } \csname@@end\endcsname \end ``` ``` $ luatex --no-shell-escape shell-escape-test.tex "python3 --version" This is LuaTeX, Version 1.16.0 (TeX Live 2023) restricted system commands enabled. (./shell-escape-test.texPython 3.11.3 ) warning (pdf backend): no pages of output. Transcript written on shell-escape-test.log. ``` So despite what all the documentation said, we *can* still use shell escape. But what exactly is happening here? From [the link above](https://tug.org/%7Emseven/luatex.html#the-exploit): > > When LuaTeX is started — before it runs any TeX or Lua code — it first > calls the C function `load_luatex_core_lua`. This function runs the > file `luatex-core.lua` that is embedded into the LuaTeX binary. Among > other things, this file modifies a few Lua modules, mostly for > backwards compatibility and security purposes. > > > Here’s an excerpt of the relevant code: > > > > ``` > local io_popen = io.popen > -- [...] > local function luatex_io_popen(name,...) > local okay, found = kpse_checkpermission(name) > if okay and found then > return io_popen(found,...) > end > end > -- [...] > io.popen = luatex_io_popen > > ``` > > The above is pretty straightforward: it saves a local copy of the > original `io.popen`, defines a new wrapper function that checks to see > if the command is allowed with the current shell escape setting, and > sets `io.popen` to the wrapper function. > > > The problem here is the local copy. The wrapper function saves a > reference to the original `io.popen`, and using the Lua standard > library function `debug.getupvalue`, we can access this internal > reference. Once we’ve extracted the internal `io.popen`, we can use it > to execute arbitrary processes without restriction, completely > defeating any of the shell escape protections. > > > ### CVE-2023-32668 (the “`luasocket`” vulnerability Now let's look at the other “vulnerability” in that link. Same as last time, we'll start by quoting the documentation. From the LuaTeX manual §4.3: > > `luasocket`, by Diego Nehab [http://w3.impa.br/~diego/software/luasocket/](http://w3.impa.br/%7Ediego/software/luasocket/). The `.lua` support modules from `luasocket` are also preloaded inside the executable, there are no external file dependencies. > > > So, the manual states that `luasocket` support is included with LuaTeX. As the name suggests, this module lets you make network requests from within LuaTeX. And the output of `luatex --help | grep socket`: > > > ``` > --nosocket disable the lua socket library > > ``` > > This doesn't directly state it, but the presence of `--nosocket` pretty heavily implies that sockets (network access) is enabled by default. So, all this vulnerability means is that you can make network requests from within a TeX document: ``` \documentclass{article} \usepackage{luacode} \begin{luacode*} local http = require "socket.http" function get_ip() body, code, headers = http.request("http://icanhazip.com") tex.sprint(body) end \end{luacode*} \def\getip{\directlua{get_ip()}} \begin{document} Your IP address is \getip. \end{document} ``` But the documentation has always (for over 10 years now) stated that LuaTeX includes and enables `luasocket`, so this shouldn't be terribly surprising. This behaviour may be unwanted and potentially dangerous, but I wouldn't quite call it a “vulnerability”. ### The original question So, how does this relate to the original question? Let's look at §4.1.3 of the LuaTeX manual again: > > At the moment, `--safer` [...] makes `io.open()` fail on files that are opened for anything besides reading. > > > The manual never says anything directly, but this pretty heavily implies that without `--safer`, `io.open()` *can* open files for writing. I'm sure that you've already reran the code in your question, so you've probably figured out that it still works. This is quite similar to the `luasocket` issue though: both features could be potentially dangerous, but to be fair, LuaTeX never claimed to restrict either feature. ### Compared to pdfTeX Also, keep in mind that pdfTeX has had similar vulnerabilities in the past: [CVE-2016-10243](https://scumjr.github.io/2016/11/28/pwning-coworkers-thanks-to-latex/) affected pdfTeX, and allowed a particularly clever user to run arbitrary shell commands, even with only “restricted” shell escape enabled—just like the recently-patched “`popen`” vulnerability. In addition, pdfTeX embeds `xpdf`, [which has had quite a few security issues](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=xpdf). Regardless, I'd say that—in general—LuaTeX is less secure than pdfTeX, simply because it gives you so many more ways to interact with the host system. There are certainly some things that could be tightened up, but there's a limit to how much you can do—one of the major reasons to use LuaTeX is *because* of the better access to the underlying system. Also, computing has advanced a lot between the release of pdfTeX (in 1996) and now. Back then, containers and virtual machines didn't exist (on `x86` at least), so the only way to safely run untrusted documents was to secure the underlying program. These days, it's quick and easy to spin up an isolated container to compile any untrusted documents: ``` $ docker run --rm -it -v "$(pwd):/root" registry.gitlab.com/islandoftex/images/texlive:latest-medium lualatex /root/untrusted.tex ``` Or, if you're on Linux, you can just sandbox your LuaTeX compiler: ``` $ systemd-run --user \ -p PrivateUsers=true \ -p TemporaryFileSystem=/:ro \ -p PrivateDevices=true \ -p PrivateTmp=true \ -p BindPaths="$(pwd)" \ -p BindReadOnlyPaths='/bin/ /etc/ /lib/ /lib64/ /usr/' \ --working-directory="$(pwd)" \ --wait --collect --pipe \ lualatex untrusted.tex ``` Either of these are *more* secure than just running pdfTeX on your host computer since these sandboxes ensure that even a completely malicious LuaTeX binary would have very limited access to your host system.
4
https://tex.stackexchange.com/users/270600
687074
318,745
https://tex.stackexchange.com/questions/686980
1
I have an example of communication in mz document in a separate frame, for which I used fbox + minipage. How can I make it break over 2 pages? MWE below, I left all packages used, in case they interfere. ``` \documentclass[12pt]{report} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{geometry} \geometry{ a4paper, top=22mm, bottom=22mm, inner=35.6mm, outer=35.6mm } \usepackage{graphicx} \graphicspath{{images/}} \usepackage[export]{adjustbox} \usepackage{ragged2e} \usepackage{csquotes} \usepackage{hyperref} \usepackage{blindtext} \usepackage{caption} \usepackage{subcaption} \usepackage{float} \usepackage{wrapfig} \usepackage{amsmath} \usepackage{array} \usepackage{threeparttable} \usepackage{caption} \usepackage{tabularray} \usepackage{xcolor} \usepackage[ backend=biber, style=authoryear, citestyle=authoryear, sorting=nty, maxcitenames=2 ]{biblatex} \addbibresource{Sources.bib} \usepackage{marginnote} \PassOptionsToPackage{hyphens}{url} \expandafter\def\expandafter\UrlBreaks\expandafter{\UrlBreaks \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j% \do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t% \do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D% \do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N% \do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X% \do\Y\do\Z\do\*\do\-\do\~\do\'\do\"\do\-}% \usepackage{titlesec} \titleformat {\chapter} % command [hang] % shape {\bfseries\Huge} % format {\thechapter} % label {1ex} % sep {} % before-code [] % after-code \setlength{\parskip}{0,5 em} \setlength{\parindent}{2em} \linespread{1} \begin{document} \chapter{Test} \blindtext \blindtext \begin{center} \fbox{\begin{minipage}{0.9\linewidth} \begin{center} \textbf{Guardian}\\ \vspace*{2mm} Griffin, this is Guardian, prepare to receive five liner. Over.\\ \vspace*{2mm} \textbf{Griffin}\\ \vspace*{2mm} Guardian, this is Griffin, send traffic. Over.\\ \vspace*{2mm} \textbf{Guardian}\\ \vspace*{2mm} Requesting strike on one times truck, SE of our location, close.\\ Marker on map, grid 189235.\\ Guns only.\\ No remarks. Over.\\ \vspace*{2mm} \textbf{Griffin}\\ \vspace*{2mm} Guardian, this is Griffin. Copy.\\ Strike on one times truck, SE of ground units, close.\\ Marker on map, grid 189235.\\ Guns only.\\ No remarks. Over.\\ \vspace*{2mm} \textbf{Guardian}\\ \vspace*{2mm} Good readback.\\ \vspace{0.5cm} \textit{*Splash strike}\\ \vspace{0.5cm} Good effect, break. Over and out. \end{center} \end{minipage}} \end{center} \captionof{figure}{An example of communication} \par \blindtext \end{document} ``` Thank you and have a wonderful day.
https://tex.stackexchange.com/users/295325
How to make a minipage break over two pages<
false
`minipages` are not split between pages. Alternatively, you can use the `framed` environment provided by the `framed` package. The width of the frame can be changed by adding an optional parameter to that environment. ``` \renewenvironment{framed}[1][\hsize] {\MakeFramed{\hsize#1\advance\hsize-\width \FrameRestore}}% {\endMakeFramed} ``` ``` \documentclass[12pt]{report} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{geometry} \geometry{ a4paper, top=22mm, bottom=22mm, inner=35.6mm, outer=35.6mm } \usepackage{graphicx} \graphicspath{{images/}} \usepackage[export]{adjustbox} \usepackage{ragged2e} \usepackage{csquotes} \usepackage{hyperref} \usepackage{blindtext} \usepackage{caption} \usepackage{subcaption} \usepackage{float} \usepackage{wrapfig} \usepackage{amsmath} \usepackage{array} \usepackage{threeparttable} \usepackage{caption} \usepackage{tabularray} \usepackage{xcolor} \usepackage[ backend=biber, style=authoryear, citestyle=authoryear, sorting=nty, maxcitenames=2 ]{biblatex} %%\addbibresource{Sources.bib} \usepackage{marginnote} \PassOptionsToPackage{hyphens}{url} \expandafter\def\expandafter\UrlBreaks\expandafter{\UrlBreaks \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j% \do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t% \do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D% \do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N% \do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X% \do\Y\do\Z\do\*\do\-\do\~\do\'\do\"\do\-}% \usepackage{titlesec} \titleformat {\chapter} % command [hang] % shape {\bfseries\Huge} % format {\thechapter} % label {1ex} % sep {} % before-code [] % after-code \setlength{\parskip}{0,5 em} \setlength{\parindent}{2em} \linespread{1} %******************************************* added <<<<<<<<<<< \usepackage{framed} \renewenvironment{framed}[1][\hsize] {\MakeFramed{\hsize#1\advance\hsize-\width \FrameRestore}}% {\endMakeFramed} %******************************************* \begin{document} \chapter{Test} \blindtext \blindtext \begin{center} % \fbox{\begin{minipage}{0.9\linewidth} \begin{framed}[0.9\linewidth] % added <<<<<<<<<<<< \begin{center} \textbf{Guardian}\\ \vspace*{2mm} Griffin, this is Guardian, prepare to receive five liner. Over.\\ \vspace*{2mm} \textbf{Griffin}\\ \vspace*{2mm} Guardian, this is Griffin, send traffic. Over.\\ \vspace*{2mm} \textbf{Guardian}\\ \vspace*{2mm} Requesting strike on one times truck, SE of our location, close.\\ Marker on map, grid 189235.\\ Guns only.\\ No remarks. Over.\\ \vspace*{2mm} \textbf{Griffin}\\ \vspace*{2mm} Guardian, this is Griffin. Copy.\\ Strike on one times truck, SE of ground units, close.\\ Marker on map, grid 189235.\\ Guns only.\\ No remarks. Over.\\ \vspace*{2mm} \textbf{Guardian}\\ \vspace*{2mm} Good readback.\\ \vspace{0.5cm} \textit{*Splash strike}\\ \vspace{0.5cm} Good effect, break. Over and out. \end{center} \end{framed} % added <<<<<<<<<<<<<< % \end{minipage}} \captionof{figure}{An example of communication} % here \end{center} \par \blindtext \end{document} ```
1
https://tex.stackexchange.com/users/161015
687093
318,753
https://tex.stackexchange.com/questions/687066
1
I want to change the position of the caption of *only one* figure in my beamer presentation. I want it to be positioned at the right of the image, vertically centered. ``` \documentclass[aspectratio=43]{beamer} \usepackage{caption} \captionsetup[figure]{font=footnotesize,labelfont=footnotesize, justification=centering, belowskip=-10pt} \begin{document} \begin{frame} \begin{figure} \centering \includegraphics[scale=.4]{images/someimage.png} \caption{Caption} \end{figure} \end{frame} \end{document} ```
https://tex.stackexchange.com/users/278473
graphics - how to change the position of only one caption in beamer
true
As you are already using the caption package, you could use the `\captionof` macro and place the caption and your image in adjacent columns: ``` \documentclass[aspectratio=43]{beamer} \usepackage{caption} \captionsetup[figure]{font=footnotesize,labelfont=footnotesize, justification=centering, belowskip=-10pt} \begin{document} \begin{frame} \begin{columns}[onlytextwidth] \begin{column}{.6\textwidth} \includegraphics[width=\textwidth]{example-image-duck} \end{column} \begin{column}{.4\textwidth} \captionof{figure}{Caption} \end{column} \end{columns} \end{frame} \end{document} ```
2
https://tex.stackexchange.com/users/36296
687097
318,755
https://tex.stackexchange.com/questions/687098
2
Suppose I have a titlepage like ``` \documentclass[12pt]{book} \usepackage{lmodern} \usepackage[left=2.50cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry} \usepackage{graphicx} \begin{document} \begin{titlepage} \parbox[t]{0.93\textwidth}{ \parbox[t]{0.91\textwidth}{ \raggedleft \fontsize{50pt}{80pt}\selectfont The duck who wanted to be a prince } } \begin{figure}[!htb] \centering \includegraphics[width = 50mm]{example-image-duck} \end{figure} \end{titlepage} \newpage ~ \end{document} ``` How may its background be colored, while the second, and succeeding pages remain white?
https://tex.stackexchange.com/users/24406
How may a titlepage be colored?
true
You can switch back to white after your title page: ``` \documentclass[12pt]{book} \usepackage{lmodern} \usepackage[left=2.50cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry} \usepackage{graphicx} \usepackage{xcolor} \begin{document} \begin{titlepage} \pagecolor{red} \parbox[t]{0.93\textwidth}{ \parbox[t]{0.91\textwidth}{ \raggedleft \fontsize{50pt}{80pt}\selectfont The duck who wanted to be a prince } } \begin{figure}[!htb] \centering \includegraphics[width = 50mm]{example-image-duck} \end{figure} \AddToHookNext{shipout/after}{\pagecolor{white}} \end{titlepage} \newpage ~ \end{document} ``` Or you could e.g. use tikz to place a big coloured rectangle behind your title page: ``` \documentclass[12pt]{book} \usepackage{lmodern} \usepackage[left=2.50cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry} \usepackage{graphicx} \usepackage{tikz} \begin{document} \begin{titlepage} \begin{tikzpicture}[overlay, remember picture] \fill[red] (current page.south west) rectangle (current page.north east); \end{tikzpicture} \parbox[t]{0.93\textwidth}{ \parbox[t]{0.91\textwidth}{ \raggedleft \fontsize{50pt}{80pt}\selectfont The duck who wanted to be a prince } } \begin{figure}[!htb] \centering \includegraphics[width = 50mm]{example-image-duck} \end{figure} \end{titlepage} \newpage ~ \end{document} ```
4
https://tex.stackexchange.com/users/36296
687100
318,756
https://tex.stackexchange.com/questions/687098
2
Suppose I have a titlepage like ``` \documentclass[12pt]{book} \usepackage{lmodern} \usepackage[left=2.50cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry} \usepackage{graphicx} \begin{document} \begin{titlepage} \parbox[t]{0.93\textwidth}{ \parbox[t]{0.91\textwidth}{ \raggedleft \fontsize{50pt}{80pt}\selectfont The duck who wanted to be a prince } } \begin{figure}[!htb] \centering \includegraphics[width = 50mm]{example-image-duck} \end{figure} \end{titlepage} \newpage ~ \end{document} ``` How may its background be colored, while the second, and succeeding pages remain white?
https://tex.stackexchange.com/users/24406
How may a titlepage be colored?
false
My answer to [a similar question](https://tex.stackexchange.com/q/686915/277964) does also work in your case: ``` \documentclass[12pt]{book} \usepackage{lmodern} \usepackage[left=2.50cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry} \usepackage{xcolor} \usepackage{graphicx} \AddToHook{env/titlepage/begin}{\pagecolor{green}} \AddToHook{env/titlepage/after}{\nopagecolor} \begin{document} \begin{titlepage} \parbox[t]{0.93\textwidth}{ \parbox[t]{0.91\textwidth}{ \raggedleft \fontsize{50pt}{80pt}\selectfont The duck who wanted to be a prince } } \begin{figure}[!htb]% figure environment does not really make sense here \centering \includegraphics[width = 50mm]{example-image-duck} \end{figure} \end{titlepage} \newpage ~ \end{document} ``` or with an old LaTeX: ``` \documentclass[12pt]{book} \usepackage{lmodern} \usepackage[left=2.50cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry} \usepackage{xcolor} \usepackage{graphicx} \begin{document} \begin{titlepage} \pagecolor{green} \parbox[t]{0.93\textwidth}{ \parbox[t]{0.91\textwidth}{ \raggedleft \fontsize{50pt}{80pt}\selectfont The duck who wanted to be a prince } } \begin{figure}[!htb] \centering \includegraphics[width = 50mm]{example-image-duck} \end{figure} \end{titlepage} \nopagecolor \newpage ~ \end{document} ``` Both result in: BTW: A `figure` environment without caption at the title page does not really make sense. You should either just remove `\begin{figure}[!htb]` and `\end{figure}` or replace the `figure` environment by a `center` environment (and remove `\centering`).
2
https://tex.stackexchange.com/users/277964
687113
318,762
https://tex.stackexchange.com/questions/289450
10
This is the structure of my directories - * Main tex file `/Diss/main.tex` * chapter tex files `Diss/chap1/chap1.tex`, `Diss/chap2/chap2.tex` etc * Images `Diss/chap1/images/f1.png`, `Diss/chap2/images/f2.png` etc I would like to compile main file as well as each chapter standalone. So, I find **subfile** package useful. for e.g. > > main.tex > > > ``` \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{graphicx} %here is the path \graphicspath{{chap1/images/}{images/}} \usepackage{subfiles} \usepackage{blindtext} \begin{document} \subfile{chap1/chap1} \end{document} ``` > > chap1.tex > > > ``` \documentclass[../main.tex]{subfiles} \begin{document} \begin{figure}[bh] \centering \includegraphics[width=4cm]{f1} \label{fig:img1} \caption{ShareLaTeX learn logo} \end{figure} Hello, here is some text... \end{document} ``` This works nicely. So far so good. Now, I have several chapters, and most likely, using `\graphicspath{{chap*/images/}{images/}}` before each call of chapter will work (\* is the chapter number). But, I don't really like it because, I must add it several times. Is there a better way to manage this type of structure. P.S. - I invested a lot of time on it, but could not find a satisfactory answer, probably my search direction is wrong.
https://tex.stackexchange.com/users/61047
path of figures in different directories with subfile latex
false
In my opinion, the simplest solution would be to add ``` \graphicspath{{./img}{../img}} ``` to main.tex if your folder structure looks something like this: * main.tex * tex/ (for .tex files) * img/ (for image files)
0
https://tex.stackexchange.com/users/298022
687119
318,764
https://tex.stackexchange.com/questions/687104
2
For an assignment, I'm asked to draw a schematic of the magnetic field due to two circular coils, parallel to the `$x$-$y$` plane and at height `$z = d/2$` and `$z = -d/2$`. I have settled on pst-magneticfield to plot the field lines, however, I would also like to include coordinate axis for clarity. I've taken a look at the official documentation on <https://www.ctan.org/pkg/pst-magneticfield>, but I couldn't find an explanation there. Perhaps it's possible to put it into a tikz enviornment or something similar. Any type of help is highly appreciated. Have a good day everyone. EDIT: My current code is: ``` \begin{pspicture*}[showgrid](4,4)(-4,-4) \psmagneticfield[linecolor={[HTML]{006633}},N=2,R=2,nL=8,L=3](-4,-4)(4,4) \end{pspicture*} ``` I would like the z-axis to point straight up in the very middle and the x-axis right in between the current carrying pieces. Additionally, as I have just discovered, I need the current to flow in the opposite direction. Is it possible to achieve that? Thank you.
https://tex.stackexchange.com/users/296358
How can I add a coordinate system to pst-magneticfield?
true
``` \documentclass{article} \usepackage{pst-magneticfield} \usepackage{pst-plot} \begin{document} \begin{pspicture*}[showgrid=false](4.3,4.3)(-4.3,-4.3) \psmagneticfield[linecolor={[HTML{006633}},N=2,R=2,nL=8,L=3,changeNS](-4,-4)(4,4) \psaxes[arrows=->](0,0)(-4,-0.5)(4,4)[$x$,0][$z$,90] \end{pspicture*} \end{document} ```
4
https://tex.stackexchange.com/users/187802
687123
318,767
https://tex.stackexchange.com/questions/686610
0
For some reason the page number on the second page (page after titlepage) is missing. I am working with two different page styles. It is counted but not shown. ``` \documentclass{report} \usepackage[utf8]{inputenc} \usepackage[eng]{diku} \usepackage{hyperref} \usepackage{fancyhdr} \usepackage{extramarks} %\usepackage[linktoc=all]{hyperref} \usepackage{amsthm} \usepackage{amssymb} \usepackage{amsmath} \usepackage{mathtools} \usepackage{amsfonts} \usepackage{graphicx} \usepackage{listings} \usepackage{titlesec} %\usepackage{parskip} % Space between paragraphs \usepackage{mathtools} %These two are for linebreak in verbatim \usepackage{fancyvrb} \usepackage{fvextra} \usepackage{xcolor} %\usepackage[margin=1.3in]{geometry} \usepackage{listings} \usepackage{caption} \usepackage{verbatim} \usepackage{stmaryrd} \usepackage{float} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{chngcntr} \usepackage{caption} \usepackage{subcaption} \usepackage[normalem]{ulem} \useunder{\uline}{\ul}{} \usepackage[newfloat]{minted} \usepackage{fancyvrb} \newcommand\userinput[1]{\textbf{#1}} \usepackage{tgcursor} \fancyhead[R]{\thepage} \fancyhead[L]{\textsl{\leftmark}} \fancyfoot[C]{}% Custom footer \renewcommand{\headrulewidth}{0pt}% Line at the header visible \renewcommand{\footrulewidth}{0pt}% Line at the footer visible \counterwithout{equation}{chapter} \providecommand*{\listingautorefname}{Listing} % For autoref listings % Redefine the plain page style \fancypagestyle{plain}{% \fancyhf{}% \fancyfoot[C]{--~\thepage~--}% \renewcommand{\headrulewidth}{0pt}% Line at the header invisible \renewcommand{\footrulewidth}{0pt}% Line at the footer visible } \setlength{\headheight}{22.43335pt} \begin{document} \renewcommand{\thelstlisting}{\thechapter.\arabic{lstlisting}} \renewcommand{\thelisting}{\thechapter.\arabic{listing}} \pagenumbering{roman} \setcounter{page}{2} { \pagestyle{plain} \clearpage \maketitle \section*{\centering Abstract} ... \newpage \section*{\centering Acknowledgements} ... \newpage \tableofcontents \cleardoublepage } \pagenumbering{arabic} \setcounter{page}{1} \pagestyle{fancy} \chapter{Introduction} \end{document} ``` And here is the `diku.sty`, ``` %See ReadMe.tex \ProvidesPackage{diku}[15/9/2016 - this version should work for most people] \RequirePackage{geometry} %Requires the geometry package to change margins on the front page \RequirePackage{wrapfig} %Requires wrapfig to put logo next to signature \RequirePackage[utf8]{inputenc} %%Packages for the background picture \RequirePackage{graphicx} %Requires the graphicx package to show a logo picture \RequirePackage{eso-pic} %Requires the eso-pic package to change the background %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Package description for n00b options % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %\DeclareOption*{\PackageWarning{nbi}{Unknown ‘\CurrentOption’. Please choose either options: 'dan' or 'eng'}} \DeclareOption*{% \PackageWarning{diku}{I think you mistyped something in the Packageoption. The options are 'dan' or 'eng'. You typed: '\CurrentOption'} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Package description for option: 'eng'(English) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Declare option: English frontpage (eng) \DeclareOption{eng}{ %%New commands for filling out the front page with annoying prefilled lines \title{PREP} %Filling a title, if forgotten \newcommand*{\authora}[1]{\gdef\@authora{#1}} \newcommand*{\@authora}{Name} \newcommand*{\authorb}[1]{\gdef\@authorb{#1}} \newcommand*{\@authorb}{Name} \newcommand*{\emailaa}[1]{\gdef\@emaila{#1}} \newcommand*{\@emaila}{email} \newcommand*{\emailb}[1]{\gdef\@emailb{#1}} \newcommand*{\@emailb}{email} %Provide subtitle \newcommand*{\subtitle}[1]{\gdef\@subtitle{#1}} \newcommand*{\@subtitle}{Title} %Provide title \newcommand*{\project}[1]{\gdef\@project{#1}} \newcommand*{\@project}{Masters Thesis} %Provide supervisor(s) \newcommand*{\supervisor}[1]{\gdef\@supervisor{#1}} \newcommand*{\@supervisor}{Supervisor} %%Commands for registration and cataloguing %Provide an institute \newcommand*{\institute}[1]{\gdef\@institute{#1}} \newcommand*{\@institute}{Institute} %Provide a department \newcommand*{\department}[1]{\gdef\@department{#1}} \newcommand*{\@department}{Program Language T C} %Provide an email: \newcommand*{\email}[1]{\gdef\@email{#1}} \newcommand*{\@email}{email \& email} %Provide handin date \newcommand*{\handindate}[1]{\gdef\@handindate{#1}} \newcommand*{\@handindate}{31.10.2022 \texttt{\handindate}} %Provide defence date \newcommand*{\defencedate}[1]{\gdef\@defencedate{#1}} \newcommand*{\@defencedate}{28.06.2023} %%Command for background - well, it will become a command when I'm done :-) %Define frontpage \newcommand*{\frontpage}[1]{\gdef\@frontpage{#1}} \newcommand*{\@frontpage}{KuRedCircle} %Define frontpage \newcommand*{\secondpage}[1]{\gdef\@secondpage{#1}} \newcommand*{\@secondpage}{KuRed} %Command for background (only on one page) \newcommand*{\background}[1]{\AddToShipoutPicture*{\includegraphics[width=0.9\paperwidth, height=0.9\paperheight]{\@background{#1}}}} \newcommand*{\@background}{} \renewcommand*{\maketitle}{%Define the content of the frontpage \begin{titlepage} \newgeometry{margin=1.5cm,vmargin=2cm} % \background{KuRedCircle} {\scshape\large University\par} \vspace*{4cm} \centering {\Huge\scshape\@title\unskip\strut\par} {\LARGE \@subtitle\unskip\strut\par} \vspace{1cm} %{\Large\scshape \@project\unskip\strut\par} {\large\@authora\unskip\strut\par} {\large\texttt{\@emaila}\unskip\strut\par} \vspace{0.5cm} {\large\@authorb\unskip\strut\par} {\large\texttt{\@emailb}\unskip\strut\par} \vspace{0.5cm} {\large \@date\par \vspace{0.5cm} Supervised by\par \@supervisor\unskip\strut\par} \vfill % \begin{wrapfigure}{r}{6.5cm} % \vspace{-4cm} % \includegraphics[width=5cm]{RkuEng} % \end{wrapfigure} \restoregeometry \end{titlepage} } } \ExecuteOptions{\CurrentOption} \ProcessOptions \relax \endinput ``` I want to have that the abstract page is number 1, the acknowledgement page is number 2, the table of contents is number 3, with the page number as roman and in the bottom of the page. Then the page number should use the fancy page style from the `\chapter{Introduction}` and reset to 1. Currently the acknowledgement is number 2, but the page number for the abstract page is simply not shown?
https://tex.stackexchange.com/users/297687
Page number missing specifically on second page and only that page
true
**UPDATED** In the file `diku.sty` use ``` \renewcommand*{\maketitle}{%Define the content of the frontpage \newgeometry{margin=1.5cm}% here <<<<<<<<<< \begin{titlepage} ... \end{titlepage} \restoregeometry %here <<<<<< } ``` (The change of geometry of the page is done outside of the `titlepage` environment) ``` \renewcommand*{\maketitle}{%Define the content of the frontpage \newgeometry{margin=1.5cm}% here <<<<<<<<<< \begin{titlepage} % \background{KuRedCircle} {\scshape\large University\par} \vspace*{4cm} \centering {\Huge\scshape\@title\unskip\strut\par} {\LARGE \@subtitle\unskip\strut\par} \vspace{1cm} %{\Large\scshape \@project\unskip\strut\par} {\large\@authora\unskip\strut\par} {\large\texttt{\@emaila}\unskip\strut\par} \vspace{0.5cm} {\large\@authorb\unskip\strut\par} {\large\texttt{\@emailb}\unskip\strut\par} \vspace{0.5cm} {\large \@date\par \vspace{0.5cm} Supervised by\par \@supervisor\unskip\strut\par} \vfill % \begin{wrapfigure}{r}{6.5cm} % \vspace{-4cm} % \includegraphics[width=5cm]{RkuEng} % \end{wrapfigure} % \end{titlepage} \restoregeometry%here <<<<<< } ``` Using this MWE with the modified `diku.sty` ``` % !TeX TS-program = pdflatex \documentclass{report} \usepackage[eng]{diku} % uses the modified version <<< \usepackage{fancyhdr} \fancypagestyle{fancy}{% \fancyhead[R]{\thepage} \fancyhead[L]{\textsl{\leftmark}} \fancyfoot[C]{}% Custom footer \renewcommand{\headrulewidth}{0pt}% Line at the header visible \renewcommand{\footrulewidth}{0pt}% Line at the footer visible } % Redefine the plain page style \fancypagestyle{plain}{% \fancyhf{}% \fancyfoot[C]{--~\thepage~--}% \renewcommand{\headrulewidth}{0pt}% Line at the header invisible \renewcommand{\footrulewidth}{0pt}% Line at the footer visible } \setlength{\headheight}{25pt} %***************** for testing \usepackage{showframe} %Only to show the margins \usepackage{kantlipsum}% dummy text %***************** \begin{document} \pagenumbering{roman} {% \pagestyle{plain} \maketitle \section*{\centering Abstract} \kant[1] \newpage \section*{\centering Acknowledgements} \kant[2] \newpage \tableofcontents \cleardoublepage } \pagenumbering{arabic} \setcounter{page}{1} \pagestyle{fancy} \chapter{Introduction} \kant[1-5] \end{document} ``` the result is
3
https://tex.stackexchange.com/users/161015
687128
318,771
https://tex.stackexchange.com/questions/687121
0
I am defining a new alphabet with `\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}`. I used to use the fonts by `\usepackage[scaled=1.15]{urwchancal}` but this changes all `\mathcal` letters, when using the declare math I can select where to use this alphabet but I don't know how to scale the `\mathpzc` as it was scaled in `\usepackage[scaled=1.15]{urwchancal}`. Is there a way to make `\DeclareMathAlphabet[scaled=1.15]{\mathpzc}{OT1}{pzc}{m}{it}` or something like it?
https://tex.stackexchange.com/users/150180
When defining a new math alphabet how to scale its letters?
true
You can look in `ot1pzc.fd` and extract the relevant information, so you can define a different font family with scaling. ``` \ProvidesFile{ot1pzc.fd} [2020/03/25 font definitions for OT1/pzc.] \DeclareFontFamily{OT1}{pzc}{} \DeclareFontShape{OT1}{pzc}{m}{it}{ <-> pzcmi7t }{} \DeclareFontShape{OT1}{pzc}{m}{sl}{<->ssub * pzc/m/it}{} \DeclareFontShape{OT1}{pzc}{m}{n}{<->ssub * pzc/m/it}{} \endinput ``` We need `\DeclareFontFamily` and the first `\DeclareFontShape` instructions. ``` \documentclass{article} % from ot1pzc.fd \DeclareFontFamily{OT1}{modpzc}{} \DeclareFontShape{OT1}{modpzc}{m}{it}{<-> s*[1.15] pzcmi7t}{} % define the math alphabet \DeclareMathAlphabet{\mathpzc}{OT1}{modpzc}{m}{it} % just for comparison (remove it) \DeclareMathAlphabet{\mathunscaledpzc}{OT1}{pzc}{m}{it} \begin{document} $A\mathpzc{A}B\mathpzc{B}$ $A\mathunscaledpzc{A}B\mathunscaledpzc{B}$ \end{document} ``` I added `\mathunscaledpzc` just to compare the results. But you can more simply load `urwchancal`. With the `mathscr` option the standard `\mathcal` is still available and (the clone of) Zapf Chancery is obtained with `\mathscr`. ``` \documentclass{article} \usepackage[scaled=1.15,mathscr]{urwchancal} \begin{document} $A\mathscr{A}B\mathscr{B}$ \end{document} ```
1
https://tex.stackexchange.com/users/4427
687131
318,773
https://tex.stackexchange.com/questions/135102
9
I've just watched some YouTube videos given by ShareLatex. In the video I saw he constructed a Thesis in LaTeX. It is available [here](https://www.sharelatex.com/project/51fa85c3db89c3c351085071). Now, I downloaded the whole package to see if it would run in my LaTeX editor (TexStudio), but when I ran/compiled it, everything seemed to be working, except the bibliography. It was supposed to be in the end, but nothing shows, and the citing just writes out the keyword of the .bib file. I haven't touched anything at all, I just clicked Compile and "Build and View" when I opened the main document. So yeah, why does it work on the ShareLatex website, but not on my computer in TexStudio. I'm obviously doing something wrong, but what ? Thanks in advance.
https://tex.stackexchange.com/users/31418
BibLaTeX doesn't show bibliography when compiling
false
For me choosing the default bibliography option via `Options -> Configure TexStudio -> Build -> Default Bibliography Tool` and choosing `BibTex` instead of `Biber` did the trick.
1
https://tex.stackexchange.com/users/178238
687132
318,774
https://tex.stackexchange.com/questions/687134
0
For some reason I cannot understand, the symbol `\(\bigcup\)` is not shown in the compiled PDF. There are no error messages. The same is true for `\(\bigsqcup\)`, which I thought I might use as a substitute. I do not observe other lacunas. Is this a common problem, and is there a way to resolve it? As no package is needed for (\bigcup), it seems that the problem may, perhaps, most often arise because two packages are loaded in the wrong order. The answer, provided by @Jasper Habicht, also resolved the problem that arose with (\Koppa), as explained in the question [A surrogate for \Koppa under Teubner?](https://tex.stackexchange.com/questions/687141/a-surrogate-for-koppa-under-teubner/687163#687163). As he points out in his answer, the order of the packages teubner and newtxmath is decisive: ``` \documentclass{book} \usepackage[T1]{fontenc} \usepackage[greek,english]{babel} \usepackage{newtxmath}% <<< \usepackage{teubner} \begin{document} Hello $\bigcup$ \Koppa\koppa{} $\bigsqcup$ bye \end{document} ``` Versus ``` \documentclass{book} \usepackage[T1]{fontenc} \usepackage[greek,english]{babel} \usepackage{teubner}% <<< \usepackage{newtxmath} \begin{document} Hello $\bigcup$ \Koppa\koppa{} $\bigsqcup$ bye \end{document} ```
https://tex.stackexchange.com/users/24406
Bigcup not shown
true
A MWE showing the problem can be reduced to: ``` \documentclass{book} \usepackage[T1]{fontenc} \usepackage[greek,english]{babel} \usepackage{newtxmath} \usepackage{teubner} \begin{document} Hello $\bigcup$ \end{document} ``` The problem seems to be that the `teubner` package redefines several macros. A workaround could be to load the `teubner` package first, but this is untested and other things may break: ``` \documentclass{book} \usepackage[T1]{fontenc} \usepackage[greek,english]{babel} \usepackage{teubner} \usepackage{newtxmath} \begin{document} Hello $\bigcup$ \end{document} ``` At least, if you load the `teubner` package first and the `newtxmath` later, you should be able to use `\Koppa` and `\koppa` as well as `\bigcup` and `\bigsqcup` it seems: ``` \documentclass{book} \usepackage[T1]{fontenc} \usepackage[greek,english]{babel} \usepackage{teubner} \usepackage{newtxmath} \begin{document} Hello $\bigcup$ \Koppa\koppa{} $\bigsqcup$ bye \end{document} ```
2
https://tex.stackexchange.com/users/47927
687138
318,775
https://tex.stackexchange.com/questions/687144
2
When I render this document in macOS 13.2: ``` \documentclass[11pt,a4paper,sans]{moderncv} \moderncvstyle{classic} \moderncvcolor{blue} \usepackage[utf8]{inputenc} \usepackage{CJKutf8} \usepackage[scale=0.75]{geometry} \setlength{\footskip}{149.60005pt} \name{蒋}{小强} \phone[mobile]{15682721628} \email{jianng@gmail.com} \begin{document} \begin{CJK}{UTF8}{gbsn} \makecvtitle \section{Education} \cventry{2023.05--2023.05}{本科}{中国药科大学}{}{}{} \end{CJK} \end{document} ``` the output log info shows that: ``` 11628 bytes written Latexmk: Summary of warnings from last run of *latex: =====Latex reported missing or unavailable character(s). =====See log file for details. Latexmk: ====List of undefined refs and citations: Missing character: There is no 蒋 (U+848B) in font [lmsans17-regular]:mapping=tex-text;! Missing character: There is no 小 (U+5C0F) in font [lmsans17-regular]:mapping=tex-text;! Missing character: There is no 强 (U+5F3A) in font [lmsans17-regular]:mapping=tex-text;! Missing character: There is no 本 (U+672C) in font [lmsans10-bold]:mapping=tex-text;! Missing character: There is no 科 (U+79D1) in font [lmsans10-bold]:mapping=tex-text;! Missing character: There is no 中 (U+4E2D) in font [lmsans10-oblique]:mapping=tex-text;! Missing character: There is no 国 (U+56FD) in font [lmsans10-oblique]:mapping=tex-text;! And 4 more --- see log file. Latexmk: All targets (modern.pdf) are up-to-date Latexmk: I have not found a previewer that is already running. So I will start it for 'modern.pdf' ``` and the pdf did not output Chinese words. Am I missing something? What should I do to fix this issue?
https://tex.stackexchange.com/users/69600
Missing character: There is no 蒋 (U+848B) in font [lmsans17-regular]:mapping=tex-text;!
true
You can use `ctex` or `xeCJK` package. ``` \documentclass[11pt,a4paper,sans]{moderncv} \usepackage[scheme=plain]{ctex} % or % \usepackage{xeCJK} \moderncvstyle{classic} \moderncvcolor{blue} % \usepackage[utf8]{inputenc} % \usepackage{CJKutf8} \usepackage[scale=0.75]{geometry} \setlength{\footskip}{149.60005pt} \name{蒋}{小强} \phone[mobile]{15682721628} \email{jianng@gmail.com} \begin{document} % \begin{CJK}{UTF8}{gbsn} \makecvtitle \section{Education} \cventry{2023.05--2023.05}{本科}{中国药科大学}{}{}{} % \end{CJK} \end{document} ```
4
https://tex.stackexchange.com/users/238422
687149
318,777
https://tex.stackexchange.com/questions/653092
1
I am trying to make some documentation using `Sphinx`, and packages are continually missing. I have tried installing the full version, however, I must have failed since, despite being over 450 MB, I am still missing packages. I did this ``` sudo yum install texlive-* ``` However, when I run `make latexpdf`, I get ``` ! LaTeX Error: File `capt-of.sty' not found. ``` I am using Centos 7. Apparently for [Centos 8](https://installati.one/centos/8/texlive-capt-of/), this should be done `sudo yum -y install texlive-capt-of` Unfortunately, it does nothing for me: ``` user$ sudo yum -y install texlive-capt-of Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirror.its.dal.ca * centos-sclo-rh: mirror.its.dal.ca * centos-sclo-sclo: mirror.its.dal.ca * epel: iad.mirror.rackspace.com * extras: centos.mirror.vexxhost.com * updates: mirror.its.dal.ca No package texlive-capt-of available. Error: Nothing to do ```
https://tex.stackexchange.com/users/201328
How to install the full TexLive on Centos 7
false
For me, I did not install with yum, using command like this to install latex: ``` wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz --no-check-certificate zcat < install-tl-unx.tar.gz | tar xf - cd install-tl-* yum install perl-Digest-MD5 -y perl ./install-tl --no-interaction ``` follow this link <https://tug.org/texlive/quickinstall.html> from the comments.
1
https://tex.stackexchange.com/users/69600
687155
318,782
https://tex.stackexchange.com/questions/687165
1
I'm trying to use for the first time the package csvsimple. It worked fine with my .csv file and the command `\csvautobooktabular` but I'm not able to use it with `\csvreader`. Here is a MWE. Could someone show me where my code could be wrong? (I'm using Overleaf to compile this code) ``` \documentclass{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{caption} \usepackage[legacy]{csvsimple} \usepackage{booktabs} \usepackage{filecontents} \begin{filecontents*}{data2.csv} Echant.;Masse;Inc.;Volume;Inc.;Masse vol.;Inc. ;;masse;;volume;;masse vol. [-];[g];[g];[ml];[ml];[kg/m3];[kg/m3] Paul;23.4;0.1;7.52;0.01;3.11;0.02 1;43.5;0.1;13.9;0.1;3.13;0.03 3B;5.0;0.1;1.7;0.2;3.0;0.4 H12bc;4.7;0.1;1.6;0.2;2.9;0.4 \end{filecontents*} \begin{document} \begin{center} \shorthandoff{;} \csvautobooktabular[separator=semicolon]{data2.csv} \shorthandon{;} \captionof{table}{Exemple 1.} \end{center} \begin{center} \shorthandoff{;} \csvreader[ separator=semicolon, tabular=@{}ccccccc@{}, table head=\toprule a & b & c & d & e & f & g \\ \midrule, table foot=\bottomrule ] {data2.csv}{}{} \shorthandon{;} \captionof{table}{Exemple 2.} \end{center} \end{document} ```
https://tex.stackexchange.com/users/289475
csvreader does not show anything
false
You need to tell `csvreader` how to typeset the tabular exactly, for example like this (which would be a very explicit way): ``` \documentclass{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{caption} \usepackage[legacy]{csvsimple} \usepackage{booktabs} \begin{filecontents*}{data2.csv} Echant.;Masse;Inc.;Volume;Inc.;Masse vol.;Inc. ;;masse;;volume;;masse vol. [-];[g];[g];[ml];[ml];[kg/m3];[kg/m3] Paul;23.4;0.1;7.52;0.01;3.11;0.02 1;43.5;0.1;13.9;0.1;3.13;0.03 3B;5.0;0.1;1.7;0.2;3.0;0.4 H12bc;4.7;0.1;1.6;0.2;2.9;0.4 \end{filecontents*} \begin{document} \begin{center} \shorthandoff{;} \csvreader[ separator=semicolon, tabular={ @{} *{8}{c} @{} }, table head=\toprule Echant. & Masse & Inc. & Volume & Inc. & Masse vol. & Inc. \\ \midrule, table foot=\bottomrule ] {data2.csv}{}{ \csvcoli & \csvcolii & \csvcoliii & \csvcoliv & \csvcolv & \csvcolvi & \csvcolvii } \shorthandon{;} \captionof{table}{Exemple 2.} \end{center} \end{document} ``` You could also just use `\csvlinetotablerow` instead, as suggested in the comments: ``` \documentclass{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{caption} \usepackage[legacy]{csvsimple} \usepackage{booktabs} \begin{filecontents*}{data2.csv} Echant.;Masse;Inc.;Volume;Inc.;Masse vol.;Inc. ;;masse;;volume;;masse vol. [-];[g];[g];[ml];[ml];[kg/m3];[kg/m3] Paul;23.4;0.1;7.52;0.01;3.11;0.02 1;43.5;0.1;13.9;0.1;3.13;0.03 3B;5.0;0.1;1.7;0.2;3.0;0.4 H12bc;4.7;0.1;1.6;0.2;2.9;0.4 \end{filecontents*} \begin{document} \begin{center} \shorthandoff{;} \csvreader[ separator=semicolon, tabular={ @{} *{8}{c} @{} }, table head=\toprule Echant. & Masse & Inc. & Volume & Inc. & Masse vol. & Inc. \\ \midrule, table foot=\bottomrule ] {data2.csv}{}{ \csvlinetotablerow } \shorthandon{;} \captionof{table}{Exemple 2.} \end{center} \end{document} ```
1
https://tex.stackexchange.com/users/47927
687169
318,786
https://tex.stackexchange.com/questions/687143
0
I would like to know which LaTeX document class has been used for the following three papers. <https://eprint.iacr.org/2010/488.pdf> <https://eprint.iacr.org/2023/250.pdf> <https://eprint.iacr.org/2022/261.pdf> I have seen a lot of papers on Cryptology ePrint Archive which seem to be generated based on the same document class. This question might be ridiculously easy for people who are familiar with LaTeX. I am not familir with Latex. So I would like to know. Thank you.
https://tex.stackexchange.com/users/212725
LaTeX Document Class
false
Some extensions, which fit badly into a comment line. ### Standard classes Find [standard classes and their options desribed here](https://en.wikibooks.org/wiki/LaTeX/Document_Structure#Document_classes) . A detailed description of the article classes code is [available on ctan](https://mirror.dogado.de/tex-archive/macros/latex/base/classes.pdf). ### Document classes similar to article ... are also available on [ctan](https://ctan.org/topic/article-like). ### A huge collection of document classes ... can also be found on [ctan](https://www.ctan.org/topic/class). But for sure, there are many more out there. E.g. [Overleaf](https://www.overleaf.com/articles) provides many templates, which may or may not be available via ctan as well. See e.g. the entries under Academic Journals. A template, similar to the links you posted, is also available on [Overleaf; copy from View Source](https://www.overleaf.com/latex/templates/a-simple-article-template/gdsdkccmjnxg).
0
https://tex.stackexchange.com/users/245790
687171
318,787
https://tex.stackexchange.com/questions/602666
2
I am completely lost. I have installed TeXLive on windows 10 and with TeXworks I'm able to use the packages `stmaryrd`, `physics`, and `mathtools` along with the normal ams packages. However the second I try to use this in VSCode with WSL those 3 packages no longer work. I believe I have both my userpath and system path setup right but just in case in my path variable in both places I have the following line `C:\texlive\2021\bin\win32`. I'm very lost as to why these packages are not found in VSCode but are found in TeXworks. I have looked through the github wiki for this extension but to no luck.
https://tex.stackexchange.com/users/245182
How to I properly setup LaTeX Workshop in VSCode with WSL2
true
Is it possible that you have those packages in your Windows distribution but not under WSL? I only use the WSL2 (Ubuntu) engine to compile TeX code on my Windows box, but I don't have any LaTeX compiler in my Windows folders. If you don't have TeX Live in your WSL distribution, you can install it by running ``` sudo apt install texlive ``` I realize this question is 2 years old, but it might help someone like me who found it while looking for something else.
1
https://tex.stackexchange.com/users/298051
687177
318,788
https://tex.stackexchange.com/questions/687173
2
I am preparing figures for an IEEEtran journal, and they require that all text in the figures be written in Times New Roman font. I have tried using "**\setmainfont{Times New Roman}**" and "**font=\fontspec{Times New Roman}**" (XeLaTeX) but I'm not sure if that is correct, as I don't have much experience with fonts and LaTeX. I would appreciate it if you could guide me on how to enforce the use of Times New Roman for everything. I'm also unsure if this requirement applies to math formulas. > > "For consistency throughout the journal, we ask that wording in the > figures remain in Times New Roman font when possible. Also, make sure > to use the same font (down to capitalization and style, italics or > bold) for the variables in your figures as you use in the text of your > paper" > > > (Source: <https://www.ieee-pels.org/images/files/pdf/TTE/tte-infoauth-fill-3026800-x.pdf>) ``` \documentclass[border={0.1mm}]{standalone} \usepackage{fontspec} \setmainfont{Times New Roman} \usepackage[american,siunitx,RPvoltages]{circuitikz} \usepackage{bm} \newcommand*{\B}[1]{\ifmmode\bm{#1}\else\textbf{#1}\fi} % set all label and text to font of 9pt \ctikzset{bipole label style/.style={font=\fontspec{Times New Roman}\color{black}\fontsize{10}{12}\selectfont}} \ctikzset{bipole annotation style/.style={font=\fontspec{Times New Roman}\color{black}\ttfamily\large}} \ctikzset{bipole voltage style/.style={font=\fontspec{Times New Roman}\color{black}\fontsize{10}{12}\selectfont}} \ctikzset{bipole current style/.style={font=\fontspec{Times New Roman}\color{black}\fontsize{10}{12}\selectfont}} \begin{document} \begin{tikzpicture}[ultra thick, circuitikz/inductors/thickness=0.9, circuitikz/capacitors/thickness=0.9, circuitikz/power supplies/thickness=0.9, circuitikz/sources/thickness=0.9, circuitikz/switches/thickness=0.9, circuitikz/grounds/thickness=0.9, font=\color{black}\fontsize{10}{12}\selectfont ] \draw (2, 2.4) to [short,o-] ++(0.1,0) to [cute inductor, v^=$\bm{V_\mathrm{L}}$, voltage/american label distance=0.6pt,name =L] ++ (1.8,0) to [short, -o] ++(0.1,0); % draw input and output \draw (-0.3,0.4) to [V] (-0.3,2.4) to [short] ++(1.3,0) ; \node [above ] at (-0.3,2.4) {$\B{V_\mathrm{DC}}$}; \end{tikzpicture} \end{document} ```
https://tex.stackexchange.com/users/108432
How can I ensure that Times New Roman font is used for text in circuitikz and tikz?
true
It is a good practice that if you want/have to follow a publisher-provided class, to use it and not change their default¹. So the best approach is simply to use the class itself and *avoid touching font definitions*: ``` \documentclass{IEEEconf} \usepackage[siunitx, RPvoltages]{circuitikz} \begin{document} Text V\textsubscript{x}, math $V_x$, \tikz[american, baseline=(Rvoltage.base)] \draw(0,0) to[R, v=$V_x$, name=R] ++(2,0); \end{document} ``` As you can see, `circuitikz` just goes with the flow and uses whatever math or text font is current. Now, if you want to prepare the figure separately, it's handy to use `standalone`, and in that case you may need to tinker a bit with the fonts. In `IEEEconf.cls`, they use ``` \RequirePackage{mathptmx} \RequirePackage{helvet} \RequirePackage{courier} ``` So you can just do the same like this: ``` \documentclass[border=10pt]{standalone} \usepackage[T1]{fontenc} \usepackage{mathptmx, helvet, courier} \usepackage[siunitx, RPvoltages]{circuitikz} \begin{document} \begin{tikzpicture}[american] \draw(0,0) to[R, v=$V_x$, name=R] ++(2,0); \end{tikzpicture} \end{document} ``` (The two images are copied and pasted with the same scale, and it seems they match; `IEEEconf` is based on a 10-points `article` class). --- ¹ which can be not so nice, mind you, or current...
2
https://tex.stackexchange.com/users/38080
687186
318,791
https://tex.stackexchange.com/questions/687195
4
``` \documentclass[12pt, a4paper, UTF8, scheme = plain]{ctexrep} \usepackage{amsmath,tasks} \usepackage{graphicx} \usepackage{tcolorbox} \tcbuselibrary{skins,xparse,breakable} \tcbset{% colback = white, colframe = black, title filled = false, colbacktitle = white, breakable, enhanced }%%%%%%%%%%%%%% %%%%%%%%%%%%%%% \NewTColorBox[ auto counter, % number within = tcolorbox, %section ? chapter ? tcolorbox? number freestyle = {Example \,\noexpand\arabic{\tcbcounter} } ]{example}{ O{}mo }{ fonttitle = \bfseries, coltitle = black, title = {\thetcbcounter: #2}, #1 }%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{example}{box 1} \begin{equation} a + b = c \end{equation} \begin{equation} a + b = c \end{equation} \begin{equation} a + b = c \end{equation} \end{example} How to start the equation numbering in the new box with $1$ again? \begin{example}{box 2} \begin{equation} a^2 + b^2 = c^2 \end{equation} \begin{equation} a^3 + b^3 = c^3 \end{equation} \begin{equation} a + b = c \end{equation} \end{example} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ``` Is there an option for this in `number within`? I checked the manual but there was very little about it...
https://tex.stackexchange.com/users/180735
How to start the equation numbering in the new box with $1$ again?
true
Reset the `equation` counter to `0` in the `title` of the `\NewTColorBox`. ``` \documentclass[12pt, a4paper, UTF8, scheme = plain]{ctexrep} \usepackage{amsmath,tasks} \usepackage{graphicx} \usepackage{tcolorbox} \tcbuselibrary{skins,xparse,breakable} \tcbset{% colback = white, colframe = black, title filled = false, colbacktitle = white, breakable, enhanced }%%%%%%%%%%%%%% %%%%%%%%%%%%%%% \NewTColorBox[ auto counter, % number within = tcolorbox, %section ? chapter ? tcolorbox? number freestyle = {Example \,\noexpand\arabic{\tcbcounter} } ]{example}{ O{}mo }{ fonttitle = \bfseries, coltitle = black, title = {\thetcbcounter: #2\setcounter{equation}{0}}, #1 }%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{example}{box 1} \begin{equation} a + b = c \end{equation} \begin{equation} a + b = c \end{equation} \begin{equation} a + b = c \end{equation} \end{example} How to start the equation numbering in the new box with $1$ again? \begin{example}{box 2} \begin{equation} a^2 + b^2 = c^2 \end{equation} \begin{equation} a^3 + b^3 = c^3 \end{equation} \begin{equation} a + b = c \end{equation} \end{example} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{document}%%%%%%%%%% ```
4
https://tex.stackexchange.com/users/25858
687197
318,795
https://tex.stackexchange.com/questions/687195
4
``` \documentclass[12pt, a4paper, UTF8, scheme = plain]{ctexrep} \usepackage{amsmath,tasks} \usepackage{graphicx} \usepackage{tcolorbox} \tcbuselibrary{skins,xparse,breakable} \tcbset{% colback = white, colframe = black, title filled = false, colbacktitle = white, breakable, enhanced }%%%%%%%%%%%%%% %%%%%%%%%%%%%%% \NewTColorBox[ auto counter, % number within = tcolorbox, %section ? chapter ? tcolorbox? number freestyle = {Example \,\noexpand\arabic{\tcbcounter} } ]{example}{ O{}mo }{ fonttitle = \bfseries, coltitle = black, title = {\thetcbcounter: #2}, #1 }%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{example}{box 1} \begin{equation} a + b = c \end{equation} \begin{equation} a + b = c \end{equation} \begin{equation} a + b = c \end{equation} \end{example} How to start the equation numbering in the new box with $1$ again? \begin{example}{box 2} \begin{equation} a^2 + b^2 = c^2 \end{equation} \begin{equation} a^3 + b^3 = c^3 \end{equation} \begin{equation} a + b = c \end{equation} \end{example} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ``` Is there an option for this in `number within`? I checked the manual but there was very little about it...
https://tex.stackexchange.com/users/180735
How to start the equation numbering in the new box with $1$ again?
false
You should define a special counters for equations inside the boxes. It's not difficult to replace the `equation` counter with the special counter, that's reset at each `example` environment. I also add support for `hyperref`. ``` \documentclass{article} \usepackage{amsmath,tasks} \usepackage{graphicx} \usepackage{tcolorbox} \tcbuselibrary{skins,xparse,breakable} \usepackage{hyperref} \tcbset{ colback = white, colframe = black, title filled = false, colbacktitle = white, breakable, enhanced } \NewTColorBox[ auto counter, number freestyle = {Example \noexpand\arabic{\tcbcounter}} ]{example}{ O{}mo }{ fonttitle = \bfseries, coltitle = black, title = {\thetcbcounter: #2}, #1 } \newcounter{boxequation} \AddToHook{env/example/begin}{% \setcounter{boxequation}{0}% \ExpandArgs{cc}\let{c@equation}{c@boxequation}% % comment the following line if you're not using hyperref \renewcommand{\theHequation}{\arabic{\tcbcounter}\arabic{boxequation}}% } \begin{document} \begin{example}{box 1} Some text about this example \begin{gather} a + b = c \\ a + b = c \\ a + b = c \end{gather} Some text about this example \end{example} How to start the equation numbering in the new box with $1$ again? \begin{example}{box 2} Some text about this example \begin{gather} a^2 + b^2 = c^2 \\ a^3 + b^3 = c^3 \\ a + b = c \end{gather} Some text about this example \end{example} \end{document} ```
5
https://tex.stackexchange.com/users/4427
687203
318,799
https://tex.stackexchange.com/questions/686871
1
I would like to highlight certain short sequences of amino acids in a protein sequence. Choosing them by specifying their numbers works, but since some of them occur several times I would prefer to select by sequence. Although I'm doing exactly as described in the user manual, it just ignores my `\shaderegion` command (it should choose the four first residues in the depicted stretch). ``` \documentclass{article} \usepackage{texshade} \begin{document} \begin{filecontents*}{protein.fasta} >sp|P42566|EPS15_HUMAN Epidermal growth factor receptor substrate 15 OS=Homo sapiens OX=9606 GN=EPS15 PE=1 SV=2 MAAAAQLSLTQLSSGNPVYEKYYRQVDTGNTGRVLASDAAAFLKKSGLPDLILGKIWDLA DTDGKGILNKQEFFVALRLVACAQNGLEVSLSSLNLAVPPPRFHDTSSPLLISGTSAAEL PWAVKPEDKAKYDAIFDSLSPVNGFLSGDKVKPVLLNSKLPVDILGRVWELSDIDHDGML DRDEFAVAMFLVYCALEKEPVPMSLPPALVPPSKRKTWVVSPAEKAKYDEIFLKTDKDMD GFVSGLEVREIFLKTGLPSTLLAHIWSLCDTKDCGKLSKDQFALAFHLISQKLIKGIDPP HVLTPEMIPPSDRASLQKNIIGSSPVADFSAIKELDTLNNEIVDLQREKNNVEQDLKEKE DTIKQRTSEVQDLQDEVQRENTNLQKLQAQKQQVQELLDELDEQKAQLEEQLKEVRKKCA EEAQLISSLKAELTSQESQISTYEEELAKAREELSRLQQETAELEESVESGKAQLEPLQQ HLQDSQQEISSMQMKLMEMKDLENHNSQLNWCSSPHSILVNGATDYCSLSTSSSETANLN EHVEGQSNLESEPIHQESPARSSPELLPSGVTDENEVTTAVTEKVCSELDNNRHSKEEDP FNVDSSSLTGPVADTNLDFFQSDPFVGSDPFKDDPFGKIDPFGGDPFKGSDPFASDCFFR QSTDPFATSSTDPFSAANNSSITSVETLKHNDPFAPGGTVVAASDSATDPFASVFGNESF GGGFADFSTLSKVNNEDPFRSATSSSVSNVVITKNVFEETSVKSEDEPPALPPKIGTPTR PCPLPPGKRSINKLDSPDPFKLNDPFQPFPGNDSPKEKDPEIFCDPFTSATTTTNKEADP SNFANFSAYPSEEDMIEWAKRESEREEEQRLARLNQQEQEDLELAIALSKSEISEA \end{filecontents*} \begin{texshade}{protein.fasta} \shadingmode{diverse} \residuesperline{50} \setdomain{1}{400..600} \hideconsensus \shaderegion{1}{ELDE}{Red}{Green} \hidenames \showruler{1}{top} \end{texshade} \end{document} ``` [This version on overleaf](https://www.overleaf.com/read/vsssgsjjdrfs) includes the current texshade.sty file, their default one has known problems.
https://tex.stackexchange.com/users/297368
Texshade on Overleaf won't select amino acids by sequence
true
The author has now added this function for \shaderegion in the current version 1.26b on the texshade ctan.org page!
1
https://tex.stackexchange.com/users/297368
687204
318,800
https://tex.stackexchange.com/questions/687157
1
**How can I connect the LaTex distribution that I installed with Tinytex with TeXstudio?** I have downloaded Tinytex from Rstudio (following the instructions [here](https://bookdown.org/yihui/rmarkdown-cookbook/install-latex.html)). From Rstudio I am now able to compile .tex files and obtain the expected pdf. After that, I downloaded [TeXstudio](https://www.texstudio.org/) and try to compile the same .tex file on the same MacBook pro and TeXstudio do not find the latex distribution. More precisely, when opening TeXstudio I obtain the following error: > > No LaTeX distribution was found on your system. As a result, the corresponding commands are not configured. This means, that you cannot compile your documents to the desired output format (e.g. pdf). > A popular LaTeX distribution on OSX is MacTeX. > If you intend to work with LaTeX, you'll most certainly want to install it. > > > **Remarks**: I am using a MacBook Pro 14 inch, 2023 with macOS Ventura I installed tinytex from R version 4.3.0 on may 2023 following the instructions [here](https://bookdown.org/yihui/rmarkdown-cookbook/install-latex.html) I am using TeXstudio version 4.5.2
https://tex.stackexchange.com/users/154564
Tinytex and TeXstudio (Mac)
true
TinyTeX on a Mac installs its TeX binaries into `~/Library/TinyTeX/bin/universal-darwin`, according to your investigation based on my comments so you need to update the TeXStudio preferences to reflect that path for each engine, and other tools that are expected to be in the TeX `bin` directory. So for each of the TeX engines, (`latex`, `pdflatex`, `lualatex`, and `xelatex` you need to add the following in the Commands section of the Preferences. ``` "~/Library/TinyTeX/bin/universal-darwin/pdflatex" -synctex=1 -interaction=nonstopmode %.tex ``` substituting the relevant engine binary as needed. You should also use this binary path for the following commands in the preferences: ``` "~/Library/TinyTeX/bin/universal-darwin/dvips" -o %.ps %.dvi "~/Library/TinyTeX/bin/universal-darwin/dvipdfm" %.dvi "~/Library/TinyTeX/bin/universal-darwin/bibtex" %.aux "~/Library/TinyTeX/bin/universal-darwin/biber" % "~/Library/TinyTeX/bin/universal-darwin/" %.idx "~/Library/TinyTeX/bin/universal-darwin/" %.idx ``` Be aware that TinyTeX doesn't likely install all of these tools, so some may not work and you will need to install them yourself. If you are mainly an R user who uses TeX from within RStudio, and just need occasional use of a TeX distribution, this route should work fine. If you're likely to be using TeX more extensively independent of R you may want to consider installing either the full MacTeX distribution or the substantially smaller BasicTeX distribution instead of using TinyTeX.
1
https://tex.stackexchange.com/users/2693
687212
318,804
https://tex.stackexchange.com/questions/687172
0
Consider this paper: <https://www.sciencedirect.com/science/article/pii/S0960077922011948> How do we achieve this light blue colour for links? From the answer to this question: [Extend the hyperref link to Figure and a, b, c](https://tex.stackexchange.com/questions/266434/extend-the-hyperref-link-to-figure-and-a-b-c): ``` \documentclass[10pt,a4paper]{book} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{todonotes} \usepackage[colorlinks,linkcolor=black,anchorcolor=black,citecolor=black,filecolor=black,urlcolor=blue]{hyperref} \newcommand*{\figref}[2][]{% \hyperref[{fig:#2}]{% Figure~\ref*{fig:#2}% \ifx\\#1\\% \else \,#1% \fi }% } \begin{document} \hypersetup{linkcolor=blue} \chapter{one} \begin{figure}[t] \missingfigure[figwidth=6cm]{- << Ciel, mon mari >> dit-elle !} \caption{a: Missing figure, and b: still missing figure.} \label{fig:missing Figure} \end{figure} The figure \figref{missing Figure} contains two subfigures. Something in \figref[a]{missing Figure} and some other thing in Figure \figref[b]{missing Figure}. \end{document} ```
https://tex.stackexchange.com/users/181561
How to have light blue hyperref colour?
true
So, apparently you solved your problem yourself, taking together your code and last comment ... which can be easily verified by using instead for some pinkish: ``` \hypersetup{linkcolor=[rgb]{1,0.5,0.73}}% ;-) ``` ``` \documentclass[10pt,a4paper]{book} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{todonotes} \usepackage[colorlinks,linkcolor=black,anchorcolor=black, citecolor=black,filecolor=black,urlcolor=blue]{hyperref} \newcommand*{\figref}[2][]{% \hyperref[{fig:#2}]{% Figure~\ref*{fig:#2}% \ifx\\#1\\% \else \,#1% \fi }% } \begin{document} %\hypersetup{linkcolor=blue} \hypersetup{linkcolor=[rgb]{0,0.5,0.73}}% <<<<<<<<<<<<<< \chapter{one} \begin{figure}[t] \missingfigure[figwidth=6cm]{- << Ciel, mon mari >> dit-elle !} \caption{a: Missing figure, and b: still missing figure.} \label{fig:missing Figure} \end{figure} The figure \figref{missing Figure} contains two subfigures. Something in \figref[a]{missing Figure} and some other thing in Figure \figref[b]{missing Figure}. \end{document} ```
1
https://tex.stackexchange.com/users/245790
687219
318,809
https://tex.stackexchange.com/questions/687224
0
Let's say I have a citation '[1]'. On clicking on '1', I would like to have a webpage pop up corresponding to the URL in the relevant bibtex entry. Also, I would like bibtex/biblatex to not generate the 'References' section. If the bibtex entry does not have a \url field, then pdflatex/bibtex should error out. I did fair research and did a bit of prompt engineering with ChatGPT as well but had no success. Help in this regard would be much appreciated.
https://tex.stackexchange.com/users/298073
How to create citations that link to external source directly?
true
If you are using `biblatex` this is as easy as modifying the `bibhyperref` field format to get the desired links and not issuing `\printbibliography` to drop the bibliography at the end. The following will link the citation to the DOI or URL if available and will error if neither DOI nor URL are available. ``` \documentclass[british]{article} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{csquotes} \usepackage[backend=biber, style=numeric]{biblatex} \usepackage{hyperref} \DeclareFieldFormat{bibhyperref}{% \iffieldundef{doi} {\iffieldundef{url} {\PackageError{biblatex} {No URL/DOI for entry \thefield{entrykey}} {I won't be able to link this entry properly.}% #1} {\href{\thefield{url}}{#1}}} {\href{https://doi.org/\thefield{doi}}{#1}}} \addbibresource{biblatex-examples.bib} \begin{document} Lorem \autocite{sigfridsson} (DOI) ipsum \autocite{ctan} (URL) dolor \autocite{worman} (no link) \end{document} ```
2
https://tex.stackexchange.com/users/35864
687226
318,813
https://tex.stackexchange.com/questions/687202
0
Is it possible to have one master .cls file in Overleaf that works across different projects? For example, if I make a change in the .cls file while working in one project, it will be updated in all of the other projects that use that .cls file? I know that I could import the .cls file from another project, but I cannot update it within the project that has imported it.
https://tex.stackexchange.com/users/284284
Using one .cls file in Overleaf for multiple projects
true
You can share files across projects in Overleaf using the **New File** > **From another project** option as described here: <https://www.overleaf.com/learn/how-to/Can_I_share_files_(e.g._.bib_and_some_graphics)_across_my_projects%3F> The file appears as a read-only file in the target project. Changes to the file in the original can be pulled in to the projects it is shared with by pressing the Refresh button in the file. If you need the (now different) .cls files to be edited in each project, then an option would be to create a project that you use as a template when starting other projects. Copy the original source project to make new projects: <https://www.overleaf.com/learn/how-to/Copying_a_project> As mentioned in the comments, questions like this are best sent to Overleaf support. You can reach them here: <https://www.overleaf.com/contact> or via support@overleaf.com.
1
https://tex.stackexchange.com/users/205904
687228
318,815
https://tex.stackexchange.com/questions/686246
11
How can I create enumerated lists, but without breaking flow if we split it by another article/section/chapter? Example output I want to achieve: ``` # Article I ## Section 1 - something 1. something 2. something ## Section 2 - something 3. something 4. something ## Section 3 - something 5 something 6. something # Article II ## Section 1 - something 7. something 8. something ## Section 2 - something 9. something 10. something ## Section 3 - something 11. something 12. something ``` Currently I got an idea as below, but it's far from what I'd like to achieve, because for maintenance I'd also have to manually properly count and the list of elements isn't continuous. ``` \begin{document} \section*{Article I} \section{Section 1 - something} \begin{enumerate} \item something \item something \end{enumerate} \section{Section 2 - something} \begin{enumerate} \item something \item something \end{enumerate} \section{Section 3 - something} \begin{enumerate} \item something \item something \end{enumerate} \section*{Article II} \section{Section 1 - something} \begin{enumerate} \item something \item something \end{enumerate} \section{Section 2 - something} \begin{enumerate} \item something \item something \end{enumerate} \section{Section 3 - something} \begin{enumerate} \item something \item something \end{enumerate} \end{document} ```
https://tex.stackexchange.com/users/286163
How do we create a "continuous" list enumeration in LaTeX?
false
Intentionally or not, your "example output" is a source markdown text. So one simple way is just compile "as is" the supposed output with quarto in PDF format (via LaTeX). In markdown, only the first number of each list is relevant, so that a sequence of items as "3,7,9" will be renumbered automatically to "3,4,5", so in one hand you have the extreme simplicity of the format but on the other that is up to you fix manually the first number of each sub-list. ``` --- format: pdf --- # Article I ## Section 1 - something 1. something 2. something ## Section 2 - something 3. something 4. something ... ``` OK, the headers are not as in your LaTeX version but only not numbered sections and subsections, this this can be changed easily in this way: ``` --- format: pdf number-sections: true --- # Article I {.unnumbered} # Section 1 - something etc. ``` If this is not a option anyway (you do not want use markdown and/or fix manually the first item) another option is LaTeX using `linguex` and use an alternative `\item` command (`\ex.`) but avoiding the annoying enumerate environments. In this simplified syntax, however the item must end with an explicit paragraph break (i.e., with a blank line, or `\par`, that I personally prefer to avoid mistakes and code less scattered). This is confusing at first because people often leave blank lines among items *but* is also correct type items in contiguous lines (as you have done) or even is the same line (e.g.`\item foo \item bah` that fortunately is usually avoided for the sake of code readability) but with linguex you must be careful not to remove a blank line between items. In spite of this, is not easier type the following example? ``` \documentclass{article} \usepackage{linguex} % optional: \renewcommand{\ExLBr}{} \renewcommand{\ExRBr}{.} \AtBeginDocument{\renewcommand\Exindent{2em}} \begin{document} \section*{Article I} \section{Section 1 - something} % end items with \par (= blank line) is mandatory !!! \ex. something \ex. something \section{Section 2 - something} % More compact syntax were you "see" the blank lines \ex. something \par \ex. something \par \section*{Article II} \section{Section 1 - something} \ex. something \par \ex. something \par Some text not in the list \ex. something \par\ex. something \par \end{document} ```
0
https://tex.stackexchange.com/users/11604
687239
318,821
https://tex.stackexchange.com/questions/529900
1
I'm trying to insert Arabic words within English text, I have downloaded the template from the journal site below: <https://journals.ieeeauthorcenter.ieee.org/create-your-ieee-journal-article/authoring-tools-and-templates/ieee-article-templates/templates-for-ieee-access/> ``` \documentclass{ieeeaccess} \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} ``` I get the below error when I trying to insert Arabic words: ``` ! Package inputenc Error: Unicode character ش (U+0634) ``` I have read an article recommended to use : ``` \usepackage[arabic,USenglish]{babel} ``` When I call "\usepackage[arabic,USenglish]{babel}" , I get more than 20 errors, :( ``` \documentclass{ieeeaccess} \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[arabic,USenglish]{babel} ``` Errors list : ``` ! Undefined control sequence. \thesubsection ... \c@section .\number \c@chapter }\protect \else \protect \... l.452 \subsection{Copyright Form} 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. ! Missing number, treated as zero. <to be read again> } l.452 \subsection{Copyright Form} A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.) ! Undefined control sequence. \thesubsection ...ect \textLR {\number \c@chapter .\number \c@section .\numb... l.452 \subsection{Copyright Form} 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. ! Missing number, treated as zero. <to be read again> . l.452 \subsection{Copyright Form} A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.) ! Undefined control sequence. \thesubsection ... \c@section .\number \c@chapter }\protect \else \protect \... l.452 \subsection{Copyright Form} 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. ! Missing number, treated as zero. <to be read again> } l.452 \subsection{Copyright Form} A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.) ! Undefined control sequence. \thesubsection ...ect \textLR {\number \c@chapter .\number \c@section .\numb... l.452 \subsection{Copyright Form} 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. ! Missing number, treated as zero. <to be read again> . l.452 \subsection{Copyright Form} A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird error' in the index to The TeXbook.) ```
https://tex.stackexchange.com/users/207757
Conflict IEEE Access template with Arabic language
false
Use the arabtex package with the utf8 package and encoding ``` \usepackage{arabtex} \usepackage{utf8} \setcode{utf8} ``` Then you can simply input Arabic text between `\RL{}` like `\RL{مرحبا}`
0
https://tex.stackexchange.com/users/294333
687241
318,822
https://tex.stackexchange.com/questions/565040
4
This is maybe a bit of a crazy question, and I hope it's not off topic, but: I find myself using tikz more and more, but the manual is a >1000 page pdf file. For me personally (I'm sure others have different experiences), the need to read it off a screen makes it very hard to navigate. So my question is simply, is it possible to obtain a bound paper copy of the tikz/pgf manual at a reasonable price? Printing it all myself isn't feasible, but I'd be quite happy to pay for it in a book format. I had a look on Amazon in case anyone was offering it as a print-on-demand book, but I didn't find anything that looked promising. I would need a service that can deliver to Japan, but if there are answers that are specific to other countries, they might be helpful to others.
https://tex.stackexchange.com/users/12461
Bound copy of tikz manual
false
This is a self-answer, just to point out that nowadays there is an (unofficial) online version of the tikz manual, at <https://tikz.dev>. Either this didn't exist when I asked this question or I didn't know about it, but I find it much easier to search and navigate than the pdf, and that greatly reduces my desire for a hardcopy.
2
https://tex.stackexchange.com/users/12461
687259
318,830
https://tex.stackexchange.com/questions/687273
1
I was compiling my main.tex file fine with latexmk using `latexmk -xelatex -outdir=output -auxdir=auxil main.tex` Until suddenly latexmk stopped detecting the options i gave it: ``` (venv) PS C:\Users\user\PycharmProjects\test2\src> latexmk -xelatex -outdir=output -auxdir=auxil main.tex Usage ===== latexmk [options] [filename] latexmk: error: no such option: -x ``` Moreover: Latexmk does the same with any first passed option that is longer than 1 character: ``` (venv) PS C:\Users\user\PycharmProjects\test2\src> latexmk -outdir=output -auxdir=auxil main.tex Usage ===== latexmk [options] [filename] latexmk: error: no such option: -o ``` The error does not come from `xelatex` because I can run it separately and it works fine but as I can't use `latexmk` I have to manually compile my `main.tex` several times. I have checked the version of latexmk and it says: ``` (venv) PS C:\Users\user\PycharmProjects\test2\src> latexmk --version latexmk 0.4 ``` I finally uninstalled and reinstalled the latexmk module from my computer but it didn't change anything. I have been looking for similar problems online but I can't seem to find one.
https://tex.stackexchange.com/users/297341
I can't have latexmk detecting the options I give it
true
tl;dr : there was a conflict between latexmk and latexmk.py Thank you @daleif for your comment, I checked my latexmk version because i updated it several times and it seemed wierd to me that is was outdated and my version was in fact 4.80 on MikTex. I then typed `latexmk -h` to obtain help and it showed me that it was the python version of latexmk and this package was effectively in version 0.4. So I checked in my PyCharm pip (I am using PyCharm for my project) and the module wasn't detected. I had to use the Windows shell and not the PyCharm terminal to uninstall it and then when I tried to check latexmk's version I finally got: ``` (venv) PS C:\Users\user\PycharmProjects\test2\src> latexmk --version Initial Win CP for (console input, console output, system): (CP850, CP65001, CP1252) I changed them all to CP1252 Latexmk, John Collins, 4 Apr. 2023. Version 4.80 Reverting Windows console CPs to (in,out) = (850,65001) ``` Finally telling me that I am using the Perl (and original) version of Latexmk Edit: And most Importantly, the compilation works now !
1
https://tex.stackexchange.com/users/297341
687275
318,837
https://tex.stackexchange.com/questions/685390
0
I have the following table, and I can't seem to get it to distribute evenly to columns. What would be the easiest way to do this? Other problems seem to suggest `p{( 1/# of cols )\linewidth}` , but this doesn't seem to work for me ``` \begin{table}[t] \begin{tabular}{p{0.14\linewidth}|p{0.14\linewidth}p{0.14\linewidth}|p{0.14\linewidth}p{0.14\linewidth}|p{0.14\linewidth}p{0.14\linewidth}} % some data that's very long \end{tabular} \end{table} ``` For some reason, .14, which is approximately 1/7, is far too short of line width and .15 is also too short. Is there any automatic way to scale this? This is in the CVPR 2022 Paper Template, for reference.
https://tex.stackexchange.com/users/296771
Equally distribute line width to table columns with wrap
false
You need to take into account also the padding between columns. ``` \documentclass{article} \usepackage{array}% recommended \usepackage{tabularx}% for the second realization \usepackage{showframe}% for showing the page boundaries \newlength{\mycolwd} \begin{document} \begin{table}[htp] % we want 7 columns, so we subtract twelve \tabcolsep % and 3 rule widths from the column width % and divide by seven \setlength{\mycolwd}{% \dimexpr(\columnwidth-12\tabcolsep-3\arrayrulewidth)/7\relax } \begin{tabular}{ @{}% no padding at the left p{\mycolwd}|p{\mycolwd} p{\mycolwd}|p{\mycolwd} p{\mycolwd}|p{\mycolwd} p{\mycolwd} @{}% no padding at the right } aa b c dd eee f & aa b c dd eee f & aa b c dd eee f & aa b c dd eee f & aa b c dd eee f & aa b c dd eee f & aa b c dd eee f \\ \end{tabular} \caption{First way} \end{table} \begin{table}[htp] \begin{tabularx}{\columnwidth}{ @{}% no padding at the left X|X X|X X|X X @{}% no padding at the right } aa b c dd eee f & aa b c dd eee f & aa b c dd eee f & aa b c dd eee f & aa b c dd eee f & aa b c dd eee f & aa b c dd eee f \\ \end{tabularx} \caption{Second way} \end{table} \end{document} ``` You see that the second way needs no computation.
0
https://tex.stackexchange.com/users/4427
687278
318,838
https://tex.stackexchange.com/questions/687020
6
I have been trying to subscribe to the ConTeXt user mailing list (ntg-context@ntg.nl) for two weeks now. However, there is no response from the list admin. The latest entries in the list archive date back to April '23. Is the list still being actively maintained?
https://tex.stackexchange.com/users/245694
ConTeXt mailing list subscription
true
The last system upgrade broke the mailman installation on the server, and it is only slowly coming back to life.
8
https://tex.stackexchange.com/users/89
687280
318,840
https://tex.stackexchange.com/questions/687288
0
I'd like to have landscape (tcolorbox) floats, and the naive way of doing them with `afterpage` and `pdflscape` [does not really work](https://tex.stackexchange.com/questions/686832/tcolorbox-unbroken-box-prevents-next-breakable-box-from-breaking). While I did get the result I wanted for print, I would also like to have the landscape pages rotated in the PDF just like with `pdflscape`. Since all my landscape figures will be on float pages, I use `\iffloatpage`, but this is not enough because I have other portrait figures that should not be rotated. The only solution I can see would be adding a ref for each landscape float page, and then at the beginning of each page, check if the page of the ref is the current page, and if so, rotate the page. But that seems very complicated. Surely, there is a simpler way of knowing whether the float is a landscape float or not. Another potential solution would be to simply assume that all landscape floats will be immediately after the current page, i.e. store the current page number in a counter, and at the beginning of each new page, rotate the page and decrement the counter, until the counter reaches 0. The problem is that if there are already portrait floats waiting, this might not rotate the right pages. ``` \documentclass[10pt,a4paper]{scrarticle} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{xparse} \usepackage[most]{tcolorbox} \usepackage{atbegshi} \usepackage{fancyhdr} \begin{document} \NewDocumentCommand{\setpdfrotation}{m}{ \global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate #1} } \tcbset{ enhanced, breakable } \tcbset{ landscapefloat/.style={ float=p, width=\textheight, tikz={rotate=90,transform shape}, break at=\textwidth } } \AtBeginShipout{% \AtBeginShipoutAddToBox{% \iffloatpage{\setpdfrotation{90}}{}% }% } \begin{tcolorbox}[title={Landscape figure}, landscapefloat]% \textcolor{yellow}{\rule{15cm}{5cm}}\\ \textcolor{orange}{\rule{15cm}{5cm}}\\ \textcolor{red}{\rule{15cm}{5cm}}\\ \textcolor{purple}{\rule{15cm}{5cm}}\\ \textcolor{blue}{\rule{15cm}{5cm}}\\ \textcolor{green}{\rule{15cm}{5cm}} \end{tcolorbox} Some text \begin{tcolorbox}[title={Portrait figure}, float=p]% This should not be rotated. \end{tcolorbox} \end{document} ```
https://tex.stackexchange.com/users/82912
Landscape (tcolorbox) floats
false
Using [this answer](https://tex.stackexchange.com/questions/471472/how-to-make-figures-appear-landscape-properly/472608#472608) by Ulrike Fischer, I got something that seems to work: ``` \documentclass[10pt,a4paper]{scrarticle} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[most]{tcolorbox} \usepackage{fancyhdr} \usepackage{pdflscape} \usepackage{eso-pic,zref-user} \begin{document} \newcounter{cntsideways} \makeatletter \newcommand\rotatesidewayslabel{\stepcounter{cntsideways}% \zlabel{tmp\thecntsideways}\zlabel{rotate\zref@extractdefault{tmp\thecntsideways}{page}{0}}} \AddToShipoutPictureBG{% \ifnum\zref@extractdefault{rotate\number\value{page}}{page}{0}=0% \PLS@RemoveRotate% \else % \PLS@AddRotate{90}% \fi% } \makeatother \tcbset{ enhanced, breakable } \tcbset{ landscapefloat/.style={ float=p, width=\textheight, tikz={rotate=90,transform shape}, break at=\textwidth, every float={\rotatesidewayslabel} } } \begin{tcolorbox}[title={Landscape figure}, landscapefloat]% \textcolor{yellow}{\rule{15cm}{5cm}}\\ \textcolor{orange}{\rule{15cm}{5cm}}\\ \textcolor{red}{\rule{15cm}{5cm}}\\ \textcolor{purple}{\rule{15cm}{5cm}}\\ \textcolor{blue}{\rule{15cm}{5cm}}\\ \textcolor{green}{\rule{15cm}{5cm}} \end{tcolorbox} Some text \begin{tcolorbox}[title={Portrait figure}, float=p]% This should not be rotated. \end{tcolorbox} \end{document} ```
0
https://tex.stackexchange.com/users/82912
687290
318,844
https://tex.stackexchange.com/questions/687291
2
I would like to create root symbols that have certain letters in them both from the TIPA package (for IPA symbols) but also letters like š. However, whenever I enter the respective codes for the forms into the maths environments, they are changed or displayed incorrectly (e.g. not italicised). Is there a way to incorporate `\usepackage{tipa}` into the math-mode(s) please? Ultimately, it would be great to have roots like `$\sqrt{\textglotstop\v{s}r}$` displayed correctly. Edit: I would also like to have commands such as \textsubdot{} and the following more complicated sign ḫ italicised in mathmode: ``` \DeclareSymbolFont{tipa}{T3}{cmr}{m}{sl} \SetSymbolFont{tipa}{bold}{T3}{cmr}{bx}{sl} \DeclareMathSymbol{\mathrtails}{\mathord}{tipa}{249} \DeclareMathSymbol{\mathsci}{\mathord}{tipa}{73} \newcommand{\its}{{\mathsci\mathrtails}} \makeatletter \renewcommand*\U[1]{\oalign{#1\crcr\hidewidth\ltx@sh@ft{-3ex}% \vbox to .2ex{\hbox{\u{}}\vss}\hidewidth}} ```
https://tex.stackexchange.com/users/270897
Incorporating TIPA-symbols into math mode
false
You can define a math symbol font. Look in `t3enc.def` for other glyphs to be used as math symbols. But never use `\v` or other text accents in math mode; the math accent corresponding to `\v` is `\check`. ``` \documentclass{article} \DeclareFontFamily{U}{tipa}{} \DeclareFontShape{U}{tipa}{m}{sl}{ <-8.5> tipasl8 <8.5-9.5> tipasl9 <9.5-11> tipasl10 <11-> tipasl12 }{} \DeclareSymbolFont{tipa}{U}{tipa}{m}{sl} \DeclareMathSymbol{\mathglotstop}{\mathord}{tipa}{80} \begin{document} $\mathglotstop\check{s}r$ \end{document} ``` Extended coverage. ``` \documentclass{article} \usepackage{accents} \DeclareFontFamily{U}{tipa}{} \DeclareFontShape{U}{tipa}{m}{sl}{ <-8.5> tipasl8 <8.5-9.5> tipasl9 <9.5-11> tipasl10 <11-> tipasl12 }{} \DeclareSymbolFont{tipa}{U}{tipa}{m}{sl} \DeclareMathSymbol{\mathglotstop}{\mathord}{tipa}{80} \DeclareMathSymbol{\mathrtails}{\mathord}{tipa}{249} \DeclareMathSymbol{\mathsci}{\mathord}{tipa}{73} \newcommand{\subdot}[1]{\underaccent{\dot}{#1}} \newcommand{\subbreve}[1]{\underaccent{\breve}{#1}} \newcommand{\its}{{\mathsci\mathrtails}} \begin{document} $\mathglotstop\check{s}r \mathrtails \subdot{x} \subbreve{h} \mathsci \its$ \end{document} ```
4
https://tex.stackexchange.com/users/4427
687295
318,847
https://tex.stackexchange.com/questions/687288
0
I'd like to have landscape (tcolorbox) floats, and the naive way of doing them with `afterpage` and `pdflscape` [does not really work](https://tex.stackexchange.com/questions/686832/tcolorbox-unbroken-box-prevents-next-breakable-box-from-breaking). While I did get the result I wanted for print, I would also like to have the landscape pages rotated in the PDF just like with `pdflscape`. Since all my landscape figures will be on float pages, I use `\iffloatpage`, but this is not enough because I have other portrait figures that should not be rotated. The only solution I can see would be adding a ref for each landscape float page, and then at the beginning of each page, check if the page of the ref is the current page, and if so, rotate the page. But that seems very complicated. Surely, there is a simpler way of knowing whether the float is a landscape float or not. Another potential solution would be to simply assume that all landscape floats will be immediately after the current page, i.e. store the current page number in a counter, and at the beginning of each new page, rotate the page and decrement the counter, until the counter reaches 0. The problem is that if there are already portrait floats waiting, this might not rotate the right pages. ``` \documentclass[10pt,a4paper]{scrarticle} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{xparse} \usepackage[most]{tcolorbox} \usepackage{atbegshi} \usepackage{fancyhdr} \begin{document} \NewDocumentCommand{\setpdfrotation}{m}{ \global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate #1} } \tcbset{ enhanced, breakable } \tcbset{ landscapefloat/.style={ float=p, width=\textheight, tikz={rotate=90,transform shape}, break at=\textwidth } } \AtBeginShipout{% \AtBeginShipoutAddToBox{% \iffloatpage{\setpdfrotation{90}}{}% }% } \begin{tcolorbox}[title={Landscape figure}, landscapefloat]% \textcolor{yellow}{\rule{15cm}{5cm}}\\ \textcolor{orange}{\rule{15cm}{5cm}}\\ \textcolor{red}{\rule{15cm}{5cm}}\\ \textcolor{purple}{\rule{15cm}{5cm}}\\ \textcolor{blue}{\rule{15cm}{5cm}}\\ \textcolor{green}{\rule{15cm}{5cm}} \end{tcolorbox} Some text \begin{tcolorbox}[title={Portrait figure}, float=p]% This should not be rotated. \end{tcolorbox} \end{document} ```
https://tex.stackexchange.com/users/82912
Landscape (tcolorbox) floats
true
With the pdfmanagement (that you load with `\DocumentMetadata`) you can place a rotation "on this page". I use the watermark key to smuggle it on every part of your box: ``` \DocumentMetadata{} \documentclass[10pt,a4paper]{scrarticle} \usepackage[T1]{fontenc} \usepackage[most]{tcolorbox} \usepackage{fancyhdr} \ExplSyntaxOn \NewDocumentCommand{\setpdfrotation}{}{\pdfmanagement_add:nnn{ThisPage}{Rotate}{90}} \ExplSyntaxOff \begin{document} \tcbset{ enhanced, breakable } \tcbset{ landscapefloat/.style={ float=p, width=\textheight, tikz={rotate=90,transform shape}, break at=\textwidth, watermark text={\setpdfrotation} } } \begin{tcolorbox}[title={Landscape figure}, landscapefloat]% \textcolor{yellow}{\rule{15cm}{5cm}}\\ \textcolor{orange}{\rule{15cm}{5cm}}\\ \textcolor{red}{\rule{15cm}{5cm}}\\ \textcolor{purple}{\rule{15cm}{5cm}}\\ \textcolor{blue}{\rule{15cm}{5cm}}\\ \textcolor{green}{\rule{15cm}{5cm}} \end{tcolorbox} Some text \begin{tcolorbox}[title={Portrait figure}, float=p]% This should not be rotated. \end{tcolorbox} \end{document} ```
1
https://tex.stackexchange.com/users/2388
687296
318,848
https://tex.stackexchange.com/questions/680246
0
Using ``` \usepackage{cmsrb} \usepackage[OT2,T1]{fontenc} %better to use T1, but OT1 will also work \usepackage[serbian]{babel} ``` before `\begin{document}` and `\fontencoding{OT2}\selectfont` as first line after `\begin{document}`, I manage to obtain text in Serbian cyrilic but problems remain in Chapter names, captions, headers. Contents name is still in latin also. What to add to get full cyrilic text.
https://tex.stackexchange.com/users/293391
Problem with captions and titles in Serbian cyrilic
false
The solution is very simple, just use ``` \usepackage[T1,OT2]{fontenc} ``` instead of `\usepackage[OT2,T1]{fontenc}`. The last listed encoding will be the default, and that is basically the problem. The definition of the class commands such as the `\section` contains the command `\normalfont`, and that command will change the font encoding to the default encoding.
1
https://tex.stackexchange.com/users/185475
687298
318,849
https://tex.stackexchange.com/questions/394146
1
I have been looking for a good setup to create bilingual documents for a while, and have recently stumbled onto Markdown. I am running Linux. In Remarkable and Atom, I get Devanagari and German output, but the formatting is not to my pleasing. I am now trying to use Pandoc to get a Pdf output of the Markdown file, but the Devanagari is not showing. For example in the Markdown document, I type काम kām, but only kām shows up in the Pdf. This is the Pandoc line I enter in the terminal: ``` pandoc --latex-engine=xelatex -f markdown h1b.md -t latex -o h1b.pdf ``` And this is my Yaml header in the Markdown document: ``` --- toc: true fontsize: 12pt documentclass: article font: Noto Serif output: pdf_document: latex_engine: xelatex ... ``` I must be missing something, but am not sure what. I have tried not to change the default Pandoc Latex template, so if there is a solution where i need to add something to the Yaml code, that would be best. Edit: if someone has a Devanagari supported Pandoc template, that would also be nice. I am currently trying to make one.
https://tex.stackexchange.com/users/124523
Creating bilingual (german, devanagari (hindi, sanskrit)) pdf using markdown, pandoc and xelatex
false
Pandoc versions 2.15 and newer use babel instead of polyglossia with xelatex. Adapting the accepted answer: ``` --- fontsize: 12pt lang: de mainfont: Arial header-includes: - \babelfont[hindi]{rm}{Shobhika} --- [काम]{lang=hi} kām ```
2
https://tex.stackexchange.com/users/298129
687299
318,850
https://tex.stackexchange.com/questions/687294
1
I've heard that instead of `tabular` `tabularray` should be used. And I think it's right because classic table is glitching out when combined with row colors. But I absolutely cannot figure out how to use `tabularray`. In the code below I have provided main table created with `tabular`, and second table created with `tabularray`, which should be exact copy of the first one. Problem is that the secondary table doesn't look correctly, and doesn't even compile, because for reasons unknown `tabularray` does not support captions. At least not directly, I'm sure caption can be added, but this is also the thing that I can't do. ``` \documentclass{article} \usepackage{graphicx} \usepackage{xcolor,colortbl} \usepackage{multirow} \usepackage{hhline} \definecolor{rowcol}{rgb}{0.7, 0.7, 0.7} \usepackage{tabularray} \title{TEST2} \author{Anon} \date{May 2023} \begin{document} \maketitle \section{Introduction} %main table \begin{table}[!htbp] \large \begin{center} \begin{tabular}{ |>{\centering\arraybackslash}m{2cm}||c|c|c| } \hline \multirow{2}{*}{} & \multicolumn{3}{c|}{Description} \\ \hhline{~---} & 1 & 2 & 3 \\ \hline \hline \rowcolor{rowcol} A & 11 & 11 & 11 \\ \hline B & 12 & 11 & 12 \\ \hline \rowcolor{rowcol} C & 12 & 12 & 12 \\ \hline \end{tabular} \end{center} \caption{Caption} \label{tablelabel} \end{table} %table above remake \begin{table} \begin{tblr}{ hlines, vlines, colspec={X[l,m]|X[c,m] X[c,m] X[c,m]}, column{1}={font=\bfseries}, cell{1}{1,1} = {c=3}{c}, row{2}={bg=rowcol}, row{4}={bg=rowcol}, row{6}={bg=rowcol} } & Description \\ & 1 & 2 & 3 \\ A & 10 & 20 & 30 \\ B & 15 & 25 & 35 \\ C & 12 & 22 & 32 \\ \end{tblr} \caption{Table 2} \label{tablelabel2} \end{table} \end{document} ```
https://tex.stackexchange.com/users/289855
Creating advanced tables with tabularray
true
I cannot reproduce the problem with the caption you have and actually it should not matter whether you place a `tabular` or a `tabularray` inside a `table` together with a `\caption`. Anyways, this should be a proper remake of the original table (but with nicer gaps where the doubled cell borders meet): ``` \documentclass{article} \usepackage{xcolor} \usepackage{tabularray} \definecolor{rowcol}{rgb}{0.7, 0.7, 0.7} \begin{document} \begin{table} \centering \begin{tblr}{ colspec={ Q[c,m,wd=2cm] Q[c,m] Q[c,m] Q[c,m] }, cells={font=\large}, cell{1}{1}={r=2}{}, cell{1}{2}={c=3}{}, row{odd[3]}={bg=rowcol}, hline{1-Z}={1}{-}{leftpos=0, rightpos=0}, hline{3}={2}{-}{leftpos=0, rightpos=0}, vlines, vline{2}={2}{-}{}, } & Description \\ & 1 & 2 & 3 \\ A & 10 & 20 & 30 \\ B & 15 & 25 & 35 \\ C & 12 & 22 & 32 \\ \end{tblr} \caption{Caption} \label{tablelabel2} \end{table} \end{document} ``` Note that I replaced `hlines` by `hline{1-Z}={1}{-}{leftpos=0, rightpos=0}` to achieve the nicer gaps. Also, using `row{odd[3]}={bg=rowcol}`, you can set the background for all odd rows starting from row 3 in one go. And as suggested by Zarko, it is probably better to use `\centering` instead of a nested `center` environment.
2
https://tex.stackexchange.com/users/47927
687304
318,852
https://tex.stackexchange.com/questions/687313
0
I'm trying to fill an area above a curve and below a line, but I'm having trouble with the curve, a piece is not filling! Thanks! ``` \begin{tikzpicture} \draw[thick,<->](0,6.5) node[above]{$p$}--(0,0)--(6.5,0) node[right]{$Q$}; \draw(0,6)--(5,0) node[above right]{$D(p_t)$}; \draw(0,0) ..controls (4.3,1.5) and (6,6) .. (6,6) node[right]{$C(Q_t)$}; \draw[dashed] (0,2.05) node[left]{$p_t$}--(3.3,2.05)--(3.3,0)node[below]{$Q_t$}; \path[pattern=north east lines] (0,2.05)--(3.3,2.05)--(0,6); \path[pattern=north east lines] (0,2.05)--(3.3,2.05)--(0,0); \end{tikzpicture} ```
https://tex.stackexchange.com/users/298145
fill an area above a curve
true
I am unsure which part of the diagram you want to shade exactly. A straight-forward approach would be to use `\clip`: ``` \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \draw[thick, <->] (0,6.5) node[above] {$p$} -- (0,0) -- (6.5,0) node[right] {$Q$}; \draw (0,6) -- (5,0) node[above right]{$D(p_t)$}; \draw (0,0) .. controls (4.3,1.5) and (6,6) .. (6,6) node[right] {$C(Q_t)$}; \begin{scope} \clip (0,0) .. controls (4.3,1.5) and (6,6) .. (6,6) -- (0,6) -- cycle; \path[pattern=north east lines] (0,0) -- (5,0) -- (0,6) -- cycle; \end{scope} \draw[dashed] (0,2.05) node[left] {$p_t$} -- (3.3,2.05) -- (3.3,0) node[below] {$Q_t$}; \end{tikzpicture} \end{document} ``` For more flexibility and also to reduce repeated use of path, you could also make use of the `fillbetween` library provided by `pgfplots` (which also loads `tikz`): ``` \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{patterns, fillbetween} \begin{document} \begin{tikzpicture} \draw[thick, <->] (0,6.5) node[above] {$p$} -- (0,0) -- (6.5,0) node[right] {$Q$}; \draw (0,6) -- (5,0) node[above right]{$D(p_t)$}; \draw[name path=curve] (0,0) .. controls (4.3,1.5) and (6,6) .. (6,6) node[right] {$C(Q_t)$}; \draw[dashed, name path=segment] (0,2.05) node[left] {$p_t$} -- (3.3,2.05) -- (3.3,0) node[below] {$Q_t$}; \path[pattern=north east lines] (0,2.05) -- (3.3,2.05) -- (0,6) -- cycle; \fill[ pattern=north west lines, intersection segments={ of={curve and segment}, sequence={L1 -- R1[reverse]} } ] -- cycle; \end{tikzpicture} \end{document} ```
1
https://tex.stackexchange.com/users/47927
687316
318,857
https://tex.stackexchange.com/questions/398959
6
I have authored several books, class notes, papers, with many figures. All figures reside in the same Windows folder named \figures because they may be used in multiple documents. When I need to send an individual document to somebody, I'd like to zip the .tex file for that document together with the figures needed, not all figures in the \figures folder. How can I find out **automatically** what figures (filename.ext) are used/referenced in an individual .tex document. Currently, I have to search manually to find out what figures (filenames) are needed.
https://tex.stackexchange.com/users/26578
how to find out what figures are used/included in a latex file
false
Using a purely LaTeX solution you could use a wrapper around `\includegraphics` like so: ``` \documentclass{article} \usepackage{graphicx} \newwrite\figuresusedout \immediate\openout\figuresusedout=\jobname.figs% \NewDocumentCommand{\FigureUsedOut}{m}{% \immediate\write\figuresusedout{#1} } \NewDocumentCommand{\IncludeGraphics}{ O{} m }{% \includegraphics[#1]{#2}\FigureUsedOut{#2}% } \begin{document} \begin{figure}[t] \IncludeGraphics[width=0.1\textwidth]{./figures/red.png} \caption{Red} \end{figure} \begin{figure}[b] \IncludeGraphics[width=0.4\textwidth]{./figures/green.png} \caption{green} \end{figure} \end{document} ``` which produces this: using these images in a subdirectory called `./figures/`: `green.png`: `purple.png`: `red.png`: This produces an output file with extension `.figs` containing: ``` ./figures/red.png ./figures/green.png ``` There are probably a lot of better ways to do this, including with external programmes etc and improved recent packages but this works.
1
https://tex.stackexchange.com/users/273733
687325
318,861
https://tex.stackexchange.com/questions/398959
6
I have authored several books, class notes, papers, with many figures. All figures reside in the same Windows folder named \figures because they may be used in multiple documents. When I need to send an individual document to somebody, I'd like to zip the .tex file for that document together with the figures needed, not all figures in the \figures folder. How can I find out **automatically** what figures (filename.ext) are used/referenced in an individual .tex document. Currently, I have to search manually to find out what figures (filenames) are needed.
https://tex.stackexchange.com/users/26578
how to find out what figures are used/included in a latex file
false
If you add the `\listfiles` command as the first command of your tex file (even before the `\documentclass`), then the log file will end by listing all of the files that it used. This will include all of the packages you loaded (and the packages they loaded, etc), but it will also include your figures.
1
https://tex.stackexchange.com/users/107497
687327
318,862
https://tex.stackexchange.com/questions/398959
6
I have authored several books, class notes, papers, with many figures. All figures reside in the same Windows folder named \figures because they may be used in multiple documents. When I need to send an individual document to somebody, I'd like to zip the .tex file for that document together with the figures needed, not all figures in the \figures folder. How can I find out **automatically** what figures (filename.ext) are used/referenced in an individual .tex document. Currently, I have to search manually to find out what figures (filenames) are needed.
https://tex.stackexchange.com/users/26578
how to find out what figures are used/included in a latex file
false
I am only simplifying the solution by @JamesT to be more minimal and avoid the need to change all `\includegraphics` commands... ``` \documentclass{article} \usepackage{graphicx} \newwrite\graphics \immediate\openout\graphics=\jobname.graphics% \let\oincludegraphics\includegraphics% store original \includegraphics \renewcommand{\includegraphics}[2][]{% prepend to it (could also use xpatch, etc.) \immediate\write\graphics{#2} \oincludegraphics[#1]{#2}} \begin{document} \includegraphics[width=0.4\textwidth]{example-image-a} \includegraphics[width=0.4\textwidth]{example-image-b} \end{document} ``` produces `\jobname.graphics` containing: ``` example-image-a example-image-b ``` You can also comment out `\newwrite ... \oincludegraphics[#1]{#2}}` to remove this thing.
1
https://tex.stackexchange.com/users/111678
687329
318,864
https://tex.stackexchange.com/questions/550937
1
I have an instruction-document from my university, which I need to sign with my signature and include at the beginning of my Latex-Document. As proposed here: <https://stackoverflow.com/questions/2739159/inserting-a-pdf-file-in-latex> I added `\includepdf[pages={-}]{instruction.pdf}` after the `\maketitle`. It loads the document just fine, but without my signature. In all pdf-viewers on my PC, as well as in LibreOffice Writer, it shows the file with my signature. But includepdf only loads the text without the signature image to my Latex document. How to handle this? **Edit:** I did covert the .pdf file to a .png and included that, even if it is now low resolution, thanks to converting, I got the signature in my document. Still wondering about the crazy behaviour of pdfpages.
https://tex.stackexchange.com/users/219060
pdfpages: \includepdf does load pdf file without signature image
false
As already said in the comments, this happens because iPadOS adds the scribbled content as annotations (which is quite useful IMO), and `pdfpages` seems to ignore those. Along the lines of [this answer](https://superuser.com/a/1762125/706075), here's a solution that helped me: 1. Open the PDF with the signature in a browser (**not** *Preview*!) 2. Try to print it from the browser, but instead of the printer, choose “Print to PDF” 3. When you click “Print”, it will download the PDF. The annotations will be flattened, and the signature will be seen in the final document
0
https://tex.stackexchange.com/users/181070
687332
318,865
https://tex.stackexchange.com/questions/8625
658
I have a problem when a lot of figures are in question. Some figures tend to "fly around", that is, be a paragraph below, although I placed them before that paragraph. I use code: ``` \begin{figure}[ht] \begin{center} \advance\leftskip-3cm \advance\rightskip-3cm \includegraphics[keepaspectratio=true,scale=0.6]{slike/visina8} \caption{} \label{visina8} \end{center}\end{figure} ``` to place my figures. How can I tell latex I REALLY want the figure in that specific place, no matter how much whitespace will be left?
https://tex.stackexchange.com/users/2755
Force figure placement in text
false
Using a minipage for each section (one for text, then another for the image, then another for the following text) can be useful.
0
https://tex.stackexchange.com/users/294859
687336
318,866
https://tex.stackexchange.com/questions/542201
3
I have downloaded the source file from this arxiv article: <https://arxiv.org/abs/2002.12693> which has name 2002.12693 without any extension. I added extention tar.gz and ran "tar -xvzf 2002.12693.tar.gz" I get "tar: Error opening archive: Unrecognized archive format". Neither unzip nor gunzip works. Any suggestion? I see this question [Compiling ArXiv source code of articles with images](https://tex.stackexchange.com/questions/504640/compiling-arxiv-source-code-of-articles-with-images/542189#542189) suggesting what I already did, but it doesn't work for me.
https://tex.stackexchange.com/users/214619
Problem with unzipping arxiv source file
false
You can directly add an extension of `.zip` and then unzip.
0
https://tex.stackexchange.com/users/242878
687339
318,868
https://tex.stackexchange.com/questions/687335
0
I want to use the latest pgfplots, in this case v1.18, but apparently, only v1.15 is used judging from the log file as ``` ) (pgfplots.sty (pgfplots.revision.tex) Package: pgfplots 2017/06/05 v1.15 Data Visualization (1.15) ``` Referring to [this post](https://tex.stackexchange.com/questions/97743/updating-pgfplots), I tried editing one statement in `/usr/local/texlive/2023/texmf.cnf` as ``` TEXMFHOME = ~/Library/texmf, /Users/(my name)/Downloads/pgfplots % ^ /Users/... has been added, which is where pgfplots 1.18 exists at the moment. ``` However, the log file was still the same. I also tried ``` $ sudo tlmgr update pgfplots Password: tlmgr: package repository https://ftp.yz.yamagata-u.ac.jp/pub/CTAN/systems/texlive/tlnet (verified) tlmgr: saving backups to /usr/local/texlive/2023/tlpkg/backups tlmgr: no updates available ``` which, as the message suggests, made no diffrence. What can I do to use v1.18? One possibility is that v1.18 is not correctly installed, but I don't know how to. My environment is ``` $ latex --version pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023) kpathsea version 6.3.5 Copyright 2023 Han The Thanh (pdfTeX) et al. There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Han The Thanh (pdfTeX) et al. Compiled with libpng 1.6.39; using libpng 1.6.39 Compiled with zlib 1.2.13; using zlib 1.2.13 Compiled with xpdf version 4.04 ``` **Update 1** I am using Mac OS, and I've got the following output in response the comment. And I am aware that these are the directories of v1.15, notv1.18. ``` $ kpsewhich pgfplots.sty /usr/local/texlive/2023/texmf-dist/tex/latex/pgfplots/pgfplots.sty $ kpsewhich pgfplots.revision.tex /usr/local/texlive/2023/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex ``` pgfplots.sty exists in two directories. **Update 2** The log I get from `\documentclass{article} \usepackage{pgfplots} \begin{document} \end{document}` is as follows. ``` This is TexpadTeX (based on TeX Version 3.14159265 with e-TeX extensions) running in extended mode embedded in Texpad 760 (preloaded format=latex 2021.3.29) 2 JUN 2023 16:28 ** (root.tex LaTeX2e <2017-04-15> Babel <3.16> and hyphenation patterns for 84 language(s) loaded. (article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (size10.clo File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) ) \c@part=\count79 \c@section=\count80 \c@subsection=\count81 \c@subsubsection=\count82 \c@paragraph=\count83 \c@subparagraph=\count84 \c@figure=\count85 \c@table=\count86 \abovecaptionskip=\skip41 \belowcaptionskip=\skip42 \bibindent=\dimen102 ) (pgfplots.sty (pgfplots.revision.tex) Package: pgfplots 2017/06/05 v1.15 Data Visualization (1.15) (graphicx.sty Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR) (keyval.sty Package: keyval 2014/10/28 v1.15 key=value parser (DPC) \KV@toks@=\toks14 ) (graphics.sty Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR) (trig.sty Package: trig 2016/01/03 v1.10 sin cos tan (DPC) ) (graphics.cfg File: graphics.cfg 2018/05/3 Graphics configuration of TexpadTeX ) Package graphics Info: Driver file: texpadtex.def on input line 99. (texpadtex.def File: texpadtex.def 2017/10/21 v2.0 )) \Gin@req@height=\dimen103 \Gin@req@width=\dimen104 ) (tikz.sty (pgf.sty (pgfrcs.sty (pgfutil-common.tex \pgfutil@everybye=\toks15 \pgfutil@tempdima=\dimen105 \pgfutil@tempdimb=\dimen106 (pgfutil-common-lists.tex)) (pgfutil-latex.def \pgfutil@abb=\box26 (everyshi.sty Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS) )) (pgfrcs.code.tex Package: pgfrcs 2015/08/07 v3.0.1a (rcs-revision 1.31) )) Package: pgf 2015/08/07 v3.0.1a (rcs-revision 1.15) (pgfcore.sty (pgfsys.sty (pgfsys.code.tex Package: pgfsys 2014/07/09 v3.0.1a (rcs-revision 1.48) (pgfkeys.code.tex \pgfkeys@pathtoks=\toks16 \pgfkeys@temptoks=\toks17 (pgfkeysfiltered.code.tex \pgfkeys@tmptoks=\toks18 )) \pgf@x=\dimen107 \pgf@y=\dimen108 \pgf@xa=\dimen109 \pgf@ya=\dimen110 \pgf@xb=\dimen111 \pgf@yb=\dimen112 \pgf@xc=\dimen113 \pgf@yc=\dimen114 \w@pgf@writea=\write3 \r@pgf@reada=\read1 \c@pgf@counta=\count87 \c@pgf@countb=\count88 \c@pgf@countc=\count89 \c@pgf@countd=\count90 \t@pgf@toka=\toks19 \t@pgf@tokb=\toks20 \t@pgf@tokc=\toks21 (pgf.cfg File: pgf.cfg 2008/05/14 (rcs-revision 1.7) ) Driver file for pgf: pgfsys-texpadtex.def (pgfsys-texpadtex.def)) (pgfsyssoftpath.code.tex File: pgfsyssoftpath.code.tex 2013/09/09 (rcs-revision 1.9) \pgfsyssoftpath@smallbuffer@items=\count91 \pgfsyssoftpath@bigbuffer@items=\count92 ) (pgfsysprotocol.code.tex File: pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4) )) (xcolor.sty Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK) (color.cfg File: color.cfg 2018/05/3 Graphics configuration of TexpadTeX ) Package xcolor Info: Driver file: texpadtex.def on input line 225. Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348. Package xcolor Info: Model `RGB' extended on input line 1364. Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366. Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367. Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368. Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369. Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370. Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371. ) (pgfcore.code.tex Package: pgfcore 2010/04/11 v3.0.1a (rcs-revision 1.7) (pgfmath.code.tex (pgfmathcalc.code.tex (pgfmathutil.code.tex) (pgfmathparser.code.tex \pgfmath@dimen=\dimen115 \pgfmath@count=\count93 \pgfmath@box=\box27 \pgfmath@toks=\toks22 \pgfmath@stack@operand=\toks23 \pgfmath@stack@operation=\toks24 ) (pgfmathfunctions.code.tex (pgfmathfunctions.basic.code.tex) (pgfmathfunctions.trigonometric.code.tex) (pgfmathfunctions.random.code.tex) (pgfmathfunctions.comparison.code.tex) (pgfmathfunctions.base.code.tex) (pgfmathfunctions.round.code.tex) (pgfmathfunctions.misc.code.tex) (pgfmathfunctions.integerarithmetics.code.tex))) (pgfmathfloat.code.tex \c@pgfmathroundto@lastzeros=\count94 )) (pgfcorepoints.code.tex File: pgfcorepoints.code.tex 2013/10/07 (rcs-revision 1.27) \pgf@picminx=\dimen116 \pgf@picmaxx=\dimen117 \pgf@picminy=\dimen118 \pgf@picmaxy=\dimen119 \pgf@pathminx=\dimen120 \pgf@pathmaxx=\dimen121 \pgf@pathminy=\dimen122 \pgf@pathmaxy=\dimen123 \pgf@xx=\dimen124 \pgf@xy=\dimen125 \pgf@yx=\dimen126 \pgf@yy=\dimen127 \pgf@zx=\dimen128 \pgf@zy=\dimen129 ) (pgfcorepathconstruct.code.tex File: pgfcorepathconstruct.code.tex 2013/10/07 (rcs-revision 1.29) \pgf@path@lastx=\dimen130 \pgf@path@lasty=\dimen131 ) (pgfcorepathusage.code.tex File: pgfcorepathusage.code.tex 2014/11/02 (rcs-revision 1.24) \pgf@shorten@end@additional=\dimen132 \pgf@shorten@start@additional=\dimen133 ) (pgfcorescopes.code.tex File: pgfcorescopes.code.tex 2015/05/08 (rcs-revision 1.46) \pgfpic=\box28 \pgf@hbox=\box29 \pgf@layerbox@main=\box30 \pgf@picture@serial@count=\count95 ) (pgfcoregraphicstate.code.tex File: pgfcoregraphicstate.code.tex 2014/11/02 (rcs-revision 1.12) \pgflinewidth=\dimen134 ) (pgfcoretransformations.code.tex File: pgfcoretransformations.code.tex 2015/08/07 (rcs-revision 1.20) \pgf@pt@x=\dimen135 \pgf@pt@y=\dimen136 \pgf@pt@temp=\dimen137 ) (pgfcorequick.code.tex File: pgfcorequick.code.tex 2008/10/09 (rcs-revision 1.3) ) (pgfcoreobjects.code.tex File: pgfcoreobjects.code.tex 2006/10/11 (rcs-revision 1.2) ) (pgfcorepathprocessing.code.tex File: pgfcorepathprocessing.code.tex 2013/09/09 (rcs-revision 1.9) ) (pgfcorearrows.code.tex File: pgfcorearrows.code.tex 2015/05/14 (rcs-revision 1.43) \pgfarrowsep=\dimen138 ) (pgfcoreshade.code.tex File: pgfcoreshade.code.tex 2013/07/15 (rcs-revision 1.15) \pgf@max=\dimen139 \pgf@sys@shading@range@num=\count96 ) (pgfcoreimage.code.tex File: pgfcoreimage.code.tex 2013/07/15 (rcs-revision 1.18) (pgfcoreexternal.code.tex File: pgfcoreexternal.code.tex 2014/07/09 (rcs-revision 1.21) \pgfexternal@startupbox=\box31 )) (pgfcorelayers.code.tex File: pgfcorelayers.code.tex 2013/07/18 (rcs-revision 1.7) ) (pgfcoretransparency.code.tex File: pgfcoretransparency.code.tex 2013/09/30 (rcs-revision 1.5) ) (pgfcorepatterns.code.tex File: pgfcorepatterns.code.tex 2013/11/07 (rcs-revision 1.5) ))) (pgfmoduleshapes.code.tex File: pgfmoduleshapes.code.tex 2014/03/21 (rcs-revision 1.35) \pgfnodeparttextbox=\box32 ) (pgfmoduleplot.code.tex File: pgfmoduleplot.code.tex 2015/08/03 (rcs-revision 1.13) ) (pgfcomp-version-0-65.sty Package: pgfcomp-version-0-65 2007/07/03 v3.0.1a (rcs-revision 1.7) \pgf@nodesepstart=\dimen140 \pgf@nodesepend=\dimen141 ) (pgfcomp-version-1-18.sty Package: pgfcomp-version-1-18 2007/07/23 v3.0.1a (rcs-revision 1.1) )) (pgffor.sty (pgfkeys.sty (pgfkeys.code.tex)) (pgfmath.sty (pgfmath.code.tex)) (pgffor.code.tex Package: pgffor 2013/12/13 v3.0.1a (rcs-revision 1.25) (pgfmath.code.tex) \pgffor@iter=\dimen142 \pgffor@skip=\dimen143 \pgffor@stack=\toks25 \pgffor@toks=\toks26 )) (tikz.code.tex Package: tikz 2015/08/07 v3.0.1a (rcs-revision 1.151) (pgflibraryplothandlers.code.tex File: pgflibraryplothandlers.code.tex 2013/08/31 v3.0.1a (rcs-revision 1.20) \pgf@plot@mark@count=\count97 \pgfplotmarksize=\dimen144 ) \tikz@lastx=\dimen145 \tikz@lasty=\dimen146 \tikz@lastxsaved=\dimen147 \tikz@lastysaved=\dimen148 \tikzleveldistance=\dimen149 \tikzsiblingdistance=\dimen150 \tikz@figbox=\box33 \tikz@figbox@bg=\box34 \tikz@tempbox=\box35 \tikz@tempbox@bg=\box36 \tikztreelevel=\count98 \tikznumberofchildren=\count99 \tikznumberofcurrentchild=\count100 \tikz@fig@count=\count101 (pgfmodulematrix.code.tex File: pgfmodulematrix.code.tex 2013/09/17 (rcs-revision 1.8) \pgfmatrixcurrentrow=\count102 \pgfmatrixcurrentcolumn=\count103 \pgf@matrix@numberofcolumns=\count104 ) \tikz@expandcount=\count105 (tikzlibrarytopaths.code.tex File: tikzlibrarytopaths.code.tex 2008/06/17 v3.0.1a (rcs-revision 1.2) ))) (pgfplots.code.tex (pgfplotscore.code.tex \t@pgfplots@toka=\toks27 \t@pgfplots@tokb=\toks28 \t@pgfplots@tokc=\toks29 \pgfplots@tmpa=\dimen151 \c@pgfplots@coordindex=\count106 \c@pgfplots@scanlineindex=\count107 (pgfplotssysgeneric.code.tex)) (pgfplotslibrary.code.tex) (pgfplotsoldpgfsupp_loader.code.tex (pgflibraryfpu.code.tex) Package pgfplots: loading complementary arithmetics for your pgf version... (pgfplotsoldpgfsupp_pgflibraryfpu.code.tex) (pgfplotsoldpgfsupp_pgfmathfloat.code.tex \c@pgfmathroundto@lastzeros=\count108 )) (pgfplotsutil.code.tex (pgfplotsliststructure.code.tex) (pgfplotsliststructureext.code.tex) (pgfplotsarray.code.tex \c@pgfplotsarray@tmp=\count109 ) (pgfplotsmatrix.code.tex) (pgfplotstableshared.code.tex \c@pgfplotstable@counta=\count110 \t@pgfplotstable@a=\toks30 ) (pgfplotsdeque.code.tex) (pgfplotsbinary.code.tex (pgfplotsbinary.data.code.tex)) (pgfplotsutil.verb.code.tex) (pgflibrarypgfplots.surfshading.code.tex \c@pgfplotslibrarysurf@no=\count111 )) (pgfplotscolormap.code.tex (pgfplotscolor.code.tex)) (pgfplotsstackedplots.code.tex) (pgfplotsplothandlers.code.tex (pgfplotsmeshplothandler.code.tex (pgfplotsmeshplotimage.code.tex))) (pgfplots.scaling.code.tex) (pgfplotscoordprocessing.code.tex) (pgfplots.errorbars.code.tex) (pgfplots.markers.code.tex) (pgfplotsticks.code.tex) (pgfplots.paths.code.tex) (tikzlibrarydecorations.code.tex (pgfmoduledecorations.code.tex \pgfdecoratedcompleteddistance=\dimen152 \pgfdecoratedremainingdistance=\dimen153 \pgfdecoratedinputsegmentcompleteddistance=\dimen154 \pgfdecoratedinputsegmentremainingdistance=\dimen155 \pgf@decorate@distancetomove=\dimen156 \pgf@decorate@repeatstate=\count112 \pgfdecorationsegmentamplitude=\dimen157 \pgfdecorationsegmentlength=\dimen158 ) \tikz@lib@dec@box=\box37 ) (tikzlibrarydecorations.pathmorphing.code.tex (pgflibrarydecorations.pathmorphing.code.tex)) (tikzlibrarydecorations.pathreplacing.code.tex (pgflibrarydecorations.pathreplacing.code.tex)) \pgfplots@numplots=\count113 \pgfplots@xmin@reg=\dimen159 \pgfplots@xmax@reg=\dimen160 \pgfplots@ymin@reg=\dimen161 \pgfplots@ymax@reg=\dimen162 \pgfplots@zmin@reg=\dimen163 \pgfplots@zmax@reg=\dimen164 ) (tikzlibraryplotmarks.code.tex File: tikzlibraryplotmarks.code.tex 2008/01/09 v3.0.1a (rcs-revision 1.1) (pgflibraryplotmarks.code.tex File: pgflibraryplotmarks.code.tex 2015/08/03 v3.0.1a (rcs-revision 1.14) ))) (root.aux) LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 1. LaTeX Font Info: ... okay on input line 1. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 1. LaTeX Font Info: ... okay on input line 1. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 1. LaTeX Font Info: ... okay on input line 1. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 1. LaTeX Font Info: ... okay on input line 1. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 1. LaTeX Font Info: ... okay on input line 1. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 1. LaTeX Font Info: ... okay on input line 1. ABD: EveryShipout initializing macros Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing \pgfplotsset{compat=1.15} into your preamble. on input line 1. (root.aux) ) No pages of output. ```
https://tex.stackexchange.com/users/293932
Using the latest version of pgfplots installed
false
Your log should show ``` (/usr/local/texlive/2023/texmf-dist/tex/latex/pgfplots/pgfplots.sty (/usr/local/texlive/2023/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex) Package: pgfplots 2021/05/15 v1.18.1 Data Visualization (1.18.1) ``` getting 1.18.1 from texlive. You show ``` ) (pgfplots.sty (pgfplots.revision.tex) Package: pgfplots 2017/06/05 v1.15 Data Visualization (1.15) ``` so you have an old copy in the current directory which you should delete to allow tex to find the updated installed copy. --- Actually following the full log being added to the question,the reaso full paths are not shown in the log is that you are not using your installed texlive 2023 system. You are using a 6 year old latex `LaTeX2e <2017-04-15>` from `TexpadTeX` which is a different tex implementation
3
https://tex.stackexchange.com/users/1090
687345
318,872
https://tex.stackexchange.com/questions/687347
2
I am creating slides and want to uncover text from a list in steps. To avoid having to number each \item (a pain when adding a line afterwords), I add \pause after lines that are unveiled in steps. Adding \uncover<+-> as advised instead of \onslide with pause, does not solve the problem. I would like to uncover the whole slide transparent at the beginning as a hint of things to come. If I do this with an initial line is only shown once the first part is visible. Any solutions? MWE: ``` \documentclass{beamer} \setbeamercovered{transparent} \begin{document} \begin{frame}{This is what I get with pause} \begin{itemize}[<+->] \item line 0 \item line 1a \uncover<+->{line 1b} \item line 2 (this line should be transparent from the start of the slide) \end{itemize} \end{frame} \end{document} ```
https://tex.stackexchange.com/users/296029
Transparent slides with \uncover command
true
The best way to solve any problems involving `\pause` is to not use this crude command. You can use `\uncover<+->{line 1b}` instead, which will create a new overlay and uncover `line 1b` there. The `[<+->]` option of your itemisation will take care of uncovering `line 2` on the appropriate slide. ``` \documentclass{beamer} \setbeamercovered{transparent} \begin{document} \begin{frame} \frametitle{This is what I get with pause} \begin{itemize}[<+->] \item line 1a \uncover<+->{line 1b} \item line 2 \end{itemize} \end{frame} \end{document} ``` --- For the case in the edited question: ``` \documentclass{beamer} \setbeamercovered{transparent} \begin{document} \begin{frame} \frametitle{This is what I get with pause} \begin{itemize}[<+->] \item line 0 \item line 1a \uncover<1-+(-2),+->{line 1b} \item line 2 (this line should be transparent from the start of the slide) \end{itemize} \end{frame} \end{document} ```
0
https://tex.stackexchange.com/users/36296
687348
318,873
https://tex.stackexchange.com/questions/124488
8
I'm trying to type set something like this "4 x 5 x 6 mm^2". The following command using the `siunitx` package does not generate what I want: ``` \SI{4 x 5 x 6}{mm^3} ``` Instead, it produces “4 mm^3 x 5 mm^3 x 6 mm^3". How do we correct this?
https://tex.stackexchange.com/users/23187
Multi-part numbers and units in siunitx
false
This does not work anymore (well, it did not work for me): see the solution to this problem in the post by Mico in [product-units mode with siunitx package](https://tex.stackexchange.com/questions/628813/product-units-mode-with-siunitx-package). To be more precise, you should write either `\qtyproduct[product-units=power]{4 x 5 x 6}{\milli\meter}` or `\qtyproduct[product-units=single]{4 x 5 x 6}{mm^3}`. But if the squared mm in your question is not a bug you must write `\qtyproduct[product-units=single]{4 x 5 x 6}{mm^2}`. (Note also that `\qtyproduct[product-units=power]{4 x 5 x 6}{mm}` will NOT work.)
0
https://tex.stackexchange.com/users/122479
687355
318,875
https://tex.stackexchange.com/questions/686407
0
I am writing the final version of my PhD thesis. Everything works fine except that the Glossary external file I created is completely ignored by the program. I am using Texstudio to compile it. The problem is that the Glossary is not even printed in the Index (Table of contents), and so it is not present in the pdf file. I attach here both the Glossary and main file. Any help is completely appreciated! ``` %\documentclass[paper=a4,twoside=true,fontsize=11pt,headings=normal,open=right,parskip=off,pagesize,DIV=14,BCOR=5mm,toc=bibliography,toc=listof]{scrbook} \documentclass[paper=a5,twoside=true,fontsize=10pt,headings=normal,open=right,parskip=off,pagesize,DIV=17,BCOR=5mm,toc=bibliography,toc=listof]{scrbook} \setlength{\voffset}{0pt} \addtolength{\voffset}{+0.1cm} \pdfminorversion=7 %\RedeclareSectionCommand[beforeskip=20pt,afterindent=false]{chapter} \RedeclareSectionCommand[beforeskip=20pt]{chapter} % Default beforeskip ca. 33pt \setkomafont{disposition}{\normalcolor\bfseries} \RedeclareSectionCommand[beforeskip=-.5\baselineskip,afterskip=.25\baselineskip]{subsubsection} \usepackage[utf8]{inputenc} %\usepackage[USenglish,ngerman]{babel} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{grffile} \usepackage{textcomp} %\usepackage{varioref} % \usepackage{enumitem} \usepackage{scrpage2} %\usepackage{scrlayer-scrpage} %\usepackage{subfig} \usepackage{subcaption} \usepackage{multirow} \usepackage{caption} %\usepackage{placeins} %\usepackage{wrapfig} \usepackage{graphicx} %\usepackage{epstopdf} %\usepackage{booktabs} %\usepackage{tabularx} \usepackage{amsmath} \usepackage{amssymb} %\usepackage{multido} \usepackage{rotating} \usepackage{threeparttable} \usepackage{tablefootnote} \usepackage{mathtools} \usepackage{mhchem} \usepackage{etoolbox} \hyphenation{Drück-schwankungen} \hyphenation{Hoch-ge-schwin-dig-keits-kamera} \hyphenation{Strah-lungs-bil-der} \DeclarePairedDelimiter\abs{\lvert}{\rvert} \setcounter{secnumdepth}{3} %\usepackage{blindtext} %\usepackage{natbib} \usepackage[intoc]{nomencl} %\usepackage[version=4]{mhchem} \usepackage{color} %\usepackage{siunitx} \usepackage{longtable,tabularx} \usepackage{footnote} \usepackage{enumitem} \usepackage[babel,german=quotes]{csquotes} %\usepackage[style=numeric-comp,sorting=nyt,backend=biber,minnames=4,maxnames=4,firstinits=true,defernumbers=true]{biblatex} \usepackage[bibstyle=numeric-comp2,citestyle=numeric-comp,sorting=nyt,backend=bibtex,minnames=4,maxnames=4,firstinits=true,defernumbers=true]{biblatex}\usepackage{xpatch} \addbibresource{Bibliography/bibliography5.bib} \addbibresource{Bilbiography/mypub.bib} \DefineBibliographyStrings{german}{andothers={et\addabbrvspace al\adddot}} \DefineBibliographyStrings{ngerman}{phdthesis = {Dissertation}} \renewcommand*{\mkbibnamelast}[1]{\textsc{#1}} \renewbibmacro{in:}{% \ifentrytype{article} {} {\printtext{\bibstring{in}\intitlepunct}}} \xpatchbibdriver{thesis}{\printfield{type}\newunit}{\printfield{type}\setunit*{\addcomma\space}}{}{} \usepackage[table,xcdraw]{xcolor} %\usepackage{tabto} \urlstyle{same} \DeclareFieldFormat[article]{title}{{#1}} \DeclareFieldFormat[thesis]{title}{{\textit{#1}}} \DeclareFieldFormat[inproceedings]{title}{{#1}} \DeclareFieldFormat[incollection]{title}{{#1}} \makenomenclature \includeonly{ %Frontmatter/title, Frontmatter/title_fin, Frontmatter/Decl, Frontmatter/Abstract, Frontmatter/Zitat, Frontmatter/Danksagung, Frontmatter/Glossary, Chapters/01Introduction, Chapters/02TheoreticalandExperimentalBackground, Chapters/03TAUcode, Chapters/04BKHSingleInjectorModelling, Chapters/05BKHColdFlowModelling, Chapters/06SMART, Chapters/07BKHFull, Chapters/08Conclusions, Chapters/Appendix, Chapters/ListofPublications, } \bibliography{Bibliography/bibliography5.bib} \begin{document} \frontmatter %\include{Frontmatter/title} \include{Frontmatter/title_fin} \include{Frontmatter/Decl} \include{Frontmatter/Abstract} \include{Frontmatter/Zitat} \include{Frontmatter/Danksagung} \tableofcontents \listoffigures \KOMAoptions{open=any} \listoftables \include{Frontmatter/Glossary} \mainmatter \begin{refsegment} \KOMAoptions{open=right} \include{Chapters/01Introduction} \include{Chapters/02TheoreticalandExperimentalBackground} \include{Chapters/03TAUcode} \include{Chapters/04BKHSingleInjectorModelling} \include{Chapters/05BKHColdFlowModelling} \include{Chapters/06SMART} \include{Chapters/07BKHFull} \include{Chapters/08Conclusions} \include{Chapters/Appendix} \include{Chapters/ListofPublications} %\bibliographystyle{abbrv} %\bibliographystyle{Referenzen/abbrvnatNumbSort} %\bibliography{thesisbiblio.bib} % \printbibliography %\printbibliography[notkeyword={Eigene_Journal},notkeyword={Eigene_Conf}] \end{refsegment} \printbibliography \end{document} ``` and Glossary file ``` \renewcommand{\nomname}{Nomenclature} \setlength\nomlabelwidth{.2\linewidth} % Abstand bei welchem die Definition startet \setlength\nomitemsep{-\parsep} % Zeilenabstand zwischen Abkürzungen \newcommand\nomunit[1]{\def\nomentryend{\hfill#1}} \renewcommand\nomgroup[1]{% \def\makelabel##1{##1}% \bigskip \ifx#1P\relax \item[\textbf{\large Physical quantities}]% \fi \ifx#1S\relax \item[\textbf{\large Symbols}]% \fi \ifx#1A\relax \item[\textbf{\large Acronims}]% \fi \ifx#1ND\relax \item[\textbf{\large Non-Dimensional numbers}]% \fi \ifx#1U\relax \item[\textbf{\large Subscripts}]% \fi \ifx#1T\relax \item[\textbf{\large Superscripts}]% \fi \medskip \let\makelabel\nomlabel } \printnomenclature ```
https://tex.stackexchange.com/users/263476
\include{Glossary} does not work
false
You may have to use the command `\printglossary`
0
https://tex.stackexchange.com/users/294859
687358
318,876
https://tex.stackexchange.com/questions/687326
0
I'm using ieee style citation with biblatex but every time I cite a reference it puts a full stop after the number, e.g. [1.], and [25.] How can I remove the full stop inside the square brackets? Does anyone have an idea? It's for my Thesis, which I have to submit on Friday.
https://tex.stackexchange.com/users/258412
How can dot in ieee style citations be removed?
false
Apologies, it was my own mistake. I wanted to make my citations in bold and found another answer in which they had added a dot with `\addot` in the lines I used in the preamble. So to make the citations in bold and with a dot I used: ``` \DeclareFieldFormat{prefixnumber}{\mkbibbold{#1}\adddot} \DeclareFieldFormat{labelnumber}{\mkbibbold{#1}\adddot} ``` And all I had to do was remove the `\dot` so the citations would only be in bold without a dot: ``` \DeclareFieldFormat{prefixnumber}{\mkbibbold{#1}} \DeclareFieldFormat{labelnumber}{\mkbibbold{#1}} ```
1
https://tex.stackexchange.com/users/258412
687364
318,882
https://tex.stackexchange.com/questions/617090
6
Is there a Latex app for Android? I know that I can use Overleaf, but are there any others? I have found [VerbTex](https://play.google.com/store/apps/details?id=verbosus.verbtex&hl=es_419&gl=US), is that useful?
https://tex.stackexchange.com/users/252483
Is there a Latex app for Android?
false
Maybe you could package it into a native app with WebAssembly? I saw this: <https://github.com/SwiftLaTeX/SwiftLaTeX> Integrate a PDF reader and you're good to go ;) PS: If you want to actually build this project feel free to PM me and we can start collab on GitHub (Apache-2.0 OR MIT) is my preference.
2
https://tex.stackexchange.com/users/222611
687379
318,884
https://tex.stackexchange.com/questions/490508
3
If `\myB` accepts two optional arguments, `\myB` sets both of them to default values, `\myB[5]` sets first to `5` and second to default value, `\myB[5][10]` sets first to `5` and second to `10`. But how do we set `#2` argument only? Doing `\myB[][10]` does NOT set first argument to default value (it just makes it disappear). ``` \documentclass{standalone} \usepackage{xparse} % each of two optional arguments defaults to zero \NewDocumentCommand{\myB}{O{0}O{0}} {% myB: #1, #2% } \begin{document} % how to call `myB` so that it only has #2 set? (not #1) \myB[][6] % this is no good since `[]` removes default zero \end{document} ```
https://tex.stackexchange.com/users/141768
How to call a command accepting 2 optional args defined with `\NewDocumentCommand` and pass only 2nd optional arg to it (skipping the 1st)?
false
Another option: use different argument delimiters, with the specifier `D`: ``` \NewDocumentCommand{\myB}{ D(){0} O{0} }{% \#1 = #1, \#2 = #2% } \myB % #1 = 0, #2 = 0 \myB(1) % #1 = 1, #2 = 0 \myB[2] % #1 = 0, #2 = 2 \myB(1)[2] % #1 = 1, #2 = 2 ```
0
https://tex.stackexchange.com/users/132778
687387
318,886
https://tex.stackexchange.com/questions/7321
27
I am using `\uwave{Some text here}` to put a wave like emphasis under the text. Is it possible to change the color of only the wave and leave the text black?
https://tex.stackexchange.com/users/2036
How to color just the wave produced by the ulem package
false
I think this answer is simpler: ``` \documentclass{article} \usepackage{ulem} \usepackage{color} \newcommand{\coloredwave}[2]{ \textcolor{#1}{\uwave{\textcolor{black}{#2}}} } \begin{document} \coloredwave{red}{This text will be underlined with a red wavy line.} \end{document} ```
0
https://tex.stackexchange.com/users/298188
687388
318,887
https://tex.stackexchange.com/questions/687383
1
How can I set the font size for the standalone class globally or locally (as probably in some place you may need to increase or reduce size to make it fit)? I have copied the three `\renewcommand` from IEEEtran.cls for the Times New Roman font. ``` \documentclass[]{standalone} \usepackage[T1]{fontenc} \usepackage[siunitx, RPvoltages]{circuitikz} \renewcommand{\sfdefault}{phv} \renewcommand{\rmdefault}{ptm} \renewcommand{\ttdefault}{pcr} \begin{document} \begin{tikzpicture}[american] \draw(0,0) to[R, v=$V_x$, name=R] ++(2,0); \node at (1,1) {${V_\mathrm{DC}}$}; \end{tikzpicture} \end{document} ```
https://tex.stackexchange.com/users/108432
How to set font size in standalone class globally or locally?
true
You can use the standard modifiers either globally or locally: ``` \documentclass[]{standalone} \usepackage[T1]{fontenc} \usepackage[siunitx, RPvoltages]{circuitikz} \renewcommand{\sfdefault}{phv} \renewcommand{\rmdefault}{ptm} \renewcommand{\ttdefault}{pcr} \begin{document} \LARGE % globally change the size \begin{tikzpicture}[american] \draw(0,0) to[R, v=$V_x$, name=R] ++(2,0); \node[font=\tiny] at (1,1) {${V_\mathrm{DC}}$}; % or even inside the text of the node... \node[font=\tiny] at (1,.5) {\normalsize ${V_\mathrm{DC}}$}; \end{tikzpicture} \end{document} ```
3
https://tex.stackexchange.com/users/38080
687389
318,888
https://tex.stackexchange.com/questions/687382
6
In microbiology, the first time a species name is used, it should be written the genus and species in full (Escherichia coli). For all other occurences, the genus should be abbreviated (E. coli). I managed to do this by using the glossaries package. Nevertheless, when another species is cited, for example Escherichia fergusonii, it should be directly abbreviated E. fergusonii if E. coli has already been cited to avoid repetitions. What I used so far to automatically abbreviate the genus names: ``` \documentclass[french]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[a4paper]{geometry} \usepackage{babel} \usepackage[xindy]{glossaries} \makeglossaries \newglossaryentry{coli}{% name = {\emph{Escherichia coli}}, description = {}, text = {\emph{E.~coli}}, first = {\glsname{coli}} } \newglossaryentry{fergusonni}{% name = {\emph{Escherichia fergusonii}}, description = {}, text = {\emph{E.~fergusonii}}, first = {\glsname{fergusonni}} } \begin{document} A list of bacteria: \gls{coli}, \gls{fergusonni} \end{document} ``` * Current output: A list of bacteria: Escherichia coli, Escherichia fergusonii * Desired output: A list of bacteria: Escherichia coli, E. fergusonii I would like Latex to detect automatically if the genus was already cited, and not forcing the abbreviated form manually in the glossary command.
https://tex.stackexchange.com/users/298185
Automatic abbreviation in bacterial taxonomy - multiple species of one genus
false
One solution is to move `Escherichia` into its own glossary entry like this: ``` \documentclass{article} \usepackage{glossaries} \makeglossaries \newglossaryentry{esch}{% name = {Escherichia}, description = {}, first = {\emph{Escherichia }}, text = {\emph{E.~}}, %define spaces here to use non breaking space only in abbreviated form } \newglossaryentry{coli}{% name = {\emph{Escherichia coli}}, description = {}, text = {\gls{esch}\emph{coli}}, } \newglossaryentry{fergusonni}{% name = {\emph{Escherichia fergusonii}}, description = {}, text = {\gls{esch}\emph{fergusonii}}, } \begin{document} A list of bacteria: \gls{coli}, \gls{fergusonni} \end{document} ``` A possible issue will be if you are planning to use `\printglossary` as the entry for `Escherichia` will print too - if this is the case please let us know so this can be modified out. If you are not planning on printing your glossaries then hopefully this helps.
4
https://tex.stackexchange.com/users/273733
687390
318,889
https://tex.stackexchange.com/questions/687384
3
I am looking for defining a semibold Erewhon font for text mode. If there is none I'd be willing to fake it in the same manner as <https://tex.stackexchange.com/a/290036/194729> but I don't how I can adapt that snippet.
https://tex.stackexchange.com/users/194729
Looking for semibold version of erewhon
true
``` \documentclass{article} \usepackage{fontspec} \setmainfont{erewhon} \begin{document} One two three four five six. {\fontspec[FakeBold=1,LetterSpace=.5]{erewhon} One two three four five six.} {\fontspec[FakeBold=2,LetterSpace=1]{erewhon} One two three four five six.} {\fontspec[FakeBold=3,LetterSpace=1.7]{erewhon} One two three four five six.} {\bfseries One two three four five six.} \end{document} ```
9
https://tex.stackexchange.com/users/1090
687395
318,891
https://tex.stackexchange.com/questions/686262
1
Is it possible to set all `tblr` in the document to be `\linewidth` wide specifying the `X` column type by default?. This requires not mentioning the number of columns like it happens in `colspec`, as it varies for every `tblr`. In this case, `colspec` could be used in certain columns where the default column type should be overriden. For instance: ``` \documentclass{article} \usepackage{tabularray} \setlength{\parindent}{0mm} % act here to specify a default column type \SetTblrInner{ width=\linewidth, %columns={X}, baseline=T, hspan=even, vspan=even, stretch=1.3, row{1}={font=\bfseries}, hline{1,Z}={0.6mm}, hline{2}={0.3mm} } \begin{document} These tables should all have the same width without further modifications in the document body \begin{table}[!hb] \begin{tblr}{colspec={XX}} Head1 & Head2 \\ Row21 & Row22 \\ Row31 & Row32 \\ \end{tblr} \begin{tblr}{} Head1 & Head2 \\ Row21 & Row22Row22 \\ Row31 & Row32 \\ \end{tblr} \begin{tblr}{} Head1 & Head2 & Head3\\ Row21 & Row22 & Row23 \\ Row31 & Row32 & Row33 \\ Row41 & Row42 & Row43 \\ \end{tblr} \begin{tblr}{colspec={|l|X[r]|c|}} Head1 & Head2 & Head3\\ Row21 & Row22 & Row23 \\ Row31 & Row32 & Row33 \\ Row41Row41 & Row42 & Row43 \\ \end{tblr} \end{table} \end{document} ```
https://tex.stackexchange.com/users/213962
Change default column type in tabularray
false
You've found the right option, `columns`. The last step is to feed it a column key-value list, like `co=1,bg=blue!20`, not an other column type like `X`. By uncommenting the `columns={X},` line in OP's example and replacing it with `columns={co=1},`, you'll get ``` \documentclass{article} \usepackage{tabularray} \setlength{\parindent}{0mm} % act here to specify a default column type \SetTblrInner{ width=\linewidth, columns={co=1}, baseline=T, hspan=even, vspan=even, stretch=1.3, row{1}={font=\bfseries}, hline{1,Z}={0.6mm}, hline{2}={0.3mm} } \begin{document} These tables should all have the same width without further modifications in the document body \begin{table}[!hb] \begin{tblr}{colspec={XX}} Head1 & Head2 \\ Row21 & Row22 \\ Row31 & Row32 \\ \end{tblr} \begin{tblr}{} Head1 & Head2 \\ Row21 & Row22Row22 \\ Row31 & Row32 \\ \end{tblr} \begin{tblr}{} Head1 & Head2 & Head3\\ Row21 & Row22 & Row23 \\ Row31 & Row32 & Row33 \\ Row41 & Row42 & Row43 \\ \end{tblr} \begin{tblr}{colspec={|l|X[r]|c|}} Head1 & Head2 & Head3\\ Row21 & Row22 & Row23 \\ Row31 & Row32 & Row33 \\ Row41Row41 & Row42 & Row43 \\ \end{tblr} \end{table} \end{document} ``` **Update** Unfortunately, because column types like `l` and `c` only set `halign` (to `l` and `c`, respectively) and don't reset `co` to its initial value `0` (which is altered by previous `columns={co=1}`), after setting `columns={co=1}`, a table with `colspec={|l|X[r]|c|}` will work like ``` colspec={|Q[l,co=1]|Q[r,co=1]|Q[c,co=1]|} ``` while what user may expect is ``` colspec={|Q[l,co=0]|Q[r,co=1]|Q[c,co=0]|} ``` One workaround is to explicitly use `colspec={|Q[l,co=0]|X[r]|Q[c,co=0]|}`. (Currently there's no public interface to redefine an existing row/column type and column types setting horizontal alignment like `l` and `c` don't have an optional argument.) Reported to `tabularray`, see <https://github.com/lvjr/tabularray/issues/411>. ``` \documentclass{article} \usepackage{tabularray} \setlength{\parindent}{0mm} % act here to specify a default column type \SetTblrInner{ width=\linewidth, columns={co=1}, baseline=T, hspan=even, vspan=even, stretch=1.3, row{1}={font=\bfseries}, hline{1,Z}={0.6mm}, hline{2}={0.3mm} } \def\testTblrColspec#1{ \hspace*{-2em}\texttt{\UseName{tl_if_empty:nTF}{#1}{<empty>}{#1}} \par\medskip \begin{tblr}{#1} Head1 & Head2 & Head3\\ Row21 & Row22 & Row23 \\ Row31 & Row32 & Row33 \\ Row41Row41 & Row42 & Row43 \\ \end{tblr} \par\medskip } \begin{document} \testTblrColspec{} \testTblrColspec{colspec={|l|X[r]|c|}} \testTblrColspec{colspec={|Q[l,co=0]|X[r]|Q[c,co=0]|}} \end{document} ```
1
https://tex.stackexchange.com/users/79060
687398
318,892
https://tex.stackexchange.com/questions/687402
1
Good morning, I'm building a small table with a list. But the space above and to the left of the list is too big for me. I removed the space above the list with \vspace. But \hspace doesn't work there. Does anyone have an idea? Best regards ``` \documentclass{article} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \begin{document} \begin{tabular}{|p{5cm}|p{5cm}|} \hline & \begin{itemize} \item[...] g \end{itemize} \\ \hline & \vspace{-5mm} \begin{itemize} \item[...] g \end{itemize} \\ \hline & \vspace{-5mm} \hspace{-5mm} \begin{itemize} \item[...] g \end{itemize} \\\hline \end{tabular} \end{document} ```
https://tex.stackexchange.com/users/285853
Table itemize spacing
true
I suggest you employ the `enumitem` package to create a bespoke itemize-like list environment that minimizes wasted space, both horizontally and vertically. On the subject of minimizing wasted horizontal space: You may want to choose a different label than what's produced by `\dots`. E.g., consider replacing `label = \dots` with `label = \textbullet`. Naturally, you're free to choose a different name than `myitemize`... ``` \documentclass{article} % 'utf8' is the default input encoding nowadays \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{array} \usepackage{lipsum} % filler text \usepackage{enumitem} % for \newlist and \setlist commands \newlist{myitemize}{itemize}{1} % we need just 1 list level \setlist[myitemize]{label = \dots, left=0pt, nosep, before = \begin{minipage}[t]{\linewidth}, after = \end{minipage}} \begin{document} \begin{tabular}{|p{5cm}|p{5cm}|} \hline & \begin{myitemize} \item g \item h \item \lipsum[1][1-3] \end{myitemize} \\ \hline & \begin{myitemize} \item i \item j \item k \end{myitemize} \\ \hline & \begin{myitemize} \item l \item m \item n \end{myitemize} \\ \hline \end{tabular} \end{document} ```
1
https://tex.stackexchange.com/users/5001
687404
318,895
https://tex.stackexchange.com/questions/687396
0
I would like to know if [stmaryrd](https://ctan.org/pkg/stmaryrd?lang=en) and [stix](https://ctan.org/pkg/stix) package are mutually compatibile and even if they are compatible with the packages I use into the following code: indeed, I see that \Lbag and \Rbag delimiters are different (is right?) into stmaryrd and stix package and moreover I see there appear other symbols which are present into amssymb package but strangerly I did not find any incompatibile into the linked guides. ``` \documentclass[10pt]{article} \usepackage[paperheight=29.7cm,paperwidth=21cm,textwidth=17cm,textheight=25 cm]{geometry} \usepackage{layout} \usepackage{titlesec} \usepackage[hang,flushmargin]{footmisc} \usepackage{hyperref} \usepackage{caption} \usepackage{soulutf8} \usepackage[T1]{fontenc} \usepackage{fontsize} \linespread{1.5} \usepackage{amsfonts} \usepackage{mathrsfs} \usepackage{yfonts} \usepackage{enumitem} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \setcounter{footnote}{-1} \setcounter{equation}{-1} \newtheorem{lemma}[equation]{Lemma} \newtheorem{proposition}[equation]{Proposizione} \newtheorem{corollary}[equation]{Corollario} \newtheorem{theorem}[equation]{Teorema} \hypersetup{colorlinks,citecolor=black,filecolor=black,linkcolor=black,urlcolor=black} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %I get the following code from [here](https://tex.stackexchange.com/a/614685/296807) to manipulate the fontsize of an equation. \ExplSyntaxOn \NewDocumentEnvironment{sequation}{O{\small}b} { \yufip_sequation:nnn {equation}{#1}{#2} }{} \NewDocumentEnvironment{sequation*}{O{\small}b} { \yufip_sequation:nnn {equation*}{#1}{#2} }{} \cs_new_protected:Nn \yufip_sequation:nnn { \begin{#1} \mbox{#2$\displaystyle#3$} \end{#1} } \ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} % Here I wrote my document using some mathematical symbols as \cup, \cap, \bigcup, \bigcap, \setminus, \bot, \top, \rightthreetimes, \leftthreetimes, \odot, \oplus etc... and any any mathematical fonts as \mathcal, \mathfrak and \mathscr \end{document} ``` So could someone help me, please?
https://tex.stackexchange.com/users/296807
Are stmaryrd and stix packages compatibile?
true
You use *either* `stmaryrd` *or* `stix2`. And don't load `amssymb` if you choose `stix2`: this package aims to have as wide coverage of math symbols as possible. Now, I may understand that you prefer `\Lbag` and `\Rbag` from `stmaryrd` instead of the symbols provided by `stix2`. It's really simple (I only load the required packages): ``` \documentclass{article} \usepackage{amsmath} \usepackage{stix2} \usepackage[only,Lbag,Rbag]{stmaryrd} \begin{document} $\Lbag x\Rbag$ from stmaryrd $\lbag x\rbag$ from stix2 \end{document} ``` However, since `stix2` changes the standard `\DeclareMathSizes`, you may want to make `stmryrd` fully scalable. ``` \documentclass{article} \usepackage{amsmath} \usepackage{stix2} \usepackage[only,Lbag,Rbag]{stmaryrd} \DeclareFontFamily{U}{stmry}{} \DeclareFontShape{U}{stmry}{m}{n} { <-5.5> stmary5 <5.5-6.5> stmary6 <6.5-7.5> stmary7 <7.5-8.5> stmary8 <8.5-9.5> stmary9 <9.5-> stmary10 }{} \begin{document} $\Lbag x\Rbag$ from stmaryrd $\lbag x\rbag$ from stix2 \end{document} ``` This avoids annoying warnings and uses the correct sizes in sub/superscripts. In case you're short of math groups, you can obtain the same effect in a slightly more complicated way. ``` \documentclass{article} \usepackage{amsmath} \usepackage{stix2} \DeclareFontFamily{U}{stmry}{} \DeclareFontShape{U}{stmry}{m}{n} { <-5.5> stmary5 <5.5-6.5> stmary6 <6.5-7.5> stmary7 <7.5-8.5> stmary8 <8.5-9.5> stmary9 <9.5-> stmary10 }{} \DeclareRobustCommand{\Lbag}{\mathopen{\text{\usefont{U}{stmry}{m}{n}\symbol{"48}}}} \DeclareRobustCommand{\Rbag}{\mathclose{\text{\usefont{U}{stmry}{m}{n}\symbol{"49}}}} \begin{document} $\Lbag x\Rbag$ from stmaryrd $\lbag x\rbag$ from stix2 \end{document} ```
3
https://tex.stackexchange.com/users/4427
687405
318,896
https://tex.stackexchange.com/questions/687377
0
I would like to get two different headings for the even and odd-numbered pages of the document: even-numbered pages should contain the page number of the book, followed by the prefix "Chapter" and the chapter number, aligned to the left; odd-numbered pages, on the other hand, the chapter nomer (without prefix) and the page number of the book aligned to the right So far the best I've been able to get is this one, which, however, leaves my even-numbered page headings completely blank. How can I do this? Thank you to anyone who will answer me. ``` \documentclass[12pt, twoside]{book} \usepackage{amssymb} \usepackage{enumitem} \usepackage{titlesec} \usepackage{ragged2e} \usepackage{lipsum} \usepackage{textcase} \titleformat{\chapter}[display] {\normalfont\huge\bfseries\raggedleft} {\chaptertitlename\ \thechapter}{20pt} {\titlerule[1pt]\vspace{1ex}\Huge} \usepackage{graphicx} \usepackage{amsmath}% \usepackage{floatrow} \setcounter{MaxMatrixCols}{30}% \usepackage{amsfonts} \usepackage{geometry} \geometry{ b5paper, total={6.93in, 9.84in}, top=1.26in, bottom=0.98in, left=0.95in, right=0.95in, } \usepackage{fancyhdr} \fancypagestyle{ChapterStyle}{ \fancyhf{} \fancyhead[RO]{\normalsize\nouppercase{\leftmark}\ \thepage} \renewcommand{\headrulewidth}{0.4pt} } \fancypagestyle{ChapterStyleEven}{ \fancyhf{} \fancyhead[LE]{\footnotesize\textbf{Chapter \thechapter}\ \thepage} \renewcommand{\headrulewidth}{0.4pt} } \titleformat{\chapter}[display] {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge\filleft} \renewcommand{\chaptermark}[1]{\markboth{#1}{}} \fancypagestyle{plain}{ \fancyhf{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} } \makeatletter \renewcommand{\@makechapterhead}[1]{% \vspace*{50\p@}% {\parindent \z@ \raggedleft \normalfont \ifnum \c@secnumdepth >\m@ne \huge\bfseries \thechapter \fi \par\nobreak \interlinepenalty\@M \Huge\bfseries #1\par\nobreak \vskip 20\p@ \hrule \vskip 40\p@ }} \makeatother \newenvironment{proof}[1][Proof]{\textbf{#1.} }{\ \rule{0.5em}{0.5em}} \begin{document} \frontmatter \pagestyle{fancy} \fancyhf{} \fancyhead[R]{\thepage} \renewcommand{\headrulewidth}{0pt} \begin{titlepage} \title{Example Document} \end{titlepage} \date{} \maketitle \newpage \setcounter{page}{1} \tableofcontents \newpage \noindent {\LARGE Preface}. \bigskip \noindent \lipsum[2-4] \mainmatter \setcounter{chapter}{0} \thispagestyle{plain} \newpage \chapter{Example chapter} \noindent\fbox{% \parbox{\textwidth}{% \begin{minipage}{0.99\textwidth} \vspace{5pt} \justifying \begin{itemize}[leftmargin=15pt] \item \item \item \item \item \end{itemize} \vspace{1pt} \end{minipage}% }% } \newpage \pagestyle{ChapterStyle} \section{introduction} \vspace*{-10pt} \lipsum[2-20] \end{document} ```
https://tex.stackexchange.com/users/298183
Different heading for odd and even pages of a book
true
There are quite a few warnings and errors in the code you provided; I will not attempt to fix them all for you. You are however encouraged to fix them (either read through the package documentations to find out how, or failing that, ask questions about them on this site). For the style issue, you don't define the page style separately for even and odd pages. The issuance of `[RO]` and `[LE]` in the `\fancyhead` command tells it whether it should be applied to the odd or even pages. So something like ``` \fancypagestyle{ChapterStyle}{ \fancyhf{} \fancyhead[RO]{\footnotesize\nouppercase{\leftmark} \quad \thepage} \fancyhead[LE]{\footnotesize\thepage \quad\textbf{Chapter \thechapter}} \renewcommand{\headrulewidth}{0.4pt} } ``` would set both sides appropriately. (I've taken the liberty to make it so that on the even pages the page number appears on the outside, and not following the Chapter number; I've also adjusted the spacing and sizes a bit so that the two sides match.) Your call to `\geometry` also should be fixed: ``` \geometry{ b5paper, top=1.26in, bottom=0.98in, left=0.95in, right=0.95in, headheight=15pt } ``` Your original version specified the paper size, the size of the printable area, and the size of the margins. This is overspecifying things (any two determines the third); don't do that. I've also added a specification of headheight to create a big more room for your headers (mostly because your original version used `\normalsize` for the headers and the default space reserved is not enough).
0
https://tex.stackexchange.com/users/119
687408
318,898
https://tex.stackexchange.com/questions/686852
3
Sometimes, I want to redefine some ***cs*** in a range, generally a macro definition. Like: ``` \def *[[csname>]]* { *[[**Redefine** some cs]]* *[[Actual function of this macro]]* *[[**Recover** the redefined cs]]* } ``` What mainly needed to do is define macros of `***Redefine***` and `***Recover***`, let's call them `\redefine` and `\recover`. For recovering, a hardly conflict ***cs*** should be used to store the meaning of ***cs*** to be redefined, and their names should be relative. Here I use "the csname of its csname" : ``` \def\redefine#1#2{ \expandafter \let \csname\string#1\endcsname #1 \relax \def#1{#2} } ``` Where `#1` is the ***cs*** to be redefined. Now I found that the original meaning can not be recover. ``` \def\recover#1{ \let #1 \csname\string#1\endcsname } ``` ~~It seems that `\csname\string#1\endcsname` can not be expanded before `\let`, because `#` `1` are two different tokens but treated as argument replacement in macro definition iff they successively appear. Meanwhile `\expandafter` just skip 1 token.~~ Maybe `\def` but not `\let` can be used in most cases, I still want to know any way to make the 2nd token be expanded before the 1st when the 1st token is an argument? --- i.e. Some shorter primitive cs are defined: ``` \let\epaf\expandafter \let\str\string \let\nep\noexpand \let\cs\csname \let\sc\endcsname ... ``` for a macro named `\mfont` that parse a sentence until `\relax`, and set lots of font attribute, and make a single cs set latin font and unicode font at the same time. It use lots of primitive cs to parse sentence, definiiton is hard to read if keep the long name. After a block from `\mfont` to `\relax` , shoter names should be recovered. `\mfont` should define font for global but the shorter names should be valid just in the `\mfont` range.
https://tex.stackexchange.com/users/248249
How to \expandafter a \let#1 in macro definition
false
For the sake of coping with implicit space when doing `\let` I suggest s.th. like this: ``` \def\redefine#1{% \expandafter\futurelet\csname\string#1\endcsname\def#1% }% \def\exchange#1#2{#2#1}% \def\recover#1{% \expandafter\exchange\expandafter{\csname\string#1\endcsname}{\let#1= }% }% \def\foobar{foo} \foobar \redefine\foobar{bar} \foobar \recover\foobar \foobar \bigskip Doing the implicit space game: \bigskip \exchange{ }{\let\foobar= }% A\foobar A \redefine\foobar{bar} B\foobar B \recover\foobar C\foobar C \bye ``` Alternatively just do some scoping via `\begingroup..\endgroup` or `{..}`: ``` \def\foobar{foo}% \foobar \begingroup \def\foobar{bar}% \foobar \endgroup \foobar {% \def\foobar{bar}% \foobar }% \foobar \bye ```
2
https://tex.stackexchange.com/users/118714
687413
318,899
https://tex.stackexchange.com/questions/687179
1
I'm hoping to have the following: > > A > > > abscissa - another term for an x-coordinate > > > B > > > bisector - description > > > ... > > > With the letters in larger text, but when I do `\newglossaryentry{A}{name=\LARGE{A}, description = {some description}`, I get a > > improper alphabetic constant > > > error, since only text can come after `name=`. Does anyone know a way around this? I figured out how to make a style file to do this for the index, so if the simpler solution doesn't work I would love to know how to code that in the glossaries style.
https://tex.stackexchange.com/users/294859
Add a large letter before each Glossary section with words starting with that letter
false
I solved the problem, I needed to put `\usepackage[toc,nonumberlist,sanitizesort]{glossaries-extra}` in the preamble.
1
https://tex.stackexchange.com/users/294859
687414
318,900
https://tex.stackexchange.com/questions/46903
80
I mess up with things when I try to use the figure-thing: the picture is not appearing with the correct alignment (apparently because I forget the `float` package). Now I want to use only the `graphicx` package with `\includegraphics`. How can I center the `\includegraphics` without figure? Not working or doing centering to the document afterwards. ``` \includegraphics[width=0.5 \textwidth]{./Pictures/r.png}{\centering} \includegraphics[width=0.5 \textwidth]{./Pictures/r.png}\centering ```
https://tex.stackexchange.com/users/2956
Centering with \includegraphics not with \begin{figure}?
false
Another way to center a includegraphic is to use \centerline: ``` \centerline{\includegraphics{...}} ``` I've no always managed to get cenering to work for what ever reason.
0
https://tex.stackexchange.com/users/5303
687416
318,902