Tag Info

Hot answers tagged

9

\twoheadleftarrow and \twoheadrightarrow can be combined to \twoheadleftrightarrow: \documentclass{article} \usepackage{amssymb} \newcommand*{\twoheadleftrightarrow}{% \twoheadleftarrow \mathrel{\mkern-15mu}% \twoheadrightarrow } \begin{document} \[ \twoheadleftrightarrow \scriptstyle \twoheadleftrightarrow \scriptscriptstyle ...


9

The conditional \ifx does no expansion and it compares the next two tokens. So in your test it compares \myarg with the first token in #1. Therefore the test will be always false, because #1 is the name of a section level counter. Adding \expandafter before \ifx would not help, even adding braces around #1: \expandafter\ifx\myarg{#1}\mytest would become ...


5

The package csquotes performs \MakeOuterQuote{"} by making " active, but it postpones the setting \AtBeginDocument. So, when your \newcommand{\HelloWorld}{...} is processed, the " characters in the replacement text are normal (non active) characters. If you try adding \show before the first " in the definition, compilation will stop with > the character ...


5

My guess: \newpage is what you are looking for. It starts a new page, if there is something. Otherwise \newpage does not cause a page break.


4

If your \newcommand{\HelloWorld} is the last activity before \begin{document} and there are no anothers " in your real code, you should prepend before this command: \catcode`\"=13 and you needn't to change your definition. The reason was answered by egreg. You need to have the " active at the time of definition of the \HelloWorld.


4

There are a number of ways, depending on what you're after: \documentclass{article} \setlength{\parindent}{0pt}% Just for this example \begin{document} \let\TextBF\textbf% Copy definition of \textbf into \TextBF \textbf{textbf}\par \TextBF{TextBF} \let\textbf\texttt% Change original \textbf to now be equivalent to \texttt \textbf{textbf}\par ...


4

That would take a lot of work. It would be easier to use a two macro approach. I usually do this independently of \chapter using \chapterprecis. If you wanted it directly into the chapter style it might be better to use an approach like \setchapterdesc{....} \chapter{....} and then let the chapter style use the macro that the imaginary macro ...


3

š is defined in cp1250 encoding (and other encodings) to be \v s so if you redefine \v you redefine š. Redefining a core LaTeX command like \v is unlikely to be worth the effort, it makes your document fragments incompatible with every other LaTeX setup unless you redefine all of LaTeX's accent and encoding support not to use \v.


3

Try adding the following code to your preamble: \makeatletter \catcode`\V=14 % `V' is a comment character unless [verbose] \def\FloatBarrier{\begingroup \let\@elt\relax V\edef\@tempa{\write\m@ne{Package placeins Info: Float barrier, from V input line \the\inputlineno, processed on page \thepage, lands on V page ...


3

You need \meaning, something like \documentclass{article} \def\foo#1>{} \newcommand\showcase[1]{% \def\tmp{#1}% \texttt{\expandafter\foo\meaning\tmp} #1} \begin{document} \showcase{$\alpha$} \end{document}



Only top voted, non community-wiki answers of a minimum length are eligible