Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am writing my Greek PhD thesis in latex (using babel). FYI, by default Τable in Greece is called: Πίνακας. So, for example, when I make a table using the table environment, babel automatically translates the word Table as Πίνακας 1. blabla.

Hence when I use \ref{tab:label} to crossreference to this table, the output of this command is "Πίνακας 1. blabla", as you would expect.

However, because of the Greek language's particularity which has many ways to call nouns, I would therefore like to change the output of the \ref{tab:label} to "Πίνακα 1. blabla" (please note that the difference is the missing ς at the end of the tablename).

How could I do this?

Please have in mind that I want to change only the way the tablename is referenced in the text after calling the \ref command and not the name that appears in the caption (which is correctly transformed by babel as Πίνακας)

share|improve this question
    
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  egreg Nov 28 '11 at 0:12
4  
LaTeX usually doesn't add the name of the referenced object, so you're probably using an additional package. Please, show a minimal example of the code you're using. –  egreg Nov 28 '11 at 0:15
add comment

1 Answer

To add the name of the thing you are referencing to (table, figure, etc.) you can use the cleveref package. As I see from babel when using greek, it automatically changes the table name to Πίνακας 1. So you only need to change the way of referencing it. You achieve this by redefining the table format with \crefformat{element}{new format}.

\documentclass{article}
\usepackage[greek]{babel}
% Clever references
\usepackage{cleveref}

% Change the name of the reference
\crefformat{table}{P'inaka. #1}

\begin{document}
\cref{tab:dummy} bla bla bla.

\begin{table}[ht]
  \centering
  \rule{8cm}{4.5cm}
  \caption{A dummy table}\label{tab:dummy}
\end{table}

\end{document}

result of snippet

I'm not sure if this is what you are doing. I would need to see a MWE to help you better.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
http://tex.stackexchange.com/questions/36344/how-to-change-ref-output
tex.stackexchange.com
crawl=CC-MAIN-2014-23
65047
application/http; msgtype=response
sha1:LFMUVNFIAB6MLSGR256GNRQN6Q4XCTFT
<urn:uuid:42765c04-7455-41ef-89a5-c14d6bd3fa0b>
2014-07-10T16:37:14Z
198.252.206.16
sha1:Q5ZZPE76526B2S6JOWE3DDE6VUKRYHWY
<urn:uuid:7d46e5af-525d-441c-9b6f-595855fa8b8c>
http://tex.stackexchange.com/questions/36344/how-to-change-ref-output
response
<urn:uuid:c1ff60cc-9e20-4258-9d7a-f0f8636f413b>
robots: classic
hostname: ip-10-180-212-248.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2014-23
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for July 2014
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf