title: Consistent vertical alignment of one-line text in minipages

text: The vertical alignment of one-line text in minipages depends on the vertical extent of the text itself:               \documentclass{scrartcl}     \begin{document}       bad alignment:       \frame{       \begin{minipage}[c][1cm][c]{0.1\linewidth}         \LARGE Good       \end{minipage}}       \frame{       \begin{minipage}[c][1cm][c]{0.2\linewidth}          \LARGE Morning       \end{minipage}}     \end{document}      ![bad alignment](http://i.stack.imgur.com/Xhgk6.png) There is a simple solution adding a full extent dummy symbol like `\ddag`, but I don't like this solution for different reasons (e.g. bad for people who want to copy the text from my pdf as they will copy my hidden dummy symbol as well):               \documentclass{scrartcl}     \usepackage{color}     \begin{document}       dummy symbol solution:       \frame{       \begin{minipage}[c][1cm][c]{0.1\linewidth}         \LARGE Good\textcolor{white}{\ddag}       \end{minipage}}       \frame{       \begin{minipage}[c][1cm][c]{0.2\linewidth}         \LARGE Morning\textcolor{white}{\ddag}       \end{minipage}}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Js8Mk.png) Do you have any advices how to solve this problem?


title: text with semi-transparent color filled box

text: I have this text:               \begin{flushleft}         \fontsize{16pt}{16pt}\selectfont\textit{some text}\\         \fontsize{16pt}{16pt}\selectfont\textit{some text}     \end{flushleft}      and I would like to have a filled box with a semi-transparent color (eg. white or light gray) underlying this text. I've found several examples for beamer, but this is for a report, I assume that beamer is different from report in this sense in Latex. I appreciate some support to do this, thanks in advance,


title: How to make figure caption boldface

text: When I create a figure caption, LaTeX automatically creates the `Figure1:` part and then the caption. How to make the `Figure1` part boldface? My figure TeX codes is this:               \begin{figure}[ht!]     \includegraphics[width=80mm]{images/tftype.png}|\includegraphics[width=80mm]{images/tftype1.png}     \caption{An overview of structural variants of transcription factors. Each specific variant binds to a certain class of DNA motifs (shown in blue).  Some of the motifs have a high affinity for the TATAAA box were others favor specific sequences somewhere in the promoter region. {\small http://www.nature.com/scitable/resource?action=showFullImageForTopic\&imgSrc=37950/sadava\_14\_15\_FULL.gif}}     \end{figure}      I'm a beginning TeX user and some things are still strange to me. Any help is appreciated. My desired output is : **Figure1:** some very interesting information


title: Subtitle block in mdframed

text: I am having a small problem with `mdframed.sty`. The subtitle block seems to have a `0.4pt` frame with the same color of the subtitle background. This causes the left and right ends of the subtitle frame to intrude a bit into the overall linewidth of the frame: ![mdframed subtitle frame problem](http://i.stack.imgur.com/iPG43.png) This is directly from the code in the users guide:               \documentclass{amsart}          \usepackage[tikz]{mdframed}          \usepackage{xcolor}          \newmdenv[%         roundcorner=5pt,         subtitlebelowline=true,subtitleaboveline=true,         subtitlebackgroundcolor=yellow!70!white,         backgroundcolor=blue!20!white,         frametitle={Theorem},frametitlerule=true,         frametitlebackgroundcolor=yellow!70!white,     ]{subtitleenv}               \begin{document}          \begin{subtitleenv}     Some Text \ldots     \mdfsubtitle{Notes}     Some Text \ldots     \end{subtitleenv}          \end{document}      I looked at the code (and very lucid it is) but can find no incantation that addresses the `linewidth` of subtitle frame as a whole. Suggestions?


title: How can I adjust the width of legend images in PGFPlots?

text: I am using pgfplots to create charts. How can I adjust the width of images of legend entries? I have adjusted plot coordinates in legend image code in the line legend style, but this not worked truely. Is there any way to do this?


title: Theorem environment with empty label and also no space and no dot.

text: I want to have a theorem-like environment, without the usual "Theorem x." labeling. I tried to define an empty label text, which results in a dot and space being used as the label text - there has to be an easy way to do this? Why do I want to do this? I am typesetting a proof by induction; for the induction base, I want to restate the theorem that is proved, restated for the base case. (i.e., replace i with 1). The theorem environment WITHOUT the label text is exactly what I want.


title: Failed to display math formula in beamer

text: This is my preamble for a beamer               \documentclass{beamer}          \usepackage{beamerthemesplit}          \usepackage{graphicx}     \usepackage{verbatim}               \mode<presentation> {     \usetheme{Boadilla} % Pretty neat, soft color.     \usetheme{Frankfurt} % Similar to the default with an extra region at the top.      \setbeamertemplate{footline}[page number]     \setbeamercovered{transparent}     \setbeamercovered{invisible}     \setbeamertemplate{navigation symbols}{}      }          \usepackage{beamerthemesplit}     \usefonttheme[onlymath]{serif}     \userpackage{shaded,colour}     \usepackage{amsmath}     \usepackage{mathtools}     \usepackage{amssymb}     %\input{style.tex}     \titlegraphic{\includegraphics[width=2cm]{VUB_logo_notext.jpg}\hspace*{6.75cm}~%        \includegraphics[width=2cm]{CMS.jpg}     }          \title{Title}     %\titlegraphic{\hspace{45.5\baselineskip}\includegraphics[scale=0.24]{VUB_logo_notext.jpg}      %\hspace{39\baselineskip} \includegraphics[scale=0.113]{CMS.jpg}}                \subtitle{Dissertation defence}     \author{Author}     \date{\today}          \begin{document}      However, I fail to get math formulas displayed like               $ m_{\tilde t_1} > m_{\tilde\chi^0_{n}} $


title: Caption at the side of the PDF figure in landscape orientation

text: The PDF document page I need to include in my document is in landscape orientation. How do I get the resulting output page in the PDF file on one hand shown in landscape orientation with the rotated PDF image for better visibility and on the other hand with the caption on the left side of the page and not at the bottom as my document has to be printed out in portrait orientation? Also it should remain on Page 1 and not go to the next page. As I have a PDF figure so I tried it out with `\usepackage{pdflscape}`:               \documentclass{article}     \usepackage{graphicx}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \fancyhead[C]{Fancy page header}     \fancyfoot[C]{Footer}     \fancyfoot[R]{\thepage}     \usepackage{kantlipsum}     \usepackage{afterpage}     \usepackage{pdflscape}          \begin{document}          \kant[1]     \afterpage{     \clearpage     \section{New Section}     \begin{landscape}     \begin{figure}[htb]       \centering       \rotatebox[origin=c]{-90}{       \begin{minipage}{.5\linewidth}       \includegraphics[scale=.9,angle=90]{example-image-a}  %% adjust angle       \caption{Figure caption is coming here and it will be by the side of the figure}       \end{minipage}%       }      \end{figure}     \end{landscape}     }     \kant     \end{document}      but the `\usepackage{pdflscape}` brings it to a new page and the caption is at the bottom. This is the result I would like to have: ![enter image description here](http://i.stack.imgur.com/3FAIG.jpg) Do I have too many wishes? I am thankful for any feedback in advance.


title: moderncv "title"-line is simply missing

text: I'm just missing the title-line "curriculum vitae" in the head of my cv. thank you very much               \documentclass[11pt,a4paper,sans]{moderncv}      \moderncvstyle{casual}              \usepackage{xcolor}     \usepackage{amssymb}     \usepackage[scale=0.75]{geometry}     \setlength{\hintscolumnwidth}{3cm}           \definecolor{firstnamecolor}{rgb}{0.65,0.65,0.65}     \definecolor{blue}{rgb}{0.20,0.40,0.65}     \definecolor{footersymbolcolor}{rgb}{0.65,0.65,0.65}     \definecolor{addresscolor}{rgb}{0.35,0.35,0.35}          \quote{Während einer nur Zahlen und Zeichen im Kopf hat, kann er nicht dem Kausalzusammenhang auf die Spur kommen.  -Schopenhauer-}            \newcommand{\Datum}{\today}     \makeatletter         \newcommand{\Unterschrift}{(\@firstname ~\@familyname)}     \nopagenumbers          \firstname{Chris}     \familyname{\textcolor{blue}{Lastname}}     \title{Curriculum Vitae}     \address{street}{city}     \mobile{123}     \email{123@hotmail.de}          \begin{document}     \maketitle          \end{document}


title: Header with roman and arabic numerals, list of figures integrated into table of contents

text: How can I include list of figures, list of tables etc. in the table of content? Additionally I would like to have Roman numerals for the page with the table of contents, list of figures, list of tables AND (!!!) section A. Beginning with section B, I would like to have Arabic numerals as page numbers in the header. How should I modify the code that I have provided? Thanks a lot in advance!               \documentclass[12pt,oneside,a4paper]{article}         \usepackage{amsmath, amssymb, graphicx, pgfplots, tikz, booktabs, tabularx, float, pgfplotstable, fancyhdr}         \allowdisplaybreaks         \usepackage[font=small,labelfont=bf,labelsep=colon]{caption}         \special{papersize=210mm,297mm}         \usepackage[left=40mm, top=30mm, right=20mm, bottom=20mm, headsep=12.5mm, headheight=3mm]{geometry}         \pagestyle{fancy}         \renewcommand{\headrulewidth}{0.0pt}         \lhead{}         \chead{}         \rhead{\makebox[0pt][r]{Title of topic}                \hspace*{1.66667em}                \thepage}         \lfoot{}         \cfoot{}         \rfoot{}         \usepackage{setspace}\onehalfspacing         \setstretch{1.3}         \renewcommand\contentsname{Table of Contents}         \begin{document}         \newpage         \tableofcontents         \newpage         \listoffigures         \newpage          \listoftables          \clearpage      \section*{Section A}     \section{Section B}          \end{document}


title: ! Misplaced \omit. Longtable Error and Caption Misalign Extra alignment tab has been changed to \cr

text: The issue that I am having with the image of my longtable is that the caption is not centered and I have vertical lines that appear above my table. I have looked up other posts about my errors but non resolve the issue.               \begin{center}     \begin{longtable}{|c|c|c|}     \centering     \caption{Average Scalar Flux Groups 1 and 2 Test  C} \\     \hline     \rowcolor[gray]{0.85}\textbf{Average Scalar Flux Group 1}      &\textbf{Average Scalar Flux Group 2} & \textbf{Distance} \\       \hline     2.185692E-17    &   4.194769E-18        &       0.00 \\ \hline     -1.202652E-04   &   1.202652E-04        &       0.10\\ \hline     -2.405521E-04   &   2.405521E-04        &       0.20\\ \hline     -1.839872E-04   &   1.894445E-04        &       0.30\\ \hline     -1.295853E-04   &   1.403995E-04        &       0.40\\ \hline     -7.678566E-05   &   9.288239E-05        &       0.50\\ \hline     1.078685E-04    &   -1.078685E-04       &       22.30\\ \hline     0.000000E+00    &   0.000000E+00        &       22.40\\ \hline     \label{tlabel}     \end{longtable}     \end{Center}      This is what it looks like. The rest of the table looks fine. It is also cutting off a word in my header above the horizontal line at the top of the page on the left hand side. ![enter image description here](http://i.stack.imgur.com/IqJgl.jpg)


title: Error indexing Alpha pages

text: I am trying to make a sort of recipe book for myself. I would like to have every recipe a "page reference" given by a letter representing the category (main courses, dessert, biscuits, ...) and a progressive neverchanging number, so that I can add recipes and I do not have to print them again. Anyway, I redefine the page counter (?) and everything seems fine but when I index some entries, the index result wrong, as you can see from this example:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{blindtext}          \usepackage{tabularx,imakeidx,siunitx}          \newcounter{recipe}     \setcounter{recipe}{0}          \renewcommand{\thepage}{\Alph{section}\arabic{recipe}}     \newcommand{\mysection}[1]{         \newpage         \setcounter{recipe}{0}         \section{#1}     }     \newcommand{\recipe}[1]{         \newpage         \stepcounter{recipe}         \subsection{#1}     }     \newcommand{\Index}[1]{         #1         \index{#1}     }          \makeindex          \begin{document}          \tableofcontents          \mysection{Antipasti}     \recipe{insalata russa}     \Index{farina}\\     \Index{zucchero}\\     \blindtext          \recipe{crostini toscani}     \Index{farina}\\     \Index{zucchero}\\     \blindtext          \mysection{Primi}     \recipe{gnocchetti primavera}     \Index{farina}\\     \Index{zucchero}\\     \blindtext          \recipe{lasagne}     \Index{farina}\\     \Index{zucchero}\\     \blindtext          \recipe{bucatini all'amatriciana}     \Index{farina}\\     \Index{zucchero}\\     \blindtext          \printindex          \end{document}      index should report both "farina" and "zucchero" in each and every page (A1, A2, B1, B2, B3), instead you'll find a funny farina, A1, B1; zucchero, A2, B2 Please note that this is a very very simplified example and that there are good reason to make it this way, so do not try to just suggest a different method (though a different latex way to do it would be obviously fine).


title: "and" in citation in the end of row

text: I write my article in Czech language where "and" = "a" and this little word can't be in the end of the row... how can I force bibtex not to write "and" (or anything else) in the end of the row in citations? For example I have: "some text and more you can find in book Little and Rubin (2002)".. where "Little and Rubin (2002)" in automaticaly written by bibtex and "and = a" is unfortunately in the end, please help, thanks!! :)


title: Change link target of \insertshorttitle

text: I want to change the following small thing in my custom beamer template. In my footline the title of my presentation is printed using `\insertshorttitle`, like in many standard templates. Normally the hyperlink of this title links to the first slide of the presentation I want the hyperlink of this title to link to the following:   * Link to the table of contents (normally on page 2)   * If in the appendix (or in Part N) of the presentation link to the table of contents of the appendix (of Part N) (on page X), not the first table of contents (on page 2) This is not costumizable on the level of theme files as far as I can see, and my knowledge of the inner workings of beamer are scarce. Can this maybe be accomplished in a simple way redefining the original link target? (maybe the link always goes to a page with [label=start] or something, and so I can just give the same label to several slides (if that's even possible) Or maybe by linking to the page with the largest pagenumber that is somehow "marked" (by me) Update: (Forgot this point before)   * If already in the table of contents (regular or appendix) link to the other (to the N+1th) table of contents What I'm trying to do here, is easy switching between stuff for the questions after the presentation. I'm trying to avoid the scrolling through lots of slides, that normally accompanies the question part of a presentation. In my imagination with a setup like this, it would work the following way: Wherever in the presentation I am, one click brings me to the table of contents. From there, one click brings me to the (sub)section I want, or to another table of contents (I normally only ever have the two, normal and appendix. And once I explained that slide, I can return again. What I was able to do so far thanks to the comment of @marco is the following: Some relevant commands are:               \def\hyperlinkpresentationstart{\hyperlink{Navigation1}}      which is defined in `beamerbasenavigation.sty` This is the target of all but one `\insertshorttitle` links. I copy and pasted this into my document and changed it to 2 instead of 1, which works and takes care of my first point already.               \hyperlinkpresentationend{...}      is defined there as well. From what I understand this links to the last frame before the appendix. This target is only used in the first frame of the presentation, and since that is normally a plain frame, it is in effect never used.               \hyperlinkappendixstart{...}     \hyperlinkappendixend{...}      Are there as well and do what you would expect. What I'm having problems with now is the following part from `beamerbasetitle.sty`               \newcommand\insertshorttitle[1][]{%       \beamer@setupshort{#1}%       \let\thanks=\@gobble%       \ifnum\c@page=1%         \hyperlinkpresentationend{\beamer@insertshort{\beamer@shorttitle}}%       \else%         \hyperlinkpresentationstart{\beamer@insertshort{\beamer@shorttitle}}%       \fi}      Here I want to do the following:               if pagenumber== 1 OR (>2 AND <=appendix_start_pagenumber) {\hyperlinkpresentationstart}%since I changed the target to 2 (ToC always on page 2)     else if pagenumber==2 OR >appendix_start_pagenumber {\hyperlinkappendixstart}%takes care of my second point      Yet I am unable to write working else-if statement (or compound conditions) in TeX so far, and I cannot get the page numbers to work properly (short of putting the numbers in directly...) I'm also not sure how to integrate this into my document, since simply copy and pasting it (and changing it to `\renewcommand...`) does not seem to work


title: How to do a proper Bibliography in Arabic language with XeLaTeX and Biblatex-Biber backend?

text: I want to add bibliography to a document mainly written with Arabic language but intervened with some English text. Therefore, I opted for `arabxetex` approach rather than `polyglossia`, becasue IMHO gives you more flexibility to switch between the two directions than when you have much text in English and few text in Arabic (I am open to other opinions as well).   Anyway, the problem is with bibliography and how to produce an Arabic counterpart to that of English without any transliteration or outright compromises. I came from this question trying to find an answer but it was in lualatex with a suboptimal output, and hence inadequate. **Questions**   1. As you can see only the citation key did appear, how to fix that? How and to make the citation numbers appear in Hindi numbers (Waahid-red, Ithnaan-green, Thalaatha,etc) instead of Arabic (1,2,3,etc)?    2. No `Bibliography` section did appear at the end of the document? And if it appears how to make it appear in Arabic language like `المراجع`?    3. What is the best approach to enter the fields of information for references in Arabic text, what am I missing?  MWE Code               \documentclass[oneside,16pt]{scrartcl}      %=====================Graphics ===================================     \usepackage[demo]{graphicx}     \usepackage{xcolor}     \usepackage{tikz}      %=====================Floats =====================================     \usepackage{floatrow}      \usepackage{float}     \usepackage{scrhack}     \usepackage{caption}     \captionsetup[figure]{labelfont=bf,labelsep=period,format=plain,skip=0pt,font=small}     \usepackage[framemethod=tikz]{mdframed}     \usepackage{subcaption}      %=====================Hyphenation ================================     \usepackage[none]{hyphenat}     \usepackage[protrusion = true,final]{microtype}     \emergencystretch=2em     %=====================Hyperref ===================================     \usepackage[hyperindex=true, hyperfootnotes=true]{hyperref}     \hypersetup{         colorlinks, linkcolor={blue},         citecolor={blue}, urlcolor={blue}         }     %=====================Font issues ===================================     \usepackage{fontspec}     \usepackage{csquotes}     \usepackage{amsmath,amsfonts,amssymb}     \usepackage{arabxetex}% default options are "novoc" and "fdf2alif";     % other options are "voc", "fullvoc", "utf", "trans" and "fdf2noalif"     \newfontfamily\arabicfont[Script=Arabic]{Amiri} % or put whatever open type Arabic font you have on your machine inside the two braces          %=====================Bibliography ===================================     \usepackage[style=verbose,backend=biber]{biblatex}     \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}         @book{ibnsina:shifa:physics:ar,         author = {ابن سينا},         year = {١٤١٧},         title = {السماع الطبيعى من كتاب الشفاء},         publisher = {دار المناهل},         location = {بيروت},     }     \end{filecontents}     \addbibresource{\jobname.bib}          %=====================End of Preamble ===================================     \begin{document}     \begin{arab}[voc]     وَهَذِهِ فِقرَةٌ بِالعَرَبِيَة مَعَ كَلِمَة اِنكلِيزِيَة رقم 1 او 2 باللغة اللعربية.          \noindent     (\textLR{Words in \textbf{English} with \textsc{small caps} or \textit{italics} are also possible}).          عند الحاجة الى المصدر باللغة العربية \cite{ibnsina:shifa:physics:ar}  تذهب الى باب المراجع فلا تجده.          \end{arab}     \printbibliography     \end{document}      MWE Output   ![enter image description here](http://i.stack.imgur.com/1RSVG.png) **Update 1**   Based on the informative answer from PLK, some bugs are now fixed, what remains is the comma issue (circled in red), it is not in Arabic style (should be directed upwards instead of downwards).               \documentclass[oneside,16pt]{scrartcl}      \usepackage{fontspec}     \usepackage{csquotes}     \usepackage{polyglossia}     \setmainlanguage{arabic}     \setotherlanguage{english}     \setmainfont{Arial}     \newfontfamily\arabicfont[Script=Arabic,Mapping=arabicdigits]{USAMA NASKH}     \newfontfamily\arabicfontsf[Script=Arabic,Mapping=arabicdigits]{USAMA NASKH}     \newfontfamily\arabicfonttt[Script=Arabic,Mapping=arabicdigits]{USAMA NASKH}     \usepackage[style=numeric,backend=biber]{biblatex}          \DefineBibliographyStrings{english}{%       references = {المراجع},     }          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}         @book{ibnsina:shifa:physics:ar,         author = {{ابن سينا}},         year = {1417},         title = {السماع الطبيعى من كتاب الشفاء},         publisher = {دار المناهل},         location = {بيروت},     }     \end{filecontents}     \addbibresource{\jobname.bib}          %=====================End of Preamble ===================================     \begin{document}          وَهَذِهِ فِقرَةٌ بِالعَرَبِيَة مَعَ كَلِمَة اِنكلِيزِيَة رقم 1 او 2 باللغة اللعربية.               \textenglish{(Words in \textbf{English} with \textsc{small caps} or \textit{italics} are also possible).}          عند الحاجة الى المصدر باللغة العربية \parencite{ibnsina:shifa:physics:ar} تذهب الى باب المراجع فتجده، لكن الفارزة ليست على الطراز العربي بل الافرنجي.               \printbibliography     \end{document}         **Output**   ![enter image description here](http://i.stack.imgur.com/hw7ld.png) **Question Updated:**   How to fix the comma? **Update 2**   Based on PLK's great help to fix the comma issue, the final code is below:               \documentclass[oneside,16pt]{scrartcl}      \usepackage{fontspec}     \usepackage{csquotes}     \usepackage{polyglossia}     \setmainlanguage{arabic}     \setotherlanguage{english}     \setmainfont{Arial}     \newfontfamily\arabicfont[Script=Arabic,Mapping=arabicdigits]{USAMA NASKH}     \newfontfamily\arabicfontsf[Script=Arabic,Mapping=arabicdigits]{USAMA NASKH}     \newfontfamily\arabicfonttt[Script=Arabic,Mapping=arabicdigits]{USAMA NASKH}     \usepackage[style=numeric,backend=biber]{biblatex}          \DefineBibliographyStrings{english}{%       references = {المراجع},     }     \makeatletter     \def\abx@comma{\ifdim\lastkern>\z@\unkern\fi\abx@puncthook{،}}% \makeatother          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}         @book{ibnsina:shifa:physics:ar,         author = {{ابن سينا}},         year = {1417},         title = {السماع الطبيعى من كتاب الشفاء},         publisher = {دار المناهل},         location = {بيروت},     }     \end{filecontents}     \addbibresource{\jobname.bib}          %=====================End of Preamble ===================================     \begin{document}          وَهَذِهِ فِقرَةٌ بِالعَرَبِيَة مَعَ كَلِمَة اِنكلِيزِيَة رقم 1 او 2 باللغة اللعربية.               \textenglish{(Words in \textbf{English} with \textsc{small caps}, or \textit{italics} are also possible).}          عند الحاجة الى المصدر باللغة العربية \parencite{ibnsina:shifa:physics:ar} تذهب الى باب المراجع فأنك حتما ستجده و مع الفارزة  هذه المرة على الطراز العربي الاصيل.               \printbibliography     \end{document}      **Output** ![enter image description here](http://i.stack.imgur.com/4ZFAT.png)


title: I need to change color of beamer itemize and subitem separately?

text: I have a dummy beamer, and I want to replicate the bullet style. Also, if someone can tell me what is the font used, it would be great! ![enter image description here](http://i.stack.imgur.com/EZbbt.png) The following is not working for me:               \documentclass[serif]{beamer}      \usepackage{mathpazo}      \usepackage{setspace}      \usetheme{CambridgeUS}      \usecolortheme{dolphin}      \usefonttheme{serif}  % why serif twice??     \usepackage{amsmath}      \usepackage{graphicx}      \usepackage{color}      \usepackage{multirow}      \usepackage{enumerate}      \usepackage{mathtools}     \usepackage{enumerate}      \title[]{Random Variables and Expectations}      \subtitle{}      \author{}      \institute[]{}      \useoutertheme{tree}      \setbeamertemplate{section in toc}{\inserttocsectionnumber.~\inserttocsection}     \setbeamercolor{itemize item}{fg=red}      \setbeamercolor{itemize subitem}{fg=blue} % output stays the same!!


title: ConTeXt with LuaTeX to compile mathml

text: I am using ConTeXt with LuaTeX to compile mathml. I would like to change the MathML fonts to a OTF Font. Please advice how this could be done. I have included a sample code below.               \usemodule[mathml]     \usemodule[newmml]     \setupbodyfontenvironment[default][em=italic]     \usemodule[simplefonts][size=10pt]     \setmainfont[Futura]     \setsansfont[Helvetica]     \setmonofont[Helvetica]     \starttext     This is sample text     \xmlprocessdata{}{     <math xmlns='http://www.w3.org/1998/Math/MathML'>     <mrow>     <mi>a</mi><mo>+</mo><mi>b</mi>     </mrow>     </math>     }{}     \stoptext


title: How do I include Postscript graphics in a LaTeX file?

text: I am trying to include `sample.ps` file to my document with the following code               \documentclass{article}     \usepackage[margin=3cm,a4paper]{geometry}     \usepackage{amsmath,amsthm}     \usepackage{amsfonts}     \usepackage{graphicx}     \usepackage{psbox}          \begin{document}          \PSbox{sample.ps}{4in}{6in}          \end{document}      But it is failing. Is it possible to include .ps file to our latex document? Is there any method like `\includepdf[pages=-]{my_file.pdf}` ?


title: LaTeX project together with Sublime Text 2

text: I am writing a paper divided into several sections. I would like to have one master file and then several file which I will only include. I would like to do it properly, since I am sending it to my professor and he has to work with on it too. Let me show, what I mean. The folder structure is:               Project/        |-master.tex        |-subFolder/             |-section_one.tex        |-anotherFolder/             |-section_two.tex      The `master.tex` file:               \documentclass[a4paper]{article}         % preamble     \begin{document}     \include{subFolder/section_one}     \include{anotherFolder/section_two}     \end{document}      And for example `section_one.tex`:               \section{Section 1}     Lorem ipsum      **Questions** I am working in Sublime Text 2 with Latexing. I would like to   1. create the project in recommended intelligent way (if such exists)   2. while working on lets say `section_one.tex` be able to press `Ctrl` + `b` (standard for shortcut for building the project) and build the `master.tex` file not `section_one.tex` since it does not contain preamble and throws bunch of errors. Also I don't want to have to switch to the `master.text` file in ST2 every time I want to build.


title: Formatting biblatex citation to handle non-latin (Japanese) author names

text: I am trying to customize biblatex (with biber as backend) so as to handle Japanese authors' names in an elegant way. Lets consider the following bibtex entry:               @article{HondaSuzuki2014,         author = {本田, 太郎 and 鈴木, 次郎},         journal = {日本語で書かれたジャーナル},         number = {1},         pages = {3--23},         title = {日本語のタイトル},         volume = {9},         year = {2014}     }      The authors are Honda and Suzuki. I would like the citation commands to produce the following outputs:   * citet: `blablabla Honda and Suzuki (本田，鈴木 2014) blablabla`   * citep: `blablabla (本田，鈴木 2014) blablabla` I understand that I should put the transcription of the authors' names (i.e. Honda and Suzuki) in a field... but which field? Then what should I do to get the desired output? Finally, I want to keep the citations of authors in latin characters the way they are. That is:   * citet: `blablabla Smith and Winston (2014) blablabla`   * citep: `blablabla (Smith and Winston 2014) blablabla` Do I need 4 different citation commands? In addition to `citet` and `citep` Something like `citetj` (citet for Japanese names) and `citepj` (citep for Japanese names)? Any help (advice, code, reference to a good tutorial) will be greatly appreciated.


title: How to follow the DRY (Dont Repeat Yourself) in multidoc?

text: What is the best way to keep the configurations and same content in different parts of the main document reusable from single location (e.g. from _child document_ )? First idea was to have this structure layout:               main_doc.lyx <- partial_doc.lyx <- general_preamble_doc.lyx      where `general_preamble_doc.lyx` has only something like `\makenomenclature` or `\usepackage` Would these scheme imply that the `main_doc.lyx` will also inherit the `general_preamble_doc.lyx` or should I include/input it in the `main_doc.lyx` as well? Should I `\input` or `\include` it? # Update 1: _DRY_ = Don't Repeat Yourself // sorry guys for confusion, I thought this acronym is already a common sense and unambiguous


title: How do I draw a projection of specified length, parallel to another line, between two sides of a triangle in TikZ?

text: I am trying to draw something called an "Ossanna circle" in PGF. Here is my MWE. Forgive its size -- you need all the intermediate points to get the points that we need for this question:               \documentclass[a4paper,11pt,titlepage,preview=false,tikz=true,class=scrartcl]{standalone}          \usepackage[urw-garamond]{mathdesign}     \usepackage[T1]{fontenc}          \usepackage{amsmath} % amssymb ist schon in mathdesign enthalten          \usepackage{fontspec}     \setmainfont{GaramondNo8}          \usepackage[ngerman]{babel}     \usepackage{tikz}     \usetikzlibrary{arrows}     \usetikzlibrary{calc,intersections,through,backgrounds}          \begin{document}          \begin{tikzpicture}[scale=1,domain=0:1]         \coordinate (O) at (0,0);         \coordinate (Un) at (0,193.55/50);         \coordinate (I0) at (90-85.6:12.5/10);         \coordinate (IK) at (180-122:133.53/10);       \draw[font=\normalsize,<-] (-0.1,0) -- (20,0) node(IM)[right=3pt] {\text Im}; %{$\text$}; imaginary axis       \draw[font=\normalsize,->] (0,-0.1) -- (0,20) node(RE)[above=2pt] {\text Re} ; % real axis       \draw[thick,color=blue,->] (O) -- (Un) node[above=2pt,left=2pt] {$\text U_n$}; % rated voltage       \draw[thick,color=red,->] (O) -- (I0) node[above=2pt,right=2pt] (Leerlaufstrom) {$\text I_0$}; % no-load current       \draw[thick,color=red,->] (O) -- (IK) node[above=2pt,right=2pt] (Kurzschlussstrom) {$\text I_k$}; % blocked rotor current       \draw[thin,dotted] (I0) -- (IK); % dotted line between tips of I_0 and I_K       \coordinate (S) at ($(I0)!.5!(IK)$); % point halfway between tips of I_0 and I_K, new point is called S       \coordinate (S0) at ($ (S) !1.5! 90:(IK) $); % new point S0, turned -90° from line between S and I_K and 1.5 times as long as I_K to S       \coordinate (S1) at ($ (S) !1.5! -90:(IK) $); % new point S1, turned -90° from line between S and I_K and 1.5 times as long as I_K to S        \coordinate (S2) at ($ (IK) !1! 58:(O) $); % new point S2, turned 58° from line between I_K and origin O and 1 times as long as I_K to O        \draw[thin,dotted] (S0) -- (S1); % dotted line between S0 and S1 (bisector)       \draw[thin,dotted] (IK) -- (S2); % dotted line between I_K and S2       \path[name path=S0--S1] (S0) -- (S1); % labeling of bisector path as S0--S1       \path[name path=IK--S2] (IK) -- (S2); % labeling of path I_K to S2 als IK--S2       \path[name intersections={of=S0--S1 and IK--S2,by={[label=left:M]M}}]; % definition of intersection of the two lines as M, with label       \fill[red] (M) circle (1.5pt); % drawing of point M as circle of diameter 1.5 pt, red fill       \node (KR) [name path=KRI,draw,thick,dotted,circle through=(IK)] at (M) {}; % Ossanna circle through tip of I_K with M as centre       \path[name path=IK--IM,draw,thin] (IK) -- (IK |- IM); % perpendicular from IK to the imaginary axis       \coordinate (P1) at ($ (IK |- IM) !0.5! (IK)$); % Power P1       \draw[thick,->] (IK |- IM) -- (P1) node[above=2pt,left=2pt] {$\text P_1$}; % P1 line       \path[name path=I0--P1,draw,thin] (I0) -- ($ (I0) !3! (P1) $); % path over I0 and P1 to circle       \path[name intersections={of=I0--P1 and KRI,by={[label=right:$\text S_\infty$]SINF}}]; % definition of intersection as S_infinity       \fill[black] (SINF) circle (1.5pt); % drawing of point S_infinity       \path[name path=O--RAND] ($ (0,0) !0.5! -20:(IM) $) -- ($ (0,0) !1! -20:(IM) $); % random line from origin       \path[name intersections={of=O--RAND and KRI,by={[label=right:$\text {Wow}$]RAND}}]; % "random" intersection of line and circle       \fill[green] (RAND) circle (1.5pt); % drawing of random point in green       \path[name path=RAND--SINF,draw,thin] (RAND) -- ($ (RAND) !1.25! (SINF) $); % line from random point to S_infinity       \node at (IK) [above=3pt,left=5pt] {$\text S_{\text I_k}$}; % labeling of S_IK       \fill[black] (IK) circle (1.5pt); % drawing of point S_IK       \path[name path=I0--RAND,draw,thin] (I0) -- (RAND); % drawing of line from random point to no-load current       \path[name path=RAND--IK,draw,thin] (RAND) -- ($ (RAND) !1.25! (IK) $); % line from random point to blocked rotor current          \end{tikzpicture}     \end{document}      The result looks like this: ![enter image description here](http://i.stack.imgur.com/0No9C.png) Here is my challenge: I want to draw a line parallel to `RAND--SINF`, which touches both `RAND--IK` and `RAND--I0`, except that this line has to be exactly 10 cm (or units) long. How can I do this?


title: Force Kile to create tables that are inside the page width

text: I am using the Tabular Wizard on Kile to create a `\tabularx` environment for one of my tables, and I want it to fit inside a page. Currently this is my setup:               {%     \newcommand{\mc}[3]{\multicolumn{#1}{#2}{#3}}     \begin{center}     \begin{tabularx}{\textwidth}[]{l|c|c|c|}\cline{2-4}     %data ....     \end{tabularx}     \end{center}     }%      However, even with \textwidth parameter my tables are going way of the page's limits. I tried reading this discussion: - How to force a table into page width? But it didn't help, the solution picked does not seem to work. How can I fix this?


title: Enable "firstinits" in biblatex only for editors

text: `biblatex` has an option `firstinits` which will abbreviate first and middle names in the bibliography. Is there any way to limit this behavior for the `editor` field only, so that it doesn't abbreviate names in the `author` field? In the example below, the author should appear as `Lennon, John`, but the editors should appear as `P. McCartney, J. Lennon, G. Harrison, and R. Starkey`.               \documentclass{article}     \usepackage[style = authoryear-comp, maxnames = 99]{biblatex}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @incollection{lennon1965,         AUTHOR = "John Lennon",         BOOKTITLE = "A book with articles",         EDITOR = "Paul McCartney and John Lennon and George Harrison and Richard Starkey",         TITLE = "This is my article in this book",         YEAR = "1965",         LOCATION = "Liverpool",         PAGES = "65--87",         PUBLISHER = "Cavern Club"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     \nocite{*}     \printbibliography     \end{document}


title: How to insert a two-column figure in the current page when using LaTeX?

text: I know there is a command like               \begin{figure}[p]     \end{figure}      But when I use it in a two-column model, the `$[p]$` cannot work. So I am wondering if there is any solution to preserve the figure in current page when I use `$\begin{figuire*}$`.


title: Lyx : Name of function : Page Break

text: I'm trying to find the name of the function : Insert -> formatting -> Page Break So i can set it as a shortcut from preferences ->Editing->shortcuts->new. But in order to do that i need the function name, and i can't seem to find it online. Anyone knows?


title: How to Install mathdesign on TeXlive -- mktexpk and updmap errors

text: I'm trying to install the mathdesign package on TeXlive, and running into a slew of issues involving `maketexpk` and `updmap` failures. Are there any step-by-step instructions to accomplish this? Here's what I've done so far: First, I was trying to use `\usepackage[garamond]{mathdesign}`, but ran into this problem during a `xelatex` compile with LaTeX headers:               \documentclass{book}          \usepackage{amssymb,amsmath,amsfonts,fleqn}     \usepackage{theorem}% Bold Math package          \usepackage{xltxtra}     \usepackage{xunicode}     \usepackage{graphicx}     \usepackage{fontspec}     \usepackage[garamond]{mathdesign}          \usepackage[EU1]{fontenc}     \usepackage{bm}% Bold Math package -- install AFTER \usepackage[urw-garamond]{mathdesign}          % bold math and math italic macros          \def\alphab{{\protect\bm{\alpha}}}     \def\Gammab{{\protect\bm{\Gamma}}}     \def\Ab{{\protect\mathbf{A}}}     \def\zerob{{\protect\bm{0}}}     \def\oneb{{\protect\bm{1}}}     \def\Rbmit{{\protect\bm{R}}}     \def\Xbmit{{\protect\bm{X}}}     \def\Ybmit{{\protect\bm{Y}}}     \def\Zbmit{{\protect\bm{Z}}}     \def\Rbbb{{\mathbb{R}}}          \DeclareMathOperator{\tr}{tr}          % http://tex.stackexchange.com/questions/66949/command-nobreakspace-unavailable-when-switching-to-t1-encoding-under-xelatex     \DeclareTextCommandDefault{\nobreakspace}{\leavevmode\nobreak\ }           \begin{document}          A pretty fact for a square matrix~$\Ab$     and~${t\in\Rbbb}$: \begin{equation} \det e^{\Ab t} =       e^{t\tr\Ab}.\end{equation} The Riemannian curvature tensor using bold     math italics: \begin{equation} \Rbmit(\Xbmit,\Ybmit)\Zbmit       =\bigl([\nabla_\Xbmit,\nabla_\Ybmit]-\nabla_{[\Xbmit,\Ybmit]}\bigr)\Zbmit.\end{equation}     The generalized gamma function $\Gammab_\alphab(\Ab)=\zerob$.          \end{document}      Error:               ...     LaTeX Font Warning: Font shape `EU1/mdugm/m/sl' undefined     (Font)              using `EU1/mdugm/m/n' instead on input line 42.          [1] (./foo.aux)          LaTeX Font Warning: Some font shapes were not available, defaults substituted.               kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 md-gmr8y     mktexpk: don't know how to create bitmap font for md-gmr8y.     mktexpk: perhaps md-gmr8y is missing from the map file.     kpathsea: Appending font creation commands to missfont.log.          ** WARNING ** Could not locate a virtual/physical font for TFM "md-gmr8y".     ** WARNING ** >> There are no valid font mapping entry for this font.     ** WARNING ** >> Font file name "md-gmr8y" was assumed but failed to locate that font.     ** ERROR ** Cannot proceed without .vf or "physical" font for PDF output...          Output file removed.      )     Error 256 (driver return code) generating output;     file foo.pdf may not be valid.     Transcript written on foo.log.      So I tried to install `mathdesign` (which has `md-gmr8y`) into `texmf-local` by doing the following.               cd ~/Downloads/mathdesign     sudo mkdir /opt/local/share/texmf-local/tex/latex/mathdesign     sudo rsync -va ./latex/ /opt/local/share/texmf-local/tex/latex/mathdesign          sudo rsync -va ./afm/ /opt/local/share/texmf-local/fonts/afm          sudo rsync -va ./opentype/ /opt/local/share/texmf-local/fonts/opentype     sudo rsync -va ./tfm/ /opt/local/share/texmf-local/fonts/tfm     sudo rsync -va ./type1/ /opt/local/share/texmf-local/fonts/type1     sudo rsync -va ./vf/ /opt/local/share/texmf-local/fonts/vf          sudo mkdir -p /opt/local/share/texmf-local/fonts/map/pdftex/mathdesign     sudo rsync -va ./map/ /opt/local/share/texmf-local/fonts/map/pdftex/mathdesign          sudo mkdir -p /opt/local/share/texmf-local/fonts/enc/mathdesign     sudo rsync -va ./enc/ /opt/local/share/texmf-local/fonts/enc/mathdesign          sudo mkdir -p /opt/local/share/texmf-local/dvipdfm/config     sudo rsync -va ./config/ /opt/local/share/texmf-local/dvipdfm/config          sudo vi /opt/local/var/db/texmf/web2c/updmap.cfg      > >     # mathdesign >     Map mdput.map >     Map mdugm.map >     Map mdbch.map >     Map mdpus.map >     Map mdpga.map >     Map mdici.map >                 sudo mktexlsr     sudo updmap      But this results in the `updmap` error:               updmap is using the following updmap.cfg files (in precedence order):       /var/root/.texlive2012/texmf-config/web2c/updmap.cfg       /opt/local/var/db/texmf/web2c/updmap.cfg     dvips output dir: "/var/root/.texlive2012/texmf-var/fonts/map/dvips/updmap"     pdftex output dir: "/var/root/.texlive2012/texmf-var/fonts/map/pdftex/updmap"     dvipdfmx output dir: "/var/root/.texlive2012/texmf-var/fonts/map/dvipdfmx/updmap"     pxdvi output dir: "/var/root/.texlive2012/texmf-var/fonts/map/pxdvi/updmap"          ERROR:  The following map file(s) couldn't be found:         mdpga.map (in /opt/local/var/db/texmf/web2c/updmap.cfg)              Did you run mktexlsr?              You can disable non-existent map entries using the option           --syncwithtrees.      I know I put the file `mdpga.map` in `/opt/local/share/texmf- local/fonts/map/pdftex` because I can see it there and the results of `mktexlsr`. Is that where it should go? I'm at a loss for the limited mathdesign installation and `updmap` documentation.


title: Work breakdown structure (WBS) TikZ

text: How can I draw WBS diagrams (Work breakdown structures) in LaTeX? I need to draw in LaTeX things like: ![enter image description here](http://i.stack.imgur.com/0jJr8.jpg) I've searched on the Internet a lot but I've found nothing.


title: Can WhizzyTeX be used with XeTeX?

text: I have tried to make WhizzyTeX work with XeTeX (or, specifically, XeLaTeX), but just adding               LATEX=xelatex      in whizzytex.conf (or changing this setting by any other means) and specifying PDF output does not help. Things seem to be more complicated than this (and believe me, I have tried).


title: Changing the header and footer and title images in a Beamer template

text: I am looking to add a background image to the title page of Beamer template and also to change the header and footer images in the normal slide. I have yet to find a template where this would be easy to do and I was wondering where to make a start. I basically want to replicate corporate slides made in ppt with nice Beamer ones so I can use equations already created in LaTeX. Sorry if this kind of question breaks some kind of forum guideline...


title: Header and page styling problems

text: I need help with the preamble. Here is the code               \documentclass[12pt,letterpaper]{book}     \ProvidesLanguage{Italian}     \usepackage[italian]{babel}     \usepackage[ansinew]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{fancyhdr}     \usepackage[pdftex]{graphicx}     \usepackage{booktabs}     \usepackage{fancyhdr}     \usepackage{geometry}     \usepackage{amsmath}     \usepackage{amscd}     \usepackage{amsxtra}     \usepackage{amsthm}     \usepackage{enumerate}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{float}     \usepackage{titlesec}     \usepackage{xcolor}     \usepackage{parskip}     \usepackage{lipsum}          % THEOREMS -------------------------------------------------------     \theoremstyle{definition}     \newtheorem{thm}{Teorema}[section]     \newtheorem{cor}[thm]{Corollario}     \newtheorem{lem}[thm]{Lemma}     \newtheorem{prop}[thm]{Proposizione}     \theoremstyle{definition}     \newtheorem{defn}[thm]{Definizione}     \newtheorem{conj}[thm]{Congettura}     \newtheorem{ex}{Esempio}[section]     \theoremstyle{remark}     \newtheorem{oss}[thm]{Osservazione}     % ----------------------------------------------------------------          \pagestyle{fancy}     \fancyhead{}     \fancyhead[R]{\itshape\nouppercase\rightmark}     \fancyhead[L]{\itshape\bfseries\nouppercase\thepage}     \fancyfoot{}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}          \fancypagestyle{plain}{     \fancyhead{}     \fancyfoot{}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     }          %--CHANGE CHAPTER TITLE------------------------------     \titleformat{\chapter}[display]      {\normalfont\bfseries}{}{0pt}{\Huge}     \titlespacing*{\chapter}      {0pt}{20pt}{40pt}     %----------------------------------------------------               \begin{document}     \sffamily          \frontmatter          \begin{titlepage}     \centering     \huge{Title}     \end{titlepage}     \cleardoublepage          \tableofcontents          \chapter*{Introduction}          \lipsum[1-10]          \mainmatter          \part{Part1Name}          \chapter{Chapter1Name}          \lipsum[1-2]          \section{Section11Name}          \lipsum          \section{Section11Name}          \lipsum[1-2]          \chapter{Chapter2Name}          \lipsum[1-2]          \section{Section21Name}          \lipsum          \end{document}      How can I have blank pages when they are empty? As you can see pages ii,iv,viii,6 are not blank. I'd like them to be blank but without altering the numeration. Furthermore pages vi and vii have the wrong name on top (it should be "Introduction"). Is there also a way to have the number of the page on the top-left in the left pages and on the top-right in the right pages of the book?


title: Split environment wrong braces dimensions

text: I have to split a quite long formula. I used a nested split environment but I have to break curly braces from one line to another using `\right.` and `\left.` The curly braces I get have different dimensions. I tried using \Biggl and \Biggr but they are too small. Here is my source:               \begin{equation}       \label{eq:splitted}     \begin{split}       c(x, y, t) &= \frac{M/Y}{b\sqrt{4\pi\left(\D_x^T+\K_x\right)t}}       \exp\left[-\frac{\left(x-Ut-x_0\right)^2}{4\left(\D_x^T+\K_x\right)t}\right]\\       &\begin{split}\frac{b}{\sqrt{4\pi\left(\D_y^T+\K_y\right)t}}       \left\{     \sum_{j=-\infty}^{\infty}%     \exp\left[-\frac{\left(y-y_0+2jb\right)^2}{4\left(\D_y^T+\K_y\right)}\right]\right.&%       \\ + \left.%         \exp\left[-\frac{\left(y+y_0+2jb\right)^2}{4\left(\D_y^T+\K_y\right)}\right]\right\}&       \end{split}       \end{split}     \end{equation}      ![Image](http://i.stack.imgur.com/wiHYE.png)


title: Installing (a lightweight version of) latex on an external hard drive

text: I have a netbook which has about 3-4 gigs of space on it. Since it is a netbook, I didn't want to perform a full install of latex (~1gig) on it. It runs linux. I was wondering if I could install latex on an external hard drive or perhaps have a light version (quite barebones) of latex which would need me to place packages in my compile directory without having them all. I have read LaTeX for netbook OSes. However, most of the options available are for compiling in the "cloud" which I don't want as internet access, whilst travelling, is sketchy at best. This forum post on Installing/running MikTeX on an external harddrive doesn't inspire too much confidence either. What are my options? Are there any lightweight distributions of latex that I should `sudo apt-get` with my netbook?


title: How to achieve or get Post script (PS) output from xelatex run?

text: Does this require any sort of switches while running XeLaTeX?


title: Italic Greek characters in Times New Roman

text: I'm very new to LaTeX! I'm trying to create a template for creating scientific reports as PDFs. I'd like the whole of the document to be in Times New Roman. I've used the package `pslatex`, which works well except for the fact that none of the Greek characters (including those in equations) are italic as they should be. Is there a way to make these characters italic? The standard {`\it` ?} has no effect. Or is there a package other than `pslatex` that puts the document in Times New Roman but doesn't cause this problem? I'm using TeXShop. This illustrates the problem:               \documentclass[a4paper]{article}                 \usepackage{pslatex}   %  This makes the font Times New Roman.     \usepackage{amsfonts,amssymb,amsmath,mathbbol}   % For maths symbols.          \usepackage{titlesec}                                            \titlespacing\section{0pt}{5pt plus 1pt minus 1pt}{5pt plus 1pt minus 1pt}                                                                   \usepackage{graphics,graphicx,epsfig,ulem}     \usepackage[top=2.0cm, bottom=2.0cm, left=2.0cm, right=2.0cm]{geometry}     \usepackage{multicol}                        \usepackage[none]{hyphenat}                       \begin{document}          Times New Roman.          ${\beta=3\alpha}$          {\it${\beta }$} = 3{\it${\alpha}$}          ${\alpha, \beta, \gamma, \delta, \epsilon, \lambda, \phi, \rho, \varphi, \omega}$          \begin{equation}{\it t}_{1/2} = \dfrac{\ln(2)}{{\lambda}}.           \end{equation}          \end{document}


title: minitoc: parttoc on the same page as the part title

text: Easy example:               \documentclass{scrreprt}          \usepackage{minitoc}          \begin{document}          \doparttoc[n]     \noptcrule     \tableofcontents          \part{foo}     \parttoc          \chapter{bar1}     \chapter{bar2}     \chapter{bar3}     \chapter{bar4}          \end{document}      This creates a nice document, but the toc for the part is on a new page, but it would fit perfectly on the same pag as the part title. Is there a way to have the parttoc on the same page as the part title? So that it behaves like minitoc for chapters.


title: how to fix odd spacing of the last item of a list

text: When using the `enumerate` list environment, I noticed the spacing of the last item of the list is different from other items. It seems to have double-line spacing. I tried to put `\singlespacing`after`\item`. It does not work. Can someone please help? Below is what I have put down.               \documentclass{article}     \usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt,hmargin=2.5cm]{geometry}     \usepackage[font=it]{caption}     \usepackage{paralist}     \usepackage{multicol}     \usepackage{setspace}     \documentclass{article}     \usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt,hmargin=2.5cm]{geometry}     \usepackage[font=it]{caption}     \usepackage{paralist}     \usepackage{multicol}     \usepackage{setspace}     \begin{document}     \begin{multicols}{2}     \begin{enumerate}     {\footnotesize     \item  text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text     \item  text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text     \item  text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text     \item  text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text     \item text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text     \item text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text}       \end{enumerate}     \end{multicols}     \end{document}


title: Modifying some features on the graphs of a function and its inverse

text: The following code is compiled by `pgfplots` to graph an exponential function and its inverse. I have some questions about the code, and I would like to modify some of the features of the graphs. How is `pgfplots` instructed to draw grid lines 5 units apart? Why is the graph of the exponential function between the vertical lines x=-5 and x=3.8, I guess? Why is the graph of the line y=x between the vertical lines x=-5 and x=5? Why does the label for the logarithmic function interfere with the graph of the logarithmic function? I would like the numbers on the axes to be in white nodes - so that the grid lines are not drawn over them. The grid lines are drawn too high and too far to the right. I would like either the grid lines to be drawn a bit shorter or the axes to be drawn a bit longer. The domain of the exponential function (that is graphed) should be from -6 to 4, and the domain of the linear function should be from -6 to 16.               \documentclass[10pt]{amsart}     \usepackage{tikz}     \usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}     \usepackage{tkz-euclide}     \usetkzobj{all}     \usepackage{pgfplots}     \pgfplotsset{compat=1.11}                    \begin{document}     \begin{tikzpicture}     \begin{axis}[grid=both,               xmax=18,ymax=17,               axis lines=middle,               restrict y to domain=-7:17,               enlargelimits]     \addplot[dashed]{x} node[fill=white, above, right]{$y=x$};     \addplot[green]  {pow(2,x)} node[fill=white, above, right]{$y=2^x$};     \addplot[blue,domain=1/2^6:16,samples=100]  {log2(x)} node[fill=white, below] {$y=\log_2(x)$};     \end{axis}     \end{tikzpicture}          \end{document}


title: tikz picture not compiling using tikzexternalize - probably storage issue

text: I'm using tikzexternalize for most pictures in a very big document, which works fine. But for the image               \tikzsetnextfilename{someName}     \begin{tikzpicture}      \begin{groupplot}[     group style={columns=2, rows=1 ,vertical sep=0cm},      view={0}{-90},      xtick=\empty,      ytick=\empty,     ]     \nextgroupplot      \addplot3[surf, shader=interp] table [row sep=newline] {fname1.dat};     \nextgroupplot      \addplot3[surf, shader=interp] table [row sep=newline] {fname2.dat};     \end{groupplot}     \end{tikzpicture}      no file is created. If I choose to disable externalization via \tikzexternaldisable everything works fine. The .dat files have 100x100 entries. With fewer entries (e.g. 30x30) externalization works properly. Has anyone a suggestion how to solve this? By the way: I do not get any error or warning from the compiler. Best, MA PS: I forgot to mention: a colleague of mine has no issues using a Mac. I'm using a Windows Machine, with Miktex 2.9.


title: Overlapped appendices in Table of Contents

text: I use the iopart class to write a paper. I include the table of contents with the usual command, but I got the part related with the appendices which overlap with the title (see figure). ![enter image description here](http://i.stack.imgur.com/fb7Yg.jpg) How can I fixed this? NB you will NEED the iopart class to compile. A minimal working example - sorry some packages are unnecessary.               \documentclass[12pt]{iopart}          \usepackage[dvips]{graphicx}     \usepackage[usenames,dvipsnames]{xcolor}      \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{latexsym}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     %\usepackage{amsmath} % Error with iopart class     \usepackage{color}     \usepackage{psfrag}     \usepackage{rotating}     \usepackage{pgf,pgfsys,pgffor}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage[caption=false]{subfig}     \usepackage{tikz}     \usepackage{hyperref}     \bibliographystyle{iopart-num}          \begin{document}          \title{Main title}% Force line breaks with \\          \begin{abstract}     bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla          bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla     \end{abstract}          \maketitle          \tableofcontents          bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla           \section{Title 1}          bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla \ref{AppendixA}          \section{Title 2}          bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla bla bla blabla \ref{AppendixB}          \appendix           \section{Title A}     \label{AppendixA}          \section{Title B}     \label{AppendixB}          \end{document}


title: Sections indexed with numbers, subsections with letters

text: Is it possible to set the environment in such a way that sections are indexed with numbers, and subsections with letters? I mean, I'd like to have the following result: ## 1 First section **1.a First subsection** **1.b Second subsection** ... ## 2 Second section **2.a First subsection** **2.b Second subsection** ...


title: Rounding a number to its hundred

text: Does anybody know how I could have LaTeX round a number like `2,386` so that I finally get only written `2,300`? I tried with `siunitx` and its option `[round-mode=places,round-precision=-2]` but it didn't work.


title: Beamer navigation bar with characters between sections

text: I'm trying to define a custom theme for beamer. I would like to have a horizontal list of all sections but with a character between them. What I have is:               \setbeamertemplate{headline}[text line]{\insertsectionnavigationhorizontal{\paperwidth}{}{}}      And what I would like to see is something like:               Section1 | Section2 | Section3 | Section4      Is that possible?


title: Citation Manager

text: > This question is borderline TeX related but I think it may still be > relevant. What is the best citation manager to use in conjunction with LaTeX? The cutting edge in citation management software at the moment seems to be Mendeley and Papers. Apart from the fact that the latter is comparatively expensive, both softwares seem to offer next to no BibTeX support. Sure, they allow exporting (or even maintaining) `.bib` files mirroring the library but those files aren’t really usable in common scenarios (e.g. when you need to manipulate the typography, when specifying the sort key by inserting TeX commands in the authors list, or when you want to customise the citation key). On the other hand, these citation managers have a very handy feature: when you drag a PDF onto them, all metadata (title, author …) of the article is automatically imported from online databases and doesn’t need to be added manually or by explicitly downloading an exportable citation from the journal website. So far, my go-to choice has been BibDesk which is a solid little software. ~~But it seems that BibDesk doesn’t support the Mendeley-style automatic import of article metadata for PDFs. Instead, I have to enter all this information manually. This becomes old quickly.~~ **Turns out to be wrong!** – See answers below. So, **Is there a citation manager which plays nicely with BibTeX and has automatic metadata import?** (Incidentally, I don’t want to complain about BibDesk, it’s otherwise an excellent software and it being Open Source the correct answer would of course be “well, submit a patch / pull request for this feature”. But perhaps somebody has already done the work?)


title: TeX Live distribution not showing up in system preferences

text: I've been using MacTex-2012 for a while (well, since 2012) with no problems (well, relatively few problems). Today, while using tlmgr (which I hadn't played around with much before), I got an error message similar to that described here, suggesting that it wouldn't play nicely unless I updated to a newer TeX Live distribution; I followed a couple of links to re-install TeX Live 2014 as described here. Now, it seems that TeX Live 2014 is installed properly, as it shows up under usr/local/texlive/2014. However, I don't think TeXShop is recognizing the installation. In System Preferences, the TeX distribution pane allows one to choose the system-wide TeX distribution to be used, which (I believe) specifies the distribution to be used by TeXShop. This pane only shows TeX Live 2012. I know that I can re-install MacTeX to solve the problem (and it seems that that would have been the right move in the first place). However, I'm wondering if there's a way to make my system recognize TeX Live 2014 without having to download another big file.


title: Vertical alignment of tabulars nested in longtable

text: I tried to nest tabulars in a longtable enviroment. The content of the tabulars is still at the bottom of each row.               \begin{longtable}[c]{p{153mm-2\tabcolsep}p{37mm-2\tabcolsep}}\hline        \begin{tabular}{p{44mm-2\tabcolsep}p{44mm-2\tabcolsep}p{29mm-2\tabcolsep}p{36mm-2\tabcolsep}}         foo & bar & foofoo & barbar          \end{tabular}         & \mynewline         \hline         \endhead         %\setlength{\extrarowheight}{38mm}         \begin{tabular}[t]{p{44mm-2\tabcolsep}p{44mm-2\tabcolsep}p{29mm-2\tabcolsep}p{36mm-2\tabcolsep}}         Foo Bar & foo foo foo & \color{red} foo & bar \\         \multicolumn{4}{l}{\textbf{Foo Bar}} \\         \multicolumn{4}{l}{Bar: \textbf{Foo, Foo}}          \end{tabular}         & \includegraphics[height=38mm,keepaspectratio]{image} \mynewline \hline         \begin{tabular}[t]{p{44mm-2\tabcolsep}p{44mm-2\tabcolsep}p{29mm-2\tabcolsep}p{36mm-2\tabcolsep}} \\ \hline         \end{longtable}


title: Align text to top left in a TikZ block

text: I have a TikZ block defined. The text inside it is not getting vertically aligned to the top. The following is the code I am using:               \begin{tikzpicture}[node distance = 6cm, auto]       \node [block, right of=interface] (conn) {       \small ConnectedTo       \linebreak       \tiny       \setlength{\leftmargini}{1.5em}       \vspace{-4    mm}       \begin{itemize}         \itemsep0em         \item Status: Up       \end{itemize}};     \end{tikzpicture}      The resulting image is: ![Block 1](http://i.stack.imgur.com/3LaMd.png) Is there a way to align the text "top-left"?


title: Problem with using soul in paragraph mode and siunitx immediately after

text: This problem seems somewhat obscure, it is potentially a bug in `siunitx` or `soul` (I am aware of issues with the latter). Which one is uncertain and I'm not certain that it is a bug. What I want to do is to highlight some text in paragraph mode and then have a number+unit (using `siunitx`) immediately afterwards. Here is some code:               \documentclass{article}          \usepackage{siunitx}     \usepackage{soul}          \newcommand{\wibble}[1]{#1}          \begin{document}             \paragraph{\hl{Hello}} \SI{12}{\meter}             \hl{Hello} \SI{12}{\meter}             \paragraph{\hl{Hello}} a \SI{12}{\meter}             \paragraph{\hl{Hello}} \wibble{12~m}          \end{document}      So here, I have tried a few things out. The top example is the malfunctioning one. Instead of highlighting the text, it writes "hl" before the argument of the macro. There are no malfunctions with the following cases:   * If not in paragraph mode (second example).    * If I put something else between the paragraph macro and siunitx (third example).   * If I use a different macro to `siunitx` after the paragraph macro (fourth example).


title: Tufte style range frames for three dimensional plots

text: This question is a follow up to this question, that allowed me to solve the two dimensional case. For example this plot ![sine](http://i.stack.imgur.com/a9TEm.png) is created by the following code:               \documentclass{minimal}     \usepackage{tikz}     \usepackage{pgfplots}     \def\axisdefaultwidth{360pt}     \pgfkeys{/pgfplots/x axis shift down/.style={       x axis line style={yshift=-#1},       xtick style={yshift=-#1},       xticklabel shift={#1}}}     \pgfkeys{/pgfplots/y axis shift left/.style={       y axis line style={xshift=-#1},       ytick style={xshift=-#1},       yticklabel shift={#1}}}          \pgfplotsset{       every axis/.append style={thick},tick style={thick,black},       range frame/.style={         tick align=outside,         scaled ticks=false,         axis lines*=left,         enlargelimits=false,         x axis shift down=10pt,         y axis shift left=10pt,         line cap=round,         clip=false,         after end axis/.code={            \draw (xticklabel* cs:0,10pt) -- ++(0,-\pgfkeysvalueof{/pgfplots/major tick length});            \draw (xticklabel* cs:1,10pt) -- ++(0,-\pgfkeysvalueof{/pgfplots/major tick length});            \draw (yticklabel* cs:0,10pt) -- ++(-\pgfkeysvalueof{/pgfplots/major tick length},0);            \draw (yticklabel* cs:1,10pt) -- ++(-\pgfkeysvalueof{/pgfplots/major tick length},0);         }     }          \begin{document}     \begin{tikzpicture}       \begin{axis}[range frame,xtick={0,90,180,270,360}]         \addplot[domain=0:360,samples=201] {sin(x)};       \end{axis}     \end{tikzpicture}     \end{document}      Similarly ![pdf](http://i.stack.imgur.com/ZB2Zl.png) is created by:               \documentclass{minimal}     \usepackage{tikz}     \usepackage{pgfplots}     \usepgfplotslibrary{fillbetween}     \def\axisdefaultwidth{360pt}     \pgfkeys{/pgfplots/x axis shift down/.style={       x axis line style={yshift=-#1},       xtick style={yshift=-#1},       xticklabel shift={#1}}}     \pgfkeys{/pgfplots/y axis shift left/.style={       y axis line style={xshift=-#1},       ytick style={xshift=-#1},       yticklabel shift={#1}}}          \pgfplotsset{       every axis/.append style={thick},tick style={thick,black},       range frame/.style={         tick align=outside,         scaled ticks=false,         axis lines*=left,         enlargelimits=false,         x axis shift down=10pt,         y axis shift left=10pt,         line cap=round,         clip=false,         after end axis/.code={            \draw (xticklabel* cs:0,10pt) -- ++(0,-\pgfkeysvalueof{/pgfplots/major tick length});            \draw (xticklabel* cs:1,10pt) -- ++(0,-\pgfkeysvalueof{/pgfplots/major tick length});            \draw (yticklabel* cs:0,10pt) -- ++(-\pgfkeysvalueof{/pgfplots/major tick length},0);            \draw (yticklabel* cs:1,10pt) -- ++(-\pgfkeysvalueof{/pgfplots/major tick length},0);         }       }     }          \begin{document}     \begin{tikzpicture}       \begin{axis}[range frame,ytick={0},extra y ticks={0.398942},extra y tick labels={$\frac{1}{\sqrt{2π}}$},xtick=\empty,extra x ticks={-3,-2,-1,1,2,3},extra x tick labels={$-3σ$,$-2σ$,$-σ$,$σ$,$2σ$,$3σ$}]         \addplot[domain=-5:5,samples=201,name path=A] {exp(-x^2/2)/sqrt(2*pi)};         \path[name path=B] (axis cs:\pgfkeysvalueof{/pgfplots/xmin},0) -- (axis cs:\pgfkeysvalueof{/pgfplots/xmax},0);         \addplot[black!30] fill between[of=A and B,soft clip={(axis cs:-3,0) rectangle (axis cs:3,1)}];         \addplot[black!20] fill between[of=A and B,soft clip={(axis cs:-2,0) rectangle (axis cs:2,1)}];         \addplot[black!10] fill between[of=A and B,soft clip={(axis cs:-1,0) rectangle (axis cs:1,1)}];       \end{axis}     \end{tikzpicture}     \end{document}      Now I would like to achieve the same range frame axis style in a three dimensional plot. My best attempt is:               \documentclass{minimal}     \usepackage{tikz}     \usepackage{pgfplots}     \def\axisdefaultwidth{360pt}     \pgfplotsset{       every axis/.append style={thick},tick style={thick,black},       range3frame/.style={         tick align=outside,         scaled ticks=false,         enlargelimits=false,         ticklabel shift={10pt},         axis lines*=left,         line cap=round,         clip=false       }     }          \begin{document}     \begin{tikzpicture}       \begin{axis}[view={55}{45}]         \addplot3[mesh,samples=41,domain=0:360] {sin(x)*sin(y)};       \end{axis}     \end{tikzpicture}     \begin{tikzpicture}       \begin{axis}[range3frame,view={55}{45}]         \addplot3[mesh,samples=41,domain=0:360] {sin(x)*sin(y)};       \end{axis}     \end{tikzpicture}     \end{document}      which yields ![sineXtimessineY](http://i.stack.imgur.com/MBPZ9.png) The option `ticklabel shift={10pt}`, does exactly the right thing for the tick mark labels. p. 286 of the pgfplots manual states: > Shifts tick labels in direction of the outer unit normal of the axis by an > amount of ... Compare the two versions of the sin(x)sin(y)-plot above, the tick mark labels in the lower plot moved away from the axis just right. Unfortunately there is no `tickmark shift` option to shift the tick marks along the outer unit normal vector in the same way. And also no `axis shift` option to offset the axis. In the two dimensional solution the trick was to use `xshift` and `yshift` transformation in the `x axis line style` to simply shift the axis and in the `xtick style` to shift the tick marks. Is there a way to access the outer unit normal vector from the `tickmark shift` option and use a transformation to move the axis and the tickmarks in the same way as the tickmark labels?


title: Anki - LaTeX, Math Font Size, & DeclareMathSizes

text: I use the Anki flashcard program and render math equations using LaTeX within the program. The problem is that the font sizes are generally too big, unless the equation is really long, in which case the equation automatically sizes down in order to fit the screen. This is the default LaTeX header in Anki:               \documentclass[12pt]{article}     \special{papersize=3in,5in}     \usepackage{amssymb,amsmath}     \pagestyle{empty}     \setlength{\parindent}{0in}     \begin{document}      And this is the default footer:               \end{document}      To call LaTeX within Anki when creating a flashcard, you use [latex] and [/latex], which I assume refer to the header and footer respectively. (I'm neither an Anki nor a LaTeX expert.) Anyway, I've tried inserting the following right before `\begin{document}`:               \DeclareMathSizes{2}{2}{2}{2}      Yes, I realize this is supposed to make the text really tiny, but more importantly, nothing changes. My equations are still too big (or too small, if the equation is really long). Please help!


title: Titlesec, runin shape and amsthm

text: I'm trying to have an _old fashioned_ style of (sub)section numbering as in EGA ( _Eléments de Géométrie Algébrique_ , by A.Grothendieck and J.Dieudonné). For a LaTeX written example, see here. I did it with the use of the **titlesec** package, and the following problem arrises : if a section has the shape **runin** and an amsthm environment follows immediately, the environment creates a line break as usual, which I do not want. Here is a minimal working example :               \documentclass{article}          \usepackage{titlesec}     \usepackage{amsthm}          \titleformat{\subsection}[runin]{\normalsize\bfseries}{(\thesubsection)}{5pt}{}          \newtheorem*{thm}{Theorem}          \begin{document}          \section{A section}     \subsection{}     \begin{thm}       Foo bar.     \end{thm}          \end{document}      In this MWE, the line break after **(1.1)** to begin the _thm_ environment : I would like **Theorem** to be right after **(1.1)** on the same line. How can I do that ?


title: Different height in different split parts + arrow positioning

text: \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{positioning,shapes.multipart}           \begin{document}                   \tikzset{every loop/.style={min distance=1mm,in=110,out=70,looseness=2}}       \begin{tikzpicture}[->, thick, remember picture]         \node (0) at (-2,1) {};              \node[draw, shape=rectangle split, rectangle split parts=2, inner sep=3ex] (A) at (0,0) {             \begin{tikzpicture}[->, thick]                 \node[draw, shape=rectangle split, rectangle split parts=2, inner sep=1ex] (test) {Sound \nodepart{two} 0 \{ \}};         \end{tikzpicture}         \nodepart{two} 0 \{ \}}; %First Error              \node[draw, shape=rectangle split, rectangle split parts=2] (B) at (4,0) {Camera     \nodepart{two} 5 \{no\_obj\}};              \path[every node/.style={font=\sffamily\small}]              (A) edge [loop above] node [above] {no\_obj} (A)              (A.one east) edge node [above] {obj} (B.one west)                   (test.one east) edge node [below] {no\_obj, obj} (B.two west);          \end{tikzpicture}     \end{document}      My question is, how can I get the second node part from the outer node as small as the second node part from the `Sound` or `Camera` node? I realy dont know why this happens and I hope you can help me. ![How it actually looks like](http://i.stack.imgur.com/fW0gY.png)


title: Is there any mathematical blog support latex?

text: As the topics, is there any mathematical blog support latex? I think people commonly use wordpress but i am not sure whether it supports latex as it doesn't show the latex format. Is there any supports latex?


title: LuaLaTeX, fontspec, .ttc fonts and kerning (Optima on Mac OS)

text: I'm probably missing something obvious. I'm using MacTeX 2014. I want to use the font Optima that ships with the Mac OS (10.8.5) -- it is a `.ttc` font. If I typeset the following TeX file I get no kerning between the `Te` and the `Ty`.               % !TEX encoding = UTF-8 Unicode     % !TEX TS-program = LuaLaTeX          \documentclass{minimal}     \usepackage{fontspec}          \setsansfont{Optima}     % \setsansfont[Kerning=On]{Optima} Mac          \begin{document}          \fontsize{36}{48}\selectfont     \textsf{Test Type}          \end{document}      As you can see, I also tried explicitly turning on the kern feature, but to no effect. I tried the same sample text in Adobe InDesign and the kerning does show up. I have not, so far, found any mentions anywhere of this phenomenon.


title: Linear Regression Illustration

text: Is it possible to create a picture that would look like this? I have solved a problem that also asks to draw a similar picture. Don't want to ruin my document by inserting a picture of the drawing by hand (see below). Any insight is greatly appreciated. ![enter image description here](http://i.stack.imgur.com/IhAaE.png) ![enter image description here](http://i.stack.imgur.com/I7BF1.jpg)


title: autocite=footnote

text: Sir, I saw you answer a question in which you wrote that autocite was good because you could rewrite it as autocite=footnote. Could you give an example of how you would do that?


title: How to set the chapter style in report class?

text: I want to set chapters to look like 'bigger' sections. Now in the `report` class I have a style like: > Chapter 1 > > Introduction > > 1.1. Section What I want to achieve is: >   1. Introduction > > > 1.1. Section I don't want to change the document class.


title: Remove page numbers in a »titlepage« environment

text: I use the titlepage enviroment in my thesis and want to remove the page numbers on my title pages (where I've got 2) pages. The titlepage enviroment does that for the first site automatically but not for the following pages so that there are page numbers with page 2 etc.               \begin{titlepage}       % no page numbers at page 1       \newpage       % page numbers show up one page 2 and following pages     \end{titlepage}      I've already tried to get rid of the page numbers by trying the advices from »removing page numbers, but not headers« and »How to get rid of page numbers« but without any success. **Edit #1** Elmar was right, `\pagestyle{empty}` works when you place it in front of the enviroment like so:               \pagestyle{empty}     \begin{titlepage}       % no page numbers at page 1       \newpage       % now even the following pages omit the page numbering     \end{titlepage}


title: How to add secondary non linear scaled x-axis (1/x) for same data that does not align to linear scale (x) ticks

text: I want to plot Wavelength and Wavenumbers of one Dataset to one tikzpicture. I found stackexchange: How to have linked axes on plots? but I DONT want to have both axis-ticks aligned to same position. See image: red is plotted but blue does not fit with buttom axes and is unfortunately not plotted. ![enter image description here](http://i.stack.imgur.com/FeAyQ.png) Like Jakes code:               \documentclass{article}     \usepackage{pgfplots}          \pgfplotsset{compat=newest}     \pgfkeys{/pgfplots/.cd,master axis/.style={         scale only axis,         enlarge x limits=false,         axis x line*=bottom,         xticklabel shift=3pt,         after end axis/.code={           \pgfkeys{/pgf/fpu=true,/pgf/fpu/output format=fixed}           \pgfmathparse{\pgfkeysvalueof{/pgfplots/xmin}}           \global\let\masterxmin=\pgfmathresult           \pgfmathparse{\pgfkeysvalueof{/pgfplots/xmax}}           \global\let\masterxmax=\pgfmathresult           \pgfkeys{/pgf/fpu=false}         }       },       slave axis/.style={         scale only axis,enlarge x limits=false,         axis x line*=top,         axis y line=none,         xmin=\masterxmin,xmax=\masterxmax,ymin=0,ymax=1,         scaled x ticks=false,         xtick={1,4,10,20,40,100},         xticklabel={           \pgfkeys{/pgf/fpu}           \pgfmathparse{1/\tick}           \pgfmathprintnumber{\pgfmathresult}         }       }     }     \begin{document}     \begin{tikzpicture}          \begin{axis}[master axis,       ymin=0,ymax=100,       xmin=7,xmax=16,       enlarge x limits=false,       xlabel={Wavelength $\lambda$},       ylabel=Transmissivity     ]     \addplot[domain=7:16,samples=100,thick]{-(abs(tan(x*10))-2*rnd)+90};     \end{axis}          \begin{axis}[slave axis,xlabel=Wavenumber 1/$\lambda$]\end{axis}          \end{tikzpicture}     \end{document}      so how to change the code? One posibility is to leave or change               xtick={1,4,10,20,40,100}      but this leads in badly brocken values align with bottom (see Image 2). ![bad numbers](http://i.stack.imgur.com/ZtVga.png) I also tried to set to               xmin=0.1428,xmax=0.0625,x dir=reverse %   1/7=0.1428   1/16=0.0625      but this destroys the axis. I also found stackexchange:Use function to scale x axis but I don't know how to change this because of the reverse counting. Thanks a lot :-)


title: Creating multiple choice questions with answers without exam class

text: I am trying to make multiple choice questions and I saw your answer to a similar question.               \documentclass{article}               %--------------------------------------------------------------------     %--------------------------------------------------------------------     \newcounter{choice}     \renewcommand\thechoice{\Alph{choice}}     \newcommand\choicelabel{\thechoice.}          \newenvironment{choices}%       {\list{\choicelabel}%          {\usecounter{choice}\def\makelabel##1{\hss\llap{##1}}%            \settowidth{\leftmargin}{W.\hskip\labelsep\hskip 2.5em}%            \def\choice{%              \item            } % choice            \labelwidth\leftmargin\advance\labelwidth-\labelsep            \topsep=0pt            \partopsep=0pt          }%       }%       {\endlist}          \newenvironment{oneparchoices}%       {%         \setcounter{choice}{0}%         \def\choice{%           \refstepcounter{choice}%           \ifnum\value{choice}>1\relax             \penalty -50\hskip 1em plus 1em\relax           \fi           \choicelabel           \nobreak\enskip         }% choice         % If we're continuing the paragraph containing the question,         % then leave a bit of space before the first choice:         \ifvmode\else\enskip\fi         \ignorespaces       }%       {}     %--------------------------------------------------------------------     %--------------------------------------------------------------------          %--------------------------------------------------------------------     \begin{document}          \begin{enumerate}     \item One of these things is not like the others; one of these things       is not the same.  Which one doesn't belong?       \begin{choices}         \choice George         \choice Paul         \choice John         \choice Ringo         \choice Socrates       \end{choices}     \item What was the color of George Washinton's white horse?       \begin{choices}         \choice Green         \choice Yellow         \choice White       \end{choices}     \item One of these things is not like the others; one of these things       is not the same.  Which one doesn't belong?       \begin{oneparchoices}         \choice George         \choice Paul         \choice John         \choice Ringo         \choice Socrates       \end{oneparchoices}     \item What was the color of George Washinton's white horse?       \begin{oneparchoices}         \choice Green         \choice Yellow         \choice White       \end{oneparchoices}     \item One of these things is not like the others; one of these things       is not the same.  Which one doesn't belong?            \begin{oneparchoices}         \choice George         \choice Paul         \choice John         \choice Ringo         \choice Socrates       \end{oneparchoices}     \item What was the color of George Washinton's white horse?            \begin{oneparchoices}         \choice Green         \choice Yellow         \choice White       \end{oneparchoices}     \end{enumerate}          \end{document}      I also want to show answers at the end. I saw another similar answer with answers showing at the end but they are with one `parachoices` which I do not want. Can you help me modify your answer with show answers at the end?


title: pagetotal for articles - Biblatex

text: I would like to know how to cite an article indicating the total number of pages in the article. I added the field `pagetotal` to the `.bib` file and added the following code in my Preamble:               \DeclareFieldFormat{pagetotal}{\mkpagetotal[bookpagination]{#1~pp.}}      However, both with and without this code, or its variants with `Pagetotal` instead of `pagetotal` all fail. Understnadably, the key `bookpagination` may affect only the way this field is formatted for books. So, any pointer in the right direction would be very helpful.


title: Sweave pdf is failing

text: fig=TRUE        month.=season(x03)       x03.lm=lm(x03~month.+time(x03))       summary(x03.lm)       @      This part of my file is failing and I am not sure why. I have attached `library(TSA)` for the season part, but it still fails.


title: Changing language back and forth with polyglossia

text: I'm using `polyglossia` and `lualatex` to compile my source, and I am switching languages back and forth inside my document. It looks like `polyglossia` (or myself), is not doing what it is supposed to do:               \documentclass[12pt]{book}     \usepackage{polyglossia}     \setdefaultlanguage{english}     \setotherlanguage{french}     \begin{document}     \textsc{url:} www. \\     \begin{french}     \textsc{url:} www. \\     \end{french}     \textsc{url:} www. \\     \end{document}      First line prints "url: www." in English: OK. Second line prints "url : www." in French: OK. Third line prints "url : www." in English: not OK (there should not be a space before the colon). Am I doing something wrong ? Thank you.


title: How can I change the Hebrew font in cjhebrew?

text: The answer to be found at the fontspec link seems to me less than useful. Could you please write a snippet showing how to change the Hebrew (but not the English) font when I use the cjhebrew package? Your help will be much appreciated. It might be of use to mention that I use Texpad to write Latex under OS X 10.9.4 Thank you Adrian


title: Emacs org-mode minted export with #+ATTR_LATEX

text: When I try to export a file like this:               #+LaTeX_CLASS: tufte          #+ATTR_LaTeX: :float t :options label={test}     #+begin_src c         #include <iostream>         using namespace std;              int main() {             cout << "Hello world!" << endl;             return 0;         }     #+end_src      The `options` attribute is ignored (it does not go the the generated `tex` file) and only the default options are passed:               \begin{listing}[H]     \begin{minted}[frame=lines, linenos=true]{c}     #include <iostream>     using namespace std;          int main() {         cout << "Hello world!" << endl;         return 0;     }     \end{minted}     \end{listing}      Any idea why? My org version is 8.2.7c. Edit: my setup for this:               #+begin_src emacs-lisp       (require 'ox-latex)       (require 'org-latex)       (add-to-list 'org-latex-packages-alist '("" "minted"))            (setq org-latex-listings 'minted)            (setq org-latex-minted-options             '(("frame" "lines") ("linenos=true")))            (setq org-latex-pdf-process (list "latexmk -pdf %f"))     #+end_src               ** Tufte     #+begin_src emacs-lisp     (add-to-list 'org-latex-classes                    `("tufte"                      "\\documentclass{tufte-handout}"                      ("\\section{%s}" . "\\section*{%s}")                      ("\\subsection{%s}" "\\newpage" "\\subsection*{%s}" "\\newpage")                      ("\\subsubsection{%s}" . "\\subsubsection*{%s}")                      ("\\paragraph{%s}" . "\\paragraph*{%s}")                      ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))                    )     #+end_src


title: Behaviour of frametitle with raisebox

text: See update below. The following problem occurred while I was trying to alter the frametitle in beamer. (Actually I want a picture in the Titlebar. I used a rule instead.)               \documentclass{beamer}     \usetheme{AnnArbor}            \setbeamercolor*{frametitle in title}{fg=red, bg=black}          \setbeamertemplate{frametitle}{%         \vspace{-0.165ex}         \mbox{%             \begin{beamercolorbox}[wd=\paperwidth, dp=1ex, ht=4.5ex, sep=1ex, colsep*=0pt]{frametitle in title}%             \usebeamerfont{frametitle}             \insertframetitle              \hfill             \raisebox{-1.75ex}[\ht\strutbox][-\ht\strutbox]{\rule{5ex}{5ex}}             \end{beamercolorbox}%             }%         }          \begin{document}          \begin{frame}     \frametitle{Hello}     Everythings fine here     \end{frame}          \begin{frame}%[fragile]     \frametitle{Can you see?}      DO     \end{frame}          \end{document}      So you can easily see that the red square representing the picture (I want it there) is shifted upwards on a fragile frame. I have no idea how fragile works (neither I have an idea about beamer but I was able to handle it so far.) Therefore I thought about an if-construct to figure out when fragil is on but... well there is no such construct available in user land... thx for comments! Update: I just figured out, that the Problem has nothing to do with fragiles frames. It comes from letters with descender. So in fact I'm struggling to use `\raisebox` correctly.


title: Define variables holding a percentage

text: I would like to define some variables in a tex document. For example, I write in `.tex` something similar as: `Our tool succeeds to validate x samples out of all the y samples, thus its success ratio is z`. Where `z` is defined as `x/y`, and `x` (resp. `y`) is instanced somewhere else by a number, eg., `30` (resp. `47`). As a result, after the compilation the text turns out to be `Our tool succeeds to validate 30 samples out of all the 47 samples, thus its success ratio is 63.8%`. The advantage of this, is that I just need to change the value of some variables, to change all the numbers in the text... The difficulty is that `z` holds a percentage number. Does anyone know how to achieve this?


title: Stripping the pt from a dimension

text: LaTeX defines in `ltfssbas.dtx` a macro called `\strip@pt` (at line [246]) which strips the `pt` part from a dimension returned by `\the\dimension`. The definition is shown as a minimal working example below:               \documentclass[11pt]{article}      \begin{document}     \parindent=0pt     \makeatletter          \begingroup       \catcode `P=12  % digits and punct. catcode       \catcode `T=12  % digits and punct. catcode       \lowercase{%       \def\x{\def\rem@pt##1.##2PT{##1\ifnum##2>\z@.##2\fi}}}          \expandafter\endgroup\x%     \def\strip@pt{\expandafter\rem@pt\the}          \newdimen\normallineskiplimit \normallineskiplimit=0.001pt          \texttt{Original dimen \the\normallineskiplimit}\\     \texttt{Stripped dimen \strip@pt\normallineskiplimit}\\          \makeatother     \end{document}      In the macro the `catcode` of the letters 'PT' are changed to category 12, which is the catcode for digits and punctuation. It then changes it to `lowercase` to match the `pt` returned by the `\the\dimension`. I can understand that the intent was to delimit the arguments with the `PT` returned by the `\the\dimension`, but why don't the lowercase letters work on their own? And a second question (pls `\relax` the one question limit). Just before the `\def\strip@pt` it writes `\expandafter\endgroup\x`. This could also be written as `\x\endgroup` and save the `\expandafter`. In the minimal I provided works both ways. Am I missing something?


title: LaTeX: UTF8 and algorithm2e clash

text: I have this input file in utf8 encoding:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{algorithm2e}     \begin{document}          \begin{procedure}     foo     \caption{ö()}     \end{procedure}     \end{document}      but this gives me an error:               ) (./test.aux)     ! Missing \endcsname inserted.     <to be read again>                         \unhbox      l.8 \caption{ö()}      somehow the `\caption` command doesn't like the ö character. Is there any way to use ö in utf8 encoding and the algorithm package?                *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     inputenc.sty    2008/03/30 v1.1d Input encoding file         utf8.def    2008/04/05 v1.1m UTF-8 support for inputenc        t1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc       ot1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc       omsenc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc     algorithm2e.sty    2008/00/00 v3.10 algorithms environments       ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)       xspace.sty    2006/05/08 v1.12 Space after command names (DPC,MH)      relsize.sty    2003/07/04 ver 3.1


title: How to draw box around text that contains a verbatim block?

text: Typically, to box in some text, I use the following:               \fbox {         \parbox{\linewidth}{         This is some text! Blah blah blah...         }     }      However, say I have a `verbatim` block within that. It will never compile. Anyone know how I could draw a box around text which contains a `verbatim` block? I should note that I want to be able to draw a box around not just a `verbatim` block. For example, I would want to draw a box around something like:               This is text.     \begin{verbatim}     This is some more text.     \end{verbatim}     And this is even more text.


title: Dimension too large with tcolorbox and fading paths

text: I have this "Dimension too large" error that I don't understand:               \documentclass{article}     \usepackage{tcolorbox}     \tcbuselibrary{skins}     \usetikzlibrary{positioning,shadows}     \newtcolorbox{mybox}{         enhanced,         colframe=white,         colback=white,         overlay={             \draw[thick,red,path fading=south](frame.north east)--(frame.south east);         }     }     \begin{document}        \begin{mybox}             content goes here        \end{mybox}     \end{document}      I'm trying to decorate a box with fading lines from starting from the corners and going south, north, east, etc. Some work (e.g. from the north west angle fading to east), some (e.g. the one in the mwe) don't. Why is that? I understand why the "dimension" error arises but I can't seem to understand why it does in this case. I can't see which computation is exceeding the `-16384 < x < 16384` range here. Also, is this fixable?


title: How to perform simple arithmetic with page number?

text: I want to play around the Latex variable `\thepage`. How to do that? For example subtract 1 from the current page:               \thepage-1


title: Enclose blocks of selected text with large square brackets?

text: I have some long equations in my document. I want to add some square brackets so it is clear how the main text flows. ![enter image description here](http://i.stack.imgur.com/eNZhw.jpg) Here is my code               \documentclass{article}     \usepackage{amsmath}     \usepackage{multicol}     \usepackage{lipsum}          \begin{document}          \begin{onecolumn}     \begin{multicols}{2}     \lipsum[2]          \end{multicols}          \begin{equation}     +long\;equation 1-2-3-4-5-6-7-8-9-..................=     \end{equation}          \begin{multicols}{2}     \lipsum[3]     \end{multicols}     \end{onecolumn}     \end{document}


I got this error when compiling: "" ! LaTeX Error: File `scrextend.sty' not found. Type X to quit or to proceed, or enter new name. (Default extension: sty) Enter file name: "" It was alright, and never had the problem. It came up since I updated my mac, however, I installed McTex. I keep entering, and it makes pdf. But, i can't see what is missing. Any suggestion please?


title: CJK: blank output for Japanese characters

text: I have just started using latex and I am trying to display Japanese characters on a beamer presentation. I use Miktex on a Windows 7 OS. I have tried every possible example file and tutorial that I found using xelatex of pdflatex, installed all sorts of packages to enable Japanese support and downloaded dozens of japanese fonts. After hours of bug-fixing, I always end up with obscure errors leading to unanswered posts on forgotten threads... In my most successful attempt, I used xelatex with this file ->               \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usepackage{CJKutf8}     \begin{document}          \begin{CJK}{UTF8}{min}abc 因子の部屋\end{CJK}     \end{document}      This file doesn't give me error messages, but the output on the pdf file is just "abc" (the japanese is not displayed). I also get this warning:               LaTeX Font Warning: Font shape `OT1/cmss/m/n' in size <4> not available     (Font) size <5> substituted on input line 8.      And nothing else that looks like an error. As I said before, I failed all other foolproof methods/tutorials found here an there on the web (I even crashed my whole PC just by updating a Miktex package), so please be patient with me... Thank you! EDIT: I don't think this is a duplicate because I tried all that was written in the "duplicate" question and a dozen others before I posted mine, and it did not solve the problem. For the liked "duplicate" example, I got this error message:               Font shape `C70/min/m/n' undefined      Which is apparently because Miktex for windows 7 lacks some font files for ms mincho that I already downloaded and are still not recognized.


title: Compute the elevation of a coordinate in TikZ

text: I'm wracking my brains over a seemingly simple problem. Given a coordinate, I would like to do some computation with its components. More specifically, I want to compute the elevation of a point. Consider this M(not)WE:               \documentclass{article}          \usepackage{tikz}          \begin{document}     \begin{tikzpicture}         \coordinate (A) at (2,3);              \newdimen\x         \newdimen\y         \pgfextractx{\x}{\pgfpointanchor{A}{center}}         \pgfextracty{\y}{\pgfpointanchor{A}{center}}         \pgfmathparse{atan2(\y,\x)}         \node at (1,1) {\pgfmathresult};     \end{tikzpicture}     \end{document}      My goal is to extract the x and the y component from the point A, compute the elevation, and print this in a node. How can I achieve this?


title: Center figure which spans over whole page

text: I would like to get this to center with 5pt margins on left, right, and top. So the picture will cover nearly the whole page with room at the bottom for captions.               \documentclass{article}     \usepackage{tikz}     \usepackage{caption}          \begin{document}     \begin{centering}     \begin{figure}[ht]               \begin{tikzpicture}[scale=(3/10)]            \draw[help lines] (0,0) grid (600mm,500mm);          \end{tikzpicture}          \caption{some caption here}     \end{figure}     \clearpage     \end{centering}     \end{document}