title: Problem in Tikz figure

text: In the following figure I want to use legends, write `$x$` labels etc. When I use `\begin{axis}` for these, figure becomes too large.               \begin{tikzpicture}[scale=12]     \draw [<->] (0,0.5) -- (0,0) -- (0.9,0);     \draw[black, dashed, domain=0:0.5] plot (\x, {0.25-0.5*\x});     \draw (0.053, 0.2234)--(0.1835,0.158)--(0.207,0.167)--(0.15,0.1853);     \draw[black, domain=0:0.5] plot (\x, {0.25-0.5*\x+ 0.5*\x *\x});     \draw[black, dashed, domain=0:0.5] plot (\x, {1.0+\x- 0.25*sqrt(13.0+20.0*\x +4.0*\x *\x)});     \draw ( 0.0, 0.284 )--( 0.01, 0.272 )--( 0.05, 0.227 )--( 0.054, 0.223)--(0.1, 0.178)--( 0.15, 0.136 )--(0.2, 0.101)--(0.25, 0.071 )--( 0.3, 0.047 )--( 0.35, 0.028 )--( 0.4, 0.011 )--( 0.45, 0.003 )--( 0.49, 0.0 );     \draw [color=black, fill=gray!50] (0,0.25) -- (0,0.284) -- (0.052,0.225) -- cycle;     \draw [color=black, fill=gray!50] (0.053,0.2234) -- (0.1835,0.158) -- (0.207,0.167) --(0.15,0.1853)-- cycle;     %\draw (0.4,-0.1) node{ Value of $x$};     \end{tikzpicture}


title: Italicizing an Author in Biblatex

