title: problem with LuaLaTeX: no file found

text: I am trying to experiment with lualatex but I cannot make it work properly My preamble is:               \documentclass[11pt,a4paper]{article}     \usepackage[greek]{polyglossia}     \usepackage[utf8x]{inputenc}     \usepackage{fontspec}     \setmainfont{Calibri}     \usepackage{ucs}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{makeidx}     \usepackage{graphicx}     \usepackage{wrapfig}     \usepackage[left=2cm,right=2cm,top=1cm,bottom=2cm]{geometry}     \setlength{\parindent}{0pt}     \everymath{\displaystyle}      and my editor (texmaker) is configured to lualatex+pdf When I compile my document I do not get any error message, only an empty pdf is produced and I get a pop-up message: "file not found" The corresponding log file is: LOG FILE :               This is LuaTeX, Version beta-0.70.1-2011080216 (rev 4277) (format=lualatex 2014.9.4) 4 SEP 2014 10:47     **Eξετασεις13_14Στατιστικη_sample.tex     (C:/Users/Manthos/Desktop/LaTeX/Eξετασεις13_14Στατιστικη_samp     le.tex     LaTeX2e <2011/06/27>     LuaTeX adaptation of babel <v3.8l-luatex-1.4> and hyphenation patterns for engl     ish, loaded.     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/base/article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/base/size11.clo"     File: size11.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/polyglossia/polyglossia.sty"     Package: polyglossia 2014/05/21 v1.33.5 Babel replacement for XeLaTeX and LuaTe     X     (C:/Users/Manthos/AppData/Roaming/MiKTeX/2.9/tex/latex/etoolbox/etoolbox.sty     Package: etoolbox 2011/01/03 v2.1 e-TeX tools for LaTeX     (C:/Users/Manthos/AppData/Roaming/MiKTeX/2.9/tex/latex/misc/etex.sty     Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB)     \et@xins=\count87     )     \etb@tempcnta=\count88     )     (C:/Users/Manthos/AppData/Roaming/MiKTeX/2.9/tex/latex/makecmds/makecmds.sty     Package: makecmds 2009/09/03 v1.0a extra command making commands     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/xkeyval/xkeyval.sty"     Package: xkeyval 2008/08/13 v2.6a package option processing (HA)     ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/xkeyval/xkeyval.tex"     \XKV@toks=\toks14     \XKV@tempa@toks=\toks15     \XKV@depth=\count89     File: xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)     ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/xkeyval/keyval.tex")))     ("C:/Program Files (x86)/MiKTeX 2.9/tex/latex/fontspec/fontspec.sty"     Package: fontspec 2011/02/26 v2.1f Advanced font selection for XeLaTeX/LuaLaTeX     (C:/Users/Manthos/AppData/Roaming/MiKTeX/2.9/tex/latex/l3kernel/expl3.sty     Package: expl3 2014/07/20 v5241 L3 programming layer (loader)     (C:/Users/Manthos/AppData/Roaming/MiKTeX/2.9/tex/latex/l3kernel/expl3-code.tex     Package: expl3 2014/07/20 v5241 L3 programming layer (code)     L3 Module: l3bootstrap 2014/05/26 v4889 L3 Bootstrap code     L3 Module: l3names 2014/06/02 v4993 L3 Namespace for primitives     L3 Module: l3basics 2014/07/09 v5187 L3 Basic definitions     L3 Module: l3expan 2014/06/16 v5146 L3 Argument expansion     L3 Module: l3tl 2014/07/17 v5214 L3 Token lists     L3 Module: l3str 2014/06/19 v5158 L3 Strings     L3 Module: l3seq 2014/07/18 v5232 L3 Sequences and stacks     L3 Module: l3int 2014/07/11 v5197 L3 Integers     \c_max_int=\count90     \l_tmpa_int=\count91     \l_tmpb_int=\count92     \g_tmpa_int=\count93     \g_tmpb_int=\count94     L3 Module: l3quark 2014/05/26 v4889 L3 Quarks     L3 Module: l3prg 2014/05/04 v4728 L3 Control structures     \g__prg_map_int=\count95     L3 Module: l3clist 2014/07/19 v5237 L3 Comma separated lists     L3 Module: l3token 2014/05/26 v4889 L3 Experimental token manipulation     L3 Module: l3prop 2014/07/17 v5215 L3 Property lists     L3 Module: l3msg 2014/05/30 v4943 L3 Messages     L3 Module: l3file 2014/07/09 v5188 L3 File and I/O operations     \l_iow_line_count_int=\count96     \l__iow_target_count_int=\count97     \l__iow_current_line_int=\count98     \l__iow_current_word_int=\count99     \l__iow_current_indentation_int=\count100     L3 Module: l3skip 2014/07/17 v5211 L3 Dimensions and skips     \c_zero_dim=\dimen103     \c_max_dim=\dimen104     \l_tmpa_dim=\dimen105     \l_tmpb_dim=\dimen106     \g_tmpa_dim=\dimen107     \g_tmpb_dim=\dimen108     \c_zero_skip=\skip43     \c_max_skip=\skip44     \l_tmpa_skip=\skip45     \l_tmpb_skip=\skip46     \g_tmpa_skip=\skip47     \g_tmpb_skip=\skip48     \c_zero_muskip=\muskip10     \c_max_muskip=\muskip11     \l_tmpa_muskip=\muskip12     \l_tmpb_muskip=\muskip13     \g_tmpa_muskip=\muskip14     \g_tmpb_muskip=\muskip15     L3 Module: l3keys 2014/06/12 v5121 L3 Key-value interfaces     \g__keyval_level_int=\count101     \l_keys_choice_int=\count102     L3 Module: l3fp 2014/07/18 v5223 L3 Floating points     \c__fp_leading_shift_int=\count103     \c__fp_middle_shift_int=\count104     \c__fp_trailing_shift_int=\count105     \c__fp_big_leading_shift_int=\count106     \c__fp_big_middle_shift_int=\count107     \c__fp_big_trailing_shift_int=\count108     \c__fp_Bigg_leading_shift_int=\count109     \c__fp_Bigg_middle_shift_int=\count110     \c__fp_Bigg_trailing_shift_int=\count111     L3 Module: l3box 2014/05/31 v4974 L3 Experimental boxes     \c_empty_box=\box26     \l_tmpa_box=\box27     \l_tmpb_box=\box28     \g_tmpa_box=\box29     \g_tmpb_box=\box30     L3 Module: l3coffins 2014/05/28 v4899 L3 Coffin code layer     \l__coffin_internal_box=\box31     \l__coffin_internal_dim=\dimen109     \l__coffin_offset_x_dim=\dimen110     \l__coffin_offset_y_dim=\dimen111     \l__coffin_x_dim=\dimen112     \l__coffin_y_dim=\dimen113     \l__coffin_x_prime_dim=\dimen114     \l__coffin_y_prime_dim=\dimen115     \c_empty_coffin=\box32     \l__coffin_aligned_coffin=\box33     \l__coffin_aligned_internal_coffin=\box34     \l_tmpa_coffin=\box35     \l_tmpb_coffin=\box36     \l__coffin_display_coffin=\box37     \l__coffin_display_coord_coffin=\box38     \l__coffin_display_pole_coffin=\box39     \l__coffin_display_offset_dim=\dimen116     \l__coffin_display_x_dim=\dimen117     \l__coffin_display_y_dim=\dimen118     L3 Module: l3color 2014/04/30 v4712 L3 Experimental color support     L3 Module: l3candidates 2014/07/18 v5232 L3 Experimental additions to l3kernel     \l__box_top_dim=\dimen119     \l__box_bottom_dim=\dimen120     \l__box_left_dim=\dimen121     \l__box_right_dim=\dimen122     \l__box_top_new_dim=\dimen123     \l__box_bottom_new_dim=\dimen124     \l__box_left_new_dim=\dimen125     \l__box_right_new_dim=\dimen126     \l__box_internal_box=\box40     \l__coffin_bounding_shift_dim=\dimen127     \l__coffin_left_corner_dim=\dimen128     \l__coffin_right_corner_dim=\dimen129     \l__coffin_bottom_corner_dim=\dimen130     \l__coffin_top_corner_dim=\dimen131     \l__coffin_scaled_total_height_dim=\dimen132     \l__coffin_scaled_width_dim=\dimen133     )     (C:/Users/Manthos/AppData/Roaming/MiKTeX/2.9/tex/latex/l3kernel/l3unicode-data.     def     File: l3unicode-data.def 2014/06/30 v5166 L3 Unicode data     )     (C:/Users/Manthos/AppData/Roaming/MiKTeX/2.9/tex/latex/l3kernel/l3pdfmode.def     File: l3pdfmode.def 2014/07/18 v5232 L3 Experimental driver: PDF mode     \l__driver_color_stack_int=\count112     ))     (C:/Users/Manthos/AppData/Roaming/MiKTeX/2.9/tex/latex/l3packages/xparse/xparse     .sty     Package: xparse 2014/07/20 v5241 L3 Experimental document command parser     \l__xparse_current_arg_int=\count113     \l__xparse_m_args_int=\count114     \l__xparse_mandatory_args_int=\count115     \l__xparse_processor_int=\count116     \l__xparse_v_nesting_int=\count117     )     (C:/Users/Manthos/AppData/Roaming/MiKTeX/2.9/tex/generic/binhex/binhex.tex)     ("C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luaotfload/luaotfload.sty"     Package: luaotfload 2011/04/21 v1.25 OpenType layout system     ("C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/luatexbase.sty"     Package: luatexbase 2010/10/06 v0.3 Module utilities for LuaTeX     ("C:/Program Files (x86)/MiKTeX 2.9/tex/generic/oberdiek/ifluatex.sty"     Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)     Package ifluatex Info: LuaTeX detected.     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/luatexbase-compat.sty     "     Package: luatexbase-compat 2010/10/10 v0.3 Compatibility tools for LuaTeX     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/luatexbase-loader.sty     "     Package: luatexbase-loader 2010/10/10 v0.3 Lua module loader for LuaTeX     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/luatexbase.loader.lua)     ) ("C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/luatexbase-regs.sty     "     Package: luatexbase-regs 2010/10/10 v0.3 Registers allocation for LuaTeX     ) ("C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/luatexbase-attr.sty     "     Package: luatexbase-attr 2011/05/21 v0.31 Attributes allocation for LuaTeX     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/attr.lua))     ("C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/luatexbase-cctb.sty"     Package: luatexbase-cctb 2010/10/10 v0.3 Catcodetable allocation for LuaTeX     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/cctb.lua)     \lltxb@catcodetable@alloc=\count277     \CatcodeTableIniTeX=\luatexcatcodetable1     \CatcodeTableString=\luatexcatcodetable3     \CatcodeTableOther=\luatexcatcodetable5     \CatcodeTableLaTeX=\luatexcatcodetable7     \CatcodeTableLaTeXAtLetter=\luatexcatcodetable9     \CatcodeTableExpl=\luatexcatcodetable11     )     ("C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/luatexbase-mcb.sty"     Package: luatexbase-mcb 2010/10/10 v0.3 Callback management for LuaTeX     ("C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/luatexbase-modutils.s     ty"     Package: luatexbase-modutils 2010/10/10 v0.3 Module utilities for LuaTeX     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/modutils.lua))     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luatexbase/mcb.lua)     Lua module: luatexbase-mcb 2010/05/12 0.2 register several functions in a callb     ack     ))     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs.lua)     Lua module: lualibs 2011/01/20 0.96 Lua additional functions.     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-string.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-lpeg.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-boolean.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-number.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-math.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-table.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-aux.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-io.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-os.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-file.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-md5.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-dir.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-unicode.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-utils.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-dimen.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-url.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/lualibs/lualibs-set.lua)     (C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luaotfload/luaotfload.lua)     Lua module: luaotfload 2011/04/21 1.25 OpenType layout system.     luaotfload: loading file C:/Program Files (x86)/MiKTeX 2.9/tex/luatex/luaotfloa     d/otfl-luat-dum.lua.     quiting: fix your readable cache path      any ideas?


title: Citing the initials of one author and the full names of other authors

text: In some academic circles, such as theoretical physics, during a presentation it is customary for the talking author to cite himself using only his initials, while leaving the remaining author names unchanged as per the citation style. For instance, if my initials are DCG and I cite a paper that has me as an author, it should show up as: [Lima, DCG, Horvath, 2010] Is there any way to make this automatic in LaTeX? I use powerdot for presentations and natbib for references, and I have found nothing of the sort in their documentations. Maybe there is a way to replace the strings generated by BibTeX in the second LaTeX run, but I have no idea how to do it.


title: High-profile cases of non-compliance with the LaTeX Project Public License?

text: As I'm getting more and more interested in releasing packages of my own in the future, I just read the LaTeX Project Public License (or LPPL). This document defines, among other things, the rules for   * modifying (TeX-related) _Work_ by another author and distributing the _Derived Work_ under the LPPL,   * transfer of maintenance duties to another author,   * etc. My intention here is not to stir controversy (to remain polite) or open old wounds, but I'm curious. I know there can be tensions between authors. For instance, the developers of Texmaker and TeXstudio (formerly known as TeXmakerX) don't seem to be on very good terms (see the bottom of this page). My question, however, is specific to the LPPL. **Has there ever been high-profile public (legal, even) battles between authors of TeX-related work that arose due to non-compliance with the LPPL by one or several parties?** Those cases, if any, might serve as cautionary tales for aspiring authors. **Edit** : I've chosen to remove my allegations of tension between Knuth and Lamport over the development of LaTeX, at least until I find a proper source.


title: Is it possible to attach a label to a theorem so it can be cited later?

text: I want to know if it's possible to add some sort of label to a theorem such that I can cite it in the future. I know I can do this by writing explicitly the theorem's number every time I need it, but if you move the theorem to another section then you have to manually correct each reference you have made to that theorem, and this becomes very time consuming and, even, confusing. I want something that does this for me so I don't have to worry about it. Also, if this is possible I would like to know how to do it with definitions and notes also.


title: \hline with \only (or \onslide) in Beamer

text: In a table in `beamer`, I would like to remove `\hline` after X number of slides using               \only<1>{\hline}      But this always results in an error message: > Misplaced `\noalign` What can I do to overcome this (other than create a new table on the following slide)?               \documentclass{beamer}     \begin{document}     \begin{frame}     \begin{tabular}{*5{c}}     1 & 2 & 3 & 4 & \only<2>{5}\\     \only<1>{\hline}     \end{tabular}     \end{frame}     \end{document}      * * * Edit: Marco Daniel's answer does fix what I asked for above. However, it does not work when the second row begins with a `multicolumn`:               \documentclass{beamer}     \usepackage{multirow}     \begin{document}     \begin{frame}     \begin{tabular}{*5{c}}     \multicolumn{1}{|c|}{1} & 2 & 3 & 4 & \only<1>{5}\only<2>{\multirow{2}{*}{5}}     \onslide<1>{\\\hline}\onslide<2>{\\[-\normalbaselineskip]}     \multicolumn{1}{|c|}{1} & 2 & 3 & 4 & \only<1>{5}\only<2>{}     \end{tabular}     \end{frame}     \end{document}      > Misplaced `\omit`


title: How to automatically add \! in subscripts?

