title: How to renumber and redisplay additional references to a previous footnote if the previous appearance was several pages prior in ConTeXt?

text: I am using `\setnotetext[footnote][0001]{This is a footnote.}` to set a footnote's text and `\note[footnote][0001]` to create multiple references to it. When the footnote's first appearance, and later appearances appear within about 10 pages, this works okay, however, if the distance is too far, it becomes unwieldy to refer to footnotes appearing so far back, given the complexity of the document. How can I get ConTeXt to assign a new number to the footnote, and display the same text at the bottom of the page, it it has not done so for 10 or more pages and it happens to be referenced again? E.g.:                _______________________     |                       |     | This is some text.^1  |     |                       |     |                       | (page 1)     | ....                  |     | 1 This is a footnote. |     |_______________________|      _______________________     |                       |     | This is some text.^1  |     |                       |     |                       | (page 6)     |                       |     |                       |     |_______________________|      _______________________     |                       |     | This is some text.^2  |     |                       |     |                       | (page 14)     | ....                  |     | 2 This is a footnote. |     |_______________________|      _______________________     |                       |     | This is some text.^2  |     |                       |     |                       | (page 16)     |                       |     |                       |     |_______________________|      _______________________     |                       |     | This is some text.^3  |     |                       |     |                       | (page 70)     | ....                  |     | 3 This is a footnote. |     |_______________________|      How can I automatically assign the footnote a new number, and redisplay the text, if the last appearance of the footnote's text appeared more than 10 pages prior?


title: Manipulating arguments in newcommand

