« first day (3233 days earlier)      last day (1709 days later) » 

6:55 AM
Are the options shown in the answers below pretty much everything available?
44
Q: Stop LaTeX compile with a command?

sheet_ethicsIs there a way to stop the compile process through the use of a command? Something like: \exception{This is a user-set exception. Compile halted.} So when performing the compile process, the specified text string is displayed to the console, and the compile process aborts? The reason I want...

I'm inclined to try \GenericError unless there are better options.
 
7:18 AM
@FaheemMitha Doesn't include the TeX primitives \errmessage and \errhelp
 
 
2 hours later…
9:15 AM
@JosephWright Oh. Which one would you recommend? Is GenericError a reasonable choice. I'm only writing LaTeX.
 
@FaheemMitha or \PackageError (which is just GenericError with a few arguments filled in) or simply \ERROR (which has the benefit of working everywhere even in \write or \edef)
 
@DavidCarlisle That's a lot of choices. But they all interrupt the program and write to standard error?
 
@FaheemMitha it's only really two choices. PackageError just calls GenericError and that just calls \errmessage to give a user-specified error message. \ERROR or \DUCK or \FOOBAR is just an undefined command so makes tex stop and give a (fixed) error message.
@FaheemMitha use \PackageError unless you have some particular reason not to do that,
 
@DavidCarlisle would \zzzz work too?
 
@UlrikeFischer more chance that that is defined.
 
9:28 AM
@DavidCarlisle \ZZZZ? Assuming that english people don't find the shift-key easily. \blub wouldn't work for me and I have some doubt about the general usefulness of \DUCK ;-)
 
@DavidCarlisle Hmm. Ok, fair enough. And \PackageError would state the package it's coming from? And suppose the code is not in a sty file? Use \GenericError?
 
@FaheemMitha it's still logically a package even if in a document preamble, \PackageError{Faheem}{you did it wrong}{blame Ulrike}
 
 
1 hour later…
11:03 AM
@DavidCarlisle How is it logically a package?
 
@FaheemMitha preamble code is essentially a one-off package for that document, you could take the preamble, stick it in zzz.sty and have a preamble of \usepackage{zzz} the behaviour would be the same.
 
@DavidCarlisle So you're suggesting treating it as a package that happens to have the name of whatever the file name is?
 
@FaheemMitha or a different name. Many people just habitually copy preambles from one document to another, it would often be clearer if they put all that code in a personal package and used that package in multiple documents. The filename is not the issue the point is that there are many commands that are not allowed in a document body or only allowed in the document body. and the preamble works like package code in that sense
 
@UlrikeFischer Well, it's a rip-off of one of your ideas, so the usefulness was already built in :-) — moewe 4 hours ago
^^^ that's a nice way to blame me ;-)
 
11:27 AM
@DavidCarlisle Yes, I too used to copy stuff from one document to another. I'm now trying to put common stuff in sty files.
 
@FaheemMitha the drawback of external packages is that they tend to assemble more and more code and don't always fit to the current document.
 
@UlrikeFischer Yes, there is that. And you run into backward compatability issues. So if you want to change the sty file, you can't because it would affect previous documents that depend on it.
I haven't had too much of an issue with this, but I've already renamed a package once.
 
 
1 hour later…
12:47 PM
Does somebody know where MikTeX stores the 'languages' from its settings in a file?
Nver mind, I just try TeXLive instead. Hope that's better automatable
I am currently creating a reproducible virtual machine environment, so that my document hopefully still typesets in 10years!
 
1:13 PM
@ComFreek you won't believe it, but the file is called "languages.ini".
 
1:44 PM
@PauloCereda you got a message I hope ...
 
@UlrikeFischer ooh I got it!
@UlrikeFischer thank you very much! Was it okay on your end?
 
@PauloCereda yes, no problem.
 
@UlrikeFischer Thank you again. It worked. :)
 
 
3 hours later…
5:36 PM
I am presenting code using listings in beamer. I would like to step through lines of the code. For example zooming into one line each step. Is there an existing way to do this?
 
6:09 PM
@PauloCereda ꝏꜧ
 
6:22 PM
@HaraldHanche-Olsen ooh
 
13
Q: Beamer - Using \pause within lstlisting

MCBI am preparing a beamer presentation and using the lstlisting environment in order to put in code. However, I would like to use the \pause command within lstlisting. By definition that is not possible. I am numbering the lines so it is bad if I just end and begin the environment again in order to...

 
6:42 PM
Where are \GenericError and \PackageError documented?
 
@FaheemMitha texdoc clsguide for \PackageError and texdoc source2e for \GenericError which is just the internal version of \PackageError and \ClassError
 
@DavidCarlisle Thank you. I searched through some of the LaTeX documentation, but with so many documents it's hard to cover the bases.
 
7:01 PM
@DavidCarlisle that is very useful thanks. I am trying to work out how to zoom into each line rather than just highlight it
 
 
1 hour later…
8:03 PM
@Anush Why would you want to? That seems like an unnecessary animation to me, what should be the benefit over line-wise revealing? If it's about legibility than you should change your presentation such that everything is legible in the default size anyway.
 
8:37 PM
@DavidCarlisle what is hyperref doing here that one get an undefined ZZZZ reference in the headers?
\documentclass{book}
\usepackage{textcase}
\makeatletter
\renewcommand*\ps@headings{%
    \def\@oddhead {\MakeTextUppercase{\rightmark}}}
\pagestyle{headings}

\usepackage{hyperref}
\begin{document}
\chapter{abc}\label{zzzz}
\section{text \ref{zzzz}}
\newpage
abc
\newpage
abc

\end{document}
 
@Skillmon It is mostly about legitibility
 
@UlrikeFischer hmm expanding \rightmark earlier I guess, will look...
 
9:20 PM
@DavidCarlisle i think the problem is more the other way round: with hyperref \ref is robust.
 
@UlrikeFischer what happens in latex-dev...
 
@DavidCarlisle no problem (without hyperref), I'm currently in LaTeX2e <2019-10-01> pre-release-2 (robustness branch).
> \ref=macro:
#1->\expandafter \@setref \csname r@#1\endcsname \@firstoftwo {#1}.
l.151 \show\ref
 
9:49 PM
@UlrikeFischer probably fixable in textcase but Not thinking straight at present
 
@DavidCarlisle it is not very pressing - it happens only in one case and one can easily work around the warning by adding a second label. I was only curious and tried to understand what happens.
 
@UlrikeFischer You get the same without changing \ps@headings
\documentclass{book}
\pagestyle{headings}

\usepackage{hyperref}
\begin{document}
\chapter{abc}\label{zzzz}
\section{text \ref{zzzz}}
\newpage
abc
\newpage
abc

\end{document}
 
10:18 PM
@egreg yes, but my document used \MakeTextUppercase
 
10:59 PM
@UlrikeFischer \tl_upper_case:n ;)
 
@JosephWright \def\@oddhead {\tl_upper_case:n{\rightmark}} give also ` Reference ZZZZ' on page 3 when hyperref is used.
 
11:35 PM
@UlrikeFischer blame Joseph for not re-writing hyperref
 

« first day (3233 days earlier)      last day (1709 days later) »