text: This code               \documentclass{article}     \usepackage{fouriernc}          \begin{document}     $a_1$          $a_{\!1}$     \end{document}      produces this output: ![Spacing](http://i.stack.imgur.com/NMBKd.png) I like the spacing on the lower one much more. **Is there a way to automatically use`\\!` on all subscripts so that I don't have to type it everytime? If this is not the optimal way to achieve this spacing, I'm eager to learn a better way, of course.**


title: Is there an environment in ConTeXt to center a poem?

text: I want to center the poem written by William Blake. Is there an environment in ConTeXt to achieve this? My only method is the `midaligned`               \midaligned{To see a world in a grain of sand}     \midaligned{And a heaven in a wild fllower}     \midaligned{Hold infinity in the palm of your hand}     \midaligned{And eternity in an hour}      but it's not elegant.


title: Circuitkz with relative +(x,y) coordinates updates current pen position

text: Is this a bug or am I doing something wrong? When using pure TIKZ everything works as expected:               \documentclass{standalone}     \usepackage{tikz}     \begin{document}         \begin{tikzpicture}             \draw (0,0) -- ++(2,0) -- +(0,-1) +(0,0) -- +(2,0);         \end{tikzpicture}     \end{document}      ![TIKZ with relative coordinates working correctly](http://i.stack.imgur.com/QT4Sm.png) But when doing the same with CircuiTIKZ, the y coordinate seems to be updated:               \documentclass{standalone}     \usepackage{circuitikz}     \begin{document}         \begin{tikzpicture}             \draw (0,0) to[short] ++(2,0) to[C] +(0,-1) +(0,0) to[short] +(2,0);         \end{tikzpicture}     \end{document}      ![CircuiTIKZ fails with relative coordinates](http://i.stack.imgur.com/vfcFF.png)


title: ! Missing number, treated as zero, for creating table in Latex

text: I'm trying to create the following table. This is the code which I wrote.               \begin{table}[!htb]     \centering     \caption{"table1"}     \begin{tabular}{|c|c|c|c|c|c|c|c|}     System & \multicolumn{2}{c}{Interaction} & \multicolumn{2}{c}{Commit} & Ver & LOC & terms \\\hline \multirow{3}{c}{System1} & \multicolumn{2}{c}{3272 traces} & \multicolumn{2}{c}{5093 revisions} & \multirow{3}{c}{3.4} & \multirow{3}{c}{1700} & \multirow{3}{c}{2400} \\\hline     & File & Method & File & Method & & & \\\hline     & 12 & 13 & 14 & 15 & & & \\\hline      \end{tabular}     \end{table}      and this the error that Latex shows:`! Missing number, treated as zero.!` ![enter image description here](http://i.stack.imgur.com/A7aVd.jpg)


title: Latex sections, subsections without ending period

text: How to remove an ending period in sections, subsections, ... numbering?               \documentclass[12pt]{article}          \usepackage{fontspec}     \usepackage{polyglossia}          \setdefaultlanguage{russian}     \setmainfont[Mapping=tex-text]{Times New Roman}          \begin{document}     \section{Section}     \section{Section}     \section{Section}     \section{Section}     \end{document}


title: in Beamer, how to remove left margin/indent of a description list

text: I have a two column frame with a plot one the left, and a description list on the right                 \begin{columns}         \begin{column}{.4\textwidth}           \begin{center}             \includegraphics[width=\textwidth]{../Figs/fig1}           \end{center}         \end{column}              \begin{column}{.6\textwidth}           \begin{description}           \item[$E_{t,i}$] The $i$th transmitted signal vector           \item[$E_{r,i}$] The $i$th received signal vector           \item[$E_{err,i}$] The $i$th error vector           \end{description}         \end{column}       \end{columns}      However there is a big spacing between the figure and the list, and it is due to the left margin of the description list. I tried to remove it by following this post and set the `leftmargin` and `labelindent` parameter to zero or even negative numbers, but it didn't work. How can I remove the spacing? ![enter image description here](http://i.stack.imgur.com/NGrEA.png)


title: How to place a multicolumn figure above a single column figure and a single column table?

text: I would like to place the following on the same page:   * A double column figure   * A single column figure   * A single column table I want the placement to look something like this: ![enter image description here](http://i.stack.imgur.com/qBYr6.png)


title: Where does BasicTeX put the texmf directory on OSX?

text: I have just installed BasicTeX on OSX 10.5 and I'm trying to locate the `texmf` directory to copy the `llncs` (LaTeX `.cls` and `.sty` files) folder into. According to the install log the location should be `~/Library/texmf`, but this folder does not exist. So where are the packages stored on OSX? Background: the `llncs` package is not in the usual repositories so it cannot be installed with any of the package-management tools. On the Windows machine at work I use MikTeX and installed the package manually by copying it to the `texmf` directory and updating the DB as explained in How can I manually install a package on MiKTeX (Windows).


title: How does LaTeX implement environments?

text: Do you know how LaTeX implements environments? To be more precise, what does               \newenvironment{<env-name>}[<n-args>][<default>]{<begin-code>}{<end-code>}      in terms of TeX commands (i.e., how is the LaTeX command `\newenvironment` defined in TeX)?


title: Opposite of the command \hfill

text: The command `\hfill` align to right, but if i want to align to the left what command i must use?               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Multi-Purpose Large Font     % LaTeX Template     %     % This template has been downloaded from:     % http://www.LaTeXTemplates.com     %     % Original author:     % Frits Wenneker (http://www.howtotex.com)     %     % This template can be used in one of two ways:     %     % 1) Content can be added at the end of this file just before the \end{document}     % to use this title page as the starting point for your document.     %     % 2) Alternatively, if you already have a document which you wish to add this     % title page to, copy everything between the \begin{document} and     % \end{document} and paste it where you would like the title page in your     % document. You will then need to insert the packages and document      % configurations into your document carefully making sure you are not loading     % the same package twice and that there are no clashes.     %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %----------------------------------------------------------------------------------------     %   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS     %----------------------------------------------------------------------------------------          \documentclass[11pt]{article}          \usepackage[a4paper,pdftex]{geometry}   % Use A4 paper margins     \usepackage[english]{babel}     \usepackage{xcolor} % Required for specifying custom colors     \usepackage{fix-cm} % Allows increasing the font size of specific fonts beyond LaTeX default specifications          \setlength{\oddsidemargin}{0mm} % Adjust margins to center the colored title box     \setlength{\evensidemargin}{0mm} % Margins on even pages - only necessary if adding more content to this template          \newcommand{\HRule}[1]{\hfill \rule{0.2\linewidth}{#1}} % Horizontal rule at the bottom of the page, adjust width here          \definecolor{grey}{rgb}{0.9,0.9,0.9} % Color of the box surrounding the title - these values can be changed to give the box a different color             \begin{document}          \thispagestyle{empty} % Remove page numbering on this page          %----------------------------------------------------------------------------------------     %   TITLE SECTION     %----------------------------------------------------------------------------------------     \begin{flushleft}     flush left\\     \colorbox{grey}{         \parbox[t]{1.0\linewidth}{             \centering \fontsize{50pt}{80pt}\selectfont % The first argument for fontsize is the font size of the text and the second is the line spacing - you may need to play with these for your particular title             \vspace*{0.7cm} % Space between the start of the title and the top of the grey box                  \hfill \LaTeX \\             \hfill Title \\             \hfill Template\par                  \vspace*{0.7cm} % Space between the end of the title and the bottom of the grey box         }     }          %----------------------------------------------------------------------------------------          \vfill % Space between the title box and author information          %----------------------------------------------------------------------------------------     %   AUTHOR NAME AND INFORMATION SECTION     %----------------------------------------------------------------------------------------          {\large      \hfill John Smith \\     \hfill University Name \\     \hfill Department Name \\     \hfill \texttt{http://www.johnsmith.com} \\          \HRule{1pt}} % Horizontal line, thickness changed here     \end{flushleft}     %----------------------------------------------------------------------------------------          \clearpage % Whitespace to the end of the page          \end{document}


title: LaTeX freezes on \begin{SCfigure}

text: I need side figure captions but using `SCfigure` freezes LaTeX as described here: http://sourceforge.net/projects/latex-beamer/forums/forum/319190/topic/1589887 Do you have any solutions to this problem or any ideas of how to get side caption without problematic package?               \documentclass{beamer}     \usepackage{sidecap}     \begin{document}     \begin{frame}     \frametitle{A nice frame}     \begin{SCfigure}     \rule{4cm}{4cm}     \caption{A nice figure}     \end{SCfigure}     \end{frame}     \end{document}


title: Text style for marginpar

text: Is there a way to change the font, font size and so on for `\marginpar` with a standard LaTeX macro, i.e. without something such as `\let\oldmarginpar\marginpar` (cp. Problem with Customized Marginpar (in Combination With a ToMarginpar). The `\marginnote` package e.g. provides `\marginfont`. MWE:               \documentclass{book}          \begin{document}     Text text text\marginpar{A short note.}     \end{document}


title: TeXstudio not correctly working on Mac OS X

text: Yesterday I installed TeXstudio on my Ubuntu system. I realized it has nice functions like "jump to PDF" (goes to PDF and highlights the marked text) and "go to source code" (goes to the source code of that part that was clicked in the PDF): Now I installed TeXstudio under Mac OS X, and those functions do not work. Strangely it was also configured in a way that external viewers were used to show the PDF. I changed everything to "internal PDF viewer", but still these nice "jump function" don't work. What do I have to change (in the preferences), so that I use those function? Or is it not possible to use them within Mac OS X?


title: badness messages when changing from report to book class

text: When I change the documentclass from `report` to `book` I suddenly get a lot of messages like this:               Underfull \vbox (badness 10000) has occurred while \output is active []      Does anyone have an explanation? PS: Note that I never use `\\\` to add space between paragraphs.


title: Text over figure in the wrapfigure environment

text: I know this question has been asked before, but I could not find a suitable answer, so please bear with me. I want to put a figure in my document using the `wrapfigure` environment. It is supposed to be on the left side of the document with width = `0.25\textwidth`. I have used a `flushleft` environment within the `wrapfigure` environment to keep everything formatted properly. This works fine in some parts of the document, but in others the figure ends up in the middle of the page, with body text over it. I have noticed that this happens near long blocks of text. If I have a figure that is supposed to be to the left of a long block of body text, then it messes up. However, if I break the text up into smaller paragraphs and put the `wrapfigure` environment between them, it works. The problem is that I don't want my paragraphs to be broken in strange places to accommodate my figures. There must be a better way of formatting this. Thanks in advance for your help! Note: I don't think there are no page breaks in the problem area. I saw that this was a problem for one person, so I thought I should point that out ahead of time. Besides body text, there are only breaks for `sections` and displayed equations. Of course, I'm no expert at typesetting so I could be wrong. [Edit]: Here is my MWE. I realize it isn't exactly minimal, but it's the best I could do without making the problem disappear.               \documentclass[]{amsart}     \usepackage{amsmath,amssymb}     \usepackage{tikz}     \usepgflibrary{shapes}     \usepackage{wrapfig}     \usepackage{caption}     \usepackage{lipsum}          \begin{document}          \captionsetup{justification=raggedright,singlelinecheck=false}          \pgfmathsetmacro{\ex}{0}     \pgfmathsetmacro{\ey}{0}          \newcommand{\figureone}[1]{     \begin{tikzpicture}[#1]         \draw [fill = lightgray] (0,0) circle [radius = 1.25 cm];         \draw (0,0) -- (0.8838834765,0.8838834765);         \node [above left] at (0.5,0.5) {$r$};         \node [above left] at (-1.0,0.575) {$C$};         \draw [->] (\ex,\ey) ++(135:1.5cm) arc (135:85:1.5cm);         \draw [->] (\ex,\ey) ++(160:1.5cm) arc (160:210:1.5cm);     \end{tikzpicture}     }          \newcommand{\figuretwo}[1]{     \begin{tikzpicture}[#1]         \draw [fill = lightgray] rectangle (2,2);         \node [right, rotate=90] at (2.35,0.4) {1 unit};         \node [below] at (1,-0.1) {1 unit};         \node [above] at (1,1) {$A = 1$};         \node [below] at (1,1) {$\textrm{unit}^2$};         \draw [<-] (0,-0.375) -- (0.35,-0.375);         \draw [->] (1.65,-0.375) -- (2,-0.375);         \draw (0,-0.15) -- (0,-0.6);         \draw (2,-0.15) -- (2,-0.6);         \draw [<-](2.375,0) -- (2.375,0.35);         \draw [->](2.375,1.65) -- (2.375,2);         \draw (2.15,0) -- (2.6,0);         \draw (2.15,2) -- (2.6,2);     \end{tikzpicture}     }          \begin{wrapfigure}{l}{0.25\textwidth}     \begin{flushleft}         \figureone{}     \end{flushleft}     \caption{Caption}     \end{wrapfigure}          \noindent     Filler text: here is some filler text. In my document this is 7 lines long, including one displayed equation. The first figure should be positioned directly to the right of this text.          \section*{Section 1}          \begin{wrapfigure}{l}{0.25\textwidth}     \begin{flushleft}         \figuretwo{}     \end{flushleft}     \caption{Caption}     \end{wrapfigure}           \lipsum[1]          \section*{Section 2}          \lipsum[2-3]          \end{document}


title: How to display a position of a vector like this?

text: How to display a smile symbol like this? For example, the `k_2`th place is `a_1`. ![enter image description here](http://i.stack.imgur.com/Jshyf.png)


title: Typesetting an empty square root

text: Is there a preferred way to typeset an empty `sqrt`? What I'm doing now is `\sqrt{\phantom{a}}`, are there other/preferred ways like a standalone symbol? Or should I just create a new macro with the phantom `a`?


title: electronics data sheet using ConTeXt: first page header=high

text: As it was asked here electronics data sheet latex template, I'd like to make Analog Device kind of data sheet using ConTeXt. The first page of the data sheet looks different (in terms of header, footer) from the rest of pages. What is the best approach to make a special "first page" template?   * `\setupmakeup`   * `\setupheader [\doifnot\pagenumber1\???]` and `\page`   * or something else?


title: parse variable length comma separated list into command

text: I've been trying to modify the solution here into a LaTeX3 command that takes a variable length comma separated list of numbers and an optional argument (a unit) and prints the square root of the sum of the square of each number (along with the unit, if given). `\sumofsquares{2,3,-4}[m/s]` should give ![enter image description here](http://i.stack.imgur.com/TuvLN.png) but `\sumofsquares{3,-4}[m/s]` should give ![enter image description here](http://i.stack.imgur.com/MCoZ6.png) I've Googled for LaTeX3 examples but the ones I've found (documentation for `xparse` and `expl3`) don't contain any examples. The differences between lists and sequences mystifies me.


title: Float placement: how can I prevent a float from splitting a paragraph?

text: I want to use floating figures within my thesis to improve the layout; however, when the float will not fit in the text, it is placed at the top of the next page. This can often be in the middle of a paragraph. Is there anyway to make LaTeX put the float at the end of that paragraph rather than in the middle of it? I'm using the `extraplaceins` package and and preparing the file using LyX               \usepackage[section,subsection,subsubsection]{extraplaceins}


title: Two small chapters side by side on one page

text: I've got two very short chapters and I want them to appear side by side on the same page like being arranged in a two column layout. I've got other chapters before and aftere these two which should appear in the usual layout.               \chapter{Normal ones}     normal content     \chapter{First short}     second content     \chapter{Second short}     second content     \chapter{Normal ones}     normal content      I want them to appear like this > **Normal ones** > > normal content > > **First short           Second short** > > First content        Second content > > **Normal ones** > > normal content


title: array package incompatible with stabular package

text: I am not allowed to create new tags yet, so I apologize for not tagging this with the names of the particular packages as instructed. I was trying to use both the array package and the stabular package, but apparently they are incompatible. When both packages are loaded, the `tabular` environment doesn't work, nor does the `stabular`. Is there a known work around so that the features of both are available in the same document? Here is my minimal example:               \documentclass{minimal}          \usepackage{array}     \usepackage{stabular}          \begin{document}     \begin{tabular}{cc}     text & more text     \end{tabular}     \end{document}


title: Strikethrough Cyrillic text in XeTeX preserving hyphenation

text: I was looking for the way to create a strikeout text in XeTeX. After some googling I found two packages that supposedly could do that: `ulem` and `soul`. However, it turned out that both of them have some issues with my text. `ulem` doesn't offer automatic hyphenation, which probably wouldn't be a problem if I only had couple of words to strike through, but that's not the case-I'm dealing with quite a large chunk of text and to manually hyphenate it would be difficult. `sout` without additional configuration doesn't work properly with Cyrillic text in XeTeX: it only strikes out words that border punctuation marks and swallows the rest of text. It seems to work fine with LaTeX but I'd like to use Unicode fonts which would be much easier with XeTeX. To illustrate the above, here's a small example:               \documentclass[draft=true]{scrartcl}     \usepackage[cm-default]{fontspec}     \usepackage{xltxtra}     \setmainfont{Palatino Linotype}     \usepackage{polyglossia}     \setdefaultlanguage{russian}     \usepackage{microtype}          \usepackage{ulem}     \usepackage{soulutf8}            \begin{document}     ulem:          \sout{Сшит колпак не по-колпаковски, вылит колокол не по-колоколовски.      Надо колпак переколпаковать-перевыколпаковать, надо колокол      переколоколовать-перевыколоколовать.}\\          soulutf8:          \st{Сшит колпак не по-колпаковски, вылит колокол не по-колоколовски.      Надо колпак переколпаковать-перевыколпаковать, надо колокол      переколоколовать-перевыколоколовать.}     \end{document}      It is rendered as follows: ![ulem and soul comparison](http://i.stack.imgur.com/1EKGx.png) As you see, there are line line overfulls with `ulem` variant and the `soul` variant is a complete mess. So I was wondering if there is any other way to achieve my goal.


title: How to align piecewise functions?

text: I have two piecewise functions defined like this:               \begin{align*}       \left\{         \begin{array}{ll}           i = x^2 + y^2 \\            j = a^2 + b^2 \\         \end{array}       \right.     \\       \left\{         \begin{array}{ll}           i = 1 \\           j = 2 \\         \end{array}       \right.     \end{align*}      The problem is that they're not aligned. How do I align them? ![enter image description here](http://i.stack.imgur.com/sIbgw.png)


title: Add column in a multicolumn table

text: This is my code               \begin{tabular}{|c|c|}     \hline     Genre&Prénom\\\hline     Humain&Aragorn\\\hline     \multirow{4}{*}{Hobbit}&Frodon\\\cline{2-2}     &Sam\\\cline{2-2}     &Peregrin\\\cline{2-2}     &Meriadoc\\\hline     Elfe&Legolas\\\hline     \end{tabular}      How can i add a third column like the second column?


title: How to achieve line break in simple $formula$-mode

text: I want to have inline math text like               Figure \ref{figure:example graph} shows an example of a graph $G = (\{v_{1}, \dots, v_{5}\}, \{(v_{1}, v_{2}), (v_{2}, v_{3}), (v_{1}, v_{3}), (v_{2}, v_{5}), (v_{3}, v_{4}), (v_{4}, v_{5})\})$ with $|V| = n = 5$ vertices and $|E| = m = 6$ edges.      but then, LaTeX messes with the linebreak and the rendered text looks like in the attached screenshot. ![enter image description here](http://i.stack.imgur.com/Bk4q1.jpg) Is there any way, I can tell LaTeX to break the formula within simple $'s?


title: Define a macro with an optional argument that is a space

text: I'm trying to define a macro replaces a phrase by a single latex expression, e.g., I want `\myPhrase` to return the phrase "this is the dog". The trouble is that when you do this in the obvious way               \def\myPhrase{this is the dog}      then you always have to remember to add a space after the macro, i.e.,               \myPhrase that I like      will return               this is the dogthat I like.      Since my coauthor will never remember to always write               \myPhrase\ that I like       I tried to define a macro with an optional argument. The default would be a space, and if you wanted punctuation you would add it as an argument. For example               \documentclass[11pt,reqno,fleqn]{amsart}     \newcommand{\myPhrase}[1][\ ]{This is the dog{#1}}     \begin{document}     \myPhrase that I was telling you about.  \myPhrase{,} which is a collie.     \end{document}      In principle the above should do the trick but it adds space even when there's an optional argument, i.e.,               \myPhrase{,}      returns               This is my dog , which is a collie      when it _should_ return               This is my dog, which is a collie       Any advice would be very much appreciated! Thanks Leo


title: Create 3D heatmap desity plot using TikZ

text: My question is very similar to "Create heatmap with PSTricks or TikZ", but this time in 3D. So I have tabulary data as follows:               x   | y   | z   | value     1.2 | 1.3 | 1.4 | 1.20     0.2 | 0.3 | 0.4 | 3.20      ... With this data I want to create 3D density plot or isosurface plot like: ![desired result](http://i.stack.imgur.com/o42cv.png) Maybe with the opacity as function of value. Sure I know the solution will be more than time consuming, but I have already seen similar results and they look pretty good.


title: TeX-aware source line wrapping

text: For various reasons, I prefer to have short physical lines in my latex documents, so that the various editors I switch among don't need to soft-wrap the display. But many GUI editors have terrible support for "hard" line- wrapping. The "hard wrap" option in TeXShop, for example, is not comment-aware and is therefore extremely dangerous. Texcenter 2 breaks lines in places that can insert spaces in the output; etc. (Emacs handles all this well, but I can't always use it.) So the question: What external tools or (non-interactive) command-line scripts can **reliably** hard-wrap latex documents, in a way that does not change the output? For the purposes of this question I am interested in any and all platforms (though OS X-compatible or portable solutions would be most useful to me). A good tool should also respect newlines in places that are important to human authors; e.g., a good heuristic is not to remove a newline that is immediately followed by a command sequence or comment (perhaps: even if indented). Obviously, only TeX can handle unusual documents that change the comment character, etc.; but anything else can in principle be handled quite robustly. What tools are there that do so? Related: This answer suggests that TextWrangler is one possibility; haven't tried it yet.


title: Rectangles around cells in table

text: I asked a question here but, rather stupidly, added extra information after it had been answered. My additional question is this: I have a table with varying lengths of words. I want to encircle different groups of cells, including diagonals. If possible, it would be great if the rectangles don't overlap each other where possible. I looked at the answer here, which, whilst tedious, worked except for the overlap. ![Example Image](http://i.stack.imgur.com/vVnrc.png) This is where I've got to so far:               \documentclass[fleqn,12pt,a4paper,landscape]{article}          \usepackage{tikz}     \usepackage{tabularx}          \begin{document}          % Introduce a new counter for counting the nodes needed for circling     \newcounter{nodecount}     % Command for making a new node and naming it according to the nodecount     counter     \newcommand\tabnode[1]{\addtocounter{nodecount}{1} \tikz \node     (\arabic{nodecount}) {#1};}          % Some options common to all the nodes and paths     \tikzstyle{every picture}+=[remember picture,baseline]     \tikzstyle{every node}+=[inner sep=0pt,anchor=base,     minimum width=1.8cm,align=center,text depth=.25ex,outer sep=1.5pt]     \tikzstyle{every path}+=[thick, rounded corners]          \begin{table}[ht]       \begin{minipage}[b]{1 \linewidth}\centering        \begin{tabular}{cccccc}     % Turn the cells needed for defining the circling paths into nodes with our     custom command     \tabnode{Long ago}& \tabnode{A few days ago}& \tabnode{Day before         yesterday}& \tabnode{Yesterday} &  &  \\          & & &  & \tabnode{Today} & \tabnode{Now}\\          \tabnode{Long time in the future}& \tabnode{A few days on}&     \tabnode{Day after tomorrow}& \tabnode{Tomorrow} &  & \\          \end{tabular}        \end{minipage}               \begin{tikzpicture}[overlay]     % Define the circle paths     \draw [blue](1.north west) -- (1.north east) -| (7.north east) |- (7.south     west) |- (1.north west);     \draw [red](8.south west) -| (2.north east) -| (2.south west) |- (8.south     west);     \draw [yellow](9.south west) -| (3.north east) -| (3.south west) |- (9.south     west);     \draw [green](8.south west) -| (3.north east) -| (2.south west) |- (8.south     west);               \end{tikzpicture}          \end{table}     \end{document}      %%% Local Variables:      %%% mode: latex     %%% TeX-master: t     %%% End:       ![Current Progress](http://i.stack.imgur.com/uID9q.png)


title: Label equations arbitrarily

text: When I have equations, as in               \begin{equation} ... \end{equation}      Can I arbitrarily assign the numbers to the equations? Instead of the usual order (1), (2), (3), ..., I'd like something like (1), (2.1), (2.2), (2.3), (3.1), (3.2), (4), ...


title: Exclude sections in Lyx

text: I need some versions of my text without some specific sections but I don't want to delete them, because I will need them again later. In a plain latex editor I would use `%`. Is there something in Lyx that allows me to temporarily exclude those text from the pdf creation?


title: To have two titles in the document at different pages with the same style

text: I have one document that combines many documents: Pathoanatomy and Pathophysiology, for instance. I want to start a new document from the body like               \documentclass{article}     \begin{document}     \title{Introduction to Pathoanatomy Notes}     \begin{titlepage}     \maketitle     \end{titlepage}          % first document      ...     % second document in the some body     \title{Introduction to Pathophysiology Notes}     \begin{titlepage}     \maketitle     \end{titlepage}     ...     \end{document}      The output is the right but the style does not remain. **How can you do the same but maintain the style of the title page to the second title?**


title: Dealing with Long Table head entries ?

text: As seen below, my goal is to save some space. For example,                                    Applied                           Model     Logistic      Model      ![enter image description here](http://i.stack.imgur.com/YHwAX.png) The code i'm using to generate the table is:               \begin{table}[ht]     \renewcommand{\arraystretch}{1}     \addtolength{\tabcolsep}{-5pt}     \centering     {\scriptsize     \begin{tabular}{llccc}     \hline     Algorithm & Dataset &  Applied Model (\%) & Definition of data  (\%) & Overall Assumptions (\%)  \\ \hline      \multirow{3}{*}{Logistic MODEL} & + & 63.6 & 98 &  95.3937  \\       & - & 68.1 & 95.5 & 95.4757   \\      & - & 100 & 100 & 99.1935 \\ \hline     \end{tabular}}     \label{table:tex-exchange}     \end{table}


title: Wrapfig floating to bottom (Article)

text: I'm trying to get a figure to float beside text but I keep getting the error "wrapfigure used inside conflicting environment," and the figure floats down to the bottom. I'm pretty sure it's not in a list unless sections count as a list, and I've tried commenting out just about everything to see what's conflicting and I can't find it.               \documentclass[12pt]{article}     \usepackage[hidelinks]{hyperref}     \usepackage{datetime}     \usepackage{graphicx}     \usepackage{wrapfig}               \begin{document}     \section{Task Management Structure}     \begin{flushleft}     In order to efficiently utilize JIRA for task management, the general structure of     site’s components must be understood. This section discusses JIRA's structure and how     it will be used.     \begin{center}     \includegraphics[width=0.85\textwidth]{JIRATaskManagementStructure}     \end{center}          \section{Navigating Dashboard}          \subsection{Introduction}               \begin{wrapfigure}{R}{.5\textwidth}     \centering     \includegraphics[width=0.5\textwidth]{image}     \end{wrapfigure}          The \emph{Introduction} section provides a link to the     \texttt{\href{http://tex.stackexchange.com}{Valid Link}}.           \subsection{Introduction2}               \begin{wrapfigure}{R}{.5\textwidth}     \centering     \includegraphics[width=0.5\textwidth]{image2}     \end{wrapfigure}     \end{flushleft}     \end{document}      The first graphic works, but it isn't a wrapfig, so I don't think it matters to what's happening. I've been looking through stuff for about an hour and not finding anything that helps. The second wrapfig takes in the image from the first.


title: User-specified positioning of caption

text: For tuning reasons that I cannot detail here, I would like to be able to control the position of the `caption` of figures. My current code is as follows:               \begin{figure}[ht!]     \colorbox{red!10}{%     \parbox{\textwidth-2\fboxsep-2\fboxrule}{%     \centering\includegraphics{fig1}%     \caption{}%     \label{fig:ch1-1}}}%     \end{figure}      Is is possible to move the caption (which is here only Figure 1) to the top- left corner of the `colorbox`. I know that the `float` package offers similar possibilities but would like to know if there is a solution by hand.


title: How to define colors in style file (lstlang0.sty)

text: Per the `listings` package documentation, I have a file `lstlang0.sty` in the same directory as my .tex file (well, .lyx file) which defines a new language. I used to have this language definition in my preamble but since it's being used in at least four documents now, I am very motivated to maintain it as a separate style file. I've defined colors to provide syntax highlighting and that's where things get hung up. This block was previously in my preamble and now resides in my `lstlang0.sty` file. Note it used `lstdefinelanguage` in the preamble (no '@'). Also, I've snipped out most of the keywords for convenience.               \lst@definelanguage[CR]{Basic}{%       basicstyle={\ttfamily\footnotesize},%       sensitive=false,%       upquote=true,%       string=[bd][\color{crbString}]{"},%       showstringspaces=false,%       morekeywords=[1]{Const, Public, <snip> ...},%       keywordstyle={[1]{\color{crbKeyword}}},%       otherkeywords={=, /, *, +, -, *=, /=, +=, -=, <<, >>, ^, <, >},%       morekeywords=[2]{=, /, *, +, -, *=, /=, +=, -=, <<, >>, ^, <, >},%       keywordstyle={[2]{\color{crbKeyword}}},%       morecomment={[l][\color{crbComment}\ttfamily\itshape]{'}}%     }     \endinput      Things compile correctly so long as the colors (`crbKeyword`, `crbString`, `crbComment`) are defined _in the preamble_. Attempting to define them in the style file like so:               \definecolor{crbString}{RGB}{255,0,255}     \definecolor{crbKeyword}{RGB}{0,0,255}     \definecolor{crbComment}{RGB}{0,128,128}     \lst@definelanguage[CR]{Basic}{%       ...      gives me a long list of errors:               LaTeX Error: Undefined color 'crbKeyword'.     LaTeX Error: Undefined color 'crbKeyword'.     LaTeX Error: Undefined color 'crbComment'.     ...      I tried adding `\RequirePackage{color}` above the color definitions in the style file and LaTeX first complains "Can only be used in preamble" followed by the same undefined color errors. Encasing the color definitions with `\AtBeginDocument{..}` produced the same results. What do I need to change to get the color definitions into `lstlang0.sty`? * * * I did notice no other `listings` language definitions include syntax coloring. Is there any (technical) reason?


title: `caption.sty' not found Miktex missed package (caption.sty)

text: ![package installation](http://i.stack.imgur.com/wOlRp.png) the error is: ! LaTeX Error: File `caption.sty' not found can anyone help ?


title: How do I generate a title in beamerposter?

text: I am trying to generate a title for my poster using `beamerposter` and it seems to be unnecessarily difficult. In the following example code, the usage of `maketitle` causes a full-page title, while I am just looking for something towards the top and center- aligned.               \documentclass[final]{beamer}       \mode<presentation>       {      \usetheme{default}     }       \usepackage{type1cm}       \usepackage{calc}        \usepackage{times}       \usepackage{amsmath,amsthm, amssymb, latexsym}       \boldmath       \usepackage[english]{babel}       \usepackage[latin1]{inputenc}       \usepackage[orientation=landscape,size=custom,width=101.6,height=76.2,scale=1,debug]{beamerposter}       \usepackage[absolute,overlay]{textpos}       \title{My Awesome Paper Title}       \author{Merlin2011}       \institute{FooBar University}       \date{June 6, 2014}       \begin{document}       \begin{frame}       \maketitle       \end{frame}     \end{document}      How can I generate a simple title for my poster without eating up the whole page?


title: Challenge! Create aTikZ style to mimic mirror reflection (with option for curvature distortion)

text: When we see images that are reflected at a mirror, or at the eyes of someone, or at the water, there is some light effect that tells our brains the image we are seeing is a reflection. Some of Escher pictures illustrate this very well: ![http://en.wikipedia.org/wiki/Hand_with_Reflecting_Sphere](http://i.stack.imgur.com/QKBsa.jpg) or ![http://www.taschen.com/media/images/960/teaser_gr_25_escher_magic_mirror_top_1208151636_id_600031.jpg](http://i.stack.imgur.com/Z3gFX.jpg) I'm looking for ideas or suggestions on how to create this effect using TikZ. The concept is to have a style that we could apply to an arbitrary picture to obtain the picture looking as if it were a reflection. I'm **not** trying to simply mirror a TikZ picture but rather trying to make appear _as if_ the picture is a reflection. I will post a bounty as soon as I can to reward the best answer. The MWE requirement clearly does not apply here.


title: How can i change the paper size in tikzposter?

text: Right now the only allowed paper sizes in `tikzposter` are `a0paper`, `a1paper`, or `a2paper`. Is there a way to manually set the size of the poster in inches or other units?


title: Is there a "cases" environment in text mode?

text: The title says it all: The "cases" environment works only in math mode. Is there an alternative in text mode?


title: overfull hbox despite of width=\linewidth

text: I want to include a PDF file in my LaTeX-Document, which I compile with `pdflatex`. Using `width=\linewidth`, I still get an overfull hbox. What am I doing wrong? MWE:               \documentclass{article}     \usepackage{graphicx}     \begin{document}     \includegraphics[width=\linewidth]{Test.pdf}     \end{document}      Warning: `Overfull \hbox (15.0pt too wide) in paragraph`


title: Change page margins for one single page inside the document

text: I am writing a document , A4, using KOMA-Scripts (scrbook) and inside my document i have a Flowchart which doesn't pass in portrait. I used                \KOMAoptions{paper=landscape}      \recalctypearea      \newgeometry{left=20mm,right=20mm,top=20mm, bottom=20mm}      and at the end of the Flowchart, for returning to portrait, i write                \KOMAoptions{paper=portrait}      \restoregeometry      \recalctypearea      doing this give me what i want, but i get the following Warning:               Package typearea Warning: Bad type area settings!     (typearea)               The detected line width is about 48%     (typearea)               larger than the heuristically detected line width.     (typearea)               You should e.g. decrease DIV, increase fontsize     (typearea)               or change papersize.               Package typearea Warning: Typearea changed!     (typearea)                You should do this only at preamble, because only     (typearea)                \begin{document} calculates output dimensions!     (typearea)                Trying to calculate new output dimensions, but     (typearea)                this is only a dirty hack on input line 206.               Overfull \hbox (211.8935pt too wide) in paragraph at lines 314--315      []      [4     Non-PDF special ignored!]          Package typearea Warning: Typearea changed!     (typearea)                You should do this only at preamble, because only     (typearea)                \begin{document} calculates output dimensions!     (typearea)                Trying to calculate new output dimensions, but     (typearea)                this is only a dirty hack on input line 321.      How could i solve this warning due to `\recalctypearea`? **Remark** I know that `Overfull \hbox is ...` is due to something else


title: Overhang parameter of rowcolor changes overhang of each cell, not just the row

text: I want to highlight a few rows in a table, and used `\rowcolor` as per the first table. Well, this results in the row coloring being wider than I desire, so I thought the simple fix would be to adjust the overhang of the row via the optional parameter               \rowcolor{cyan!20}[1pt]      But, this yields the result shown in the second table. The overhang was applied to each cell -- I just want to control the overhang of the entire row, not each cell. That is, I want a solid colored row, but with the overhang adjusted on the left and the right of the row. ![enter image description here](http://i.stack.imgur.com/Cpt3l.png) ## Code:               \documentclass{article}     \usepackage{booktabs}     \usepackage{xcolor}     \usepackage{colortbl}          \begin{document}          \begin{tabular}{clc}     $n$ & Text & $f(n)$ \\     \cmidrule(lr){1-1}     \cmidrule(lr){2-2}     \cmidrule(lr){3-3}     \rowcolor{cyan!20}     1   & abc    & 2      \\     2   & abc    & 1      \\ \rowcolor{cyan!20}     7   & abc    & 3      \\     8   & abc    & 2      \\     9   & abc    & 1      \\     10  & abc    & 2      \\     11  & abc    & 2      \\     \bottomrule     \end{tabular}     \quad     \begin{tabular}{clc}     $n$ & Text & $f(n)$ \\     \cmidrule(lr){1-1}     \cmidrule(lr){2-2}     \cmidrule(lr){3-3}     \rowcolor{cyan!20}[1pt]%  <---- only change from above is the "[0pt]"     1   & abc    & 2      \\     2   & abc    & 1      \\ \rowcolor{cyan!20}     7   & abc    & 3      \\     8   & abc    & 2      \\     9   & abc    & 1      \\     10  & abc    & 2      \\     11  & abc    & 2      \\     \bottomrule     \end{tabular}     \end{document}


title: How can I indent all text after the label in my example environment

text: I have built my own `example` environment for a paper I am working on. I have created a counter to label the resulting blocks of text. Now I want to indent the Text after the label, like so:               (1)   Lorem ipsum dolor sit amet, consectetur adipiscing elit.           Nullam hendrerit tempor purus in interdum. Ut nec augue           ipsum.          (2)   Sed volutpat aliquet mauris non porta. Vivamus sagittis           ante dapibus tellus vehicula ullamcorper. Quisque tris-           tique commodo nisi et semper.          ...          (10)  Sed volutpat aliquet mauris non porta. Vivamus sagittis           ante dapibus tellus vehicula ullamcorper. Quisque tris-           tique commodo nisi et semper.      This is the code I have written so far:               \newcounter{examplectr}          \newenvironment{example}[1][]{         \ignorespaces         \refstepcounter{examplectr}         (\theexamplectr)         \hfill     }{}      But unfortunately, the resulting output looks more like this:               (1)   Lorem ipsum dolor sit amet, consectetur adipiscing elit.     Nullam hendrerit tempor purus in interdum. Ut nec augue ipsum.          (2)   Sed volutpat aliquet mauris non porta. Vivamus sagittis     ante dapibus tellus vehicula ullamcorper. Quisque tristique     commodo nisi et semper.      Does anyone know how to achieve that?


title: Manual TexLive install---Texworks collection doesn't show up. Should I just use Ubuntu/Debian Texworks package?

text: I just installed LaTeX on my system, which is a Linux Mint 16 (Cinnamon) 32-bit installation on a 64-bit Lenovo e420. I originally had used `apt-get` to install the base Ubuntu package along with Texworks. But I soon ran into a problem with `tlmgr` ("`cannot setup TLPDB`") that is identified as a bug here. Based on a relevant stackexchange thread I removed my LaTeX packages, downloaded the most recent manual install from tug.org, and did a manual install. `tlmgr` now works. But, even though the installer indicates that there is a Texworks collection, Texworks doesn't seem to get installed. Texworks doesn't appear in the Texlive `.../bin/` location, PATH, etc. If it does get installed, I don't know where it is. Is this expected behavior? Did I do something wrong? (Note: if I install the Texworks package from the repositories, I can use it and compile documents. But I don't know if there are hidden compatibility issues that might crop up).


title: Drawing Young tabloids

text: I would like LaTeX to produce output like the following ![example of a tabloid](http://i.stack.imgur.com/yMYHN.png) (without the 2 a so called Young tabloid), ideally by writing               \ytabloidshort{123,56}      (using one character per cell, ideally allowing groups via brackets as in `\ytabloidshort{89{10}{\ldots}{n+1},56}`, but that is not important, the following is sufficient) or               \begin{ytabloid}     1 & 2 & 3 \\     4 & 5     \end{ytabloid}      of course with arbitrarily many rows and columns. The command/environment must (also or only) work in _mathmode_. That's why I included the `2 \cdot` in the following examples. I have found several ways to generate output similar to the desired, but they are all unacceptable.               \documentclass{article}          \usepackage{amsmath}     \usepackage{booktabs}     \usepackage{ytableau}     \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{document}          perfect, but I do not see a way to remove the vertical lines while keeping the      horizontal ones (ytableau):     \[ 2 \cdot     \ytableausetup{centertableaux}     \begin{ytableau}     1 & 2 & 3 \\     4 & 5     \end{ytableau}     \]          matrix (amsmath) and cline:     \[ 2 \cdot     \begin{matrix}     \hline     1 & 2 & 3 \\ \hline     4 & 5 \\ \cline{1-2}     \end{matrix}     \]          matrix (amsmath) and cmidrule (booktabs):     \[ 2 \cdot     \cmidrulewidth=\lightrulewidth     \begin{matrix}     \midrule     1 & 2 & 3 \\ \midrule     4 & 5 \\ \cmidrule{1-2}     \end{matrix}     \]          tikzpicture and matrix (TikZ/PGF with library matrix):     \[ 2 \cdot     \begin{tikzpicture}     \matrix[matrix of math nodes] (m) {     1&2&3\\     4&5\\     };     \draw (m-1-1.north west) -- (m-1-3.north east);     \draw (m-1-1.south west) -- (m-1-2.south east);     \draw[red] (m-2-2.north west) -- (m-2-2.north east); % shows that lines don't overlap     \draw (m-2-1.south west) -- (m-2-2.south east);     \end{tikzpicture}     \]          \end{document}      Two (and more) disadvantages remain:   * The output is ugly, actually unusable.   * They are all very uncomfortable to write. What do you suggest? Is it, for example, possible to parse the argument of `\ytabloidshort` and draw a matrix, each cell with content automatically with a line above and below. (But note the "problem in red"). How would one implement such a `\newcommand`? Any other ideas are also welcome. I can split this problem into **three questions** :   1. How do I get tabloids whose appearance fits to tableaux generated with the package `ytableau`?   2. How can I make the result of (1.) work in connection with other maths, cf. the `2 \cdot`?   3. How can I generate (1.) in a comfortable way? **Solutions** so far: Ryan extented his package `ytableau` to draw tabloids. As long as your are using the package, this solves all three questions. The picture above can be generated by               \usepackage{ytableau} % version 1.3 or higher          \ytableausetup{tabloids, centertableaux}     \[ 2 \cdot \ytableaushort{123,45} \]      Sticking to the questions the status is the following.   1. Actually none. Spacing must be adapted.   2. Actually none. Alignment and spacing must be adapted.   3. Scott showed a way to generate the desired matrix by a makro. This is definitely worth noting and may be helpful in many other situations.


title: Tikz fade with transparency so background is visible in beamer?

text: I am writing a presentation in beamer. I have a background image that I have included with `\setbeamertemplate{background canvas}{...}`. Within a regular slide, I now would like to create a rectangle that fades from a color to fully transparent in Tikz. If I create a rectangle with fading, i.e. `\tikz{\fill[left color=RED,right color=transparent] (0,0) rectangle (\linewidth,1.5em);}` It creates the rectangle, but rather than being see- through at the right end, it is black. Is there a way to define opacity in fade, such that the background image becomes visible? M.W.E               \documentclass{beamer}       \usepackage{tikz}       \usepackage{graphicx}       \usetikzlibrary{shapes.arrows, fadings}            \setbeamertemplate{background canvas}{\includegraphics[width=\paperwidth]{picture.jpg}}            \begin{document}         \begin{frame}           \tikz{\fill[left color=red,right color=transparent] (0,0) rectangle (\linewidth,1.5em);}         \end{frame}       \end{document}      (Use any random picture for the background)


title: Creating a simple list of symbols

text: Inspired by this great answer I tried to manually create a glossary-style environment for a simple list of symbols. Basically I wanted to create a command `newsymbol` that can be executed from anywhere in the text and adds the new symbol together with a short explanation and the page number to a list of symbols at the end of the text. This is what I tried:                \documentclass{amsbook}      \usepackage{lstdoc,longtable}           \begin{document}      \makeatletter           \def\symbollist{}      \let\sort\lst@BubbleSort       \def\addtolist#1#2{        \lst@lAddTo\symbollist{#2}      }      \long\gdef\addterm#1#2{\addtolist\symbollist{#1,}}      \def\newsymbol#1#2#3{%      \long\expandafter\gdef\csname#1\endcsname{#2 & #3 & \thepage}      \addterm{#1}{#2}      \sort\symbollist      }      \def\PrintListOfSymbols{%      \begin{longtable}{r p{.8\textwidth} l}      \@for \i:=\symbollist\do{%          \csname\i\endcsname \\ }      \end{longtable}      }           \chapter{Contents}      Here the integers $\mathbb{Z}$ appear first.\newsymbol{Z}{$\mathbb{Z}$}{integers} \newpage           Here the other symbols appear first: $\mathbb{R},\mathbb{N}$. \newsymbol{R}{$\mathbb{R}$}{real numbers} \newsymbol{N}{$\mathbb{N}$}{natural numbers}           \begin{center} The entry from inside an environment does not appear. \newsymbol{Q}{$\mathbb{Q}$}{rational numbers} \end{center}           \chapter{List of Symbols}      \PrintListOfSymbols           \makeatother      \end{document}      The first argument of `newsymbol`is just used for the sorting of the entries. Here is what the list looks like: ![List of symbols](http://i.stack.imgur.com/xvpRm.png) There are basically two problems yet to resolve:   * The page numbers are not correct, the `\thepage` variable returns the page where the list of notations is printed. How can I give a command the page number where the command is executed as an argument?    * The command does nothing when executed from within an environment. How to fix that? I'd be grateful for your help!


title: Use bibtex info for register of persons

text: I am wondering and have intensely and unsuccessfully searched if there is any possibility to use the bibtex author info to create a register of persons without going through all my documents and add a new `\index[whatever]{person}` every time. Hence, if a paper is `\cited{citekey}` in the document, I want to create a register which checks the list of authors of the paper in bibtex file and the page number information from the tex document and adds something like below in a new list for all authors in the cited literature. I am working on a book citing roughly 350 papers with most time multiply authors, therefore the by hand possibility really doesn't look appealing for me. > Register of Persons: > > Jackson, Peter; p. 5, 19, 240 > > Jackson, Michael; p. 89, 221 > > Kugler, George; p.189 > > etc. Would be great if anyone knows if some package already does this!


title: Color table element with siunitx S column

text: I have a table with numbers that I have aligned using the S column type provided by the `siunitx` package. I need to make one of the table elements red, but when I do that, the number that is red is no longer aligned. What is the right way to do this? MWE below.               \documentclass{article}     \usepackage{siunitx}     \usepackage[]{xcolor}          \begin{document}     \begin{table} \centering         \caption{Table with \texttt{c} column type.}         \begin{tabular}{cc}             \hline             Symbol & \multicolumn{1}{c}{Value} \\             \hline             $\pi$ & 3.141592654 \\             $2\pi$ & 6.283185307 \\             $4\pi$ & 12.56637061 \\             $8\pi$ & {\color{red}25.13274123} \\             $e$   & 2.71828182845904524 \\             $\sqrt{2}$ & 1.41421356237309505 \\             \hline         \end{tabular}     \end{table}          \begin{table} \centering         \caption{Table with \texttt{S} column type.}         \begin{tabular}{cS}             \hline             Symbol & \multicolumn{1}{c}{Value} \\             \hline             $\pi$ & 3.141592654 \\             $2\pi$ & 6.283185307 \\             $4\pi$ & 12.56637061 \\             $8\pi$ & {\color{red}25.13274123} \\             $e$   & 2.71828182845904524 \\             $\sqrt{2}$ & 1.41421356237309505 \\             \hline         \end{tabular}     \end{table}     \end{document}


title: Strange hyperref Info in log file

text: What could be the source of the following message contained in my log file? > Package hyperref Info: bookmark level for unknown unnumbered defaults to 0 > on input line 48. I should say that input line 48 and the lines before and after it only contain text, formulas and a blank line. There is a labelled equation environment but if I delete this, the message is still there (the label is the only thing which could possibly be connected with hyperref). I cannot reproduce the message if I compile these lines alone.


title: font size selection how multiple of \normalsize

text: is possible make a command like this?               \fontsize{2\normalsize}{2\normalsize}\selectfont


title: colored text at specified position by command \coordinate

text: I tried to write a simple tikzcode:               \documentclass{book}     \usepackage{tikz}     \usetikzlibrary{intersections}     \usetikzlibrary{calc}          \begin{document}          \begin{tikzpicture}        [scale=3,line cap=round,         % Styles           axes/.style=,           important line/.style={very thick},           information text/.style={rounded corners,fill=red!10,inner sep=1ex}]       \begin{scope}[axes]              \draw[->] (-0.2, 0) -- (1.5, 0) node[right] {$x$} coordinate(x axis);         \draw[->] (0, -0.2) -- (0, 1.5) node[left] {$y$} coordinate(y axis);       \end{scope}       % my function          \draw[very thick,red](1.5,1.5) node[left=1pt,fill=white]{$y=f(x)$};        \coordinate [label=left:$D$] (D) at (0.3,0.5);        \coordinate [label=right:$C$] (C) at (1.2,1.2);        \draw[name path=func] (D) .. controls (1.0,0.5) and (0.5,1.2) .. (C);       % horizontal line        \draw[name path=my_line, gray, dotted] (0.75,0) node[below, red]{$c$} -- (0.75,0.9);       % intersection between vertical line and my function        \fill[red, opacity=0.5, name intersections={of=func and my_line, by={intersect}}]             (intersect) circle (1pt);       % x-axis labels        \draw[gray, dotted, text = red] (D) -- +(0,-0.5)            node [label={[xshift=-0.2cm, yshift=0.5mm]$A$},below] (A) {$a$};        \draw[gray, dotted, text=red] (C) -- +(0,-1.2)           node [label={[xshift=0.2cm, yshift=0.5mm]$B$},below] (B) {$b$};        \draw[red](-0.05,-0.08) node[left=1pt,fill=white]{$0$};       % y-axis labels        \draw[gray, dotted] let \p1=(D), \p2=(intersect), \p3=(C) in (\x1,\y2)           -- +(-\x1,0) node[left, red]{$f(c)$}            -- (\x1,\y2) node[above, red] (F) {$F$}            -- (\x3,\y2) node[right, red]{$E$};        % dotted line between F and D        \draw[gray, dotted] (F) -- (D);     \end{tikzpicture}          \end{document}      which produce figure: ![function](http://i.stack.imgur.com/zs5Tj.png) First I'd like to ask how to color the text which I entered with the commands   * `\coordinate [label=left:$D$] (D) at (0.3,0.5); % letter D`   * `\coordinate [label=right:$C$] (C) at (1.2,1.2); % letter C` I would also like to ask whether anyone would help improve my code. I am a beginner, so it will probably be quite inefficient. Thanks


title: Spacing around a table

text: I am trying to set all spacings around and within a `tabular` environment to be equivalent with standard paragraph text. The table heading and the table should have no indentation. I placed comments where I would like to set the spacing. The table heading is too close to the table if in the heading text there is no letter extending below baseline (e.g. no g, j, p, q or y). Also the spacing between rows seems to be different than interline spacing.               \documentclass{book}          \begin{document}          Text text text text text text text text text text text text     text text text text text text text text text text text text.          {         \setlength{\parindent}{0cm}         Table head is too close:\\% <-- set space after the table heading equal to interline spacing         \begin{tabular}{@{}ll}            Text text text text & Text text text text\\ % <-- set spacing between rows equal to interline spacing            Text text text text & Text text text text\\         \end{tabular}     } % <-- space after the table equal to interparagraph spacing          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 text text text text text text     text text text text text text text text text text text text.          \end{document}


title: Pgfplotstable ignores chars in filename

text: I am using the `ignore chars` key from the `pgfplotstable` to ignore some characters in a table. However, I have noticed that it also removes characters from the file name and I am wondering if this is a bug. Here is an example where the ignored char is `s`. The result is that the table `height.dat` instead of `heights.dat` is printed.               \documentclass{standalone}     \usepackage{pgfplots,filecontents,pgfplotstable}     \pgfplotsset{compat=1.9}          \begin{filecontents}{heights.dat}     height     1     5     8     11     \end{filecontents}          \begin{filecontents}{height.dat}     height     0     0     \end{filecontents}               \begin{document}          \pgfplotstabletypeset[ignore chars={s}]{heights.dat}          \end{document}


title: A problem with indexing (see also appearing instead of see)

text: Hello I would like to add some terms that mean the same thing in the index of my thesis. For example "vector space" and "linear space". I wish this to appear as "vector space, see linear space". I'm using amsbook and for such an example I'm writing `\index{vector space|see{linear space}}`. However, it keeps on coming up as "see also" instead of "see". I don't know if this is a common problem but I couldn't find a solution anywhere on the web. Here's the code I'm using, without any chapter files - it still runs.               %-----------------------------------------------------------------------     % Beginning of amsbook.template     %-----------------------------------------------------------------------     %     %    AMS-LaTeX v.2 driver file template for use with amsbook     %     %    Remove any commented or uncommented macros you do not use.          \documentclass{amsbook}          %    For use when working on individual chapters     %\includeonly{}          %    Include referenced packages here.     \usepackage{amssymb,amscd,latexsym,amsxtra}     \usepackage[mathscr]{eucal}          \newtheorem{thm}{Theorem}[chapter]     \newtheorem{cor}[thm]{Corollary}     \newtheorem{lem}[thm]{Lemma}     \newtheorem{prop}[thm]{Proposition}     \newtheorem{ax}{Axiom}               \theoremstyle{definition}     \newtheorem{defn}[thm]{Definition}     \newtheorem{exmp}[thm]{Example}     \newtheorem{xca}[thm]{Exercise}     \newtheorem{prob}[thm]{Problem}          \theoremstyle{remark}     \newtheorem{rem}[thm]{Remark}     \newtheorem{claim}{Claim}     \newtheorem{case}{Case}     \newtheorem*{notation}{Notation}          \numberwithin{section}{chapter}     \numberwithin{equation}{chapter}     \numberwithin{figure}{chapter}     \numberwithin{table}{chapter}          %    For a single index; for multiple indexes, see the manual     %    "Instructions for preparation of papers and monographs:     %    AMS-LaTeX" (instr-l.pdf in the AMS-LaTeX distribution).     \makeindex          \begin{document}          \frontmatter          \title{}          %    Remove any unused author tags.          %    author one information     \author{}     \address{}     \curraddr{}     \email{}     \thanks{}          %    author two information     \author{}     \address{}     \curraddr{}     \email{}     \thanks{}          \subjclass[2000]{Primary }     %    For books to be published after 1 January 2010, you may use     %    the following version:     %\subjclass[2010]{Primary }          \keywords{}          \date{}          \begin{abstract}     \end{abstract}          \maketitle          %    Dedication.  If the dedication is longer than a line or two,     %    remove the centering instructions and the line break.     %\cleardoublepage     %\thispagestyle{empty}     %\vspace*{13.5pc}     %\begin{center}     %  Dedication text (use \\[2pt] for line break if necessary)     %\end{center}     %\cleardoublepage          %    Change page number to 6 if a dedication is present.     \setcounter{page}{4}          \tableofcontents          %    Include unnumbered chapters (preface, acknowledgments, etc.) here.     \include{}          \mainmatter          \index{Hello|see{Hi}}          %    Include main chapters here.     \include{}          \appendix     %    Include appendix "chapters" here.     \include{}          \backmatter     %    Bibliography styles amsplain or harvard are also acceptable.     \bibliographystyle{amsalpha}     \bibliography{}     %    See note above about multiple indexes.     \printindex          \end{document}


title: dealing with thin spaces in XeLaTeX and LuaLaTeX

text: In the following small example I get unexpected but different results in XeLaTeX and LuaLaTeX:               \documentclass{article}     \usepackage{fontspec}     \setlength\parindent{0pt}     \newcommand*\x{\rule{1cm}{1cm}}          \begin{document}          \x\,\x \par     \x~\x  \par     \x \x  \par  % U202F ('NARROW NO-BREAK SPACE') between     \x \x  \par  % U2009 ('THIN SPACE') between          \end{document}        1. XeLaTeX: The second, third, and fourth squares have the same wide distance.   2. LuaLaTeX: The third and fourth squares have no distance. I would expect in case three and four the same small distance as in case one with both engines. Are these bugs, or can I correct it by myself?


title: OPmac mnote with hyperlink bug?

text: When typesetting the following (using pdfTeX or luaTeX) the rightmost bracket of the cross reference in the marginal note is colored as if part of the hyperlink (though not actually part of the link), which I believe it should not be. The left bracket is black and not part of the link:               \input opmac          % Enable hyperlinks     \hyperlinks\Red\Red          \newcount\somecounter \somecounter 1          \label[test]\wlabel{T.\the\somecounter} This is a test          More Text and now we put a cross reference in a marginal note: \mnote{[\ref[test]]}          \bye      ![screenshot](http://i.stack.imgur.com/H6s1P.png) So far I've only seen this behaviour in marginal notes via \mnote.


title: Compiling snippets without extra clutter

text: Assuming that I have some equations in latex               A_{m,n} =      \begin{pmatrix}       a_{1,1} & a_{1,2} & \cdots & a_{1,n} \\       a_{2,1} & a_{2,2} & \cdots & a_{2,n} \\       \vdots  & \vdots  & \ddots & \vdots  \\       a_{m,1} & a_{m,2} & \cdots & a_{m,n}      \end{pmatrix}      Can I compile this into a dvi file or svg path without adding extra code or extra clutter ? I would just like to set the font size, that's all, I would like to feed this code to latex and get a single image not just a whole document that is automatically fitting the given math equation.


title: Accessing node name within node text braces

text: I am wishing for writing `$\n$` as node text, where `\n` has the node's name. Working example:               \documentclass{standalone}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}      [node distance=2em]     \node (0) {0};     \node (h) [above of=0] {};     \node (a) [left of=h] {$a$};     \node (b) [right of=h] {$b$};     \draw (0) -- (a);     \draw (0) -- (b);     \end{tikzpicture}     \end{document}      Ideally, I hope to write the description of node `a` as               \node (a) [left of=h] {$\n$};      so that I can forget about the text (but still have them in math mode).


title: Plain TeX: missing symbol

text: I've tried to compile (both `pdfTeX` and `XeTeX`) simple code:               ☺     \bye      But in result I have a plain page, without anything. What's wrong?


title: Beamer: \AtBeginSection doesn't agree with ignorenonframetext

text: I'm following the advice in the Beamer user guide to produce slides and printed material from the same source using the beamerarticle package. The user guide recommends using the class option `ignorenonframetext`, so that text living outside of a frame environment will be rendered only in the article format but not in the slideshow -- a way to include notes in handouts that you don't want to show onscreen. I've also been using this to divide the presentation visibly into sections:               \AtBeginSection[] % Do nothing for \section*     {     \begin{frame}<beamer>     \frametitle{Outline}     \tableofcontents[currentsection]     \end{frame}     }      The trouble is, `\AtBeginSection[]` and its associated curly braces are outside of a frame environment, so they are ignored, and I don't get the table of contents at the beginning of every section (with highlighting). Is there any way to get these to work together? I don't want to reproduce the whole preamble and contents, but here's where the `\AtBeginSection` bit is stuffed in:               \begin{document}          \begin{frame}\maketitle\end{frame}     \begin{frame}{Outline}     \tableofcontents     \end{frame}          \AtBeginSection[] % Do nothing for \section*     {     \begin{frame}<beamer>     \frametitle{Outline}     \tableofcontents[currentsection]     \end{frame}     }          \section{Introduction}     .... blah blah ......      Thanks! hjh


title: Is there a PlasTeX custom-renderer which can produce ePub (or nearly ePub)?

text: PlasTeX is an implementation of LaTeX in Python, which supports custom rendering classes - you can provide a new class on the output end of the function which transforms something a little like DOM into XHTML or XML. I'm thinking of using this to convert a series of novels which have been written in LaTeX into ePub. It occurred to me that I might write a custom rendering engine to transform the book I have into all of the file-components of ePub, however it's likely that somebody else has already done this. Not wanting to re-invent the wheel, are you aware of any project (or possibly an undocumented feature of PlasTeX) which already does what I need? A search of Google and the PlasTeX documentation suggests that I might have to actually write this thing! Please say it 'aint so! ePub does not seem to be a particularly difficult format to master, however I am incredibly lazy and dislike repeating programming that other (possibly much better) developers have already done, so please point me in the right direction!


title: Texlipse linked resource

text: I'm trying to keep all my .tex macros in a single folder, so I don't have different versions of these macros. Texlipse allows you to create a "linked resource" which mirrors a file outside the project folder. I can successfully link to a file, and I see the shortcut in the project window. However, when I try to build the project, Texlipse cannot locate the .tex file. Has anyone got this to work? An alternative would be to store macros as .sty files in Miktex, but this would be difficult to sync across computers (I need to sync a work and home computer) Mirroring a file from the command line is not a possibility as at work I'm on Windows without admin rights. Also, using LaTeX itself to locate the file outside the project folder (e.g. \input{../../../file.tex}) appears to be incompatible with Texlipse.


title: Arithmetic operation in user-defined command

text: I want to define a command to ease the font configuration as below:               \newcommand{\setfont}[2]{\fontsize{#1}{#2}\selectfont}      The new command `\setfont` takes two parameters: one is the size of the font, the other is the line space. However, it is not convenient to specify the line spacing in point directly. The more intuitive way is to set, e.g. two line spacing, or 1.5 line spacing. So in my command I want to take the second parameter a scale factor. The problem is how to apply the scale factor to the line spacing arguments? With arithmetic operation or other workaround?


title: upright sans serif fonts in mathematics (computer modern)

text: How to prepare document with Computer Modern fonts (using MikTeX 2.9) with upright sans serif fonts. Has anybody got an idea how to do it? I've tried sfmath package, but it produces sans serif _italics_ and I don't know how to get rid of the italics. * * * Let me be more specific. I have a LaTeX document which I want to format in a special way: the document font should be standard serif CM font, but what's between $ $ (and [ ]) should be typeset in sans serif upright font. Any package I tried doesn't help, cmbright and sfmath can produce a sans serif font but in italics.


title: Including figures; how to determine compiler

text: I need to prepare a PDF and PS file from the same latex source but got stuck on including figures. When using `pdflatex` I can insert a png file like:               \includegraphics[scale=0.6]{figure.png}      However, this does not work when producing the PS file. To produce PS I need to set the bounding box and set the scale differently. For the same figure my code looks like this:               \includegraphics[scale=0.073,bb=0 0 2200 1510]{figure.png}      Now I'd like to switch between these two versions depending on the output I want to produce: PS or PDF. Is there any way to determine the output automatically so I can use a conditional clause like `ifthenelse` to switch between the commands? Do you know any easier way to include png files in PS and PDF?


title: Convert .tex to .tex, but replace \ref{} with actual numbers

text: I use Pandoc a lot to go between .tex, .markdown, and .docx. Everything works well enough for me in the .tex to .docx conversion, but the table and section references show `\ref{my_label}` rather than the actual table or section number. Is there a way to convert a .tex file with labels and references to a .tex file with all of those replaced? Say my MWE is this.               \documentclass{article}          \begin{document}     \section{One} \label{sec:one}          I need to right some more in Section \ref{sec:one}.          \end{document}      Can I turn it into this?               \documentclass{article}          \begin{document}     \section{One} \label{sec:one}          I need to right some more in Section 1.          \end{document}


title: Set default Koma script font to Times

text: > **Possible Duplicate:**   >  KOMA-Script: change font of sectioning headings to serif I am using `scrbook` document class but want to change the default font to Times. However when I add:               \usepackage{times}      to the preamble, it does not change the font of the **chapter** , **section** or the **ToC** , but only the text. Am I missing something?


title: KOMA: Margin notes only on outer side of two-column document?

text: For some part of a two-column `scrbook` of mine, I need to actually get a _three_ -column layout: Two columns text, and a third column with a table (or a boxed enumeration, that would work too). Both columns of text and the table / enumeration have to be shorter than a page (for contextual reasons), so column / page breaks are not an issue here. I was hoping to somehow commandeer `geometry` and `\marginpar` (or similar) for the purpose - setting a 1/3rd textwidth margin with `\newgeometry`, and then pushing my "third column" there. However, setting up margins for a `twocolumn` document gives a margin _on both sides of the page_.               \documentclass[twocolumn]{scrbook}     \usepackage[german]{babel}     \usepackage[utf8]{inputenc}     \usepackage[marginparwidth=2cm]{geometry}     \usepackage{lipsum}     \begin{document}     \marginpar{Hello.}     \lipsum[1-4]     \marginpar{You.}     \end{document}      ![Output...](http://i.stack.imgur.com/toFn1.png) Now, I _could_ tweak the page geometry a bit so that the inner margin gets pushed off-page, and set the `\marginpar` (or whatever) in the second column on recto pages and in the first column on verso pages... But before I do that hack-ish thing: Is there, by any chance, a switch in either _KOMA_ or _geometry_ that would tell LaTeX that I want only _one_ margin on the _outer_ side of the page, with `\marginpar`'s from the inner column being pushed there too? **Edit:** Or generally a better way to achieve a "temporary third column"? **Edit 2:** Apparently, no "easy" way to get margin paragraphs "moved over". On second thought, it wouldn't make much sense, from a typographical point of view, since it wouldn't be clear which column is annotated. Ah well, I'll hack my way around it. ;-) Voting to close as "too localized" myself.


title: Place a grid of pictures (2x2) with captions

text: I have 4 photos that I would like to place in in grid on my pages and add a caption to each photo. Does anyone know how to do this?


title: Using Lucida Math Std

text: I'm trying to use Adobe's Lucida font with the corresponding Lucida Math font (as contained in Adobe Font Folio). Using Lucida as the main font works however when I try to use the math font I get the following error: 570: LaTeX Error: Command \dddot already defined It also warns me that "Lucida Math Std does not contain script 'Math'. 'Latin' script used instead. I'm using XeLaTeX. Here's my code:               \documentclass{scrartcl}     \usepackage{unicode-math}     \setmainfont{Lucida Std}     \setmathfont{Lucida Math Std}     \usepackage{amsmath}     \begin{document}     This is a formula     \begin{align*}         a+b=c     \end{align*}     \end{document}


title: Make the bibliography entry link to online resource without showing the href/address

text: So i have my bibliography, and it looks exactly as i want, there's no problem with that. I _don't_ want the entries in the bibliography show the url (unless it's specifically an online resource), and i have achieved this using the custom bib thing. That's all good. ![enter image description here](http://i.stack.imgur.com/wPjPC.jpg) What i would like though, is for the actual entries to be links to their online resources. I have DOIs and links to all my references, so that's not an issue, I'd just like to know how to get them to all be used in the bibliography to make the entries links. I've looked at lots of other questions on here, and can't find any that do what i'd like. all my bibtex entries are of this form:               @ARTICLE{Ziolkowski2012,       author = {{Zi\'{o}\l{l}kowski}, M and {Vikár}, A and Mayes, ML and Bencsura,         A and Lendvay, G et al.},       title = {Modeling the electron-impact dissociation of methane},       journal = {Journal of Chemical Physics},       year = {2012},       volume = {137},       pages = {22A510},       abstract = {Blah Blah Blah},       doi = {10.1063/1.4733706},       file = {Modeling the electron-impact dissociation of methane.pdf:Modeling the electron-impact dissociation of methane.pdf:PDF},       owner = {will},       timestamp = {2013.02.11},       url = {dx.doi.org/10.1063/1.4733706}     }      I am using `hyperref` and `natbib`, which i would except to be able to do this, but i can't see how.


title: Avoid brackets with a command having an optional argument as subscript

text: I have the following code:               \documentclass{article}     \newcommand{\quot}[3][c]{\frac{#2}{#3#1}}     \begin{document}     \LARGE     $A_\frac{a}{bc}$     $A_{\quot{a}{b}}$     $A_{\quot[d]{a}{b}}$     \end{document}      ![enter image description here](http://i.stack.imgur.com/gvFDp.jpg) If I write `$A_\quot{a}{b}$` instead of `$A_{\quot{a}{b}}$` or `$A_\quot[d]{a}{b}$` instead of `$A_{\quot[d]{a}{b}}$` I get an error.               ! Missing { inserted.      Is it possible to modify my `\quot` command in order to suppress the extra brackets?


title: What is the error in this latex code

text: I am not able to understand why I am getting an error on line 40, though I can see nothing wrong here. Please help. I understand this question may be withheld 'as it may not be useful to others'.               \documentclass[]{beamer}     \usepackage[latin1]{inputenc}     \usepackage[english]{babel}     \usepackage{makeidx}     \usepackage{graphicx}     \author{}     \title{Upper GI bleeding}     \begin{document}     \begin{frame}     \maketitle     \end{frame}     %---------------------------------------------------------------------------------     \section*{Presentation of upper GI bleeding}     \begin{frame}{Presentation of upper gastrointestinal bleeding}         \begin{itemize}             \item hematemesis or melena             \item iron deficiency anemia          \end{itemize}            \begin{description}             \item[Hematemesis ] Vomiting containing fresh or altered blood             \item[Melena]  tarry black stool with offensive smell             \item[hematochezia] fresh blooding per rectum          \end{description}     \end{frame}     %--------------------------------------------------------------------------------------------------     \subsection{Hematemesis and melena}     \begin{frame}     \frametitle{Hematemesis or melena}         \begin{itemize}             \item Significant amount of bleeding required              \item blood is an irritant for GIT- vomited or will produce diarrhea             \item At least $500 ml$ of blood is required to produce melena.             \item Depending upon amount of bleeding, patient will have                 \begin{itemize}                     \item tachycardia,                      \item tachycardia and postural hypotension                      \item tachycardia, hypotension, and altered mentation                  \end{itemize}         \end{itemize}     \end{frame}     %---------------------------------------------------------------------------     \subsection*{Iron deficiency anemia}     \begin{frame}     \frametitle {Iron deficiency anemia}         \begin{description}\item [Iron deficirncy anemia]          develops when the person bleeds slowly for a long period   .            \end{description}     \end{frame}     %----------------------------------------------------------------------------------     \section*{The primary management}     \subsection*{Airway, breathing and circulation}     \subsection*{blood products}     \subsection*{Specific Drugs}     \section*{Source Identification}     \subsection*{Upper gi endoscopy}     \subsection*{Angiography}     \subsection*{Imaging }     \subsection*{Surgery}     \section*{Treatment of source}     \subsection*{Endoscopic management}     \subsection*{Angiography}     \subsection*{Surgery}     \section*{Prognosis}     \end{document}


title: problem: showkeys printing labels on top of text in exam class questions

text: This is the example:               \documentclass[a4paper,11pt,spanish,answers]{exam}               \usepackage{showkeys}          \begin{document}         \begin{questions}             \question This is a question This is a question with the label printed on top.         \end{questions}     \end{document}      The label prints on top of the text so I can't read it. Is there a fix or am I doing something wrong?


title: Line break in datapoint label with pgfplot?

text: I have a bar chart, with labels for each column. I would like to break these labels over two lines. I'm not using nodes so the "align" trick doesn't seem to apply. Minimal example: (from Lyx)               \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{tikz}     \usepackage{pgfplots}               \pgfplotsset{ mygraph/.style={ ybar, nodes near coords, every axis plot post/.append style={ point meta=explicit symbolic } }, mygraph/.default={} }          \makeatother     \usepackage{babel}          \begin{document}     \begin{tikzpicture}     \begin{axis}[mygraph,xmax=10,ymax=10,ytick={0,2,...,10}]     \addplot coordinates {(1,5) [Firstword Secondword]}; <= I want a line break here     \end{axis}     \end{tikzpicture}     \end{document}


title: breqn with superscript in a newcommand

text: I am getting unfortunate behavior with the the most recent version of `breqn.sty` with regards to how it handles a `newcommand` that begins with a superscript. Considering the following code               \documentclass{article}     \usepackage{breqn}     \newcommand{\hc}{^\dagger}     \begin{document}     \begin{dmath}       A\hc     \end{dmath}     \end{document}        This code will not stop compiling, and hangs on this error:               ! Missing { inserted.     <to be read again>                         \penalty      l.6   A\hc          ! Missing } inserted.     <inserted text>                      }     l.7 \end{dmath}      (Note that older iterations of `breqn.sty` did not give me this issue.) However, if I just replace `\hc` with `^\dagger`, everything works. Also, if I replace `dmath` with any of the standard math environments, it works (I've been using this particular `newcommand` for years). Is it bad practice to have a superscript begin a `newcommand`? Is there a way to modify my `\hc` to make the above code just work?


title: Index moves the text to index

text: Here is the file I am working with.               \documentclass[12pt,a4paper]{book}     \usepackage{xkeyval}     \usepackage{polyglossia}     \usepackage{xcolor}     \usepackage{makeidx}     \usepackage{multicol}          \setmainfont[Script=Devanagari]{Sanskrit 2003}      \makeindex     \begin{document}     \printindex          \chapter*{प्रथमाध्यायः}               \index{धर्मक्षेत्रे कुरुक्षेत्रे} समवेता युयुत्सव: । \\     मामका: पाण्डावश्चैव किमकुर्वत सञ्जय ॥ १ ॥     \end{document}      In the above example I want the first two words of the verse to appear in index, it does appear in the index but its deleted from the verse. Am I doing something wrong.


title: Partial derivative macro

text: I defined a macro for writing a partial derivative:               \newcommand{\pder}[2]{\frac{\partial#1}{\partial#2}}      this works when inserting two parameters. But I want to modify it so that when inserting only a single parameter, it will leave the numerator blank and fill only the denominator with that parameter. i.e.,               \pder{x}      will produce               \frac{\partial}{\partial x}      How can I achieve that?