text: I'd like to manipulate the arguments in `\newcommand`. More explicitly, I'd like something like that:               \newcommand{\X}[1]{     #1+1     }      And if I call `\X{0}`, I want it to return `1` and not `0+1`. Thank you :-)


title: change position of Subsubsections and paragraphs and enumerate them

text: I am new to TeX. I have a document with subsubsections and paragraphs. I don't wand the paragraphs inside the block, they should be bevor the block, like the subsubsection header bevor. The other problem is, that subsubsections and paragraphs don't get enumerated and furthermore they're not listed inside ToC. Is there a possibility to solve this problem without doing it manually? I use TeXmaker.


title: surnames in small cap with nameauth package

text: I use now the `\package{nameauth}`. I just want to have the same form of names presentation in my work (the first & the other) with **only the surname or mononym in small capitals** in my text & in my index. I can read the basic arguments here of the package here : ![enter image description here](http://i.stack.imgur.com/xjA4P.png) My aim seems simple when you know programming like in the _man_ "2.5.5. custom formatting", but I'm not a good programmer. Here the exemple in the _man_ : ![enter image description here](http://i.stack.imgur.com/2KQ2B.png) ![enter image description here](http://i.stack.imgur.com/auIfW.png) In my work, I'm using `arara` `xelatex` `imakeidx` `xindy` `glossaries` `babel` & for exemple :               % !TEX encoding = UTF-8 Unicode     % !TEX TS-program = arara        \documentclass{scrbook}          \usepackage{makeidx}     \usepackage[noformat]{nameauth}     \makeindex          \begin{document}     \Name[Jean de]{La Fontaine}, \\     \Name*[Jean de]{La Fontaine}, \\     \FName[Jean de]{La Fontaine}[Jean] \\     \AKA[Jean de]{La Fontaine}{le fabuleux}\\          Jean de \textsc{La Fontaine} \\ % to show you what I want…          \printindex     \end{document}     % arara: xelatex     % arara: makeindex     % arara: xelatex     % arara: xelatex: {shell: yes}      You can see the result : ![enter image description here](http://i.stack.imgur.com/AY8u8.png) And, this is the index : ![enter image description here](http://i.stack.imgur.com/rVIlg.png) If you mean it's possible (nothing is impossible, isn't it ?), help me please.


title: Table - remove row lines in column to furthest right

text: How do I remove row lines in the column to furthest to the right. I have seen examples where they do it the left. I would like the "powers" from the table here to be on the right side instead of the left. I have the following code:               \documentclass[a4paper,oneside,11pt]{memoir}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage{multirow}     \begin{document}     \renewcommand{\arraystretch}{1.5}%controls the space between the rows     \begin{table}[h!]         \begin{center}                 \begin{tabular}{ | l | l | l | l |}                 \hline                 \textbf{header one} & \textbf{header two} & \textbf{header three} & \textbf{header four}\\ \hline                  r1c1 & r1c2 & r1c3 &  \multirow{4}{*}{ no row lines in the first four rows}\\ \hline                 r2c1 & r2c2 & r2c3 & \\ \hline                 r3c1 & r3c2 & r3c3 &\\ \hline                 r4c1 & r4c2 & r4c3 &\\ \hline                 r5c1 & r5c2 & r5c3 &\\ \hline                 r6c1 & r6c2 & r6c3 &\\ \hline                 r7c1 & r7c2 & r7c3 &\\ \hline                 \end{tabular}             \caption{my caption}             \label{tab:test}         \end{center}     \end{table}     \end{document}      The text "no row lines in the first four rows" should have... well no row lines - it should be one "big box" :o) All help is greatly appricated!


title: How to plot every 4th row using pgfplotstable?

text: This seems very related to How to display every 4th row in a large data file using pgfplotstable?. I just try to plot the filtered rows but am missing something here. Here is the MWE (I copied the example from previous link).               \pgfplotstableread{      obs      number       1         2       2         5       3         3       4         2       5         4       6         1       7         2       8         5       9         3       10        2       11        4       12        1     }\loadedtable          \pgfplotstabletypeset[       row predicate/.code={%         \pgfplotstablegetelem{#1}{obs}\of{\loadedtable}         \pgfmathparse{int(Mod(\pgfplotsretval,4)}         \ifnum \pgfmathresult = 0            \else \pgfplotstableuserowfalse         \fi}     ]{\loadedtable}          \begin{tikzpicture}         \begin{axis}        \addplot[only marks,          x filter/.code={\pgfplotstablegetelem{\coordindex}{obs}\of{\loadedtable}                         \pgfmathparse{int(Mod(\pgfplotsretval, 4))}                         \ifnum \pgfmathresult = 0                          \else                         \def \pgfmathresult{}                         \fi},         ] table[x=obs,y=number] {\loadedtable};        \end{axis}     \end{tikzpicture}      The `tabletypeset` works fine but the `plot` does not work. Is there an easy fix? On a side note, is there anyway to save the filtered table as a new macro so that I can use it in a plot directly? Any help is appreciated.


title: Images not appearing in TeXShop

text: I must be doing something wrong here...I can't seem to get an image to appear.   I have saved the image as "graph.eps" in the same file where my .tex file is located. Here is a MWE:               \documentclass{book}     \usepackage{graphics}     \begin{document}          \chapter{One}     I want to insert a graph.       \includegraphics{graph.eps}          \end{document}      I get the error message > ./Stata Instructions1.tex:339: Missing $ inserted. $sh: repstopdf: command > not found > > ./Stata Instructions1.tex:339: Package pdftex.def Error: File `graph-eps- > conver ted-to.pdf' not found. Any help is greatly appreciated! **Update 2** At the prodding of @cfr, I have tried to investigate the problem a little bit more. There are 2 strange things happening:   1. When I put the image in a separate document, I get no error message and the image displays perfectly. But when I put the image into the document I want it in (heretofore known as doc2), I get an error message. The preamble for both of these documents is identical. Commenting out the `\includegraphics` command eliminates the error message I get in doc2. (This error message that I get in doc2 is  > "Missing $ inserted. l.160 \includegraphics[scale=0.5]{graph.pdf}"   2. If I hit enter a few times in the console, the document compiles and the image is displayed as I want, but there is an empty set sign next to it: ![Picture](http://i.stack.imgur.com/C9f9o.png)


title: Can TeX generate "heap dumps" to analyze+optimize out-of-memory situations?

text: As package author of the memory-extensive package pgfplots, I have been asked to analyze some out-of-memory situation. I could identify the "culprit"; it was some call to `\pdfmdfivesum` in which it crashed finally. I am aware of some solutions how to enlarge or avoid memory limits, so please avoid suggestions how to avoid the problem. My motivation here is: as a software engineer, I wished for some kind of "heap dump" in which I can inspect how much memory is currently being occupied by which "word" or whatever. This could hopefully allow optimizations and systematic improvements; i.e. by clearing unused registers or by restructuring macro expansion or whatever. Do you know if human-readable heap dumps can be generated? * * * Here is some more insight into the problem that I tried to address. Personally, I think that this section is more or less unrelated to the question above: I would really like to hear answers even if there is a simple solution to the problem at hand. Anyway, if you see how to improve the situation, I would listen carefully. The problem at hand was the main memory size. Apparently, `matlab2tikz` generated a 300k file containing a self-contained pgfplots figure along with (lots of!) data points. And the tikz `external` library attempted to load that file into main memory in order to compute its MD5 hash. This failed. Note that without the MD5 computation, the file _could_ be processed. In fact, the tikz external lib uses `\edef\pgfretval{\pdfmdfivesum{\meaning\tikzexternal@temp}}` and the call to `\meaning` fails if `\tikzexternal@temp` contains these 300k words. I suppose that these words occur more than once in the main memory of TeX; and I would like to learn where and why. This is where I hoped to see a heap dump.               Runaway definition?     ->     ! TeX capacity exceeded, sorry [main memory size=3000000].     \tikzexternal@hashfct ...aning \tikzexternal@temp                                                        }     l.105 \end{tikzpicture}                            %     If you really absolutely need more capacity,     you can ask a wizard to enlarge me.               Here is how much of TeX's memory you used:      18462 strings out of 494578      804304 string characters out of 3169744      3000001 words of memory out of 3000000      21352 multiletter control sequences out of 15000+200000


title: PDF compression automatically with TeXWorks or WinEdt in Windows 7?

text: Currently I use TeXWorks or WinEdt to generate my PDF then open a command window and execute the following to compress the file:               >gswin64c.exe -sDEVICE=pdfwrite -dMaxSubsetPct=100 -dPDFSETTINGS=/ebook -sOutputFile="file_out.pdf" -dNOPAUSE -dBATCH "file.pdf"      Is there a way to automatically include this into the build PDF functions of either TeXWorks or WinEdt? It's a trivial extra step, but one I would like to omit.


title: Center subcaption-based tabulars in a beamer frame

text: I have several tabulars side-by-side using the `subcaption` package in `beamer`: ![enter image description here](http://i.stack.imgur.com/GrktG.png) However, as you can see, they are not quite centered. How can I center the tabulars, so that tabular `RAID5` isn't on the very right and `RAID0` hasn't too much space on the left side? This is my current code:               \documentclass{beamer}     \usepackage{subcaption}          \begin{document}     % ...     \frame{\frametitle{RAID-Types}     \begin{table}[!htb]       \subcaptionbox{RAID0}[.25\linewidth]{%             \begin{tabular}{|c|c|c|}             \hline             0&1&2\\             \hline             3&4&5\\             \hline             6&7&8\\             \hline             \end{tabular}}%       \subcaptionbox{RAID1}[.25\linewidth]{%             \begin{tabular}{|c|c|c|}             \hline             0&0&0\\             \hline             1&1&1\\             \hline             2&2&2\\             \hline             \end{tabular}}%       \subcaptionbox{RAID5}[.25\linewidth]{%             \begin{tabular}{|c|c|c|}             \hline             0&1&P(0+1)\\             \hline             2&P(2+3)&3\\             \hline             P(4+5)&4&5\\             \hline             \end{tabular}}%       \caption{RAID-Types. Each column represents one disk. Each row is a block level.}     \end{table}     }


title: Header/Footer and isov2 document class

text: I am currently using the **isov2** document class. I would like for a header/footer to be on every page (it varies from even to odd). I am using the current code from the fancyhdr package.               % Header and Footer     \usepackage{fancyhdr}     \pagestyle{fancyplain}     \fancyhead{} % clear all header fields     \fancyhead[LE,RO]{\uppercase{ISO/IEEE 11073-10201:2013(E)}}     \fancyhead[RE]{\tiny{\uppercase{Health informatics --- Point-of-care medical device communication}}} % will need to resize later (NOT to tiny)     \fancyhead[LO]{\uppercase{Part 10201: Domain information model}}     \fancyfoot{} % clear all footer fields     \fancyfoot[LE,RO]{\thepage}     \fancyfoot[LO,RE]{Copyright \textcopyright $\;$ 2013 ISO/IEEE. All rights reserved.}     %\fancyfoot[CO,RE]{To: Dean A. Smith}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}      However, I've noticed that both the header and footer only appear on pages before the title page. They "disappear" after the first few pages. I have tried removing the options from the document class but that hasn't helped. I have looked through the iso class PDF as well and can't find a solution. A MWE is included below. Thank you.               \documentclass[draft,wd,letterpaper]{isov2}     \let\ifpdf\relax           % Header and Footer     \usepackage{fancyhdr}     \pagestyle{fancyplain}     \fancyhead{} % clear all header fields     \fancyhead[LE,RO]{\uppercase{ISO/IEEE 11073-10201:2013(E)}}     \fancyhead[RE]{\tiny{\uppercase{Health informatics --- Point-of-care medical device communication}}}     \fancyhead[LO]{\uppercase{Part 10201: Domain information model}}     \fancyfoot{} % clear all footer fields     \fancyfoot[LE,RO]{\thepage}     \fancyfoot[LO,RE]{Copyright \textcopyright $\;$ 2013 ISO/IEEE. All rights reserved.}     %\fancyfoot[CO,RE]{To: Dean A. Smith}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}               \standard{ISO/IEEE 11073-10201}     \yearofedition{2013}     \languageofedition{(E)}     \setcounter{tocdepth}{3}     % ToC includes ssclauses and above          \usepackage{lipsum}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}     \clause{Before Title}     Words before Title     \title{Example Document}{}{}          \newpage     \tableofcontents          \clause{Hello}\lipsum     \sclause{Little}\lipsum     \clause{Second}\lipsum          \end{document}


title: How to decrease page margin of all side of page?

text: Let us consider the following example :               \documentclass[11pt,a4paper]{report}     \usepackage{amsthm}          \begin{document}      \markboth{The Fundamental Theorem of Algebra}{}                    The title of the book is a perfect way to synthesize the point of view of Vin-     cenzo Capasso (VK) about the role played by mathematics in nature and all     human activities, as mentioned by Willi J ̈ger in the Introduction. As VK     a     mentioned in one of his speeches, “it is important that our scientific com-     munity appreciates the importance of theory and mathematics to face the     enormous challenges which arise from the emerging fields of Biology and Medi-     cine, Industry and Economics to improve the quality of Life.” His enthusiasm     and new ideas have brought him in this challenging mission. By transferring     methods and tools from one field to another, by learning novel mathemat-     ical methods and ideas from the observation of real world phenomena and     behavior, and by approaching real industrial problems, he has accepted to     play a fundamental role in both the Italian and European community in the     establishment and reinforcement of communication channels between Acad-     emia (methods) and Industry (applications), being himself a driving force of     the scientific and technological progress that we are observing in our daily     life.               \end{document}        This produces : ![enter image description here](http://i.stack.imgur.com/ysjVD.png) But I'd like to produce the following output : ![enter image description here](http://i.stack.imgur.com/yoALN.png) That is I want to decrease margin of left, right, top and bottom of page. How can I do this ?


title: Annoying box next to the letter

text: Ηow can I get rid of this annoying box next to the letter as well the full stop **update-1:** but to keep the Greek alphabet to the second level ![enter image description here](http://i.stack.imgur.com/GkNqk.png)               \documentclass[b5paper,10pt]{book}          \usepackage[cm-default]{fontspec}     \usepackage{xgreek}     \setmainfont{Arial}          \usepackage{enumitem}     \renewcommand{\theenumi}{\roman{enumi})}                   \begin{document}          \begin{enumerate}      \item text            \begin{enumerate}        \item text       \end{enumerate}          \end{enumerate}          \end{document}


title: How can one determine where in a document a font is used?

text: Looking at the output of `pdffonts`, I see fonts I expect and some I do not. How can I determine where a particular font is used? For example, I see that `SFTT1095` is being used somewhere in one of my documents. Google tells me this is from the `cm-super` package (which I am not using) and that it is the computer modern typewriter font. I don't believe I have any text in typewriter font and I don't see a difference when I change the typewriter font to a different font. Is there a good way to determine what is causing this particular font to be embedded? Some sort of visual pdf debugger would be handy. I suspect that in the end, I'll just end up binary searching my way through the document, but I'm hoping there's a better way.


title: Placing a PDF bookmark to the index page?

text: Using `\usepackage{hyperref}`and the `\pdfbookmark[0]{...}{...}` command you can place a PDF bookmark just _before_ the index page generated with `\printindex` (Sometimes it will point to the empty page before the index.) How can one place a bookmark exactly to the Index title? * * * After reading the answers so far, I have to refine the question a bit it seems. I have now noticed two things that escaped me at first:   * The index is always placed on an odd page. (May be common knowlegde but wasn't for me :-)   * If the even page before the index _has_ text on it, then the bookmark placed before `\printindex` _will_ point to the index page. If there is an empty (even) page inserted, then the bookmark will point to this empty page instead of the index page. I also should have provided the construct that places the index in our custom document class:                \AtEndDocument{        \pdfbookmark[0]{\indexname}{bookmarkForTheIndex}        \printindex      }      Note that I found something talking about AtEndDocument and the index, but I fear I do not quite understand it ... http://www.tug.org/TUGboat/Articles/tb19-1/tb58works.pdf


title: Detect actual start of text

text: I have conditional which is sometimes suppressed, and if it gets typeset needs to be noted. If the conditional text begins with an environment which adds vertical space prior to the actual start of the text, then the `\tikzmark` location needs tweaking. Note how in paragraph mode, the text is appropriately marked, but when starting with an `align*`, or `enumerate` the brace drawn is too large: ![enter image description here](http://i.stack.imgur.com/2ymu3.png) So, what I need is to be able to detect the location of the start of the text and the end of the text, which does _not_ include any leading or trailing space. ## Notes:   * Moving the `\MarkThisText` to be within an `align*` or `enumerate` won't work for me as the entire block may be suppressed, in which case I need to suppress the `begin`, `end` of the environment which would be difficult if the `\MarkThisText` didn't start until after `\begin{align*}`.   * I thought about setting a flag with an `align` and `enumerate` type environments, but that would fail if the `align` or `enumerate` happens to be embedded in the middle of `\MarkThisText`. ## Code:               \documentclass{article}     \usepackage{amsmath}     \usepackage{enumitem}     \usepackage{tikz}     \usetikzlibrary{calc,decorations.pathreplacing}          \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node[baseline] (#1) {};}          \newcommand{\DrawBrace}[3][]{%         \begin{tikzpicture}[overlay,remember picture]             \coordinate (Top) at                  ($(#2.north  -| current page.south east)+(-4.5cm,0.25\baselineskip)$);             \coordinate (Bottom) at                  ($(#3.south -| current page.south east)+(-4.5,-0.25\baselineskip)$);                     \draw [                         line width=1.0pt,                          decoration={brace, amplitude=0.30em},                          decorate, #1,                         ] (Top) -- (Bottom)                         node[rotate=90, midway, below] {Note};         \end{tikzpicture}%     }          \newcommand{\MarkThisText}[2][]{%         %% conditions to determine if this text is to be suppressed omitted         %% \iftoggle{SuppressThisText}{}{%             \tikzmark{Start}%                 \color{#1}%                 #2%                 \color{black}%             \tikzmark{End}%             \DrawBrace[#1]{Start}{End}%         %% } % end \iftoggle{DisplayThisText}     }%          \begin{document}      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at dignissim eros.       Morbi faucibus sit amet felis a accumsan.  Aliquam       dapibus pellentesque dui, vitae aliquam turpis semper eget.           \MarkThisText[blue]{%           Donec egestas leo nibh, at malesuada leo congue non.           Cras laoreet lectus sed tortor laoreet, ac aliquet nibh condimentum.           \begin{align*}              F &= ma \\              \implies E &= mc^2          \end{align*}          Nam elementum ante non nunc facilisis porttitor. Nullam non suscipit lorem.           Sed arcu dui, accumsan et pretium dictum, venenatis id metus.%      }           Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at dignissim eros.       Morbi faucibus sit amet felis a accumsan.  Aliquam       dapibus pellentesque dui, vitae aliquam turpis semper eget.               Text before \verb|align| should \emph{not} be ``noted":      \MarkThisText[red]{%           \begin{align*}              F &= ma \\              \implies E &= mc^2          \end{align*}      }%     Text after \verb|align| should \emph{not} be ``noted".          Text before \verb|enumerate| should \emph{not} be ``noted":      \MarkThisText[brown]{%           \begin{enumerate}              \item List Item 1               \item List Item 2           \end{enumerate}      }%     Text after \verb|enumerate| should \emph{not} be ``noted".     \end{document}


title: Bad rendering of parentheses of binomial coefficient in Beamer

text: I am working with documentclass Beamer version 3.10 and I have a problem with the rendering of the parentheses of the binomial coefficient. Here the code:               \documentclass[aspectratio=169, 8pt]{beamer}     \usefonttheme{serif} %required for article-like displaying of math          \usepackage{amsmath,amssymb}               \begin{document}          \begin{frame}[plain,t]          $\dbinom{n}{k}$          \end{frame}          \end{document}      And this is the output: ![enter image description here](http://i.stack.imgur.com/O9YQg.png) The weird thing is that if I change the documentclass to `article` and comment the line `\usefonttheme{serif}`, then I get ![enter image description here](http://i.stack.imgur.com/G4F1L.png) which is the desired rendering. Any idea of how to correct the printing of the binomial coefficient in beamer? Why this strange behavior in Beamer? Note: I have tried with `\choose`, with `$\displaystyle \binom{n}{k}$` and putting the expression within an `equation` environment, but without success.


title: Which fonts that are part of TeXLive have "real small caps"?

text: The TeX font catalogue doesn't allow you to see which fonts have real small caps. Some fonts do not have real small caps (e.g. any of the `mathdesign` ones). But some do (computer modern and therefore `lmodern` and `cm-super`...) I have restricted this to fonts that come with TeXLive, but I guess answers about other standard LaTeX distributions (MikTeX etc) wouldn't be out of place.


title: newenvironment enumerate

text: I'd like to get a list with the label `$\mathscr{G}_1$`, where `G_1` is the first item in the list. If I use               \newenvironment{enumeratescr}{\begin{enumerate}                         [labelindent=\parindent, leftmargin=*,                         label=$\mathscr{G}_1:$, noitemsep]}                         {\end{enumerate}}      then all the items in the list start with `G_1`. How do I fix this?


title: How to open the designated browser from TeX/PDF

text: Is it possible to insert a command in LaTeX so that on the resulting PDF file the designated/default blank browser can be opened by a click?


title: Vertical spacing of a table cell

text: I want to tabulate formulas, but I find that the lines of the table cells are too close together, and this is aesthetically unsatisfactory. Example (formulae copied from wikipedia):               \begin{tabular}{|c|c|}     \hline     Cylindrical & $\displaystyle{{1 \over \rho}{\partial \over \partial\rho}\left(\rho {\partial f \over \partial \rho}\right)     + {1 \over \rho^2}{\partial^2 f \over \partial \phi^2}  + {\partial^2 f \over \partial z^2}}$\\\hline     Spherical & $\displaystyle{{1 \over r^2}{\partial \over \partial r}\!\left(r^2 {\partial f \over \partial r}\right)     \!+\!{1 \over r^2\!\sin\theta}{\partial \over \partial \theta}\!\left(\sin\theta {\partial f \over \partial \theta}\right)     \!+\!{1 \over r^2\!\sin^2\theta}{\partial^2 f \over \partial \phi^2}}$\\\hline     \end{tabular}      gives this ![table output](http://i.stack.imgur.com/qt2HD.png) and you see that the top of the formulas are chopped by the lines. Suggestions?


title: How can I prevent hyphenation in a table column?

text: I have a table (tabular) with some fixed width columns, and I'd like to prevent a hyphen being inserted (preferring a line break to be inserted prematurely). The sample table's content is below.               \begin{tabular}{p{4cm}p{4cm}}     Want to avoid hyphenation & also want to avoid hyphenation here \\     \end{tabular}      How can I do this? I'd also like to tell latex not to allow each column to exceed its specified width (so I don't want a solution that means assigning hyphenation the same badness rating as an overfull hbox).


title: 2 or 3 matrices side-by-side

text: ![enter image description here](http://i.stack.imgur.com/quLjW.png) How to write the above 2 and 3 matrices side-by-side in Latex ?


title: How to allow page-breaks in columns/list

text: I've got a following fragment to display in two columns:               Some heading    Some longer                     description                       * with                       * a                       * list      I'm using the following def:               \def\DataPair#1#2{%        \defineparagraphs[TwoColumns][n=2]%        \setupparagraphs[TwoColumns][1][width=\LeftColumnWidth,align=left]%        \startTwoColumns%           {\tfx{\sc #1}}%        \TwoColumns%           {#2}%        \stopTwoColumns%     }      Where the content is:               Some longer description     \startitemize[packed]        \item with        \item a        \item list     \stopitemize      Unfortunately the that block ignores page breaking. Is there some way I can allow `\DataPair` to page-break at any point?


title: What is the correct way to do delimiters?

text: I've always used `\left` and `\right` with my delimiters, but Martin Heller's answer to another question indicates that this method gives incorrect spacing. The correction appears to be prepending `\mathopen{}`. Is this the canonical "correct" method? And what exactly does the `\mathopen` command do? A quick Google search does not turn up much useful information on it. The other alternative offered involved the `\biggl` and `\biggr` commands and their ilk. I've never quite felt comfortable with using these because it doesn't feel right to specify these sizes manually. Is there a reason to prefer these commands to `\left` and `\right`?


title: how to create dynamic graphics in latex beamer

text: How can I create a dynamic graphic in latex beamer?. for example, I want to display curves in the same graphic one by one, I mean one at a time. Thanks


title: Beamer: column alignment with tikzpicture inside

text: I am having trouble with using columns in Beamer class. For some reason, I have to display a plot in the left column, then replacing it with another plot to display additional data on it (I can not overlay within the plot itself since pgfplots does not support overlaying single coordinates, whatever...). For this I have to use the `\only<>` command to display a picture, then another. My current issue is that I am not able to keep alignment of right column (which contains always the same elements) between different slides even within an overprint environment. Here is a MWE               \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[frenchb]{babel}     \usepackage{tikz}     \usetheme{Frankfurt}          \begin{document}          \begin{frame}\frametitle{test}     \begin{columns}[onlywidth,T]         \begin{column}{.7\textwidth}             \begin{overprint}             \centering             column 1\\             \only<2>{\tikz \draw (0,0) circle (.5cm);}             \only<3->{\tikz \draw[blue] (0,0) circle (2cm);}             \end{overprint}         \end{column}              \begin{column}{.3\textwidth}             \begin{overprint}             \centering             column 2\\             {\tikz \draw (0,0) circle (1cm);}             \end{overprint}         \end{column}               \end{columns}     \end{frame}                    \end{document}      This MWE shows that column 2 has a little vertical shifts between slides 2 and 3. I don't get it : since I am in an overprint environment, column alignments should be done with the highest object enclosed, i.e. the blue circle, but it does not work. I tried do change column alignment argument (`t`, `T`, `c`, etc.) and tried "overlayarea" but it didn't work either. I hope you can help me.


title: Non-uniform scale of page size

text: I have a beamer talk to be presented. The screen is 16:9, but the system is set up in such a way that 4:3 information is sent to the projector and then non-uniformly scaled to 16:9, causing, of course, very bad and ugly effects. However, I'm not allowed/able to change it. Therefore I would like to prepare PDF slides in such a way that I make 16:9 slides and stretch them in one direction to fit in 4:3 page. I tried to understand the `pgfpages` manual and it seems that there's a `xscale` option, which is probably what I look for. However, it is an argument to `\pgfpageslogicalpageoptions` which doesn't make any sense to me. So, how can I make the following MWE output slides like the one below? _Remark 1: The correct value is`xscale=(4:3)/(16:9)=0.75`._ _Remark 2: Post-processing the PDF file by an external application is an option, too. However, it should keep the vector structure of the file and not convert it to a bitmap (like`convert` from ImageMagick does)._               \documentclass[aspectratio=169]{beamer}          \usetheme{Warsaw}          \usepackage{pdfpages}     % what to put here?          \begin{document}          \begin{frame}     \frametitle{16:9 to 4:3}          \Huge A B C D E F G H I J K L M N O P Q R          \centerline{a square $\rightarrow$ \rule{2cm}{2cm} $\leftarrow$ or not?}     \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/TIR14.png)


title: Changbars to indicate location of conditional text

text: I am using `etoolbox` as per this question on LaTeX conditional expression, and would like to modify the conditional to print some sort of indicator (like a vertical change bar in the margin) to show that the text displayed is conditional and subject to change. In the final version I intend to remove these change bars, but until then these indicators would be helpful in reviewing the document. Other acceptable alternatives would be to underline, or highlight the conditional text, but think that that might be too distracting. Based on Putting a bar in the margin I attempted to use `changebar`, `framed`, and `pdfcomment`, but can't seem to get them to work. I think using the `framed` package is not an option as that seems to insert a new line in paragraph mode. I was able to get the `changebar` version working in text mode, but can't get any one of them to work in math mode. Also, within an `align*`, I can use `\iftoggle` just fine (with an alignment character in between, ie as part of one of the arguments to `\iftoggle`), but can't seem to get on of the macros that are `\iftoggle` with some additional functionality working.               \documentclass[fleqn]{article}          \usepackage{amsmath}     \usepackage{etoolbox}     \usepackage{xcolor}     \usepackage[color]{changebar}     \usepackage{framed}     \usepackage[subject={Top1},author={Peter}]{pdfcomment}          \newtoggle{paper}     \toggletrue{paper}          \newcommand{\MyToggleC}[3]{% Try {changebar} package         \iftoggle{#1}{%             \cbcolor{red}\cbstart#2\cbend%         }{%             \cbcolor{blue}\cbstart#3\cbend%         }%     }%               % This seems to insert a new line, so probably can't use this     \newcommand{\MyToggleF}[3]{% Try {framed} package         \iftoggle{#1}{%             \begin{leftbar}%                 #2%             \end{leftbar}%         }{%             \begin{leftbar}%                 #3%             \end{leftbar}%         }%     }%          \newcommand{\MyToggleP}[3]{% Try {pdfcomment} package         \iftoggle{#1}{%             \begin{pdfsidelinecomment}[color=red,icolor=blue,caption=inline,linebegin={/Butt},lineend={/Square},linewidth=2bp,linesep=1cm]{Example}%                 #2%     \end{pdfsidelinecomment}%         }{%             \begin{pdfsidelinecomment}[color=red,icolor=red,caption=inline,linebegin={/Butt},lineend={/Square},linewidth=2bp,linesep=1cm]{Example}%                 #3%             \end{pdfsidelinecomment}%         }%     }%              \begin{document}              % This part works only with the {changebar} version: \MyToggleC         This document is intended for          \MyToggleC{paper}{paper}{electronic}         distribution.              % Can't get this to work with any version (ie can't get any change bars to show)         \begin{align*}             a &= b\\             \MyToggleC{paper}{c}{}&\MyToggleC{paper}{= d}{}\\             e &= f\\         \end{align*}              % But would prefer something like this as this won't leave a blank line         % if the toggle is disabled. This now works with the updated \MyToggleC         % but the changebars are not shown.         \begin{align*}             a &= b\\             \MyToggleC{paper}{                 c &= d\\             }{}             e &= f\\         \end{align*}          This should highlight the first two lines, not just the first line     \begin{align*}     f(x)=         \begin{cases}             \MyToggleT{paper}{             -1  &\text{ for } x < 0\\             0   &\text{ for } x = 0\\             }{}             1   &\text{ for } x > 0         \end{cases}     \end{align*}          This should highlight four lines of this, not just one     \begin{align*}     f(x)             &={-\frac{7}{1.5} -{1}}+{\frac{7}{3}-{5}}\\     \MyToggleT{paper}{             &= -\frac{14}{3} -\frac{3}{3} +\frac{7}{3}-\frac{15}{3}\\             &=-\frac{17}{3}            -\frac{8}{3}\\             &=\frac{-17-8}{3}\\\             &=\frac{-25}{3}\\     }{}             &=-8\frac{1}{3}     \end{align*}          \end{document}      **2011-07-15 Update:** The macro \MyToggleC changed to use the macros instead of the `changebar` environment. This seems to work, better in that the conditional text is properly displayed, but still can not get the changebars to show within the `align` environment. So, now it seems that my only problem is to get the changebars to display within the math environments. Ideally I would prefer to have a macro such as `\ifpaper`, `\ifelectronic` which both take one parameter and enable printing of the text based instead of having to have an empty `{}` for the `else` clause. Epsecially important is that within the `align` environment, only the particular lines get flagged, not the entire `align` environment. **2011-07-21 Update** The solution provided seems to work great, but ONLY if it is used in text mode first before it is used in math mode. Without using in text mode first, the change indicators disappear on the second run (they show up in the first run, but not the second). In the MWE example below, things look great on the second run, but not if the `def\PrintTextLineWithChanges` is commented out:               \documentclass[fleqn]{article}          \usepackage{amsmath}     \usepackage{etoolbox}     \usepackage{xcolor}     \usepackage{tikz}     \usetikzlibrary{calc,fit}          \newlength\togglelen     \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {\vphantom{X}};}     \makeatletter     \newcommand{\MyToggleT}{\@ifstar\MyToggleTT\MyToggleTN}     \newcommand{\MyToggleTN}[3]{%         \setlength{\togglelen}{\hoffset}%         \addtolength{\togglelen}{1in}%         \addtolength{\togglelen}{\oddsidemargin}%         \addtolength{\togglelen}{\leftskip}%         \iftoggle{#1}{%           \tikzmark{first}#2\tikzmark{second}%           \begin{tikzpicture}[remember picture,overlay]             \coordinate (one) at ($(first.north -| current page.south west)+(\togglelen,0)$);             \coordinate (two) at ($(second.south -| current page.south west)+(\togglelen,0)$);             \node[fit=(one) (two),fill=red,minimum width=3pt,inner             sep=0pt,anchor=base east] {};           \end{tikzpicture}%         }{%           \tikzmark{first}#3\tikzmark{second}%           \begin{tikzpicture}[remember picture,overlay]             \coordinate (one) at ($(first.north -| current page.south west)+(\togglelen,0)$);             \coordinate (two) at ($(second.south -| current page.south west)+(\togglelen,0)$);             \node[fit=(one) (two),fill=blue,minimum width=3pt,inner             sep=0pt,anchor=base east] {};           \end{tikzpicture}%         }%     }%     \newcommand{\MyToggleTT}[3]{\MyToggleTN{#1}{#2}{#3}\\}%     \makeatother                    \newtoggle{paper}     \toggletrue{paper}          \def\PrintTextLineWithChanges{}%  Nothing gets flagged with this commented.          \begin{document}     The lines with an $\oplus$ should be flagged.          \ifdefined\PrintTextLineWithChanges         Need text to use the MyToggleT macro here         otherwise things don't work         \MyToggleT{paper}{some text}{some other text}     \fi               \begin{align*}     f(x)=         \begin{cases}             \MyToggleT*{paper}{             -1  &\text{ for } x < 0 \oplus\\             0   &\text{ for } x = 0 \oplus             }{}             1   &\text{ for } x > 0         \end{cases}     \end{align*}          This should highlight four lines indicated with $\oplus$     \begin{align*}     f(x)             &= a\\     \MyToggleT*{paper}{             &= b\oplus\\             &= c\oplus\\             &= d\oplus\\             &= e\oplus     }{}             &=f     \end{align*}          \end{document}


title: Curly quotes in non-default font with xelatex

text: I have the following:               \usepackage{fontspec}     \setromanfont [Ligatures={Common}, Numbers={OldStyle}]{Palatino}      And compile with this:               xelatex main.tex      I use:               ``word''      But the quotes are never curly as they should be. I can only get the curly quotes when using the default font. Ideas?


title: Command-line tools for some bibtex database manipulations

text: Inspired by an answer to another question, I am reminded of the various reasons why it's difficult to have only one BIB file. I would like to have a set of command line tools that I could script to take my 'master' BIB and convert it for a specific situation. I am aware of bibtool which is probably powerful enough that it can meet most of my needs, but I haven't figured out how to use it... Here are some common tasks that could be automated this way. Of course, the strategic goal would be solved 'the right way' by using a smarter BST (or something like biblatex) but often one is constrained (or at least it is _much_ more convenient) to use a publisher's broken BST and make a few tweaks to the database:   1. Truncate all papers with more than 5 authors, and keep only the first 3 authors of any truncated papers (because you are running low on space)   2. Remove a field (month, url, ISSN, ISBN) because a journal has a broken BST that makes a mess of these    3. Remove a field conditionally (eg, remove title only for articles but not books)   4. Expand/collapse @string references (eg, I have 2 files, one `apsjour.bib` with   `@STRING{prl = {Phys. Rev. Lett.}}`   and one `fulljour.bib` with   `@STRING{prl = {Physical Review Letters}}`   so I can write `\bibliography{apsjour,articlebib}` or `\bibliography{fulljour,articlebib}` as required, but I certainly don't expect my co-authors to deal with this convention.   5. Remove `archiveprefix`, `eprint`, `primaryclass` from `@article`s with a page number   6. Remove `DOI`s with weird characters in them because the documentclass doesn't do enough escaping (seriously, Wiley, is   `10.1002/(SICI)1521-3978(200005)48:5/7<531::AID-PROP531>3.0.CO;2-#`   **really** a good idea for something that needs to end up in a URL?)   7. A tool that is flexible enough to do more sophisticated things would be nice, so long as the flexibility isn't at the price of usability (cf bibtool)   8. There are probably other use cases that I've temporarily forgotten. I feel like I'm forever making journal-specific or even paper-specific modifications of bibtex databases. JabRef makes it fairly easy, but still... There are lots of cute tools living on CTAN in tex-archive/biblio/bibtex/utils but I feel that there _must_ be some other place where the _serious_ tools hide. I can't be the only one with these problems, can I? (Feel free to tell me that I'm approaching this the wrong way and let me know your personal strategy for dealing with the above issues without using commandline tools! This includes, as Jukka Suomela suggests in his answer, tools for editing the generated BBL file instead of editing the BIB.) Here are some problems that I already know of solutions for:   1. Process an AUX file to keep only the cited entries (many solutions, including bibextract)   2. Merge BIB files and remove duplicates (pybib)   3. Force a particular format of page ranges (1234-56 or 1234-1256) (bibfile-reformat-pages)


title: Change appearance of equation numbers locally

text: In the MWE below, I would like to have the `equation numbers` in the Chapter "Appendix" (but only there!) being displayed as follows: (A.1), (A.2), (A.3) ...               \documentclass{book}          \usepackage{amsmath}     \usepackage{mathtools}               \usepackage[titletoc]{appendix}     \usepackage{titlesec}            \usepackage{titletoc}     \usepackage{ntheorem}          \newtheorem{prop}{Proposition}          \numberwithin{equation}{chapter}     \numberwithin{prop}{section}          \begin{document}          \chapter{Test Chapter}     \section{XY}          \begin{prop}     \begin{equation}     1+2=3     \end{equation}     \end{prop}          \begin{appendices}          \newtagform{WithA}{(A}{)}                   \usetagform{WithA}                          \newcommand{\Aref}[1]{(A\ref{#1})}               \renewcommand\thechapter{}                                                    \makeatletter                                                            \def\chaptermark#1{\markboth{\MakeUppercase{\@chapapp. \  #1}}{}}        \makeatother                                                                  \chapter{Additional stuff nobody is interested in}          \titleformat{\section}[runin]                                              {\normalfont\normalsize\bfseries}{}{1em}{}                             \titlespacing*{\section}                                                   {0pt}{3.25ex plus 1ex minus .2ex}{1em}                                 \titlecontents{section}[1.5em]                                             {}{}{}{\titlerule*[7.5pt]{.}\contentspage}                                  \begin{prop}\label{y}     \begin{equation}           a+b=c     \end{equation}     \end{prop}     Equation (\ref{x}) in Proposition \ref{y} is nice.       \end{appendices}          \end{document}      EDIT: I have edited my example --> It now produces the desired output, but it doesn't seem to be very elegant! A major drwaback of my solution is that I am bound to forget to use `\Aref` insted of `\ref` when referring to equations in the appendix. Hence a solution which does this automatically would be highly appreciated! Hence, I modify my question to: Are there any **better** solutions?


title: Make \section unaffected by \parfillskip

text: **To avoid widow words at the last line of a paragraph, I adjust`parfillskip`:**               \parfillskip 0pt plus 0.75\textwidth      While this gives nicer paragraphs, it also stretches section titles a little, as you can see below. The first title is with the default `parfillskip`, the second with `0pt plus 0.75\textwidth`: ![](http://i.stack.imgur.com/uFm1N.png) **How can I keep my`parfillskip` setting for paragraphs, but not for titles?** This code showcases the effect for text and titles (preview):               \documentclass{article}     \usepackage{lipsum}     \begin{document}     \section{This is a section title}     \lipsum[1]     \section{This is a section title}          % Fill the last line of paragraphs for minimum 25%     \parfillskip 0pt plus 0.75\textwidth     \section{This is a section title}     \lipsum[1]     \end{document}


title: How do I set up my LaTeX document to enable me to cite from my BibTeX bibliography?

text: This may be an overly simplistic question but please bear with me... I have a BibTeX bibliography containing all of my references, set up using BibDesk. I am now trying to cite these references in my LaTeX documents. Following the advice on the LaTeX wikibooks page, I have included the following lines into my LaTeX document...               \bibliographystyle{plain}     \bibliography{/Users/Graeme/Documents/References/BIBliography.bib}      ... where `BIBliography` is my `.bib` file, created in BibDesk. Unfortunately, when I cite something in the document, using `\cite{citekey}` and typeset the document, the log tells me that there were undefined references. In the `.pdf` that is produced, there is a `[?]` where the references should be. Am I doing something wrong? Do I need to store my `.bib` for in a particular location? I know there can be some errors that mean you need to typeset the document several times, but I have tried countless times to no avail. I would be very grateful if someone could help out.


title: Editors supporting unicode

text: For some reason it seems that my favourite editor TeXnicCenter doesn't support unicode (correct me please if I'm wrong, which wouldn't be the first time). Can anyone recommend an editor which does, for Windows platform? Simplicity is appreciated.


title: numbers before decimal separator do not align in table column

text: I want a table column that is aligned at the decimal separator. For that I use the S column type defined by the siunitx package. However, when I do this, the numbers left of the decimal separator are not aligned at all (nor are the group separators). I am using the MinionPro package and I think the alignment issue is caused by this font. Is there an easy way to solve the alignment problem while keeping the MinionPro font for the (main) text? Thanks in advance


title: Spanish Babel causes accents in start of sentence to stretch cell height

text: When the **first** letter of a sentence in a table cell has an accent, the cell height is stretched and it looks strange. This only happens when I use the Babel package (with Spanish) so I think it may be the cause. Example:               \documentclass[11pt]{article}          \usepackage[utf8]{inputenc}     \usepackage[spanish]{babel}          \begin{document}     \begin{table}     \begin{tabular}{|p{1cm}|}             \hline             AÁ  \\             \hline             ÁA \\             \hline         \end{tabular}     \end{table}     \end{document}      Produces: ![Table cell height stretched](http://i.stack.imgur.com/j7wUa.png) If I remove `\usepackage[spanish]{babel}` or replace `p{1cm}` with `l` the two cells have the same height.


title: Incorrect plot values using pgfplots

text: I'm trying to plot the following function:               \begin{tikzpicture}     \begin{axis}[       ymin = 0, width=17cm, height=19cm, grid = major,       use units,  x unit=mm,  y unit=j.u, xlabel=x,  ylabel=I]          \addplot[blue,thick,mark=none,      domain=-10:10,samples=120]     { (sin(120*x)/(120*x)*cos(100*x))^2};               \end{axis}     \end{tikzpicture}      What I get is this: ![enter image description here](http://i.stack.imgur.com/R3FKT.png) and what should I gest is that: ![enter image description here](http://i.stack.imgur.com/gFkYF.png) They look pretty simmilar but the wrong figure y values ranges from 0 to 3x10^(-4) when they sould range form 0 to 1. I already solved the readian - degrees problem. But this one is something above my skilz :p.


title: Can SyncTeX work across included files?

text: I am using the `memoir` class in Texmaker. As far as I understand adding               --synctex=1      to the LaTeX and PDFLaTeX command will make the output document open up at the cursor position of the code. So if I left my cursor at the start of a particular piece of text on a random page the pdf will open up at that page. It also enables the "click to jump to line". Since I am typing a large document I an using `\include` to include all my chapters. This means when I compile I have to compile a master document. This means the cursor is now wherever I left it in the master document. This is a huge pain since the pdf output is sometimes nowhere near the most recently edited part that I want to view. If I am working in Chapter 5 I can go leave the cursor after               \include{chapterfive}      but then the output is always on the last page of the chapter and I still need to scroll to the relevant part. As you can imagine this becomes very tiresome very quickly. So I need help configuring Texmaker so that the PDF output opens up at the last place that I edited. EDIT: I found a workaround. I followed this answer: Typesetting multiple TeX files to be able to compile each chapter individually. And it worked 100%.


title: Drawing mechanical systems using TikZ

text: This is a follow-up question to Drawing Mechanical Systems in LaTeX. I have tried to do similar things, i.e. to model simple mechanical systems. For example:               \begin{tikzpicture}[M1/.style={rectangle,draw=black,minimum size=2cm,thick}]              \tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.3cm,post length=0.3cm,segment length=5}]         \tikzstyle{ground}=[fill,pattern=north east lines,draw=none,minimum width=0.75cm,minimum height=0.3cm]         \node [M1] (M1) {};         \node (wall1) [ground, minimum width=3cm,yshift=-3cm] {};         \draw (wall1.north west) -- (wall1.north east);         \draw [spring] (wall1.170) -- ($(M1.south east)!(wall1.170)!(M1.south west)$) node[pos=.5,left] {$k_2$};         \draw [spring] (wall1.10) -- ($(M1.south west)!(wall1.10)!(M1.south east)$) node[pos=.5,right] {$k_3$};         \node (wall2) [ground, minimum width=3cm,yshift=3cm] {};         \draw (wall2.south west) -- (wall2.south east);         \draw [spring] (wall2.170) -- ($(M1.north east)!(wall2.170)!(M1.north west)$) node[pos=.5,left] {$k_1$};         \draw [-latex,thick] (1.5,0) -- (1.5,1) node [pos=.5,right] {$x$};         \filldraw circle (.05) node [pos=.5,below] {\tiny $CG$};         \node [rotate=90,above] at (M1.west) {Mass,$m$};         \node at (0,-3.5) {(a)};             \begin{scope}[xshift=5cm]                 \node [M1] (M1) {};                 \node (wall1) [ground, minimum width=3cm,yshift=-3cm] {};                 \draw (wall1.north west) -- (wall1.north east);                 \draw [spring] (wall1) -- ($(M1.south east)!(wall1)!(M1.south west)$) node[pos=.5,left] {$k_2^*$};                 \node (wall2) [ground, minimum width=3cm,yshift=3cm] {};                 \draw (wall2.south west) -- (wall2.south east);                 \draw [spring] (wall2) -- ($(M1.north east)!(wall2)!(M1.north west)$) node[pos=.5,left] {$k_1$};                 \draw [-latex,thick] (1.5,0) -- (1.5,1) node [pos=.5,right] {$x$};                 \filldraw circle (.05) node [pos=.5,below] {\tiny $CG$};                 \node [rotate=90,above] at (M1.west) {Mass,$m$};                 \node at (0,-3.5) {(b)};             \end{scope}     \end{tikzpicture}      Now I have the following problem: The spring k1 in part a is connected to the wall, but to the wrong side. I have tried several things, but nothing worked. Link: Drawing Mechanical Systems in LaTeX Figure here: ![Mechanical System Example](http://i.stack.imgur.com/FOxSW.gif)


title: tikz, overlay pgf pictures

text: I have three tikz/pgf pictures which I want to overlay using something like that               \subfloat[]{     \begin{tikzpicture}     \draw [yshift=5cm](0,0) rectangle (5,5);     \end{tikzpicture}     \scalebox{0.71}{\input{figures/hahn_long.pgf}}     \scalebox{0.4}{\input{figures/hahn_short.pgf}}      but that doesn't work, since it draws the three pictures, one after another (even the `yshift` has no effect). How can I do that?


title: How can I get interline spacing to ignore a vbox?

text: > **Possible Duplicate:**   >  Make an invisible vbox I want to insert a `\vbox` between paragraphs, but I do not want it to affect interline spacing. I'm using Plain TeX. Here is my MWE:               \input plain     asdljflasd dasjfdlf lasdfdflaslfjlsadf sajf lsdfas Lorem ipsum dolor     sit amet, consectetur adipiscing elit. Quisque sollicitudin pretium\par     \nointerlineskip\vbox to 0pt{\hbox to 0pt{\hskip -10pt *}\kern0pt}\nointerlineskip     In hac habitasse platea dictumst. Etiam rutrum blandit velit sed     rutrum. Curabitur rhoncus erat a turpis suscipit vitae rutrum turpis          \bye      The below shows bad spacing between the two paragraphs (where the asterisk appears): ![Bad Spacing](http://i.stack.imgur.com/Vj7me.png) Commenting out the line beginning with `\nointerlineskip` gives correct spacing between the two paragraphs: ![Good spacing](http://i.stack.imgur.com/A6MSg.png) How do I get my `\vbox` and correct interline spacing? Apologies for the huge images.


title: What is going on with kerning when comparing math italics to italics?

text: Consider this example:               \documentclass{article}          \begin{document}         \begin{tabular}{ll}             Math    & $AUC$ \\             Italics & \textit{AUC} \\         \end{tabular}     \end{document}      ![](http://i.stack.imgur.com/ghvPM.png) In math mode the C is too far away from the U and in italics the space seems to be the same between A and U. Is there a reason for these strange kernings and are these set in stone and will never be changed or can one expect them to be improved sometime in the future?


title: Ignore pagebreak at some pages

text: I need to have no empty lines at some pages of the document. The reason for it is that I'm putting a table on some pages that is pretty long, and I used scalign `\scalebox` and `\centerline` for it, but I can't make it any smaller, since it won't be readable. What i mean is that I have empty lines at the top of the page, then my table right to the end of it, and I have page number inserted inside the table (and I want not to have it, but can't remove numbering on the entire doc. It's necessary). If you can't imagine it, here's a screenshot: ![You can see there is 9 as it's a page number](http://i.stack.imgur.com/A2gsr.png)


title: Using exercise package correctly

text: Please correct my code as necessary. It is not compiling due to               ! Package exercise Error: You don't respect the hierarchy of questions.          See the exercise package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.13 \begin{Question}W                           hat is the symbol for copper?\end{Question}     ?       The code is as follows:               \documentclass[12pt]{article}     \usepackage[a4paper]{geometry}     \usepackage{mhchem}               \usepackage[lastexercise]{exercise}          \begin{document}     \section{Naming of Chemical Compounds - A ``DIY'' Tutorial}          \begin{Exercise}[title=DIY]\end{Exercise}     \begin{ExePart}Question 1\end{ExePart}     \begin{Question}What is the symbol for copper?\end{Question}     \begin{Answer}\ce{Cu}\end{Answer}          \end{document}      It could be that I've missed something but the documentation does not even provide an example of the package's usage.


title: Aligning the decimal point using siunitx and longtable?

text: I have just discovered that I couldn't do alignment of the decimal points using the `siunitx` and `longtable` packages. It throws errors, just to mention some for e.g.:               Invalid numerical input 'e' Col1 & Col2 & n & Mean &         Duplicate exponent marker token '\token_to_str:N d' in input Col1 & Col2 & n & Mean & Median &     Invalid numerical input 'edi' Col1 & Col2 & n & Mean & Median &     Overfull \hbox (9.16669pt too wide) detected        This is a MWE of the problem stated above:               \documentclass{scrbook}     \usepackage[table-format=2.2]{siunitx}     \usepackage{longtable,booktabs}     \begin{document}     \begin{longtable}[l]{llcS[table-format=4.2]SSS}      \caption{Some caption here for the long table.}\label{tab:somelabel}\\     \toprule      Col1 & Col2 & n & Mean & Median & SD & P \\     \midrule     \endfirsthead     \midrule     Col1 & Col2 & n & Mean & Median & SD & P \\     \midrule     \endhead     \midrule     \endfoot     \midrule     \endlastfoot      A & Negative &  18 & 38.90 & 2.53 & 3.53 & 0.12 \\      A & Positive &  16 & 960.00 & 8.58 & 5.56 &  \\      C & Negative &  18 & 98.50 & 1.14 & 1.48 & 0.75 \\      C & Positive &  16 & 59.40 & 3.51 & 5.19 &  \\      A & Negative &  18 & 13.70 & 3.98 & 5.12 & 0.20 \\      A & Positive &  16 & 765.00 & 4.88 & 5.75 &  \\      C & Negative &  18 & 33.80 & 2.64 & 3.85 & 0.10 \\      C & Positive &  16 & 645.00 & 19.30 & 27.20 &  \\      A & Negative &  18 & 25.90 & 5.30 & 6.77 & 0.98 \\      A & Positive &  16 & 173.00 & 2.38 & 2.96 &  \\      C & Negative &  18 & 182.00 & 9.10 & 13.30 & 0.03 \\      C & Positive &  16 & 6676.00 & 69.20 & 101.00 &  \\      A & Negative &  18 & 3.57 & 1.87 & 1.70 & 0.38 \\      A & Positive &  16 & 108.00 & 1.93 & 1.51 &  \\      C & Negative &  18 & 6.96 & 1.27 & 0.59 & 0.01 \\      C & Positive &  16 & 143.00 & 3.71 & 4.30 &  \\      A & Negative &  18 & 14.90 & 2.07 & 2.64 & 0.04 \\      A & Positive &  16 & 693.00 & 7.03 & 8.37 &  \\      C & Negative &  18 & 85.20 & 1.07 & 1.49 & 0.09 \\      C & Positive &  16 & 295.00 & 16.50 & 23.70 &  \\      A & Negative &  18 & 82.70 & 6.19 & 7.42 & 0.31 \\      A & Positive &  16 & 1363.00 & 16.90 & 23.60 &  \\      C & Negative &  18 & 63.70 & 2.15 & 2.78 & 0.03 \\      C & Positive &  16 & 1101.00 & 24.40 & 34.70 &  \\      A & Negative &  18 & 91.40 & 18.30 & 26.00 & 0.39 \\      A & Positive &  16 & 3428.00 & 30.40 & 43.60 &  \\      C & Negative &  18 & 37.00 & 11.90 & 17.60 & 0.84 \\      C & Positive &  16 & 1822.00 & 7.26 & 10.60 &  \\      A & Negative &  18 & 14.10 & 4.44 & 3.65 & 0.20 \\      A & Positive &  16 & 404.00 & 4.27 & 5.22 &  \\      C & Negative &  18 & 40.70 & 2.94 & 4.10 & 0.08 \\      C & Positive &  16 & 769.00 & 21.30 & 30.20 &  \\      A & Negative &  18 & 6.28 & 2.19 & 2.11 & 0.31 \\      A & Positive &  16 & 397.00 & 5.25 & 7.63 &  \\      C & Negative &  18 & 209.00 & 1.69 & 2.44 & 0.51 \\      C & Positive &  16 & 809.00 & 11.80 & 16.40 &  \\      A & Negative &  18 & 712.00 & 15.40 & 22.10 & 0.63 \\      A & Positive &  16 & 3277.00 & 56.30 & 82.00 &  \\      C & Negative &  18 & 2360.00 & 106.00 & 158.00 & 0.47 \\      C & Positive &  16 & 4877.00 & 148.00 & 218.00 &  \\      A & Negative &  18 & 20.10 & 4.08 & 5.19 & 0.08 \\      A & Positive &  16 & 346.00 & 11.80 & 17.20 &  \\      C & Negative &  18 & 4.63 & 1.03 & 1.05 & 0.03 \\      C & Positive &  16 & 276.00 & 7.14 & 10.20 &  \\     \end{longtable}          \end{document}      **Notes:** Texlive 2013   siunitx: Released 2013/07/11


title: Difference between \textrm{} and \mathrm{}

text: Can you explain me what is the difference between `\textrm{}` and `\mathrm{}` when they are used in math mode. In what context one is preferred over the other?


title: Reuse an image resp. a box in TikZ but have side-effects only once

text: I have a huge document (a pool of exercise problems) with lots of `\input` statements (one file per subexercise). In order to not get lost in this mess and easily open files from the PDF, I include a margin note with a link to the included file at every `\input` and `\includegraphics`. Now I started seeing warnings like               LaTeX Warning: Label `note.1.1' multiply defined.      I narrowed the issue down to this MFE:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{external}     \tikzexternalize     \tikzset{external/mode=list and make,%              external/export=true}          \usepackage{marginnote}     \newcommand{\inclimage}[2][]{%       \marginnote{\texttt{#2}}\includegraphics[#1]{#2}%     }          \begin{document}       \def\icon{\inclimage[width=100pt]{example-image.png}}       \begin{tikzpicture}         \node {\icon};       \end{tikzpicture}       \begin{tikzpicture}         \node {\icon};       \end{tikzpicture}     \end{document}      The document needs two runs to translate, and compilation of the externalized pictures in between. I'm reasonably certain that `list and make` is not relevant to the problem, but that's how I use it. Now, in the aux file I find:               \def \dpthimport {\newmarginnote {note.1.1}{{\themn@abspage }{0sp}}}\dpthimport      Remove either TikZ externalization or the margin note business, the warnings vanish. In fact, without externalization the aux file contains only               \newmarginnote{note.1.1}{{2}{10000988sp}}      The use of `\dpthimport` seems to be related to externalization. So, the problem seems to be that when translating each picture for itself (due to externalisation), `marginnote` picks the same label name for each instance of `\icon` which then conflict when the whole document is compiled (again). I tried to define the image once and reuse it inside the pictures.   * With save boxes:              \begin{document}       \newsavebox{\IconBox}       \sbox{\IconBox}{\tikz\node{\inclimage[width=100pt]{example-image.png}};}            \begin{tikzpicture}         \node {\usebox{\IconBox}};       \end{tikzpicture}       \begin{tikzpicture}         \node {\usebox{\IconBox}};       \end{tikzpicture}     \end{document}      Same warning, two margin notes (with weird positions).   * With `pic` from TikZ 3.0:              \begin{document}       \tikzset{%         icon/.pic={\node {\inclimage[width=100pt]{example-image.png}};}       }       \begin{tikzpicture}         \pic {icon};       \end{tikzpicture}       \begin{tikzpicture}        \pic {icon};       \end{tikzpicture}     \end{document}      Same warning, no margin note. How can I define an image resp. a box in such a way that   * it is expanded only once, i.e. side-effects (such as margin notes) apply only once, and   * it can be reused in a TikZ image?


title: Change default compiler by drop-down button in WinEdt

text: I use `PDFTeXify`, `PDFLaTeX` and `XeLaTeX` usually. In WinEdt there is a drop-down button on toolbar that has all of these compile methods. I am wondering whether one can define a button/hotkey or change the compile.edt in a way that when the button/hotkey is pressed or compile (Accessories->Compile) is executed, the compiler method selected in the drop- down button is executed? To clarify, `when XeLaTeX is required` and is selected from the drop-down button, compile (Accessories->Compile) does not work and shows error. I have to press the drop-down button to compile the code. I know that I can define hotkey for each of the compilers in the drop-down button, but It would be great to define just `one hotkey` or change the compile.edt that executes the selected compiler in the drop-down button.


title: Why I can not align this equations?

text: I could can align first line with other lines               \begin{eqnarray*}     \dfrac{\partial^2 P_{ijl}}{\partial \tau_l \partial \phi} & = &\dfrac{\partial}{\partial \tau_l}\left(P_{ijl}(1-P_{ijl})\frac{\partial \eta_{ijl}}{\partial \phi}\right) \\          & = &\dfrac{\partial P_{ijl}}{\partial \tau_l}\left(1-P_{ijl}\right)\frac{\partial \eta_{ijl}}{\partial \phi}+\frac{\partial \left(1-P_{ijl}\right)}{\partial \tau_l}P_{ijl}\frac{\partial \eta_{ijl}}{\partial \phi}+P_{ijl}(1-P_{ijl})\frac{\partial }{\partial \tau_l}\left(\frac{\partial \eta_{ijl}}{\partial \phi}\right) \\          & = &  ${P_{ijl}}{(1-P_{ijl})^2}$\dfrac{\partial \eta_{ijl}}{\partial \phi}-P^2_{ijl}\left(1-P_{ijl}\right)\frac{\partial \eta_{ijl}}{\partial \phi}+0 \\          & = &  ${P_{ijl}}{(1-P_{ijl})}(1-{2P}_{ijl})$\dfrac{\partial \eta_{ijl}}{\partial \phi}     \end{eqnarray*}


title: Document Class for Reference Cards

text: I've seen a bunch of reference cards (either obviously or known-to-be TeX'd) that look exactly alike in format. Is there a `documentclass` or environment that's being done to enable this or, if not, how could it be implemented in a LaTeX-y, separate-content-from-formatting kind of way?   * http://orgmode.org/orgcard.pdf   * http://refcards.com/docs/silvermanj/tex/tex-refcard-a4.pdf   * http://www.stdout.org/~winston/latex/latexsheet.pdf   * http://refcards.com/docs/gildeas/gnu-emacs/emacs-refcard-a4.pdf


title: Defining an environment that leaves the surrounding environment

text: I'd like to define an environment like this:               \newenvironment{antiitemize}{\end{itemize}}{\begin{itemize}}      I call it `antiitemize` because I intend to use it inside an `itemize` environment to break out of the list for a short while, e.g. to write a comment that's not really part of the list. For instance, I would like to write               \documentclass{article}          \newenvironment{antiitemize}{\end{itemize}}{\begin{itemize}}          \parindent=0pt          \begin{document}          Donec aliquam quam sed enim bibendum, quis ultrices felis porttitor.          \begin{itemize}          \item Lorem ipsum dolor sit amet, consectetur adipiscing elit.           \item Quisque ac porttitor lectus.          \begin{antiitemize}     Mauris a libero laoreet, iaculis arcu et, tincidunt quam.     \end{antiitemize}          \item Suspendisse auctor leo ut felis lobortis commodo vel quis diam.          \end{itemize}          Morbi nec rhoncus ante.          \end{document}      However, this doesn't work. LaTeX seems not to like that the environments are ill-nested. I've found a work-around that involves defining a pair of commands to start and end the `antiitemize` environment manually, like so.               \documentclass{article}          \def\antiitemize{\end{itemize}}     \def\endantiitemize{\begin{itemize}}          \parindent=0pt          \begin{document}          Donec aliquam quam sed enim bibendum, quis ultrices felis porttitor.          \begin{itemize}          \item Lorem ipsum dolor sit amet, consectetur adipiscing elit.           \item Quisque ac porttitor lectus.          \antiitemize     Mauris a libero laoreet, iaculis arcu et, tincidunt quam.     \endantiitemize          \item Suspendisse auctor leo ut felis lobortis commodo vel quis diam.          \end{itemize}          Morbi nec rhoncus ante.          \end{document}      This is tolerable, but I'd really like to know why I can't define my `antiitemize` environment using `\newenvironment`. * * * **Edit.** In response to some of the comments my question has received, here are a couple of notes about my motivation for asking this question.   * cgnieder points out that `\end{itemize}...\begin{itemize}` would have the same effect as `\begin{antiitemize}...\end{antiitemize}`. This is true, but in my use case it's not a very 'semantic' way to do the document mark up. The stuff in my `antiitemize` environment should be thought of as 'an interruption in the list' rather than as 'ending one list and starting another'.   * I didn't make this clear in my original question, but I guess what I'd really like an answer to is: _why_ is my `antiitemize` environment broken?


title: Could not get round corner working in mdframed

text: Round corner is not working in `mdframed` environment although I followed the example shown in the `mdframed` package. Below is my code               \documentclass[10pt]{article}          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage[usenames]{color}      \usepackage[usenames]{xcolor}     \usepackage{mdframed}      \usepackage{lipsum}          \begin{document}               \mdfsetup{%        middlelinecolor=red,        middlelinewidth=2pt,        backgroundcolor=red!20,        roundcorner=20pt}             \begin{mdframed}        \lipsum[3]        \end{mdframed}          \end{document}


title: Float after paragraph on the same page

text: I always put my float environments at the end of the paragraph where it was first referenced. But I have a problem when the paragraph is split over two pages (beginning at the bottom of the first page and ending at the top of the second page). The float could be placed easily at the top of the first page, because it is referenced directly in the first sentence of the paragraph which is on the first page even if the float is on this page too. But Latex puts the float on the second page resulting in a half empty first page (because of the now missing float) and a half empty second page (because the float is now the only thing on this page). Is there an easier way than manually move the float environment in the source before the paragraph (with all the problems when the above mentioned condition no longer holds, e.g. when additional text is inserted)? MWE (with the float on the second page)               \documentclass{article}          \usepackage{algorithm2e}     \usepackage[nopar]{lipsum}          \begin{document}     \null     \vfill          \lipsum[1-3]               In the first sentence I reference the float~\ref{alg:Algo}. After the first sentence there are many more sentences and the float ist put after the whole paragraph. After the first sentence there are many more sentences and the float ist put after the whole paragraph. After the first sentence there are many more sentences and the float ist put after the whole paragraph. After the first sentence there are many more sentences and the float ist put after the whole paragraph. After the first sentence there are many more sentences and the float ist put after the whole paragraph.     \begin{algorithm}[tbp]     \SetKwInOut{Input}{Input}       \SetKwInOut{Output}{Output}          \LinesNumbered     \caption{Caption}     \label{alg:Algo}     \Input{-}     \Output{-}     \BlankLine          First Line\;     First Line\;     First Line\;     First Line\;     First Line\;               \Return{result}\;     \end{algorithm}          \end{document}      MWE (with the float on the first page)               \documentclass{article}          \usepackage{algorithm2e}     \usepackage[nopar]{lipsum}          \begin{document}     \null     \vfill          \lipsum[1-3]                    \begin{algorithm}[tbp]     \SetKwInOut{Input}{Input}       \SetKwInOut{Output}{Output}          \LinesNumbered     \caption{Caption}     \label{alg:Algo}     \Input{-}     \Output{-}     \BlankLine          First Line\;     First Line\;     First Line\;     First Line\;     First Line\;               \Return{result}\;     \end{algorithm}     In the first sentence I reference the float~\ref{alg:Algo}. After the first sentence there are many more sentences and the float ist put after the whole paragraph. After the first sentence there are many more sentences and the float ist put after the whole paragraph. After the first sentence there are many more sentences and the float ist put after the whole paragraph. After the first sentence there are many more sentences and the float ist put after the whole paragraph. After the first sentence there are many more sentences and the float ist put after the whole paragraph.          \end{document}


title: In standard, interpret characters as vectors

text: I need to write many equations with way more matrices and vectors than scalars and I would like to have LaTeX interpret "normal" characters as vectors and matrices. Consequently I need to mark the scalars. An example usage is demonstrated in my commented code example. I think of using a special environment but who knows.               \documentclass{article}     \usepackage{amsmath}     \def\ve#1{{\mathchoice{\mbox{\boldmath$\displaystyle #1$}}                   {\mbox{\boldmath$\textstyle #1$}}%                   {\mbox{\boldmath$\scriptstyle #1$}}%                   {\mbox{\boldmath$\scriptscriptstyle #1$}}}}     \def\inv{^{-1}}     \begin{document}     \begin{equation*}     (\ve{A}+\ve{U}\ve{C}\ve{V})\inv+A+\ve{b}=\ve{A}\inv-\ve{A}^{-1}\ve{U}(\ve{C}\inv+\ve{V}\ve{A}\inv\ve{U})\inv\ve{V}\ve{A}\inv+A+\ve{b}     \end{equation*}     %\begin{equation*}     %(A+UCV)\inv=A\inv-A\inv U(C\inv+VA\inv U)\inv VA\inv+\scalar{A}+b     %\end{equation*}     \end{document}


title: PSTricks drawing with variables not exact

text: Consider the following example:               \documentclass{article}          \usepackage{pst-coil}          \psset{dimen = middel}          \def\frekvensgenerator[#1,#2](#3,#4){       \psframe(#3,#4)(!#3 #1 add #4 #2 add)       \psline(!#3 #4 #2 2 div add)(!#3 #1 add #4 #2 2 div add)       \psframe(!#3 #1 2 div add 0.2 sub #4)(!#3 #1 2 div add 0.2 add #4 #2 2 div add)       \rput{270}(!#3 #1 2 div add #4){%         \psCoil[           linewidth = 1.5pt,           coilwidth = \spolevidde,           coilheight = \spolehoejde,           coilarm = 0         ]{0}{\drejning}%       }       \psframe[         fillstyle = solid,         fillcolor = yellow!70       ](!#3 #1 2 div add 0.25 sub  #4 \drejning\space 480 div \spolevidde\space mul \spolehoejde\space mul sub 1 sub)(!#3 #1 2 div add 0.25 add  #4 \drejning\space 480 div \spolevidde\space mul \spolehoejde\space mul sub)       \psline(!#3 #1 2 div add #4 \drejning\space 480 div \spolevidde\space mul \spolehoejde\space mul sub 1 sub)(!#3 #1 2 div add #4 \drejning\space 480 div \spolevidde\space mul \spolehoejde\space mul sub 3 sub)     }          \begin{document}          \def\spolevidde{0.5}     \def\spolehoejde{0.5}          \begin{pspicture}(3.5,6.2)     \def\drejning{810}       \frekvensgenerator[1.5,1.5](0,4.7)     \def\drejning{3330}       \frekvensgenerator[1.5,1.5](2,4.7)     \end{pspicture}          \end{document}      ![output](http://i.stack.imgur.com/X8cTG.jpg) As can be seen, the weight is not connected to the same point on the spring (modulo an integer number of windings) if I change the total numbers of degrees that the spring is twisted. How do I accomplish this? P.S. If the code can be made simpler (which it almost certainly can), you are very welcome to improve it. `:)`


title: Titletoc and minitoc are not working with cftsectionname (memoir class document)

text: In my memoir class document I would like to get a minitable of content after each `\part` 's title. I have tried the minitoc package, but it is not working with the titlesec package used in my document. Besides, the titletoc package is buging with my memoir class document. Indeed this code is not working :               \renewcommand*{\cftsectionname}{Section } %Section doesn't appear      \cftsetindents{section}{1.4em}{4mm}     \renewcommand{\cftsectionfont}{\itshape\bfseries}       If `\usepackage{titletoc`} is enabled, the word "Section" will not appear in my toc. What can I do ?                   \documentclass{memoir}     \usepackage[explicit]{titlesec}     \usepackage{titletoc}       \renewcommand*{\cftsectionname}{Section }             \cftsetindents{section}{1.4em}{4mm}             \renewcommand{\cftsectionfont}{\itshape\bfseries}      \begin{document}     \tableofcontents               \part{Part ONE}     \startcontents[parts]     \printcontents[parts]{}{0}{\setcounter{tocdepth}{2}}          \chapter{Chapter ONE of PART ONE}     \section{Something is wrong with section}     \chapter{Chapter TWO of PART ONE}          \end{document}      ![enter image description here](http://i.stack.imgur.com/9H2DS.png)


title: What's the best way to draw loop invariants in LaTeX?

text: I want to draw a picture similar to this one for divide part of Quicksort. ![Quicksort Loop Invariant](http://i.stack.imgur.com/iUomu.png) What's the best method to do so? Is there a package for it or should I use Tikz to do it? If Tikz can you point me to some reference on drawing similar pictures as the one above?


title: Close the corners of a grid (of tubes) on a surface in asymptote

text: Consider the following simple drawing of a saddle surface using `asymptote`               import graph3;          real f (pair p) {       real x = p.x;       real y = p.y;       return 0.5*(x^2-y^2);     }          surface saddle=surface(f,(-2,-2),(2,2),nx=5,Spline);          draw(saddle,gray,0.1+blue);      and have a look at the snapshot from the output: ![snapshot from the output](http://i.stack.imgur.com/41zpH.png) You can probably see the unpleasent way that the tube, which form the grid lines, join at the corners of the surface. I could probably add, manually, balls of the right radius at the corners as a workaround. For example, add the following line:               draw(shift(-2,-2,f((-2,-2)))*scale(0.05,0.05,0.05)*unitsphere,blue);      and obtain the following improvement: ![enter image description here](http://i.stack.imgur.com/FCzmz.png) I wonder is there a better way? How should I close nicely the connections of the grid lines (tubes if to be more precise)?


title: Float addition operator in LaTeX?

text: I need to get the +. sign (see the OCaml float addition operator) in LaTeX. However, when I try:               *$\mid h :: t  \-> h +. sumList(t)$ \\**      The output is as follows: ![Not where it is supposed to be!](http://i.stack.imgur.com/wuBub.png) How can I make sure that the period is directly next to the addition sign, and not next to the function call? Thanks in advance, Jake


title: Help me understand the offset values for pdfpages, for a non-standard page setup (a4 landscape, divided in three along the vertical axis)

text: This is my pdfpages tex file:               \documentclass[a4paper,landscape]{article}     \usepackage[final]{pdfpages}          \begin{document}     \includepdf[pages={1,3,5},nup=3x1,noautoscale=true,landscape,offset=-124 -124]{a4pecha}     \includepdf[pages={6,4,2},nup=3x1,noautoscale=true,landscape,offset=-124 -124]{a4pecha}     \end{document}      This is the tex file used to generate a4pecha.pdf:               \documentclass{article}     \usepackage{geometry}     \usepackage{polyglossia}     \usepackage{fontspec}     \usepackage{flowfram}     \usepackage{tikz}          \geometry{paperwidth=29.7cm,paperheight=7cm,margin=0cm}     \pagestyle{empty}          \newdynamicframe{29.7cm}{7cm}{0cm}{0cm}[standard]     \setdynamiccontents*{standard}{     \vfil\hfil     \begin{tikzpicture}     \draw[color=black,very thick] (2.7,.93) rectangle +(24.3,5.14)       (2.77,1) rectangle +(24.16,5)       (3.77,1) rectangle +(.07,5)       (25.97,1) rectangle +(.07,5);     \node[rotate=-90] at (3.3,3.5) {\huge \thepage};     \node[rotate=90] at (26.47,3.5) {\huge \thepage};     \end{tikzpicture}     }          \newflowframe{21.7cm}{4.9cm}{4cm}{.9cm}          \setdefaultlanguage{tibetan}     \setmainfont{Tibetan Machine Uni}     \newfontfamily{\maintext}{Tibetan Machine Uni}     \begin{document}     \Large ༄༅། །ཕྱི་ལོ་ ༢༠༡༤ ཟླ་ ༦ ཚེས་ ༡༣ ཉིན་གྱི་སྔ་དྲོའི་ཆུ་ཚོད་ ༩།༣༠ ནས་ ༡༢།༣༠ ཙམ་བར་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ཕྱི་དྲིལ་དྲུང་ཆེ་བཀྲ་ཤིས་ཕུན་ཚོགས་ལགས་ཀྱིས་ཕྱི་དྲིལ་ལྷག་པ་ཚེ་རིང་དྲན་རྟེན་ཚོགས་ཁང་ནང་རྒྱ་གར་གྱི་རྒྱལ་ས་ལྡི་ལིར་རྟེན་གཞི་བྱས་པའི་༸གོང་ས་༸སྐྱབས་མགོན་ཏཱ་ལའི་བླ་མ་མཆོག་གི་ཀུན་ཕན་བདེ་རྩས་གོ་སྒྲིག་འོག་རྒྱ་གར་རྒྱལ་ཡོངས་མཐོ་སློབ་ཁག་ ༢༩ ནང་སློབ་གཉེར་བྱེད་བཞིན་པའི་སློབ་ཕྲུག་གྲངས་ ༣༣ དང་ཐུག་འཕྲད་ཀྱིས་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་སྒྲོམ་གཞི་དང་སྲིད་བྱུས། དེ་བཞིན་ལྷན་ཁང་ཁག་གི་བྱེད་སྒོ་རྣམ་གསུམ་ངོ་སྤྲོད་དང་འབྲེལ་བོད་མིའི་སྒྲིག་འཛུགས་ངོས་ནས་དབུ་མའི་ལམ་གྱི་སྲིད་བྱུས་གཞིར་བཟུང་རྒྱ་ནག་གཞུང་དང་ལྷན་དུ་འབྲེལ་མོལ་བརྒྱུད་བོད་དོན་བདེན་མཐའ་གསལ་ཐབས་ལ་འབད་བརྩོན་ཞུ་བཞིན་ཡོད་སྐོར་སོགས་ཀྱི་གསུང་བཤད་ཟབ་རྒྱས་གནང་བ་མ་ཟད། དྲི་བར་ལན་འདེབས་ཀྱང་གནང་།སློབ་ཕྲུག་དེ་དག་ལ་ཟླ་བ་གཅིག་རིང་བཞུགས་སྒར་རྡ་སའི་ཁུལ་གྱི་བོད་པའི་དགོན་སྡེ་ཁག་ནང་བོད་ཀྱི་ཐུན་མིན་ཆོས་དང་རིག་གཞུང་སོགས་ཀྱི་སྐོར་ངོ་སྤྲོད་དང་སྦྱོང་བརྡར་སྤྲོད་རྒྱུ་ཡིན་འདུག སྤྱིར་སྒུ་རུ་ཀུལ་ (Gurukul Programme) ལས་འཆར་འདི་བཞིན་ཐོག་མར་ཕྱི་ལོ་ ༡༩༩༤ ལོར་འགོ་བཙུགས་གནང་བ་དང། དེ་སྔ་ལས་འཆར་འདིའི་འོག་མཐོ་སློབ་ཀྱི་སློབ་མ་དྲུག་བདུན་ཙམ་ལས་མཉམ་ཞུགས་གནང་མཁན་མེད་ཀྱང་། འདས་པའི་ལོ་དྲུག་གི་སྔོན་ཙམ་ནས་ལས་འཆར་དེར་མཉམ་ཞུགས་གནང་མཁན་མང་དུ་ཕྱིན་ནས་ལོ་ལྟར་སློབ་མ་བུ་བཅོ་ལྔ་དང་བུ་མོ་བཅོ་ལྔ་བདམས་ནས་རྡ་སར་རྟེན་གཞི་བྱས་པའི་བོད་པའི་ཆོས་དང་རིག་གཞུང་། གོམས་གཤིས་སོགས་ཉམས་མྱོང་གསོག་རྒྱུ་ཙམ་མ་ཟད། བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ལས་ཁུངས་མ་ལག་དང་བཅས་པ་ཤེས་རྟོགས་བྱ་རྒྱུ་ཡིན་འདུག་ལོ་ ༢༠༡༤ ཟླ་ ༦ ཚེས་ ༡༣ ཉིན་གྱི་སྔ་དྲོའི་ཆུ་ཚོད་ ༩།༣༠ ནས་ ༡༢།༣༠ ཙམ་བར་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ཕྱི་དྲིལ་དྲུང་ཆེ་བཀྲ་ཤིས་ཕུན་ཚོགས་ལགས་ཀྱིས་ཕྱི་དྲིལ་ལྷག་པ་ཚེ་རིང་དྲན་རྟེན་ཚོགས་ཁང་ནང་རྒྱ་གར་གྱི་རྒྱལ་ས་ལྡི་ལིར་རྟེན་གཞི་བྱས་པའི་༸གོང་ས་༸སྐྱབས་མགོན་ཏཱ་ལའི་བླ་མ་མཆོག་གི་ཀུན་ཕན་བདེ་རྩས་གོ་སྒྲིག་འོག་རྒྱ་གར་རྒྱལ་ཡོངས་མཐོ་སློབ་ཁག་ ༢༩ ནང་སློབ་གཉེར་བྱེད་བཞིན་པའི་སློབ་ཕྲུག་གྲངས་ ༣༣ དང་ཐུག་འཕྲད་ཀྱིས་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་སྒྲོམ་གཞི་དང་སྲིད་བྱུས། དེ་བཞིན་ལྷན་ཁང་ཁག་གི་བྱེད་སྒོ་རྣམ་གསུམ་ངོ་སྤྲོད་དང་འབྲེལ་བོད་མིའི་སྒྲིག་འཛུགས་ངོས་ནས་དབུ་མའི་ལམ་གྱི་སྲིད་བྱུས་གཞིར་བཟུང་རྒྱ་ནག་གཞུང་དང་ལྷན་དུ་འབྲེལ་མོལ་བརྒྱུད་བོད་དོན་བདེན་མཐའ་གསལ་ཐབས་ལ་འབད་བརྩོན་ཞུ་བཞིན་ཡོད་སྐོར་སོགས་ཀྱི་གསུང་བཤད་ཟབ་རྒྱས་གནང་བ་མ་ཟད། དྲི་བར་ལན་འདེབས་ཀྱང་གནང་།སློབ་ཕྲུག་དེ་དག་ལ་ཟླ་བ་གཅིག་རིང་བཞུགས་སྒར་རྡ་སའི་ཁུལ་གྱི་བོད་པའི་དགོན་སྡེ་ཁག་ནང་བོད་ཀྱི་ཐུན་མིན་ཆོས་དང་རིག་གཞུང་སོགས་ཀྱི་སྐོར་ངོ་སྤྲོད་དང་སྦྱོང་བརྡར་སྤྲོད་རྒྱུ་ཡིན་འདུག སྤྱིར་སྒུ་རུ་ཀུལ་ (Gurukul Programme) ལས་འཆར་འདི་བཞིན་ཐོག་མར་ཕྱི་ལོ་ ༡༩༩༤ ལོར་འགོ་བཙུགས་གནང་བ་དང། དེ་སྔ་ལས་འཆར་འདིའི་འོག་མཐོ་སློབ་ཀྱི་སློབ་མ་དྲུག་བདུན་ཙམ་ལས་མཉམ་ཞུགས་གནང་མཁན་མེད་ཀྱང་། འདས་པའི་ལོ་དྲུག་གི་སྔོན་ཙམ་ནས་ལས་འཆར་དེར་མཉམ་ཞུགས་གནང་མཁན་མང་དུ་ཕྱིན་ནས་ལོ་ལྟར་སློབ་མ་བུ་བཅོ་ལྔ་དང་བུ་མོ་བཅོ་ལྔ་བདམས་ནས་རྡ་སར་རྟེན་གཞི་བྱས་པའི་བོད་པའི་ཆོས་དང་རིག་གཞུང་། གོམས་གཤིས་སོགས་ཉམས་མྱོང་གསོག་རྒྱུ་ཙམ་མ་ཟད། བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ལས་ཁུངས་མ་ལག་དང་བཅས་པ་ཤེས་རྟོགས་བྱ་རྒྱུ་ཡིན་འདུག་ལོ་ ༢༠༡༤ ཟླ་ ༦ ཚེས་ ༡༣ ཉིན་གྱི་སྔ་དྲོའི་ཆུ་ཚོད་ ༩།༣༠ ནས་ ༡༢།༣༠ ཙམ་བར་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ཕྱི་དྲིལ་དྲུང་ཆེ་བཀྲ་ཤིས་ཕུན་ཚོགས་ལགས་ཀྱིས་ཕྱི་དྲིལ་ལྷག་པ་ཚེ་རིང་དྲན་རྟེན་ཚོགས་ཁང་ནང་རྒྱ་གར་གྱི་རྒྱལ་ས་ལྡི་ལིར་རྟེན་གཞི་བྱས་པའི་༸གོང་ས་༸སྐྱབས་མགོན་ཏཱ་ལའི་བླ་མ་མཆོག་གི་ཀུན་ཕན་བདེ་རྩས་གོ་སྒྲིག་འོག་རྒྱ་གར་རྒྱལ་ཡོངས་མཐོ་སློབ་ཁག་ ༢༩ ནང་སློབ་གཉེར་བྱེད་བཞིན་པའི་སློབ་ཕྲུག་གྲངས་ ༣༣ དང་ཐུག་འཕྲད་ཀྱིས་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་སྒྲོམ་གཞི་དང་སྲིད་བྱུས། དེ་བཞིན་ལྷན་ཁང་ཁག་གི་བྱེད་སྒོ་རྣམ་གསུམ་ངོ་སྤྲོད་དང་འབྲེལ་བོད་མིའི་སྒྲིག་འཛུགས་ངོས་ནས་དབུ་མའི་ལམ་གྱི་སྲིད་བྱུས་གཞིར་བཟུང་རྒྱ་ནག་གཞུང་དང་ལྷན་དུ་འབྲེལ་མོལ་བརྒྱུད་བོད་དོན་བདེན་མཐའ་གསལ་ཐབས་ལ་འབད་བརྩོན་ཞུ་བཞིན་ཡོད་སྐོར་སོགས་ཀྱི་གསུང་བཤད་ཟབ་རྒྱས་གནང་བ་མ་ཟད། དྲི་བར་ལན་འདེབས་ཀྱང་གནང་།སློབ་ཕྲུག་དེ་དག་ལ་ཟླ་བ་གཅིག་རིང་བཞུགས་སྒར་རྡ་སའི་ཁུལ་གྱི་བོད་པའི་དགོན་སྡེ་ཁག་ནང་བོད་ཀྱི་ཐུན་མིན་ཆོས་དང་རིག་གཞུང་སོགས་ཀྱི་སྐོར་ངོ་སྤྲོད་དང་སྦྱོང་བརྡར་སྤྲོད་རྒྱུ་ཡིན་འདུག སྤྱིར་སྒུ་རུ་ཀུལ་ (Gurukul Programme) ལས་འཆར་འདི་བཞིན་ཐོག་མར་ཕྱི་ལོ་ ༡༩༩༤ ལོར་འགོ་བཙུགས་གནང་བ་དང། དེ་སྔ་ལས་འཆར་འདིའི་འོག་མཐོ་སློབ་ཀྱི་སློབ་མ་དྲུག་བདུན་ཙམ་ལས་མཉམ་ཞུགས་གནང་མཁན་མེད་ཀྱང་། འདས་པའི་ལོ་དྲུག་གི་སྔོན་ཙམ་ནས་ལས་འཆར་དེར་མཉམ་ཞུགས་གནང་མཁན་མང་དུ་ཕྱིན་ནས་ལོ་ལྟར་སློབ་མ་བུ་བཅོ་ལྔ་དང་བུ་མོ་བཅོ་ལྔ་བདམས་ནས་རྡ་སར་རྟེན་གཞི་བྱས་པའི་བོད་པའི་ཆོས་དང་རིག་གཞུང་། གོམས་གཤིས་སོགས་ཉམས་མྱོང་གསོག་རྒྱུ་ཙམ་མ་ཟད། བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ལས་ཁུངས་མ་ལག་དང་བཅས་པ་ཤེས་རྟོགས་བྱ་རྒྱུ་ཡིན་འདུག་ལོ་ ༢༠༡༤ ཟླ་ ༦ ཚེས་ ༡༣ ཉིན་གྱི་སྔ་དྲོའི་ཆུ་ཚོད་ ༩།༣༠ ནས་ ༡༢།༣༠ ཙམ་བར་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ཕྱི་དྲིལ་དྲུང་ཆེ་བཀྲ་ཤིས་ཕུན་ཚོགས་ལགས་ཀྱིས་ཕྱི་དྲིལ་ལྷག་པ་ཚེ་རིང་དྲན་རྟེན་ཚོགས་ཁང་ནང་རྒྱ་གར་གྱི་རྒྱལ་ས་ལྡི་ལིར་རྟེན་གཞི་བྱས་པའི་༸གོང་ས་༸སྐྱབས་མགོན་ཏཱ་ལའི་བླ་མ་མཆོག་གི་ཀུན་ཕན་བདེ་རྩས་གོ་སྒྲིག་འོག་རྒྱ་གར་རྒྱལ་ཡོངས་མཐོ་སློབ་ཁག་ ༢༩ ནང་སློབ་གཉེར་བྱེད་བཞིན་པའི་སློབ་ཕྲུག་གྲངས་ ༣༣ དང་ཐུག་འཕྲད་ཀྱིས་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་སྒྲོམ་གཞི་དང་སྲིད་བྱུས། དེ་བཞིན་ལྷན་ཁང་ཁག་གི་བྱེད་སྒོ་རྣམ་གསུམ་ངོ་སྤྲོད་དང་འབྲེལ་བོད་མིའི་སྒྲིག་འཛུགས་ངོས་ནས་དབུ་མའི་ལམ་གྱི་སྲིད་བྱུས་གཞིར་བཟུང་རྒྱ་ནག་གཞུང་དང་ལྷན་དུ་འབྲེལ་མོལ་བརྒྱུད་བོད་དོན་བདེན་མཐའ་གསལ་ཐབས་ལ་འབད་བརྩོན་ཞུ་བཞིན་ཡོད་སྐོར་སོགས་ཀྱི་གསུང་བཤད་ཟབ་རྒྱས་གནང་བ་མ་ཟད། དྲི་བར་ལན་འདེབས་ཀྱང་གནང་།སློབ་ཕྲུག་དེ་དག་ལ་ཟླ་བ་གཅིག་རིང་བཞུགས་སྒར་རྡ་སའི་ཁུལ་གྱི་བོད་པའི་དགོན་སྡེ་ཁག་ནང་བོད་ཀྱི་ཐུན་མིན་ཆོས་དང་རིག་གཞུང་སོགས་ཀྱི་སྐོར་ངོ་སྤྲོད་དང་སྦྱོང་བརྡར་སྤྲོད་རྒྱུ་ཡིན་འདུག སྤྱིར་སྒུ་རུ་ཀུལ་ (Gurukul Programme) ལས་འཆར་འདི་བཞིན་ཐོག་མར་ཕྱི་ལོ་ ༡༩༩༤ ལོར་འགོ་བཙུགས་གནང་བ་དང། དེ་སྔ་ལས་འཆར་འདིའི་འོག་མཐོ་སློབ་ཀྱི་སློབ་མ་དྲུག་བདུན་ཙམ་ལས་མཉམ་ཞུགས་གནང་མཁན་མེད་ཀྱང་། འདས་པའི་ལོ་དྲུག་གི་སྔོན་ཙམ་ནས་ལས་འཆར་དེར་མཉམ་ཞུགས་གནང་མཁན་མང་དུ་ཕྱིན་ནས་ལོ་ལྟར་སློབ་མ་བུ་བཅོ་ལྔ་དང་བུ་མོ་བཅོ་ལྔ་བདམས་ནས་རྡ་སར་རྟེན་གཞི་བྱས་པའི་བོད་པའི་ཆོས་དང་རིག་གཞུང་། གོམས་གཤིས་སོགས་ཉམས་མྱོང་གསོག་རྒྱུ་ཙམ་མ་ཟད། བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ལས་ཁུངས་མ་ལག་དང་བཅས་པ་ཤེས་རྟོགས་བྱ་རྒྱུ་ཡིན་འདུག་ལོ་ ༢༠༡༤ ཟླ་ ༦ ཚེས་ ༡༣ ཉིན་གྱི་སྔ་དྲོའི་ཆུ་ཚོད་ ༩།༣༠ ནས་ ༡༢།༣༠ ཙམ་བར་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ཕྱི་དྲིལ་དྲུང་ཆེ་བཀྲ་ཤིས་ཕུན་ཚོགས་ལགས་ཀྱིས་ཕྱི་དྲིལ་ལྷག་པ་ཚེ་རིང་དྲན་རྟེན་ཚོགས་ཁང་ནང་རྒྱ་གར་གྱི་རྒྱལ་ས་ལྡི་ལིར་རྟེན་གཞི་བྱས་པའི་༸གོང་ས་༸སྐྱབས་མགོན་ཏཱ་ལའི་བླ་མ་མཆོག་གི་ཀུན་ཕན་བདེ་རྩས་གོ་སྒྲིག་འོག་རྒྱ་གར་རྒྱལ་ཡོངས་མཐོ་སློབ་ཁག་ ༢༩ ནང་སློབ་གཉེར་བྱེད་བཞིན་པའི་སློབ་ཕྲུག་གྲངས་ ༣༣ དང་ཐུག་འཕྲད་ཀྱིས་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་སྒྲོམ་གཞི་དང་སྲིད་བྱུས། དེ་བཞིན་ལྷན་ཁང་ཁག་གི་བྱེད་སྒོ་རྣམ་གསུམ་ངོ་སྤྲོད་དང་འབྲེལ་བོད་མིའི་སྒྲིག་འཛུགས་ངོས་ནས་དབུ་མའི་ལམ་གྱི་སྲིད་བྱུས་གཞིར་བཟུང་རྒྱ་ནག་གཞུང་དང་ལྷན་དུ་འབྲེལ་མོལ་བརྒྱུད་བོད་དོན་བདེན་མཐའ་གསལ་ཐབས་ལ་འབད་བརྩོན་ཞུ་བཞིན་ཡོད་སྐོར་སོགས་ཀྱི་གསུང་བཤད་ཟབ་རྒྱས་གནང་བ་མ་ཟད། དྲི་བར་ལན་འདེབས་ཀྱང་གནང་།སློབ་ཕྲུག་དེ་དག་ལ་ཟླ་བ་གཅིག་རིང་བཞུགས་སྒར་རྡ་སའི་ཁུལ་གྱི་བོད་པའི་དགོན་སྡེ་ཁག་ནང་བོད་ཀྱི་ཐུན་མིན་ཆོས་དང་རིག་གཞུང་སོགས་ཀྱི་སྐོར་ངོ་སྤྲོད་དང་སྦྱོང་བརྡར་སྤྲོད་རྒྱུ་ཡིན་འདུག སྤྱིར་སྒུ་རུ་ཀུལ་ (Gurukul Programme) ལས་འཆར་འདི་བཞིན་ཐོག་མར་ཕྱི་ལོ་ ༡༩༩༤ ལོར་འགོ་བཙུགས་གནང་བ་དང། དེ་སྔ་ལས་འཆར་འདིའི་འོག་མཐོ་སློབ་ཀྱི་སློབ་མ་དྲུག་བདུན་ཙམ་ལས་མཉམ་ཞུགས་གནང་མཁན་མེད་ཀྱང་། འདས་པའི་ལོ་དྲུག་གི་སྔོན་ཙམ་ནས་ལས་འཆར་དེར་མཉམ་ཞུགས་གནང་མཁན་མང་དུ་ཕྱིན་ནས་ལོ་ལྟར་སློབ་མ་བུ་བཅོ་ལྔ་དང་བུ་མོ་བཅོ་ལྔ་བདམས་ནས་རྡ་སར་རྟེན་གཞི་བྱས་པའི་བོད་པའི་ཆོས་དང་རིག་གཞུང་། གོམས་གཤིས་སོགས་ཉམས་མྱོང་གསོག་རྒྱུ་ཙམ་མ་ཟད། བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ལས་ཁུངས་མ་ལག་དང་བཅས་པ་ཤེས་རྟོགས་བྱ་རྒྱུ་ཡིན་འདུག་ལོ་ ༢༠༡༤ ཟླ་ ༦ ཚེས་ ༡༣ ཉིན་གྱི་སྔ་དྲོའི་ཆུ་ཚོད་ ༩།༣༠ ནས་ ༡༢།༣༠ ཙམ་བར་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ཕྱི་དྲིལ་དྲུང་ཆེ་བཀྲ་ཤིས་ཕུན་ཚོགས་ལགས་ཀྱིས་ཕྱི་དྲིལ་ལྷག་པ་ཚེ་རིང་དྲན་རྟེན་ཚོགས་ཁང་ནང་རྒྱ་གར་གྱི་རྒྱལ་ས་ལྡི་ལིར་རྟེན་གཞི་བྱས་པའི་༸གོང་ས་༸སྐྱབས་མགོན་ཏཱ་ལའི་བླ་མ་མཆོག་གི་ཀུན་ཕན་བདེ་རྩས་གོ་སྒྲིག་འོག་རྒྱ་གར་རྒྱལ་ཡོངས་མཐོ་སློབ་ཁག་ ༢༩ ནང་སློབ་གཉེར་བྱེད་བཞིན་པའི་སློབ་ཕྲུག་གྲངས་ ༣༣ དང་ཐུག་འཕྲད་ཀྱིས་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་སྒྲོམ་གཞི་དང་སྲིད་བྱུས། དེ་བཞིན་ལྷན་ཁང་ཁག་གི་བྱེད་སྒོ་རྣམ་གསུམ་ངོ་སྤྲོད་དང་འབྲེལ་བོད་མིའི་སྒྲིག་འཛུགས་ངོས་ནས་དབུ་མའི་ལམ་གྱི་སྲིད་བྱུས་གཞིར་བཟུང་རྒྱ་ནག་གཞུང་དང་ལྷན་དུ་འབྲེལ་མོལ་བརྒྱུད་བོད་དོན་བདེན་མཐའ་གསལ་ཐབས་ལ་འབད་བརྩོན་ཞུ་བཞིན་ཡོད་སྐོར་སོགས་ཀྱི་གསུང་བཤད་ཟབ་རྒྱས་གནང་བ་མ་ཟད། དྲི་བར་ལན་འདེབས་ཀྱང་གནང་།སློབ་ཕྲུག་དེ་དག་ལ་ཟླ་བ་གཅིག་རིང་བཞུགས་སྒར་རྡ་སའི་ཁུལ་གྱི་བོད་པའི་དགོན་སྡེ་ཁག་ནང་བོད་ཀྱི་ཐུན་མིན་ཆོས་དང་རིག་གཞུང་སོགས་ཀྱི་སྐོར་ངོ་སྤྲོད་དང་སྦྱོང་བརྡར་སྤྲོད་རྒྱུ་ཡིན་འདུག སྤྱིར་སྒུ་རུ་ཀུལ་ (Gurukul Programme) ལས་འཆར་འདི་བཞིན་ཐོག་མར་ཕྱི་ལོ་ ༡༩༩༤ ལོར་འགོ་བཙུགས་གནང་བ་དང། དེ་སྔ་ལས་འཆར་འདིའི་འོག་མཐོ་སློབ་ཀྱི་སློབ་མ་དྲུག་བདུན་ཙམ་ལས་མཉམ་ཞུགས་གནང་མཁན་མེད་ཀྱང་། འདས་པའི་ལོ་དྲུག་གི་སྔོན་ཙམ་ནས་ལས་འཆར་དེར་མཉམ་ཞུགས་གནང་མཁན་མང་དུ་ཕྱིན་ནས་ལོ་ལྟར་སློབ་མ་བུ་བཅོ་ལྔ་དང་བུ་མོ་བཅོ་ལྔ་བདམས་ནས་རྡ་སར་རྟེན་གཞི་བྱས་པའི་བོད་པའི་ཆོས་དང་རིག་གཞུང་། གོམས་གཤིས་སོགས་ཉམས་མྱོང་གསོག་རྒྱུ་ཙམ་མ་ཟད། བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ལས་ཁུངས་མ་ལག་དང་བཅས་པ་ཤེས་རྟོགས་བྱ་རྒྱུ་ཡིན་འདུག་ལོ་ ༢༠༡༤ ཟླ་ ༦ ཚེས་ ༡༣ ཉིན་གྱི་སྔ་དྲོའི་ཆུ་ཚོད་ ༩།༣༠ ནས་ ༡༢།༣༠ ཙམ་བར་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ཕྱི་དྲིལ་དྲུང་ཆེ་བཀྲ་ཤིས་ཕུན་ཚོགས་ལགས་ཀྱིས་ཕྱི་དྲིལ་ལྷག་པ་ཚེ་རིང་དྲན་རྟེན་ཚོགས་ཁང་ནང་རྒྱ་གར་གྱི་རྒྱལ་ས་ལྡི་ལིར་རྟེན་གཞི་བྱས་པའི་༸གོང་ས་༸སྐྱབས་མགོན་ཏཱ་ལའི་བླ་མ་མཆོག་གི་ཀུན་ཕན་བདེ་རྩས་གོ་སྒྲིག་འོག་རྒྱ་གར་རྒྱལ་ཡོངས་མཐོ་སློབ་ཁག་ ༢༩ ནང་སློབ་གཉེར་བྱེད་བཞིན་པའི་སློབ་ཕྲུག་གྲངས་ ༣༣ དང་ཐུག་འཕྲད་ཀྱིས་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་སྒྲོམ་གཞི་དང་སྲིད་བྱུས། དེ་བཞིན་ལྷན་ཁང་ཁག་གི་བྱེད་སྒོ་རྣམ་གསུམ་ངོ་སྤྲོད་དང་འབྲེལ་བོད་མིའི་སྒྲིག་འཛུགས་ངོས་ནས་དབུ་མའི་ལམ་གྱི་སྲིད་བྱུས་གཞིར་བཟུང་རྒྱ་ནག་གཞུང་དང་ལྷན་དུ་འབྲེལ་མོལ་བརྒྱུད་བོད་དོན་བདེན་མཐའ་གསལ་ཐབས་ལ་འབད་བརྩོན་ཞུ་བཞིན་ཡོད་སྐོར་སོགས་ཀྱི་གསུང་བཤད་ཟབ་རྒྱས་གནང་བ་མ་ཟད། དྲི་བར་ལན་འདེབས་ཀྱང་གནང་།སློབ་ཕྲུག་དེ་དག་ལ་ཟླ་བ་གཅིག་རིང་བཞུགས་སྒར་རྡ་སའི་ཁུལ་གྱི་བོད་པའི་དགོན་སྡེ་ཁག་ནང་བོད་ཀྱི་ཐུན་མིན་ཆོས་དང་རིག་གཞུང་སོགས་ཀྱི་སྐོར་ངོ་སྤྲོད་དང་སྦྱོང་བརྡར་སྤྲོད་རྒྱུ་ཡིན་འདུག སྤྱིར་སྒུ་རུ་ཀུལ་ (Gurukul Programme) ལས་འཆར་འདི་བཞིན་ཐོག་མར་ཕྱི་ལོ་ ༡༩༩༤ ལོར་འགོ་བཙུགས་གནང་བ་དང། དེ་སྔ་ལས་འཆར་འདིའི་འོག་མཐོ་སློབ་ཀྱི་སློབ་མ་དྲུག་བདུན་ཙམ་ལས་མཉམ་ཞུགས་གནང་མཁན་མེད་ཀྱང་། འདས་པའི་ལོ་དྲུག་གི་སྔོན་ཙམ་ནས་ལས་འཆར་དེར་མཉམ་ཞུགས་གནང་མཁན་མང་དུ་ཕྱིན་ནས་ལོ་ལྟར་སློབ་མ་བུ་བཅོ་ལྔ་དང་བུ་མོ་བཅོ་ལྔ་བདམས་ནས་རྡ་སར་རྟེན་གཞི་བྱས་པའི་བོད་པའི་ཆོས་དང་རིག་གཞུང་། གོམས་གཤིས་སོགས་ཉམས་མྱོང་གསོག་རྒྱུ་ཙམ་མ་ཟད། བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ལས་ཁུངས་མ་ལག་དང་བཅས་པ་ཤེས་རྟོགས་བྱ་རྒྱུ་ཡིན་འདུག་ལོ་ ༢༠༡༤ ཟླ་ ༦ ཚེས་ ༡༣ ཉིན་གྱི་སྔ་དྲོའི་ཆུ་ཚོད་ ༩།༣༠ ནས་ ༡༢།༣༠ ཙམ་བར་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ཕྱི་དྲིལ་དྲུང་ཆེ་བཀྲ་ཤིས་ཕུན་ཚོགས་ལགས་ཀྱིས་ཕྱི་དྲིལ་ལྷག་པ་ཚེ་རིང་དྲན་རྟེན་ཚོགས་ཁང་ནང་རྒྱ་གར་གྱི་རྒྱལ་ས་ལྡི་ལིར་རྟེན་གཞི་བྱས་པའི་༸གོང་ས་༸སྐྱབས་མགོན་ཏཱ་ལའི་བླ་མ་མཆོག་གི་ཀུན་ཕན་བདེ་རྩས་གོ་སྒྲིག་འོག་རྒྱ་གར་རྒྱལ་ཡོངས་མཐོ་སློབ་ཁག་ ༢༩ ནང་སློབ་གཉེར་བྱེད་བཞིན་པའི་སློབ་ཕྲུག་གྲངས་ ༣༣ དང་ཐུག་འཕྲད་ཀྱིས་བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་སྒྲོམ་གཞི་དང་སྲིད་བྱུས། དེ་བཞིན་ལྷན་ཁང་ཁག་གི་བྱེད་སྒོ་རྣམ་གསུམ་ངོ་སྤྲོད་དང་འབྲེལ་བོད་མིའི་སྒྲིག་འཛུགས་ངོས་ནས་དབུ་མའི་ལམ་གྱི་སྲིད་བྱུས་གཞིར་བཟུང་རྒྱ་ནག་གཞུང་དང་ལྷན་དུ་འབྲེལ་མོལ་བརྒྱུད་བོད་དོན་བདེན་མཐའ་གསལ་ཐབས་ལ་འབད་བརྩོན་ཞུ་བཞིན་ཡོད་སྐོར་སོགས་ཀྱི་གསུང་བཤད་ཟབ་རྒྱས་གནང་བ་མ་ཟད། དྲི་བར་ལན་འདེབས་ཀྱང་གནང་།སློབ་ཕྲུག་དེ་དག་ལ་ཟླ་བ་གཅིག་རིང་བཞུགས་སྒར་རྡ་སའི་ཁུལ་གྱི་བོད་པའི་དགོན་སྡེ་ཁག་ནང་བོད་ཀྱི་ཐུན་མིན་ཆོས་དང་རིག་གཞུང་སོགས་ཀྱི་སྐོར་ངོ་སྤྲོད་དང་སྦྱོང་བརྡར་སྤྲོད་རྒྱུ་ཡིན་འདུག སྤྱིར་སྒུ་རུ་ཀུལ་ (Gurukul Programme) ལས་འཆར་འདི་བཞིན་ཐོག་མར་ཕྱི་ལོ་ ༡༩༩༤ ལོར་འགོ་བཙུགས་གནང་བ་དང། དེ་སྔ་ལས་འཆར་འདིའི་འོག་མཐོ་སློབ་ཀྱི་སློབ་མ་དྲུག་བདུན་ཙམ་ལས་མཉམ་ཞུགས་གནང་མཁན་མེད་ཀྱང་། འདས་པའི་ལོ་དྲུག་གི་སྔོན་ཙམ་ནས་ལས་འཆར་དེར་མཉམ་ཞུགས་གནང་མཁན་མང་དུ་ཕྱིན་ནས་ལོ་ལྟར་སློབ་མ་བུ་བཅོ་ལྔ་དང་བུ་མོ་བཅོ་ལྔ་བདམས་ནས་རྡ་སར་རྟེན་གཞི་བྱས་པའི་བོད་པའི་ཆོས་དང་རིག་གཞུང་། གོམས་གཤིས་སོགས་ཉམས་མྱོང་གསོག་རྒྱུ་ཙམ་མ་ཟད། བོད་མིའི་སྒྲིག་འཛུགས་ཀྱི་ལས་ཁུངས་མ་ལག་དང་བཅས་པ་ཤེས་རྟོགས་བྱ་རྒྱུ་ཡིན་འདུག     \end{document}      Can someone please help me understand why the offset values are required to be set to -124 in order to align everything correctly? I am trying to attain some proper understanding of what I'm actually doing. Thank you. EDIT: ![Output](http://i.stack.imgur.com/Lc8Hs.png) EDIT2: Let me try to rephrase my question: Why are the pages not aligned correctly with default offset values? Using these settings:               \documentclass[a4paper,landscape]{article}     \usepackage[final]{pdfpages}          \begin{document}     \includepdf[pages={1,3,5},nup=3x1,noautoscale=true,landscape,offset=0 0,turn=false]{a4pecha}     \includepdf[pages={6,4,2},nup=3x1,noautoscale=true,landscape,offset=0 0,turn=false]{a4pecha}     \end{document}      I get the following result: ![Witout offset](http://i.stack.imgur.com/sSboW.png) EDIT3: Non-Tibetan version for those without Tibetan fonts installed:               \documentclass{article}     \usepackage{geometry}     \usepackage{flowfram}     \usepackage{tikz}     \usepackage{lipsum}          \geometry{paperwidth=29.7cm,paperheight=7cm,margin=0cm}     \pagestyle{empty}          \newflowframe{21.7cm}{4.9cm}{4cm}{.9cm}          \newdynamicframe{29.7cm}{7cm}{0cm}{0cm}[standard]     \setdynamiccontents*{standard}{         \vfil\hfil         \begin{tikzpicture}         \draw[color=black,very thick] (2.7,.93) rectangle +(24.3,5.14)           (2.77,1) rectangle +(24.16,5)           (3.77,1) rectangle +(.07,5)           (25.97,1) rectangle +(.07,5);         \node[rotate=-90] at (3.2,3.5) {\huge \thepage};         \node[rotate=90] at (26.47,3.5) {\huge \thepage};         \end{tikzpicture}     }          \begin{document}     \lipsum     \lipsum     \end{document}      EDIT4: I have used the exact same tex code as has been recommended, but the output is rotated for some reason:               \documentclass[a4paper,landscape]{article}     \usepackage[final]{pdfpages}          \begin{document}     \includepdf[pages={1,3,5},nup=1x3]{a4pecha}     \includepdf[pages={6,4,2},nup=1x3]{a4pecha}     \end{document}      ![non-tibetan result](http://i.stack.imgur.com/HRrSy.png) The plot thickens... EDIT5: The problem is probably a bug in XeLaTeX.


title: Minus sign disappears in lstlisting if I import the semantic package

text: I am using the `lstlisting` package and the `semantic` package. Now whenever I write a `-` (minus) inside a lstlisting it disappears after the compilation. Here is a minimal example:               \documentclass{article}          \usepackage{listings}     \usepackage{semantic}          \begin{document}     \begin{lstlisting}     ->       \end{lstlisting}     \end{document}      How do I get this fixed? A similar thread already exists, but the solutions shown there do not work for my problem.


title: How to built an abstract matrix?

text: I want to built a matrix like the picture: ![enter image description here](http://i.stack.imgur.com/4T1AX.jpg) Have a trial:               \begin{displaymath}      \left( \begin{array}{ccc}      b_{11} & \ldots & b_{1j} & \ldots & b_{1j} \\      b_{21} & \ldots & x_{22} & \ldots & b_{1j}\\      \vdots & \ldots & \vdots & \ddots & \ddots\\      b_{n1} & \ldots & x_{nj} & \ldots & b_{ns}      \end{array} \right)     \end{displaymath}      However, it didn't work. Can someone help me? Thanks!


title: How to make ~ work for en-dashes?

text: I have a German LaTeX-document that tries to implement German en-dash line- breaking rules with `~` like this:               \documentclass[twocolumn,a4paper]{scrartcl}     \usepackage[T1]{fontenc}     \usepackage{german}     \usepackage{yfonts}     \begin{document}     \fraklines\frakfamily\noindent     Bestimmtes: von ihm gewu"st h"atten. Wir waren freilich --~die einzige     Neugierde, die uns: erf"ullte~-- immer bestrebt,     \end{document}      Apparently, LaTeX seems to ignore the `~` after _freilich_. In the PDF-output (linked above) on page 4 near the end of the left column, you can clearly see a line-break between _freulich –_ and _die einzige_. Is there a way to fix this issue? I am using the `german` package and the Koma script with the `scrartcl` class.


title: Vertical centering of figure in landscape environment

text: I am using the pdflscape package to insert landscape pages in my document. On one of these I would like to have a figure that is **vertically** centered on the page, but I can't find how to do it. MWE:               \documentclass{article}          \usepackage{graphicx}     \usepackage{pdflscape}          \begin{document}     A portrait mode page...          \begin{landscape}     \begin{figure}[!h]     \centering     \fbox{\includegraphics[width=\linewidth]{VUB_logo.pdf}}     \caption{Some caption}     \end{figure}     \end{landscape}          Another portrait mode page...     \end{document} This results in something like this (only landscape page shown): ![Landscape page with figure not vertically centered](http://i.stack.imgur.com/N3NIX.png) While what I would like is this: ![Landscape page with figure vertically centered](http://i.stack.imgur.com/h4614.png) (note the vertical centering)


title: Math w/italics in normal context, roman when in italic context (ie, caption)

text: I have not found this question asked previously. I am fine with math using italics for variables when the math appears in a normal context. But our figure captions are in italics, and when math is used in a caption, we need to flip all math italics to Roman and vice versa. I know how to do this by using `\mathrm{}` and `\mathit{}`, but if we have a caption like, say,               \begin{figure}       \caption{As $|\Psi(x_0,t)|^2$ represents yadayada and $x_0$ blah at time $t$, it is clear that foobazz.}       \end{figure}      that's something like eight mathematical elements that have to be manually defined to Roman or italics. Get a dozen or so figure captions like this and things are error-prone, never mind being a PITA. So: is there a way to get `amsmath` to invert it's normal italics/Roman behavior when inside a caption?