# Tag Info

3

Extending touhami's idea, but making it work also for nonstandard chapter numbers (like for theorems in an appendix), I make \p@theorem expand to \compare@theorem{\thetheorem}, where \compare@theorem is a protected macro; thus only \thetheorem is expanded when writing to the .aux file. The macro \compare@theorem uses \pdfstrcmp (under the abstraction ...

3

The following solution weighs way more than the rather clever approach of @touhami; in exchange you gain more flexibility regarding changes to the theorem interface. How to use it: After defining a new theorem environment using \newtheorem you can use the new command \theoremnum to specify a numbering that is indipendent from the reference mechanism. (The ...

3

The following solution, which uses LuaLaTeX, is a simple extension of the answer given at http://tex.stackexchange.com/a/165224/5001. The solution assumes that the string "Hallo", without any subsequent letters, should be highlighted as well. If that's not the case, just change "(Hallo%a*)" to "(Hallo%a+)" in the second argument of the string.gsub ...

6

Here is what you want Theorem's label \renewcommand{\thetheorem}{\arabic{section}.\arabic{theorem}} LaTex uses a prefix \p@counter for cross-referencing i.e. a reference to a theorem produce \p@theorem\thetheorem in this case \p@theorem= null inside chapter and \p@theorem=chapter number outside. \p@theorem=\ifnum\thechapter=chapter of ...

1

The most stable way (in my eyes) is to declare the adjusted fontsize/baselineheight pair directly. As both have to stay proportional to each other you can scale down both by the same factor, which is approximately the square root of the quotient from measured and target height. (The complete example below smoothes down this factor to gain a little more ...

1

Yet, the most accurate way seems to consist in using the anyfontsize package. The algorithm for finding the target font size and baselineheight is: first shrink the baseline by the ratio of target height and actual height and the fontsize proportionally (similarly to the suggestion of @MartinScharrer) and then factor in the relative difference consecutively ...

1

A bullet-proof solution would be to use the standard fontsize switches. The algorithm I propose is simple brute force: if the text exceeds the borders of the box use the relatively next small font, else use the next higher one unless it would blow up the borders of the bounding box. This method is safe as its termination is guaranteed and the "complexity" ...

0

Use "auto-save-buffers", put into your .emacs: (require 'auto-save-buffers) (run-with-idle-timer 1.5 t 'auto-save-buffers) (global-set-key [f7] 'auto-save-buffers-toggle) (auto-save-buffers-toggle) And then use "latexmk" to compile the *.tex file. To make everthing much faster, you can build a thing called a "format" with pdflatex. Roughly: pdflatex ...

0

This solution is linux-based. If you have open your pdf with evince (and other pdf viewer I think but I use evince), it will be refreash after a compilation inside emacs. In order to not use AUCTeX and compile with a shorter command after the first one, you can use M-x recompile that you can bind by adding this in your .el file: (global-set-key (kbd ...

11

The following solution sets up an environment blocktable derived from longtable that provides the desired functionality using LaTeX only. Implementation notes First, a few counters are needed: \newcounter{@tabrow} \newcounter{@emptyrow} \newcounter{@modulus} \newcounter{@default@blocksize} @tabrow will be incremented every row to determine the current ...

3

that perhaps there might be some case where that message is not generated, but the PDF file does not contain any content, or there are other catastrophic failures that can occur. This document doesn't produce any error or "no output PDF produced" warning but may be considered as perhaps an error that should be fixed. It may or may not be a case of the ...

Top 50 recent answers are included