text: I would like to italicize the presenting author's name for conference papers in my bibliography. I am using biblatex and I don't know how to do it. (I also don't know how to do it with bibtex.) I have tried changing               author = {John Smith and Jim Smythe}      to               author = {John Smith and \emph{Jim Smythe}}      and this works partially, but messes up the citation labels (SS12 becomes Se12, and S12 becomes _12_ ). Is there a smart way to do this? I couldn't find help in the first 10 pages of search results here. Thank you!


title: Latex enumerate environment I want to enumerate with A.1,A.2,...,A.n. How does one do this?

text: I am using latex to type up a logical system that has some equations. The abbreviation for the logical system is DAS. I would like the equations to be numbered DAS.1 DAS.2 ... DAS.n I expected that               \begin{enumerate}[{DAS.1}]         \item         \item         ...        \item     \end{enumerate}      would work. However the output I get is: D1S.1 D2S.2 ... DnS.n So I suppose the question could be restated as: how does one control which letter the enumerate environment ... enumerates? Any suggestions are greatly appreciated.


title: Macvim and Skim sync does not work

text: Don't really know where to begin. I have installed the latest macvim and skim. Put the mvim in path. Setup skim sync with the default macvim (and tried some custom stuff also). However it will not sync no matter what I do. Sync works between skim and textmate though. Anyone able to guide me in some direction would be very much appreciated.


title: Adding a Caption to a Non-float Environment

text: I am attempting to add a caption to a non-float environment. The following is a MWE of how I'm trying to do it:               \documentclass{article}     \usepackage{caption}     \begin{document}     \begin{tabular}{l|l}          hello & world     \captionof{table}{my table}     \end{tabular}     \end{document}      However, this is not working for me. What am I doing wrong?


title: How do I get the protrusion to work in XeTeX?

text: When I render my documents using pdfLaTeX and `microtype` they look fine, but when I switch to XeTeX the right edges of justified text look terrible: some lines overlfow, and hyphens look "indented". Is there a way to fix this?


title: How do I configure fonts and package options for different engines?

text: I would like to be able to rely on the code in my document class to respond correctly to whether it is being rendered using pdfLaTeX or XeTeX engines. The editor I'm using (LyX) does this using several settings established through the document properties dialog, but I'd like to have a document class that configures itself correctly in response the the active engine _alone_ , without requiring additional (editor specific) settings. For example, I would like to be able to write something like:               \@ifundefined{XeTeXversion}{         % (1) Ensure that fontspec is not loaded         \usepackage[T1]{fontenc}    % (*) In LyX, this is set in document properties, by un-checking Fonts > Use non-Tex fonts         \usepackage[latin9]{inputenc}         %...          \usepackage{tgpagella}         %...         \usepackage[protrusion=true]{microtype}          % (2) Possible additional engine-sepcifc packages and options     }{%         % (1) Ensure that fontenc is not loaded         \usepackage{fontspec}      % (*) In LyX, this is set in document properties, by checking Fonts > Use non-Tex fonts         %...         \defaultfontfeatures{Mapping=tex-text}         \setromanfont[Ligatures=TeX]{Palatino}         %...         \usepackage{xunicode}         % (2) Possible additional engine-sepcifc packages and options     }      While, I can get this to work if I explicitly switch between `fontspec` and `fontenc` using LyX's settings in the LyX UI (*), I'm left with two questions:   1. Is checking `XeTeXversion` a reliable way to determine that XeTeX is in use?   2. Is there a way to (1) disable or "unload" `fontspec` or `fontenc` in code like the example above to override what LyX may be doing in the absence of specific (*) settings in the UI?   3. Are there common engine-specific packages or package options I should be using (or avoiding) when switching between pdfLaTeX and XeTeX (2).


title: Move title to top of page but keep the top margin value

text: Having a lot of problems with LaTeX at the moment. I need my article to have a top margin of 33mm, but for some reason my title page has a much larger margin. Is there a simple fix I have overlooked? MWE:               \documentclass[a4paper,oneside,12pt]{article}     \usepackage[english]{babel} % formatting rules for the English language     \usepackage[T1]{fontenc} % proper formatting for accented characters and non-standard characters such as pipelines     \usepackage[top=33mm, bottom=38mm, left=26mm, right=20mm]{geometry} % page layout     \usepackage{lmodern} % font formatting     \usepackage{float} % allow floating environments such as figures     \usepackage{amsmath} % math eqn formatting     \usepackage{amssymb} % math fonts     \title{\bf{\fontsize{14pt}{2pt} Title}}     \author{\fontsize{14pt}{2pt} Author names}     \date{}     \begin{document}     \maketitle     \end{document}


title: beamer handout WITH hyperlinks?

text: How can I have active hyperlinks in multipage `beamer` handouts? So far, all `\url{}` and `\href{}` I have in my document work fine in the resulting PDF if I typeset in `presentation` mode, but as soon as I typeset in `handout` mode, all links are gone. I'd like them to be active even in the handout PDF. It seems this is due to the `\pgfpagesuselayout{}` I'm using in `handout` mode (turning it off, and it works); is there a way to preserve hyperlinks here? I also tried (unsuccessfully) to use `pdfnup` afterwards, but as it is basically using the same mechanism...


title: First try in TeX problem

text: I have just installed MikTeX and WinEdt and i try this code in WinEdt:               \documentclass{article}     \usepackage{amsmath}     \usepackage{amsfonts,amssymb}     \usepackage{amsthm}     \usepackage[electronic]{ifsym}     \usepackage[cp1251]{inputenc}     \usepackage[matrix,arrow,curve,frame,poly,arc]{xy}     \usepackage[english, russian]{babel}     \usepackage[final]{graphicx}     \usepackage{mathrsfs}     \usepackage{color}     \usepackage{tikz}     \pagestyle{empty}     \begin{document}          \sum x          \end{document}`      Then i press on TeX button (`Shift`+`Ctrl`+`T`) and it says a lot of errors of the same type: "Undefined Control Sequence". Then i press on DVI button and see something like this: > article amsmath amsfonts,amssymb amsthm [electronic]ifsym [cp1251]inputenc > [matrix,arrow,curve,frame,poly,arc]xy [english, russian]babel [¯nal]graphicx > mathrsfs color tikz empty document > > x What should i do? Whats the problem?


title: Bibliography menu of TeXmaker

text: I am using TeXmaker on windows 7 (if this matters). > I would like to know how to add bibliography (under the title, References) > to a letter. > > (I created this letter using the default template available.) I saw in one of the questions here the following snippet, but it fails for me.               % Some Preamble that comes with the default letter Template     \begin{document}     \begin{letter}{--To whom is it written--}      Some Text is here.     \printbibliography      \end{letter}     \end{document}          %Bibfile     @Article{,     author = {•},     title = {•},     journal = {•},     year = {•},     OPTkey = {•},     OPTvolume = {•},     OPTnumber = {•},     OPTpages = {•},     OPTmonth = {•},     OPTnote = {•},     OPTannote = {•}     }      I have two other doubts as well:   * Is the keyword that I'll use to cite this reference written      1. in place of • in `OPTkey={•}` (in which case, I am wondering how is that OPTional?) **or**     2. preceding the `,` that is on the first line?   * When I press clean, all those OPTional fields for which I have entered some value also disappear. Is this the normal behaviour and in which case, will they show up on my reference? I'd like thank you for your patience in reading this question and writing up an answer. (P.S.: I am sorry if I packed in a lot to my question. And, as I'm a newbie here, I welcome any suggestions about the style of the question. )


title: Bibliographystyle, how to edit apalike style?

text: I use               \bibliographystyle{apalike}      It is perfect to me, except for one (not so little) detail, the way authors names are displayed in the bibliography (example) : > Dupond, P., Beh, M., ... > > LastName1, FirstName1, LastName2, FirstName2, ... you will have to admit, this is completly awful to read, the point/comma thing or the use of the same separator (comma) for firstname-lastname and different authors is confusing and wrong, I would like to obtain something like that : > P. Dupond, M. Beh, ... > > FirstName1 LastName1, FirstName2 LastName2, ... but I don't want to change the way `apalike` manage everything else (especialy citation display `\cite`), is there any way I can achieve this? Or any other bibliographystyle that might suits my needs? Edit 1 : MWE under Bernard suggestion, everything worked previously, now the citation is just bold (no link) and no bibliography appears anywhere               \documentclass[     twoside,     a4paper,     11pt,     chapterprefix=true]{scrbook}          \usepackage[UTF8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[francais]{babel}          \usepackage[style=apa]{biblatex}     \usepackage[ocgcolorlinks, allcolors=blue]{hyperref}          \addbibresource{./bib/database.bib}          \begin{document}          \cite{NameDate}          \renewcommand{\bibname}{Références} \markboth{Références}{Références}     \printbibliography \addcontentsline{toc}{chapter}{Références}          \end{document}      bib file :               % This file was created with JabRef 2.9.2.     % Encoding: Cp1252          @ARTICLE{NameDate,       author = {LName1, FName1 and LastName2, FirstName2 and LastName3, FirstName3},       title = {title},       journal = {journal},       year = {2013},       volume = {10},       pages = {23--29},       number = {0},       __markedentry = {[myname:6]},       booktitle = {booktitle},       issn = {2212-8271},       keywords = {keywaords},       owner = {my name},       timestamp = {2014.03.05},       url = {an url}     }      Editor warning : Citation 'NameDate' undefiened


title: Where can I get the getfileversion package?

text: At the urls given in http://www.mail-archive.com/ctan-ann@dante.de/msg04518.html I cannot find the `getfileversion` package. (Using a popular search engine did not help either.) Where (and why) is the package hiding?


title: pgfdeclareshape compilation error

text: Starting from a more complex trial to add a new shape, I arrive to this minimal example which does not compile. I use PGF 2.10               \documentclass[12pt]{article}          \usepackage{tikz}     \pgfdeclareshape{minex}{}     \begin{document}     \begin{tikzpicture}     \node[minex] {};     \end{tikzpicture}     \end{document}      The received error message is :               ERROR: Package PGF Math Error: Unknown function `center' (in 'center').          TeX said:          See the PGF Math package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.7 \node[minex] {};


title: Problem with citation and PDFLatex

text: Compile a tex file with Pdflatex under winEdt 7.0. 1) All the references were listed, but in the text, it is [?] rather than the reference number. And the computer complaint: Latex warning: Citation `xxxxx' on page y undefined on input line z. 2) Did an experiment with a sample tex file with only one reference. If package graphicx is not included, it works. However, when the \usepackage{graphicx} is added. The warning comes back again. 3) Tried TexStudio; no problem at all. What is the problem? Thanks


title: How to insert Figure beside Text

text: As shown in attached I am using memoir class to create my book. What is the code should be? ![enter image description here](http://i.stack.imgur.com/CCEi7.jpg)


title: Is there any reason to compile to DVI rather than PDF these days?

text: I appreciate that in the past, `latex` was faster than `pdflatex`, but computer speeds being what they are nowadays, I can't see any difference in how quickly documents compile... So, given that the end product I want is the PDF, are there good reasons not to always compile to pdf?


title: String replacement in LaTeX

text: I'd like to know how to replace parts of a string in LaTeX. Specifically I'm given a measurement (like 3pt, 10mm, etc) and I'd like to remove the units of that measurement (so 3pt-->3, 10mm-->10, etc). The reason why I'd like a command to do this is in the following piece of code:               \newsavebox{\mybox}     \sbox{\mybox}{Hello World!}     \newlength{\myboxw}     \settowidth{\myboxw}{\usebox{\mybox}}     \begin{picture}(\myboxw,\myboxw)     \end{picture}      Basically I create a `savebox` called mybox. I insert the words "Hello World" into mybox. I create a new length, called myboxw. I then get the width of mybox, and store this in myboxw. Then I set up a square `picture` environment whose dimensions correspond to myboxw. The trouble is that myboxw is returning something of the form "132.56pt", while the input to the `picture` environment has to be dimensionless: `\begin{picture}{132.56, 132.56}`. So, I need a command which will strip the units of measurement from a string.


title: How to display accents inside verbatim command

text: I have the following piece of code:               \newenvironment{mylisting}        {\begin{list}{}{\setlength{\leftmargin}{1em}}\item\scriptsize\bfseries}        {\end{list}}             \newenvironment{mytinylisting}        {\begin{list}{}{\setlength{\leftmargin}{1em}}\item\tiny\bfseries}        {\end{list}}            \begin{mylisting}        \begin{verbatim}             I want to display an accent in this text (i.e. más)         \end{verbatim}        \end{mylisting}         The word "más" should be displayed with accent but I got:   m'as The `verbatim` environment is ignoring the accent. BTW According to my config, the accent is displayed just using ' before the letter. Anyone knows how to solve this issue?


title: LuaTeX with unicode-math, how to get the font id of current math font

text: How can I query informations about the current math font? I tried the following in a document using unicode-math and Cambria Math font               \documentclass{article}     \usepackage{unicode-math}     \setmathfont{Cambria Math}          \begin{document}     Try to get math font name inside math mode.     \[       \directlua{         local font = fonts.identifiers[font.current()]         local fullname = font.fullname         tex.sprint(fullname)       }     \]     \end{document}      However, it is the font name of surrounding text font being printed in the math font, as seen in the following picture. ![enter image description here](http://i.stack.imgur.com/ov8PT.png) It seems that `font.current()` returns the current text font id instead of the math font even the code is inside math mode. Next, I serialized the `fonts.identifiers` table and get the id of math font. I replaced `font.current()` with an explicit number, `28` in this example, and the above code print the math font name correctly, as seen in the following. ![enter image description here](http://i.stack.imgur.com/EsAZD.png) So I guess the math font does have an ID in the `fonts.identifiers` table. But how do I get this ID automatically?


title: meta arrow tips

text: Page 316 of the tikz-pfg manual describes meta arrow tips and says that usually we do not want to have the tip scaled the same way as the supporting line. Is there a way to keep this feature, ie, when using `line width=5pt`, the tip should be five times bigger than for `line width=1pt`?


title: Follow-up question to: hyperlink name with biblatex authoryear

text: I'm new here, so I don't know whether I should be creating a new question for this, since this is a follow-up to this question. I'm trying to get both the name and the year in `biblatex`'s citations to work as hyperlinks. The answer given by Audrey in the original post seems to work great, except for one thing: If multiple entry keys are used within a single `\cite` command, the delimiter between citations does not show up. I tried adding a `\multicitedelim` after the year label, and it works, except that I end up with a semicolon after the final citation too. Thoughts?


title: bibtex custom tag for certain citation

text: I have a report where I reference articles and standards. Whereas for an article it is totally suitable to have a reference tag corresponding to the author's name, e.g. [Adr89], I would expect the tag for a standard to be more specific about the standard number, e.g. [DIN-13201-1] and [DIN-13201-2] instead of the automatically created tags [DIN04a] and [DIN04b]. Is there a way to set a custom tag name for an entry? I'm using `alphadin` as bibliography style and the standards are of type `@misc`.


title: How do I store the x or y value of a named node in tikz \draw?

text: A big part of the question above has already been answered: "Use the `calc` `tikzlibrary` and the `let` syntax". > >     \begin{tikzpicture} >       \draw [help lines] (0,0) grid (4,4); >       \node (A) at (2,1) {A}; >       \path let \p1 = (A) in node  at (\x1,3) {B}; >     \end{tikzpicture} >   But it leaves out something else. How do I use the `let` syntax inside a `\draw` directive? Like so:               \draw       (5,0) node(A){}       let \p1 = A     % This line borks everything. What is the right thing to do?       (0,5) -- (\x1,5)       ;


title: Insert line break in \cventry

text: What do I have to change in the following code to drop my company name, and company location to the line below my job title? I tried them around within the separate brackets but my LaTeX knowledge is quite limited. I tried breaking it down to the following lines.               \documentclass[11pt,a4paper]{moderncv}     \usepackage{enumitem}     \setlist{nolistsep}          \begin{document}     \renewcommand*{\bibliographyhead}[1]{}     \maketitle     \vspace{-10mm}     \section{Engineering Experience}     \cventry{Sept 2008--Present}{Mechanical Engineer}{\href {http://www.bmpc.com/}{Bechtel Marine Propulsion Corporation}}{West Mifflin, PA}{}{     \begin{itemize}     \item Managed projects to ensure appropriate     \end{itemize}     }     \end{document}


title: Ansi Encoding for Embedded Fonts in PDF Output

text: Rendering PDFs with identical fonts using InDesign versus using LuaLaTeX with fontspec in TeXworks, I have found differences in Acrobat Reader's descriptions of the embedded font types and encoding. .otf fonts from InDesign tend to read as Type 1 and .ttfs as TrueType, and both are ANSI encoded: ![PDF from InDesign](http://i.stack.imgur.com/YGv4q.png) Whereas fonts from LuaLaTeX possess the (CID) qualifier after their Type and are Identity-H encoded: ![PDF from LuaLaTeX](http://i.stack.imgur.com/Lqtw6.png) How can I make LuaLaTeX produce a PDF with ANSI Encoding for all embedded fonts?


title: \veqref{} command like \vref...from varioref package

text: 1) The `varioref` package gives `\vref`, which gives output as follows... > figure~`\ref{fig:test}` on page~`\pageref{fig:test}`. 2) The `amsmath` package gives `\eqref{}`, which gives output as follows... > equation (1.5) ie instead of printing a plain number as 1.5, it will print > (1.5) Now, the question is... is there any command like "`veqref`", which can give out put as > equation~`\eqref{eq:test}` on page~`\pageref{eq:test}`, something like > equation (1.5) on page 30 I did not know how to do this... * * * Thank you cmhughes for the answer... I added Eq.~ as follows...               \labelformat{equation}{Eq.~\tagform@{#1}}      A little more example...               \documentclass{book}     \usepackage{amsmath}     \usepackage{varioref}               % this bit makes sure that the number is typeset upright- needs amsmath     \makeatletter     \labelformat{equation}{Eq.~\tagform@{#1}}     \makeatother          \begin{document}          \chapter{One}     Bla bla bla...     \begin{equation}\label{eq:myequation}         f(x)=x^2+\sin(x)     \end{equation}     Here is a reference: \vref{eq:myequation}.     \emph{Here is another reference: \vref{eq:myequation}.}          \clearpage     Bla bla bla...\\     See \vref{eq:myequation} and use it.          \chapter{Two}     Bla bla bla...\\     See \vref{eq:myequation} and use it.               \end{document}


title: LaTeX referencing colorful numbering

text: I have some silly questions on LaTeX use:   1. In an article, how do I get colorful references like in the figure below? ![enter image description here](http://i.stack.imgur.com/Lv9Ad.png)   2. How do I reduce the built-in reference font size given below? ![enter image description here](http://i.stack.imgur.com/Emt0z.png)   3. How do I write multiple reference like fig(1) --> ref 5-8 ? If we write like as               \cite{fahjhf1,hfafafa2, hafhad2, fhahgadfhd3}       then output comes [1,2,3,4], whereas I would like to get [1-4]


title: epstopdf / ghostscript can't find fonts

text: I have the following setup               $ epstopdf --version     epstopdf ($Id: epstopdf.pl 31784 2013-09-27 22:43:16Z karl $) 2.18          $ gs --version     9.10          $ tex --version     TeX 3.1415926 (TeX Live 2014/dev)          $ uname -a     Linux escritorio-01 3.12.5-302.fc20.x86_64 #1 SMP Tue Dec 17 20:42:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux      I'm tryng to convert some .eps file to .pdf. I'm running the following command               $ epstopdf untitled.eps --debug     * kpsewhich command: kpsewhich     * Input filename: untitled.eps     * Output filename: untitled.pdf     * BoundingBox comment: %%BoundingBox:     * Ghostscript command: gs     * Compression: on     * Embedding: on     * Rotation: None     * Resolution: [use gs default]     * Ghostscript pipe: gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=untitled.pdf -dPDFSETTINGS=/prepress -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -dAutoRotatePages=/None - -c quit     * Binary junk at start of file: 0 byte(s)     * Scanning header for BoundingBox     * Old BoundingBox: 81 227 529 564     * New BoundingBox: 0 0 448 337     * Offset: -81 -227     GPL Ghostscript 9.10 (2013-08-30)     Copyright (C) 2013 Artifex Software, Inc.  All rights reserved.     This software comes with NO WARRANTY: see the file PUBLIC for details.     Can't find (or can't open) font file /usr/share/ghostscript/9.10/Resource/Font/NimbusSanL-Regu.     Can't find (or can't open) font file NimbusSanL-Regu.     Can't find (or can't open) font file /usr/share/ghostscript/9.10/Resource/Font/NimbusSanL-Regu.     Can't find (or can't open) font file NimbusSanL-Regu.     Querying operating system for font files...     Can't find (or can't open) font file /usr/share/ghostscript/9.10/Resource/Font/NimbusSanL-Regu.     Can't find (or can't open) font file NimbusSanL-Regu.     Didn't find this font on the system!     Substituting font Courier for NimbusSanL-Regu.     Can't find (or can't open) font file /usr/share/ghostscript/9.10/Resource/Font/NimbusMonL-Regu.     Can't find (or can't open) font file NimbusMonL-Regu.     Can't find (or can't open) font file /usr/share/ghostscript/9.10/Resource/Font/NimbusMonL-Regu.     Can't find (or can't open) font file NimbusMonL-Regu.     Didn't find this font on the system!     Unable to substitute for font.     Error: /invalidfont in /findfont     Operand stack:        120   Helvetica   ISOLatin1Encoding   Helvetica   Helvetica     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1884   1   3   %oparray_pop   1883   1   3   %oparray_pop   --nostringval--   1867   1   3   %oparray_pop   1755   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   1836   5   5   %oparray_pop     Dictionary stack:        --dict:1174/1684(ro)(G)--   --dict:0/20(G)--   --dict:82/200(L)--   --dict:94/160(L)--   --dict:8/85(L)--     Current allocation mode is local     Last OS error: Not a directory     GPL Ghostscript 9.10: Unrecoverable error, exit code 1     epstopdf ($Id: epstopdf.pl 31784 2013-09-27 22:43:16Z karl $) 2.18     !!! Error: Writing to gs failed, error code 1      This generate a .pdf file blank. There seems to be a related discussion in this bug report, about some cache that failed to update. But the technical level of the thread surpass me. I really don't know anything about ghostscript. Nevertheless, it looks like the problem it's not so much that ghostscript can't find the Nimbus* fonts, but that it fails to substitute them. Can anybody help me? Thanks! EDITED: SOLUTION FOUND. I added the answer below. Thanks everybody


title: Memoir: skip section numbers, make subsection numbers continuous within chapter

text: Can the `memoir` class create a reference book whose table of contents would look like this:               Chapter 1. Animals              Mammals             Cows ................... 1.000             Bulls .................. 1.001             Calves ................. 1.002         Amphibians             Frogs .................. 1.003             Turtles ................ 1.004             Newts .................. 1.005          Chapter 2. Plants              Trees             Pines .................. 2.000             Oaks ................... 2.001             Maples ................. 2.002         Shrubs             Brambles ............... 2.003             Brooms ................. 2.004             Lilacs ................. 2.005      In particular I wish to:   1. Suppress `section` numbers both in the text and the table of contents.   2. Make `subsection` numbers continuous within a `chapter`.   3. Present the `subsection` numbers in the `X.YYY` format where `X` = chapter number.   4. Move the `subsection` numbers out to the margins. The idea is to use them instead of page numbers.


title: \newcommand for centered \section

text: I am trying to use the `titlesec` package to achieve this but I'm not certain as to what the syntax should be...               \usepackage{titlesec}          \newcommand{\centeredsection}{\titleformat{\section}{\centering}}      Thanks for your help.


title: conditional inside a pgfplotsinvokeforeach loop

text: I'm using `\pgfplotsinvokeforeach` to do mathematical computations inside the `\addplot` options. Now I need a conditional to decide whether to plot a line or not depending on the current index of the loop, but I can't do it by means of an `\ifthenelse` command. Here is just a "pseudo"-example:               \documentclass{standalone}     \usepackage{ifthen}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}     \pgfplotsinvokeforeach {0.1,0.2,...,2}         {\ifthenelse{#1<1}{\addplot {0};}{"do nothing"}}     \end{axis}     \end{tikzpicture}     \end{document}      I get "missing =" and "missing number" errors. The original (misleading) posted code was:               \documentclass{standalone}     \usepackage{ifthen}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}     \pgfplotsinvokeforeach {0,...5}         {\ifthenelse{#1<3}{\addplot {0};}{\addplot {1};}}     \end{axis}     \end{tikzpicture}     \end{document}      Thank you


title: tikz nodes: centering with small font

text: I am trying to create tikz nodes with centered text, but changing fontsize. Unfortunately, while normally-sized text is nicely centered inside the nodes, the smaller text is not centered, but shifted to the left. After all I read, I think this might happen because the axis around which is centered is computed from the normal font, but I did not find a workaround or solution to this until now. The following example illustrates the effect:               \documentclass{scrbook}          \usepackage{tikz}     \usetikzlibrary{shapes,chains,scopes,positioning,arrows}     \tikzstyle{block} = [draw, rectangle, rounded corners, very thick, text centered]          \begin{document}            \tikzset{block/.append style={text width=15em, minimum height=2em,font=\normalsize}}            \begin{tikzpicture}         \node[block]                 (node1) {Short text};         \node[block, below of=node1] (node2) {A slightly longer text};       \end{tikzpicture}            \vspace{5em}            \tikzset{block/.append style={text width=10em, minimum height=2em,font=\footnotesize}}            \begin{tikzpicture}         \node[block]                 (node1) {Short text};         \node[block, below of=node1] (node2) {A slightly longer text};       \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/2W8US.png)


title: generating combining characters in LuaLaTeX with Garamond Premr Pro

text: I'm trying to produce the `œ́` character using Garamond Premier Pro in LuaLaTeX. I'm using `fontspec` in TeXLive 2012 to load the font. I seem to recall having had success doing this rather easily with a previous version, but I don't have any proof of that. I understand that `æ`, `ǽ`, and `œ` are each individual glyphs, but `œ́` is produced as a combining character. In the code below, however, the combining accute accent does not appear, no matter what method of input I employ:               \documentclass{article}     \usepackage[english]{babel}     \usepackage{fontspec}     \setmainfont{Garamond Premr Pro}     \begin{document}     \'\oe     \'œ     œ́     \end{document}      Using the default font (or even Times New Roman) does produce the accents in all these cases, but unlike the accents missing in this similar question, the combining character required here, `U+0301 (COMBINING ACUTE ACCENT)`, is very much present in Garamond Premier Pro, so I'm not quite sure how I could apply the solution there to this problem - or even if that would be the best course of action. I should note that other parameters of my project are restricting me to LuaLaTeX and Garamond Premier Pro.


title: Drawing iterations of a recursive structure in TikZ / using node names defined in a loop

text: This is my first time using TikZ, and I'm trying to draw something related to the Hilbert space-filling curve, based on a recent popular article (HTML, PDF). Specifically, I'm trying to draw the first few iterations of the curve, with nodes labelled by quaternary strings (strings on the alphabet {0,1,2,3}). I have something that sort of works, but I would like to know if there's a better way of doing it. The first iteration is straightforward enough — I can get this image: ![Hilbert curve, iteration 1](http://i.stack.imgur.com/IVGNX.png) with this code:                 \begin{tikzpicture}         \node (0) at (0, 0) {$0$};         \node (1) at (0, 1) {$1$};         \node (2) at (1, 1) {$2$};         \node (3) at (1, 0) {$3$};         \draw [->] (0) -- (1);         \draw [->] (1) -- (2);         \draw [->] (2) -- (3);       \end{tikzpicture}      The second iteration involves four copies of this, where the first and last are flipped and rotated, and I was able to get this image: ![Hilbert curve, iteration 2](http://i.stack.imgur.com/wRi3F.png) with this code:                 \begin{tikzpicture}         \foreach \quadrant / \xscale / \rotate / \xshift / \yshift in             {0 / -1 / 90 / 0 / 0,              1 / +1 / 00 / 0 / 2,              2 / +1 / 00 / 2 / 2,              3 / -1 / -90 / 3 / 1}  % (3, 1) = (1, 1) + (2, 0): the former is just to rotate         {           \begin{scope}[shift = {(\xshift, \yshift)}, xscale = \xscale, rotate = \rotate]             \node (\quadrant0) at (0, 0) {$\quadrant0$};             \node (\quadrant1) at (0, 1) {$\quadrant1$};             \node (\quadrant2) at (1, 1) {$\quadrant2$};             \node (\quadrant3) at (1, 0) {$\quadrant3$};             \draw [->] (\quadrant0) -- (\quadrant1);             \draw [->] (\quadrant1) -- (\quadrant2);             \draw [->] (\quadrant2) -- (\quadrant3);           \end{scope}         }         \draw [->] (0, 1) -- (0, 2);         \draw [->] (1, 2) -- (2, 2);         \draw [->] (3, 2) -- (3, 1);       \end{tikzpicture}      There is one real issue and a couple of code cleanliness issues:   1. The arrows that go across different quadrants (the last three lines in the code) look ugly, as they are drawn between coordinates and not between nodes. I tried to draw it between nodes, with code like `\draw [->] (03) -- (10);` but I got error messages like "ERROR: Package pgf Error: No shape named 03 is known." So I guess that in the foreach loop, even when `\quadrant` has the value `0`, the line `\node (\quadrant3) at (1, 0) {$\quadrant3$};` either doesn't really create a node with name `03`, or it's not accessible outside the loop. How do I use that node corresponding to `03`, outside the loop?   2. Is there a better way to draw the figure, than what I've done? (E.g. a better way to do the flip+rotate?)   3. Inside the foreach loop, I've just prefixed `\quadrant` to each node in the code for the previous figure; is there a way of reusing that code (possibly writing it more generally in the first place, with prefix set to empty string) instead of repeating it? * * * The third iteration has four copies of the second iteration, and there are no new issues except that the number of ugly arrows is more now, and I had to essentially repeat all the code from the second iteration again (just prefixed `q` to most variable names). ![Hilbert curve, iteration 3](http://i.stack.imgur.com/40wIw.png)                 \begin{tikzpicture}        \foreach \qquadrant / \qxscale / \qrotate / \qxshift / \qyshift in            {0 / -1 / 90 / 0 / 0,             1 / +1 / 00 / 0 / 4,             2 / +1 / 00 / 4 / 4,             3 / -1 / -90 / 7 / 3}   % (7, 3) = (3, 3) + (4, 0)        {         \begin{scope}[shift = {(\qxshift, \qyshift)}, xscale = \qxscale, rotate = \qrotate]         \foreach \quadrant / \xscale / \rotate / \xshift / \yshift in             {0 / -1 / 90 / 0 / 0,              1 / +1 / 00 / 0 / 2,              2 / +1 / 00 / 2 / 2,              3 / -1 / -90 / 3 / 1}  % (3, 1) = (1, 1) + (2, 0): the former is just to rotate         {           \begin{scope}[shift = {(\xshift, \yshift)}, xscale = \xscale, rotate = \rotate]             \node (\qquadrant\quadrant0) at (0, 0) {$\qquadrant\quadrant0$};             \node (\qquadrant\quadrant1) at (0, 1) {$\qquadrant\quadrant1$};             \node (\qquadrant\quadrant2) at (1, 1) {$\qquadrant\quadrant2$};             \node (\qquadrant\quadrant3) at (1, 0) {$\qquadrant\quadrant3$};             \draw [->] (\qquadrant\quadrant0) -- (\qquadrant\quadrant1);             \draw [->] (\qquadrant\quadrant1) -- (\qquadrant\quadrant2);             \draw [->] (\qquadrant\quadrant2) -- (\qquadrant\quadrant3);           \end{scope}         }         \draw [->] (0, 1) -- (0, 2);         \draw [->] (1, 2) -- (2, 2);         \draw [->] (3, 2) -- (3, 1);         \end{scope}        }        \draw [->] (0, 3) -- (0, 4);        \draw [->] (3, 4) -- (4, 4);        \draw [->] (7, 4) -- (7, 3);       \end{tikzpicture}      I don't expect to draw figures beyond the third iteration (the horizontal arrows already have become pretty short because of the long node names anyway), and I'm willing to live with the code duplication, so just fixing the arrows for these three figures will be enough for me. * * * **Edit:** I was looking for a conventional programming solution, but thanks to the answers/comments, I've learned of Lindenmayer systems, which look extremely fascinating. I've accepted an answer, and hope to explore these systems in more detail. Meanwhile, while trying to make a further minimal example out of the issue I was facing above, I figured out the answer myself. It turned out to be embarrasingly trivial: it had to do with the space between the numbers and the slash, in `\foreach \quadrant / \xscale [...] in {0 / -1 [...]`. So the nodes inside the loop were being created with names like `0 3` rather than `03`. Changing the `0 /` etc. to `0/` etc. gives the following figure: ![Hilbert curve, iteration 3, fixed](http://i.stack.imgur.com/gDQ8m.png) with the folowing code (which I now know how to write better, but keeping it similar to the above for contrast or rather similarity):                 \begin{tikzpicture}        \foreach \qquadrant / \qxscale / \qrotate / \qxshift / \qyshift in            {0/ -1 / 90 / 0 / 0,             1/ +1 / 00 / 0 / 4,             2/ +1 / 00 / 4 / 4,             3/ -1 / -90 / 7 / 3}   % (7, 3) = (3, 3) + (4, 0)        {         \begin{scope}[shift = {(\qxshift, \qyshift)}, xscale = \qxscale, rotate = \qrotate]         \foreach \quadrant / \xscale / \rotate / \xshift / \yshift in             {0/ -1 / 90 / 0 / 0,              1/ +1 / 00 / 0 / 2,              2/ +1 / 00 / 2 / 2,              3/ -1 / -90 / 3 / 1}  % (3, 1) = (1, 1) + (2, 0): the former is just to rotate         {           \begin{scope}[shift = {(\xshift, \yshift)}, xscale = \xscale, rotate = \rotate]             \node (\qquadrant\quadrant0) at (0, 0) {$\qquadrant\quadrant0$};             \node (\qquadrant\quadrant1) at (0, 1) {$\qquadrant\quadrant1$};             \node (\qquadrant\quadrant2) at (1, 1) {$\qquadrant\quadrant2$};             \node (\qquadrant\quadrant3) at (1, 0) {$\qquadrant\quadrant3$};             \draw [->] (\qquadrant\quadrant0) -- (\qquadrant\quadrant1);             \draw [->] (\qquadrant\quadrant1) -- (\qquadrant\quadrant2);             \draw [->] (\qquadrant\quadrant2) -- (\qquadrant\quadrant3);           \end{scope}         }         \draw [->] (\qquadrant03) -- (\qquadrant10);         \draw [->] (\qquadrant13) -- (\qquadrant20);         \draw [->] (\qquadrant23) -- (\qquadrant30);         \end{scope}        }        \draw [->] (033) -- (100);        \draw [->] (133) -- (200);        \draw [->] (233) -- (300);       \end{tikzpicture}


title: How do I achieve this chapter optic?

text: I'd like to modify the chapter appearance to become similar to this draft: ![enter image description here](http://i.stack.imgur.com/8mRQ1.png) I use XeLaTeX and Minion Pro/Myriad Pro (from Adobe Reader) as main fonts (the sans font in the screenshot might be a different type). Are there any package I could use, and does that imply a specific document class? I need to have DINA4 and thought of KOMAscript (`scrbook`), but found that `memoir` might have better section styling abilities... However, I've got no idea where to start. **Update:** It seems to work now. Does anybody know if the _fncychap_ package could be used to draw something like this (with a full sidewidth line): ![second](http://i.stack.imgur.com/xDd7B.png)


title: Why are \listof{}{} and \listoffigures styled differently?

text: I'm writing my thesis and I have certain code-snippets to show. I'm using the the `listings` package embedded in a custom `float` environment to display them. To list them in an index at the beginning of my document - similar to `\listoffigures` \- I use:               \listof{code}{List of Code}      This (technically) works as desired but looks completely different to my list of figures. See screenshot below (List of Figures on the left, List of Code on the right). ![lof vs loc](http://i.stack.imgur.com/TUVs1.png) Why, and how to fix this? Or how to modify the `\listof{}{}` layout to look similar to the one of `\listoffigures`? I tried this workaround which redefines the layout but it's not working as desired (still looks different) and is throwing more errors than I could post here. **Update 1** : After some hours of trying to figure out of what wrong with my document (It's really bloated already.) I'll try to explain this with a minimal working example. Notice the screenshots below.               \documentclass[12pt,a4paper,twoside,openright]{report}      \usepackage[english]{babel}      \usepackage{float}       \newfloat{algo}{tbp}{loa}[chapter]       \setlength{\parskip}{3mm}     % !       \setlength{\parindent}{3mm}   % !       \frenchspacing       \sloppy           \begin{document}       \listoffigures       \listof{algo}{List of Algorithms}            \chapter{foo}        \begin{figure}         \centering         \rule{1cm}{1cm}         \caption{A figure}        \end{figure}        \begin{algo}         (algo)         \caption{An algorithm}        \end{algo}        \begin{figure}         \centering         \rule{1cm}{1cm}         \caption{Another figure}        \end{figure}        \begin{algo}         (algo)         \caption{Another algorithm}        \end{algo}            \chapter{bar}        \begin{figure}         \centering         \rule{1cm}{1cm}         \caption{Yet another figure}        \end{figure}        \begin{algo}         (algo)         \caption{Yet another algorithm}        \end{algo}           \end{document}      ![parskip](http://i.stack.imgur.com/GLiMK.png) Parskip and parindent seem to play an important role, still I dont get a result as mentioned in lockstep's answer (with the spacing between chapters) ... **Update 2** : Okay, now I found the reason why it's not working. It's the `hyperref` package. Updated MWE:               \documentclass[12pt,a4paper,twoside,openright]{report}      \usepackage[english]{babel}      \usepackage{float}       \newfloat{algo}{tbp}{loa}[chapter]     %  \setlength{\parskip}{3mm}     %  \setlength{\parindent}{3mm}       \frenchspacing       \sloppy     % \usepackage{hyperref}                    % !!!     %  \hypersetup{pdftitle={Bachelorthesis}}  % !!!     %  \hypersetup{colorlinks=false}           % !!!     %  \hypersetup{plainpages=false}           % !!!     %  \hypersetup{pdfborder={0 0 0}}          % !!!      \usepackage{etoolbox}      \makeatletter       \patchcmd{\@chapter}%       {\addtocontents{lof}}%       {\addtocontents{loa}{\protect\addvspace{10pt}}%        \addtocontents{lof}}%       {\typeout{*** SUCCESS ***}}{\typeout{*** FAIL ***}}      \makeatother                \begin{document}       \listoffigures       \listof{algo}{List of Algorithms}            \chapter{foo}        \begin{figure}         \centering         \rule{1cm}{1cm}         \caption{A figure}        \end{figure}        \begin{algo}         (algo)         \caption{An algorithm}        \end{algo}        \begin{figure}         \centering         \rule{1cm}{1cm}         \caption{Another figure}        \end{figure}        \begin{algo}         (algo)         \caption{Another algorithm}        \end{algo}            \chapter{bar}        \begin{figure}         \centering         \rule{1cm}{1cm}         \caption{Yet another figure}        \end{figure}        \begin{algo}         (algo)         \caption{Yet another algorithm}        \end{algo}           \end{document}      Uncommenting the hyperref package and settings messed up the layout of the custom `\listof`. So to break down this issue:   1. How to adjust `\parskip` and `\parindent` without messing up the lists?   2. How to avoid `hyperref` package messing around with the layout? **Update 3** : Closed this question:   1. _How to adjust`\parskip` and `\parindent` without messing up the lists?_ I asked a follow-up question here: How to avoid `\parskip` being applied to `\listoffigures` etc.?   2. _How to avoid`hyperref` package messing around with the layout?_ Solved: Simply loading hyperref at the end of all packages and **after** `\makeatother`. Thanks to Frank Mittelbach's workaround which helped me to solve the layout issue till this point.


title: How to vertically align title when reducing the header size in Beamer Palo Alto theme?

text: I tried for some time to adjust the height of the header in Beamer Palo Alto theme. I now managed to do so, but now I have the problem that the title in the header is not properly aligned anymore. Also the dark rectangle from the overlapping sidebar is now gone. Maybe someone could tell me how to vertically align the title and how to get back the rectangle. I hope this isn't a stupid question and I would greatly appreciate some help. Here is an example of how I did it so far:               \documentclass[german]{beamer}     \usepackage[ngerman]{babel}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usetheme{PaloAlto}     \definecolor{Steelblue4}{rgb}{0.21,0.39,0.54}     \usecolortheme[named=Steelblue4]{structure}     \usefonttheme{serif}     \useinnertheme{rounded}     \setbeamertemplate{navigation symbols}{}     \title[]{Title}     \author[]{Author}     \date{Date}     \makeatletter          \setbeamertemplate{headline}     {%         \begin{beamercolorbox}[ht=1cm,dp=3ex]{title}         \usebeamerfont{title in head}             \end{beamercolorbox} %     }     \makeatother          \begin{document}          \begin{frame}{Frametitle 1}     \section{Frame 1}     Content...     \end{frame}          \begin{frame}{Frametitle 2}     \section{Frame 2}     Content...     \end{frame}          \end{document}      I hope I did the example right as I am new to LaTex.


title: Add chapter/appendix prefix in table of contents of scrbook with correct appendix running head

text: My first question is how to add the chapter or appendix prefix in the table of contents of scrbook class instead of the its default appearance. For example, in the figure below, I want to change the chapter entry in TOC to Chapter 1. Introduction. ![](http://i.stack.imgur.com/mcJ1r.png) and the same goes for the appendix entry in TOC, which means typesetting Appendix A. Electro... instead of the figure below. ![](http://i.stack.imgur.com/IlblF.png) Additionally, I have used **`\appendix`** before starting my appendices, so it treats all the subsequent chapters as chapters A, B, etc. However, I want to treat them as appendices to appear correctly in the page headings as "Appendix A. Electro..." instead of "Chapter A. Electro..." in the page heading as shown below. ![enter image description here](http://i.stack.imgur.com/nkjlY.png) Thanks in advance


title: Numbering side-by-side equations or inline equations

text: I am trying to produce a two-column table of math equations, where each cell contains its own left-justified, numbered equation. I tried using `\begin{equation} \end{equation}` inside the tabular environment, or inside a description list with `multicols`, and I can get the numbering, but not the left-justification. I thought about using inline math mode in the table, but how do I get those equations to be numbered? Is there a little `\numberthisequation` command I can include in the ( inline-math ) commands? I suppose, I could use two `\minipages` side by side, but I was hoping for something a little more straightforward. Thanks!


title: How to edit latex-generated text in Captions?

text: I want to take the answer to the question LaTeX source code listing like in professional books one step further, and change the (latex-generated) text in the caption from `Listing n` to something more personalized, like `Code Snippet n`. How can I do this?


title: Spaces in references

text: I have the following reference :               @misc{pcons,     author = {Energy.Gov},     title = {{Estimating Appliance and Home Electronic Energy Use}},     Howpublished = {\url{http://energy.gov/energysaver/articles/estimating-appliance-and-home-electronic-energy-use}},     note = {[April 26, 2013]},     year = {2012}     }      But it shows as : ![enter image description here](http://i.stack.imgur.com/mqK3u.jpg) I asked this before and was told to add `{\url` to fix the issue, however this time I'm not sure what's causing the problem.


title: Texshop maximizing and minimizing windows in structured document

text: I hope this is not out of scope of tex.sx: I use the version 2.46 of TeXShop (with Lion) and I recently started structuring my document in various scripts linking them to the main `.tex` file with the header `%!TEX root = ./main.tex`. This works fine except that whenever opening one such "subfile", TeXShop also opens and then minimizes the `main.tex` file. To make things clearer, here's a simple example. **File main.tex**               \documentclass[a4paper,11pt,twopage,openright]{book}          \begin{document}          \vspace*{\fill}     \begin{center}     This is the main document.     \end{center}     \vfill          \include{chap-tools}          \end{document}      **File chap-tools.tex**               %!TEX root = ./main.tex          \chapter{Tools}          Some text.       Now say that everything is closed and that I open the file `chap-tools.tex` then Texshop will also open and minimize the file `main.tex`. (it also happens on other, yet similar, situations) It might seem stupid but it drives me crazy! I was wondering if other users had encountered the same problem and whether they had found a workaround (I tried my luck in the preference pane of Texshop but in vain...). Thanks a lot!


title: Problems with endfloat package

text: A minimal example using the `endfloat` package fails to compile. Before filing a bug report with the maintainer, please, could you take a look if I'm using it correctly? Perhaps you know a workaround?               \documentclass{article}     \pagestyle{empty}          \usepackage{endfloat}          \begin{document}       \section{Test}       \begin{table}         \begin{tabular}{c}         123 \\         \end{tabular}         \caption{Test}       \end{table}       Test       \processdelayedfloats     \end{document}      The error I'm seeing is:               (./texput.aux) (texput.ttt))     Runaway argument?     ! File ended while scanning use of \efloat@xfloat.     <inserted text>                      \par      <*> texput.tex          ?       I'm on Ubuntu, current TeXlive.


title: How to use the import package?

text: I've read about the import package and am now trying to use it in my document, but I only run into errors. I have a main file named `/ProjectPath/header.tex` which loads all packages, etc. Additionally, some further customisations are located in `/ProjectPath/header/` and are loaded by `/ProjectPath/header.tex`. Now I have several chapters like `/ProjectPath/chap1/` etc. Usually, I had all my files (the header files, the chapter files, the subchapter files, etc.) in one single folder and could easily compile Chapter1:               \input{header}          \begin{document}         …     \end{document}      To get more clarity it is of course useful to put the files into folders. I've read the documentation about the import package but I do not understand how to use the `\import` command. Lets say I have following configuration:               /ProjectPath/header.tex             %% main file     /ProjectPath/header/custom1.tex     %% is loaded by header.tex     /ProjectPath/header/custom2.tex     %% is loaded by header.tex          /ProjectPath/chap1/part1.tex     /ProjectPath/chap1/part2.tex     /ProjectPath/chap1/part3.tex     /ProjectPath/chap1/part4.tex     /ProjectPath/chap1/chapter1.tex     %% whole first chapter, can be compiled separately          /ProjectPath/chap2/part1.tex     /ProjectPath/chap2/part2.tex     /ProjectPath/chap2/part3.tex     /ProjectPath/chap2/part4.tex     /ProjectPath/chap2/chapter2.tex     %% whole second chapter, can be compiled separately          /ProjectPath/Document.tex           %% whole document, includes both chapters      Of course, now I can't use `\input{../header.tex}` in `/ProjectPath/chap1/chapter1.tex`. I am sure, I can get this fixed with the import package, but how? Any suggestions would be much appreciated! * * * **Edit:** Sorry for missing MWE. Here it is: In the simplest case I have the following files:               /header.tex     /header/custom.tex   %% is imported by header.tex     /chap1/part1.tex     %% loads header.tex      Contents:               %% header.tex     \documentclass{article}     \usepackage{import}      \subimport{header}{custom}          %% part1.tex     \input{../header}     \begin{document}         Text.     \end{document}      Compiling part1.tex yields in:               ! LaTeX Error: File `custom.tex' not found.          Latex Error: ../header.tex:4 Emergency stop.      What's wrong? I'm a bit slow today, I still don't get the correct use of the import package…


title: My TeXworks platform is presenting me with \end{document} problems

text: \documentclass[11pt]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[american]{babel}     \usepackage{geometry}     \title{text}     \author{text}     \date{\today}     \usepackage[useprefix=true,isbn=false,style=authortitle]{biblatex}     \addbibresource{resource.bib}     \begin{document}     text     \end{document}


title: Saving a 100 tokens worth, is it worth it?

text: The LaTeX kernel defines a number of tokens that are used throughout the LaTeX source and the standard LaTeX classes. For example:               \def\hb@xt@{\hbox to}      This particular one is commented as: > The next one is another 100 tokens worth. My understanding is that the tokens are saved by abbreviating the `to` and that is where the tokens are saved. Similarly, `\@height` saves 5 tokens at the cost in time of one macro expansion by defining the macro `\def\@height{height}` to replace the TeX `height` and so on with many more examples. However, in many cases the conversion, in my opinion, makes the code difficult to read. With to-days's computer power, is this still a good practice? Would you recommend that one should optimize final code in such a manner?


title: \parskip stretches more than expected

text: I wonder if I get something wrong with TeX’s glue concept. If define a length to be `2pt plus 1pt minus 1pt` I expect that the length should be exactly `2pt` where possible an if not it should be between `1pt` and `3pt`. But if I set               \setlength{\parskip}{0.5\baselineskip plus 1pt}      LaTeX stretches the parskip more than `1pt`. to reach the flushing bottom. Is it possible to get a flushing bottom in case where the `1pt` stretch is enough and a ragged bottom if not. I’d like to have a flushing bottom but I really don’t like parskips with an amount of `1.5\baselinskip` or more. ![too stretched](http://i.stack.imgur.com/WPlPA.png) I tried to build an example, which is kind of long since I needed to control the paragraph length. I tried `lipsum.sty` but I didn’t get the desired (bad) result in the example. So excuse the much lines …               \documentclass{scrreprt}          \setlength{\parskip}{0.5\baselineskip plus 1pt}     \flushbottom          \usepackage{lipsum}          \begin{document}     \chapter{Test}     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut,     placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero,     nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.     Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis     egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna     fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien     est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices     bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac,     nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue     eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim     rutrum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,     vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.     Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue     eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac     turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem.          Nulla et lectus     vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida     placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget     sem vel leo ultrices bibendum.  Donec varius orci eget risus. Duis nibh mi, congue eu,     accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum.     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut,     placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero,     nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.     Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis     egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna     fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien     est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices     bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac,     nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue     eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim     rutrum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.          \section{Test}     \lipsum[4-10]     \end{document}


title: Posters for a project

text: I am look for advice on posters in LaTeX. I was wondering whether could refer me to someone that has good templates?


title: monochrome and pstricks

text: I am creating a file type images for presentation / written, I have been interested in the `monochrome` package `xcolor`, but by using it I have not obtained the expected results, check the documentation for `pstricks` but , this is very old and refers to an obsolete package (`pstcol`), an image to illustrate what I need: ![Low resolution for tex.stackexchange.com](http://i.stack.imgur.com/D4cr0.png) and the MWE:               \documentclass[10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage[monochrome]{xcolor}     \usepackage{pstricks-add}     \pagestyle{empty}     \begin{document}     \begin{pspicture*}(-0.5,-0.5)(5,3.5)     \psset{unit=1.0cm,algebraic=true,dimen=middle,linewidth=0.8pt}     \pscustom[linewidth=0.7pt,linecolor=red,fillcolor=red,fillstyle=solid,opacity=0.25]{     \parametricplot{-2.39}{-1.14}{0.52*cos(t)+3.25|0.52*sin(t)+3}     \lineto(3.25,3)\closepath}     \pspolygon[linewidth=0.7pt,linecolor=cyan,fillcolor=green,fillstyle=solid,opacity=0.25](0.25,0.25)(3.25,3)(4.5,0.25)     \begin{scriptsize}     \uput[d](0.25,0.25){\red{$A$}}     \uput[u](3.25,3){\red{$B$}}     \uput[d](4.5,0.25){\red{$C$}}     \uput{7pt}[-100](3.25,3){\red{$\alpha$}}     \end{scriptsize}     \end{pspicture*}     \end{document}      **Clarification:** Not grayscale, an image in "black and white", modify a single image is no problem, what I want is to turn the colors in a "global" for a document (50 images). In the "Frequently Asked Questions" from the documentation of "pstricks" (pag 304) describes the process with a code like the following:               \usepackage[monochrome]{pstcol}     % ...     \makeatletter     \def\PSTricksMonochrome{%     \def\psset@bordercolor##1{\pst@getcolor{white}{\psbordercolor}}%     \def\psset@doublecolor##1{\pst@getcolor{white}{\psdoublecolor}}%     \def\psset@shadowcolor##1{\pst@getcolor{darkgray}{\psshadowcolor}}%     \def\psset@linecolor##1{\pst@getcolor{black}{\pslinecolor}}%     \def\psset@fillcolor##1{\pst@getcolor{white}{\psfillcolor}}%     \def\psset@gridcolor##1{\pst@getcolor{black}{\psgridcolor}}%     \def\psset@gridlabelcolor##1{\pst@getcolor{black}{\psgridlabelcolor}}%     \def\psset@hatchcolor##1{\pst@getcolor{black}{\pshatchcolor}}%     \def\psset@subgridcolor##1{\pst@getcolor{gray}{\pssubgridcolor}}}     \makeatother      It does not work an today.


title: List of symbols with glossaries -- problem with using \underline

text: I'm having a weird problem with glossaries (TeXLive 2011, glossaries v3.01), illustrated by the following example:               % compile this with     %    pdflatex example.tex     %    makeindex  -s "example.ist" -t "example.alg" -o "example.acr" "example.acn"     %    pdflatex example.tex          \documentclass{scrartcl}          \usepackage{amsmath}     \usepackage{bm}     \usepackage[acronym,nomain]{glossaries}     \newglossary[slg]{symbolslist}{syi}{syg}{Symbole}     \makeglossaries          \newcommand{\vect}[1]{\bm{#1}}     %\newcommand{\cvect}[1]{\overline{\vect{#1}}}     \newcommand{\cvect}[1]{\underline{\vect{#1}}}          \newglossaryentry{sym:sc}{name={\ensuremath{\cvect{s}}},description={some complex vector},type=symbolslist}          \begin{document}          \gls{sym:sc}          \ensuremath{\underline{\bm{s}}}          \printglossary[type=symbolslist]          \end{document}      In my document, I need to typeset complex-valued vectors in boldfaced, italic letters with a line below, see the `\cvect` definition. This works as expected, except if I'm trying to use it for a symbol definition along with the `glossaries` package. Then, the `pdflatex` run is interrupted with a `missing $` error. The weird thing about this is: if I use `\overline` instead of `\underline` in the definition of `\cvect`, everything works as expected (see the commented version of `\cvect`). My first idea was that this could be a problem with `\ensuremath`, however, when using it without `\newglossaryentry` (i.e., just in the document body), it works as expected.


title: Aligning nodes in TikZ calendar

text: There is probably something simple I'm missing, but I have tried several variations, and I can't seem to get the following right. This is some minimal code that demonstrates the problem:               \documentclass{article}     \usepackage[dutch]{babel}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes}     \usetikzlibrary{positioning,calendar,er}     \usetikzlibrary{decorations.markings}     \usetikzlibrary{shapes.geometric}          \newcommand{\training}{\node [anchor=base,fill=lightgray,draw=lightgray,rounded corners=0pt,inner sep=0pt,minimum size=10pt] {};}          \begin{document}     \begin{center}     \begin{tikzpicture}[every calendar/.style={week list},every day/.style={anchor=mid,day text={\%d=}}]     \calendar (juni) [dates=2012-06-01 to 2012-06-last] if (Wednesday) {\training};          \end{tikzpicture}          \end{center}          \end{document}       which gives ![enter image description here](http://i.stack.imgur.com/BxhmK.png) The problem is that I can't seem to get the training-nodes and the days to properly align vertically. This is the best I can get them, but the number of the day is placed at the top of the training-node, while I want them to be centred vertically. I've tried several combinations of anchors for the training nodes and the every day-style. Any help is greatly appreciated.


title: finding points on path with given x-coordinate (marking f(x) points for given x's)

text: A y=f(x) function is given as path; for a set of x-coordinates, I want to place node (x,f(x)) onto the path, and connect it with (x,0) with vertical line. I have not got very far myself:               \tikz{       \def\fSpec{ (-2,-2.2) .. controls (-1,2.5) and (.5,-1.7) .. (2,1.6) }       \def\xxx{{-1.9,-1.3,-.8,-.2,.4,.9,1.5,2.0}}       \draw[thin] \fSpec;       \foreach\x in \xxx{           %% how to find f(\x) here?       }     }      I've know about the intersections library, but it seems like overkill; I would like to learn something more elegant. I cannot give parametrically along the path length, because there will be multiple functions with different shapes and the points need to have the same x-coordinates for all of them.


title: How to add a package stereotype in tikz-uml?

text: I need to draw an "extended" uml diagram for problem frames. For this purpose I installed tikz-uml (because I am also using tikz for other drawings). My packages need a stereotype, but the tikz-uml docs don't say anything about that. I would like to have a type attribute to define a stereotype. The code below does not compile.               \tikzset{       type/.style={%         draw,         font={\guillemotleft #1 \guillemotright \\}}     }          \begin{tikzpicture}      \begin{umlpackage}[type=contextDiagram,x=0,y=0]{package-name}      \end{umlpackage}      \end{tikzpicture}      So this is what I want to achieve: ![uml diagram with one contextDiadgram package](http://i.stack.imgur.com/MpGys.png) Or is there another packege, which is more powerfull? Thanks.


title: Overriding margins with longtables

text: I am trying to create a large table, it is both wide and has a lot of rows. I've gotten long table to work and break it up, and I've managed to turn it landscape. However, due to the size of the whitespace on the bottom of the page in particular, the table is still too wide to fit the landscape pages. I want to override the normal margins drop in the table so that it takes up more of the page. I've tried using geometry but it doesn't seem to work with the longtable. Is there a way that I can do this. There will likely be many tables like this in my thesis so I need a reasonably efficient solution.               \documentclass[a4paper,12pt,oneside]{article}     \usepackage{longtable}     \usepackage{geometry}     \usepackage{lipsum,pdflscape}     \usepackage{booktabs}                    \begin{document}          \lipsum[1-4]                    \newgeometry{ left=1cm,right=1cm,top=0.5cm, bottom=0.5cm}     \begin{landscape}     \thispagestyle{empty}          \tiny     \begin{table}     \caption{\lipsum[11]}     % Table generated by Excel2LaTeX from sheet 'without formulas'     \begin{longtable}{llllclcccc}     \toprule                &   GenBank  &            &            &            &            &            &            &            &            \\                     &  accession &            &            &            &    Fluoro        &            & Allelic size  &            &            \\               Locus &     number & Repeat motif & Primer sequence (5' - 3') &  Multiplex & label &        N$_{A}$ & range (bp) &    H$_{o}$/H$_{e}$ &          N \\     \midrule      Locusname &  GH1114444 & (TG)2TTTG(TG)12TTTG & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &      6-FAM &          2 &    123-125 & 0.454/0.466 &        273 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\                \\           Locusname &  GH1114444 & (AC)19AG(AC)3 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &      6-FAM &          3 &    267-270 & 0.491/0.458 &        271 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\                \\           Locusname &  GH1114444 & (AC)6AA(AC)2(AAC)2AC(A)6 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        VIC &          5 &    273-298 & 0.612/0.598 &        273 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (GT)10 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &      6-FAM &          3 &    124-129 & 0.39/0.367 &        272 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (GT)12 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        PET &          3 &    271-276 & 0.655/0.642 &        264 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 & (TG)13(TATG)4 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        VIC &          2 &    364-368 & 0.155/0.143 &        252 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (TG)22 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &      6-FAM &          7 &    134-158 & 0.824/0.805 &        272 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 & (TC)5…(TC)2TT(TC)3…(TC)6AA(AC)12 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        PET &          2 &    285-287 & 0.500/0.496 &        266 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 & (AC)7ATACACAG(TC)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        VIC &          3 &    139-146 & 0.517/0.496 &        263 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (AC)15 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        VIC &          3 &    167-175 & 0.376/0.399 &        271 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (TG)13 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        NED &          3 &    194-198 & 0.631/0.618 &        255 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 & GTTG(GTTT)2(GTT)12(T)2 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &      6-FAM &          4 &    186-198 & 0.663/0.633 &        273 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &      (GT)8 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &      6-FAM &          3 &    164-167 & 0.121/0.115 &        272 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &      (AG)7 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        NED &          2 &    175-177 & 0.213/0.231 &        267 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &    (GGGA)6 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        VIC &          5 &    152-176 & 0.781/0.758 &        270 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &    (GACA)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        PET &          2 &    124-132 & 0.261/0.227 &        268 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &    (AAAC)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &      6-FAM &          2 &    198-209 & 0.495/0.471 &        273 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &    (TTTA)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        PET &          2 &    175-178 & 0.576/0.500 &        269 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (CCT)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        NED &          2 &    151-154 & 0.246/0.227 &        268 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (GAG)6 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &      6-FAM &          2 &    166-168 & 0.084/0.080 &        274 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 & (GT)8GA(GT)11AA(GT)5AT(GT)2 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        PET &          4 &    111-130 & 0.524/0.502 &        273 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (GT)10 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        PET &          2 &    180-184 & 0.007/0.007 &        273 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 & (CT)5TT(CT)12–16 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        VIC &          3 &    197-201 & 0.600/0.628 &        270 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (GT)12 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &      6-FAM &          2 &    200-205 & 0.489/0.497 &        272 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 & (AGGG)9 (ATGG)12 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        PET &          4 &    418-439 & 0.786/0.730 &        257 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (GT)19 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        NED &          6 &    144/164 & 0.831/0.789 &        248 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &    (AGC)16 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        NED &          3 &    223-232 & 0.310/0.300 &        261 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 & (AC)15 G (CA)10 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        NED &          4 &    125-133 & 0.813/0.740 &        252 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &    G(AG)13 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &      6-FAM &          2 &    260-262 & 0.393/0.398 &        270 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 & (TC)4T(CTTT)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        VIC &          2 &    192-196 & 0.517/0.498 &        271 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (CA)16 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        PET &          3 &    202-206 & 0.580/0.538 &        269 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (TG)13 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &       FAMa &          7 &    329-346 & 0.869/0.838 &        259 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (GT)15 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        NED &          5 &    281-287 & 0.480/0.549 &        221 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (CA)17 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        PET &          7 &    173-205 & 0.785/0.735 &        260 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\           Locusname &  GH1114444 &     (AC)11 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        NED &          3 &    194-198 & 0.621/0.577 &        243 \\                     &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\     \bottomrule     \end{longtable}     \end{table}     \end{landscape}     \restoregeometry          \lipsum[1]     \end{document}                    \end{document}


title: Floats interrupt and push back text

text: I have a               \subsection{Subsection}          Text text text          \begin{landscape}     \begin{figure}[p]     \centering     ...     \caption{Caption}     \label{fig:dcspe}     \end{figure}      \end{landscape}          Other text other text other text          \subsection{Other subsection}      The way this renders is though > Subsection > > Text text text > > pagebreak > > single page with the figure > > Other text other text other text > > Other subsection How can I get the "Text" to be followed by "Other text"?


title: Latex refuses to number chapters

text: Simply, my chapters are not numbered. This is true for both numbers in the TOC (all entries start with **0.** , like 0.4.12, 0.3.3, 0.2, no matter which chapter they are in), neither are things I used to see present, like **Chapter 7** before chapter title. Has anybody got any idea what could cause this? I am using fancyhdr, but nothing suspicious.


title: Create a table with LaTeX

text: I need to copy a table from a pdf file to my LaTeX document. I know I have to do it by hand but still don't understand how to create a table with LaTeX. ![I need to translate this table back to its LaTeX commands](http://i.stack.imgur.com/5I5xR.png)


title: how can I remove the institute from the author footline on beamer?

text: I'm using the Madrid theme. I have defined \institute as               \institute[]{\pgfuseimage{logo} \\ my-institute}      because I want the logo to appear at the title frame. Also, since all viewing the presentation are from the same institution, it makes no sense to declare the `[]` part of `\institute`. It seems redundant. But, in the footline, my name appears with an empty `()` to it's right. My question is: how do I remove this `()`? I don't want the institute specified at the footnote. Just to be clear, my footline is something like:               my-name ()    |    title     |    date      I want it be               my-name   |    title     |    date


title: Highlighting strings between [ and ] in lstlistings

text: I want to use `lstlisting` to present a file like this:               #comment     [keyword]     key1=value1     key2=value with RegEx          [keyword:NewKeyword]     key1 = value1     key2=value with RegEx      and this is my language definition:               \lstdefinelanguage{myLang}{         sensitive=false,         morestring=[b]",         keywords={=},         morecomment=[l]{\#},     }      How can I extract `[keyword]` and `[keyword:NewKeyword]`?


title: Automatic hyphenation of compound words

text: When I was learning to drive a typewriter (shortly after the death of my pet sabre-tooth), I picked up the habit of using a double hyphen when splitting compound words, thus: > The system has a high-   >  -performance component I've read babel: Adding `ngerman`s language shorthands to `english` as the main document language, and Stefan's answer to What's the benefit of loading babel when writing in English?, and thought this would do the trick:               \documentclass[draft]{article}     \usepackage[ngerman,british]{babel}     \useshorthands{"}     \addto\extrasbritish{\languageshorthands{ngerman}}     \selectlanguage{british}     \begin{document}     \noindent     Normal hyphenation, to illustrate:\\      \begin{minipage}{80pt}     Lala High"=performance.     \end{minipage}     \\[2pc]     \begin{minipage}{80pt}     Lalala lalala High"=performance.     \end{minipage}     \\[2pc]     My best guess:\\     \begin{minipage}{80pt}     Lala High"="~performance.     \end{minipage}     \\[2pc]     \begin{minipage}{80pt}     Lalala lalala High"="~performance.     \end{minipage}     \end{document}      It looks like the sequence `"="~` is close to what I want, but it suppresses hyphenation of the parts. I've now spent about two hours trying all kinds of combinations, but as I don't really understand what I'm doing, I thought it better to ask, here, someone who actually _knows_. I could, of course, use the `\discretionary` command, but I'd prefer it to be automatic. BTW, typographical criticism is welcome (such as "don't _do_ that!"), but I'd still like to know, even if just out of curiosity.


title: Using bibentry to insert reference in text and omit the list of references at the end

text: I am using `bibentry` package to insert references in the text of the document. This is a CV and the references are my own publications. I want to remove the bibliography listed at the end of the document. So far, I have had no success. Here is an example .tex file:               \documentclass{article}          \usepackage{natbib}     \usepackage{bibentry}          \begin{document}          \nobibliography*          Some text here. My publications:     \begin{itemize}     \item \bibentry{pub1}      \item \bibentry{pub2}     \end{itemize}          Some other text.          \bibliographystyle{plain}     \bibliography{my_pubs}          \end{document}


title: Greek typewriter font

text: Hello I want to use a greek typewriter font. So far I can't manage to find any font of that kind. Can someone tell me where I can find one?


title: How can I change the font of all equations?

text: I'd like to change my default font style in all equations of one document, not just single equation. I guess I am using `\usepackage[utf8]{inputenc}` and `\usepackage{amsmath}`, which may be related to font setting. Which font I want to change into is like ![enter image description here](http://i.stack.imgur.com/SUD9B.png) but now is ![enter image description here](http://i.stack.imgur.com/f3FB0.png) I am using pdfLaTex in TeXworks.


title: Dashed lines only for covered boundaries with TQFT

text: I'm using Andrew Stacey's wonderful TQFT package to create pictures of cobordisms. But I'm having trouble with the boundaries: ![enter image description here](http://i.stack.imgur.com/QfeCA.png)               \documentclass{article}          \usepackage{tikz}     \usepackage{tqft}          \begin{document}         \begin{tikzpicture}             \node[draw,tqft/reverse pair of pants,boundary lower style={draw,dashed}] (A) {};             \node[label={below:should be solid}] at (A.outgoing boundary 1) {};         \end{tikzpicture}     \end{document}      My drawing convention for cobordisms is that the boundaries that are covered by the cobordism are dashed, and all that are visible should be solid. The above is how far I came - nearly all circles come out correctly, but the bottom circle should be completely solid. Is there a key for only styling the outgoing lower boundary?


title: Forcing graphic, table, plot .. out of page boundary

text: I am very new to latex, so this question might be very basic. However, I have been searching the whole evening, so either I don't know how to google this effectively, or what I am trying to do is not a good practice. My problem looks the following way:![enter image description here](http://i.stack.imgur.com/AlXCw.png) As can be seen, the plot is too big for the page. In this specific case, I could force it to appear under the first one (I don't know why latex doesn't do this automatically), but later, I have plots which are on their own too big for a page. But as there is a lot of unused space to the left, I would like to use it, and force the plot to appear further to the left. But I could not find out how. I realize that it is not good to stick to one specific box per page where everything is located and then breach it, and if people agree that one absolutely shouldn't do it, I will have to find another solution. Thanks for any help. edit: MWE               \begin{tikzpicture}     \begin{axis}[     ybar,     title=$2\times2$,     bar width=.2cm,     enlargelimits=0.20,     xlabel=Relative share in \%,     ylabel=Dodgson scores,     ytick = data,     xtick = data,     height = 10cm,     width = 2.3cm     ]     \addplot+[red!60!white] table[x index=0, y index=1, forget plot] {data/curve_2a.dat};     \addplot table[x index=0, y index=1, fill=red] {data/curve_2b.dat};     \end{axis}     \end{tikzpicture}     \begin{tikzpicture}     \begin{axis}[     ybar,     title=$3\times3$,     bar width=.2cm,     enlargelimits=0.15,     xlabel=Relative share in \%,     ylabel=Dodgson scores,     ytick = data,     height = 10cm,     width = 3cm     ]     \addplot+[red!60!white] table[x index=0, y index=1, forget plot] {data/curve_3a.dat};     \addplot table[x index=0, y index=1, fill=red] {data/curve_3b.dat};     \end{axis}     \end{tikzpicture}      ... and so forth. A total of 12 which get bigger with the amount of data they represent. edit2: Since I am already asking a question and am showing my plots, is there an easy way to change one of the plots to red, but keeping it in the style of the basic blue one? Most importantly, just adding +[red!30!white] removed the nice boundaries around the bar. But I think because I used "forget plot", it won't cycle automatically through its presets.


title: Write unit tests for Lua in ConTeXt

text: I would like to write some unit tests for Lua code being used by ConTeXt, and would like to know if anyone else has done this and what may be require in setting up the framework. The Lua code in particular is being stored in separate files (e.g. `numbering.lua`), meaning that a test runner (e.g. Busted) can just include them with `require`. It may be worth noting (but probably does not matter) that I am using Python's unittest as a test runner with lunatic-python. The inherent problem is that the globals defined by LuaTeX and ConTeXt are not naturally in Lua. Tables such as `context` and `texio` are simply not accessible without a `require` that imports them from their corresponding files. (Which looks to be `tex/texmf-context/tex/context/base/trac-log.lua` and ... _who knows_ , respectively). Has anyone done unit testing of ConTeXt + Lua? What Lua files might one need to include to get the variables? I would expect there to be an entry-point somewhere that would take care of most of the setup. It looks like the `.lua` files of relevance would generally be in `./tex/texmf-context/tex/context/base/` but I am just guessing, and since there are around 840 `.lua` files I would be grateful for any guidance on where to start.


title: How to change the indents between LaTeX formulas and text in Lyx

text: I want to change the indents between LaTeX formulas and text in Lyx, but I don't know where is this option. Can you help me?


title: How to create elegant stripped regions in matrix along with numbering of the rows and columns

text: I want to create a matrix that will consist of regions with stripped lines (so as to denote that it is full banded) and other regions that will be all zero. I have seen some rows & columns numbering in other posts, but I find the size of the "numbers" is usually as big as the elements of the matrix itself, which is appalling. A preview of what I want to create is portrayed in the picture below. ![enter image description here](http://i.stack.imgur.com/CEpjW.png) I find it extremely difficult to create something like this, but I have understood by now that everything is possible in Latex, the point is to know how.


title: Lyx doesn't display matrix correctly

text: I have tried to insert following LaTeX code for matrix in Lyx:               $u_{L}(k) = \sqrt{E}\begin{pmatrix} 0 \\ 1 \\ 0 \\ -1 \end{pmatrix}$.      In all LaTeX-based sites this code is displayed correctly, but Lyx have disappointed me: pdf-viewer Adobe Reader (which displayed all before that) shows that: ![An illustration to the problem](http://i.stack.imgur.com/HipA8.jpg) The question: how to force Lyx to convert LaTeX code for matrices correctly?


title: biblatex: How to remove the parentheses around the year in authoryear style?

text: The standard `authoryear` style in `biblatex` puts parentheses around the year in the bibliography and no parentheses around in text citation years: >   * Smith 2011 shows ... (citation) > >   * Smith, Joe (2011) ... (bibliography) > > Is there a (simple) way to turn these into: >   * Smith (2011) shows ... (citation) > >   * Smith, Joe. 2011. ... (bibliography) > >


title: Writing tutorials with exam document class, with and without solutions

text: I would like to write some tutorials for my students, and for this I am using the `exam` document class, and the `solution` environment. now the problem is I have a statement               \printanswers      that I need to comment for the tutorial, and uncomment for the solution. I was hoping if there's a way through which I can compile it a single time, and the source file (say tutorial.tex) creates two pdfs -   1. tutorial.pdf (without solutions)   2. tutorialSolution.pdf (with solutions) Following is my source code -               \documentclass{exam}      %\printanswers     \usepackage[T1]{fontenc}     \usepackage{pslatex}      \usepackage[pdftex]{color}        \usepackage[pdftex]{graphicx}               \begin{document}     \begin{questions}          \vskip 0.5 cm \question Question header \vskip 0.5cm     Question text          \begin{solution}     Solution text     \end{solution}          \end{questions}     \end{document}      thanks for any help you can provide. gaurav


title: eledpar doesn't respect changes of line spacing

text: I try to typeset a bilingual text on facing pages. For this I use the eledmac/eledpar packages. The latin text on the even pages should get displayed larger than the translation on the odd pages. However, within the environments of the `eledpar` package, the linespread does not get sufficiently increased. The difference to a normal paragraph outside the environments of `eledpar` with larger font size is small but noticeable and leads to a suboptimal outcome. MWE:               \documentclass{scrbook}     \usepackage[latin,english]{babel}     \usepackage{blindtext}     \usepackage{eledmac,eledpar}     \begin{document}     \begin{pages}\numberlinefalse{}       \begin{Leftside}\large \selectlanguage{latin}         \beginnumbering         \pstart \blindtext \blindtext \pend         \endnumbering         \par       \end{Leftside}            \begin{Rightside}\selectlanguage{english}         \beginnumbering         \pstart \blindtext \blindtext \pend         \endnumbering       \end{Rightside}       \Pages     \end{pages}          The following has correct line spacing     \selectlanguage{latin}     {\large       \blindtext \blindtext\par     }     \end{document}      Am I doing something wrong? (The `parallel` package seems to work correctly, but it is not an option for me as it can't set even basic footnotes on the pages which are typeset in parallel.) EDIT: I get the impression that `eledpar` doesn't respect alterings of the line spacing at all -- see this MWE:               \documentclass{scrbook}     \usepackage[latin,english]{babel}     \usepackage{blindtext}     \usepackage{eledmac,eledpar}     \begin{document}     \begin{pages}\numberlinefalse{}       \begin{Leftside}\selectlanguage{latin}         \beginnumbering         \pstart \linespread{1.5}\selectfont \blindtext \blindtext \par \pend         \endnumbering       \end{Leftside}            \begin{Rightside}\selectlanguage{english}         \beginnumbering         \pstart \blindtext \blindtext \pend         \endnumbering       \end{Rightside}       \Pages     \end{pages}          {\selectlanguage{latin} \linespread{1.2}\selectfont \blindtext \blindtext\par}     \end{document}


title: Break multicolumn text at document margin with tabularx

text: I'm using tabularx to break the content of a column at the document margin (cf. Linebreak in table cell at document margin). But when I use `\multicolumn` in such a table, the instruction to break the text in that column is ignored. How can I enforce it?               \documentclass{article}     \usepackage{tabularx}          \begin{document}     \newlength{\mylength}     \setlength{\mylength}{\linewidth}     \addtolength{\mylength}{-\parindent}          \hrule         \begin{tabularx}{\mylength}{lX}             Lorem ipsum dolor sit amet, consectetuer & adipiscing elit. Ut purus elit, vestibulum ut, placerat ac\\             \multicolumn{2}{l}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac}\\         \end{tabularx}     \hrule          \end{document}      ![enter image description here](http://i.stack.imgur.com/CBMqc.png) * * * In response to Mico's question:               \documentclass{article}     \usepackage{tabularx}          \begin{document}     \newlength{\mylength}     \setlength{\mylength}{\linewidth}     \addtolength{\mylength}{-\parindent}          \hrule         \begin{tabularx}{\mylength}{llX}             Lorem ipsum dolor & sit amet, consectetuer & adipiscing elit. Ut purus elit\\         \end{tabularx}     \hrule         \begin{tabularx}{\mylength}{llX}             Lorem ipsum dolor & sit amet, consectetuer & adipiscing elit. Ut purus elit\\             Lorem ipsum dolor sit & \multicolumn{2}{p{\mylength}}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit}\\         \end{tabularx}     \hrule          \end{document}      ![enter image description here](http://i.stack.imgur.com/gSPdI.png)


title: Plot x=3 in PGFPlots

text: I just started to use `pgfplots` and I'm trying to plot the line `x=3` (a line parallel to the y axis where x is 3). I've tried to find an answer on the net, but all the examples always show how to ploy cases of `y=...`, and not the other way around. I should point out that the graph contains more than one plot (if it matters).


title: How can I get access to the size parameters of a TikZ node?

text: The following is a refined form of the problem that I posted more than 18 hours ago. I am new to Tikz. However, even with the little knowledge I have of TikZ, I do appreciate its superiority over the other graphics packages that I have used previously. I would like to create a TikZ node style that can produce the diagram shown below. I have drawn it using Xfig. However, I would like to draw it in a more flexible way using TikZ. The following constraints pertain to the diagram:   1. The arcs on the left and the right sides of the rectangular structure are semi-circles --- each has a radius that is half the height of the underlying rectangle(s).   2. The two triangles inside the structure are similar.   3. Each triangle is an isosceles triangle whose apex lies on the center-line that is parallel to the top and bottom edges of the rectangular structure.   4. The dimensions of the triangles are fixed fractions of the height of the rectangular structure.   5. The base of the filled triangle is on the left edge of the (imaginary) inner rectangle; and that of the second triangle is on the base right edge of the (imaginary) inner rectangle. The only parameters that I should be free to alter are the positions of the anchors, the height and the width of the rectangular structure. I need to know how I can access the height and width parameters and use them in the calculation of the other parameters of the structure. Could some experienced user of TikZ and PGF come to my aid. Thanks. ![enter image description here](http://i.stack.imgur.com/1th17.png)


title: How to use biber to convert integer to BibTeX-month macro

text: Is it possible with `biber` to convert               @misc{example,       month = {04},     }      to               @misc{example,       month = apr,     }      in which `apr` is a BibTeX macro? I am aware of the mapping facilities, but the closest I can currently get, using               <map_step map_field_source="MONTH" map_match="04" map_replace="apr" />      is               @misc{example,       month = {apr},     }


title: Beamer: remove the title highlight

text: I use the PaloAlto theme and the title of the title slide appears highlighted. Is it possible to remove the highlight and modify the title font?


title: How to make figure and listing share their counter

text: I'm using the "listings" package to write pieces of code (XML, RDF, Java, etc) and I want them to have the same counter of the Figure environment. For example,               Listing 1: blablabla     Listing 2: blebleble     Figure 3: bliblibli     Listing 4: blobloblo     Figure 5: blublublu      The purpose of doing it is to change the "Listing" label to "Figure". But I need both environments to share the same counter. How I do it? Thanks in advance.