Storing common files in texmf – MacOS


I have a number of files that I include in various latex documents (using include). I thought the best way to keep them in one location would be to put them in a directory under ~/Library/texmf. If I put it right under texmf (~/Library/texmf/Common_stuff) they are not found (even after running texhash). If I put them under ~/Library/texmf/tex/latex it complains that it cannot write the .aux files in that directory. Is there a way of making this work? I am using texlive.

Thanks.

Bibliography .bib encoding utf8 (french) accents


I am trying to use a bibliography for a my latex report. I am using a .bib file named bibli with articles written in french (so the titles have accents like é or ô). At the beginning of my .tex file I have

usepackage[utf8]{inputenc}  
usepackage[T1]{fontenc}

in order to write accents without using

{'{e}} 

for é in my file. It works just fine for the text in my .tex file. However in my bibliography (bibli.bib) it doesn’t work because it returns “?” instead of any accented letters. Is there a way to corect this without using {‘{e}} for each bibliography reference ? I already checked the preferences of my editor (TeXMaker) and the encoding is already UTF-8

Thanks in advance

Springers svmult template – chapter-wise bibliography with bibtex?


I have exactly the same problem as that described in the following question, which was (weirdly) closed:

Springers svmult template – bibliography with bibtex?

Can this question please be re-opened?

I’m sure it’s an issue that is encountered by many multi-author volume editors!

Kind regards,
Dave

How to display reference names in place of their numbers in cref


Is it possible to replace the name of cross-references in place of their numbers in multi-referencing with cref ?
I want to define a fullref command for referencing the name of sections and chapters:

Code:

section{First Section}
label{sec:first}
section{Second Section}
label{sec:second}
section{fullref command}
As discussed in fullref{sec:first,sec:second} ...

Text:
As discussed in “sections First Section and Second Section” …

The nameref code would not type the word “Sections” before the reference name and also can’t be used for multiple references.

Also, for referencing to just one label with its name instead of number including its type, there is a good answer here:
How to display label name in autoref in place of its number

Indentation marker for listings


I’m currently writing a document that contains several code samples. I included them as lstlistings and played around with the colors and everything, so they loot quite nice now. My only problem is that in bigger code blocks it gets quite hard to keep track of the indentations, so I’d like to have those vertical lines that many IDEs and text editors have. Is there a way of including those automatically?

Giant number next to chapter title


I want to make chapter titles that look something like this:

enter image description here

I’ll be using a different font, but the idea is the same. If possible, I’d like it to work like this:

  1. Pick the size of the number (one should be able to make it arbitrarily large). The top of the number should always coincide with the top of the chapter title.
  2. Choose the size of the font used in the chapter title.
  3. Extend the number to the desired length. (This will of course be the same for all chapters.)

The chapter text should wrap around, as shown, but it should fit at the top of a page (like a standard chapter title). The number should be flush with the left margin, and the width of the entire block should be textwidth. You should also be able to change the distance from the chapter title to the text below it.

Edit: Here’s my partial solution:

documentclass{report}
usepackage[T1]{fontenc}
usepackage{cmbright}
usepackage{adjustbox}
usepackage{multirow}

makeatletter
def@makechapterhead#1{%
    vspace*{-5.0em}%
    {parindent z@  normalfont
    interlinepenalty@M
    begin{table}[h]
        begin{tabular}{rl}
            {resizebox{1cm}{3cm}{thechapter}} & multicolumn{1}{l}{
                                                  {fontsize{2cm}{0cm}
                                                  selectfontMakeUppercase{#1}}}
        end{tabular}
    end{table}
    parvspace{3.5em}%
}}
makeatother

begin{document}
chapter{Vectors and Kinematics -- A Few Mathematical Preliminaries}
end{document}

Here is the output:
enter image description here

I need to fix the vertical alignment of the chapter number and make it flush left with the margin, and fix the text wrapping in the chapter title.

![enter image description here][3]

One table for all? Searching for a comprehensive yet simple table package [closed]


While I get the concept that LaTeX is different from WYSIWYG editors, formatting tables seems to be a rather complex process in LaTeX (especially for a newbie).

I am thinking of the following basic capabilities which the user changes most often while building a table (feel free to add more capabilities):

  • Tweak overall width of table (with automatic word-wrap, if necessary); tweak column-width (with respect to total table width, rather than absolute size); same for rows.
  • Specify horizontal and vertical alignment and justification of text in a cell or multi-cell; Decimal point alignment;
  • Allow formatting of content in each cell
  • Allow spreadsheet kind of behaviour (i.e., use of formula) for some columns of the table

What are some good table templates or GUI’s that help generate a table quickly and easily? Essentially, I am not talking about helping with the visual-style of the entire table (which would be a bonus), but rather with the easy customization of row/column sizes and cell content as per the users needs.

How to best make the transition from LaTeX2e to expl3 syntax


I was peeking at the LaTeX3 github repository and specifically l3auxdata.dtx. There was a surprise for me, as I have been practicing and studying the expl3 syntax and modules for the last couple of weeks. The surprise was code like:

defauxwrite{auxdata_write:nn}
defauxshipout{auxdata_write_shipout:nn}

I am not too sure if there was a reason for the code to use def, but this reminded me of my own difficulties with the syntax.

There is a great temptation when starting with expl to bypass the verbosity of the expl language and use def and TeX primitives. When I started with expl3 I was literally translating LaTeX2e code in my head and then writing it down. Pretty much like when you learn a foreign language.

I have by now mostly overcome this as I forced myself to do the following:

  1. Avoided defs.
  2. As the too many underscores bothered me, at the beginning I wrote functions as
    module_dosomething:nn. This way I was a bit quicker with debugging and typing. Only started adding l_ or g_ much later or on refactoring the code.
  3. I mentally kept reading the commands together with the argument specifier until it started sinking in. Like module dosomething en en. Reason I kept forgetting to write the specifier.
  4. When I used a tex_<cs>:D like command, I went back and refactored the code later to remove it.
  5. Write notes with examples as I practice the commands. This can be also useful to others.

Do you have any additional tips and tricks to share?

Footnote – larger than textwidth


I am having some issues with footnote{…} . I have defined the margins of my document and the textwidth. However, everytime I include a footnote it streches until the margins of the document thus becoming much larger than the actual text width. I tried to change the margins to the actual textwidth but I was not able to do it.

Can anyone help me?

Below a dummy example:

    %2multibyte Version: 5.50.0.2890 CodePage: 65001

documentclass[12pt,a4paper]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
usepackage{amssymb}
usepackage{graphicx}
usepackage{amsmath}
usepackage{graphicx}
usepackage{siunitx}
usepackage{booktabs}
%usepackage[autolinebreaks]{mcode0}
usepackage{natbib}
usepackage{url}
usepackage{float}
usepackage{placeins}
usepackage[font=small,labelfont=bf,margin=parindent,tableposition=top]{caption}
usepackage{rotating}
%usepackage{showframe}
setcounter{MaxMatrixCols}{10}
usepackage{geometry}
 geometry{
 a4paper,
 total={210mm,297mm},
 left=14mm,
 right=14mm,
 top=21mm,
 bottom=21mm,
 }

%addtolength{oddsidemargin}{-.875in}
%   addtolength{evensidemargin}{-.875in}
%   addtolength{textwidth}{1.75in}
%   addtolength{topmargin}{-.875in}
%   addtolength{textheight}{1.75in}

parskip = 0pt
pagestyle{plain}
setlength{parskip}{.0in}
renewcommand{baselinestretch}{1.3}


newenvironment{Question}[2][Question]{begin{trivlist}
item[hskip labelsep {bfseries #1}hskip labelsep {bfseries #2.}]}{end{trivlist}}

begin{document}

pagenumbering{gobble}
title{Title...}
date{}
author{Volcompt}
maketitle

abstract{ABSTRACT HERE }

vspace{50 mm}
begin{center}
    [VERY PRELIMINARY AND INCOMPLETE]
 end{center}


newpage
pagenumbering{arabic}

section{Introduction}


Some random text here. A stock option is a contract between two people that gives the holder the right, but not the obligation, to buy or sell outstanding stocks at a specific price and at a specific date. Options are purchased when it is believed that the price of a stock will go up or down (depending on the option type). For example, if a stock currently trades at 40 and you believe the price will rise to 50 next month, you would buy a call option today so that next month you can buy the stock for 40, sell it for 50, and make a profit of 10. Stock options trade on a securities exchange, just like stocks.

A stock warrant is just like a stock option because it gives you the right to purchase a company's stock at a specific price and at a specific date. However, a stock warrant differs from an option in two key ways:

A stock warrant is issued by the company itself New shares are issued by the company for the transaction. Unlike a stock option, a stock warrant is issued directly by the company. When a stock option is exercised, the shares usually are received or given by one investor to another; when a stock warrant is exercised, the shares that fulfill the obligation are not received from another investor, but directly from the company. footnote{footnote off margins}
end{document} 

Thanks

Camera is centered on character, but doesn't show character in game window


I’m using Unity 4.6.3. I create an animation from sprite. When I press Play button, I see animation plays on scene window, but on Game Window, I don’t see anything.

enter image description here

Here is Inspector for main camera:
enter image description here

Here is Inspector for Player:
enter image description here

I have checked that both z = 0 when execute. Please tell me which part I config wrong ?

Question and Answer is proudly powered by WordPress.
Theme "The Fundamentals of Graphic Design" by Arjuna
Icons by FamFamFam