I just found that \unexpanded and \noexpand act differently (and the first one exactly as I would expect). In \edefs it works as expected (“protecting” the argument from expansion), but when used in normal text \unexpanded doesn't act, it's just like \@firstofone. Which, is, IMO, nice.
(following the last message) Couldn't that be a nice way of “protecting” arguments from expansion? Like if we have some sort of \define\tmpa{..} inside an \edef we could teach \define to autoprotect not only himself (with \protected\def\define) but also to protect it's argument from expansion. Isn't that useful?
Yes, you can:
\IfFileExists{filename}{true-branch}{false-branch}
Notice that this looks for the file in all search pathes of LaTeX, so not only in the current directory, but in the texmf tree as well. Therefore, you can use it for instance for a "poor man's solution" when a package is missing:...
Though I don't know why putting ./filename stops \IfFileExists from looking somewhere else. I guess that would require me knowing about the implementation.
@Cortizol If you use \label{foo} where LaTeX generates no number, \ref{foo} will point to the previously generated number, so it won't help. Since \[...\] generates no number, we're in this case.
@egreg Good morning! :) They repaired the bus, I was very far from home (at least 100km). But I was safe, the bus broke in a strategic place (nearby a police station) -- it took about 1 hour to repair it, and I got home safe and sound. Yay! :)
@SoundsOfSilence You probably know that decimal logarithms were Briggs' idea; he went to Scotland to meet Napier, who died a few months later. So Briggs was left alone in developing his idea. He was a formidable calculator, by the way, and produced accurate logarithm tables in a very short time.
The code you posted is missing the \documentclass{...} command. This code compiles well on my machines (with the distros TeXLive 2014 and MacTeX 2014).
\documentclass{article}
\usepackage[many]{tcolorbox}
\newtcbtheorem[number within=section]{mytheo}{My Theorem}%
{colback=white,colframe=...
The titlepage is one of the first pages of a book or
thesis. This page contains only the title in a fashion similar to
the rest of the text within the book.
That is what Wikipedia tells us, now we have a perspective to
follow, the titlepage should match the appearance of the rest of
the book or ...
What's a bit disturbing for me is the fact that people come here looking for answers, but never react to any comment, or completely stay away after asking.
@DavidCarlisle -- if you look at the visual and ignore the text, it's easy to see what's wrong. could probably be fixed with a couple of minipages and captionof.
@PaulGessler there are very few documents where you can not simply put \makeatletter in the preamble, then \show\@foo at the point you need it would just work
@egreg do you mind having a look at my question tex.stackexchange.com/questions/234306/…? I'm asking you because you answered once in the past a similar question.
I try to write latex code to generate a title page for a UNAM's thesis, It's hard to define the position of each element and get the desire result. It will be very appreciated if somebody can share code to resolve this problem
way better than my initial guess with \footcite where I have to set the reference number of \footmark manually
Even the best presenters in my field are doing that (cf. pes.ee.ethz.ch/uploads/tx_ethpublications/…). But they probably rely on powerpoint, thing that I'll never do just because of bad mathematics handling.
I am working on a programming project and I have to do a report about what I did.
I have to descibe multiple functions.
My goal is not to show code but to descibe it.
Is there a package that could help me with it ?
@egreg I'm not talking about online letters. Strictly paper letters. I'm mostly concerned about legal issues here, which I suppose this room can't really advise about. As in, this isn't a "real" signature.
I wonder if it is easy to distinguish between a real signature and the printed image of a signature.
Though they would all look the same, so that might be a giveaway for a Sherlock Holmes type who was paying attention.
@FaheemMitha To be honest, every time i notice a user that never came back, i silently hope that the reason for his disappearance is not a collision with a bus or something.
@David: on a more serious note, for my thesis I will either extend an existing language or write one from scratch. Would it be too masochist to extend Fortran? :P
@PauloCereda well since I have a colleague who's an editor of the fortran standard and extending fortran is part of the job spec, I can't say too much against that...
I'm trying to use Babel for Spanish with TeXnicCenter and MikTeX.
Whenever I add the following line to my source file, I get in trouble:
\usepackage[spanish,mexico]{babel}
If I add it before \begin{document} I get a full page at the beginning of the document with this text:
*spanishcaptions ...
@PauloCereda What do you mean? I thought of defining the comma as math active, and then making it spit som sort of \mathpunct{\normalcomma}\allowbreak but I was hoping an “official” answer. The per paragraph solution is because I have problem with them in two or three paragraphs from a 100 hundred page document, but still, I think there should be an options so I don't have to input explicitly twenty \allowbreak.
Hi @egreg, I tried to comment again on your post, just wanted to say it also appears that the non-summation capital sigma early in the first equation might be in Computer Modern also.
When \cite tries to split the argument, it doesn't find the expected delimiter, which is a category 12 comma and is different from a category 13 comma.
The correct way, other than using breqn is to make the comma "math active", just as it is done in the package icomma.
\AtBeginDocument{%
\mat...
@egreg Nice one. \mathchardef\mathcomma\mathcode\,` is nice, I guess; I used \mathchardef\normalcomma=\,` which in turn made me add \mathpunct{\normalcomma}, that's the idea behind using \mathcode\,` which lets you use just \mathcomma without \mathpunct isn't it?
@egreg I suppose until that time, I will have to just resort to describing math formulas using words – like the ancients – instead of using all kinds of fancy symbols; that'll be the only way to guarantee no bugs/flaws in math typesetting ;)
@egreg In any case, two subquestions. Why \discretionary{}{}{} instead of \allowbreak? And, a quick way of using it for next paragraph? I'm not used to \everypar{..} or so (just one command that affects the next paragraph, \breakatcommas).
@egreg But that's a pain. I have just one or two paragraphs with around 5 or 6 strings of more than 9 commas. Since I don't know exactly where I want it to break, and I don't want to create a macro for breaking commas… I guess I will have to play myself… or may be \def\breakatcommas#1\par{\begingroup\mathcode`\,="8000 #1\par\endgroup} if you don't want me messing with \everypar{..}?
In any case, I don't really know what difference it implies having higher penalty, but I will use \discretionary since is the one you used.
@egreg I'm lazy, and also I wanted to know what would be the standard way of setting math active for a paragraph. It's just that I didn't want to rewrite the code, just add \breakatcommas and forget about all.
May be you need something like this: {\catcode`\,=13 \gdef,{\mathpunct{\mathchar`,}\penalty10 } \def\breakatcommas{\bgroup\mathcode`,="8000 \def\par{\endgraf\egroup}}
ok, so it seems that the journey back home will be interesting. Even after giving 23kg of stuff to someone else to bring to Prague, I'm left with ~19 kg of stuff (and counting...), with a 20kg limit. This bloomin' weight limits...
@DavidCarlisle well, I've got unlimited hand luggage weight, as long as I can safely manipulate it and don't exceed the size limit. So I'll hopefully manage :-)
@wipet Okey, that works too, and I'm not messing with \everypar nor grabbing an argument like \breakatcommas#1\par. That's nice. The \penalty10 is just symbolic, isn't it? Since we don't want a break unless necessary, it could be just \penalty1? No disadvantage versus the \discretionary{}{}{} version?
@wipet Will it even be okey to define \def\par{\endgroup\par}?
Oh! Shouldn't it be the opposite? \penalty9999 so it breaks as its last option?
@Manuel wipet's definition is safer as otherwise you end the group before ending the paragraph, so size and language changes may do the wrong thing. Of course neither is safe if you have anything fancy like a latex list in its scope as most thing are not going to accept par to end a group, but on constrained environments you're safe enough
@Manuel I still can't see where adding \breakatcommas at the start of the paragraph is different from changing $<list>$ with \mathlist{<list>}, considering that the paragraph may have commas in math mode where you don't want to break.
@DavidCarlisle I'm a newbie from the new school. Don't expect me to master the art that fast. I use \meaning more than \show. I know part of the fault is the text editor that does a good job hiding the .log, although, on the other hand, I'm thankful.
@yo' Probably go for that one unless someone pronounces against it.
@egreg As I said, pure laziness (and I was being truthful there). I do have some $<list>$ other $F(<list>)$ and some $\foo{<list>}$. With \penalty9999 or \penalty\numexpr\the\tolerance-1\relax I'm getting the best approximation (break if an only if necessary), while keeping the exact code.